create-assistant-ui 0.0.14 → 0.0.16

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":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -1,12 +1,104 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
22
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
+ mod
24
+ ));
3
25
 
4
26
  // src/index.ts
5
- var import_create = require("../../cli/src/commands/create.js");
27
+ var import_commander = require("commander");
28
+ var import_chalk = __toESM(require("chalk"));
29
+ var import_cross_spawn = require("cross-spawn");
30
+ var create = new import_commander.Command().name("create-assistant-ui").description("create a new assistant-ui project").argument("[project-directory]").usage(`${import_chalk.default.green("[project-directory]")} [options]`).option(
31
+ "-t, --template <template>",
32
+ `
33
+
34
+ The template to use for the project, e.g. default, langgraph
35
+ `
36
+ ).option(
37
+ "--use-npm",
38
+ `
39
+
40
+ Explicitly tell the CLI to bootstrap the application using npm
41
+ `
42
+ ).option(
43
+ "--use-pnpm",
44
+ `
45
+
46
+ Explicitly tell the CLI to bootstrap the application using pnpm
47
+ `
48
+ ).option(
49
+ "--use-yarn",
50
+ `
51
+
52
+ Explicitly tell the CLI to bootstrap the application using Yarn
53
+ `
54
+ ).option(
55
+ "--use-bun",
56
+ `
57
+
58
+ Explicitly tell the CLI to bootstrap the application using Bun
59
+ `
60
+ ).option(
61
+ "--skip-install",
62
+ `
63
+
64
+ Explicitly tell the CLI to skip installing packages
65
+ `
66
+ ).action((_, opts) => {
67
+ const templates = {
68
+ default: "https://github.com/assistant-ui/assistant-ui-starter",
69
+ langgraph: "https://github.com/assistant-ui/assistant-ui-starter-langgraph"
70
+ };
71
+ const templateUrl = templates[opts.template ?? "default"];
72
+ if (!templateUrl) {
73
+ console.error(
74
+ `Unknown template: ${opts.template}
75
+ Available templates: ${Object.keys(templates).join(", ")}`
76
+ );
77
+ process.exit(1);
78
+ }
79
+ const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {
80
+ return !(arg === "-t" || arg === "--template" || arr[index - 1] === "-t" || arr[index - 1] === "--template");
81
+ });
82
+ const child = (0, import_cross_spawn.spawn)(
83
+ "npx",
84
+ [`create-next-app@latest`, ...filteredArgs, "-e", templateUrl],
85
+ {
86
+ stdio: "inherit"
87
+ }
88
+ );
89
+ child.on("error", (error) => {
90
+ console.error(`Error: ${error.message}`);
91
+ });
92
+ child.on("close", (code) => {
93
+ if (code !== 0) {
94
+ console.log(`create-next-app process exited with code ${code}`);
95
+ }
96
+ });
97
+ });
6
98
  process.on("SIGINT", () => process.exit(0));
7
99
  process.on("SIGTERM", () => process.exit(0));
8
100
  function main() {
9
- import_create.create.parse();
101
+ create.parse();
10
102
  }
11
103
  main();
