@interfere/types 10.0.0-canary.5 → 10.0.0-canary.6
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`});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(),objectKey:zod.z.string(),mapHash:zod.z.string()}),sourceMapManifestSchema=zod.z.object({releaseSlug:zod.z.string(),surfaceId:zod.z.string(),organizationId:zod.z.string(),bundler:manifestBundlerSchema,createdAt:zod.z.number(),files:zod.z.array(sourceMapManifestEntrySchema)}),uploadSourceMapEntry=zod.z.object({path:zod.z.string().min(1),hash:zod.z.string(),debugId:zod.z.string(),chunkUrl:zod.z.string()}).meta({id:`UploadSourceMapEntry`,title:`UploadSourceMapEntry`}),uploadSourceMapsMetadata=zod.z.object({entries:zod.z.array(uploadSourceMapEntry),sourceFileCount:zod.z.number().int().nonnegative().optional(),bundler:manifestBundlerSchema}).meta({id:`UploadSourceMapsMetadata`,title:`UploadSourceMapsMetadata`,description:`Metadata attached alongside uploaded source map files.`}),uploadSourceMapsResponse=zod.z.object({ok:zod.z.boolean(),processed:zod.z.number().int().nonnegative(),message:zod.z.string(),fileCount:zod.z.number().int().nonnegative()}).meta({id:`UploadSourceMapsResponse`,title:`UploadSourceMapsResponse`}),signSourceMapFile=zod.z.object({path:zod.z.string().min(1),sizeBytes:zod.z.number().int().nonnegative(),hasSourcesContent:zod.z.boolean(),hasNames:zod.z.boolean(),hasFile:zod.z.boolean(),mappingsPresent:zod.z.boolean()}).meta({id:`SignSourceMapFile`,title:`SignSourceMapFile`}),signSourceMapsRequest=zod.z.object({files:zod.z.array(signSourceMapFile)}).meta({id:`SignSourceMapsRequest`,title:`SignSourceMapsRequest`,description:"Per-file metadata the SDK uses to obtain presigned PUT URLs. The server validates per-file size and total file count, then issues short-lived URLs scoped to the release's R2 prefix. The SDK uploads to R2 directly and follows up with a `complete` call to materialize the manifest."}),signSourceMapUpload=zod.z.object({path:zod.z.string(),objectKey:zod.z.string(),presignedUrl:zod.z.string()}).meta({id:`SignSourceMapUpload`,title:`SignSourceMapUpload`}),signSourceMapsResponse=zod.z.object({uploads:zod.z.array(signSourceMapUpload),expiresAt:zod.z.number().int()}).meta({id:`SignSourceMapsResponse`,title:`SignSourceMapsResponse`}),completeSourceMapFile=zod.z.object({path:zod.z.string().min(1),hash:zod.z.string(),debugId:zod.z.string(),chunkUrl:zod.z.string()}).meta({id:`CompleteSourceMapFile`,title:`CompleteSourceMapFile`}),completeSourceMapsRequest=zod.z.object({files:zod.z.array(completeSourceMapFile),sourceFileCount:zod.z.number().int().nonnegative().optional(),bundler:manifestBundlerSchema}).meta({id:`CompleteSourceMapsRequest`,title:`CompleteSourceMapsRequest`,description:"Finalizes a presigned-URL upload batch. Writes the source-map manifest and updates the release's `sourceMapCount` / `sourceFileCount`. Idempotent — safe to retry."}),completeSourceMapsResponse=zod.z.object({ok:zod.z.boolean(),fileCount:zod.z.number().int().nonnegative()}).meta({id:`CompleteSourceMapsResponse`,title:`CompleteSourceMapsResponse`});exports.completeSourceMapFile=completeSourceMapFile,exports.completeSourceMapsRequest=completeSourceMapsRequest,exports.completeSourceMapsResponse=completeSourceMapsResponse,exports.manifestBundlerSchema=manifestBundlerSchema,exports.signSourceMapFile=signSourceMapFile,exports.signSourceMapUpload=signSourceMapUpload,exports.signSourceMapsRequest=signSourceMapsRequest,exports.signSourceMapsResponse=signSourceMapsResponse,exports.sourceMapManifestSchema=sourceMapManifestSchema,exports.uploadSourceMapEntry=uploadSourceMapEntry,exports.uploadSourceMapsMetadata=uploadSourceMapsMetadata,exports.uploadSourceMapsResponse=uploadSourceMapsResponse;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});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(),objectKey:zod.z.string(),mapHash:zod.z.string()}),sourceMapManifestSchema=zod.z.object({releaseSlug:zod.z.string(),surfaceId:zod.z.string(),organizationId:zod.z.string(),bundler:manifestBundlerSchema,createdAt:zod.z.number(),files:zod.z.array(sourceMapManifestEntrySchema)}),uploadSourceMapEntry=zod.z.object({path:zod.z.string().min(1),hash:zod.z.string(),debugId:zod.z.string(),chunkUrl:zod.z.string()}).meta({id:`UploadSourceMapEntry`,title:`UploadSourceMapEntry`}),uploadSourceMapsMetadata=zod.z.object({entries:zod.z.array(uploadSourceMapEntry),sourceFileCount:zod.z.number().int().nonnegative().optional(),bundler:manifestBundlerSchema}).meta({id:`UploadSourceMapsMetadata`,title:`UploadSourceMapsMetadata`,description:`Metadata attached alongside uploaded source map files.`}),uploadSourceMapsResponse=zod.z.object({ok:zod.z.boolean(),processed:zod.z.number().int().nonnegative(),message:zod.z.string(),fileCount:zod.z.number().int().nonnegative()}).meta({id:`UploadSourceMapsResponse`,title:`UploadSourceMapsResponse`}),signSourceMapFile=zod.z.object({path:zod.z.string().min(1),sizeBytes:zod.z.number().int().nonnegative(),hasSourcesContent:zod.z.boolean(),hasNames:zod.z.boolean(),hasFile:zod.z.boolean(),mappingsPresent:zod.z.boolean()}).meta({id:`SignSourceMapFile`,title:`SignSourceMapFile`}),signSourceMapsRequest=zod.z.object({files:zod.z.array(signSourceMapFile)}).meta({id:`SignSourceMapsRequest`,title:`SignSourceMapsRequest`,description:"Per-file metadata the SDK uses to obtain presigned PUT URLs. The server validates per-file size and total file count, then issues short-lived URLs scoped to the release's R2 prefix. The SDK uploads to R2 directly and follows up with a `complete` call to materialize the manifest."}),signSourceMapUpload=zod.z.object({path:zod.z.string(),objectKey:zod.z.string(),presignedUrl:zod.z.string()}).meta({id:`SignSourceMapUpload`,title:`SignSourceMapUpload`}),signSourceMapsResponse=zod.z.object({uploads:zod.z.array(signSourceMapUpload),expiresAt:zod.z.number().int()}).meta({id:`SignSourceMapsResponse`,title:`SignSourceMapsResponse`}),completeSourceMapFile=zod.z.object({path:zod.z.string().min(1),hash:zod.z.string(),debugId:zod.z.string(),chunkUrl:zod.z.string()}).meta({id:`CompleteSourceMapFile`,title:`CompleteSourceMapFile`}),completeSourceMapsRequest=zod.z.object({files:zod.z.array(completeSourceMapFile),sourceFileCount:zod.z.number().int().nonnegative().optional(),bundler:manifestBundlerSchema}).meta({id:`CompleteSourceMapsRequest`,title:`CompleteSourceMapsRequest`,description:"Finalizes a presigned-URL upload batch. Writes the source-map manifest and updates the release's `sourceMapCount` / `sourceFileCount`. Idempotent — safe to retry."}),completeSourceMapsResponse=zod.z.object({ok:zod.z.boolean(),fileCount:zod.z.number().int().nonnegative()}).meta({id:`CompleteSourceMapsResponse`,title:`CompleteSourceMapsResponse`}),DEBUG_ID_RE=/^[a-fA-F0-9-]+$/;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*$/,SPEC_LAST_DEBUG_ID_RE=/\/\/# debugId=([a-fA-F0-9-]+)(?![\s\S]*\/\/# debugId=)/m,RUNTIME_DEBUG_ID_RE=/(_debugIds\[[^\]]*\]=")[a-fA-F0-9-]+(")/g;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.uploadSourceMapEntry=uploadSourceMapEntry,exports.uploadSourceMapsMetadata=uploadSourceMapsMetadata,exports.uploadSourceMapsResponse=uploadSourceMapsResponse;
|
|
@@ -146,5 +146,39 @@ declare const completeSourceMapsResponse: z.ZodObject<{
|
|
|
146
146
|
fileCount: z.ZodNumber;
|
|
147
147
|
}, z.core.$strip>;
|
|
148
148
|
type CompleteSourceMapsResponse = z.infer<typeof completeSourceMapsResponse>;
|
|
149
|
+
/**
|
|
150
|
+
* Self-registering snippet appended to a built JS chunk so the runtime
|
|
151
|
+
* can recover the chunk's `debugId` from a live `Error().stack`. Mirrors
|
|
152
|
+
* Sentry's `debugIdInjectionSnippet` but keys the global as `_debugIds`
|
|
153
|
+
* (the TC39 / turbopack-native name) so the SDK's reader picks up both
|
|
154
|
+
* our injected chunks and bundlers that emit the global natively.
|
|
155
|
+
*
|
|
156
|
+
* Appended (never prepended) so it lands past the source map's mapped
|
|
157
|
+
* region and cannot shift original line positions.
|
|
158
|
+
*/
|
|
159
|
+
declare function debugIdRuntimeSnippet(debugId: string): string;
|
|
160
|
+
/**
|
|
161
|
+
* Reads an existing `//# debugId=…` comment from the bundle source.
|
|
162
|
+
* Returns `null` when no debug ID comment is present — the caller is
|
|
163
|
+
* expected to generate and inject one.
|
|
164
|
+
*/
|
|
165
|
+
declare function readDebugIdFromJs(content: string): string | null;
|
|
166
|
+
/**
|
|
167
|
+
* Inserts a `//# debugId=…` comment plus the `_debugIds` runtime snippet
|
|
168
|
+
* into a built JS chunk. Idempotent: if a spec-compliant comment is
|
|
169
|
+
* already present (webpack 5.104+ with `SourceMapDevToolPlugin({ debugIds:
|
|
170
|
+
* true })`, turbopack with `experimental.turbopack.debugIds`, or any other
|
|
171
|
+
* tool) it is overwritten with the supplied debugId — and any of our own
|
|
172
|
+
* `_debugIds` runtime carriers are re-synced to the same id so the comment,
|
|
173
|
+
* the source map, and the runtime value can never drift apart.
|
|
174
|
+
*
|
|
175
|
+
* Otherwise the snippet and comment are appended just before the existing
|
|
176
|
+
* `//# sourceMappingURL=…` line so the browser still resolves the map.
|
|
177
|
+
* Shared by every bundler plugin so the injected wire format cannot drift.
|
|
178
|
+
*
|
|
179
|
+
* Throws (via {@link debugIdRuntimeSnippet}) on a non-hex/dashes id in every
|
|
180
|
+
* branch, so an unsanitized id can never reach the constructed output.
|
|
181
|
+
*/
|
|
182
|
+
declare function injectDebugIdIntoJs(content: string, debugId: string): string;
|
|
149
183
|
//#endregion
|
|
150
|
-
export { CompleteSourceMapsRequest, CompleteSourceMapsResponse, ManifestBundler, SignSourceMapsRequest, SignSourceMapsResponse, SourceMapManifest, UploadSourceMapEntry, UploadSourceMapsMetadata, UploadSourceMapsResponse, completeSourceMapFile, completeSourceMapsRequest, completeSourceMapsResponse, manifestBundlerSchema, signSourceMapFile, signSourceMapUpload, signSourceMapsRequest, signSourceMapsResponse, sourceMapManifestSchema, uploadSourceMapEntry, uploadSourceMapsMetadata, uploadSourceMapsResponse };
|
|
184
|
+
export { CompleteSourceMapsRequest, CompleteSourceMapsResponse, ManifestBundler, SignSourceMapsRequest, SignSourceMapsResponse, SourceMapManifest, UploadSourceMapEntry, UploadSourceMapsMetadata, UploadSourceMapsResponse, completeSourceMapFile, completeSourceMapsRequest, completeSourceMapsResponse, debugIdRuntimeSnippet, injectDebugIdIntoJs, manifestBundlerSchema, readDebugIdFromJs, signSourceMapFile, signSourceMapUpload, signSourceMapsRequest, signSourceMapsResponse, sourceMapManifestSchema, uploadSourceMapEntry, uploadSourceMapsMetadata, uploadSourceMapsResponse };
|
|
@@ -146,5 +146,39 @@ declare const completeSourceMapsResponse: z.ZodObject<{
|
|
|
146
146
|
fileCount: z.ZodNumber;
|
|
147
147
|
}, z.core.$strip>;
|
|
148
148
|
type CompleteSourceMapsResponse = z.infer<typeof completeSourceMapsResponse>;
|
|
149
|
+
/**
|
|
150
|
+
* Self-registering snippet appended to a built JS chunk so the runtime
|
|
151
|
+
* can recover the chunk's `debugId` from a live `Error().stack`. Mirrors
|
|
152
|
+
* Sentry's `debugIdInjectionSnippet` but keys the global as `_debugIds`
|
|
153
|
+
* (the TC39 / turbopack-native name) so the SDK's reader picks up both
|
|
154
|
+
* our injected chunks and bundlers that emit the global natively.
|
|
155
|
+
*
|
|
156
|
+
* Appended (never prepended) so it lands past the source map's mapped
|
|
157
|
+
* region and cannot shift original line positions.
|
|
158
|
+
*/
|
|
159
|
+
declare function debugIdRuntimeSnippet(debugId: string): string;
|
|
160
|
+
/**
|
|
161
|
+
* Reads an existing `//# debugId=…` comment from the bundle source.
|
|
162
|
+
* Returns `null` when no debug ID comment is present — the caller is
|
|
163
|
+
* expected to generate and inject one.
|
|
164
|
+
*/
|
|
165
|
+
declare function readDebugIdFromJs(content: string): string | null;
|
|
166
|
+
/**
|
|
167
|
+
* Inserts a `//# debugId=…` comment plus the `_debugIds` runtime snippet
|
|
168
|
+
* into a built JS chunk. Idempotent: if a spec-compliant comment is
|
|
169
|
+
* already present (webpack 5.104+ with `SourceMapDevToolPlugin({ debugIds:
|
|
170
|
+
* true })`, turbopack with `experimental.turbopack.debugIds`, or any other
|
|
171
|
+
* tool) it is overwritten with the supplied debugId — and any of our own
|
|
172
|
+
* `_debugIds` runtime carriers are re-synced to the same id so the comment,
|
|
173
|
+
* the source map, and the runtime value can never drift apart.
|
|
174
|
+
*
|
|
175
|
+
* Otherwise the snippet and comment are appended just before the existing
|
|
176
|
+
* `//# sourceMappingURL=…` line so the browser still resolves the map.
|
|
177
|
+
* Shared by every bundler plugin so the injected wire format cannot drift.
|
|
178
|
+
*
|
|
179
|
+
* Throws (via {@link debugIdRuntimeSnippet}) on a non-hex/dashes id in every
|
|
180
|
+
* branch, so an unsanitized id can never reach the constructed output.
|
|
181
|
+
*/
|
|
182
|
+
declare function injectDebugIdIntoJs(content: string, debugId: string): string;
|
|
149
183
|
//#endregion
|
|
150
|
-
export { CompleteSourceMapsRequest, CompleteSourceMapsResponse, ManifestBundler, SignSourceMapsRequest, SignSourceMapsResponse, SourceMapManifest, UploadSourceMapEntry, UploadSourceMapsMetadata, UploadSourceMapsResponse, completeSourceMapFile, completeSourceMapsRequest, completeSourceMapsResponse, manifestBundlerSchema, signSourceMapFile, signSourceMapUpload, signSourceMapsRequest, signSourceMapsResponse, sourceMapManifestSchema, uploadSourceMapEntry, uploadSourceMapsMetadata, uploadSourceMapsResponse };
|
|
184
|
+
export { CompleteSourceMapsRequest, CompleteSourceMapsResponse, ManifestBundler, SignSourceMapsRequest, SignSourceMapsResponse, SourceMapManifest, UploadSourceMapEntry, UploadSourceMapsMetadata, UploadSourceMapsResponse, completeSourceMapFile, completeSourceMapsRequest, completeSourceMapsResponse, debugIdRuntimeSnippet, injectDebugIdIntoJs, manifestBundlerSchema, readDebugIdFromJs, signSourceMapFile, signSourceMapUpload, signSourceMapsRequest, signSourceMapsResponse, sourceMapManifestSchema, uploadSourceMapEntry, uploadSourceMapsMetadata, uploadSourceMapsResponse };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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(),objectKey:z.string(),mapHash:z.string()}),sourceMapManifestSchema=z.object({releaseSlug:z.string(),surfaceId:z.string(),organizationId:z.string(),bundler:manifestBundlerSchema,createdAt:z.number(),files:z.array(sourceMapManifestEntrySchema)}),uploadSourceMapEntry=z.object({path:z.string().min(1),hash:z.string(),debugId:z.string(),chunkUrl:z.string()}).meta({id:`UploadSourceMapEntry`,title:`UploadSourceMapEntry`}),uploadSourceMapsMetadata=z.object({entries:z.array(uploadSourceMapEntry),sourceFileCount:z.number().int().nonnegative().optional(),bundler:manifestBundlerSchema}).meta({id:`UploadSourceMapsMetadata`,title:`UploadSourceMapsMetadata`,description:`Metadata attached alongside uploaded source map files.`}),uploadSourceMapsResponse=z.object({ok:z.boolean(),processed:z.number().int().nonnegative(),message:z.string(),fileCount:z.number().int().nonnegative()}).meta({id:`UploadSourceMapsResponse`,title:`UploadSourceMapsResponse`}),signSourceMapFile=z.object({path:z.string().min(1),sizeBytes:z.number().int().nonnegative(),hasSourcesContent:z.boolean(),hasNames:z.boolean(),hasFile:z.boolean(),mappingsPresent:z.boolean()}).meta({id:`SignSourceMapFile`,title:`SignSourceMapFile`}),signSourceMapsRequest=z.object({files:z.array(signSourceMapFile)}).meta({id:`SignSourceMapsRequest`,title:`SignSourceMapsRequest`,description:"Per-file metadata the SDK uses to obtain presigned PUT URLs. The server validates per-file size and total file count, then issues short-lived URLs scoped to the release's R2 prefix. The SDK uploads to R2 directly and follows up with a `complete` call to materialize the manifest."}),signSourceMapUpload=z.object({path:z.string(),objectKey:z.string(),presignedUrl:z.string()}).meta({id:`SignSourceMapUpload`,title:`SignSourceMapUpload`}),signSourceMapsResponse=z.object({uploads:z.array(signSourceMapUpload),expiresAt:z.number().int()}).meta({id:`SignSourceMapsResponse`,title:`SignSourceMapsResponse`}),completeSourceMapFile=z.object({path:z.string().min(1),hash:z.string(),debugId:z.string(),chunkUrl:z.string()}).meta({id:`CompleteSourceMapFile`,title:`CompleteSourceMapFile`}),completeSourceMapsRequest=z.object({files:z.array(completeSourceMapFile),sourceFileCount:z.number().int().nonnegative().optional(),bundler:manifestBundlerSchema}).meta({id:`CompleteSourceMapsRequest`,title:`CompleteSourceMapsRequest`,description:"Finalizes a presigned-URL upload batch. Writes the source-map manifest and updates the release's `sourceMapCount` / `sourceFileCount`. Idempotent — safe to retry."}),completeSourceMapsResponse=z.object({ok:z.boolean(),fileCount:z.number().int().nonnegative()}).meta({id:`CompleteSourceMapsResponse`,title:`CompleteSourceMapsResponse`});export{completeSourceMapFile,completeSourceMapsRequest,completeSourceMapsResponse,manifestBundlerSchema,signSourceMapFile,signSourceMapUpload,signSourceMapsRequest,signSourceMapsResponse,sourceMapManifestSchema,uploadSourceMapEntry,uploadSourceMapsMetadata,uploadSourceMapsResponse};
|
|
1
|
+
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(),objectKey:z.string(),mapHash:z.string()}),sourceMapManifestSchema=z.object({releaseSlug:z.string(),surfaceId:z.string(),organizationId:z.string(),bundler:manifestBundlerSchema,createdAt:z.number(),files:z.array(sourceMapManifestEntrySchema)}),uploadSourceMapEntry=z.object({path:z.string().min(1),hash:z.string(),debugId:z.string(),chunkUrl:z.string()}).meta({id:`UploadSourceMapEntry`,title:`UploadSourceMapEntry`}),uploadSourceMapsMetadata=z.object({entries:z.array(uploadSourceMapEntry),sourceFileCount:z.number().int().nonnegative().optional(),bundler:manifestBundlerSchema}).meta({id:`UploadSourceMapsMetadata`,title:`UploadSourceMapsMetadata`,description:`Metadata attached alongside uploaded source map files.`}),uploadSourceMapsResponse=z.object({ok:z.boolean(),processed:z.number().int().nonnegative(),message:z.string(),fileCount:z.number().int().nonnegative()}).meta({id:`UploadSourceMapsResponse`,title:`UploadSourceMapsResponse`}),signSourceMapFile=z.object({path:z.string().min(1),sizeBytes:z.number().int().nonnegative(),hasSourcesContent:z.boolean(),hasNames:z.boolean(),hasFile:z.boolean(),mappingsPresent:z.boolean()}).meta({id:`SignSourceMapFile`,title:`SignSourceMapFile`}),signSourceMapsRequest=z.object({files:z.array(signSourceMapFile)}).meta({id:`SignSourceMapsRequest`,title:`SignSourceMapsRequest`,description:"Per-file metadata the SDK uses to obtain presigned PUT URLs. The server validates per-file size and total file count, then issues short-lived URLs scoped to the release's R2 prefix. The SDK uploads to R2 directly and follows up with a `complete` call to materialize the manifest."}),signSourceMapUpload=z.object({path:z.string(),objectKey:z.string(),presignedUrl:z.string()}).meta({id:`SignSourceMapUpload`,title:`SignSourceMapUpload`}),signSourceMapsResponse=z.object({uploads:z.array(signSourceMapUpload),expiresAt:z.number().int()}).meta({id:`SignSourceMapsResponse`,title:`SignSourceMapsResponse`}),completeSourceMapFile=z.object({path:z.string().min(1),hash:z.string(),debugId:z.string(),chunkUrl:z.string()}).meta({id:`CompleteSourceMapFile`,title:`CompleteSourceMapFile`}),completeSourceMapsRequest=z.object({files:z.array(completeSourceMapFile),sourceFileCount:z.number().int().nonnegative().optional(),bundler:manifestBundlerSchema}).meta({id:`CompleteSourceMapsRequest`,title:`CompleteSourceMapsRequest`,description:"Finalizes a presigned-URL upload batch. Writes the source-map manifest and updates the release's `sourceMapCount` / `sourceFileCount`. Idempotent — safe to retry."}),completeSourceMapsResponse=z.object({ok:z.boolean(),fileCount:z.number().int().nonnegative()}).meta({id:`CompleteSourceMapsResponse`,title:`CompleteSourceMapsResponse`}),DEBUG_ID_RE=/^[a-fA-F0-9-]+$/;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*$/,SPEC_LAST_DEBUG_ID_RE=/\/\/# debugId=([a-fA-F0-9-]+)(?![\s\S]*\/\/# debugId=)/m,RUNTIME_DEBUG_ID_RE=/(_debugIds\[[^\]]*\]=")[a-fA-F0-9-]+(")/g;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,uploadSourceMapEntry,uploadSourceMapsMetadata,uploadSourceMapsResponse};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interfere/types",
|
|
3
|
-
"version": "10.0.0-canary.
|
|
3
|
+
"version": "10.0.0-canary.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "TypeScript & Zod types for Interfere",
|
|
6
6
|
"keywords": [
|
|
@@ -152,11 +152,11 @@
|
|
|
152
152
|
"zod": "^4.4.3"
|
|
153
153
|
},
|
|
154
154
|
"devDependencies": {
|
|
155
|
-
"@interfere/sdk": "^11.0.0-canary.
|
|
156
|
-
"@interfere/test-utils": "^9.0.1-canary.
|
|
157
|
-
"@interfere/typescript-config": "^9.0.1-canary.
|
|
158
|
-
"@types/node": "^26.
|
|
159
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
155
|
+
"@interfere/sdk": "^11.0.0-canary.6",
|
|
156
|
+
"@interfere/test-utils": "^9.0.1-canary.1",
|
|
157
|
+
"@interfere/typescript-config": "^9.0.1-canary.1",
|
|
158
|
+
"@types/node": "^26.1.0",
|
|
159
|
+
"@typescript/native-preview": "7.0.0-dev.20260701.1",
|
|
160
160
|
"@vitest/coverage-v8": "4.1.9",
|
|
161
161
|
"tsdown": "^0.22.2",
|
|
162
162
|
"vitest": "4.1.9"
|