@tonk/cli 0.0.7 → 0.1.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAGlC,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAGlC,eAAO,MAAM,aAAa,SA2BtB,CAAC"}
|
package/dist/commands/create.js
CHANGED
|
@@ -2,31 +2,26 @@ import { Command } from 'commander';
|
|
|
2
2
|
import child_process from 'child_process';
|
|
3
3
|
export const createCommand = new Command('create')
|
|
4
4
|
.description('Create a new tonk application or component')
|
|
5
|
-
.
|
|
6
|
-
.action(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
//
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.toString()
|
|
15
|
-
.trim();
|
|
16
|
-
}
|
|
17
|
-
finally {
|
|
18
|
-
if (!binaryPath) {
|
|
19
|
-
// use the command from npm registry
|
|
20
|
-
child_process.execSync('npx @tonk/create', { stdio: 'inherit' });
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
child_process.execSync(binaryPath, { stdio: 'inherit' });
|
|
24
|
-
}
|
|
5
|
+
.option('-n, --name <name>', 'Name of the application')
|
|
6
|
+
.action(options => {
|
|
7
|
+
console.log('Creating a new tonk app...');
|
|
8
|
+
try {
|
|
9
|
+
// Build the command with any passed options
|
|
10
|
+
let createCommand = 'npx @tonk/create';
|
|
11
|
+
// Pass through any options provided to the CLI
|
|
12
|
+
if (options.name) {
|
|
13
|
+
createCommand += ` --name "${options.name}"`;
|
|
25
14
|
}
|
|
15
|
+
// Execute the create package
|
|
16
|
+
child_process.execSync(createCommand, {
|
|
17
|
+
stdio: 'inherit',
|
|
18
|
+
env: { ...process.env },
|
|
19
|
+
});
|
|
20
|
+
console.log('🎉 Tonk app created successfully!');
|
|
21
|
+
process.exit(0);
|
|
26
22
|
}
|
|
27
|
-
|
|
28
|
-
console.error('
|
|
29
|
-
/* eslint-disable-next-line */
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error('Failed to create Tonk app:', error);
|
|
30
25
|
process.exit(1);
|
|
31
26
|
}
|
|
32
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,aAAa,MAAM,eAAe,CAAC;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,4CAA4C,CAAC;KACzD,
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,aAAa,MAAM,eAAe,CAAC;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,4CAA4C,CAAC;KACzD,MAAM,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;KACtD,MAAM,CAAC,OAAO,CAAC,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAE1C,IAAI,CAAC;QACH,4CAA4C;QAC5C,IAAI,aAAa,GAAG,kBAAkB,CAAC;QAEvC,+CAA+C;QAC/C,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,aAAa,IAAI,YAAY,OAAO,CAAC,IAAI,GAAG,CAAC;QAC/C,CAAC;QAED,6BAA6B;QAC7B,aAAa,CAAC,QAAQ,CAAC,aAAa,EAAE;YACpC,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE,EAAC,GAAG,OAAO,CAAC,GAAG,EAAC;SACtB,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;QACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tonk/cli",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "The Tonk stack command line utility",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@modelcontextprotocol/sdk": "^1.6.1",
|
|
40
40
|
"@tonk/tinyfoot-mcp-server": "^0.1.2",
|
|
41
|
-
"@tonk/server": "^0.0
|
|
41
|
+
"@tonk/server": "^0.1.0",
|
|
42
|
+
"@tonk/create": "^0.1.1",
|
|
42
43
|
"chalk": "^5.3.0",
|
|
43
44
|
"commander": "^11.1.0",
|
|
44
45
|
"dotenv": "^16.4.7",
|