12
104
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +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":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { spawn } from \"cross-spawn\";\n\n// Create a standalone version of the create command instead of importing from CLI package\nconst create = new Command()\n .name(\"create-assistant-ui\")\n .description(\"create a new assistant-ui project\")\n .argument(\"[project-directory]\")\n .usage(`${chalk.green(\"[project-directory]\")} [options]`)\n .option(\n \"-t, --template <template>\",\n `\n\n The template to use for the project, e.g. default, langgraph\n`,\n )\n .option(\n \"--use-npm\",\n `\n\n Explicitly tell the CLI to bootstrap the application using npm\n`,\n )\n .option(\n \"--use-pnpm\",\n `\n\n Explicitly tell the CLI to bootstrap the application using pnpm\n`,\n )\n .option(\n \"--use-yarn\",\n `\n\n Explicitly tell the CLI to bootstrap the application using Yarn\n`,\n )\n .option(\n \"--use-bun\",\n `\n\n Explicitly tell the CLI to bootstrap the application using Bun\n`,\n )\n .option(\n \"--skip-install\",\n `\n\n Explicitly tell the CLI to skip installing packages\n`,\n )\n .action((_, opts) => {\n const templates = {\n default: \"https://github.com/assistant-ui/assistant-ui-starter\",\n langgraph:\n \"https://github.com/assistant-ui/assistant-ui-starter-langgraph\",\n };\n\n const templateUrl =\n templates[(opts.template as keyof typeof templates) ?? \"default\"];\n if (!templateUrl) {\n console.error(\n `Unknown template: ${opts.template}\\nAvailable templates: ${Object.keys(templates).join(\", \")}`,\n );\n process.exit(1);\n }\n\n const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {\n return !(\n arg === \"-t\" ||\n arg === \"--template\" ||\n arr[index - 1] === \"-t\" ||\n arr[index - 1] === \"--template\"\n );\n });\n\n const child = spawn(\n \"npx\",\n [`create-next-app@latest`, ...filteredArgs, \"-e\", templateUrl],\n {\n stdio: \"inherit\",\n },\n );\n\n child.on(\"error\", (error) => {\n console.error(`Error: ${error.message}`);\n });\n\n child.on(\"close\", (code) => {\n if (code !== 0) {\n console.log(`create-next-app process exited with code ${code}`);\n }\n });\n });\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,uBAAwB;AACxB,mBAAkB;AAClB,yBAAsB;AAGtB,IAAM,SAAS,IAAI,yBAAQ,EACxB,KAAK,qBAAqB,EAC1B,YAAY,mCAAmC,EAC/C,SAAS,qBAAqB,EAC9B,MAAM,GAAG,aAAAA,QAAM,MAAM,qBAAqB,CAAC,YAAY,EACvD;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC,OAAO,CAAC,GAAG,SAAS;AACnB,QAAM,YAAY;AAAA,IAChB,SAAS;AAAA,IACT,WACE;AAAA,EACJ;AAEA,QAAM,cACJ,UAAW,KAAK,YAAuC,SAAS;AAClE,MAAI,CAAC,aAAa;AAChB,YAAQ;AAAA,MACN,qBAAqB,KAAK,QAAQ;AAAA,uBAA0B,OAAO,KAAK,SAAS,EAAE,KAAK,IAAI,CAAC;AAAA,IAC/F;AACA,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,QAAM,eAAe,QAAQ,KAAK,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,OAAO,QAAQ;AACrE,WAAO,EACL,QAAQ,QACR,QAAQ,gBACR,IAAI,QAAQ,CAAC,MAAM,QACnB,IAAI,QAAQ,CAAC,MAAM;AAAA,EAEvB,CAAC;AAED,QAAM,YAAQ;AAAA,IACZ;AAAA,IACA,CAAC,0BAA0B,GAAG,cAAc,MAAM,WAAW;AAAA,IAC7D;AAAA,MACE,OAAO;AAAA,IACT;AAAA,EACF;AAEA,QAAM,GAAG,SAAS,CAAC,UAAU;AAC3B,YAAQ,MAAM,UAAU,MAAM,OAAO,EAAE;AAAA,EACzC,CAAC;AAED,QAAM,GAAG,SAAS,CAAC,SAAS;AAC1B,QAAI,SAAS,GAAG;AACd,cAAQ,IAAI,4CAA4C,IAAI,EAAE;AAAA,IAChE;AAAA,EACF,CAAC;AACH,CAAC;AAEH,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":["chalk"]}
package/dist/index.mjs CHANGED
@@ -1,7 +1,77 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/index.ts
4
- import { create } from "../../cli/src/commands/create.mjs";
4
+ import { Command } from "commander";
5
+ import chalk from "chalk";
6
+ import { spawn } from "cross-spawn";
7
+ var create = new Command().name("create-assistant-ui").description("create a new assistant-ui 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(
51
+ `Unknown template: ${opts.template}
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}`);
72
+ }
73
+ });
74
+ });
5
75
  process.on("SIGINT", () => process.exit(0));
6
76
  process.on("SIGTERM", () => process.exit(0));
