assistant-ui 0.0.37 → 0.0.38

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.
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const init: Command;
3
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,eAAO,MAAM,IAAI,SAyBb,CAAC"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/commands/init.ts
21
+ var init_exports = {};
22
+ __export(init_exports, {
23
+ init: () => init
24
+ });
25
+ module.exports = __toCommonJS(init_exports);
26
+ var import_commander = require("commander");
27
+ var import_cross_spawn = require("cross-spawn");
28
+ var init = new import_commander.Command().name("init").description("initialize assistant-ui in a new or existing project").action(() => {
29
+ const child = (0, import_cross_spawn.spawn)(
30
+ "npx",
31
+ [
32
+ `shadcn@latest`,
33
+ "add",
34
+ "https://r.assistant-ui.com/chat/b/ai-sdk-quick-start/json"
35
+ ],
36
+ {
37
+ stdio: "inherit"
38
+ }
39
+ );
40
+ child.on("error", (error) => {
41
+ console.error(`Error: ${error.message}`);
42
+ });
43
+ child.on("close", (code) => {
44
+ if (code !== 0) {
45
+ console.log(`other-package-script process exited with code ${code}`);
46
+ }
47
+ });
48
+ });
49
+ // Annotate the CommonJS export names for ESM import in node:
50
+ 0 && (module.exports = {
51
+ init
52
+ });
53
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/init.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport { spawn } from \"cross-spawn\";\n\nexport const init = new Command()\n .name(\"init\")\n .description(\"initialize assistant-ui in a new or existing project\")\n .action(() => {\n const child = spawn(\n \"npx\",\n [\n `shadcn@latest`,\n \"add\",\n \"https://r.assistant-ui.com/chat/b/ai-sdk-quick-start/json\",\n ],\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(`other-package-script process exited with code ${code}`);\n }\n });\n });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,yBAAsB;AAEf,IAAM,OAAO,IAAI,yBAAQ,EAC7B,KAAK,MAAM,EACX,YAAY,sDAAsD,EAClE,OAAO,MAAM;AACZ,QAAM,YAAQ;AAAA,IACZ;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;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,iDAAiD,IAAI,EAAE;AAAA,IACrE;AAAA,EACF,CAAC;AACH,CAAC;","names":[]}
@@ -0,0 +1,28 @@
1
+ // src/commands/init.ts
2
+ import { Command } from "commander";
3
+ import { spawn } from "cross-spawn";
4
+ var init = new Command().name("init").description("initialize assistant-ui in a new or existing project").action(() => {
5
+ const child = spawn(
6
+ "npx",
7
+ [
8
+ `shadcn@latest`,
9
+ "add",
10
+ "https://r.assistant-ui.com/chat/b/ai-sdk-quick-start/json"
11
+ ],
12
+ {
13
+ stdio: "inherit"
14
+ }
15
+ );
16
+ child.on("error", (error) => {
17
+ console.error(`Error: ${error.message}`);
18
+ });
19
+ child.on("close", (code) => {
20
+ if (code !== 0) {
21
+ console.log(`other-package-script process exited with code ${code}`);
22
+ }
23
+ });
24
+ });
25
+ export {
26
+ init
27
+ };
28
+ //# sourceMappingURL=init.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/init.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport { spawn } from \"cross-spawn\";\n\nexport const init = new Command()\n .name(\"init\")\n .description(\"initialize assistant-ui in a new or existing project\")\n .action(() => {\n const child = spawn(\n \"npx\",\n [\n `shadcn@latest`,\n \"add\",\n \"https://r.assistant-ui.com/chat/b/ai-sdk-quick-start/json\",\n ],\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(`other-package-script process exited with code ${code}`);\n }\n });\n });\n"],"mappings":";AAAA,SAAS,eAAe;AACxB,SAAS,aAAa;AAEf,IAAM,OAAO,IAAI,QAAQ,EAC7B,KAAK,MAAM,EACX,YAAY,sDAAsD,EAClE,OAAO,MAAM;AACZ,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;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,iDAAiD,IAAI,EAAE;AAAA,IACrE;AAAA,EACF,CAAC;AACH,CAAC;","names":[]}
package/dist/index.js CHANGED
@@ -29,6 +29,7 @@ var import_package = __toESM(require("../package.json"));
29
29
  var import_create = require("./commands/create.js");
30
30
  var import_add = require("./commands/shadcn/add.js");
31
31
  var import_upgrade = require("./commands/upgrade.js");
32
+ var import_init = require("./commands/init.js");
32
33
  process.on("SIGINT", () => process.exit(0));
33
34
  process.on("SIGTERM", () => process.exit(0));
