@parlor/cli 0.3.0 → 0.3.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAUA,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAc9E;AAED,eAAO,MAAM,MAAM;;;;;EAuBjB,CAAC"}
|
package/dist/commands/deploy.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
2
|
import { loadParlorConfig } from "@parlor/config";
|
|
4
|
-
import { nitroPresetFor } from "@parlor/host";
|
|
3
|
+
import { nitroCli, nitroPresetFor } from "@parlor/host";
|
|
5
4
|
import { defineCommand } from "citty";
|
|
6
5
|
import { warnChatWithoutAuth } from "../chat-warning.js";
|
|
7
6
|
import { CliError } from "../errors.js";
|
|
8
7
|
import { buildWebAndServer } from "../web-target.js";
|
|
9
|
-
const require = createRequire(import.meta.url);
|
|
10
8
|
export function runNitroDeploy(hostRoot, preset) {
|
|
11
|
-
const bin =
|
|
9
|
+
const bin = nitroCli();
|
|
12
10
|
return new Promise((resolve, reject) => {
|
|
13
11
|
const child = spawn(process.execPath, [bin, "deploy", "--prebuilt", "--preset", preset, "--dir", hostRoot], { stdio: "inherit" });
|
|
14
12
|
child.once("error", reject);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{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KACjE;IACD,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gDAAgD;SAC9D;KACF;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE;QAChB,MAAM,MAAM,GAAG,MAAM,gBAAgB,EAAE,CAAC;QACxC,MAAM,mBAAmB,CAAC,MAAM,CAAC,CAAC;QAClC,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACxE,IAAI,MAAM,CAAC,MAAM,KAAK,aAAa,EAAE,CAAC;YACpC,OAAO,CAAC,GAAG,CACT,qDAAqD,MAAM,CAAC,SAAS,mBAAmB,CACzF,CAAC;YACF,OAAO;QACT,CAAC;QACD,MAAM,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACtE,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { spawn } from \"node:child_process\";\n\nimport { loadParlorConfig } from \"@parlor/config\";\nimport { nitroCli, nitroPresetFor } from \"@parlor/host\";\nimport { defineCommand } from \"citty\";\n\nimport { warnChatWithoutAuth } from \"../chat-warning.js\";\nimport { CliError } from \"../errors.js\";\nimport { buildWebAndServer } from \"../web-target.js\";\n\nexport function runNitroDeploy(hostRoot: string, preset: string): Promise<void> {\n const bin = nitroCli();\n return new Promise((resolve, reject) => {\n const child = spawn(\n process.execPath,\n [bin, \"deploy\", \"--prebuilt\", \"--preset\", preset, \"--dir\", hostRoot],\n { stdio: \"inherit\" },\n );\n child.once(\"error\", reject);\n child.once(\"exit\", (code) => {\n if (code === 0) resolve();\n else reject(new CliError(`nitro deploy exited with code ${code}`));\n });\n });\n}\n\nexport const deploy = defineCommand({\n meta: {\n name: \"deploy\",\n description: \"Build the app and deploy the server to its preset\",\n },\n args: {\n preset: {\n type: \"string\",\n description: \"Deploy preset: node-server, vercel, netlify, …\",\n },\n },\n async run({ args }) {\n const loaded = await loadParlorConfig();\n await warnChatWithoutAuth(loaded);\n const result = await buildWebAndServer(loaded, { preset: args.preset });\n if (result.preset === \"node-server\") {\n console.log(\n `node-server has no remote to deploy to. Run: node ${result.outputDir}/server/index.mjs`,\n );\n return;\n }\n await runNitroDeploy(result.rootDir, nitroPresetFor(result.preset));\n },\n});\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parlor/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"homepage": "https://cychien.github.io/parlor",
|
|
5
5
|
"bugs": "https://github.com/cychien/parlor/issues",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"drizzle-kit": "^0.31.11",
|
|
28
28
|
"srvx": "^1.0.5",
|
|
29
29
|
"tsx": "^4.23.15",
|
|
30
|
-
"@parlor/
|
|
31
|
-
"@parlor/
|
|
32
|
-
"@parlor/
|
|
33
|
-
"@parlor/data": "0.3.
|
|
34
|
-
"@parlor/
|
|
35
|
-
"@parlor/
|
|
36
|
-
"@parlor/
|
|
37
|
-
"@parlor/
|
|
38
|
-
"@parlor/shell-
|
|
30
|
+
"@parlor/agent-host": "0.3.2",
|
|
31
|
+
"@parlor/agent-ui": "0.3.2",
|
|
32
|
+
"@parlor/config": "0.3.2",
|
|
33
|
+
"@parlor/data": "0.3.2",
|
|
34
|
+
"@parlor/host": "0.3.2",
|
|
35
|
+
"@parlor/shell-desktop": "0.3.2",
|
|
36
|
+
"@parlor/scaffold": "0.3.2",
|
|
37
|
+
"@parlor/shell-mobile": "0.3.2",
|
|
38
|
+
"@parlor/shell-web": "0.3.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^24.14.0",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"vitest": "^5.0.3",
|
|
45
45
|
"wrangler": "^4.152.0",
|
|
46
46
|
"zod": "^4.6.5",
|
|
47
|
-
"@parlor/core": "0.3.
|
|
48
|
-
"@parlor/server": "0.3.
|
|
47
|
+
"@parlor/core": "0.3.2",
|
|
48
|
+
"@parlor/server": "0.3.2"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"wrangler": "^4.152.0"
|