@interfere/next 0.0.15-alpha.1 → 0.0.15-alpha.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.
- package/dist/build/release-program.d.mts +1 -1
- package/dist/build/release-program.d.mts.map +1 -1
- package/dist/build/source-maps/files.mjs +1 -1
- package/dist/build/source-maps/files.mjs.map +1 -1
- package/dist/client/provider.d.mts +2 -2
- package/dist/client/provider.d.mts.map +1 -1
- package/dist/client/provider.mjs +8 -4
- package/dist/client/provider.mjs.map +1 -1
- package/dist/server/services/config.service.d.mts +3 -3
- package/dist/server/services/error-tracking.service.d.mts +3 -3
- package/package.json +1 -1
|
@@ -14,6 +14,6 @@ declare const releaseProgram: Effect.Effect<unknown, unknown, unknown>;
|
|
|
14
14
|
/**
|
|
15
15
|
* Create the layer stack for the release program
|
|
16
16
|
*/
|
|
17
|
-
declare const createReleaseLayers: (config: PreflightConfig) => Layer.Layer<
|
|
17
|
+
declare const createReleaseLayers: (config: PreflightConfig) => Layer.Layer<ConfigService | SourceMapService | ReleaseIdentityService, never, never>;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { createReleaseLayers, releaseProgram };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-program.d.mts","names":[],"sources":["../../src/build/release-program.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAuBA;AA6IA;AAA4C,cA7I/B,cA6I+B,EA7IjB,MAAA,CAAA,MA6IiB,CAAA,OAAA,EAAA,OAAA,EAAA,OAAA,CAAA;;;;AAAe,cAA9C,mBAA8C,EAAA,CAAA,MAAA,EAAf,eAAe,EAAA,GAAA,KAAA,CAAA,KAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"release-program.d.mts","names":[],"sources":["../../src/build/release-program.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAuBA;AA6IA;AAA4C,cA7I/B,cA6I+B,EA7IjB,MAAA,CAAA,MA6IiB,CAAA,OAAA,EAAA,OAAA,EAAA,OAAA,CAAA;;;;AAAe,cAA9C,mBAA8C,EAAA,CAAA,MAAA,EAAf,eAAe,EAAA,GAAA,KAAA,CAAA,KAAA,CAAA,aAAA,GAAA,gBAAA,GAAA,sBAAA,EAAA,KAAA,EAAA,KAAA,CAAA"}
|
|
@@ -105,7 +105,7 @@ function findGeneratedJsFiles() {
|
|
|
105
105
|
}
|
|
106
106
|
/**
|
|
107
107
|
* Regex to extract sourceMappingURL from JS files
|
|
108
|
-
* Matches: //# sourceMappingURL=filename.js.map or //@ sourceMappingURL=filename.js.map
|
|
108
|
+
* Matches: //# sourceMappingURL = filename.js.map or //@ sourceMappingURL = filename.js.map
|
|
109
109
|
*/
|
|
110
110
|
const SOURCE_MAPPING_URL_REGEX = /\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/gm;
|
|
111
111
|
const HTTP_PREFIX_REGEX = /^https?:\/\//i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.mjs","names":["mapping: Record<string, string>"],"sources":["../../../src/build/source-maps/files.ts"],"sourcesContent":["import { readFile, unlink } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { Effect } from \"effect\";\nimport { glob } from \"glob\";\nimport { appendBuildLogLine } from \"../logger.js\";\nimport {\n FileDeleteError,\n FileGlobError,\n FileHashError,\n FileReadError,\n} from \"./errors.js\";\n\nconst SOURCE_MAP_GLOB = \".next/**/*.js.map\";\nconst JS_GLOB = \".next/**/*.js\";\n\nasync function hashString(content: string) {\n const crypto = await import(\"crypto\");\n\n return crypto.createHash(\"sha256\").update(content).digest(\"hex\");\n}\n\nexport function findSourceMapFiles() {\n return Effect.tryPromise({\n try: () =>\n glob(SOURCE_MAP_GLOB, {\n cwd: process.cwd(),\n absolute: true,\n }),\n catch: (error) => new FileGlobError({\n message: `Failed to find source map files: ${String(error)}`,\n pattern: SOURCE_MAP_GLOB,\n }),\n });\n}\n\nexport function readSourceMapsFromFiles(paths: string[]) {\n return Effect.forEach(\n paths,\n (filePath) =>\n Effect.gen(function* () {\n const content = yield* Effect.tryPromise({\n try: () => readFile(filePath, \"utf8\"),\n catch: (error) => new FileReadError({\n message: `Failed to read file: ${String(error)}`,\n path: filePath,\n }),\n });\n\n const hash = yield* Effect.tryPromise({\n try: () => hashString(content),\n catch: (error) => new FileHashError({\n message: `Failed to hash file: ${String(error)}`,\n path: filePath,\n }),\n });\n\n const relativePath = path.relative(process.cwd(), filePath).replace(\n /\\\\/g,\n \"/\"\n );\n\n return {\n relativePath: toPublicUrlPath(relativePath),\n content,\n hash,\n };\n }),\n { concurrency: \"unbounded\" }\n );\n}\n\nexport function cleanupSourceMaps(paths: string[], debug: boolean) {\n if (paths.length === 0) {\n return Effect.void;\n }\n\n return Effect.gen(function* () {\n const results = yield* Effect.forEach(\n paths,\n (filePath) =>\n Effect.tryPromise({\n try: () => unlink(filePath),\n catch: (error) => new FileDeleteError({\n message: `Failed to delete file: ${String(error)}`,\n path: filePath,\n }),\n }).pipe(\n Effect.map(() => ({ file: filePath, success: true })),\n Effect.catchAll((error) =>\n debug\n ? Effect.gen(function* () {\n yield* appendBuildLogLine(\n `Failed to delete source map file ${JSON.stringify({\n file: filePath,\n error: error.message,\n })}`\n );\n\n return { file: filePath, success: false };\n })\n : Effect.succeed({ file: filePath, success: false })\n )\n ),\n { concurrency: \"unbounded\" }\n );\n\n const successful = results.filter((result) => result.success).length;\n const failed = results.length - successful;\n\n if (successful > 0) {\n yield* appendBuildLogLine(\n `Cleaned ${successful}/${paths.length} source map files`\n );\n }\n\n if (failed > 0 && debug) {\n return yield* Effect.fail(new FileDeleteError({\n message: `Failed to clean up ${failed} source map files - Failing the build to avoid leaking source maps to the public`,\n path: \"multiple files\",\n }));\n }\n });\n}\n\nexport function maybeCleanupAfterFailure(debug: boolean) {\n return Effect.gen(function* () {\n const files = yield* findSourceMapFiles();\n\n if (files.length === 0) {\n return;\n }\n\n yield* cleanupSourceMaps(files, debug);\n });\n}\n\n/**\n * Find all generated JavaScript files (excluding source maps)\n */\nexport function findGeneratedJsFiles() {\n return Effect.tryPromise({\n try: () =>\n glob(JS_GLOB, {\n cwd: process.cwd(),\n absolute: true,\n ignore: [\"**/*.map\"], // Exclude source map files\n }),\n catch: (error) => new FileGlobError({\n message: `Failed to find generated JS files: ${String(error)}`,\n pattern: JS_GLOB,\n }),\n });\n}\n\n/**\n * Regex to extract sourceMappingURL from JS files\n * Matches: //# sourceMappingURL=filename.js.map or //@ sourceMappingURL=filename.js.map\n */\nconst SOURCE_MAPPING_URL_REGEX = /\\/\\/[#@] ?sourceMappingURL=([^\\s'\"]+)\\s*$/gm;\n\nconst HTTP_PREFIX_REGEX = /^https?:\\/\\//i;\n\nfunction removeQueryString(value: string): string {\n const queryIndex = value.indexOf(\"?\");\n return queryIndex === -1 ? value : value.slice(0, queryIndex);\n}\n\nfunction normalizeReferenceSlashes(value: string): string {\n return value.replace(/\\\\/g, \"/\");\n}\n\n/**\n * Normalize an absolute reference to the public URL path format.\n * Next.js serves .next/ directory as _next/ in URLs, so we store paths\n * in the _next/ format to match what appears in error stack traces.\n */\nfunction normalizeAbsoluteReference(value: string): string {\n const normalized = normalizeReferenceSlashes(value);\n const trimmed = normalized.replace(/^\\/+/, \"\");\n\n // If it already has _next/, extract from there (handles CDN prefixes like /prod/_next/)\n const publicIndex = trimmed.indexOf(\"_next/\");\n if (publicIndex !== -1) {\n return trimmed.slice(publicIndex);\n }\n\n // Convert .next/ build path to _next/ public URL path\n const buildIndex = trimmed.indexOf(\".next/\");\n if (buildIndex !== -1) {\n return `_next/${trimmed.slice(buildIndex + \".next/\".length)}`;\n }\n\n return trimmed;\n}\n\n/**\n * Extract sourceMappingURL reference from JS file content\n */\nfunction extractSourceMappingReference(content: string): string | null {\n SOURCE_MAPPING_URL_REGEX.lastIndex = 0;\n const match = SOURCE_MAPPING_URL_REGEX.exec(content);\n if (match && match[1]) {\n return match[1].trim();\n }\n return null;\n}\n\nfunction resolveSourceMapRelativePath(\n jsRelativePath: string,\n reference: string\n): string | null {\n if (!reference) {\n return null;\n }\n\n const withoutQuery = removeQueryString(reference);\n if (!withoutQuery) {\n return null;\n }\n\n const normalizedReference = normalizeReferenceSlashes(withoutQuery);\n\n if (HTTP_PREFIX_REGEX.test(normalizedReference)) {\n try {\n const url = new URL(normalizedReference);\n return normalizeAbsoluteReference(url.pathname);\n } catch {\n return normalizeAbsoluteReference(normalizedReference);\n }\n }\n\n if (normalizedReference.startsWith(\"/\")) {\n return normalizeAbsoluteReference(normalizedReference);\n }\n\n const jsDirectory = path.posix.dirname(jsRelativePath);\n const resolved = path.posix.normalize(\n path.posix.join(jsDirectory, normalizedReference)\n );\n\n return toPublicUrlPath(normalizeReferenceSlashes(resolved));\n}\n\n// Regex to convert .next/ build paths to _next/ public URL paths\nconst NEXT_BUILD_TO_PUBLIC_REGEX = /^\\.next\\//;\n\n/**\n * Convert a build path to a public URL path.\n * Next.js serves .next/ directory as _next/ in URLs.\n * So on our backend we store it as the public URL path since that's what appears in error stack traces.\n */\nfunction toPublicUrlPath(buildPath: string): string {\n return buildPath.replace(NEXT_BUILD_TO_PUBLIC_REGEX, \"_next/\");\n}\n\n/**\n * Read generated JS files and extract sourceMappingURL to build a mapping.\n * Returns a map: sourceMapFilename -> generatedJsFilePath\n * \n * Both keys and values are in public URL format (_next/...) to match\n * what appears in error stack traces, making the backend framework-agnostic.\n */\nexport function buildSourceMapToGeneratedMapping(paths: string[]) {\n return Effect.forEach(\n paths,\n (filePath) =>\n Effect.gen(function* () {\n const content = yield* Effect.tryPromise({\n try: () => readFile(filePath, \"utf8\"),\n catch: (error) => new FileReadError({\n message: `Failed to read file: ${String(error)}`,\n path: filePath,\n }),\n });\n\n const relativePath = path\n .relative(process.cwd(), filePath)\n .replace(/\\\\/g, \"/\");\n\n const sourceMapReference = extractSourceMappingReference(content);\n const sourceMapRelativePath = sourceMapReference\n ? resolveSourceMapRelativePath(relativePath, sourceMapReference)\n : null;\n\n return {\n // Convert .next/ to _next/ for public URL format\n generatedFilePath: toPublicUrlPath(relativePath),\n sourceMapRelativePath,\n };\n }),\n { concurrency: \"unbounded\" }\n ).pipe(\n Effect.map((results) => {\n // Build reverse mapping: sourceMapRelativePath -> generatedFilePath\n const mapping: Record<string, string> = {};\n for (const result of results) {\n if (result.sourceMapRelativePath) {\n mapping[result.sourceMapRelativePath] = result.generatedFilePath;\n }\n }\n return mapping;\n })\n );\n}\n\n/**\n * Read generated JS files from disk\n * @deprecated Use buildSourceMapToGeneratedMapping instead - we no longer upload JS files\n */\nexport function readGeneratedJsFiles(paths: string[]) {\n return Effect.forEach(\n paths,\n (filePath) =>\n Effect.gen(function* () {\n const content = yield* Effect.tryPromise({\n try: () => readFile(filePath, \"utf8\"),\n catch: (error) => new FileReadError({\n message: `Failed to read file: ${String(error)}`,\n path: filePath,\n }),\n });\n\n const hash = yield* Effect.tryPromise({\n try: () => hashString(content),\n catch: (error) => new FileHashError({\n message: `Failed to hash file: ${String(error)}`,\n path: filePath,\n }),\n });\n\n const relativePath = path\n .relative(process.cwd(), filePath)\n .replace(/\\\\/g, \"/\");\n\n return {\n relativePath,\n content,\n hash,\n };\n }),\n { concurrency: \"unbounded\" }\n );\n}\n\n\n\n\n"],"mappings":";;;;;;;;AAYA,MAAM,kBAAkB;AACxB,MAAM,UAAU;AAEhB,eAAe,WAAW,SAAiB;AAGzC,SAFe,MAAM,OAAO,WAEd,WAAW,SAAS,CAAC,OAAO,QAAQ,CAAC,OAAO,MAAM;;AAGlE,SAAgB,qBAAqB;AACnC,QAAO,OAAO,WAAW;EACvB,WACE,KAAK,iBAAiB;GACpB,KAAK,QAAQ,KAAK;GAClB,UAAU;GACX,CAAC;EACJ,QAAQ,UAAU,IAAI,cAAc;GAClC,SAAS,oCAAoC,OAAO,MAAM;GAC1D,SAAS;GACV,CAAC;EACH,CAAC;;AAGJ,SAAgB,wBAAwB,OAAiB;AACvD,QAAO,OAAO,QACZ,QACC,aACC,OAAO,IAAI,aAAa;EACtB,MAAM,UAAU,OAAO,OAAO,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T,SAAQ,OAAO,yBAAyB,OAAO;AAGnD,SAAO;GACP,CACH;;;;;;AAOH,SAAgB,qBAAqB,OAAiB;AACpD,QAAO,OAAO,QACZ,QACC,aACC,OAAO,IAAI,aAAa;EACtB,MAAM,UAAU,OAAO,OAAO,WAAW;GACvC,WAAW,SAAS,UAAU,OAAO;GACrC,QAAQ,UAAU,IAAI,cAAc;IAClC,SAAS,wBAAwB,OAAO,MAAM;IAC9C,MAAM;IACP,CAAC;GACH,CAAC;EAEF,MAAM,OAAO,OAAO,OAAO,WAAW;GACpC,WAAW,WAAW,QAAQ;GAC9B,QAAQ,UAAU,IAAI,cAAc;IAClC,SAAS,wBAAwB,OAAO,MAAM;IAC9C,MAAM;IACP,CAAC;GACH,CAAC;AAMF,SAAO;GACL,cALmB,KAClB,SAAS,QAAQ,KAAK,EAAE,SAAS,CACjC,QAAQ,OAAO,IAAI;GAIpB;GACA;GACD;GACD,EACJ,EAAE,aAAa,aAAa,CAC7B"}
|
|
1
|
+
{"version":3,"file":"files.mjs","names":["mapping: Record<string, string>"],"sources":["../../../src/build/source-maps/files.ts"],"sourcesContent":["import { readFile, unlink } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { Effect } from \"effect\";\nimport { glob } from \"glob\";\nimport { appendBuildLogLine } from \"../logger.js\";\nimport {\n FileDeleteError,\n FileGlobError,\n FileHashError,\n FileReadError,\n} from \"./errors.js\";\n\nconst SOURCE_MAP_GLOB = \".next/**/*.js.map\";\nconst JS_GLOB = \".next/**/*.js\";\n\nasync function hashString(content: string) {\n const crypto = await import(\"crypto\");\n\n return crypto.createHash(\"sha256\").update(content).digest(\"hex\");\n}\n\nexport function findSourceMapFiles() {\n return Effect.tryPromise({\n try: () =>\n glob(SOURCE_MAP_GLOB, {\n cwd: process.cwd(),\n absolute: true,\n }),\n catch: (error) => new FileGlobError({\n message: `Failed to find source map files: ${String(error)}`,\n pattern: SOURCE_MAP_GLOB,\n }),\n });\n}\n\nexport function readSourceMapsFromFiles(paths: string[]) {\n return Effect.forEach(\n paths,\n (filePath) =>\n Effect.gen(function* () {\n const content = yield* Effect.tryPromise({\n try: () => readFile(filePath, \"utf8\"),\n catch: (error) => new FileReadError({\n message: `Failed to read file: ${String(error)}`,\n path: filePath,\n }),\n });\n\n const hash = yield* Effect.tryPromise({\n try: () => hashString(content),\n catch: (error) => new FileHashError({\n message: `Failed to hash file: ${String(error)}`,\n path: filePath,\n }),\n });\n\n const relativePath = path.relative(process.cwd(), filePath).replace(\n /\\\\/g,\n \"/\"\n );\n\n return {\n relativePath: toPublicUrlPath(relativePath),\n content,\n hash,\n };\n }),\n { concurrency: \"unbounded\" }\n );\n}\n\nexport function cleanupSourceMaps(paths: string[], debug: boolean) {\n if (paths.length === 0) {\n return Effect.void;\n }\n\n return Effect.gen(function* () {\n const results = yield* Effect.forEach(\n paths,\n (filePath) =>\n Effect.tryPromise({\n try: () => unlink(filePath),\n catch: (error) => new FileDeleteError({\n message: `Failed to delete file: ${String(error)}`,\n path: filePath,\n }),\n }).pipe(\n Effect.map(() => ({ file: filePath, success: true })),\n Effect.catchAll((error) =>\n debug\n ? Effect.gen(function* () {\n yield* appendBuildLogLine(\n `Failed to delete source map file ${JSON.stringify({\n file: filePath,\n error: error.message,\n })}`\n );\n\n return { file: filePath, success: false };\n })\n : Effect.succeed({ file: filePath, success: false })\n )\n ),\n { concurrency: \"unbounded\" }\n );\n\n const successful = results.filter((result) => result.success).length;\n const failed = results.length - successful;\n\n if (successful > 0) {\n yield* appendBuildLogLine(\n `Cleaned ${successful}/${paths.length} source map files`\n );\n }\n\n if (failed > 0 && debug) {\n return yield* Effect.fail(new FileDeleteError({\n message: `Failed to clean up ${failed} source map files - Failing the build to avoid leaking source maps to the public`,\n path: \"multiple files\",\n }));\n }\n });\n}\n\nexport function maybeCleanupAfterFailure(debug: boolean) {\n return Effect.gen(function* () {\n const files = yield* findSourceMapFiles();\n\n if (files.length === 0) {\n return;\n }\n\n yield* cleanupSourceMaps(files, debug);\n });\n}\n\n/**\n * Find all generated JavaScript files (excluding source maps)\n */\nexport function findGeneratedJsFiles() {\n return Effect.tryPromise({\n try: () =>\n glob(JS_GLOB, {\n cwd: process.cwd(),\n absolute: true,\n ignore: [\"**/*.map\"], // Exclude source map files\n }),\n catch: (error) => new FileGlobError({\n message: `Failed to find generated JS files: ${String(error)}`,\n pattern: JS_GLOB,\n }),\n });\n}\n\n/**\n * Regex to extract sourceMappingURL from JS files\n * Matches: //# sourceMappingURL = filename.js.map or //@ sourceMappingURL = filename.js.map\n */\nconst SOURCE_MAPPING_URL_REGEX = /\\/\\/[#@] ?sourceMappingURL=([^\\s'\"]+)\\s*$/gm;\n\nconst HTTP_PREFIX_REGEX = /^https?:\\/\\//i;\n\nfunction removeQueryString(value: string): string {\n const queryIndex = value.indexOf(\"?\");\n return queryIndex === -1 ? value : value.slice(0, queryIndex);\n}\n\nfunction normalizeReferenceSlashes(value: string): string {\n return value.replace(/\\\\/g, \"/\");\n}\n\n/**\n * Normalize an absolute reference to the public URL path format.\n * Next.js serves .next/ directory as _next/ in URLs, so we store paths\n * in the _next/ format to match what appears in error stack traces.\n */\nfunction normalizeAbsoluteReference(value: string): string {\n const normalized = normalizeReferenceSlashes(value);\n const trimmed = normalized.replace(/^\\/+/, \"\");\n\n // If it already has _next/, extract from there (handles CDN prefixes like /prod/_next/)\n const publicIndex = trimmed.indexOf(\"_next/\");\n if (publicIndex !== -1) {\n return trimmed.slice(publicIndex);\n }\n\n // Convert .next/ build path to _next/ public URL path\n const buildIndex = trimmed.indexOf(\".next/\");\n if (buildIndex !== -1) {\n return `_next/${trimmed.slice(buildIndex + \".next/\".length)}`;\n }\n\n return trimmed;\n}\n\n/**\n * Extract sourceMappingURL reference from JS file content\n */\nfunction extractSourceMappingReference(content: string): string | null {\n SOURCE_MAPPING_URL_REGEX.lastIndex = 0;\n const match = SOURCE_MAPPING_URL_REGEX.exec(content);\n if (match && match[1]) {\n return match[1].trim();\n }\n return null;\n}\n\nfunction resolveSourceMapRelativePath(\n jsRelativePath: string,\n reference: string\n): string | null {\n if (!reference) {\n return null;\n }\n\n const withoutQuery = removeQueryString(reference);\n if (!withoutQuery) {\n return null;\n }\n\n const normalizedReference = normalizeReferenceSlashes(withoutQuery);\n\n if (HTTP_PREFIX_REGEX.test(normalizedReference)) {\n try {\n const url = new URL(normalizedReference);\n return normalizeAbsoluteReference(url.pathname);\n } catch {\n return normalizeAbsoluteReference(normalizedReference);\n }\n }\n\n if (normalizedReference.startsWith(\"/\")) {\n return normalizeAbsoluteReference(normalizedReference);\n }\n\n const jsDirectory = path.posix.dirname(jsRelativePath);\n const resolved = path.posix.normalize(\n path.posix.join(jsDirectory, normalizedReference)\n );\n\n return toPublicUrlPath(normalizeReferenceSlashes(resolved));\n}\n\n// Regex to convert .next/ build paths to _next/ public URL paths\nconst NEXT_BUILD_TO_PUBLIC_REGEX = /^\\.next\\//;\n\n/**\n * Convert a build path to a public URL path.\n * Next.js serves .next/ directory as _next/ in URLs.\n * So on our backend we store it as the public URL path since that's what appears in error stack traces.\n */\nfunction toPublicUrlPath(buildPath: string): string {\n return buildPath.replace(NEXT_BUILD_TO_PUBLIC_REGEX, \"_next/\");\n}\n\n/**\n * Read generated JS files and extract sourceMappingURL to build a mapping.\n * Returns a map: sourceMapFilename -> generatedJsFilePath\n * \n * Both keys and values are in public URL format (_next/...) to match\n * what appears in error stack traces, making the backend framework-agnostic.\n */\nexport function buildSourceMapToGeneratedMapping(paths: string[]) {\n return Effect.forEach(\n paths,\n (filePath) =>\n Effect.gen(function* () {\n const content = yield* Effect.tryPromise({\n try: () => readFile(filePath, \"utf8\"),\n catch: (error) => new FileReadError({\n message: `Failed to read file: ${String(error)}`,\n path: filePath,\n }),\n });\n\n const relativePath = path\n .relative(process.cwd(), filePath)\n .replace(/\\\\/g, \"/\");\n\n const sourceMapReference = extractSourceMappingReference(content);\n const sourceMapRelativePath = sourceMapReference\n ? resolveSourceMapRelativePath(relativePath, sourceMapReference)\n : null;\n\n return {\n // Convert .next/ to _next/ for public URL format\n generatedFilePath: toPublicUrlPath(relativePath),\n sourceMapRelativePath,\n };\n }),\n { concurrency: \"unbounded\" }\n ).pipe(\n Effect.map((results) => {\n // Build reverse mapping: sourceMapRelativePath -> generatedFilePath\n const mapping: Record<string, string> = {};\n for (const result of results) {\n if (result.sourceMapRelativePath) {\n mapping[result.sourceMapRelativePath] = result.generatedFilePath;\n }\n }\n return mapping;\n })\n );\n}\n\n/**\n * Read generated JS files from disk\n * @deprecated Use buildSourceMapToGeneratedMapping instead - we no longer upload JS files\n */\nexport function readGeneratedJsFiles(paths: string[]) {\n return Effect.forEach(\n paths,\n (filePath) =>\n Effect.gen(function* () {\n const content = yield* Effect.tryPromise({\n try: () => readFile(filePath, \"utf8\"),\n catch: (error) => new FileReadError({\n message: `Failed to read file: ${String(error)}`,\n path: filePath,\n }),\n });\n\n const hash = yield* Effect.tryPromise({\n try: () => hashString(content),\n catch: (error) => new FileHashError({\n message: `Failed to hash file: ${String(error)}`,\n path: filePath,\n }),\n });\n\n const relativePath = path\n .relative(process.cwd(), filePath)\n .replace(/\\\\/g, \"/\");\n\n return {\n relativePath,\n content,\n hash,\n };\n }),\n { concurrency: \"unbounded\" }\n );\n}\n\n\n\n\n"],"mappings":";;;;;;;;AAYA,MAAM,kBAAkB;AACxB,MAAM,UAAU;AAEhB,eAAe,WAAW,SAAiB;AAGzC,SAFe,MAAM,OAAO,WAEd,WAAW,SAAS,CAAC,OAAO,QAAQ,CAAC,OAAO,MAAM;;AAGlE,SAAgB,qBAAqB;AACnC,QAAO,OAAO,WAAW;EACvB,WACE,KAAK,iBAAiB;GACpB,KAAK,QAAQ,KAAK;GAClB,UAAU;GACX,CAAC;EACJ,QAAQ,UAAU,IAAI,cAAc;GAClC,SAAS,oCAAoC,OAAO,MAAM;GAC1D,SAAS;GACV,CAAC;EACH,CAAC;;AAGJ,SAAgB,wBAAwB,OAAiB;AACvD,QAAO,OAAO,QACZ,QACC,aACC,OAAO,IAAI,aAAa;EAC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UAAU,QACnB,KAAI,OAAO,sBACT,SAAQ,OAAO,yBAAyB,OAAO;AAGnD,SAAO;GACP,CACH;;;;;;AAOH,SAAgB,qBAAqB,OAAiB;AACpD,QAAO,OAAO,QACZ,QACC,aACC,OAAO,IAAI,aAAa;EACtB,MAAM,UAAU,OAAO,OAAO,WAAW;GACvC,WAAW,SAAS,UAAU,OAAO;GACrC,QAAQ,UAAU,IAAI,cAAc;IAClC,SAAS,wBAAwB,OAAO,MAAM;IAC9C,MAAM;IACP,CAAC;GACH,CAAC;EAEF,MAAM,OAAO,OAAO,OAAO,WAAW;GACpC,WAAW,WAAW,QAAQ;GAC9B,QAAQ,UAAU,IAAI,cAAc;IAClC,SAAS,wBAAwB,OAAO,MAAM;IAC9C,MAAM;IACP,CAAC;GACH,CAAC;AAMF,SAAO;GACL,cALmB,KAClB,SAAS,QAAQ,KAAK,EAAE,SAAS,CACjC,QAAQ,OAAO,IAAI;GAIpB;GACA;GACD;GACD,EACJ,EAAE,aAAa,aAAa,CAC7B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InterfereProviderProps } from "@interfere/react/provider";
|
|
2
2
|
import { ConfigInput } from "@interfere/types/sdk/config";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/client/provider.d.ts
|
|
6
6
|
interface NextConfigInput {
|
|
@@ -17,6 +17,6 @@ declare function InterfereProvider({
|
|
|
17
17
|
...rest
|
|
18
18
|
}: Omit<InterfereProviderProps, "config"> & {
|
|
19
19
|
config?: NextConfigInput;
|
|
20
|
-
}):
|
|
20
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { InterfereProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.mts","names":[],"sources":["../../src/client/provider.tsx"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"provider.d.mts","names":[],"sources":["../../src/client/provider.tsx"],"sourcesContent":[],"mappings":";;;;;UAyBU,eAAA;aACG;aACA;EAFH,KAAA,CAAA,EAGA,WAHe,CAAA,OAAA,CAAA;EACZ,QAAA,CAAA,EAAA,MAAA;EACA,SAAA,CAAA,EAAA,MAAA;EACH,YAAA,CAAA,EAAA,MAAA;;AAgCM,iBAAA,iBAAA,CAAiB;EAAA,QAAA;EAAA,MAAA;EAAA,GAAA;CAAA,EAI9B,IAJ8B,CAIzB,sBAJyB,EAAA,QAAA,CAAA,GAAA;EAC/B,MAAA,CAAA,EAGqD,eAHrD;CACA,CAAA,EAEsE,kBAAA,CAAA,GAAA,CAAA,OAFtE"}
|
package/dist/client/provider.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
1
3
|
import { InterfereProvider as InterfereProvider$1 } from "@interfere/react/provider";
|
|
2
4
|
import { getRuntime } from "@interfere/react/core/runtime/config";
|
|
3
5
|
import { configSchema } from "@interfere/types/sdk/config";
|
|
4
6
|
import { envSchema } from "@interfere/types/sdk/runtime";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
8
|
|
|
6
9
|
//#region src/client/provider.tsx
|
|
7
10
|
const defaults = {
|
|
@@ -23,10 +26,11 @@ function mergeConfig(config) {
|
|
|
23
26
|
});
|
|
24
27
|
}
|
|
25
28
|
function InterfereProvider({ children, config = {}, ...rest }) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
return /* @__PURE__ */ jsx(InterfereProvider$1, {
|
|
30
|
+
config: mergeConfig(config),
|
|
31
|
+
...rest,
|
|
32
|
+
children
|
|
33
|
+
});
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.mjs","names":["defaults: ConfigInput[\"metadata\"]","InterfereProviderReact"],"sources":["../../src/client/provider.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"provider.mjs","names":["defaults: ConfigInput[\"metadata\"]","InterfereProviderReact"],"sources":["../../src/client/provider.tsx"],"sourcesContent":["\"use client\";\n\nimport { getRuntime } from \"@interfere/react/core/runtime/config\";\nimport {\n type InterfereProviderProps,\n InterfereProvider as InterfereProviderReact,\n} from \"@interfere/react/provider\";\nimport {\n type Config,\n type ConfigInput,\n configSchema,\n} from \"@interfere/types/sdk/config\";\nimport { envSchema } from \"@interfere/types/sdk/runtime\";\n\nconst defaults: ConfigInput[\"metadata\"] = {\n buildId: process.env.NEXT_PUBLIC_INTERFERE_BUILD_ID ?? null,\n releaseId: process.env.NEXT_PUBLIC_INTERFERE_RELEASE_ID ?? null,\n environment: process.env.NEXT_PUBLIC_INTERFERE_ENVIRONMENT\n ? envSchema.parse(process.env.NEXT_PUBLIC_INTERFERE_ENVIRONMENT)\n : \"production\",\n runtime: getRuntime(),\n};\n\n// Next.js-specific config type that allows omitting transport\n// because Next.js can provide its own proxy endpoint\ninterface NextConfigInput {\n features?: ConfigInput[\"features\"];\n metadata?: ConfigInput[\"metadata\"];\n batch?: ConfigInput[\"batch\"];\n proxyUrl?: string;\n ingestUrl?: string;\n surfaceToken?: string;\n}\n\nfunction mergeConfig(config: NextConfigInput): Config {\n const incomingMeta = config.metadata ?? {};\n\n // Determine transport config:\n // - If they explicitly set proxyUrl, use proxy mode\n // - If they set ingestUrl or surfaceToken, use direct mode (let schema validate)\n // - Otherwise, default to Next.js proxy\n const hasTransportConfig =\n typeof config.proxyUrl !== \"undefined\" ||\n typeof config.ingestUrl !== \"undefined\" ||\n typeof config.surfaceToken !== \"undefined\";\n\n const transportConfig = hasTransportConfig\n ? config\n : { proxyUrl: \"/api/interfere\" }; // Default Next.js proxy endpoint\n\n return configSchema.parse({\n ...transportConfig,\n ...config,\n metadata: {\n ...defaults,\n ...incomingMeta,\n },\n });\n}\n\nexport function InterfereProvider({\n children,\n config = {},\n ...rest\n}: Omit<InterfereProviderProps, \"config\"> & { config?: NextConfigInput }) {\n const mergedConfig = mergeConfig(config);\n\n return (\n <InterfereProviderReact config={mergedConfig} {...rest}>\n {children}\n </InterfereProviderReact>\n );\n}\n"],"mappings":";;;;;;;;;AAcA,MAAMA,WAAoC;CACxC,SAAS,QAAQ,IAAI,kCAAkC;CACvD,WAAW,QAAQ,IAAI,oCAAoC;CAC3D,aAAa,QAAQ,IAAI,oCACrB,UAAU,MAAM,QAAQ,IAAI,kCAAkC,GAC9D;CACJ,SAAS,YAAY;CACtB;AAaD,SAAS,YAAY,QAAiC;CACpD,MAAM,eAAe,OAAO,YAAY,EAAE;CAW1C,MAAM,kBAJJ,OAAO,OAAO,aAAa,eAC3B,OAAO,OAAO,cAAc,eAC5B,OAAO,OAAO,iBAAiB,cAG7B,SACA,EAAE,UAAU,kBAAkB;AAElC,QAAO,aAAa,MAAM;EACxB,GAAG;EACH,GAAG;EACH,UAAU;GACR,GAAG;GACH,GAAG;GACJ;EACF,CAAC;;AAGJ,SAAgB,kBAAkB,EAChC,UACA,SAAS,EAAE,EACX,GAAG,QACqE;AAGxE,QACE,oBAACC;EAAuB,QAHL,YAAY,OAAO;EAGQ,GAAI;EAC/C;GACsB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { NonEmptyString } from "../../lib/types.mjs";
|
|
2
2
|
import { Context, Effect, Layer } from "effect";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
3
|
+
import * as effect_Types16 from "effect/Types";
|
|
4
|
+
import * as effect_Cause16 from "effect/Cause";
|
|
5
5
|
|
|
6
6
|
//#region src/server/services/config.service.d.ts
|
|
7
|
-
declare const ConfigError_base: new <A extends Record<string, any> = {}>(args:
|
|
7
|
+
declare const ConfigError_base: new <A extends Record<string, any> = {}>(args: effect_Types16.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }) => effect_Cause16.YieldableError & {
|
|
8
8
|
readonly _tag: "ConfigError";
|
|
9
9
|
} & Readonly<A>;
|
|
10
10
|
declare class ConfigError extends ConfigError_base<{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ConfigService } from "./config.service.mjs";
|
|
2
2
|
import { Context, Effect, Layer } from "effect";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
3
|
+
import * as effect_Types15 from "effect/Types";
|
|
4
|
+
import * as effect_Cause15 from "effect/Cause";
|
|
5
5
|
|
|
6
6
|
//#region src/server/services/error-tracking.service.d.ts
|
|
7
|
-
declare const ErrorTrackingError_base: new <A extends Record<string, any> = {}>(args:
|
|
7
|
+
declare const ErrorTrackingError_base: new <A extends Record<string, any> = {}>(args: effect_Types15.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }) => effect_Cause15.YieldableError & {
|
|
8
8
|
readonly _tag: "ErrorTrackingError";
|
|
9
9
|
} & Readonly<A>;
|
|
10
10
|
declare class ErrorTrackingError extends ErrorTrackingError_base<{
|