@interfere/types 10.6.2 → 10.6.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_data_source_map_upload_batch=require("./source-map-upload-batch.cjs");let zod=require("zod");const manifestBundlerSchema=zod.z.enum([`webpack`,`turbopack`,`rollup`,`tsc`]).meta({id:`ManifestBundler`,title:`ManifestBundler`}),sourceMapManifestEntrySchema=zod.z.object({chunkUrl:zod.z.string(),debugId:zod.z.string(),mapHash:zod.z.string(),objectKey:zod.z.string()}),sourceMapManifestSchema=zod.z.object({bundler:manifestBundlerSchema,createdAt:zod.z.number(),files:zod.z.array(sourceMapManifestEntrySchema),organizationId:zod.z.string(),releaseSlug:zod.z.string(),surfaceId:zod.z.string()}),uploadSourceMapEntry=zod.z.object({chunkUrl:zod.z.string(),debugId:zod.z.string(),hash:zod.z.string(),path:zod.z.string().min(1)}).meta({id:`UploadSourceMapEntry`,title:`UploadSourceMapEntry`}),uploadSourceMapsMetadata=zod.z.object({bundler:manifestBundlerSchema,entries:zod.z.array(uploadSourceMapEntry),sourceFileCount:zod.z.number().int().nonnegative().optional()}).meta({description:`Metadata attached alongside uploaded source map files.`,id:`UploadSourceMapsMetadata`,title:`UploadSourceMapsMetadata`}),uploadSourceMapsResponse=zod.z.object({fileCount:zod.z.number().int().nonnegative(),message:zod.z.string(),ok:zod.z.boolean(),processed:zod.z.number().int().nonnegative()}).meta({id:`UploadSourceMapsResponse`,title:`UploadSourceMapsResponse`}),signSourceMapFile=zod.z.object({hasFile:zod.z.boolean(),hasNames:zod.z.boolean(),hasSourcesContent:zod.z.boolean(),mappingsPresent:zod.z.boolean(),path:zod.z.string().min(1),sizeBytes:zod.z.number().int().nonnegative()}).meta({id:`SignSourceMapFile`,title:`SignSourceMapFile`}),signSourceMapsRequest=zod.z.object({files:zod.z.array(signSourceMapFile)}).meta({description:`Initializes an upload session with the file inventory and declared sizes. Upload each file through the source-map endpoint using ordered byte offsets, then finalize the complete batch before the session expires.`,id:`SignSourceMapsRequest`,title:`SignSourceMapsRequest`}),signSourceMapUpload=zod.z.object({objectKey:zod.z.string(),path:zod.z.string(),presignedUrl:zod.z.string()}).meta({id:`SignSourceMapUpload`,title:`SignSourceMapUpload`}),signSourceMapsResponse=zod.z.object({expiresAt:zod.z.number().int(),uploads:zod.z.array(signSourceMapUpload)}).meta({id:`SignSourceMapsResponse`,title:`SignSourceMapsResponse`}),sourceMapUploadSessionResponse=zod.z.object({batchUpload:require_data_source_map_upload_batch.sourceMapBatchCapability.optional(),expiresAt:zod.z.number().int(),uploads:zod.z.array(zod.z.object({path:zod.z.string()}))}).meta({id:`SourceMapUploadSessionResponse`}),completeSourceMapFile=zod.z.object({chunkUrl:zod.z.string(),debugId:zod.z.string(),hash:zod.z.string(),path:zod.z.string().min(1)}).meta({id:`CompleteSourceMapFile`,title:`CompleteSourceMapFile`}),completeSourceMapsRequest=zod.z.object({bundler:manifestBundlerSchema,files:zod.z.array(completeSourceMapFile),sourceFileCount:zod.z.number().int().nonnegative().optional()}).meta({description:`Finalizes an upload session after all file chunks are durably accepted. Verifies the complete file inventory and schedules publication of the source-map manifest. Safe to retry.`,id:`CompleteSourceMapsRequest`,title:`CompleteSourceMapsRequest`}),completeSourceMapsResponse=zod.z.object({fileCount:zod.z.number().int().nonnegative(),ok:zod.z.boolean()}).meta({id:`CompleteSourceMapsResponse`,title:`CompleteSourceMapsResponse`}),DEBUG_ID_RE=/^[a-fA-F0-9-]+$/u;function debugIdRuntimeSnippet(debugId){if(!DEBUG_ID_RE.test(debugId))throw Error(`debugId must be hex and dashes only, got: ${debugId}`);return`;!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._debugIds=e._debugIds||{},e._debugIds[n]="${debugId}")}catch(e){}}();`}const SOURCEMAPPING_RE=/\/\/[#@]\s*sourceMappingURL=\S+\s*$/u,SPEC_LAST_DEBUG_ID_RE=/\/\/# debugId=(?<id>[a-fA-F0-9-]+)(?![\s\S]*\/\/# debugId=)/mu,RUNTIME_DEBUG_ID_RE=/(?<prefix>_debugIds\[[^\]]*\]=")[a-fA-F0-9-]+(?<suffix>")/gu;function readDebugIdFromJs(content){return SPEC_LAST_DEBUG_ID_RE.exec(content)?.[1]??null}function injectDebugIdIntoJs(content,debugId){let snippet=debugIdRuntimeSnippet(debugId),debugIdComment=`//# debugId=${debugId}`;if(SPEC_LAST_DEBUG_ID_RE.test(content))return content.replace(SPEC_LAST_DEBUG_ID_RE,debugIdComment).replace(RUNTIME_DEBUG_ID_RE,`$1${debugId}$2`);let match=SOURCEMAPPING_RE.exec(content);return match?`${content.slice(0,match.index).trimEnd()}\n${snippet}\n${debugIdComment}\n${match[0]}`:`${content}\n${snippet}\n${debugIdComment}`}exports.completeSourceMapFile=completeSourceMapFile,exports.completeSourceMapsRequest=completeSourceMapsRequest,exports.completeSourceMapsResponse=completeSourceMapsResponse,exports.debugIdRuntimeSnippet=debugIdRuntimeSnippet,exports.injectDebugIdIntoJs=injectDebugIdIntoJs,exports.manifestBundlerSchema=manifestBundlerSchema,exports.readDebugIdFromJs=readDebugIdFromJs,exports.signSourceMapFile=signSourceMapFile,exports.signSourceMapUpload=signSourceMapUpload,exports.signSourceMapsRequest=signSourceMapsRequest,exports.signSourceMapsResponse=signSourceMapsResponse,exports.sourceMapManifestSchema=sourceMapManifestSchema,exports.sourceMapUploadSessionResponse=sourceMapUploadSessionResponse,exports.uploadSourceMapEntry=uploadSourceMapEntry,exports.uploadSourceMapsMetadata=uploadSourceMapsMetadata,exports.uploadSourceMapsResponse=uploadSourceMapsResponse;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const require_data_source_map_upload_batch=require("./source-map-upload-batch.cjs");let zod=require("zod");const manifestBundlerSchema=zod.z.enum([`webpack`,`turbopack`,`rollup`,`tsc`]).meta({id:`ManifestBundler`,title:`ManifestBundler`}),sourceMapManifestEntrySchema=zod.z.object({chunkUrl:zod.z.string(),debugId:zod.z.string(),mapHash:zod.z.string(),objectKey:zod.z.string()}),sourceMapManifestSchema=zod.z.object({bundler:manifestBundlerSchema,createdAt:zod.z.number(),files:zod.z.array(sourceMapManifestEntrySchema),organizationId:zod.z.string(),releaseSlug:zod.z.string(),surfaceId:zod.z.string()}),uploadSourceMapEntry=zod.z.object({chunkUrl:zod.z.string(),debugId:zod.z.string(),hash:zod.z.string(),path:zod.z.string().min(1)}).meta({id:`UploadSourceMapEntry`,title:`UploadSourceMapEntry`}),uploadSourceMapsMetadata=zod.z.object({bundler:manifestBundlerSchema,entries:zod.z.array(uploadSourceMapEntry),sourceFileCount:zod.z.number().int().nonnegative().optional()}).meta({description:`Metadata attached alongside uploaded source map files.`,id:`UploadSourceMapsMetadata`,title:`UploadSourceMapsMetadata`}),uploadSourceMapsResponse=zod.z.object({fileCount:zod.z.number().int().nonnegative(),message:zod.z.string(),ok:zod.z.boolean(),processed:zod.z.number().int().nonnegative()}).meta({id:`UploadSourceMapsResponse`,title:`UploadSourceMapsResponse`}),signSourceMapFile=zod.z.object({hasFile:zod.z.boolean(),hasNames:zod.z.boolean(),hasSourcesContent:zod.z.boolean(),mappingsPresent:zod.z.boolean(),path:zod.z.string().min(1),sizeBytes:zod.z.number().int().nonnegative()}).meta({id:`SignSourceMapFile`,title:`SignSourceMapFile`}),signSourceMapsRequest=zod.z.object({files:zod.z.array(signSourceMapFile)}).meta({description:`Initializes an upload session with the file inventory and declared sizes. Upload each file through the source-map endpoint using ordered byte offsets, then finalize the complete batch before the session expires.`,id:`SignSourceMapsRequest`,title:`SignSourceMapsRequest`}),signSourceMapUpload=zod.z.object({objectKey:zod.z.string(),path:zod.z.string(),presignedUrl:zod.z.string()}).meta({id:`SignSourceMapUpload`,title:`SignSourceMapUpload`}),signSourceMapsResponse=zod.z.object({expiresAt:zod.z.number().int(),uploads:zod.z.array(signSourceMapUpload)}).meta({id:`SignSourceMapsResponse`,title:`SignSourceMapsResponse`}),sourceMapUploadSessionResponse=zod.z.object({batchUpload:require_data_source_map_upload_batch.sourceMapBatchCapability.optional(),expiresAt:zod.z.number().int(),uploadGrant:zod.z.string().optional().meta({description:`Opaque grant for this upload session. Send it as the X-Interfere-Upload-Grant header on chunk and batch uploads in place of the API key; it expires with the session.`}),uploads:zod.z.array(zod.z.object({path:zod.z.string()}))}).meta({id:`SourceMapUploadSessionResponse`}),completeSourceMapFile=zod.z.object({chunkUrl:zod.z.string(),debugId:zod.z.string(),hash:zod.z.string(),path:zod.z.string().min(1)}).meta({id:`CompleteSourceMapFile`,title:`CompleteSourceMapFile`}),completeSourceMapsRequest=zod.z.object({bundler:manifestBundlerSchema,files:zod.z.array(completeSourceMapFile),sourceFileCount:zod.z.number().int().nonnegative().optional()}).meta({description:`Finalizes an upload session after all file chunks are durably accepted. Verifies the complete file inventory and schedules publication of the source-map manifest. Safe to retry.`,id:`CompleteSourceMapsRequest`,title:`CompleteSourceMapsRequest`}),completeSourceMapsResponse=zod.z.object({fileCount:zod.z.number().int().nonnegative(),ok:zod.z.boolean()}).meta({id:`CompleteSourceMapsResponse`,title:`CompleteSourceMapsResponse`}),DEBUG_ID_RE=/^[a-fA-F0-9-]+$/u;function debugIdRuntimeSnippet(debugId){if(!DEBUG_ID_RE.test(debugId))throw Error(`debugId must be hex and dashes only, got: ${debugId}`);return`;!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._debugIds=e._debugIds||{},e._debugIds[n]="${debugId}")}catch(e){}}();`}const SOURCEMAPPING_RE=/\/\/[#@]\s*sourceMappingURL=\S+\s*$/u,SPEC_LAST_DEBUG_ID_RE=/\/\/# debugId=(?<id>[a-fA-F0-9-]+)(?![\s\S]*\/\/# debugId=)/mu,RUNTIME_DEBUG_ID_RE=/(?<prefix>_debugIds\[[^\]]*\]=")[a-fA-F0-9-]+(?<suffix>")/gu;function readDebugIdFromJs(content){return SPEC_LAST_DEBUG_ID_RE.exec(content)?.[1]??null}function injectDebugIdIntoJs(content,debugId){let snippet=debugIdRuntimeSnippet(debugId),debugIdComment=`//# debugId=${debugId}`;if(SPEC_LAST_DEBUG_ID_RE.test(content))return content.replace(SPEC_LAST_DEBUG_ID_RE,debugIdComment).replace(RUNTIME_DEBUG_ID_RE,`$1${debugId}$2`);let match=SOURCEMAPPING_RE.exec(content);return match?`${content.slice(0,match.index).trimEnd()}\n${snippet}\n${debugIdComment}\n${match[0]}`:`${content}\n${snippet}\n${debugIdComment}`}exports.completeSourceMapFile=completeSourceMapFile,exports.completeSourceMapsRequest=completeSourceMapsRequest,exports.completeSourceMapsResponse=completeSourceMapsResponse,exports.debugIdRuntimeSnippet=debugIdRuntimeSnippet,exports.injectDebugIdIntoJs=injectDebugIdIntoJs,exports.manifestBundlerSchema=manifestBundlerSchema,exports.readDebugIdFromJs=readDebugIdFromJs,exports.signSourceMapFile=signSourceMapFile,exports.signSourceMapUpload=signSourceMapUpload,exports.signSourceMapsRequest=signSourceMapsRequest,exports.signSourceMapsResponse=signSourceMapsResponse,exports.sourceMapManifestSchema=sourceMapManifestSchema,exports.sourceMapUploadSessionResponse=sourceMapUploadSessionResponse,exports.uploadSourceMapEntry=uploadSourceMapEntry,exports.uploadSourceMapsMetadata=uploadSourceMapsMetadata,exports.uploadSourceMapsResponse=uploadSourceMapsResponse;
|
|
@@ -126,6 +126,7 @@ export declare const sourceMapUploadSessionResponse: z.ZodObject<{
|
|
|
126
126
|
maxFiles: z.ZodNumber;
|
|
127
127
|
}, z.core.$strict>>;
|
|
128
128
|
expiresAt: z.ZodNumber;
|
|
129
|
+
uploadGrant: z.ZodOptional<z.ZodString>;
|
|
129
130
|
uploads: z.ZodArray<z.ZodObject<{
|
|
130
131
|
path: z.ZodString;
|
|
131
132
|
}, z.core.$strip>>;
|
|
@@ -126,6 +126,7 @@ export declare const sourceMapUploadSessionResponse: z.ZodObject<{
|
|
|
126
126
|
maxFiles: z.ZodNumber;
|
|
127
127
|
}, z.core.$strict>>;
|
|
128
128
|
expiresAt: z.ZodNumber;
|
|
129
|
+
uploadGrant: z.ZodOptional<z.ZodString>;
|
|
129
130
|
uploads: z.ZodArray<z.ZodObject<{
|
|
130
131
|
path: z.ZodString;
|
|
131
132
|
}, z.core.$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sourceMapBatchCapability}from"./source-map-upload-batch.mjs";import{z}from"zod";const manifestBundlerSchema=z.enum([`webpack`,`turbopack`,`rollup`,`tsc`]).meta({id:`ManifestBundler`,title:`ManifestBundler`}),sourceMapManifestEntrySchema=z.object({chunkUrl:z.string(),debugId:z.string(),mapHash:z.string(),objectKey:z.string()}),sourceMapManifestSchema=z.object({bundler:manifestBundlerSchema,createdAt:z.number(),files:z.array(sourceMapManifestEntrySchema),organizationId:z.string(),releaseSlug:z.string(),surfaceId:z.string()}),uploadSourceMapEntry=z.object({chunkUrl:z.string(),debugId:z.string(),hash:z.string(),path:z.string().min(1)}).meta({id:`UploadSourceMapEntry`,title:`UploadSourceMapEntry`}),uploadSourceMapsMetadata=z.object({bundler:manifestBundlerSchema,entries:z.array(uploadSourceMapEntry),sourceFileCount:z.number().int().nonnegative().optional()}).meta({description:`Metadata attached alongside uploaded source map files.`,id:`UploadSourceMapsMetadata`,title:`UploadSourceMapsMetadata`}),uploadSourceMapsResponse=z.object({fileCount:z.number().int().nonnegative(),message:z.string(),ok:z.boolean(),processed:z.number().int().nonnegative()}).meta({id:`UploadSourceMapsResponse`,title:`UploadSourceMapsResponse`}),signSourceMapFile=z.object({hasFile:z.boolean(),hasNames:z.boolean(),hasSourcesContent:z.boolean(),mappingsPresent:z.boolean(),path:z.string().min(1),sizeBytes:z.number().int().nonnegative()}).meta({id:`SignSourceMapFile`,title:`SignSourceMapFile`}),signSourceMapsRequest=z.object({files:z.array(signSourceMapFile)}).meta({description:`Initializes an upload session with the file inventory and declared sizes. Upload each file through the source-map endpoint using ordered byte offsets, then finalize the complete batch before the session expires.`,id:`SignSourceMapsRequest`,title:`SignSourceMapsRequest`}),signSourceMapUpload=z.object({objectKey:z.string(),path:z.string(),presignedUrl:z.string()}).meta({id:`SignSourceMapUpload`,title:`SignSourceMapUpload`}),signSourceMapsResponse=z.object({expiresAt:z.number().int(),uploads:z.array(signSourceMapUpload)}).meta({id:`SignSourceMapsResponse`,title:`SignSourceMapsResponse`}),sourceMapUploadSessionResponse=z.object({batchUpload:sourceMapBatchCapability.optional(),expiresAt:z.number().int(),uploads:z.array(z.object({path:z.string()}))}).meta({id:`SourceMapUploadSessionResponse`}),completeSourceMapFile=z.object({chunkUrl:z.string(),debugId:z.string(),hash:z.string(),path:z.string().min(1)}).meta({id:`CompleteSourceMapFile`,title:`CompleteSourceMapFile`}),completeSourceMapsRequest=z.object({bundler:manifestBundlerSchema,files:z.array(completeSourceMapFile),sourceFileCount:z.number().int().nonnegative().optional()}).meta({description:`Finalizes an upload session after all file chunks are durably accepted. Verifies the complete file inventory and schedules publication of the source-map manifest. Safe to retry.`,id:`CompleteSourceMapsRequest`,title:`CompleteSourceMapsRequest`}),completeSourceMapsResponse=z.object({fileCount:z.number().int().nonnegative(),ok:z.boolean()}).meta({id:`CompleteSourceMapsResponse`,title:`CompleteSourceMapsResponse`}),DEBUG_ID_RE=/^[a-fA-F0-9-]+$/u;function debugIdRuntimeSnippet(debugId){if(!DEBUG_ID_RE.test(debugId))throw Error(`debugId must be hex and dashes only, got: ${debugId}`);return`;!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._debugIds=e._debugIds||{},e._debugIds[n]="${debugId}")}catch(e){}}();`}const SOURCEMAPPING_RE=/\/\/[#@]\s*sourceMappingURL=\S+\s*$/u,SPEC_LAST_DEBUG_ID_RE=/\/\/# debugId=(?<id>[a-fA-F0-9-]+)(?![\s\S]*\/\/# debugId=)/mu,RUNTIME_DEBUG_ID_RE=/(?<prefix>_debugIds\[[^\]]*\]=")[a-fA-F0-9-]+(?<suffix>")/gu;function readDebugIdFromJs(content){return SPEC_LAST_DEBUG_ID_RE.exec(content)?.[1]??null}function injectDebugIdIntoJs(content,debugId){let snippet=debugIdRuntimeSnippet(debugId),debugIdComment=`//# debugId=${debugId}`;if(SPEC_LAST_DEBUG_ID_RE.test(content))return content.replace(SPEC_LAST_DEBUG_ID_RE,debugIdComment).replace(RUNTIME_DEBUG_ID_RE,`$1${debugId}$2`);let match=SOURCEMAPPING_RE.exec(content);return match?`${content.slice(0,match.index).trimEnd()}\n${snippet}\n${debugIdComment}\n${match[0]}`:`${content}\n${snippet}\n${debugIdComment}`}export{completeSourceMapFile,completeSourceMapsRequest,completeSourceMapsResponse,debugIdRuntimeSnippet,injectDebugIdIntoJs,manifestBundlerSchema,readDebugIdFromJs,signSourceMapFile,signSourceMapUpload,signSourceMapsRequest,signSourceMapsResponse,sourceMapManifestSchema,sourceMapUploadSessionResponse,uploadSourceMapEntry,uploadSourceMapsMetadata,uploadSourceMapsResponse};
|
|
1
|
+
import{sourceMapBatchCapability}from"./source-map-upload-batch.mjs";import{z}from"zod";const manifestBundlerSchema=z.enum([`webpack`,`turbopack`,`rollup`,`tsc`]).meta({id:`ManifestBundler`,title:`ManifestBundler`}),sourceMapManifestEntrySchema=z.object({chunkUrl:z.string(),debugId:z.string(),mapHash:z.string(),objectKey:z.string()}),sourceMapManifestSchema=z.object({bundler:manifestBundlerSchema,createdAt:z.number(),files:z.array(sourceMapManifestEntrySchema),organizationId:z.string(),releaseSlug:z.string(),surfaceId:z.string()}),uploadSourceMapEntry=z.object({chunkUrl:z.string(),debugId:z.string(),hash:z.string(),path:z.string().min(1)}).meta({id:`UploadSourceMapEntry`,title:`UploadSourceMapEntry`}),uploadSourceMapsMetadata=z.object({bundler:manifestBundlerSchema,entries:z.array(uploadSourceMapEntry),sourceFileCount:z.number().int().nonnegative().optional()}).meta({description:`Metadata attached alongside uploaded source map files.`,id:`UploadSourceMapsMetadata`,title:`UploadSourceMapsMetadata`}),uploadSourceMapsResponse=z.object({fileCount:z.number().int().nonnegative(),message:z.string(),ok:z.boolean(),processed:z.number().int().nonnegative()}).meta({id:`UploadSourceMapsResponse`,title:`UploadSourceMapsResponse`}),signSourceMapFile=z.object({hasFile:z.boolean(),hasNames:z.boolean(),hasSourcesContent:z.boolean(),mappingsPresent:z.boolean(),path:z.string().min(1),sizeBytes:z.number().int().nonnegative()}).meta({id:`SignSourceMapFile`,title:`SignSourceMapFile`}),signSourceMapsRequest=z.object({files:z.array(signSourceMapFile)}).meta({description:`Initializes an upload session with the file inventory and declared sizes. Upload each file through the source-map endpoint using ordered byte offsets, then finalize the complete batch before the session expires.`,id:`SignSourceMapsRequest`,title:`SignSourceMapsRequest`}),signSourceMapUpload=z.object({objectKey:z.string(),path:z.string(),presignedUrl:z.string()}).meta({id:`SignSourceMapUpload`,title:`SignSourceMapUpload`}),signSourceMapsResponse=z.object({expiresAt:z.number().int(),uploads:z.array(signSourceMapUpload)}).meta({id:`SignSourceMapsResponse`,title:`SignSourceMapsResponse`}),sourceMapUploadSessionResponse=z.object({batchUpload:sourceMapBatchCapability.optional(),expiresAt:z.number().int(),uploadGrant:z.string().optional().meta({description:`Opaque grant for this upload session. Send it as the X-Interfere-Upload-Grant header on chunk and batch uploads in place of the API key; it expires with the session.`}),uploads:z.array(z.object({path:z.string()}))}).meta({id:`SourceMapUploadSessionResponse`}),completeSourceMapFile=z.object({chunkUrl:z.string(),debugId:z.string(),hash:z.string(),path:z.string().min(1)}).meta({id:`CompleteSourceMapFile`,title:`CompleteSourceMapFile`}),completeSourceMapsRequest=z.object({bundler:manifestBundlerSchema,files:z.array(completeSourceMapFile),sourceFileCount:z.number().int().nonnegative().optional()}).meta({description:`Finalizes an upload session after all file chunks are durably accepted. Verifies the complete file inventory and schedules publication of the source-map manifest. Safe to retry.`,id:`CompleteSourceMapsRequest`,title:`CompleteSourceMapsRequest`}),completeSourceMapsResponse=z.object({fileCount:z.number().int().nonnegative(),ok:z.boolean()}).meta({id:`CompleteSourceMapsResponse`,title:`CompleteSourceMapsResponse`}),DEBUG_ID_RE=/^[a-fA-F0-9-]+$/u;function debugIdRuntimeSnippet(debugId){if(!DEBUG_ID_RE.test(debugId))throw Error(`debugId must be hex and dashes only, got: ${debugId}`);return`;!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._debugIds=e._debugIds||{},e._debugIds[n]="${debugId}")}catch(e){}}();`}const SOURCEMAPPING_RE=/\/\/[#@]\s*sourceMappingURL=\S+\s*$/u,SPEC_LAST_DEBUG_ID_RE=/\/\/# debugId=(?<id>[a-fA-F0-9-]+)(?![\s\S]*\/\/# debugId=)/mu,RUNTIME_DEBUG_ID_RE=/(?<prefix>_debugIds\[[^\]]*\]=")[a-fA-F0-9-]+(?<suffix>")/gu;function readDebugIdFromJs(content){return SPEC_LAST_DEBUG_ID_RE.exec(content)?.[1]??null}function injectDebugIdIntoJs(content,debugId){let snippet=debugIdRuntimeSnippet(debugId),debugIdComment=`//# debugId=${debugId}`;if(SPEC_LAST_DEBUG_ID_RE.test(content))return content.replace(SPEC_LAST_DEBUG_ID_RE,debugIdComment).replace(RUNTIME_DEBUG_ID_RE,`$1${debugId}$2`);let match=SOURCEMAPPING_RE.exec(content);return match?`${content.slice(0,match.index).trimEnd()}\n${snippet}\n${debugIdComment}\n${match[0]}`:`${content}\n${snippet}\n${debugIdComment}`}export{completeSourceMapFile,completeSourceMapsRequest,completeSourceMapsResponse,debugIdRuntimeSnippet,injectDebugIdIntoJs,manifestBundlerSchema,readDebugIdFromJs,signSourceMapFile,signSourceMapUpload,signSourceMapsRequest,signSourceMapsResponse,sourceMapManifestSchema,sourceMapUploadSessionResponse,uploadSourceMapEntry,uploadSourceMapsMetadata,uploadSourceMapsResponse};
|