create-assistant-ui 0.0.38 → 0.0.40

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 CHANGED
@@ -2,15 +2,21 @@
2
2
  import { Command } from "commander";
3
3
  import chalk from "chalk";
4
4
  import { spawn } from "cross-spawn";
5
- // Create a standalone version of the create command instead of importing from CLI package
5
+ // Keep in sync with packages/cli/src/lib/constants.ts
6
+ const templates = {
7
+ default: "https://github.com/assistant-ui/assistant-ui-starter",
8
+ minimal: "https://github.com/assistant-ui/assistant-ui-starter-minimal",
9
+ cloud: "https://github.com/assistant-ui/assistant-ui-starter-cloud",
10
+ langgraph: "https://github.com/assistant-ui/assistant-ui-starter-langgraph",
11
+ mcp: "https://github.com/assistant-ui/assistant-ui-starter-mcp",
12
+ };
6
13
  const create = new Command()
7
14
  .name("create-assistant-ui")
8
15
  .description("create a new assistant-ui project")
9
16
  .argument("[project-directory]")
10
17
  .usage(`${chalk.green("[project-directory]")} [options]`)
11
18
  .option("-t, --template <template>", `
12
-
13
- The template to use for the project, e.g. default, langgraph
19
+ The template to use (${Object.keys(templates).join(", ")})
14
20
  `)
15
21
  .option("--use-npm", `
16
22
 
@@ -33,10 +39,6 @@ const create = new Command()
33
39
  Explicitly tell the CLI to skip installing packages
34
40
  `)
35
41
  .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
42
  const templateUrl = templates[opts.template ?? "default"];
41
43
  if (!templateUrl) {
42
44
  console.error(`Unknown template: ${opts.template}\nAvailable templates: ${Object.keys(templates).join(", ")}`);
@@ -53,10 +55,12 @@ const create = new Command()
53
55
  });
54
56
  child.on("error", (error) => {
55
57
  console.error(`Error: ${error.message}`);
58
+ process.exit(1);
56
59
  });
57
60
  child.on("close", (code) => {
58
61
  if (code !== 0) {
59
- console.log(`create-next-app process exited with code ${code}`);
62
+ console.error(`create-next-app process exited with code ${code}`);
63
+ process.exit(code || 1);
60
64
  }
61
65
  });
62
66
  });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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;;;CAGH,CACE;KACA,MAAM,CACL,YAAY,EACZ;;;CAGH,CACE;KACA,MAAM,CACL,YAAY,EACZ;;;CAGH,CACE;KACA,MAAM,CACL,WAAW,EACX;;;CAGH,CACE;KACA,MAAM,CACL,gBAAgB,EAChB;;;CAGH,CACE;KACA,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;IAClB,MAAM,SAAS,GAAG;QAChB,OAAO,EAAE,sDAAsD;QAC/D,SAAS,EACP,gEAAgE;KACnE,CAAC;IAEF,MAAM,WAAW,GACf,SAAS,CAAE,IAAI,CAAC,QAAmC,IAAI,SAAS,CAAC,CAAC;IACpE,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,CAAC,KAAK,CACX,qBAAqB,IAAI,CAAC,QAAQ,0BAA0B,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAChG,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CA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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,6 +1,6 @@
1
1
  {
2
2
  "name": "create-assistant-ui",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "description": "Create assistant-ui apps with one command",
5
5
  "keywords": [
6
6
  "cli",
@@ -26,7 +26,7 @@
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
28
  "chalk": "^5.6.2",
29
- "commander": "^14.0.2",
29
+ "commander": "^14.0.3",
30
30
  "cross-spawn": "^7.0.6"
31
31
  },
32
32
  "devDependencies": {
package/src/index.ts CHANGED
@@ -3,7 +3,15 @@ import { Command } from "commander";
3
3
  import chalk from "chalk";
4
4
  import { spawn } from "cross-spawn";
5
5
 
6
- // Create a standalone version of the create command instead of importing from CLI package
6
+ // Keep in sync with packages/cli/src/lib/constants.ts
7
+ const templates = {
8
+ default: "https://github.com/assistant-ui/assistant-ui-starter",
9
+ minimal: "https://github.com/assistant-ui/assistant-ui-starter-minimal",
10
+ cloud: "https://github.com/assistant-ui/assistant-ui-starter-cloud",
11
+ langgraph: "https://github.com/assistant-ui/assistant-ui-starter-langgraph",
12
+ mcp: "https://github.com/assistant-ui/assistant-ui-starter-mcp",
13
+ };
14
+
7
15
  const create = new Command()
8
16
  .name("create-assistant-ui")
9
17
  .description("create a new assistant-ui project")
@@ -12,8 +20,7 @@ const create = new Command()
12
20
  .option(
13
21
  "-t, --template <template>",
14
22
  `
15
-
16
- The template to use for the project, e.g. default, langgraph
23
+ The template to use (${Object.keys(templates).join(", ")})
17
24
  `,
18
25
  )
19
26
  .option(
@@ -52,12 +59,6 @@ const create = new Command()
52
59
  `,
53
60
  )
54
61
  .action((_, opts) => {
55
- const templates = {
56
- default: "https://github.com/assistant-ui/assistant-ui-starter",
57
- langgraph:
58
- "https://github.com/assistant-ui/assistant-ui-starter-langgraph",
59
- };
60
-
61
62
  const templateUrl =
62
63
  templates[(opts.template as keyof typeof templates) ?? "default"];
63
64
  if (!templateUrl) {
@@ -86,11 +87,13 @@ const create = new Command()
86
87
 
87
88
  child.on("error", (error) => {
88
89
  console.error(`Error: ${error.message}`);
90
+ process.exit(1);
89
91
  });
90
92
 
91
93
  child.on("close", (code) => {
92
94
  if (code !== 0) {
93
- console.log(`create-next-app process exited with code ${code}`);
95
+ console.error(`create-next-app process exited with code ${code}`);
96
+ process.exit(code || 1);
94
97
  }
95
98
  });
96
99
  });