@platforma-sdk/block-tools 2.12.6 → 2.12.8

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.12.6",
3
+ "version": "2.12.8",
4
4
  "description": "Utility to manipulate Platforma Blocks and Block Registry",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -34,14 +34,14 @@
34
34
  "undici": "~7.16.0",
35
35
  "yaml": "^2.8.0",
36
36
  "zod": "~3.25.76",
37
+ "@milaboratories/pl-model-common": "1.47.2",
38
+ "@milaboratories/pl-model-middle-layer": "1.30.14",
39
+ "@milaboratories/ts-helpers": "1.8.6",
40
+ "@platforma-sdk/blocks-deps-updater": "2.2.0",
37
41
  "@milaboratories/pl-http": "1.2.4",
38
- "@milaboratories/pl-model-backend": "1.4.16",
39
- "@milaboratories/pl-model-common": "1.47.1",
40
- "@milaboratories/pl-model-middle-layer": "1.30.13",
42
+ "@platforma-sdk/package-builder-lib": "1.2.1",
41
43
  "@milaboratories/resolve-helper": "1.1.3",
42
- "@platforma-sdk/blocks-deps-updater": "2.2.0",
43
- "@milaboratories/ts-helpers": "1.8.5",
44
- "@platforma-sdk/package-builder-lib": "1.2.0"
44
+ "@milaboratories/pl-model-backend": "1.4.17"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@rollup/plugin-node-resolve": "^16.0.1",
@@ -56,9 +56,9 @@
56
56
  "vite": "^8.0.6",
57
57
  "vite-plugin-dts": "^4.5.3",
58
58
  "vitest": "^4.1.3",
59
- "@milaboratories/build-configs": "2.0.0",
60
- "@milaboratories/ts-builder": "1.6.0",
61
- "@milaboratories/ts-configs": "1.3.0"
59
+ "@milaboratories/ts-builder": "1.6.1",
60
+ "@milaboratories/ts-configs": "1.3.1",
61
+ "@milaboratories/build-configs": "2.0.0"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "vite build",
@@ -127,14 +127,14 @@ describe("runBuild orchestration", () => {
127
127
  ]);
128
128
  });
129
129
 
130
- it("dev docker build targets the built-in dev registry; release does not", async () => {
130
+ it("dev docker build targets the built-in dev registry; release the production registry", async () => {
131
131
  const dev = await run({ channel: "dev", variant: "docker", location: "remote" });
132
132
  expect(dev.spies.buildDockerImages).toHaveBeenCalledWith(
133
133
  expect.objectContaining({ registry: defaults.DEV_DOCKER_REGISTRY }),
134
134
  );
135
135
  const rel = await run({ channel: "release", variant: "docker", location: "remote" });
136
136
  expect(rel.spies.buildDockerImages).toHaveBeenCalledWith(
137
- expect.objectContaining({ registry: undefined }),
137
+ expect.objectContaining({ registry: defaults.DOCKER_REGISTRY }),
138
138
  );
139
139
  });
140
140
 
@@ -166,11 +166,26 @@ describe("runBuild orchestration", () => {
166
166
  });
167
167
  });
168
168
 
169
- it("release override targets the configured release registry, no built-in default", async () => {
170
- expect(await dockerAddresses(releaseRemote)).toEqual({ pull: undefined, push: undefined });
169
+ it("release pull defaults to the built-in registry, independent of the push target", async () => {
170
+ // No push override: nothing pushed, pull embeds the built-in production registry.
171
+ expect(await dockerAddresses(releaseRemote)).toEqual({
172
+ pull: defaults.DOCKER_REGISTRY,
173
+ push: undefined,
174
+ });
175
+ // Push to quay, but the descriptor still embeds containers.pl-open.science (GA-fronted proxy).
176
+ // quay is not reachable from corporate deployments, so pull must NOT inherit the push target.
177
+ process.env.PL_RELEASE_DOCKER_PUSH_URL = "quay.io/org/repo";
178
+ expect(await dockerAddresses(releaseRemote)).toEqual({
179
+ pull: defaults.DOCKER_REGISTRY,
180
+ push: "quay.io/org/repo",
181
+ });
182
+ });
183
+
184
+ it("PL_RELEASE_DOCKER_PULL_URL overrides the built-in release pull default", async () => {
171
185
  process.env.PL_RELEASE_DOCKER_PUSH_URL = "quay.io/org/repo";
186
+ process.env.PL_RELEASE_DOCKER_PULL_URL = "cdn.example/release";
172
187
  expect(await dockerAddresses(releaseRemote)).toEqual({
173
- pull: "quay.io/org/repo",
188
+ pull: "cdn.example/release",
174
189
  push: "quay.io/org/repo",
175
190
  });
176
191
  });
@@ -134,7 +134,10 @@ function parsePushTarget(raw: string): { registry: string; autoLogin: boolean }
134
134
  }
135
135
 
136
136
  // Docker push target + the pull address embedded in the descriptor. Precedence flag > channel env >
137
- // dev default (release has none); pull defaults to push; autoLogin follows the push target's ecr://.
137
+ // dev default (release has none). Pull default is channel-specific: dev pulls from where it pushed
138
+ // (one ECR host), but release push (quay) and pull (containers.pl-open.science, GA-fronted proxy) are
139
+ // different locations by design, so release pull defaults to the built-in registry, NOT the push
140
+ // target. autoLogin follows the push target's ecr://.
138
141
  function resolveDockerAddresses(
139
142
  channel: Channel,
140
143
  opts: BuildOptions,
@@ -149,7 +152,8 @@ function resolveDockerAddresses(
149
152
  opts.dockerPushTo ?? channelPush ?? (isDev ? defaults.DEV_DOCKER_PUSH_TARGET : undefined);
150
153
  const parsed = rawPush ? parsePushTarget(rawPush) : { registry: undefined, autoLogin: false };
151
154
 
152
- const rawPull = opts.dockerRegistry ?? channelPull ?? rawPush;
155
+ const rawPull =
156
+ opts.dockerRegistry ?? channelPull ?? (isDev ? rawPush : defaults.DOCKER_REGISTRY);
153
157
  const pull = rawPull ? stripScheme(rawPull) : undefined;
154
158
 
155
159
  return { pull, push: parsed.registry, autoLogin: parsed.autoLogin };