@platforma-sdk/block-tools 2.14.2 → 2.14.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/block-tools",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.4",
|
|
4
4
|
"description": "Utility to manipulate Platforma Blocks and Block Registry",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"bin": {
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"undici": "~7.16.0",
|
|
35
35
|
"yaml": "^2.8.0",
|
|
36
36
|
"zod": "~3.25.76",
|
|
37
|
-
"@milaboratories/pl-model-backend": "1.4.21",
|
|
38
37
|
"@milaboratories/pl-http": "1.2.4",
|
|
39
|
-
"@milaboratories/ts-helpers": "1.8.6",
|
|
40
38
|
"@milaboratories/pl-model-common": "1.48.0",
|
|
41
39
|
"@milaboratories/pl-model-middle-layer": "1.32.0",
|
|
42
40
|
"@milaboratories/resolve-helper": "1.1.3",
|
|
41
|
+
"@milaboratories/ts-helpers": "1.8.6",
|
|
43
42
|
"@platforma-sdk/blocks-deps-updater": "2.2.0",
|
|
43
|
+
"@milaboratories/pl-model-backend": "1.4.22",
|
|
44
44
|
"@platforma-sdk/package-builder-lib": "1.3.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"oxfmt": "0.35.0",
|
|
53
53
|
"rollup-plugin-node-externals": "^8.0.0",
|
|
54
54
|
"semver": "^7.7.2",
|
|
55
|
-
"typescript": "
|
|
55
|
+
"typescript": "7.0.2",
|
|
56
56
|
"vite": "^8.0.6",
|
|
57
|
-
"vite-plugin-dts": "^
|
|
57
|
+
"vite-plugin-dts": "^5.0.3",
|
|
58
58
|
"vitest": "^4.1.3",
|
|
59
|
-
"@milaboratories/ts-builder": "1.7.
|
|
60
|
-
"@milaboratories/
|
|
61
|
-
"@milaboratories/
|
|
59
|
+
"@milaboratories/ts-builder": "1.7.2",
|
|
60
|
+
"@milaboratories/ts-configs": "1.4.0",
|
|
61
|
+
"@milaboratories/build-configs": "2.0.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "vite build",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Facade end-state coverage — the slim `block/` the structurer emits and
|
|
2
2
|
// enforces: block-scope detection by the top-level `block` field, the four-file
|
|
3
3
|
// `src/` surface + facade `tsconfig.json`, the slim publishable `package.json`,
|
|
4
|
-
// sibling privacy,
|
|
4
|
+
// sibling privacy, legacy-shim cleanup, and author-script preservation.
|
|
5
5
|
|
|
6
6
|
import { describe, test, expect } from "vitest";
|
|
7
7
|
import type { BlockVars, RunContext } from "../engine/api";
|
|
@@ -241,6 +241,26 @@ describe("facade: sibling versions on refresh", () => {
|
|
|
241
241
|
});
|
|
242
242
|
});
|
|
243
243
|
|
|
244
|
+
describe("facade: author scripts beyond the canonical set survive a refresh", () => {
|
|
245
|
+
test("a pre-existing `mark-stable` script is preserved", () => {
|
|
246
|
+
const { fs, ctx } = simulateInit({ vars: VARS });
|
|
247
|
+
const MARK_STABLE =
|
|
248
|
+
"block-tools mark-stable -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'";
|
|
249
|
+
|
|
250
|
+
// `.github/workflows/mark-stable.yaml` (engine-generated) runs
|
|
251
|
+
// `cd block && pnpm run mark-stable`, so the facade must keep the script.
|
|
252
|
+
const before = JSON.parse(fs.read("block/package.json"));
|
|
253
|
+
before.scripts["mark-stable"] = MARK_STABLE;
|
|
254
|
+
fs.write("block/package.json", `${JSON.stringify(before, null, 2)}\n`);
|
|
255
|
+
|
|
256
|
+
const refreshCtx: RunContext = { ...ctx, dryRun: false };
|
|
257
|
+
expect(() => engineRun(STRUCTURE, fs, refreshCtx, { templates: TEMPLATES })).not.toThrow();
|
|
258
|
+
|
|
259
|
+
const after = JSON.parse(fs.read("block/package.json"));
|
|
260
|
+
expect(after.scripts["mark-stable"]).toBe(MARK_STABLE);
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
|
|
244
264
|
describe("facade: legacy shim cleanup on refresh", () => {
|
|
245
265
|
test("a refresh removes a pre-existing block/index.js + index.d.ts, then is idempotent", () => {
|
|
246
266
|
const { fs, ctx } = simulateInit({ vars: VARS });
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
ensureDevDep,
|
|
12
12
|
ensureWorkspaceScopeDevDeps,
|
|
13
13
|
requireField,
|
|
14
|
-
removeScript,
|
|
15
14
|
enforceAlphabeticalOrder,
|
|
16
15
|
enforceFieldOrder,
|
|
17
16
|
type RunContext,
|
|
@@ -221,7 +220,10 @@ export function blockPackageJsonRules(ctx: RunContext): void {
|
|
|
221
220
|
|
|
222
221
|
const scripts = blockScripts(v.npmOrg, ctx.isSdkInternal);
|
|
223
222
|
for (const [name, command] of Object.entries(scripts)) ensureScript(name, command);
|
|
224
|
-
|
|
223
|
+
// Scripts beyond the canonical set are block-author territory — left as-is.
|
|
224
|
+
// `mark-stable` in particular is invoked by the engine-generated
|
|
225
|
+
// `.github/workflows/mark-stable.yaml` (which does `cd block && pnpm run
|
|
226
|
+
// mark-stable`), so stripping it broke that workflow.
|
|
225
227
|
|
|
226
228
|
// Slim invariant: the facade carries ZERO runtime dependencies. The siblings
|
|
227
229
|
// and the SDK build/publish deps are all devDeps, so `dependencies` ends
|