@spica/cli 0.18.18-pre → 0.18.18
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/index.js +13 -60
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2256,7 +2256,7 @@ Use --force to delete existing one.`
|
|
|
2256
2256
|
proxy_set_header Connection "Upgrade";
|
|
2257
2257
|
}
|
|
2258
2258
|
|
|
2259
|
-
location ~
|
|
2259
|
+
location ~ ^/spica/?(.*) {
|
|
2260
2260
|
proxy_pass http://${name}-spica/$1$is_args$args;
|
|
2261
2261
|
proxy_set_header Host $host;
|
|
2262
2262
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
@@ -2279,8 +2279,8 @@ Use --force to delete existing one.`
|
|
|
2279
2279
|
}
|
|
2280
2280
|
});
|
|
2281
2281
|
console.info(`
|
|
2282
|
-
Spica ${name} is serving on ${publicHost}.
|
|
2283
|
-
Open your browser on ${publicHost} to login.
|
|
2282
|
+
Spica ${name} is serving on ${publicHost}/spica.
|
|
2283
|
+
Open your browser on ${publicHost}/spica/dashboard to login.
|
|
2284
2284
|
|
|
2285
2285
|
Identitifer: ${identifier}
|
|
2286
2286
|
Password: ${password}
|
|
@@ -3435,68 +3435,21 @@ function upgrade_default(program2) {
|
|
|
3435
3435
|
}).action(upgrade);
|
|
3436
3436
|
}
|
|
3437
3437
|
|
|
3438
|
-
// apps/cli/
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
types: "./index.ts",
|
|
3446
|
-
default: "./dist/index.js"
|
|
3447
|
-
},
|
|
3448
|
-
"./src/commands/project/sync": {
|
|
3449
|
-
types: "./src/commands/project/sync.ts",
|
|
3450
|
-
default: "./dist/src/commands/project/sync.js"
|
|
3451
|
-
},
|
|
3452
|
-
"./src/compile": {
|
|
3453
|
-
types: "./src/compile.ts",
|
|
3454
|
-
default: "./dist/src/compile.js"
|
|
3455
|
-
},
|
|
3456
|
-
"./src/function/triggers/http/services": {
|
|
3457
|
-
types: "./src/function/triggers/http/services/index.ts",
|
|
3458
|
-
default: "./dist/src/function/triggers/http/services/index.js"
|
|
3459
|
-
},
|
|
3460
|
-
"./src/function/triggers": {
|
|
3461
|
-
types: "./src/function/triggers/index.ts",
|
|
3462
|
-
default: "./dist/src/function/triggers/index.js"
|
|
3463
|
-
}
|
|
3464
|
-
},
|
|
3465
|
-
publishConfig: {
|
|
3466
|
-
access: "public"
|
|
3467
|
-
},
|
|
3468
|
-
bin: {
|
|
3469
|
-
spica: "bin/spica"
|
|
3470
|
-
},
|
|
3471
|
-
dependencies: {
|
|
3472
|
-
"@caporal/core": "^2.0.7",
|
|
3473
|
-
axios: "^1.8.2",
|
|
3474
|
-
colorette: "^2.0.20",
|
|
3475
|
-
columnify: "^1.6.0",
|
|
3476
|
-
cosmiconfig: "^9.0.0",
|
|
3477
|
-
dockerode: "^4.0.4",
|
|
3478
|
-
dotenv: "^16.4.7",
|
|
3479
|
-
"get-port": "^7.1.0",
|
|
3480
|
-
jsonpath: "^1.1.1",
|
|
3481
|
-
open: "^10.1.0",
|
|
3482
|
-
ora: "^8.2.0",
|
|
3483
|
-
"pretty-ms": "^9.2.0",
|
|
3484
|
-
semver: "^7.7.1",
|
|
3485
|
-
typescript: "^5.7.3",
|
|
3486
|
-
yaml: "^2.7.1"
|
|
3487
|
-
},
|
|
3488
|
-
devDependencies: {
|
|
3489
|
-
"@types/dockerode": "^3.3.34",
|
|
3490
|
-
"@types/json-schema": "^7.0.15",
|
|
3491
|
-
"@types/node": "^22.10.7",
|
|
3492
|
-
"@types/semver": "^7.5.8"
|
|
3438
|
+
// apps/cli/src/version.ts
|
|
3439
|
+
import { readFileSync } from "node:fs";
|
|
3440
|
+
function readPackageVersion(baseUrl) {
|
|
3441
|
+
const packageJsonUrl = new URL("./package.json", baseUrl);
|
|
3442
|
+
const pkg = JSON.parse(readFileSync(packageJsonUrl, "utf8"));
|
|
3443
|
+
if (typeof pkg.version != "string" || !pkg.version) {
|
|
3444
|
+
throw new Error(`Missing version in '${packageJsonUrl.pathname}'`);
|
|
3493
3445
|
}
|
|
3494
|
-
|
|
3446
|
+
return pkg.version;
|
|
3447
|
+
}
|
|
3495
3448
|
|
|
3496
3449
|
// apps/cli/index.ts
|
|
3497
3450
|
var { program } = caporalCore4;
|
|
3498
3451
|
function run(argv) {
|
|
3499
|
-
program.version(
|
|
3452
|
+
program.version(readPackageVersion(import.meta.url)).name("spica").bin("spica").description("Command line interface for spica.");
|
|
3500
3453
|
apply_default(program);
|
|
3501
3454
|
delete_default(program);
|
|
3502
3455
|
orm_default(program);
|