jbilcke-hf HF staff commited on
Commit
121b555
1 Parent(s): b99b820

work on the Electron build

Browse files
main.js CHANGED
@@ -27,11 +27,9 @@ const mainServerPath = path.join(currentDir, '.next/standalone/server.js')
27
  // now we load the main server
28
  require(mainServerPath)
29
 
30
- const voiceServerPath = path.join(currentDir, '.next/standalone/voice-server.js')
31
-
32
- // now we load the voice server
33
- require(voiceServerPath)
34
-
35
 
36
  const createWindow = () => {
37
  const mainScreen = screen.getPrimaryDisplay()
@@ -45,7 +43,7 @@ const createWindow = () => {
45
  // copy the width and height
46
  ...mainScreen.workAreaSize,
47
 
48
- icon: './public/icon.png'
49
  })
50
 
51
  mainWindow.loadURL('http://0.0.0.0:3000/')
 
27
  // now we load the main server
28
  require(mainServerPath)
29
 
30
+ // TODO: load the proxy server (for AI providers that refuse browser-side clients)
31
+ // const proxyServerPath = path.join(currentDir, '.next/standalone/proxy-server.js')
32
+ // require(proxyServerPath)
 
 
33
 
34
  const createWindow = () => {
35
  const mainScreen = screen.getPrimaryDisplay()
 
43
  // copy the width and height
44
  ...mainScreen.workAreaSize,
45
 
46
+ icon: './public/logos/clapper.png'
47
  })
48
 
49
  mainWindow.loadURL('http://0.0.0.0:3000/')
next.config.js CHANGED
@@ -1,6 +1,6 @@
1
  /** @type {import('next').NextConfig} */
2
  const nextConfig = {
3
- // output: 'standalone',
4
 
5
  experimental: {
6
  serverActions: {
 
1
  /** @type {import('next').NextConfig} */
2
  const nextConfig = {
3
+ output: 'standalone',
4
 
5
  experimental: {
6
  serverActions: {
package-lock.json CHANGED
@@ -7,6 +7,7 @@
7
  "": {
8
  "name": "@aitube/clapper",
9
  "version": "0.0.5",
 
10
  "dependencies": {
11
  "@aitube/broadway": "0.0.22",
12
  "@aitube/clap": "0.0.30",
@@ -61,6 +62,7 @@
61
  "clsx": "^2.1.1",
62
  "cmdk": "^0.2.1",
63
  "date-fns": "^3.6.0",
 
64
  "fflate": "^0.8.2",
65
  "fluent-ffmpeg": "^2.1.3",
66
  "framer-motion": "11.1.7",
@@ -9823,6 +9825,17 @@
9823
  "url": "https://github.com/fb55/domutils?sponsor=1"
9824
  }
9825
  },
 
 
 
 
 
 
 
 
 
 
 
9826
  "node_modules/draco3d": {
9827
  "version": "1.5.7",
9828
  "resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.7.tgz",
 
7
  "": {
8
  "name": "@aitube/clapper",
9
  "version": "0.0.5",
10
+ "license": "GPL-3.0-only",
11
  "dependencies": {
12
  "@aitube/broadway": "0.0.22",
13
  "@aitube/clap": "0.0.30",
 
62
  "clsx": "^2.1.1",
63
  "cmdk": "^0.2.1",
64
  "date-fns": "^3.6.0",
65
+ "dotenv": "^16.4.5",
66
  "fflate": "^0.8.2",
67
  "fluent-ffmpeg": "^2.1.3",
68
  "framer-motion": "11.1.7",
 
9825
  "url": "https://github.com/fb55/domutils?sponsor=1"
9826
  }
9827
  },
9828
+ "node_modules/dotenv": {
9829
+ "version": "16.4.5",
9830
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz",
9831
+ "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
9832
+ "engines": {
9833
+ "node": ">=12"
9834
+ },
9835
+ "funding": {
9836
+ "url": "https://dotenvx.com"
9837
+ }
9838
+ },
9839
  "node_modules/draco3d": {
9840
  "version": "1.5.7",
9841
  "resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.7.tgz",
package.json CHANGED
@@ -3,9 +3,12 @@
3
  "version": "0.0.5",
4
  "private": true,
5
  "description": "🎬 Clapper",
 
 
6
  "scripts": {
7
  "dev": "npm i && npm run checks && next dev",
8
- "build": "npm i && npm run checks && next build",
 
9
  "build:ci": "next build",
10
  "start": "next start",
11
  "checks": "npm run format:fix && npm run lint",
@@ -17,7 +20,7 @@
17
  "test:unit:ci": "vitest run",
18
  "test:unit:watch": "vitest",
19
  "test:e2e": "npx playwright test",
20
- "electron": "electron .",
21
  "electron:start": "electron-forge start",
22
  "electron:package": "electron-forge package",
23
  "electron:make": "electron-forge make"
@@ -76,6 +79,7 @@
76
  "clsx": "^2.1.1",
77
  "cmdk": "^0.2.1",
78
  "date-fns": "^3.6.0",
 
79
  "fflate": "^0.8.2",
80
  "fluent-ffmpeg": "^2.1.3",
81
  "framer-motion": "11.1.7",
 
3
  "version": "0.0.5",
4
  "private": true,
5
  "description": "🎬 Clapper",
6
+ "license": "GPL-3.0-only",
7
+ "main": "main.js",
8
  "scripts": {
9
  "dev": "npm i && npm run checks && next dev",
10
+ "build": "npm i && npm run checks && next build && npm run build:copyassets",
11
+ "build:copyassets": "cp -R public .next/standalone/public && cp -R .next/static .next/standalone/.next/static",
12
  "build:ci": "next build",
13
  "start": "next start",
14
  "checks": "npm run format:fix && npm run lint",
 
20
  "test:unit:ci": "vitest run",
21
  "test:unit:watch": "vitest",
22
  "test:e2e": "npx playwright test",
23
+ "electron": "npm run build && electron .",
24
  "electron:start": "electron-forge start",
25
  "electron:package": "electron-forge package",
26
  "electron:make": "electron-forge make"
 
79
  "clsx": "^2.1.1",
80
  "cmdk": "^0.2.1",
81
  "date-fns": "^3.6.0",
82
+ "dotenv": "^16.4.5",
83
  "fflate": "^0.8.2",
84
  "fluent-ffmpeg": "^2.1.3",
85
  "framer-motion": "11.1.7",
public/images/logos/clapper.png ADDED

Git LFS Details

  • SHA256: 4edc9efac487228f65122cbae7dc8b0b2cca8f1f110d6560fe95c8563473b768
  • Pointer size: 131 Bytes
  • Size of remote file: 495 kB