@powerhousedao/ph-cli 6.2.3-dev.101 → 6.2.3-dev.102
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/{build-CojYJHNn.mjs → build-D9Zjxsfj.mjs} +63 -11
- package/dist/build-D9Zjxsfj.mjs.map +1 -0
- package/dist/build-DkPj-Gz1.mjs +4 -0
- package/dist/{check-BBd5xzUi.mjs → check-NJ07yjW8.mjs} +3 -3
- package/dist/{check-DWvobZrP.mjs → check-S29MtxQp.mjs} +32 -11
- package/dist/check-S29MtxQp.mjs.map +1 -0
- package/dist/cli.mjs +3 -3
- package/dist/{connect-build-B9Btboix.mjs → connect-build-DvFdfDP-.mjs} +4 -4
- package/dist/{connect-build-B9Btboix.mjs.map → connect-build-DvFdfDP-.mjs.map} +1 -1
- package/dist/definitions-worker.d.mts.map +1 -1
- package/dist/definitions-worker.mjs +5 -5
- package/dist/definitions-worker.mjs.map +1 -1
- package/dist/{evidence-Dchpoogs.mjs → evidence-CavwC5YV.mjs} +23 -9
- package/dist/evidence-CavwC5YV.mjs.map +1 -0
- package/dist/{generate-all-_7S0Iii2.mjs → generate-all-cgygbYEX.mjs} +5 -5
- package/dist/generate-all-cgygbYEX.mjs.map +1 -0
- package/dist/{generate-document-model-DCjzz3Sa.mjs → generate-document-model-OQPfeHs-.mjs} +25 -21
- package/dist/generate-document-model-OQPfeHs-.mjs.map +1 -0
- package/dist/{generate-editor-DdoapkEK.mjs → generate-editor-DBj_Pxwa.mjs} +7 -7
- package/dist/generate-editor-DBj_Pxwa.mjs.map +1 -0
- package/dist/{generate-subgraph-CrHbYK91.mjs → generate-subgraph-DJZCr0Tk.mjs} +34 -12
- package/dist/generate-subgraph-DJZCr0Tk.mjs.map +1 -0
- package/dist/{get-version-DUG29IeG.mjs → get-version-CeMBGufv.mjs} +4 -4
- package/dist/{get-version-DUG29IeG.mjs.map → get-version-CeMBGufv.mjs.map} +1 -1
- package/dist/{inspect-BpVHe9vz.mjs → inspect-CulIpVsF.mjs} +13 -7
- package/dist/inspect-CulIpVsF.mjs.map +1 -0
- package/dist/{mcp-DEBeM-ZV.mjs → mcp-HSikd5iv.mjs} +4 -4
- package/dist/{mcp-DEBeM-ZV.mjs.map → mcp-HSikd5iv.mjs.map} +1 -1
- package/dist/migrate-subgraphs-Cm7DDcDd.mjs +214 -0
- package/dist/migrate-subgraphs-Cm7DDcDd.mjs.map +1 -0
- package/dist/module-dir-1avCXsBi.mjs +2 -2
- package/dist/module-dir-1avCXsBi.mjs.map +1 -1
- package/dist/{ph-cli-commands-BG9deyv9.mjs → ph-cli-commands-CX927REY.mjs} +43 -22
- package/dist/ph-cli-commands-CX927REY.mjs.map +1 -0
- package/dist/ph-cli-commands-SrvFNgNF.mjs +4 -0
- package/dist/render-3M3DwFzO.mjs +4 -0
- package/dist/{render-BO-Nwn2H.mjs → render-SVfj3m8A.mjs} +19 -13
- package/dist/render-SVfj3m8A.mjs.map +1 -0
- package/dist/{run-DEKE4MJY.mjs → run--de_-WAz.mjs} +5 -4
- package/dist/run--de_-WAz.mjs.map +1 -0
- package/dist/{run-DP3fNgPv.mjs → run-LRGy7zGo.mjs} +3 -3
- package/dist/runners/connect.mjs +1 -1
- package/dist/runners/switchboard.mjs +1 -1
- package/dist/subgraph-gate-BJ2PWXVY.mjs +26 -0
- package/dist/subgraph-gate-BJ2PWXVY.mjs.map +1 -0
- package/dist/subgraph-gate-j9ywj6KA.mjs +4 -0
- package/dist/subgraphs-7OYWwP-C.mjs +134 -0
- package/dist/subgraphs-7OYWwP-C.mjs.map +1 -0
- package/dist/{switchboard-migrate-Docb8Cjv.mjs → switchboard-migrate-BqSdKJ7u.mjs} +3 -4
- package/dist/switchboard-migrate-BqSdKJ7u.mjs.map +1 -0
- package/dist/{verify-CT24vch8.mjs → verify-BrMeKdLA.mjs} +4 -4
- package/dist/{verify-CT24vch8.mjs.map → verify-BrMeKdLA.mjs.map} +1 -1
- package/dist/{vetra-DSFzAl_1.mjs → vetra-DjNt0-L6.mjs} +4 -4
- package/dist/{vetra-DSFzAl_1.mjs.map → vetra-DjNt0-L6.mjs.map} +1 -1
- package/package.json +16 -16
- package/dist/authoring-mode-DWbbsuWh.mjs +0 -23
- package/dist/authoring-mode-DWbbsuWh.mjs.map +0 -1
- package/dist/build-CojYJHNn.mjs.map +0 -1
- package/dist/build-CsUTeki9.mjs +0 -4
- package/dist/check-DWvobZrP.mjs.map +0 -1
- package/dist/evidence-Dchpoogs.mjs.map +0 -1
- package/dist/generate-all-_7S0Iii2.mjs.map +0 -1
- package/dist/generate-document-model-DCjzz3Sa.mjs.map +0 -1
- package/dist/generate-editor-DdoapkEK.mjs.map +0 -1
- package/dist/generate-subgraph-CrHbYK91.mjs.map +0 -1
- package/dist/inspect-BpVHe9vz.mjs.map +0 -1
- package/dist/ph-cli-commands-BG9deyv9.mjs.map +0 -1
- package/dist/ph-cli-commands-Dn56Erg5.mjs +0 -4
- package/dist/render-BO-Nwn2H.mjs.map +0 -1
- package/dist/render-DdieUjtg.mjs +0 -4
- package/dist/run-DEKE4MJY.mjs.map +0 -1
- package/dist/switchboard-migrate-Docb8Cjv.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { t as getVersion } from "./get-version-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c6e8cc4c-3158-53da-aa8f-7ef5d895d16c")}catch(e){}}();
|
|
3
|
+
import { t as getVersion } from "./get-version-CeMBGufv.mjs";
|
|
4
4
|
import { _ as pendingPrefix, a as writeReleaseApproval, c as PH_CLI_BINDING, d as listed, g as LOCK_FILE, h as BUILD_DIRECTORY, i as revisionFiles, l as RELEASE_APPROVAL_PATH, m as packageRevision, o as packRelease, p as changedPaths, s as packedDigests, t as packagePath, v as takeoverPrefix } from "./files-D6_euBBn.mjs";
|
|
5
5
|
import { d as object, f as record, g as union, i as boolean, l as looseObject, m as string, r as array, s as json } from "./schemas-DzgKfQIx.mjs";
|
|
6
6
|
import { n as OFFERED_ROUTES_MODULE, r as syncProjectConnectRoutes, t as HOST_ROUTES_DIR } from "./sync-connect-routes-t0Slg-P6.mjs";
|
|
@@ -2265,8 +2265,9 @@ function checkInChild(projectRoot, profile, session, timeoutMs) {
|
|
|
2265
2265
|
/**
|
|
2266
2266
|
* Checks the package's definitions after tsc and before any bundle, when
|
|
2267
2267
|
* `ph build` asks or with `--release`. Without `--release` it checks the
|
|
2268
|
-
*
|
|
2269
|
-
*
|
|
2268
|
+
* package when discovery finds a code-first model directory or cannot read
|
|
2269
|
+
* the models directory, never stops the build, and skips without a word a
|
|
2270
|
+
* package with no code-first model. With `--release`
|
|
2270
2271
|
* (experimental) it runs the release profile over every model, stored ones
|
|
2271
2272
|
* included, and stops the build when the check is invalid or cannot run, a
|
|
2272
2273
|
* configuration error included. The package's modules load only in the
|
|
@@ -2280,13 +2281,12 @@ function definitionsStepWithin(timeoutMs) {
|
|
|
2280
2281
|
if (!args.release && !checkDefinitions) return;
|
|
2281
2282
|
if (!args.release) {
|
|
2282
2283
|
const { resolveDefinitionSelection } = await import("document-model/tooling");
|
|
2283
|
-
|
|
2284
|
+
if (resolveDefinitionSelection({
|
|
2284
2285
|
configFile: join(projectRoot, "powerhouse.config.json"),
|
|
2285
2286
|
allowMissingConfig: true
|
|
2286
|
-
});
|
|
2287
|
-
if (selection.status !== "ready" || selection.sourceSet.sources.length === 0) return;
|
|
2287
|
+
}).status === "skipped") return;
|
|
2288
2288
|
}
|
|
2289
|
-
const { renderCheckReport } = await import("./render-
|
|
2289
|
+
const { renderCheckReport } = await import("./render-3M3DwFzO.mjs");
|
|
2290
2290
|
const printReport = (report) => {
|
|
2291
2291
|
const text = renderCheckReport(report);
|
|
2292
2292
|
if (report.diagnostics.length > 0) console.warn(`⚠ The definition check reported problems; the build goes on:\n${text}`);
|
|
@@ -2985,8 +2985,60 @@ async function buildPackage(args, options = {}) {
|
|
|
2985
2985
|
}
|
|
2986
2986
|
}
|
|
2987
2987
|
//#endregion
|
|
2988
|
+
//#region src/services/subgraph-build-step.ts
|
|
2989
|
+
/** The definitions step checks the package, subgraphs included, unless
|
|
2990
|
+
* discovery skips it, as it does for a package with no document model. */
|
|
2991
|
+
async function definitionsStepCoversSubgraphs(projectRoot) {
|
|
2992
|
+
const { resolveDefinitionSelection } = await import("document-model/tooling");
|
|
2993
|
+
return resolveDefinitionSelection({
|
|
2994
|
+
configFile: join(projectRoot, "powerhouse.config.json"),
|
|
2995
|
+
allowMissingConfig: true
|
|
2996
|
+
}).status !== "skipped";
|
|
2997
|
+
}
|
|
2998
|
+
/**
|
|
2999
|
+
* Checks a package's code-first subgraphs in `ph build`'s edit profile when
|
|
3000
|
+
* the definitions step does not: a package where discovery skips it. Under `--release` the definitions
|
|
3001
|
+
* step runs the release profile, which carries the subgraph checks and
|
|
3002
|
+
* refuses on their errors.
|
|
3003
|
+
*/
|
|
3004
|
+
function subgraphStepWithin(timeoutMs) {
|
|
3005
|
+
return {
|
|
3006
|
+
id: "subgraphs",
|
|
3007
|
+
after: ["definitions"],
|
|
3008
|
+
run: async ({ args, checkDefinitions, projectRoot, session }) => {
|
|
3009
|
+
if (args.release || !checkDefinitions) return;
|
|
3010
|
+
if (await definitionsStepCoversSubgraphs(projectRoot)) return;
|
|
3011
|
+
const { renderCheckReport } = await import("./render-3M3DwFzO.mjs");
|
|
3012
|
+
console.log("\n▶ Checking subgraph definitions...");
|
|
3013
|
+
const edit = await checkInChild(projectRoot, "edit", session, timeoutMs);
|
|
3014
|
+
if (!edit.ok) {
|
|
3015
|
+
console.warn(`⚠ The subgraph check could not run: ${edit.message}`);
|
|
3016
|
+
return;
|
|
3017
|
+
}
|
|
3018
|
+
const text = renderCheckReport(edit.result);
|
|
3019
|
+
if (edit.result.diagnostics.length > 0) console.warn(`⚠ The subgraph check reported problems; the build goes on:\n${text}`);
|
|
3020
|
+
else console.log(`✔ ${text}`);
|
|
3021
|
+
}
|
|
3022
|
+
};
|
|
3023
|
+
}
|
|
3024
|
+
const subgraphStep = subgraphStepWithin(3e5);
|
|
3025
|
+
//#endregion
|
|
2988
3026
|
//#region src/services/build.ts
|
|
2989
3027
|
/**
|
|
3028
|
+
* The gate loads codegen, so a build without `checkDefinitions` or without a
|
|
3029
|
+
* `subgraphs/` directory never imports it.
|
|
3030
|
+
*/
|
|
3031
|
+
async function withSubgraphStep(options) {
|
|
3032
|
+
if (!options.checkDefinitions) return options;
|
|
3033
|
+
if (!existsSync(join(process.cwd(), "subgraphs"))) return options;
|
|
3034
|
+
const { hasCodeFirstSubgraph } = await import("./subgraph-gate-j9ywj6KA.mjs");
|
|
3035
|
+
if (!hasCodeFirstSubgraph(process.cwd())) return options;
|
|
3036
|
+
return {
|
|
3037
|
+
...options,
|
|
3038
|
+
steps: [...options.steps ?? standardBuildSteps, subgraphStep]
|
|
3039
|
+
};
|
|
3040
|
+
}
|
|
3041
|
+
/**
|
|
2990
3042
|
* `ph build`, and the package build `ph connect build` and the switchboard
|
|
2991
3043
|
* runner start from. A refusal (missing tsc or tailwindcss, type errors not
|
|
2992
3044
|
* accepted, a release check that fails) prints its message and exits 1 once
|
|
@@ -2997,7 +3049,7 @@ async function buildPackage(args, options = {}) {
|
|
|
2997
3049
|
*/
|
|
2998
3050
|
async function runBuild(args, options = {}) {
|
|
2999
3051
|
try {
|
|
3000
|
-
return await buildPackage(args, options);
|
|
3052
|
+
return await buildPackage(args, await withSubgraphStep(options));
|
|
3001
3053
|
} catch (error) {
|
|
3002
3054
|
if (!(error instanceof BuildRefusal)) throw error;
|
|
3003
3055
|
console.error(error.message);
|
|
@@ -3007,5 +3059,5 @@ async function runBuild(args, options = {}) {
|
|
|
3007
3059
|
//#endregion
|
|
3008
3060
|
export { assertExternalDependenciesDeclared as i, createTraceFiles as n, assertManifestNameMatchesPackage as r, runBuild as t };
|
|
3009
3061
|
|
|
3010
|
-
//# sourceMappingURL=build-
|
|
3011
|
-
//# debugId=
|
|
3062
|
+
//# sourceMappingURL=build-D9Zjxsfj.mjs.map
|
|
3063
|
+
//# debugId=c6e8cc4c-3158-53da-aa8f-7ef5d895d16c
|