7
77
  function main() {
@@ -1 +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,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":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { spawn } from \"cross-spawn\";\n\n// Create a standalone version of the create command instead of importing from CLI package\nconst create = new Command()\n .name(\"create-assistant-ui\")\n .description(\"create a new assistant-ui project\")\n .argument(\"[project-directory]\")\n .usage(`${chalk.green(\"[project-directory]\")} [options]`)\n .option(\n \"-t, --template <template>\",\n `\n\n The template to use for the project, e.g. default, langgraph\n`,\n )\n .option(\n \"--use-npm\",\n `\n\n Explicitly tell the CLI to bootstrap the application using npm\n`,\n )\n .option(\n \"--use-pnpm\",\n `\n\n Explicitly tell the CLI to bootstrap the application using pnpm\n`,\n )\n .option(\n \"--use-yarn\",\n `\n\n Explicitly tell the CLI to bootstrap the application using Yarn\n`,\n )\n .option(\n \"--use-bun\",\n `\n\n Explicitly tell the CLI to bootstrap the application using Bun\n`,\n )\n .option(\n \"--skip-install\",\n `\n\n Explicitly tell the CLI to skip installing packages\n`,\n )\n .action((_, opts) => {\n const templates = {\n default: \"https://github.com/assistant-ui/assistant-ui-starter\",\n langgraph:\n \"https://github.com/assistant-ui/assistant-ui-starter-langgraph\",\n };\n\n const templateUrl =\n templates[(opts.template as keyof typeof templates) ?? \"default\"];\n if (!templateUrl) {\n console.error(\n `Unknown template: ${opts.template}\\nAvailable templates: ${Object.keys(templates).join(\", \")}`,\n );\n process.exit(1);\n }\n\n const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {\n return !(\n arg === \"-t\" ||\n arg === \"--template\" ||\n arr[index - 1] === \"-t\" ||\n arr[index - 1] === \"--template\"\n );\n });\n\n const child = spawn(\n \"npx\",\n [`create-next-app@latest`, ...filteredArgs, \"-e\", templateUrl],\n {\n stdio: \"inherit\",\n },\n );\n\n child.on(\"error\", (error) => {\n console.error(`Error: ${error.message}`);\n });\n\n child.on(\"close\", (code) => {\n if (code !== 0) {\n console.log(`create-next-app process exited with code ${code}`);\n }\n });\n });\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,eAAe;AACxB,OAAO,WAAW;AAClB,SAAS,aAAa;AAGtB,IAAM,SAAS,IAAI,QAAQ,EACxB,KAAK,qBAAqB,EAC1B,YAAY,mCAAmC,EAC/C,SAAS,qBAAqB,EAC9B,MAAM,GAAG,MAAM,MAAM,qBAAqB,CAAC,YAAY,EACvD;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC,OAAO,CAAC,GAAG,SAAS;AACnB,QAAM,YAAY;AAAA,IAChB,SAAS;AAAA,IACT,WACE;AAAA,EACJ;AAEA,QAAM,cACJ,UAAW,KAAK,YAAuC,SAAS;AAClE,MAAI,CAAC,aAAa;AAChB,YAAQ;AAAA,MACN,qBAAqB,KAAK,QAAQ;AAAA,uBAA0B,OAAO,KAAK,SAAS,EAAE,KAAK,IAAI,CAAC;AAAA,IAC/F;AACA,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,QAAM,eAAe,QAAQ,KAAK,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,OAAO,QAAQ;AACrE,WAAO,EACL,QAAQ,QACR,QAAQ,gBACR,IAAI,QAAQ,CAAC,MAAM,QACnB,IAAI,QAAQ,CAAC,MAAM;AAAA,EAEvB,CAAC;AAED,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA,CAAC,0BAA0B,GAAG,cAAc,MAAM,WAAW;AAAA,IAC7D;AAAA,MACE,OAAO;AAAA,IACT;AAAA,EACF;AAEA,QAAM,GAAG,SAAS,CAAC,UAAU;AAC3B,YAAQ,MAAM,UAAU,MAAM,OAAO,EAAE;AAAA,EACzC,CAAC;AAED,QAAM,GAAG,SAAS,CAAC,SAAS;AAC1B,QAAI,SAAS,GAAG;AACd,cAAQ,IAAI,4CAA4C,IAAI,EAAE;AAAA,IAChE;AAAA,EACF,CAAC;AACH,CAAC;AAEH,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,20 +1,23 @@
1
1
  {
2
2
  "name": "create-assistant-ui",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "license": "MIT",
5
+ "engines": {
6
+ "node": ">=20.0.0"
7
+ },
5
8
  "dependencies": {
6
9
  "chalk": "^5.4.1",
7
10
  "commander": "^13.1.0",
8
11
  "cosmiconfig": "^9.0.0",
9
12
  "cross-spawn": "^7.0.6",
10
13
  "tsconfig-paths": "^4.2.0",
11
- "zod": "^3.24.2"
14
+ "zod": "^3.24.3"
12
15
  },
13
16
  "devDependencies": {
14
17
  "@types/cross-spawn": "^6.0.6",
15
- "@types/node": "^22.14.0",
18
+ "@types/node": "^22.14.1",
16
19
  "tsx": "^4.19.3",
17
- "@assistant-ui/tsbuildutils": "^0.0.1",
20
+ "@assistant-ui/tsbuildutils": "0.0.1",
18
21
  "@assistant-ui/tsconfig": "0.0.0"
19
22
  },
20
23
  "files": [
@@ -1,3 +0,0 @@
1
- import { Command } from "commander";
2
- export declare const create: Command;
3
- //# sourceMappingURL=create.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../../cli/src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,MAAM,SAuFf,CAAC"}