@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 +1 -1
- package/dist/{chunk-FBXZZSXA.js → chunk-EHHDZLGY.js} +4 -32
- package/dist/chunk-EHHDZLGY.js.map +1 -0
- package/dist/{chunk-FY5DZL7T.js → chunk-IRR7CBBW.js} +2 -2
- package/dist/connect.js +1 -1
- package/dist/connection-authority.js +2 -2
- package/dist/google-drive.js +1 -1
- package/dist/host-mcp-bindings.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -5
- package/dist/personal-github.js +1 -1
- package/dist/sandbox-snapshots.d.ts +0 -18
- package/package.json +1 -1
- package/src/index.ts +0 -3
- package/src/sandbox-snapshots.ts +3 -67
- package/dist/chunk-FBXZZSXA.js.map +0 -1
- /package/dist/{chunk-FY5DZL7T.js.map → chunk-IRR7CBBW.js.map} +0 -0
package/dist/atlassian.js
CHANGED
|
@@ -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
|
|
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" || !
|
|
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
|
-
|
|
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-
|
|
22528
|
+
//# sourceMappingURL=chunk-EHHDZLGY.js.map
|