assistant-ui 0.0.26 → 0.0.28
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/LICENSE +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/LICENSE
CHANGED
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command as Command3 } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "assistant-ui",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.28",
|
|
10
10
|
license: "MIT",
|
|
11
11
|
type: "module",
|
|
12
12
|
dependencies: {
|
|
@@ -18,7 +18,7 @@ var package_default = {
|
|
|
18
18
|
"@assistant-ui/tsconfig": "workspace:*",
|
|
19
19
|
"@types/cross-spawn": "^6.0.6",
|
|
20
20
|
"@types/node": "^22.10.5",
|
|
21
|
-
"eslint-config-next": "15.1.
|
|
21
|
+
"eslint-config-next": "15.1.4",
|
|
22
22
|
tsup: "8.3.5"
|
|
23
23
|
},
|
|
24
24
|
files: [
|
|
@@ -36,10 +36,10 @@ var package_default = {
|
|
|
36
36
|
homepage: "https://www.assistant-ui.com/",
|
|
37
37
|
repository: {
|
|
38
38
|
type: "git",
|
|
39
|
-
url: "git+https://github.com/
|
|
39
|
+
url: "git+https://github.com/assistant-ui/assistant-ui.git"
|
|
40
40
|
},
|
|
41
41
|
bugs: {
|
|
42
|
-
url: "https://github.com/
|
|
42
|
+
url: "https://github.com/assistant-ui/assistant-ui/issues"
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
|
|
@@ -85,8 +85,8 @@ var create = new Command().name("create").description("create a new project").ar
|
|
|
85
85
|
`
|
|
86
86
|
).action((_, opts) => {
|
|
87
87
|
const templates = {
|
|
88
|
-
default: "https://github.com/
|
|
89
|
-
langgraph: "https://github.com/
|
|
88
|
+
default: "https://github.com/assistant-ui/assistant-ui-starter",
|
|
89
|
+
langgraph: "https://github.com/assistant-ui/assistant-ui-starter-langgraph"
|
|
90
90
|
};
|
|
91
91
|
const templateUrl = templates[opts.template ?? "default"];
|
|
92
92
|
if (!templateUrl) {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../package.json","../src/commands/create.ts","../src/commands/shadcn/add.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from \"commander\";\n\nimport packageJson from \"../package.json\";\nimport { create } from \"./commands/create\";\nimport { shadcnAdd } from \"./commands/shadcn/add\";\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\n program.parse();\n}\n\nmain();\n","{\n \"name\": \"assistant-ui\",\n \"version\": \"0.0.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../package.json","../src/commands/create.ts","../src/commands/shadcn/add.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from \"commander\";\n\nimport packageJson from \"../package.json\";\nimport { create } from \"./commands/create\";\nimport { shadcnAdd } from \"./commands/shadcn/add\";\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\n program.parse();\n}\n\nmain();\n","{\n \"name\": \"assistant-ui\",\n \"version\": \"0.0.28\",\n \"license\": \"MIT\",\n \"type\": \"module\",\n \"dependencies\": {\n \"chalk\": \"^5.4.1\",\n \"commander\": \"^13.0.0\",\n \"cross-spawn\": \"^7.0.6\"\n },\n \"devDependencies\": {\n \"@assistant-ui/tsconfig\": \"workspace:*\",\n \"@types/cross-spawn\": \"^6.0.6\",\n \"@types/node\": \"^22.10.5\",\n \"eslint-config-next\": \"15.1.4\",\n \"tsup\": \"8.3.5\"\n },\n \"files\": [\n \"dist\",\n \"README.md\"\n ],\n \"bin\": \"./dist/index.js\",\n \"scripts\": {\n \"build\": \"tsup src/index.ts --format esm --sourcemap --clean\"\n },\n \"publishConfig\": {\n \"access\": \"public\",\n \"provenance\": true\n },\n \"homepage\": \"https://www.assistant-ui.com/\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/assistant-ui/assistant-ui.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/assistant-ui/assistant-ui/issues\"\n }\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { spawn } from \"cross-spawn\";\n\nexport const create = new Command()\n .name(\"create\")\n .description(\"create a new 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(`Unknown template: ${opts.template}`);\n process.exit(1);\n }\n\n const filteredArgs = process.argv.slice(3).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(`other-package-script process exited with code ${code}`);\n }\n });\n });\n","import { Command } from \"commander\";\nimport { spawn } from \"cross-spawn\";\n\nconst REGISTRY_BASE_URL = \"https://r.assistant-ui.com\";\nconst SHADCN_COMPONENT_BASE_URL = `${REGISTRY_BASE_URL}/shadcn`;\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 `${SHADCN_COMPONENT_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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|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@types/cross-spawn": "^6.0.6",
|
|
13
13
|
"@types/node": "^22.10.5",
|
|
14
|
-
"eslint-config-next": "15.1.
|
|
14
|
+
"eslint-config-next": "15.1.4",
|
|
15
15
|
"tsup": "8.3.5",
|
|
16
16
|
"@assistant-ui/tsconfig": "0.0.0"
|
|
17
17
|
},
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"homepage": "https://www.assistant-ui.com/",
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/
|
|
30
|
+
"url": "git+https://github.com/assistant-ui/assistant-ui.git"
|
|
31
31
|
},
|
|
32
32
|
"bugs": {
|
|
33
|
-
"url": "https://github.com/
|
|
33
|
+
"url": "https://github.com/assistant-ui/assistant-ui/issues"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsup src/index.ts --format esm --sourcemap --clean"
|