magicpath-ai 1.0.0
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 +107 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +66 -0
- package/dist/cli.js.map +1 -0
- package/dist/util/index.d.ts +7 -0
- package/dist/util/index.js +65 -0
- package/dist/util/index.js.map +1 -0
- package/dist/util/logger.d.ts +7 -0
- package/dist/util/logger.js +21 -0
- package/dist/util/logger.js.map +1 -0
- package/package.json +68 -0
package/README.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# MagicPath CLI
|
|
2
|
+
|
|
3
|
+
( Instantly bring your MagicPath AI projects to your local development environment. Edit, remix, and create in your own vibe.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx magicpath@latest clone -k <your-access-key>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
### Using npx (Recommended)
|
|
14
|
+
|
|
15
|
+
No installation required! Just run:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx magicpath@latest clone -k <access-key>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Global Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g magicpath
|
|
25
|
+
magicpath clone -k <access-key>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Local Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install magicpath
|
|
32
|
+
npx magicpath clone -k <access-key>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
### Clone Command
|
|
38
|
+
|
|
39
|
+
Download and set up a MagicPath project locally:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx magicpath@latest clone -k <access-key> [options]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Options:**
|
|
46
|
+
- `-k, --key <accessKey>` (required): = One-time magic access key to unlock and download your project
|
|
47
|
+
- `-d, --debug`: Get verbose debug logs in the CLI
|
|
48
|
+
|
|
49
|
+
**Example:**
|
|
50
|
+
```bash
|
|
51
|
+
npx magicpath@latest clone -k mp_1234567890abcdef
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The CLI will:
|
|
55
|
+
1. =� Download your project using the access key
|
|
56
|
+
2. =� Prompt you to name your project (default: `magicpath-project`)
|
|
57
|
+
3. =� Unpack the project to a local directory
|
|
58
|
+
4. <� Your project is ready to go!
|
|
59
|
+
|
|
60
|
+
## What You Get
|
|
61
|
+
|
|
62
|
+
When you clone a MagicPath project, you'll get a complete local copy with:
|
|
63
|
+
- All project files and assets
|
|
64
|
+
- Configuration files
|
|
65
|
+
- Dependencies and setup instructions
|
|
66
|
+
- Ready-to-run codebase
|
|
67
|
+
|
|
68
|
+
## Requirements
|
|
69
|
+
|
|
70
|
+
- Node.js >=16.0.0
|
|
71
|
+
- npm or yarn
|
|
72
|
+
|
|
73
|
+
## How It Works
|
|
74
|
+
|
|
75
|
+
1. **Access Key**: Each MagicPath project comes with a unique, one-time access key
|
|
76
|
+
2. **Secure Download**: The CLI securely downloads your project from MagicPath servers
|
|
77
|
+
3. **Local Setup**: Projects are extracted and set up in your chosen directory
|
|
78
|
+
4. **Ready to Code**: Start editing, remixing, and building immediately
|
|
79
|
+
|
|
80
|
+
## Troubleshooting
|
|
81
|
+
|
|
82
|
+
### Invalid Access Key
|
|
83
|
+
- Ensure your access key is correct and hasn't been used before
|
|
84
|
+
- Access keys are single-use for security
|
|
85
|
+
|
|
86
|
+
### Download Issues
|
|
87
|
+
- Check your internet connection
|
|
88
|
+
- Verify the access key hasn't expired
|
|
89
|
+
- Use `--debug` flag for detailed error information
|
|
90
|
+
|
|
91
|
+
### Permission Errors
|
|
92
|
+
- Ensure you have write permissions in the current directory
|
|
93
|
+
- Try running from a different directory
|
|
94
|
+
|
|
95
|
+
## Support
|
|
96
|
+
|
|
97
|
+
- **Issues**: [GitHub Issues](https://github.com/newcompute-ai/magicpath-node-cli/issues)
|
|
98
|
+
- **Email**: [jack@magicpath.ai](mailto:jack@magicpath.ai)
|
|
99
|
+
- **Website**: [magicpath.ai](https://magicpath.ai)
|
|
100
|
+
|
|
101
|
+
## License
|
|
102
|
+
|
|
103
|
+
MIT � Jack Beoris
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
Made with ( by the MagicPath team
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import prompts from 'prompts';
|
|
3
|
+
import { program } from 'commander';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import ora from 'ora';
|
|
6
|
+
import { enableDebugLogger, logger } from './util/logger.js';
|
|
7
|
+
import { downloadProject, releaseProject, unpackProject, } from './util/index.js';
|
|
8
|
+
program.name('magicpath').description('CLI for MagicPath AI').version('1.0.0');
|
|
9
|
+
const cloneOptionsSchema = z.object({
|
|
10
|
+
key: z.string(),
|
|
11
|
+
debug: z.boolean().default(false),
|
|
12
|
+
});
|
|
13
|
+
program
|
|
14
|
+
.command('clone')
|
|
15
|
+
.description('✨ Instantly bring your MagicPath project to your local playground. Edit, remix, and create in your own vibe.')
|
|
16
|
+
.requiredOption('-k, --key <accessKey>', '🔑 One-time magic access key to unlock and download your project')
|
|
17
|
+
.option('-d, --debug', 'Get verbose debug logs in the CLI')
|
|
18
|
+
.action(async (options) => {
|
|
19
|
+
let cloneOptions;
|
|
20
|
+
try {
|
|
21
|
+
cloneOptions = cloneOptionsSchema.parse(options);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
throw new Error('Invalid CLI options for clone command.');
|
|
25
|
+
}
|
|
26
|
+
if (cloneOptions.debug)
|
|
27
|
+
enableDebugLogger();
|
|
28
|
+
logger.debug({ options });
|
|
29
|
+
logger.debug({ options: cloneOptions });
|
|
30
|
+
// Step 1: Download project
|
|
31
|
+
const downloadSpinner = ora('📥 Downloading project...').start();
|
|
32
|
+
try {
|
|
33
|
+
const filename = await downloadProject(cloneOptions.key);
|
|
34
|
+
logger.debug({ filename });
|
|
35
|
+
downloadSpinner.succeed('Project downloaded');
|
|
36
|
+
// Ask for project name
|
|
37
|
+
const response = await prompts({
|
|
38
|
+
type: 'text',
|
|
39
|
+
name: 'projectName',
|
|
40
|
+
message: 'What would you like to name your project?',
|
|
41
|
+
initial: 'magicpath-project',
|
|
42
|
+
});
|
|
43
|
+
if (!response.projectName) {
|
|
44
|
+
console.log('Project creation cancelled.');
|
|
45
|
+
releaseProject(filename);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
// Step 2: Unpack project
|
|
49
|
+
const unpackSpinner = ora('📦 Unpacking project...').start();
|
|
50
|
+
try {
|
|
51
|
+
unpackProject(filename, response.projectName);
|
|
52
|
+
unpackSpinner.succeed(`Project unpacked to ${response.projectName}`);
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
unpackSpinner.fail('Failed to unpack project');
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
console.log('\n🎉 Done! Your project is ready to go.');
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
downloadSpinner.fail('Download failed');
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
program.parse();
|
|
66
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,GAAG,MAAM,KAAK,CAAC;AAC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,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC3B,eAAe,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAE9C,uBAAuB;QACvB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC;YAC7B,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,2CAA2C;YACpD,OAAO,EAAE,mBAAmB;SAC7B,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;YAC1B,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;YAC3C,cAAc,CAAC,QAAQ,CAAC,CAAC;YACzB,OAAO;QACT,CAAC;QAED,yBAAyB;QACzB,MAAM,aAAa,GAAG,GAAG,CAAC,yBAAyB,CAAC,CAAC,KAAK,EAAE,CAAC;QAC7D,IAAI,CAAC;YACH,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;YAC9C,aAAa,CAAC,OAAO,CAAC,uBAAuB,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;QACvE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,aAAa,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;YAC/C,MAAM,KAAK,CAAC;QACd,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAe,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACxC,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare enum APIVersion {
|
|
2
|
+
V1 = "v1"
|
|
3
|
+
}
|
|
4
|
+
export declare function makeUrl(verison: APIVersion, endpoint: string): string;
|
|
5
|
+
export declare function downloadProject(key: string): Promise<string>;
|
|
6
|
+
export declare function releaseProject(filename: string): void;
|
|
7
|
+
export declare function unpackProject(filename: string, name: string): string;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import os from 'os';
|
|
4
|
+
import fs from 'fs-extra';
|
|
5
|
+
import AdmZip from 'adm-zip';
|
|
6
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
7
|
+
const MAGICPATH_BASE_URL = 'https://api.magicpath.ai';
|
|
8
|
+
export var APIVersion;
|
|
9
|
+
(function (APIVersion) {
|
|
10
|
+
APIVersion["V1"] = "v1";
|
|
11
|
+
})(APIVersion || (APIVersion = {}));
|
|
12
|
+
export function makeUrl(verison, endpoint) {
|
|
13
|
+
return `${MAGICPATH_BASE_URL}/${verison}/${endpoint}`;
|
|
14
|
+
}
|
|
15
|
+
export async function downloadProject(key) {
|
|
16
|
+
const url = makeUrl(APIVersion.V1, 'components/repository');
|
|
17
|
+
const filename = `${uuidv4()}.zip`;
|
|
18
|
+
const filepath = path.join(os.tmpdir(), filename);
|
|
19
|
+
const response = await axios({
|
|
20
|
+
url,
|
|
21
|
+
params: { key },
|
|
22
|
+
method: 'GET',
|
|
23
|
+
responseType: 'stream',
|
|
24
|
+
});
|
|
25
|
+
await fs.ensureDir(path.dirname(filepath));
|
|
26
|
+
await new Promise(async (resolve, reject) => {
|
|
27
|
+
try {
|
|
28
|
+
response.data
|
|
29
|
+
.pipe(fs.createWriteStream(filepath))
|
|
30
|
+
.on('error', reject)
|
|
31
|
+
.once('close', () => resolve(filepath));
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
reject(err);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return filepath;
|
|
38
|
+
}
|
|
39
|
+
export function releaseProject(filename) {
|
|
40
|
+
try {
|
|
41
|
+
fs.removeSync(filename);
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
// do nothing
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export function unpackProject(filename, name) {
|
|
48
|
+
try {
|
|
49
|
+
let projectDir = path.join(process.cwd(), name);
|
|
50
|
+
let counter = 1;
|
|
51
|
+
while (fs.existsSync(projectDir)) {
|
|
52
|
+
counter++;
|
|
53
|
+
projectDir = path.join(process.cwd(), `${name}-${counter}`);
|
|
54
|
+
}
|
|
55
|
+
fs.mkdirSync(projectDir, { recursive: true });
|
|
56
|
+
const zip = new AdmZip(filename);
|
|
57
|
+
zip.extractAllTo(projectDir, true);
|
|
58
|
+
releaseProject(filename);
|
|
59
|
+
return projectDir;
|
|
60
|
+
}
|
|
61
|
+
catch (err) {
|
|
62
|
+
throw new Error('Failed to extract project. Please try again.');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,MAAM,kBAAkB,GAAG,0BAA0B,CAAC;AAEtD,MAAM,CAAN,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,uBAAS,CAAA;AACX,CAAC,EAFW,UAAU,KAAV,UAAU,QAErB;AAED,MAAM,UAAU,OAAO,CAAC,OAAmB,EAAE,QAAgB;IAC3D,OAAO,GAAG,kBAAkB,IAAI,OAAO,IAAI,QAAQ,EAAE,CAAC;AACxD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,GAAW;IAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,uBAAuB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;QAEhB,OAAO,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACjC,OAAO,EAAE,CAAC;YACV,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,IAAI,IAAI,OAAO,EAAE,CAAC,CAAC;QAC9D,CAAC;QAED,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;QACjC,GAAG,CAAC,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAEnC,cAAc,CAAC,QAAQ,CAAC,CAAC;QAEzB,OAAO,UAAU,CAAC;IACpB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { pino } from 'pino';
|
|
2
|
+
let defaultLogger = pino();
|
|
3
|
+
export function enableDebugLogger() {
|
|
4
|
+
defaultLogger = pino({ level: 'debug' });
|
|
5
|
+
defaultLogger.debug({ message: 'DEBUG logger enabled. ' });
|
|
6
|
+
}
|
|
7
|
+
export const logger = {
|
|
8
|
+
info: (object) => {
|
|
9
|
+
defaultLogger.info(object);
|
|
10
|
+
},
|
|
11
|
+
debug: (object) => {
|
|
12
|
+
defaultLogger.debug(object);
|
|
13
|
+
},
|
|
14
|
+
warn: (object) => {
|
|
15
|
+
defaultLogger.warn(object);
|
|
16
|
+
},
|
|
17
|
+
error: (object) => {
|
|
18
|
+
defaultLogger.error(object);
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/util/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,IAAI,aAAa,GAAG,IAAI,EAAE,CAAC;AAE3B,MAAM,UAAU,iBAAiB;IAC/B,aAAa,GAAG,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IACzC,aAAa,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,CAAC,MAAe,EAAE,EAAE;QACxB,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IACD,KAAK,EAAE,CAAC,MAAe,EAAE,EAAE;QACzB,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IACD,IAAI,EAAE,CAAC,MAAe,EAAE,EAAE;QACxB,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IACD,KAAK,EAAE,CAAC,MAAe,EAAE,EAAE;QACzB,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;CACF,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "magicpath-ai",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Node CLI for MagicPath",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"bin": {
|
|
9
|
+
"magicpath": "./dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=16.0.0"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc && chmod +x dist/cli.js",
|
|
16
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
17
|
+
"lint": "tslint -p tsconfig.json",
|
|
18
|
+
"prepare": "npm run build",
|
|
19
|
+
"prepublishOnly": "npm run lint",
|
|
20
|
+
"preversion": "npm run lint",
|
|
21
|
+
"version": "npm run format && git add -A src",
|
|
22
|
+
"postversion": "git push && git push --tags"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/newcompute-ai/magicpath-node-cli.git"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"magicpath",
|
|
30
|
+
"ai"
|
|
31
|
+
],
|
|
32
|
+
"author": {
|
|
33
|
+
"email": "jack@magicpath.ai",
|
|
34
|
+
"name": "Jack Beoris",
|
|
35
|
+
"url": "https://magicpath.ai"
|
|
36
|
+
},
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/magicpath-ai/magicpath-node-cli/issues"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/newcompute-ai/magicpath-node-cli#readme",
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/adm-zip": "^0.5.7",
|
|
44
|
+
"@types/fs-extra": "^11.0.4",
|
|
45
|
+
"@types/lodash": "^4.17.0",
|
|
46
|
+
"@types/prompts": "^2.4.9",
|
|
47
|
+
"@types/uuid": "^9.0.8",
|
|
48
|
+
"prettier": "^3.2.5",
|
|
49
|
+
"tslint": "^6.1.3",
|
|
50
|
+
"tslint-config-prettier": "^1.18.0",
|
|
51
|
+
"typescript": "^5.8.3"
|
|
52
|
+
},
|
|
53
|
+
"files": [
|
|
54
|
+
"dist"
|
|
55
|
+
],
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"adm-zip": "^0.5.16",
|
|
58
|
+
"axios": "^1.9.0",
|
|
59
|
+
"commander": "^14.0.0",
|
|
60
|
+
"fs-extra": "^11.3.0",
|
|
61
|
+
"lodash": "^4.17.21",
|
|
62
|
+
"ora": "^8.2.0",
|
|
63
|
+
"pino": "^9.7.0",
|
|
64
|
+
"prompts": "^2.4.2",
|
|
65
|
+
"uuid": "^9.0.1",
|
|
66
|
+
"zod": "^3.25.36"
|
|
67
|
+
}
|
|
68
|
+
}
|