@ogygie/cli 0.4.0 → 0.5.0
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/cli.js +33 -2
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -14962,6 +14962,29 @@ function initProject(deps, productName2) {
|
|
|
14962
14962
|
return { writtenFiles: writtenFiles.sort() };
|
|
14963
14963
|
}
|
|
14964
14964
|
|
|
14965
|
+
// src/commands/studio.ts
|
|
14966
|
+
async function runStudio(deps) {
|
|
14967
|
+
const importStudio = deps.importStudio ?? // Kept as a bare specifier so the bundler leaves it alone: it is resolved
|
|
14968
|
+
// in the CONSUMER's node_modules, at run time.
|
|
14969
|
+
(async () => await import("@ogygie/studio/server"));
|
|
14970
|
+
let studioServer;
|
|
14971
|
+
try {
|
|
14972
|
+
studioServer = await importStudio();
|
|
14973
|
+
} catch (thrown) {
|
|
14974
|
+
throwOgygieError({
|
|
14975
|
+
code: "OGYGIE_STUDIO_NOT_INSTALLED",
|
|
14976
|
+
message: "The studio is not installed in this project.",
|
|
14977
|
+
file: "package.json",
|
|
14978
|
+
cause: thrown instanceof Error ? `import of @ogygie/studio/server failed: ${thrown.message}` : "import of @ogygie/studio/server failed",
|
|
14979
|
+
suggestedFix: `Install it as a dev dependency, at the framework's own version (lockstep D2): pnpm add -D @ogygie/studio@${deps.cliVersion}`
|
|
14980
|
+
});
|
|
14981
|
+
}
|
|
14982
|
+
await studioServer.startStudio({
|
|
14983
|
+
repoRoot: deps.projectRoot,
|
|
14984
|
+
openBrowser: deps.openBrowser
|
|
14985
|
+
});
|
|
14986
|
+
}
|
|
14987
|
+
|
|
14965
14988
|
// src/commands/upgrade.ts
|
|
14966
14989
|
import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync4, writeFileSync as writeFileSync3 } from "node:fs";
|
|
14967
14990
|
import { dirname as dirname2, join as join4 } from "node:path";
|
|
@@ -15361,6 +15384,12 @@ var governedChecksumsByVersion = {
|
|
|
15361
15384
|
"AGENTS.md": "c7d51a0cd97b67343b486bdb7c54914da68d96409eaa985959d2a525c65549fd",
|
|
15362
15385
|
"CLAUDE.md": "785ee8d90e368806d8cf0b4d84a15f29d1dc961168bda86cf1a6c60a923c8c9b",
|
|
15363
15386
|
"tsconfig.base.json": "0f8919e9ed8bbc88e0308fa2fa91471dabb18d1df721bd78c04076597eba89a2"
|
|
15387
|
+
},
|
|
15388
|
+
"0.5.0": {
|
|
15389
|
+
".github/workflows/ogygie-gates.yml": "48c40efe9fe66dd0f9c3b94287026d80eae9afd6782b5833fdf8846d8662babf",
|
|
15390
|
+
"AGENTS.md": "c7d51a0cd97b67343b486bdb7c54914da68d96409eaa985959d2a525c65549fd",
|
|
15391
|
+
"CLAUDE.md": "785ee8d90e368806d8cf0b4d84a15f29d1dc961168bda86cf1a6c60a923c8c9b",
|
|
15392
|
+
"tsconfig.base.json": "0f8919e9ed8bbc88e0308fa2fa91471dabb18d1df721bd78c04076597eba89a2"
|
|
15364
15393
|
}
|
|
15365
15394
|
};
|
|
15366
15395
|
|
|
@@ -15458,14 +15487,16 @@ ogygie verify-vocabulary \u2014 ${problems.length} probl\xE8me(s).`);
|
|
|
15458
15487
|
process.exit(1);
|
|
15459
15488
|
}
|
|
15460
15489
|
console.log("ogygie verify-vocabulary \u2014 OK, le vocabulaire d\xE9clar\xE9 est respect\xE9.");
|
|
15490
|
+
} else if (command === "studio") {
|
|
15491
|
+
await runStudio({ projectRoot: process.cwd(), cliVersion: cliVersion() });
|
|
15461
15492
|
} else {
|
|
15462
15493
|
printError(
|
|
15463
15494
|
ogygieError({
|
|
15464
15495
|
code: "OGYGIE_CLI_USAGE",
|
|
15465
15496
|
message: `Unknown command ${JSON.stringify(command ?? "")}.`,
|
|
15466
15497
|
file: null,
|
|
15467
|
-
cause: `expected one of: init <product-name>, upgrade, check, verify-vocabulary (flags: --json, --yes)`,
|
|
15468
|
-
suggestedFix: "Run `ogygie init <product-name>`, `ogygie upgrade`, `ogygie check` or `ogygie
|
|
15498
|
+
cause: `expected one of: init <product-name>, upgrade, check, verify-vocabulary, studio (flags: --json, --yes)`,
|
|
15499
|
+
suggestedFix: "Run `ogygie init <product-name>`, `ogygie upgrade`, `ogygie check`, `ogygie verify-vocabulary` or `ogygie studio`."
|
|
15469
15500
|
})
|
|
15470
15501
|
);
|
|
15471
15502
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ogygie/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Ogygie framework CLI: deterministic scaffolding (init), governed-file upgrades (upgrade) and lockstep verification (check) for Ogygie products.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"tsx": "^4.20.0",
|
|
23
23
|
"typescript": "^5.8.0",
|
|
24
24
|
"zod": "^4.0.0",
|
|
25
|
-
"@ogygie/core": "0.
|
|
25
|
+
"@ogygie/core": "0.5.0"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"typecheck": "tsc -p tsconfig.json",
|