scripting-cli 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,91 @@
1
+ # Scripting app command-line tool
2
+
3
+ Welcome to the `scripting-cli` command-line tool for Scripting app integration. This tool helps you synchronize and preview your scripts in real-time while you develop them using your favorite desktop editor, such as VSCode.
4
+
5
+ [查看中文](./README_zh.md)。
6
+
7
+ ## Prerequisites
8
+
9
+ Before using `scripting-cli`, make sure you have the following:
10
+
11
+ 1. **Node.js**: Ensure you have a recent version of Node.js installed. You can check your Node.js version by running:
12
+ ```bash
13
+ node -v
14
+ ```
15
+
16
+ 2. **Scripting App**: The Scripting app must be installed to connect with the local service that `scripting-cli` runs.
17
+
18
+ ## Installation
19
+
20
+ To use the `scripting-cli`, simply use it via `npx`. There is no need for a global installation.
21
+
22
+ ## Usage
23
+
24
+ ### 1. Create a Working Directory
25
+
26
+ Create a directory on your machine where you will store your Scripting scripts. For example:
27
+ ```bash
28
+ mkdir my-scripting-project
29
+ cd my-scripting-project
30
+ ```
31
+
32
+ ### 2. Start the Local Service
33
+
34
+ In your working directory, run the following command to start the local service:
35
+
36
+ ```bash
37
+ npx scripting-cli start
38
+ ```
39
+
40
+ By default, this will start the service on port `3000`. If you need to specify a different port, you can use the `--port` option:
41
+
42
+ ```bash
43
+ npx scripting-cli start --port=<port>
44
+ ```
45
+
46
+ Replace `<port>` with your desired port number. For example:
47
+ ```bash
48
+ npx scripting-cli start --port=4000
49
+ ```
50
+
51
+ ### 3. Connect the Scripting App
52
+
53
+ Once the service is running, open the **Scripting app** and select the local service you've just started. This will establish the connection between the Scripting app and your local directory.
54
+
55
+ ### 4. Debug and Synchronize Code
56
+
57
+ After connecting, choose the script project you want to debug. The Scripting app will automatically sync the code of this project to your working directory.
58
+
59
+ ### 5. Real-Time Code Synchronization
60
+
61
+ As you write and save scripts in your desktop editor (e.g., VSCode), the updated code will automatically sync to the Scripting app and be executed in real-time. This makes script development and debugging much more convenient.
62
+
63
+ ## Example Workflow
64
+
65
+ 1. Start the local service:
66
+ ```bash
67
+ npx scripting-cli start
68
+ ```
69
+
70
+ 2. Open your desktop editor and write your script.
71
+
72
+ 3. Save the script file.
73
+
74
+ 4. The code automatically syncs to the Scripting app and is executed.
75
+
76
+ ## Additional Information
77
+
78
+ - The default port for the service is `3000`. If that port is already in use, specify a different one using the `--port` option.
79
+ - The tool is intended for users who prefer using desktop editors like VSCode and want seamless integration with the Scripting app for code synchronization and debugging.
80
+
81
+ ## Troubleshooting
82
+
83
+ If you encounter any issues, make sure:
84
+
85
+ - Node.js v20+ is required.
86
+ - Your Scripting app is correctly connected to the local service.
87
+ - No other processes are using the port you wish to use.
88
+
89
+ ---
90
+
91
+ Enjoy using `scripting-cli` for your Scripting app workflow! Happy coding!
package/README_zh.md ADDED
@@ -0,0 +1,91 @@
1
+ # Scripting app 命令行工具
2
+
3
+ 欢迎使用 `scripting-cli` 命令行工具,它用于与 Scripting 应用程序进行集成。通过该工具,您可以在开发脚本时,实现代码的实时同步和预览,方便您使用喜欢的桌面编辑器(例如 VSCode)进行开发。
4
+
5
+ [English Version](./README.md)。
6
+
7
+ ## 前置条件
8
+
9
+ 在使用 `scripting-cli` 之前,请确保满足以下条件:
10
+
11
+ 1. **Node.js**:请确保您已安装v20+版本的 Node.js。可以通过以下命令检查您的 Node.js 版本:
12
+ ```bash
13
+ node -v
14
+ ```
15
+
16
+ 2. **Scripting 应用程序**:必须安装 Scripting 应用程序,以便与 `scripting-cli` 运行的本地服务进行连接。
17
+
18
+ ## 安装
19
+
20
+ 使用 `npx` 命令即可直接使用 `scripting-cli`,无需全局安装。
21
+
22
+ ## 使用方法
23
+
24
+ ### 1. 创建工作目录
25
+
26
+ 在您的机器上创建一个存放 Scripting 脚本的目录。例如:
27
+ ```bash
28
+ mkdir my-scripting-project
29
+ cd my-scripting-project
30
+ ```
31
+
32
+ ### 2. 启动本地服务
33
+
34
+ 在工作目录中,运行以下命令启动本地服务:
35
+
36
+ ```bash
37
+ npx scripting-cli start
38
+ ```
39
+
40
+ 默认情况下,本地服务将启动在端口 `3000`。如果需要指定其他端口,可以使用 `--port` 参数:
41
+
42
+ ```bash
43
+ npx scripting-cli start --port=<port>
44
+ ```
45
+
46
+ 请将 `<port>` 替换为您需要的端口号。例如:
47
+ ```bash
48
+ npx scripting-cli start --port=4000
49
+ ```
50
+
51
+ ### 3. 连接 Scripting 应用
52
+
53
+ 本地服务启动后,打开 **Scripting 应用程序** 并选择您刚才启动的本地服务。这将建立 Scripting 应用与本地目录之间的连接。
54
+
55
+ ### 4. 调试和同步代码
56
+
57
+ 连接成功后,选择您要调试的脚本项目。Scripting 应用将自动将该项目的代码同步到您的工作目录。
58
+
59
+ ### 5. 实时同步代码
60
+
61
+ 当您在桌面编辑器(例如 VSCode)中编写并保存脚本时,更新后的代码将自动同步到 Scripting 应用并立即执行。这样,脚本开发和调试变得更加高效和便捷。
62
+
63
+ ## 示例工作流程
64
+
65
+ 1. 启动本地服务:
66
+ ```bash
67
+ npx scripting-cli start
68
+ ```
69
+
70
+ 2. 打开桌面编辑器并编写脚本。
71
+
72
+ 3. 保存脚本文件。
73
+
74
+ 4. 代码会自动同步到 Scripting 应用并执行。
75
+
76
+ ## 其他信息
77
+
78
+ - 服务的默认端口是 `3000`,如果该端口已被占用,您可以使用 `--port` 参数指定其他端口。
79
+ - 该工具适用于喜欢使用桌面编辑器(如 VSCode)并希望与 Scripting 应用进行无缝集成的用户,以便进行代码同步和调试。
80
+
81
+ ## 故障排除
82
+
83
+ 如果遇到问题,请确保:
84
+
85
+ - 您安装了 v20+版本的Node.js。
86
+ - 您的 Scripting 应用已正确连接到本地服务。
87
+ - 您选择的端口没有被其他进程占用。
88
+
89
+ ---
90
+
91
+ 感谢使用 `scripting-cli`,希望它能为您的 Scripting 应用开发流程带来便利!祝编程愉快!
package/dist/index.js CHANGED
@@ -1,23 +1,391 @@
1
- #!/usr/bin/env node
2
1
  "use strict";