34
35
  function main() {
@@ -39,6 +40,7 @@ function main() {
39
40
  );
40
41
  program.addCommand(import_add.shadcnAdd);
41
42
  program.addCommand(import_create.create);
43
+ program.addCommand(import_init.init);
42
44
  program.addCommand(import_upgrade.codemodCommand);
43
45
  program.addCommand(import_upgrade.upgradeCommand);
44
46
  program.parse();
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from \"commander\";\n\nimport packageJson from \"../package.json\" with { type: \"json\" };\nimport { create } from \"./commands/create\";\nimport { shadcnAdd } from \"./commands/shadcn/add\";\nimport { codemodCommand, upgradeCommand } from \"./commands/upgrade\";\n\nprocess.on(\"SIGINT\", () => process.exit(0));\nprocess.on(\"SIGTERM\", () => process.exit(0));\n\nfunction main() {\n const program = new Command()\n .name(\"assistant-ui\")\n .description(\"add components and dependencies to your project\")\n .version(\n packageJson.version || \"1.0.0\",\n \"-v, --version\",\n \"display the version number\",\n );\n\n program.addCommand(shadcnAdd);\n program.addCommand(create);\n program.addCommand(codemodCommand);\n program.addCommand(upgradeCommand);\n\n program.parse();\n}\n\nmain();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uBAAwB;AAExB,qBAAwB;AACxB,oBAAuB;AACvB,iBAA0B;AAC1B,qBAA+C;AAE/C,QAAQ,GAAG,UAAU,MAAM,QAAQ,KAAK,CAAC,CAAC;AAC1C,QAAQ,GAAG,WAAW,MAAM,QAAQ,KAAK,CAAC,CAAC;AAE3C,SAAS,OAAO;AACd,QAAM,UAAU,IAAI,yBAAQ,EACzB,KAAK,cAAc,EACnB,YAAY,iDAAiD,EAC7D;AAAA,IACC,eAAAA,QAAY,WAAW;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AAEF,UAAQ,WAAW,oBAAS;AAC5B,UAAQ,WAAW,oBAAM;AACzB,UAAQ,WAAW,6BAAc;AACjC,UAAQ,WAAW,6BAAc;AAEjC,UAAQ,MAAM;AAChB;AAEA,KAAK;","names":["packageJson"]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from \"commander\";\n\nimport packageJson from \"../package.json\" with { type: \"json\" };\nimport { create } from \"./commands/create\";\nimport { shadcnAdd } from \"./commands/shadcn/add\";\nimport { codemodCommand, upgradeCommand } from \"./commands/upgrade\";\nimport { init } from \"./commands/init\";\n\nprocess.on(\"SIGINT\", () => process.exit(0));\nprocess.on(\"SIGTERM\", () => process.exit(0));\n\nfunction main() {\n const program = new Command()\n .name(\"assistant-ui\")\n .description(\"add components and dependencies to your project\")\n .version(\n packageJson.version || \"1.0.0\",\n \"-v, --version\",\n \"display the version number\",\n );\n\n program.addCommand(shadcnAdd);\n program.addCommand(create);\n program.addCommand(init);\n program.addCommand(codemodCommand);\n program.addCommand(upgradeCommand);\n\n program.parse();\n}\n\nmain();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uBAAwB;AAExB,qBAAwB;AACxB,oBAAuB;AACvB,iBAA0B;AAC1B,qBAA+C;AAC/C,kBAAqB;AAErB,QAAQ,GAAG,UAAU,MAAM,QAAQ,KAAK,CAAC,CAAC;AAC1C,QAAQ,GAAG,WAAW,MAAM,QAAQ,KAAK,CAAC,CAAC;AAE3C,SAAS,OAAO;AACd,QAAM,UAAU,IAAI,yBAAQ,EACzB,KAAK,cAAc,EACnB,YAAY,iDAAiD,EAC7D;AAAA,IACC,eAAAA,QAAY,WAAW;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AAEF,UAAQ,WAAW,oBAAS;AAC5B,UAAQ,WAAW,oBAAM;AACzB,UAAQ,WAAW,gBAAI;AACvB,UAAQ,WAAW,6BAAc;AACjC,UAAQ,WAAW,6BAAc;AAEjC,UAAQ,MAAM;AAChB;AAEA,KAAK;","names":["packageJson"]}
package/dist/index.mjs CHANGED
@@ -6,6 +6,7 @@ import packageJson from "../package.json" with { type: "json" };
6
6
  import { create } from "./commands/create.mjs";
7
7
  import { shadcnAdd } from "./commands/shadcn/add.mjs";
8
8
  import { codemodCommand, upgradeCommand } from "./commands/upgrade.mjs";
