File size: 10,643 Bytes
857cdcf
 
2bc5ad0
857cdcf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
{
  "name": "chahuadev-framework",
  "version": "6.1.0",
  "description": "Chahuadev Framework - NPM Project Manager Desktop App",
  "main": "main.js",
  "scripts": {
    "prestart": "node -e \"const fs=require('fs'); if(!fs.existsSync('private_key.pem')||!fs.existsSync('public_key.pem')){console.warn('⚠️ Warning: Security keys not found. Build integrity protection may be disabled.');} else {console.log('🔐 Security keys found - integrity protection active');}\"",
    "start": "electron .",
    "dev": "electron . --dev",
    "dev-mode": "electron . --dev-mode",
    "generate-checksums": "node generate-checksums.js",
    "build": "cross-env NODE_ENV=production npm run docs:copy && npm run generate-checksums && electron-builder",
    "pack": "cross-env NODE_ENV=production npm run docs:copy && npm run generate-checksums && electron-builder --dir",
    "dist": "cross-env NODE_ENV=production electron-builder --publish=always",
    "build-win": "cross-env NODE_ENV=production npm run docs:copy && npm run generate-checksums && electron-builder --win",
    "build-msi": "cross-env NODE_ENV=production npm run docs:copy && npm run generate-checksums && electron-builder --win msi --x64",
    "build-exe": "cross-env NODE_ENV=production npm run generate-checksums && electron-builder --win portable --x64",
    "build-nsis": "cross-env NODE_ENV=production npm run docs:copy && npm run generate-checksums && electron-builder --win nsis --x64",
    "build:secure": "cross-env NODE_ENV=production electron-builder --win --publish=never",
    "build:secure-msi": "cross-env NODE_ENV=production node scripts/secure-build.js && electron-builder --win msi --x64",
    "build:fort-knox": "echo ' Starting Fort-Knox Level Build...' && cross-env NODE_ENV=production node scripts/secure-build.js",
    "docs:copy": "node scripts/copy-user-guides.js",
    "docs:status": "node scripts/copy-user-guides.js --status",
    "docs:help": "node scripts/copy-user-guides.js --help",
    "build:win": "cross-env NODE_ENV=production electron-builder --win",
    "build:msi": "cross-env NODE_ENV=production electron-builder --win --publish=never",
    "pack:msi": "cross-env NODE_ENV=production electron-builder --win --dir",
    "dist:msi": "cross-env NODE_ENV=production electron-builder --win msi --publish=always",
    "build:dev": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false npm run build",
    "build:prod": "cross-env NODE_ENV=production npm run security:check && npm run generate-checksums && electron-builder",
    "build:unsigned": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --win",
    "build:signed": "cross-env NODE_ENV=production electron-builder --win",
    "prepare:signing": "echo 'Preparing Code Signing...' && echo 'Set CSC_LINK and CSC_KEY_PASSWORD environment variables' && echo 'Example: export CSC_LINK=path/to/certificate.p12' && echo 'Example: export CSC_KEY_PASSWORD=your_certificate_password'",
    "ui": "electron .",
    "projects": "cmd /c \"cd chahuadev-framework && npm run project:list && pause\"",
    "install-sample": "cmd /c \"cd chahuadev-framework && npm run install:sample\"",
    "start-sample": "cmd /c \"cd chahuadev-framework && npm run start:sample\"",
    "start-studio": "cmd /c \"cd chahuadev-framework && npm run project:start Chahuadev_Studio_V.10.0.0\"",
    "install-studio": "cmd /c \"cd chahuadev-framework && npm run project:install Chahuadev_Studio_V.10.0.0\"",
    "validation": "node validation_gateway.js",
    "test": "node test/test-runner.js",
    "postinstall": "electron-builder install-app-deps",
    "test:packed": "echo \"ทดสอบแอปที่ Pack แล้วในโหมดพัฒนา:\" && echo \"./dist/win-unpacked/\\\"Chahuadev Framework.exe\\\" --dev-mode\"",
    "studio:dev": "cd plugins/Chahuadev_Studio_V.10.0.0 && npm run dev",
    "studio:build": "cd plugins/Chahuadev_Studio_V.10.0.0 && npm run build",
    "studio:install": "cd plugins/Chahuadev_Studio_V.10.0.0 && npm install",
    "plugins:generate": "node generate-manifests.js",
    "framework:status": "node -e \"console.log('Chahuadev Framework Status: Ready')\"",
    "quick": "electron . && echo 'Quick Launch Complete'",
    "test:splash": "echo \" Testing Splash Screen System...\" && electron . --dev-mode",
    "test:logo": "echo \" Logo System Test:\" && echo \"  1. Checking icon.png...\" && (ls icon.png > nul 2>&1 && echo \"  [SUCCESS] icon.png found\" || echo \"  [ERROR] icon.png missing\") && echo \"  2. Checking splash.html...\" && (ls splash.html > nul 2>&1 && echo \"  [SUCCESS] splash.html found\" || echo \"  [ERROR] splash.html missing\") && echo \"  3. Testing app...\" && electron . --dev-mode",
    "security:audit": "npm audit --audit-level=moderate",
    "security:audit-fix": "npm audit fix --force",
    "security:check": "npm run security:audit && npm run security:outdated && npm run security:licenses",
    "security:outdated": "npm outdated --depth=0",
    "security:licenses": "echo \" Checking package licenses...\" && npx license-checker --summary",
    "security:update": "npx npm-check-updates -u && npm install && npm run security:audit",
    "security:report": "echo \" Generating Security Report...\" && npm audit --json > security-audit.json && npm outdated --json > outdated-packages.json && echo \"[SUCCESS] Security reports generated\"",
    "security:daily": "echo \" Daily Security Check...\" && npm run security:check && echo \"[SUCCESS] Daily security check completed\"",
    "dist:exe": "electron-builder --win portable --publish=always",
    "dist:dev": "electron-builder --publish=never",
    "build:simple": "electron-builder",
    "npm:prepare": "node scripts/prepare-npm-package.js",
    "npm:build": "npm run build:win && npm run npm:prepare",
    "npm:publish": "cd npm-package && npm publish",
    "npm:publish-test": "cd npm-package && npm publish --dry-run",
    "build:windows": "cross-env NODE_ENV=production npm run docs:copy && npm run generate-checksums && electron-builder --win --x64 --ia32",
    "build:linux": "cross-env NODE_ENV=production npm run docs:copy && npm run generate-checksums && electron-builder --linux --x64",
    "build:linux:native": "cross-env NODE_ENV=production electron-builder --linux --x64",
    "build:linux:wsl": "wsl bash build-linux-wsl.sh",
    "build:all": "cross-env NODE_ENV=production npm run docs:copy && npm run generate-checksums && electron-builder --win --x64 --ia32 --linux --x64",
    "build:all:smart": "node scripts/build-all-platforms.js"
  },
  "keywords": [
    "chahuadev",
    "framework",
    "npm",
    "electron",
    "desktop"
  ],
  "author": "Chahua Development Thailand",
  "license": "SEE LICENSE IN LICENSE.md",
  "dependencies": {
    "acorn": "^8.15.0",
    "adm-zip": "^0.5.16",
    "archiver": "^4.0.2",
    "axios": "^1.11.0",
    "canvas": "^3.1.2",
    "cheerio": "^1.1.0",
    "child_process": "*",
    "commander": "^11.0.0",
    "cors": "^2.8.5",
    "crypto": "^1.0.1",
    "cytoscape-svg": "^0.4.0",
    "exceljs": "^4.1.1",
    "express": "^4.21.2",
    "fs-extra": "^11.0.0",
    "glob": "^11.0.3",
    "html2canvas": "^1.4.1",
    "jsonwebtoken": "^9.0.2",
    "mammoth": "^1.9.1",
    "mime-types": "^2.1.35",
    "monaco-editor": "^0.45.0",
    "os": "*",
    "path": "*",
    "pdf-parse": "^1.1.1",
    "rimraf": "^6.1.3",
    "util": "*",
    "uuid": "^11.1.0",
    "ws": "^8.18.3",
    "yauzl": "^3.2.0"
  },
  "devDependencies": {
    "audit-ci": "^7.1.0",
    "concurrently": "^8.2.0",
    "cross-env": "^7.0.3",
    "electron": "^38.0.0",
    "electron-builder": "^26.8.1",
    "electron-updater": "^6.6.2",
    "javascript-obfuscator": "^0.14.3",
    "license-checker": "^25.0.1",
    "nodemon": "^3.0.1",
    "npm-check-updates": "^17.0.6",
    "retire": "^5.0.0",
    "webpack-obfuscator": "^0.6.0"
  },
  "build": {
    "asar": true,
    "appId": "com.chahuadev.framework",
    "productName": "Chahuadev Framework",
    "artifactName": "${productName}-${version}.${ext}",
    "directories": {
      "output": "dist/${productName}-${version}",
      "buildResources": "build"
    },
    "extraFiles": [
      {
        "from": "icon.png",
        "to": "."
      },
      {
        "from": "logo.png",
        "to": "."
      },
      {
        "from": "logo.ico",
        "to": "."
      },
      {
        "from": "splash.html",
        "to": "."
      },
      {
        "from": "build_assets/plugins",
        "to": "plugins"
      }
    ],
    "extraResources": [
      {
        "from": "vendor/node-v20.15.1-win-x64/",
        "to": "node"
      }
    ],
    "files": [
      "main.js",
      "app.html",
      "splash.html",
      "preload.js",
      "package.json",
      "icon.png",
      "web/**/*",
      "modules/**/*",
      "strategies/**/*",
      "backend/**/*",
      "tools/**/*",
      "video/**/*",
      "!plugins/**/*",
      "projects/**/*",
      "vendor/**/*",
      "config/**/*",
      "validation_gateway.js",
      "cli.js",
      "generate-manifests.js",
      "checksums.json",
      "checksums.sig",
      "public_key.pem",
      "!private_key.pem",
      "!node_modules/.cache/**/*",
      "!dist/**/*",
      "!projects/*/node_modules/**/*",
      "!projects/*/dist/**/*",
      "!builder.html",
      "!generated_*/**/*",
      "!**/logs/**/*",
      "!test/**/*",
      "!docs/**/*",
      "!*.log"
    ],
    "win": {
      "target": [
        {
          "target": "nsis",
          "arch": [
          "x64",
          "ia32"

          ]
        },
        {
          "target": "msi",
          "arch": [
          "x64",
          "ia32"
          ]
        },
        {
          "target": "portable",
          "arch": [
          "x64",
          "ia32"
          ]
        },
        {
          "target": "dir",
          "arch": [
          "x64",
          "ia32"
          ]
        }
      ],
      "icon": "icon.png",
      "requestedExecutionLevel": "asInvoker",
      "signAndEditExecutable": false,
      "verifyUpdateCodeSignature": false,
      "artifactName": "${productName}-${version}-${os}-${arch}.${ext}"
    },
    "mac": {
      "target": "dmg",
      "icon": "icon.png"
    },
    "linux": {
      "target": "AppImage",
      "icon": "icon.png"
    },
    "nsis": {
      "oneClick": false,
      "allowToChangeInstallationDirectory": true,
      "createDesktopShortcut": true,
      "createStartMenuShortcut": true,
      "shortcutName": "Chahuadev Framework"
    },
    "msi": {
      "oneClick": false,
      "warningsAsErrors": false,
      "additionalWixArgs": [
        "-cultures:th-TH"
      ]
    },
    "generateUpdatesFilesForAllChannels": true
  }
}