3
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
4
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
4
  };
6
5
  Object.defineProperty(exports, "__esModule", { value: true });
7
- const minimist_1 = __importDefault(require("minimist"));
8
- const startDevServer_1 = require("./startDevServer");
9
- // import { buildApp } from './build'
10
- const createScript_1 = require("./createScript");
11
- function run() {
12
- const args = (0, minimist_1.default)(process.argv.slice(2));
13
- if (args['create'] != null) {
14
- (0, createScript_1.createScript)(args['create']);
15
- }
16
- else if (args._.includes('dev')) {
17
- (0, startDevServer_1.startDevServer)();
6
+ const express_1 = __importDefault(require("express"));
7
+ const http_1 = __importDefault(require("http"));
8
+ const socket_io_1 = require("socket.io");
9
+ const chokidar_1 = __importDefault(require("chokidar"));
10
+ const path_1 = __importDefault(require("path"));
11
+ const fs_1 = __importDefault(require("fs"));
12
+ const ip_1 = __importDefault(require("ip"));
13
+ const yargs_1 = __importDefault(require("yargs/yargs"));
14
+ const helpers_1 = require("yargs/helpers");
15
+ const bonjour_1 = __importDefault(require("bonjour"));
16
+ const crypto_1 = __importDefault(require("crypto"));
17
+ const chalk_1 = __importDefault(require("chalk"));
18
+ const child_process_1 = __importDefault(require("child_process"));
19
+ const os_1 = __importDefault(require("os"));
20
+ const app = (0, express_1.default)();
21
+ const server = http_1.default.createServer(app);
22
+ const io = new socket_io_1.Server(server);
23
+ const bonjour = (0, bonjour_1.default)();
24
+ const getPath = (filename) => path_1.default.join(process.cwd(), filename);
25
+ (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
26
+ // .command({
27
+ // command: 'start',
28
+ // describe: 'Start the scripting-cli server',
29
+ // builder: (yargs) => {
30
+ // return yargs.options({
31
+ // port: {
32
+ // describe: "The port the server listens on",
33
+ // number: true,
34
+ // default: 3000,
35
+ // }
36
+ // })
37
+ // .usage("$0 start [--port=<port>]");
38
+ // },
39
+ // handler: (argv) => {
40
+ // startServer(argv.port);
41
+ // }
42
+ // })
43
+ .command('start', 'Start the scripting-cli server', (yargs) => {
44
+ return yargs.options({
45
+ port: {
46
+ alias: ["p"],
47
+ describe: "The port the server listens on",
48
+ type: "number",
49
+ default: 3000,
50
+ }
51
+ })
52
+ .usage("$0 start [--port=<port>]")
53
+ .example([
54
+ ["$0 start -p=8000", "Start server and listen on 8000"]
55
+ ]);
56
+ }, (argv) => {
57
+ console.log("argv", argv.port);
58
+ startServer(argv.port);
59
+ })
60
+ .option('help', {
61
+ alias: 'h',
62
+ describe: 'Show help',
63
+ })
64
+ .parse();
65
+ function md5(content) {
66
+ return crypto_1.default
67
+ .createHash('md5')
68
+ .update(content)
69
+ .digest('hex');
70
+ }
71
+ function startServer(port) {
72
+ // Function to create tsconfig.json
73
+ const createTsConfig = () => {
74
+ const tsconfigContent = `{
75
+ "compilerOptions": {
76
+ "target": "ESNext",
77
+ "lib": [
78
+ "esnext"
79
+ ],
80
+ "allowJs": true,
81
+ "strict": true,
82
+ "esModuleInterop": true,
83
+ "allowSyntheticDefaultImports": true,
84
+ "forceConsistentCasingInFileNames": true,
85
+ "noFallthroughCasesInSwitch": true,
86
+ "module": "CommonJS",
87
+ "resolveJsonModule": true,
88
+ "skipLibCheck": true,
89
+ "jsx": "react",
90
+ "jsxFactory": "createElement",
91
+ "paths": {
92
+ "scripting": [
93
+ "./dts/scripting.d.ts"
94
+ ]
18
95
  }
19
- // else if (args._.includes('build')) {
20
- // buildApp()
21
- // }
96
+ },
97
+ "include": [
98
+ "./dts/global.d.ts"
99
+ ]
100
+ }`;
101
+ const filePath = getPath('tsconfig.json');
102
+ ensureDirectoryExistence(filePath);
103
+ if (!fs_1.default.existsSync(filePath)) {
104
+ fs_1.default.writeFileSync(filePath, tsconfigContent);
105
+ console.log(chalk_1.default.green('tsconfig.json created.'));
106
+ }
107
+ else {
108
+ console.log(chalk_1.default.gray('tsconfig.json already exists.'));
109
+ }
110
+ };
111
+ const createVSCodeSettings = () => {
112
+ const settingsContent = `{
113
+ "typescript.format.semicolons": "remove",
114
+ "typescript.preferences.jsxAttributeCompletionStyle": "braces",
115
+ }`;
116
+ const filePath = getPath('.vscode/settings.json');
117
+ ensureDirectoryExistence(filePath);
118
+ if (!fs_1.default.existsSync(filePath)) {
119
+ fs_1.default.writeFileSync(filePath, settingsContent);
120
+ console.log(chalk_1.default.green('.vscode/settings.json created.'));
121
+ }
122
+ else {
123
+ console.log(chalk_1.default.gray('.vscode/settings.json already exists.'));
124
+ }
125
+ };
126
+ const ensureDirectoryExistence = (filePath) => {
127
+ const dirname = path_1.default.dirname(filePath);
128
+ if (!fs_1.default.existsSync(dirname)) {
129
+ fs_1.default.mkdirSync(dirname, { recursive: true });
130
+ }
131
+ };
132
+ const writeDtsFiles = async (files) => {
133
+ await Promise.all(Object.entries(files).map(async ([filename, content]) => {
134
+ const filePath = getPath(`dts/${filename}`);
135
+ ensureDirectoryExistence(filePath);
136
+ await fs_1.default
137
+ .promises
138
+ .writeFile(filePath, content)
139
+ .catch((err) => {
140
+ console.log(chalk_1.default.red(`Error writing file: ${err}`));
141
+ });
142
+ }));
143
+ };
144
+ const tryOpenFileInVSCode = (filePath) => {
145
+ let cmd = `code "${filePath}"`;
146
+ if (os_1.default.platform() === "win32") {
147
+ cmd = `cmd.exe /c ${cmd}`;
148
+ }
149
+ else if (os_1.default.platform() === "linux") {
150
+ const shell = process.env["SHELL"];
151
+ cmd = `${shell} -c ${cmd}`;
152
+ }
153
+ else {
154
+ cmd = `"/Applications/Visual Studio Code.app/Contents/MacOS/Electron" "${filePath}"`;
155
+ }
156
+ child_process_1.default.execSync(cmd);
157
+ };
158
+ const PORT = port ?? 3000;
159
+ io.on('connection', (socket) => {
160
+ console.log(chalk_1.default.blue(`Client [${socket.id}] connected`));
161
+ let watcher = null;
162
+ let scriptName = "";
163
+ const createWatcher = (scriptName) => {
164
+ const scriptDir = getPath(scriptName);
165
+ watcher = chokidar_1.default.watch(scriptDir, {
166
+ ignored: /(^|[\/\\])\../,
167
+ persistent: true,
168
+ });
169
+ watcher
170
+ .on('change', (filePath) => {
171
+ if (filePath.match(/\.(js(x)?|ts(x)?)$/)) {
172
+ // send file content md5 hash to client
173
+ // const content = fs.readFileSync(filePath, 'utf-8');
174
+ fs_1.default.readFile(filePath, 'utf-8', (err, content) => {
175
+ if (err) {
176
+ console.log(chalk_1.default.red(`Error reading file: ${err}`));
177
+ return;
178
+ }
179
+ const hash = md5(content);
180
+ const relativePath = path_1.default.relative(scriptDir, filePath);
181
+ console.log(`[${chalk_1.default.bold.blue(scriptName)}] File changed: [${hash}]${relativePath}`);
182
+ socket.emit('fileChange', {
183
+ scriptName,
184
+ filePath: relativePath,
185
+ hash,
186
+ });
187
+ });
188
+ }
189
+ // TODO, add support for other file types
190
+ })
191
+ .on('unlink', (filePath) => {
192
+ const relativePath = path_1.default.relative(scriptDir, filePath);
193
+ socket.emit('deleteFile', {
194
+ scriptName,
195
+ filePath: relativePath,
196
+ });
197
+ })
198
+ .on('unlinkDir', (filePath) => {
199
+ const relativePath = path_1.default.relative(scriptDir, filePath);
200
+ socket.emit('deleteFile', {
201
+ scriptName,
202
+ filePath: relativePath,
203
+ });
204
+ })
205
+ .on('error', error => console.log(chalk_1.default.bgRed(`Watcher error: ${error}`)))
206
+ .on('ready', () => console.log(`[${chalk_1.default.bold.blue(scriptName)}] Watching files for changes`));
207
+ };
208
+ socket.on('syncScriptFromClient', async (data, ack) => {
209
+ try {
210
+ if (data.scriptName === scriptName) {
211
+ ack({
212
+ error: `Script [${data.scriptName}] is already initialized`,
213
+ });
214
+ return;
215
+ }
216
+ if (scriptName != null) {
217
+ console.log(`Received new script, closing previous watcher`);
218
+ watcher?.close();
219
+ watcher = null;
220
+ }
221
+ await writeDtsFiles({
222
+ "global.d.ts": data["global.d.ts"],
223
+ "scripting.d.ts": data["scripting.d.ts"],
224
+ });
225
+ scriptName = data.scriptName;
226
+ const scriptDir = getPath(data.scriptName);
227
+ const tsconfig = require(getPath('tsconfig.json'));
228
+ if (!tsconfig.include.includes(scriptName)) {
229
+ tsconfig.include.push(scriptName);
230
+ await fs_1.default.promises.writeFile(getPath('tsconfig.json'), JSON.stringify(tsconfig, null, 2));
231
+ }
232
+ ensureDirectoryExistence(scriptDir);
233
+ await Promise.all(Object.entries(data.scriptFiles).map(async ([filename, content]) => {
234
+ const filePath = path_1.default.join(scriptDir, filename);
235
+ ensureDirectoryExistence(filePath);
236
+ await fs_1.default.promises.writeFile(filePath, content);
237
+ }));
238
+ console.log(chalk_1.default.green('global.d.ts and scripting.d.ts and other script files saved.'));
239
+ createWatcher(data.scriptName);
240
+ ack({
241
+ success: true,
242
+ });
243
+ const entryFilePath = path_1.default.join(scriptDir, "index.tsx");
244
+ tryOpenFileInVSCode(entryFilePath);
245
+ }
246
+ catch (e) {
247
+ console.log(chalk_1.default.red(`Error: ${e}`));
248
+ ack({
249
+ error: `Failed to init and sync script files.\n${e}`,
250
+ });
251
+ }
252
+ });
253
+ socket.on("syncScriptFromServer", async (data, ack) => {
254
+ try {
255
+ if (scriptName === data.scriptName) {
256
+ ack({
257
+ error: `Script ${data.scriptName} is already initialized`,
258
+ });
259
+ return;
260
+ }
261
+ if (scriptName != null) {
262
+ console.log(`Received new script [${chalk_1.default.bold.blue(data.scriptName)}], closing previous watcher`);
263
+ watcher?.close();
264
+ watcher = null;
265
+ }
266
+ await writeDtsFiles({
267
+ "global.d.ts": data["global.d.ts"],
268
+ "scripting.d.ts": data["scripting.d.ts"],
269
+ });
270
+ const scriptDir = getPath(data.scriptName);
271
+ if (!fs_1.default.existsSync(scriptDir)) {
272
+ ack({
273
+ error: `Script directory ${scriptDir} does not exist`,
274
+ });
275
+ return;
276
+ }
277
+ const scriptFiles = {};
278
+ const readDir = async (dir) => {
279
+ const files = await fs_1.default.promises.readdir(dir, { withFileTypes: true });
280
+ await Promise.all(files.map(async (file) => {
281
+ if (file.isFile()) {
282
+ const filePath = path_1.default.join(dir, file.name);
283
+ const relativePath = path_1.default.relative(scriptDir, filePath);
284
+ const content = await fs_1.default.promises.readFile(filePath, 'utf-8').catch((err) => {
285
+ console.log(chalk_1.default.red(`Error reading file: ${err}`));
286
+ });
287
+ if (typeof content === "string") {
288
+ scriptFiles[relativePath] = {
289
+ hash: md5(content),
290
+ content,
291
+ };
292
+ }
293
+ }
294
+ else if (file.isDirectory()) {
295
+ await readDir(path_1.default.join(dir, file.name));
296
+ }
297
+ }));
298
+ };
299
+ await readDir(scriptDir);
300
+ scriptName = data.scriptName;
301
+ ack({
302
+ scriptFiles,
303
+ });
304
+ createWatcher(data.scriptName);
305
+ const entryFilePath = path_1.default.join(scriptDir, "index.tsx");
306
+ tryOpenFileInVSCode(entryFilePath);
307
+ }
308
+ catch (e) {
309
+ ack({
310
+ error: `Failed to init and pull script files.\n${e}`,
311
+ });
312
+ }
313
+ });
314
+ socket.on('stopDebugScript', (data, ack) => {
315
+ if (data === scriptName) {
316
+ console.log(`[${chalk_1.default.bold.blue(scriptName)}] Stop debug script`);
317
+ watcher?.close();
318
+ watcher = null;
319
+ scriptName = "";
320
+ ack(true);
321
+ }
322
+ else {
323
+ ack(false);
324
+ }
325
+ });
326
+ socket.on("getFileContent", async (data, ack) => {
327
+ if (scriptName !== data.scriptName) {
328
+ ack({
329
+ error: `Script ${data.scriptName} is not initialized`,
330
+ });
331
+ return;
332
+ }
333
+ const filePath = path_1.default.join(getPath(data.scriptName), data.relativePath);
334
+ try {
335
+ const content = await fs_1.default.promises.readFile(filePath, 'utf-8');
336
+ ack({
337
+ content,
338
+ });
339
+ }
340
+ catch (e) {
341
+ ack({
342
+ error: `Failed to get file content.\n${e}`,
343
+ });
344
+ }
345
+ });
346
+ socket.on("log", (data) => {
347
+ if (data.scriptName !== scriptName) {
348
+ return;
349
+ }
350
+ console.log(`[${chalk_1.default.bold.blue(scriptName)}][${data.isError ? chalk_1.default.red("ERROR") : "LOG"}][${new Date().toLocaleTimeString()}] ${data.content}`);
351
+ });
352
+ socket.on("openFile", async (data) => {
353
+ if (data.scriptName !== scriptName) {
354
+ return;
355
+ }
356
+ const filePath = path_1.default.join(getPath(scriptName), data.relativePath);
357
+ if (fs_1.default.existsSync(filePath)) {
358
+ tryOpenFileInVSCode(filePath);
359
+ }
360
+ });
361
+ socket.on('disconnect', () => {
362
+ console.log(chalk_1.default.gray(`Client [${socket.id}] disconnected`));
363
+ watcher?.close();
364
+ watcher = null;
365
+ });
366
+ const serverScriptNames = fs_1.default.readdirSync(process.cwd())
367
+ .filter((filename) => fs_1.default.statSync(filename).isDirectory()
368
+ &&
369
+ filename !== '.vscode');
370
+ // console.log(serverScriptNames)
371
+ socket.emit("serverScripts", serverScriptNames);
372
+ });
373
+ server.listen(PORT, () => {
374
+ createTsConfig(); // Create tsconfig.json when the server starts
375
+ createVSCodeSettings(); // Create vscode settings.json when the server starts
376
+ const ipAddress = ip_1.default.address();
377
+ const address = `http://${ipAddress}:${PORT}`;
378
+ console.log(`Server listening on ${chalk_1.default.blue(address)}\nYou can select this server in the Scripting app to connect.`);
379
+ bonjour.publish({ name: 'Scripting-service', type: 'http', port: PORT });
380
+ process.on('SIGINT', () => {
381
+ bonjour.unpublishAll(() => {
382
+ console.log('Server stopped');
383
+ process.exit();
384
+ });
385
+ });
386
+ });
387
+ }
388
+ if (require.main === module) {
389
+ console.log("start main");
390
+ startServer();
22
391
  }
23
- run();
package/package.json CHANGED
@@ -1,43 +1,48 @@
1
1
  {
2
2
  "name": "scripting-cli",
3
- "version": "1.0.7",
4
- "description": "This plugin include all the commands for developing scripting-js apps.",
5
- "main": "./dist/index.js",
3
+ "version": "1.0.9",
4
+ "description": "This plugin integrates the desktop editor synchronization feature of the Scripting app.",
5
+ "main": "dist/index.js",
6
6
  "bin": {
7
7
  "scripting-cli": "./dist/index.js"
8
8
  },
9
9
  "scripts": {
10
10
  "build": "tsc",
11
- "dev": "tsc -w"
11
+ "start": "node dist/index.js",
12
+ "dev": "ts-node src/index.ts",
13
+ "help": "node dist/index.js --help",
14
+ "test": "echo \"Error: no test specified\" && exit 1"
12
15
  },
16
+ "keywords": [
17
+ "Scripting app",
18
+ "Scripting app cli"
19
+ ],
13
20
  "repository": {
14
21
  "type": "git",
15
22
  "url": "git+https://github.com/thomfang/scripting-cli.git"
16
23
  },
17
- "keywords": [
18
- "scripting",
19
- "javascript",
20
- "typescript"
21
- ],
22
- "author": "tilfon9017@gmail.com",
24
+ "author": "tilfon@live.com",
23
25
  "license": "MIT",
24
26
  "bugs": {
25
27
  "url": "https://github.com/thomfang/scripting-cli/issues"
26
28
  },
27
- "homepage": "https://github.com/thomfang/scripting-cli#readme",
28
29
  "dependencies": {
30
+ "bonjour": "^3.5.0",
29
31
  "chalk": "^4.1.2",
30
- "cross-zip": "^4.0.1",
31
- "express": "^4.18.2",
32
- "minimist": "^1.2.8",
33
- "qrcode-terminal": "^0.12.0",
34
- "socket.io": "^4.7.5",
35
- "webpack": "^5.88.2"
32
+ "chokidar": "^4.0.3",
33
+ "express": "^4.21.2",
34
+ "ip": "^2.0.1",
35
+ "socket.io": "^4.8.1",
36
+ "typescript": "^5.7.3",
37
+ "yargs": "^17.7.2"
36
38
  },
37
39
  "devDependencies": {
38
- "@types/cross-zip": "^4.0.2",
39
- "@types/express": "^4.17.21",
40
- "@types/minimist": "^1.2.5",
41
- "@types/qrcode-terminal": "^0.12.2"
40
+ "@types/bonjour": "^3.5.13",
41
+ "@types/express": "^5.0.0",
42
+ "@types/ip": "^1.1.3",
43
+ "@types/node": "^22.13.4",
44
+ "@types/socket.io": "^3.0.2",
45
+ "@types/yargs": "^17.0.33",
46
+ "ts-node": "^10.9.2"
42
47
  }
43
- }
48
+ }