create-assistant-ui 0.0.9 → 0.0.10
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/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +1 -70
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// src/index.ts
|
|
5
|
+
var import_create = require("../../cli/src/commands/create.js");
|
|
6
|
+
process.on("SIGINT", () => process.exit(0));
|
|
7
|
+
process.on("SIGTERM", () => process.exit(0));
|
|
8
|
+
function main() {
|
|
9
|
+
import_create.create.parse();
|
|
10
|
+
}
|
|
11
|
+
main();
|
|
12
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { create } from \"../../cli/src/commands/create\";\n\nprocess.on(\"SIGINT\", () => process.exit(0));\nprocess.on(\"SIGTERM\", () => process.exit(0));\n\nfunction main() {\n create.parse();\n}\n\nmain();\n"],"mappings":";;;;AACA,oBAAuB;AAEvB,QAAQ,GAAG,UAAU,MAAM,QAAQ,KAAK,CAAC,CAAC;AAC1C,QAAQ,GAAG,WAAW,MAAM,QAAQ,KAAK,CAAC,CAAC;AAE3C,SAAS,OAAO;AACd,uBAAO,MAAM;AACf;AAEA,KAAK;","names":[]}
|
package/dist/index.js
CHANGED
|
@@ -1,76 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
// ../cli/src/commands/create.ts
|
|
4
|
-
import { Command } from "commander";
|
|
5
|
-
import chalk from "chalk";
|
|
6
|
-
import { spawn } from "cross-spawn";
|
|
7
|
-
var create = new Command().name("create").description("create a new project").argument("[project-directory]").usage(`${chalk.green("[project-directory]")} [options]`).option(
|
|
8
|
-
"-t, --template <template>",
|
|
9
|
-
`
|
|
10
|
-
|
|
11
|
-
The template to use for the project, e.g. default, langgraph
|
|
12
|
-
`
|
|
13
|
-
).option(
|
|
14
|
-
"--use-npm",
|
|
15
|
-
`
|
|
16
|
-
|
|
17
|
-
Explicitly tell the CLI to bootstrap the application using npm
|
|
18
|
-
`
|
|
19
|
-
).option(
|
|
20
|
-
"--use-pnpm",
|
|
21
|
-
`
|
|
22
|
-
|
|
23
|
-
Explicitly tell the CLI to bootstrap the application using pnpm
|
|
24
|
-
`
|
|
25
|
-
).option(
|
|
26
|
-
"--use-yarn",
|
|
27
|
-
`
|
|
28
|
-
|
|
29
|
-
Explicitly tell the CLI to bootstrap the application using Yarn
|
|
30
|
-
`
|
|
31
|
-
).option(
|
|
32
|
-
"--use-bun",
|
|
33
|
-
`
|
|
34
|
-
|
|
35
|
-
Explicitly tell the CLI to bootstrap the application using Bun
|
|
36
|
-
`
|
|
37
|
-
).option(
|
|
38
|
-
"--skip-install",
|
|
39
|
-
`
|
|
40
|
-
|
|
41
|
-
Explicitly tell the CLI to skip installing packages
|
|
42
|
-
`
|
|
43
|
-
).action((_, opts) => {
|
|
44
|
-
const templates = {
|
|
45
|
-
default: "https://github.com/assistant-ui/assistant-ui-starter",
|
|
46
|
-
langgraph: "https://github.com/assistant-ui/assistant-ui-starter-langgraph"
|
|
47
|
-
};
|
|
48
|
-
const templateUrl = templates[opts.template ?? "default"];
|
|
49
|
-
if (!templateUrl) {
|
|
50
|
-
console.error(`Unknown template: ${opts.template}`);
|
|
51
|
-
process.exit(1);
|
|
52
|
-
}
|
|
53
|
-
const filteredArgs = process.argv.slice(3).filter((arg, index, arr) => {
|
|
54
|
-
return !(arg === "-t" || arg === "--template" || arr[index - 1] === "-t" || arr[index - 1] === "--template");
|
|
55
|
-
});
|
|
56
|
-
const child = spawn(
|
|
57
|
-
"npx",
|
|
58
|
-
[`create-next-app@latest`, ...filteredArgs, "-e", templateUrl],
|
|
59
|
-
{
|
|
60
|
-
stdio: "inherit"
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
child.on("error", (error) => {
|
|
64
|
-
console.error(`Error: ${error.message}`);
|
|
65
|
-
});
|
|
66
|
-
child.on("close", (code) => {
|
|
67
|
-
if (code !== 0) {
|
|
68
|
-
console.log(`other-package-script process exited with code ${code}`);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
|
|
73
3
|
// src/index.ts
|
|
4
|
+
import { create } from "../../cli/src/commands/create.mjs";
|
|
74
5
|
process.on("SIGINT", () => process.exit(0));
|
|
75
6
|
process.on("SIGTERM", () => process.exit(0));
|
|
76
7
|
function main() {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { create } from \"../../cli/src/commands/create\";\n\nprocess.on(\"SIGINT\", () => process.exit(0));\nprocess.on(\"SIGTERM\", () => process.exit(0));\n\nfunction main() {\n create.parse();\n}\n\nmain();\n"],"mappings":";;;AACA,SAAS,cAAc;AAEvB,QAAQ,GAAG,UAAU,MAAM,QAAQ,KAAK,CAAC,CAAC;AAC1C,QAAQ,GAAG,WAAW,MAAM,QAAQ,KAAK,CAAC,CAAC;AAE3C,SAAS,OAAO;AACd,SAAO,MAAM;AACf;AAEA,KAAK;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-assistant-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -14,14 +14,15 @@
|
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@types/cross-spawn": "^6.0.6",
|
|
16
16
|
"@types/node": "^22.10.7",
|
|
17
|
-
"
|
|
17
|
+
"tsx": "^4.19.2",
|
|
18
|
+
"@assistant-ui/tsbuildutils": "^0.0.1",
|
|
18
19
|
"@assistant-ui/tsconfig": "0.0.0"
|
|
19
20
|
},
|
|
20
21
|
"files": [
|
|
21
22
|
"dist",
|
|
22
23
|
"README.md"
|
|
23
24
|
],
|
|
24
|
-
"bin": "./dist/index.
|
|
25
|
+
"bin": "./dist/index.mjs",
|
|
25
26
|
"publishConfig": {
|
|
26
27
|
"access": "public",
|
|
27
28
|
"provenance": true
|
|
@@ -35,6 +36,6 @@
|
|
|
35
36
|
"url": "https://github.com/assistant-ui/assistant-ui/issues"
|
|
36
37
|
},
|
|
37
38
|
"scripts": {
|
|
38
|
-
"build": "
|
|
39
|
+
"build": "tsx scripts/build.mts"
|
|
39
40
|
}
|
|
40
41
|
}
|