@opengeni/contracts 3.0.1-canary.0 → 3.0.1

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/atlassian.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  AtlassianSyncCadence,
18
18
  SaveAtlassianSourcesRequest,
19
19
  atlassianScopesAllowRead
20
- } from "./chunk-FBXZZSXA.js";
20
+ } from "./chunk-EHHDZLGY.js";
21
21
  import "./chunk-YBW5JSA3.js";
22
22
  import "./chunk-O5LEQHDM.js";
23
23
  import "./chunk-GRG7PHWQ.js";
@@ -5517,26 +5517,11 @@ var McpMutationReceipt = z21.object({
5517
5517
  // src/sandbox-snapshots.ts
5518
5518
  var WORKSPACE_ARCHIVE_DESCRIPTOR_VERSION = 2;
5519
5519
  var WORKSPACE_ARCHIVE_OBJECT_REF_SCHEMA = "sandbox_archive_object_v1";
5520
- var UPLOAD_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
5521
- var OBJECT_KEY = /^sandbox-archives\/v1\/([0-9a-f-]{36})\/([0-9a-f-]{36})\/([0-9a-f-]{36})\/(wa1:[0-9]{13}:[0-9a-f]{64})(?:\.([0-9a-f-]+))?\.tar$/i;
5522
- function parseWorkspaceArchiveObjectKey(value) {
5523
- if (typeof value !== "string") return null;
5524
- const match = OBJECT_KEY.exec(value);
5525
- if (!match || match[0] !== value || match[5] !== void 0 && !UPLOAD_ID.test(match[5])) {
5526
- return null;
5527
- }
5528
- return {
5529
- accountId: match[1],
5530
- workspaceId: match[2],
5531
- sandboxGroupId: match[3],
5532
- revision: match[4],
5533
- uploadId: match[5] ?? null
5534
- };
5535
- }
5520
+ var OBJECT_KEY = /^sandbox-archives\/v1\/[0-9a-f-]{36}\/[0-9a-f-]{36}\/[0-9a-f-]{36}\/wa1:[0-9]{13}:[0-9a-f]{64}\.tar$/i;
5536
5521
  function parseWorkspaceArchiveObjectRef(value) {
5537
5522
  if (!value || typeof value !== "object" || Array.isArray(value)) return null;
5538
5523
  const candidate = value;
5539
- if (candidate.schema !== WORKSPACE_ARCHIVE_OBJECT_REF_SCHEMA || typeof candidate.key !== "string" || !parseWorkspaceArchiveObjectKey(candidate.key) || typeof candidate.sha256 !== "string" || !SHA256.test(candidate.sha256) || !nonnegativeInteger(candidate.bytes) || candidate.bytes <= 0 || typeof candidate.backend !== "string" || candidate.backend.length === 0 || candidate.backend.length > 64) {
5524
+ if (candidate.schema !== WORKSPACE_ARCHIVE_OBJECT_REF_SCHEMA || typeof candidate.key !== "string" || !OBJECT_KEY.test(candidate.key) || typeof candidate.sha256 !== "string" || !SHA256.test(candidate.sha256) || !nonnegativeInteger(candidate.bytes) || candidate.bytes <= 0 || typeof candidate.backend !== "string" || candidate.backend.length === 0 || candidate.backend.length > 64) {
5540
5525
  return null;
5541
5526
  }
5542
5527
  return {
@@ -5548,18 +5533,7 @@ function parseWorkspaceArchiveObjectRef(value) {
5548
5533
  };
5549
5534
  }
5550
5535
  function workspaceArchiveObjectKey(input) {
5551
- if (input.uploadId !== void 0 && (!UPLOAD_ID.test(input.uploadId) || input.uploadId.length !== 36)) {
5552
- throw new Error("Invalid workspace archive upload UUID");
5553
- }
5554
- return `sandbox-archives/v1/${input.accountId}/${input.workspaceId}/${input.sandboxGroupId}/${input.revision}${input.uploadId === void 0 ? "" : `.${input.uploadId}`}.tar`;
5555
- }
5556
- function validateWorkspaceArchiveObjectRef(value, input) {
5557
- const ref = parseWorkspaceArchiveObjectRef(value);
5558
- const key = ref && parseWorkspaceArchiveObjectKey(ref.key);
5559
- const descriptor = parseWorkspaceArchiveDescriptor(input.descriptor);
5560
- if (!ref || !key || descriptor?.version !== 1 || key.accountId.toLowerCase() !== input.accountId.toLowerCase() || key.workspaceId.toLowerCase() !== input.workspaceId.toLowerCase() || key.sandboxGroupId.toLowerCase() !== input.sandboxGroupId.toLowerCase() || key.revision !== descriptor.revision || ref.sha256 !== descriptor.archiveSha256 || ref.bytes !== descriptor.archiveBytes)
5561
- return null;
5562
- return ref;
5536
+ return `sandbox-archives/v1/${input.accountId}/${input.workspaceId}/${input.sandboxGroupId}/${input.revision}.tar`;
5563
5537
  }
5564
5538
  function workspaceArchivePayloadPresent(sessionState) {
5565
5539
  if (!sessionState) return false;
@@ -21198,10 +21172,8 @@ export {
21198
21172
  McpMutationReceipt,
21199
21173
  WORKSPACE_ARCHIVE_DESCRIPTOR_VERSION,
21200
21174
  WORKSPACE_ARCHIVE_OBJECT_REF_SCHEMA,
21201
- parseWorkspaceArchiveObjectKey,
21202
21175
  parseWorkspaceArchiveObjectRef,
21203
21176
  workspaceArchiveObjectKey,
21204
- validateWorkspaceArchiveObjectRef,
21205
21177
  workspaceArchivePayloadPresent,
21206
21178
  omitInlineWorkspaceArchiveWhenObjectRefPresent,
21207
21179
  NATIVE_SNAPSHOT_PREFIXES,
@@ -22553,4 +22525,4 @@ export {
22553
22525
  ClientConfig,
22554
22526
  evaluateWorkspaceModelPolicy
22555
22527
  };
22556
- //# sourceMappingURL=chunk-FBXZZSXA.js.map
22528
+ //# sourceMappingURL=chunk-EHHDZLGY.js.map