@hsuite/smart-engines-cli 1.5.1 → 1.6.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.
Files changed (55) hide show
  1. package/README.md +5 -3
  2. package/dist/_lib/baas.d.ts +27 -4
  3. package/dist/_lib/baas.d.ts.map +1 -1
  4. package/dist/_lib/baas.js +76 -42
  5. package/dist/_lib/baas.js.map +1 -1
  6. package/dist/_lib/cluster-convergence.d.ts +214 -0
  7. package/dist/_lib/cluster-convergence.d.ts.map +1 -0
  8. package/dist/_lib/cluster-convergence.js +381 -0
  9. package/dist/_lib/cluster-convergence.js.map +1 -0
  10. package/dist/_lib/deploy-manifest.d.ts +32 -0
  11. package/dist/_lib/deploy-manifest.d.ts.map +1 -1
  12. package/dist/_lib/deploy-manifest.js +71 -0
  13. package/dist/_lib/deploy-manifest.js.map +1 -1
  14. package/dist/_lib/docker.d.ts +35 -23
  15. package/dist/_lib/docker.d.ts.map +1 -1
  16. package/dist/_lib/docker.js +58 -54
  17. package/dist/_lib/docker.js.map +1 -1
  18. package/dist/_lib/frontend-guard.d.ts +59 -0
  19. package/dist/_lib/frontend-guard.d.ts.map +1 -1
  20. package/dist/_lib/frontend-guard.js +148 -0
  21. package/dist/_lib/frontend-guard.js.map +1 -1
  22. package/dist/_lib/registry-fanout.d.ts +299 -9
  23. package/dist/_lib/registry-fanout.d.ts.map +1 -1
  24. package/dist/_lib/registry-fanout.js +557 -27
  25. package/dist/_lib/registry-fanout.js.map +1 -1
  26. package/dist/_lib/subscription-client.d.ts +14 -0
  27. package/dist/_lib/subscription-client.d.ts.map +1 -1
  28. package/dist/_lib/subscription-client.js +13 -0
  29. package/dist/_lib/subscription-client.js.map +1 -1
  30. package/dist/commands/deploy.d.ts +28 -4
  31. package/dist/commands/deploy.d.ts.map +1 -1
  32. package/dist/commands/deploy.js +163 -20
  33. package/dist/commands/deploy.js.map +1 -1
  34. package/dist/commands/redeploy.d.ts +10 -0
  35. package/dist/commands/redeploy.d.ts.map +1 -1
  36. package/dist/commands/redeploy.js +146 -15
  37. package/dist/commands/redeploy.js.map +1 -1
  38. package/dist/commands/status.d.ts +4 -3
  39. package/dist/commands/status.d.ts.map +1 -1
  40. package/dist/commands/status.js +15 -3
  41. package/dist/commands/status.js.map +1 -1
  42. package/dist/commands/topup.d.ts +55 -0
  43. package/dist/commands/topup.d.ts.map +1 -0
  44. package/dist/commands/topup.js +180 -0
  45. package/dist/commands/topup.js.map +1 -0
  46. package/dist/commands/update.d.ts +33 -0
  47. package/dist/commands/update.d.ts.map +1 -1
  48. package/dist/commands/update.js +38 -2
  49. package/dist/commands/update.js.map +1 -1
  50. package/dist/commands/verify.d.ts.map +1 -1
  51. package/dist/commands/verify.js +24 -1
  52. package/dist/commands/verify.js.map +1 -1
  53. package/dist/index.js +2 -0
  54. package/dist/index.js.map +1 -1
  55. package/package.json +1 -1
@@ -2,7 +2,7 @@ import { Buffer } from 'buffer';
2
2
  /** A request against one cluster's Harbor Registry-v2 API. `path` is always `/v2/...` (or `/token...`). */