9
+ import { init } from "./commands/init.mjs";
9
10
  process.on("SIGINT", () => process.exit(0));
10
11
  process.on("SIGTERM", () => process.exit(0));
11
12
  function main() {
@@ -16,6 +17,7 @@ function main() {
16
17
  );
17
18
  program.addCommand(shadcnAdd);
18
19
  program.addCommand(create);
20
+ program.addCommand(init);
19
21
  program.addCommand(codemodCommand);
20
22
  program.addCommand(upgradeCommand);
21
23
  program.parse();
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from \"commander\";\n\nimport packageJson from \"../package.json\" with { type: \"json\" };\nimport { create } from \"./commands/create\";\nimport { shadcnAdd } from \"./commands/shadcn/add\";\nimport { codemodCommand, upgradeCommand } from \"./commands/upgrade\";\n\nprocess.on(\"SIGINT\", () => process.exit(0));\nprocess.on(\"SIGTERM\", () => process.exit(0));\n\nfunction main() {\n const program = new Command()\n .name(\"assistant-ui\")\n .description(\"add components and dependencies to your project\")\n .version(\n packageJson.version || \"1.0.0\",\n \"-v, --version\",\n \"display the version number\",\n );\n\n program.addCommand(shadcnAdd);\n program.addCommand(create);\n program.addCommand(codemodCommand);\n program.addCommand(upgradeCommand);\n\n program.parse();\n}\n\nmain();\n"],"mappings":";;;AAEA,SAAS,eAAe;AAExB,OAAO,iBAAiB,kBAAkB,KAAK,EAAE,MAAM,OAAO;AAC9D,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB,sBAAsB;AAE/C,QAAQ,GAAG,UAAU,MAAM,QAAQ,KAAK,CAAC,CAAC;AAC1C,QAAQ,GAAG,WAAW,MAAM,QAAQ,KAAK,CAAC,CAAC;AAE3C,SAAS,OAAO;AACd,QAAM,UAAU,IAAI,QAAQ,EACzB,KAAK,cAAc,EACnB,YAAY,iDAAiD,EAC7D;AAAA,IACC,YAAY,WAAW;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AAEF,UAAQ,WAAW,SAAS;AAC5B,UAAQ,WAAW,MAAM;AACzB,UAAQ,WAAW,cAAc;AACjC,UAAQ,WAAW,cAAc;AAEjC,UAAQ,MAAM;AAChB;AAEA,KAAK;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from \"commander\";\n\nimport packageJson from \"../package.json\" with { type: \"json\" };\nimport { create } from \"./commands/create\";\nimport { shadcnAdd } from \"./commands/shadcn/add\";\nimport { codemodCommand, upgradeCommand } from \"./commands/upgrade\";\nimport { init } from \"./commands/init\";\n\nprocess.on(\"SIGINT\", () => process.exit(0));\nprocess.on(\"SIGTERM\", () => process.exit(0));\n\nfunction main() {\n const program = new Command()\n .name(\"assistant-ui\")\n .description(\"add components and dependencies to your project\")\n .version(\n packageJson.version || \"1.0.0\",\n \"-v, --version\",\n \"display the version number\",\n );\n\n program.addCommand(shadcnAdd);\n program.addCommand(create);\n program.addCommand(init);\n program.addCommand(codemodCommand);\n program.addCommand(upgradeCommand);\n\n program.parse();\n}\n\nmain();\n"],"mappings":";;;AAEA,SAAS,eAAe;AAExB,OAAO,iBAAiB,kBAAkB,KAAK,EAAE,MAAM,OAAO;AAC9D,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB,sBAAsB;AAC/C,SAAS,YAAY;AAErB,QAAQ,GAAG,UAAU,MAAM,QAAQ,KAAK,CAAC,CAAC;AAC1C,QAAQ,GAAG,WAAW,MAAM,QAAQ,KAAK,CAAC,CAAC;AAE3C,SAAS,OAAO;AACd,QAAM,UAAU,IAAI,QAAQ,EACzB,KAAK,cAAc,EACnB,YAAY,iDAAiD,EAC7D;AAAA,IACC,YAAY,WAAW;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AAEF,UAAQ,WAAW,SAAS;AAC5B,UAAQ,WAAW,MAAM;AACzB,UAAQ,WAAW,IAAI;AACvB,UAAQ,WAAW,cAAc;AACjC,UAAQ,WAAW,cAAc;AAEjC,UAAQ,MAAM;AAChB;AAEA,KAAK;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assistant-ui",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
4
4
  "license": "MIT",
5
5
  "source": "./src/index.ts",
6
6
  "dependencies": {