@spica/cli 0.18.32 → 0.18.34
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 +15 -13
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4434,19 +4434,21 @@ function resolveModules(names) {
|
|
|
4434
4434
|
|
|
4435
4435
|
// apps/cli/src/commands/sync/plan.ts
|
|
4436
4436
|
async function plan({ args, options }) {
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4437
|
+
try {
|
|
4438
|
+
const rootDir = path15.resolve(args.dir ?? process.cwd());
|
|
4439
|
+
const detailed = !!options.detailed;
|
|
4440
|
+
const json = !!options.json;
|
|
4441
|
+
const moduleFilter = options.module ? (Array.isArray(options.module) ? options.module : [options.module]).map(String) : void 0;
|
|
4442
|
+
const modules = resolveModules(moduleFilter);
|
|
4443
|
+
const http2 = await httpService.createFromCurrentCtx();
|
|
4444
|
+
const p = await buildPlan(modules, http2, rootDir, detailed);
|
|
4445
|
+
renderPlan(p, { detailed, json });
|
|
4446
|
+
process.exitCode = 0;
|
|
4447
|
+
} catch (err) {
|
|
4448
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
4449
|
+
console.error(msg);
|
|
4450
|
+
process.exitCode = 1;
|
|
4451
|
+
}
|
|
4450
4452
|
}
|
|
4451
4453
|
function plan_default(program2) {
|
|
4452
4454
|
return program2.command(
|