create-assistant-ui 0.0.35 → 0.0.36
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.js +45 -57
- package/dist/index.js.map +1 -1
- package/package.json +27 -16
package/dist/index.js
CHANGED
|
@@ -1,81 +1,69 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// src/index.ts
|
|
4
2
|
import { Command } from "commander";
|
|
5
3
|
import chalk from "chalk";
|
|
6
4
|
import { spawn } from "cross-spawn";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
// Create a standalone version of the create command instead of importing from CLI package
|
|
6
|
+
const create = new Command()
|
|
7
|
+
.name("create-assistant-ui")
|
|
8
|
+
.description("create a new assistant-ui project")
|
|
9
|
+
.argument("[project-directory]")
|
|
10
|
+
.usage(`${chalk.green("[project-directory]")} [options]`)
|
|
11
|
+
.option("-t, --template <template>", `
|
|
10
12
|
|
|
11
13
|
The template to use for the project, e.g. default, langgraph
|
|
12
|
-
`
|
|
13
|
-
|
|
14
|
-
"--use-npm",
|
|
15
|
-
`
|
|
14
|
+
`)
|
|
15
|
+
.option("--use-npm", `
|
|
16
16
|
|
|
17
17
|
Explicitly tell the CLI to bootstrap the application using npm
|
|
18
|
-
`
|
|
19
|
-
|
|
20
|
-
"--use-pnpm",
|
|
21
|
-
`
|
|
18
|
+
`)
|
|
19
|
+
.option("--use-pnpm", `
|
|
22
20
|
|
|
23
21
|
Explicitly tell the CLI to bootstrap the application using pnpm
|
|
24
|
-
`
|
|
25
|
-
|
|
26
|
-
"--use-yarn",
|
|
27
|
-
`
|
|
22
|
+
`)
|
|
23
|
+
.option("--use-yarn", `
|
|
28
24
|
|
|
29
25
|
Explicitly tell the CLI to bootstrap the application using Yarn
|
|
30
|
-
`
|
|
31
|
-
|
|
32
|
-
"--use-bun",
|
|
33
|
-
`
|
|
26
|
+
`)
|
|
27
|
+
.option("--use-bun", `
|
|
34
28
|
|
|
35
29
|
Explicitly tell the CLI to bootstrap the application using Bun
|
|
36
|
-
`
|
|
37
|
-
|
|
38
|
-
"--skip-install",
|
|
39
|
-
`
|
|
30
|
+
`)
|
|
31
|
+
.option("--skip-install", `
|
|
40
32
|
|
|
41
33
|
Explicitly tell the CLI to skip installing packages
|
|
42
|
-
`
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Available templates: ${Object.keys(templates).join(", ")}`
|
|
53
|
-
);
|
|
54
|
-
process.exit(1);
|
|
55
|
-
}
|
|
56
|
-
const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {
|
|
57
|
-
return !(arg === "-t" || arg === "--template" || arr[index - 1] === "-t" || arr[index - 1] === "--template");
|
|
58
|
-
});
|
|
59
|
-
const child = spawn(
|
|
60
|
-
"npx",
|
|
61
|
-
[`create-next-app@latest`, ...filteredArgs, "-e", templateUrl],
|
|
62
|
-
{
|
|
63
|
-
stdio: "inherit"
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
child.on("error", (error) => {
|
|
67
|
-
console.error(`Error: ${error.message}`);
|
|
68
|
-
});
|
|
69
|
-
child.on("close", (code) => {
|
|
70
|
-
if (code !== 0) {
|
|
71
|
-
console.log(`create-next-app process exited with code ${code}`);
|
|
34
|
+
`)
|
|
35
|
+
.action((_, opts) => {
|
|
36
|
+
const templates = {
|
|
37
|
+
default: "https://github.com/assistant-ui/assistant-ui-starter",
|
|
38
|
+
langgraph: "https://github.com/assistant-ui/assistant-ui-starter-langgraph",
|
|
39
|
+
};
|
|
40
|
+
const templateUrl = templates[opts.template ?? "default"];
|
|
41
|
+
if (!templateUrl) {
|
|
42
|
+
console.error(`Unknown template: ${opts.template}\nAvailable templates: ${Object.keys(templates).join(", ")}`);
|
|
43
|
+
process.exit(1);
|
|
72
44
|
}
|
|
73
|
-
|
|
45
|
+
const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {
|
|
46
|
+
return !(arg === "-t" ||
|
|
47
|
+
arg === "--template" ||
|
|
48
|
+
arr[index - 1] === "-t" ||
|
|
49
|
+
arr[index - 1] === "--template");
|
|
50
|
+
});
|
|
51
|
+
const child = spawn("npx", [`create-next-app@latest`, ...filteredArgs, "-e", templateUrl], {
|
|
52
|
+
stdio: "inherit",
|
|
53
|
+
});
|
|
54
|
+
child.on("error", (error) => {
|
|
55
|
+
console.error(`Error: ${error.message}`);
|
|
56
|
+
});
|
|
57
|
+
child.on("close", (code) => {
|
|
58
|
+
if (code !== 0) {
|
|
59
|
+
console.log(`create-next-app process exited with code ${code}`);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
74
62
|
});
|
|
75
63
|
process.on("SIGINT", () => process.exit(0));
|
|
76
64
|
process.on("SIGTERM", () => process.exit(0));
|
|
77
65
|
function main() {
|
|
78
|
-
|
|
66
|
+
create.parse();
|
|
79
67
|
}
|
|
80
68
|
main();
|
|
81
69
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,0FAA0F;AAC1F,MAAM,MAAM,GAAG,IAAI,OAAO,EAAE;KACzB,IAAI,CAAC,qBAAqB,CAAC;KAC3B,WAAW,CAAC,mCAAmC,CAAC;KAChD,QAAQ,CAAC,qBAAqB,CAAC;KAC/B,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,qBAAqB,CAAC,YAAY,CAAC;KACxD,MAAM,CACL,2BAA2B,EAC3B;;;CAGH,CACE;KACA,MAAM,CACL,WAAW,EACX;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AAK,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QACzB,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,4CAA4C,IAAI,EAAE,CAAC,CAAC;QAClE,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAE7C,SAAS,IAAI;IACX,MAAM,CAAC,KAAK,EAAE,CAAC;AACjB,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,28 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-assistant-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
|
+
"description": "Create assistant-ui apps with one command",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cli",
|
|
7
|
+
"create",
|
|
8
|
+
"scaffold",
|
|
9
|
+
"assistant-ui",
|
|
10
|
+
"ai",
|
|
11
|
+
"chat",
|
|
12
|
+
"react",
|
|
13
|
+
"nextjs"
|
|
14
|
+
],
|
|
15
|
+
"author": "AgentbaseAI Inc.",
|
|
4
16
|
"license": "MIT",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"bin": {
|
|
19
|
+
"create-assistant-ui": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"src",
|
|
24
|
+
"README.md"
|
|
25
|
+
],
|
|
26
|
+
"sideEffects": false,
|
|
5
27
|
"dependencies": {
|
|
6
28
|
"chalk": "^5.6.2",
|
|
7
29
|
"commander": "^14.0.2",
|
|
8
|
-
"
|
|
9
|
-
"cross-spawn": "^7.0.6",
|
|
10
|
-
"tsconfig-paths": "^4.2.0",
|
|
11
|
-
"zod": "^4.1.13"
|
|
30
|
+
"cross-spawn": "^7.0.6"
|
|
12
31
|
},
|
|
13
|
-
"type": "module",
|
|
14
32
|
"devDependencies": {
|
|
15
33
|
"@types/cross-spawn": "^6.0.6",
|
|
16
|
-
"@types/node": "^25.0.0",
|
|
17
|
-
"tsx": "^4.21.0",
|
|
18
34
|
"@assistant-ui/x-buildutils": "0.0.1"
|
|
19
35
|
},
|
|
20
|
-
"files": [
|
|
21
|
-
"dist",
|
|
22
|
-
"src",
|
|
23
|
-
"README.md"
|
|
24
|
-
],
|
|
25
|
-
"bin": "./dist/index.js",
|
|
26
36
|
"publishConfig": {
|
|
27
37
|
"access": "public",
|
|
28
38
|
"provenance": true
|
|
@@ -30,12 +40,13 @@
|
|
|
30
40
|
"homepage": "https://www.assistant-ui.com/",
|
|
31
41
|
"repository": {
|
|
32
42
|
"type": "git",
|
|
33
|
-
"url": "https://github.com/assistant-ui/assistant-ui
|
|
43
|
+
"url": "git+https://github.com/assistant-ui/assistant-ui.git",
|
|
44
|
+
"directory": "packages/create-assistant-ui"
|
|
34
45
|
},
|
|
35
46
|
"bugs": {
|
|
36
47
|
"url": "https://github.com/assistant-ui/assistant-ui/issues"
|
|
37
48
|
},
|
|
38
49
|
"scripts": {
|
|
39
|
-
"build": "
|
|
50
|
+
"build": "aui-build"
|
|
40
51
|
}
|
|
41
52
|
}
|