assistant-ui 0.0.37 → 0.0.39
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/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +53 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/init.mjs +28 -0
- package/dist/commands/init.mjs.map +1 -0
- package/dist/commands/shadcn/add.d.ts.map +1 -1
- package/dist/commands/shadcn/add.js +1 -2
- package/dist/commands/shadcn/add.js.map +1 -1
- package/dist/commands/shadcn/add.mjs +1 -2
- package/dist/commands/shadcn/add.mjs.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/commands/shadcn/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/commands/shadcn/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,eAAO,MAAM,SAAS,SAyClB,CAAC"}
|
|
@@ -26,7 +26,6 @@ module.exports = __toCommonJS(add_exports);
|
|
|
26
26
|
var import_commander = require("commander");
|
|
27
27
|
var import_cross_spawn = require("cross-spawn");
|
|
28
28
|
var REGISTRY_BASE_URL = "https://r.assistant-ui.com";
|
|
29
|
-
var SHADCN_COMPONENT_BASE_URL = `${REGISTRY_BASE_URL}/shadcn`;
|
|
30
29
|
var shadcnAdd = new import_commander.Command().name("add").description("add a component to your project").argument("<components...>", "the components to add").option("-y, --yes", "skip confirmation prompt.", true).option("-o, --overwrite", "overwrite existing files.", false).option(
|
|
31
30
|
"-c, --cwd <cwd>",
|
|
32
31
|
"the working directory. defaults to the current directory.",
|
|
@@ -36,7 +35,7 @@ var shadcnAdd = new import_commander.Command().name("add").description("add a co
|
|
|
36
35
|
if (!/^[a-zA-Z0-9-\/]+$/.test(c)) {
|
|
37
36
|
throw new Error(`Invalid component name: ${c}`);
|
|
38
37
|
}
|
|
39
|
-
return `${
|
|
38
|
+
return `${REGISTRY_BASE_URL}/${encodeURIComponent(c)}`;
|
|
40
39
|
});
|
|
41
40
|
const args = [`shadcn@latest`, "add", ...componentsToAdd];
|
|
42
41
|
if (opts.yes) args.push("--yes");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/commands/shadcn/add.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport { spawn } from \"cross-spawn\";\n\nconst REGISTRY_BASE_URL = \"https://r.assistant-ui.com\";\
|
|
1
|
+
{"version":3,"sources":["../../../src/commands/shadcn/add.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport { spawn } from \"cross-spawn\";\n\nconst REGISTRY_BASE_URL = \"https://r.assistant-ui.com\";\n\nexport const shadcnAdd = new Command()\n .name(\"add\")\n .description(\"add a component to your project\")\n .argument(\"<components...>\", \"the components to add\")\n .option(\"-y, --yes\", \"skip confirmation prompt.\", true)\n .option(\"-o, --overwrite\", \"overwrite existing files.\", false)\n .option(\n \"-c, --cwd <cwd>\",\n \"the working directory. defaults to the current directory.\",\n process.cwd(),\n )\n .option(\"-p, --path <path>\", \"the path to add the component to.\")\n .action((components: string[], opts) => {\n const componentsToAdd = components.map((c) => {\n if (!/^[a-zA-Z0-9-\\/]+$/.test(c)) {\n throw new Error(`Invalid component name: ${c}`);\n }\n return `${REGISTRY_BASE_URL}/${encodeURIComponent(c)}`;\n });\n\n const args = [`shadcn@latest`, \"add\", ...componentsToAdd];\n\n if (opts.yes) args.push(\"--yes\");\n if (opts.overwrite) args.push(\"--overwrite\");\n if (opts.cwd) args.push(\"--cwd\", opts.cwd);\n if (opts.path) args.push(\"--path\", opts.path);\n\n const child = spawn(\"npx\", args, {\n stdio: \"inherit\",\n shell: true,\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;AAEtB,IAAM,oBAAoB;AAEnB,IAAM,YAAY,IAAI,yBAAQ,EAClC,KAAK,KAAK,EACV,YAAY,iCAAiC,EAC7C,SAAS,mBAAmB,uBAAuB,EACnD,OAAO,aAAa,6BAA6B,IAAI,EACrD,OAAO,mBAAmB,6BAA6B,KAAK,EAC5D;AAAA,EACC;AAAA,EACA;AAAA,EACA,QAAQ,IAAI;AACd,EACC,OAAO,qBAAqB,mCAAmC,EAC/D,OAAO,CAAC,YAAsB,SAAS;AACtC,QAAM,kBAAkB,WAAW,IAAI,CAAC,MAAM;AAC5C,QAAI,CAAC,oBAAoB,KAAK,CAAC,GAAG;AAChC,YAAM,IAAI,MAAM,2BAA2B,CAAC,EAAE;AAAA,IAChD;AACA,WAAO,GAAG,iBAAiB,IAAI,mBAAmB,CAAC,CAAC;AAAA,EACtD,CAAC;AAED,QAAM,OAAO,CAAC,iBAAiB,OAAO,GAAG,eAAe;AAExD,MAAI,KAAK,IAAK,MAAK,KAAK,OAAO;AAC/B,MAAI,KAAK,UAAW,MAAK,KAAK,aAAa;AAC3C,MAAI,KAAK,IAAK,MAAK,KAAK,SAAS,KAAK,GAAG;AACzC,MAAI,KAAK,KAAM,MAAK,KAAK,UAAU,KAAK,IAAI;AAE5C,QAAM,YAAQ,0BAAM,OAAO,MAAM;AAAA,IAC/B,OAAO;AAAA,IACP,OAAO;AAAA,EACT,CAAC;AAED,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":[]}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { Command } from "commander";
|
|
3
3
|
import { spawn } from "cross-spawn";
|
|
4
4
|
var REGISTRY_BASE_URL = "https://r.assistant-ui.com";
|
|
5
|
-
var SHADCN_COMPONENT_BASE_URL = `${REGISTRY_BASE_URL}/shadcn`;
|
|
6
5
|
var shadcnAdd = new Command().name("add").description("add a component to your project").argument("<components...>", "the components to add").option("-y, --yes", "skip confirmation prompt.", true).option("-o, --overwrite", "overwrite existing files.", false).option(
|
|
7
6
|
"-c, --cwd <cwd>",
|
|
8
7
|
"the working directory. defaults to the current directory.",
|
|
@@ -12,7 +11,7 @@ var shadcnAdd = new Command().name("add").description("add a component to your p
|
|
|
12
11
|
if (!/^[a-zA-Z0-9-\/]+$/.test(c)) {
|
|
13
12
|
throw new Error(`Invalid component name: ${c}`);
|
|
14
13
|
}
|
|
15
|
-
return `${
|
|
14
|
+
return `${REGISTRY_BASE_URL}/${encodeURIComponent(c)}`;
|
|
16
15
|
});
|
|
17
16
|
const args = [`shadcn@latest`, "add", ...componentsToAdd];
|
|
18
17
|
if (opts.yes) args.push("--yes");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/commands/shadcn/add.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport { spawn } from \"cross-spawn\";\n\nconst REGISTRY_BASE_URL = \"https://r.assistant-ui.com\";\
|
|
1
|
+
{"version":3,"sources":["../../../src/commands/shadcn/add.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport { spawn } from \"cross-spawn\";\n\nconst REGISTRY_BASE_URL = \"https://r.assistant-ui.com\";\n\nexport const shadcnAdd = new Command()\n .name(\"add\")\n .description(\"add a component to your project\")\n .argument(\"<components...>\", \"the components to add\")\n .option(\"-y, --yes\", \"skip confirmation prompt.\", true)\n .option(\"-o, --overwrite\", \"overwrite existing files.\", false)\n .option(\n \"-c, --cwd <cwd>\",\n \"the working directory. defaults to the current directory.\",\n process.cwd(),\n )\n .option(\"-p, --path <path>\", \"the path to add the component to.\")\n .action((components: string[], opts) => {\n const componentsToAdd = components.map((c) => {\n if (!/^[a-zA-Z0-9-\\/]+$/.test(c)) {\n throw new Error(`Invalid component name: ${c}`);\n }\n return `${REGISTRY_BASE_URL}/${encodeURIComponent(c)}`;\n });\n\n const args = [`shadcn@latest`, \"add\", ...componentsToAdd];\n\n if (opts.yes) args.push(\"--yes\");\n if (opts.overwrite) args.push(\"--overwrite\");\n if (opts.cwd) args.push(\"--cwd\", opts.cwd);\n if (opts.path) args.push(\"--path\", opts.path);\n\n const child = spawn(\"npx\", args, {\n stdio: \"inherit\",\n shell: true,\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;AAEtB,IAAM,oBAAoB;AAEnB,IAAM,YAAY,IAAI,QAAQ,EAClC,KAAK,KAAK,EACV,YAAY,iCAAiC,EAC7C,SAAS,mBAAmB,uBAAuB,EACnD,OAAO,aAAa,6BAA6B,IAAI,EACrD,OAAO,mBAAmB,6BAA6B,KAAK,EAC5D;AAAA,EACC;AAAA,EACA;AAAA,EACA,QAAQ,IAAI;AACd,EACC,OAAO,qBAAqB,mCAAmC,EAC/D,OAAO,CAAC,YAAsB,SAAS;AACtC,QAAM,kBAAkB,WAAW,IAAI,CAAC,MAAM;AAC5C,QAAI,CAAC,oBAAoB,KAAK,CAAC,GAAG;AAChC,YAAM,IAAI,MAAM,2BAA2B,CAAC,EAAE;AAAA,IAChD;AACA,WAAO,GAAG,iBAAiB,IAAI,mBAAmB,CAAC,CAAC;AAAA,EACtD,CAAC;AAED,QAAM,OAAO,CAAC,iBAAiB,OAAO,GAAG,eAAe;AAExD,MAAI,KAAK,IAAK,MAAK,KAAK,OAAO;AAC/B,MAAI,KAAK,UAAW,MAAK,KAAK,aAAa;AAC3C,MAAI,KAAK,IAAK,MAAK,KAAK,SAAS,KAAK,GAAG;AACzC,MAAI,KAAK,KAAM,MAAK,KAAK,UAAU,KAAK,IAAI;AAE5C,QAAM,QAAQ,MAAM,OAAO,MAAM;AAAA,IAC/B,OAAO;AAAA,IACP,OAAO;AAAA,EACT,CAAC;AAED,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;
|
|
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();
|
package/dist/index.mjs.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,SAAS,eAAe;AAExB,OAAO,iBAAiB,kBAAkB,KAAK,EAAE,MAAM,OAAO;AAC9D,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB,sBAAsB;
|
|
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":[]}
|