create-assistant-ui 0.0.19 → 0.0.21

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
@@ -1,8 +1,10 @@
1
1
  #!/usr/bin/env node
2
+
3
+ // src/index.ts
2
4
  import { Command } from "commander";
3
5
  import chalk from "chalk";
4
6
  import { spawn } from "cross-spawn";
5
- const create = new Command().name("create-assistant-ui").description("create a new assistant-ui project").argument("[project-directory]").usage(`${chalk.green("[project-directory]")} [options]`).option(
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(
6
8
  "-t, --template <template>",
7
9
  `
8
10
 
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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,MAAM,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":[]}
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,Y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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.19",
3
+ "version": "0.0.21",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
6
  "chalk": "^5.4.1",
@@ -15,8 +15,7 @@
15
15
  "@types/cross-spawn": "^6.0.6",
16
16
  "@types/node": "^22.14.1",
17
17
  "tsx": "^4.19.3",
18
- "@assistant-ui/tsbuildutils": "0.0.1",
19
- "@assistant-ui/tsconfig": "0.0.0"
18
+ "@assistant-ui/x-buildutils": "0.0.1"
20
19
  },
21
20
  "files": [
22
21
  "dist",
@@ -37,6 +36,7 @@
37
36
  "url": "https://github.com/assistant-ui/assistant-ui/issues"
38
37
  },
39
38
  "scripts": {
40
- "build": "tsx scripts/build.mts"
39
+ "build": "tsx scripts/build.mts",
40
+ "lint": "eslint ."
41
41
  }
42
42
  }