3
3
  export type RegistryRequest = {
4
4
  ip: string;
5
- method: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH';
5
+ method: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
6
6
  path: string;
7
7
  headers?: Record<string, string>;
8
8
  body?: Buffer;
@@ -45,6 +45,17 @@ export type EnsureImageOpts = {
45
45
  /** Test seam — defaults to {@link defaultTransport} bound to `host`. */
46
46
  transport?: RegistryTransport;
47
47
  };
48
+ /** Default per-request wall-clock budget for registry / cluster probes. */
49
+ export declare const DEFAULT_PROBE_TIMEOUT_MS = 10000;
50
+ /**
51
+ * Reject after `ms` instead of waiting on a request that may never settle.
52
+ *
53
+ * {@link defaultTransport} builds a bare `https.request` with no socket timeout,
54
+ * so a peer that completes the TCP handshake and then black-holes the response
55
+ * hangs its promise forever. Every probe that fans out across the cluster set
56
+ * wraps its requests in this.
57
+ */
58
+ export declare function withRequestTimeout<T>(p: Promise<T>, ms: number, what: string): Promise<T>;
48
59
  /** A parsed `WWW-Authenticate: Bearer ...` token challenge. `realm` is mandatory. */
49
60
  export type AuthChallenge = {
50
61
  realm: string;
@@ -91,6 +102,16 @@ export type ResolveRegistryDigestOpts = {
91
102
  transport?: RegistryTransport;
92
103
  /** Test seam — DNS A-record resolver (defaults to `dns.promises.resolve4`). */
93
104
  resolve4?: (h: string) => Promise<string[]>;
105
+ /**
106
+ * Per-request wall-clock budget for the manifest probe. Default 10s.
107
+ *
108
+ * Load-bearing since {@link probeServedDigests} must visit EVERY endpoint (the
109
+ * agreement logic needs all the answers) and so can no longer skip past a
110
+ * black-holing cluster the way the old first-responder read did. A node that
111
+ * completes the TCP handshake and then never answers would otherwise wedge the
112
+ * deploy indefinitely — `defaultTransport` sets no socket timeout.
113
+ */
114
+ requestTimeoutMs?: number;
94
115
  };
95
116
  /**
96
117
  * Resolve the CANONICAL manifest digest the registry serves for `<repo>:<tag>`
@@ -117,6 +138,31 @@ export type ResolveRegistryDigestOpts = {
117
138
  * deployer still re-verifies).
118
139
  */
119
140
  export declare function resolveRegistryDigest(opts: ResolveRegistryDigestOpts): Promise<string | null>;
141
+ /** What ONE cluster endpoint serves for a tag. `digest: null` ⇒ 404 / unreachable. */
142
+ export type ServedDigestAnswer = {
143
+ ip: string;
144
+ digest: string | null;
145
+ };
146
+ /**
147
+ * Ask EVERY cluster endpoint what it serves for `<repo>:<tag>` and return all
148
+ * the answers, in endpoint order.
149
+ *
150
+ * The federated registry name is round-robin over N INDEPENDENT Harbors, so
151
+ * "what does the registry serve for this tag" is a set of answers, not one
152
+ * answer. In the window between a `docker push` (which lands on exactly ONE
153
+ * cluster) and the fan-out, a re-used tag legitimately resolves to the NEW
154
+ * artifact on the origin and the PREVIOUS artifact on its peers. Collapsing
155
+ * that set to "whoever answered first" is what signed a stale digest in #2787.
156
+ */
157
+ export declare function probeServedDigests(opts: ResolveRegistryDigestOpts): Promise<ServedDigestAnswer[]>;
158
+ /**
159
+ * Normalise a `registry.server` into the bare DNS name the endpoint resolvers
160
+ * and the push probe work with: scheme stripped, port stripped. One definition —
161
+ * this pair of regexes had accumulated four copies across three files, and a
162
+ * drift between them would silently change which host the fan-out resolves
163
+ * versus which one the push is pinned to.
164
+ */
165
+ export declare function registryHostOf(server: string): string;
120
166
  /** Registry coordinates a push produced (shape of `BaasInitResponse.registry`). */
121
167
  export type FanOutRegistry = {
122
168
  server: string;
@@ -127,8 +173,29 @@ export type FanOutRegistry = {
127
173
  export type ResolveAttestationDigestOpts = {
128
174
  registry: FanOutRegistry;
129
175
  tag: string;
130
- /** The `sha256:<64hex>` digest the local `docker push` reported. */
176
+ /**
177
+ * The `sha256:<64hex>` digest the push produced.
178
+ *
179
+ * On the build+push path this is NOT a local-daemon value: `buildAndPush`
180
+ * resolves it from the ORIGIN registry (`docker buildx imagetools inspect`
181
+ * against the pinned single-origin target) and hard-errors if the `docker
182
+ * push` summary disagrees with it. On `--skip-push` it is the round-robin
183
+ * registry's answer for a tag nobody is currently writing.
184
+ */
131
185
  pushDigest: string;
186
+ /**
187
+ * SINGLE-ORIGIN registry hostname the push was pinned to (`resolvePushOrigin`,
188
+ * #1679) — the one cluster that actually received the bytes this run.
189
+ *
190
+ * When set, the resolver returns {@link pushDigest} and nothing else: the
191
+ * origin's own live answer is a CROSS-CHECK (disagreement ⇒ throw), and a
192
+ * peer's differing answer is pre-fan-out divergence to converge, never a value
193
+ * to adopt (#2787). Omit it on `--skip-push` / an unpinned push: then no
194
+ * endpoint is privileged and the endpoints that answer must AGREE.
195
+ */
196
+ originHost?: string;
197
+ /** Per-request probe timeout (ms). Default {@link DEFAULT_PROBE_TIMEOUT_MS}. */
198
+ requestTimeoutMs?: number;
132
199
  /** Optional progress log sink (defaults to no-op). */
133
200
  log?: (msg: string) => void;
134
201
  /** Test seam — the registry transport. */
@@ -138,16 +205,100 @@ export type ResolveAttestationDigestOpts = {
138
205
  };
139
206
  /**
140
207
  * Decide the digest to ATTEST (and to feed the fan-out): the digest Harbor
141
- * SERVES for `<repo>:<tag>`, resolved the same way the deployer does. Falls back
142
- * to the local `docker push` summary digest ONLY if the registry can't be probed
143
- * (offline / dev registry / transient) — a fail-SOFT, never a fail-open, because
144
- * the deployer independently re-verifies the served digest against the attested
145
- * one before it pins the pod.
208
+ * SERVES for `<repo>:<tag>`, resolved the same way the deployer does.
209
+ *
210
+ * ## Which Harbor, though (#2787)
211
+ *
212
+ * `harbor.<domain>` is round-robin over N INDEPENDENT Harbors and a `docker
213
+ * push` lands on exactly ONE of them. Between the push and the fan-out, a
214
+ * re-used tag therefore resolves to the NEW artifact on the push origin and to
215
+ * the PREVIOUS artifact on its peers — both are "the registry-served digest".
216
+ * This function used to take whichever endpoint answered first, which on
217
+ * testnet signed `d889ff2a…` (a peer's stale `v12`) for a run that had just
218
+ * pushed `d6ae4a80…`. The deployer that received that attestation refused the
219
+ * image — correctly, it cannot tell a stale attestation from a swapped one —
220
+ * and stayed pinned to the old release while its two peers moved on.
221
+ *
222
+ * So:
223
+ * - **`originHost` set** (a pinned push landed there) → the result is ALWAYS
224
+ * {@link ResolveAttestationDigestOpts.pushDigest}, the digest `buildAndPush`
225
+ * read back from the origin registry after the upload. The origin's live
226
+ * answer is only a cross-check: if it answers something else we THROW (the
227
+ * tag moved underneath us and either value would be a guess), and if it does
228
+ * not answer at all we still attest `pushDigest` rather than fall through to
229
+ * the peers — the silent-origin case is exactly when the peers unanimously
230
+ * serve the PREVIOUS artifact. Peers serving something else are logged and
231
+ * left to the fan-out, which copies this manifest to them and re-verifies
232
+ * (throwing if it can't).
233
+ * - **no `originHost`** (`--skip-push` / unpinned push) → no endpoint is
234
+ * privileged, so the endpoints that answer MUST agree. A split mesh THROWS,
235
+ * naming every endpoint and its digest — #2766 is a live condition here and
236
+ * a coin flip is not an attestation. A served digest may only OVERRIDE
237
+ * `pushDigest` when the WHOLE endpoint set answered; a lone answer from a
238
+ * partially-reachable mesh also THROWS, because the fan-out would then copy
239
+ * that one endpoint's bytes everywhere and make it mesh truth.
146
240
  *
147
- * See {@link resolveRegistryDigest} for why the served digest not the push
148
- * summary is authoritative for the #1445 strict-equality gate (issue #1589).
241
+ * Falls back to `pushDigest` without complaint when NO endpoint can be probed
242
+ * (offline / dev registry / transient) a fail-SOFT, never a fail-open: the
243
+ * deployer independently re-verifies the served digest against the attested one
244
+ * before it pins the pod.
245
+ *
246
+ * See {@link resolveRegistryDigest} for why a registry-served digest — not the
247
+ * `docker push` summary — is authoritative for the #1445 strict-equality gate
248
+ * (issue #1589).
149
249
  */
150
250
  export declare function resolveAttestationDigest(opts: ResolveAttestationDigestOpts): Promise<string>;
251
+ /**
252
+ * Result of {@link assertTagFreeOnMesh}: what each cluster Harbor serves for
253
+ * the candidate tag, or `null` when the registry is not a federated mesh
254
+ * (nothing was checked — identical semantics to `fanOutPushedImage`'s null).
255
+ */
256
+ export type MeshTagOccupancy = {
257
+ host: string;
258
+ tag: string;
259
+ /** One entry per cluster ingress: the digest it serves, or `null` when the tag is absent there. */
260
+ perEndpoint: Array<{
261
+ ip: string;
262
+ digest: string | null;
263
+ }>;
264
+ };
265
+ /** Options for {@link assertTagFreeOnMesh}. */
266
+ export type AssertTagFreeOnMeshOpts = {
267
+ registry: FanOutRegistry;
268
+ /** The candidate tag the deploy is about to `docker push` under. */
269
+ tag: string;
270
+ /** Test seam — DNS A-record resolver (defaults to `dns.promises.resolve4`). */
271
+ resolve4?: (h: string) => Promise<string[]>;
272
+ /** Test seam — the registry transport. */
273
+ transport?: RegistryTransport;
274
+ /** Optional progress log sink (defaults to no-op). */
275
+ log?: (msg: string) => void;
276
+ };
277
+ /**
278
+ * #2766 — BEFORE a `docker push`, prove the candidate tag is unoccupied on
279
+ * EVERY cluster Harbor of the mesh. Tag immutability is enforced per-cluster,
280
+ * so it cannot prevent divergence BETWEEN registries: a tag that already
281
+ * exists on any one of them (at any digest — the about-to-be-pushed build has
282
+ * a fresh, unknowable digest) makes the deploy 412 mid-fan-out at best, and at
283
+ * worst leaves the tag permanently inconsistent across the mesh (sn1/sn2 at
284
+ * one digest, sn3 at another, all immutable — unrecoverable without operator
285
+ * action). This check moves that failure BEFORE the build/push, where the
286
+ * operator just picks a fresh tag, and lists the divergence it found.
287
+ *
288
+ * Semantics:
289
+ * - 0/1 endpoint, or DNS that does not fan out → `null` (single-target
290
+ * registry; a single origin's own immutability already protects it).
291
+ * - tag absent EVERYWHERE → the occupancy (all `digest: null`) — free to push.
292
+ * - tag present on ANY endpoint at ANY digest → THROWS, one line per cluster
293
+ * (`ip → sha256:… | absent`). A single-origin pre-check must never be
294
+ * treated as authoritative anywhere in this path — the exact check that
295
+ * produced the v10 incident.
296
+ *
297
+ * Fail-open is deliberate on TRANSPORT errors per endpoint? NO — a cluster we
298
+ * cannot interrogate is a cluster we cannot vouch for, so a non-404/200 answer
299
+ * is fatal too. Only the not-a-mesh case (above) returns `null`.
300
+ */
301
+ export declare function assertTagFreeOnMesh(opts: AssertTagFreeOnMeshOpts): Promise<MeshTagOccupancy | null>;
151
302
  export type FanOutPushedImageOpts = {
152
303
  registry: FanOutRegistry;
153
304
  tag: string;
@@ -175,4 +326,143 @@ export type FanOutPushedImageOpts = {
175
326
  * resolves, so a failure here means a dev/local registry where fan-out is moot.
176
327
  */
177
328
  export declare function fanOutPushedImage(opts: FanOutPushedImageOpts): Promise<FanOutReport | null>;
329
+ /** Options for {@link resolvePushOrigin}. */
330
+ export type ResolvePushOriginOpts = {
331
+ /** Federated (round-robin) Harbor host, e.g. `harbor.testnet.hsuite.network`. */
332
+ host: string;
333
+ /** Repository path the push will target, e.g. `hsuite-customers-<appId>/app`. */
334
+ repository: string;
335
+ username: string;
336
+ password: string;
337
+ /** Test seam — the registry transport (defaults to {@link defaultTransport}). */
338
+ transport?: RegistryTransport;
339
+ /** Test seam — DNS A-record resolver (defaults to `dns.promises.resolve4`). */
340
+ resolve4?: (h: string) => Promise<string[]>;
341
+ /**
342
+ * Already-resolved cluster ingress IPs for {@link ResolvePushOriginOpts.host}.
343
+ * Supplied by {@link requirePushOrigin} so ONE DNS answer decides both "is
344
+ * this registry federated?" and "which origins do we probe?" — two
345
+ * independent lookups can disagree, and the whole point of this function is
346
+ * that a single answer set is authoritative for one push.
347
+ */
348
+ endpoints?: string[];
349
+ /** Optional progress log sink (defaults to no-op). */
350
+ log?: (msg: string) => void;
351
+ };
352
+ /**
353
+ * Resolve the SINGLE-ORIGIN hostname a `docker push` must be aimed at, by
354
+ * asking the mesh which name it wants upload traffic on. Returns `null` when
355
+ * there is nothing to pin (single-target registry, no server-side pin, or a pin
356
+ * that fails validation) — the caller then pushes at the round-robin name, i.e.
357
+ * exactly today's behaviour.
358
+ *
359
+ * ## Why the push must be pinned at all (#1679)
360
+ *
361
+ * `harbor.<domain>` is public-DNS round-robin over three INDEPENDENT Harbors.
362
+ * A chunked blob upload (`POST` init → `PATCH` → `PUT` finalize) is stateful:
363
+ * the `_state` token is HMAC'd by the serving registry and the uploaded bytes
364
+ * sit on that cluster's own ReadWriteOnce PVC. When the client reconnects
365
+ * between requests and round-robin lands the next hop on a different cluster,
366
+ * the upload dies (`blob upload invalid` / `invalid secret`). Sharing
367
+ * `REGISTRY_HTTP_SECRET` and the token CA across the mesh (PR #2763) fixes the
368
+ * HMAC and the bearer token, but NOT the blob bytes — those are still local to
369
+ * one cluster. The push has to stay on one origin end to end; the fan-out then
370
+ * distributes the finished artifact ({@link fanOutPushedImage}).
371
+ *
372
+ * ## Why we ASK instead of deriving the name
373
+ *
374
+ * Each cluster's registry is already pinned server-side (`REGISTRY_HTTP_HOST`)
375
+ * and advertises that name in the `Location` of an upload-init. The server
376
+ * honours it; docker 29.5.2 does not — it keeps the host it DIALLED and reuses
377
+ * only the path+query of the `Location`, so the server-side pin never reaches
378
+ * the wire. Reading the advertised host and dialling it ourselves is therefore
379
+ * the client-side half of a pin the server already publishes. Deriving
380
+ * `harbor-sn1` from `harbor` by string surgery would instead bake a testnet DNS
381
+ * convention into a customer-facing CLI, and silently mis-aim any other mesh.
382
+ *
383
+ * ## Validation
384
+ *
385
+ * The advertised value is server-controlled, and the CLI hands it to
386
+ * `docker login` / `docker push` — so it gates the robot credential and the
387
+ * customer's image. Three guards, all fail-CLOSED (return `null`, never throw;
388
+ * the caller then pushes unpinned, exactly as it would have anyway):
389
+ *
390
+ * 1. Not an IP literal — no cert covers one here, and "does this address
391
+ * resolve to itself" is not an identity check.
392
+ * 2. Inside `host`'s own parent DNS zone. A registry may only nominate a name
393
+ * the OPERATOR already controls, never an arbitrary internet name.
394
+ * 3. Resolves to exactly ONE address, and that address is the very cluster
395
+ * that advertised it.
396
+ *
397
+ * RESIDUAL RISK (accepted, documented): validation and use are two different
398
+ * DNS lookups — ours via `dns.resolve4`, then docker's own, moments later. A
399
+ * DNS rebind between them is not detectable from here, because docker resolves
400
+ * the hostname itself and takes no IP pin. Guard 2 is what makes that
401
+ * uninteresting: a rebind would need control of the operator's own zone, and an
402
+ * attacker holding that already owns `harbor.<domain>` itself. Closing the
403
+ * window completely means not shelling out to `docker` for the push at all
404
+ * (doing the upload over the Registry-v2 transport in this file, which does pin
405
+ * IP + SNI) — a much larger change, tracked separately.
406
+ *
407
+ * The probe opens one blob-upload session per attempt and cancels it
408
+ * (`DELETE`), so it leaves no half-open upload behind.
409
+ */
410
+ export declare function resolvePushOrigin(opts: ResolvePushOriginOpts): Promise<string | null>;
411
+ /**
412
+ * Options for {@link requirePushOrigin} — identical to
413
+ * {@link ResolvePushOriginOpts}; the wrapper differs in what it does with a
414
+ * failed pin, not in what it needs to attempt one. Named separately so the
415
+ * fail-closed entry point has its own referenceable contract.
416
+ */
417
+ export type RequirePushOriginOpts = ResolvePushOriginOpts;
418
+ /**
419
+ * The pin every push goes through (#2887). Wraps {@link resolvePushOrigin} and
420
+ * turns its fail-OPEN `null` into a hard failure **when the registry name is
421
+ * federated** — i.e. when it resolves to more than one origin.
422
+ *
423
+ * ## Why the fail-open had to go
424
+ *
425
+ * `resolvePushOrigin` returning `null` means "I could not pin this push". Its
426
+ * callers then pushed at the round-robin name, which is documented as
427
+ * "exactly today's behaviour" — but on a federated mesh today's behaviour does
428
+ * not work. Measured on testnet 2026-08-27 against
429
+ * `harbor.testnet.hsuite.network` (three A records, three INDEPENDENT Harbors,
430
+ * each signing its own bearer tokens and holding blob-upload sessions on its
431
+ * own ReadWriteOnce PVC): `Login Succeeded`, then some layers reporting
432
+ * `Layer already exists` while others sat on `Waiting`, then
433
+ * `error from registry: unauthorized to access repository: …, action: push`
434
+ * — on all 6 retries. The identical push aimed at `harbor-sn2.…` succeeded on
435
+ * the first attempt, then again at sn1 and sn3.
436
+ *
437
+ * So the unpinned fall-back is not a degraded push, it is a push that cannot
438
+ * succeed, and taking it silently costs a full image build plus six retries
439
+ * before failing with an error message that blames permissions. Refusing up
440
+ * front — naming the mesh, its origins, and the server-side knob that fixes it
441
+ * — is strictly better information for the same outcome.
442
+ *
443
+ * ## What is still a legitimate no-pin (returns `null`, no throw)
444
+ *
445
+ * - ONE origin. A dev / local / single-VIP registry cannot split a push
446
+ * across clusters, so there is nothing to pin and nothing to fail.
447
+ * - DNS that cannot enumerate the name at all. `dns.resolve4` (this module's
448
+ * resolver) ignores `/etc/hosts` while docker's own resolution does not, so
449
+ * an unresolvable name here can still be a perfectly working single-origin
450
+ * registry on the developer's machine. Unproven federation is not proven
451
+ * federation; we log it and let the push proceed.
452
+ *
453
+ * RESIDUAL RISK (accepted, documented): the A-record count is the ONLY signal
454
+ * we have for "is this mesh federated". A resolver that answers with fewer
455
+ * records than the mesh really has — a spoofed or on-path answer, or simply a
456
+ * health-pruned view at query time — makes a three-Harbor mesh look
457
+ * single-origin, and the push falls back to unpinned. That is not a
458
+ * credential-disclosure risk (the three validation guards in
459
+ * {@link resolvePushOrigin} are untouched, and the fall-back still targets the
460
+ * operator's own round-robin name, resolved independently by docker); the cost
461
+ * is reinstating the failure mode above — a wasted build and six confusing
462
+ * retries. Removing it needs a source of mesh cardinality that is not DNS.
463
+ *
464
+ * Callers that genuinely want no pin have `--skip-push` (nothing is uploaded,
465
+ * so there is no upload session to keep on one origin).
466
+ */
467
+ export declare function requirePushOrigin(opts: RequirePushOriginOpts): Promise<string | null>;
178
468
  //# sourceMappingURL=registry-fanout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry-fanout.d.ts","sourceRoot":"","sources":["../../src/_lib/registry-fanout.ts"],"names":[],"mappings":"AA8CA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAmChC,2GAA2G;AAC3G,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAEpF,8FAA8F;AAC9F,MAAM,MAAM,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1C,6DAA6D;AAC7D,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1F,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,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