assistant-ui 0.0.57 → 0.0.59
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/create.d.ts.map +1 -1
- package/dist/commands/create.js +1 -0
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +2 -2
- package/dist/commands/update.js.map +1 -1
- package/package.json +5 -5
- package/src/commands/create.ts +1 -0
- package/src/commands/update.ts +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,MAAM,SAyFf,CAAC"}
|
package/dist/commands/create.js
CHANGED
|
@@ -41,6 +41,7 @@ var create = new Command().name("create").description("create a new project").ar
|
|
|
41
41
|
).action((_, opts) => {
|
|
42
42
|
const templates = {
|
|
43
43
|
default: "https://github.com/assistant-ui/assistant-ui-starter",
|
|
44
|
+
cloud: "https://github.com/assistant-ui/assistant-ui-starter-cloud",
|
|
44
45
|
langgraph: "https://github.com/assistant-ui/assistant-ui-starter-langgraph",
|
|
45
46
|
mcp: "https://github.com/assistant-ui/assistant-ui-starter-mcp"
|
|
46
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/create.ts"],"sourcesContent":["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 mcp: \"https://github.com/assistant-ui/assistant-ui-starter-mcp\",\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"],"mappings":";AAAA,SAAS,eAAe;AACxB,OAAO,WAAW;AAClB,SAAS,aAAa;AAEf,IAAM,SAAS,IAAI,QAAQ,EAC/B,KAAK,QAAQ,EACb,YAAY,sBAAsB,EAClC,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,IACF,KAAK;AAAA,EACP;AAEA,QAAM,cACJ,UAAW,KAAK,YAAuC,SAAS;AAClE,MAAI,CAAC,aAAa;AAChB,YAAQ,MAAM,qBAAqB,KAAK,QAAQ,EAAE;AAClD,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,iDAAiD,IAAI,EAAE;AAAA,IACrE;AAAA,EACF,CAAC;AACH,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/commands/create.ts"],"sourcesContent":["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 cloud: \"https://github.com/assistant-ui/assistant-ui-starter-cloud\",\n langgraph:\n \"https://github.com/assistant-ui/assistant-ui-starter-langgraph\",\n mcp: \"https://github.com/assistant-ui/assistant-ui-starter-mcp\",\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"],"mappings":";AAAA,SAAS,eAAe;AACxB,OAAO,WAAW;AAClB,SAAS,aAAa;AAEf,IAAM,SAAS,IAAI,QAAQ,EAC/B,KAAK,QAAQ,EACb,YAAY,sBAAsB,EAClC,SAAS,qBAAqB,EA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1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,eAAO,MAAM,MAAM,SAwDf,CAAC"}
|
package/dist/commands/update.js
CHANGED
|
@@ -6,7 +6,7 @@ import chalk from "chalk";
|
|
|
6
6
|
import { detect } from "detect-package-manager";
|
|
7
7
|
import { sync as spawnSync } from "cross-spawn";
|
|
8
8
|
var update = new Command().name("update").description(
|
|
9
|
-
"Update all '@assistant-ui/*' and 'assistant
|
|
9
|
+
"Update all '@assistant-ui/*' and 'assistant-*' packages in package.json to latest versions using your package manager."
|
|
10
10
|
).option("--dry", "Print the package manager command instead of running it.").action(async (opts) => {
|
|
11
11
|
const packageJsonPath = path.join(process.cwd(), "package.json");
|
|
12
12
|
if (!fs.existsSync(packageJsonPath)) {
|
|
@@ -21,7 +21,7 @@ var update = new Command().name("update").description(
|
|
|
21
21
|
for (const section of sections) {
|
|
22
22
|
if (!pkg[section]) continue;
|
|
23
23
|
for (const dep in pkg[section]) {
|
|
24
|
-
if (dep.startsWith("@assistant-ui/") || dep === "assistant-stream") {
|
|
24
|
+
if (dep.startsWith("@assistant-ui/") || dep === "assistant-stream" || dep === "assistant-cloud") {
|
|
25
25
|
targets.push(dep);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/update.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport fs from \"fs\";\nimport path from \"path\";\nimport chalk from \"chalk\";\nimport { detect } from \"detect-package-manager\";\nimport { sync as spawnSync } from \"cross-spawn\";\n\nexport const update = new Command()\n .name(\"update\")\n .description(\n \"Update all '@assistant-ui/*' and 'assistant
|
|
1
|
+
{"version":3,"sources":["../../src/commands/update.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport fs from \"fs\";\nimport path from \"path\";\nimport chalk from \"chalk\";\nimport { detect } from \"detect-package-manager\";\nimport { sync as spawnSync } from \"cross-spawn\";\n\nexport const update = new Command()\n .name(\"update\")\n .description(\n \"Update all '@assistant-ui/*' and 'assistant-*' packages in package.json to latest versions using your package manager.\",\n )\n .option(\"--dry\", \"Print the package manager command instead of running it.\")\n .action(async (opts) => {\n const packageJsonPath = path.join(process.cwd(), \"package.json\");\n if (!fs.existsSync(packageJsonPath)) {\n console.error(\n chalk.red(\"No package.json found in the current directory.\"),\n );\n process.exit(1);\n }\n const pkg = JSON.parse(fs.readFileSync(packageJsonPath, \"utf-8\"));\n const sections = [\"dependencies\", \"devDependencies\"];\n const targets: string[] = [];\n for (const section of sections) {\n if (!pkg[section]) continue;\n for (const dep in pkg[section]) {\n if (\n dep.startsWith(\"@assistant-ui/\") ||\n dep === \"assistant-stream\" ||\n dep === \"assistant-cloud\"\n ) {\n targets.push(dep);\n }\n }\n }\n if (!targets.length) {\n console.log(chalk.yellow(\"No matching packages found to update.\"));\n return;\n }\n const pm = await detect({ cwd: process.cwd() });\n let cmd: string;\n if (pm === \"yarn\") {\n cmd = `yarn add ${targets.map((d) => `${d}@latest`).join(\" \")}`;\n } else if (pm === \"pnpm\") {\n cmd = `pnpm add ${targets.map((d) => `${d}@latest`).join(\" \")}`;\n } else if (pm === \"bun\") {\n cmd = `bun add ${targets.map((d) => `${d}@latest`).join(\" \")}`;\n } else {\n cmd = `npm install ${targets.map((d) => `${d}@latest`).join(\" \")}`;\n }\n if (opts.dry) {\n console.log(chalk.blue(\"\\nDry run: would run the following command:\"));\n console.log(cmd);\n return;\n }\n console.log(chalk.blue(`\\nRunning: ${cmd}`));\n const result = spawnSync(cmd, { shell: true, stdio: \"inherit\" });\n if (result.status !== 0) {\n console.error(chalk.red(\"Package manager update failed.\"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C,SAAS,EAAE,KAAK,GAAG,CAAC;AAAA,EAC/D,WAAW,OAAO,OAAO;AACvB,UAAM,WAAW,QAAQ,IAAI,CAAC,MAAM,GAAG,CAAC,SAAS,EAAE,KAAK,GAAG,CAAC;AAAA,EAC9D,OAAO;AACL,UAAM,eAAe,QAAQ,IAAI,CAAC,MAAM,GAAG,CAAC,SAAS,EAAE,KAAK,GAAG,CAAC;AAAA,EAClE;AACA,MAAI,KAAK,KAAK;AACZ,YAAQ,IAAI,MAAM,KAAK,6CAA6C,CAAC;AACrE,YAAQ,IAAI,GAAG;AACf;AAAA,EACF;AACA,UAAQ,IAAI,MAAM,KAAK;AAAA,WAAc,GAAG,EAAE,CAAC;AAC3C,QAAM,SAAS,UAAU,KAAK,EAAE,OAAO,MAAM,OAAO,UAAU,CAAC;AAC/D,MAAI,OAAO,WAAW,GAAG;AACvB,YAAQ,MAAM,MAAM,IAAI,gCAAgC,CAAC;AACzD,YAAQ,KAAK,OAAO,UAAU,CAAC;AAAA,EACjC;AACA,UAAQ,IAAI,MAAM,MAAM,2CAA2C,CAAC;AACtE,CAAC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assistant-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.59",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"chalk": "^5.
|
|
7
|
+
"chalk": "^5.5.0",
|
|
8
8
|
"cli-progress": "^3.12.0",
|
|
9
9
|
"commander": "^14.0.0",
|
|
10
10
|
"cross-spawn": "^7.0.6",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"@types/cross-spawn": "^6.0.6",
|
|
21
21
|
"@types/debug": "^4.1.12",
|
|
22
22
|
"@types/jscodeshift": "^17.3.0",
|
|
23
|
-
"@types/node": "^24.
|
|
23
|
+
"@types/node": "^24.3.0",
|
|
24
24
|
"@types/semver": "^7.7.0",
|
|
25
25
|
"eslint": "^9",
|
|
26
|
-
"eslint-config-next": "15.4.
|
|
27
|
-
"tsx": "^4.20.
|
|
26
|
+
"eslint-config-next": "15.4.6",
|
|
27
|
+
"tsx": "^4.20.4",
|
|
28
28
|
"@assistant-ui/x-buildutils": "0.0.1"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
package/src/commands/create.ts
CHANGED
|
@@ -52,6 +52,7 @@ export const create = new Command()
|
|
|
52
52
|
.action((_, opts) => {
|
|
53
53
|
const templates = {
|
|
54
54
|
default: "https://github.com/assistant-ui/assistant-ui-starter",
|
|
55
|
+
cloud: "https://github.com/assistant-ui/assistant-ui-starter-cloud",
|
|
55
56
|
langgraph:
|
|
56
57
|
"https://github.com/assistant-ui/assistant-ui-starter-langgraph",
|
|
57
58
|
mcp: "https://github.com/assistant-ui/assistant-ui-starter-mcp",
|
package/src/commands/update.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { sync as spawnSync } from "cross-spawn";
|
|
|
8
8
|
export const update = new Command()
|
|
9
9
|
.name("update")
|
|
10
10
|
.description(
|
|
11
|
-
"Update all '@assistant-ui/*' and 'assistant
|
|
11
|
+
"Update all '@assistant-ui/*' and 'assistant-*' packages in package.json to latest versions using your package manager.",
|
|
12
12
|
)
|
|
13
13
|
.option("--dry", "Print the package manager command instead of running it.")
|
|
14
14
|
.action(async (opts) => {
|
|
@@ -25,7 +25,11 @@ export const update = new Command()
|
|
|
25
25
|
for (const section of sections) {
|
|
26
26
|
if (!pkg[section]) continue;
|
|
27
27
|
for (const dep in pkg[section]) {
|
|
28
|
-
if (
|
|
28
|
+
if (
|
|
29
|
+
dep.startsWith("@assistant-ui/") ||
|
|
30
|
+
dep === "assistant-stream" ||
|
|
31
|
+
dep === "assistant-cloud"
|
|
32
|
+
) {
|
|
29
33
|
targets.push(dep);
|
|
30
34
|
}
|
|
31
35
|
}
|