@tamagui/static 3.0.0-beta.922.1 → 3.0.0
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/cjs/compilerHost.cjs +241 -75
- package/dist/cjs/exports.cjs +5 -1
- package/dist/cjs/extractor/bundle.cjs +3 -0
- package/dist/cjs/extractor/esbuildTsconfigPaths.cjs +81 -45
- package/dist/cjs/extractor/generateConfigMarkdown.cjs +492 -0
- package/dist/cjs/extractor/loadTamagui.cjs +28 -20
- package/dist/cjs/extractor/regenerateConfig.cjs +30 -20
- package/dist/cjs/zero/islands.cjs +2 -1
- package/dist/cjs/zero/theme.cjs +6 -3
- package/dist/esm/compilerHost.mjs +242 -76
- package/dist/esm/compilerHost.mjs.map +1 -1
- package/dist/esm/exports.mjs +3 -1
- package/dist/esm/extractor/bundle.mjs +3 -0
- package/dist/esm/extractor/bundle.mjs.map +1 -1
- package/dist/esm/extractor/esbuildTsconfigPaths.mjs +80 -45
- package/dist/esm/extractor/esbuildTsconfigPaths.mjs.map +1 -1
- package/dist/esm/extractor/generateConfigMarkdown.mjs +472 -0
- package/dist/esm/extractor/generateConfigMarkdown.mjs.map +1 -0
- package/dist/esm/extractor/loadTamagui.mjs +28 -20
- package/dist/esm/extractor/loadTamagui.mjs.map +1 -1
- package/dist/esm/extractor/regenerateConfig.mjs +30 -20
- package/dist/esm/extractor/regenerateConfig.mjs.map +1 -1
- package/dist/esm/zero/islands.mjs +2 -1
- package/dist/esm/zero/islands.mjs.map +1 -1
- package/dist/esm/zero/theme.mjs +7 -4
- package/dist/esm/zero/theme.mjs.map +1 -1
- package/package.json +23 -20
- package/src/compilerHost.ts +387 -160
- package/src/exports.ts +3 -0
- package/src/extractor/bundle.ts +13 -6
- package/src/extractor/esbuildTsconfigPaths.ts +106 -78
- package/src/extractor/generateConfigMarkdown.ts +610 -0
- package/src/extractor/loadTamagui.ts +55 -24
- package/src/extractor/regenerateConfig.ts +36 -35
- package/src/zero/islands.ts +2 -1
- package/src/zero/options.ts +8 -3
- package/src/zero/theme.ts +29 -4
- package/types/compilerHost.d.ts.map +1 -1
- package/types/exports.d.ts +2 -0
- package/types/exports.d.ts.map +1 -1
- package/types/extractor/bundle.d.ts.map +1 -1
- package/types/extractor/esbuildTsconfigPaths.d.ts +5 -7
- package/types/extractor/esbuildTsconfigPaths.d.ts.map +1 -1
- package/types/extractor/generateConfigMarkdown.d.ts +5 -0
- package/types/extractor/generateConfigMarkdown.d.ts.map +1 -0
- package/types/extractor/loadTamagui.d.ts +13 -1
- package/types/extractor/loadTamagui.d.ts.map +1 -1
- package/types/extractor/regenerateConfig.d.ts.map +1 -1
- package/types/zero/identity.d.ts +1 -1
- package/types/zero/islands.d.ts.map +1 -1
- package/types/zero/options.d.ts +8 -3
- package/types/zero/options.d.ts.map +1 -1
- package/types/zero/theme.d.ts +2 -0
- package/types/zero/theme.d.ts.map +1 -1
package/dist/esm/exports.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { evaluateComponentModule } from "./extractor/bundleConfig.mjs";
|
|
2
2
|
import { clearFormatCache, detectModuleFormat } from "./extractor/detectModuleFormat.mjs";
|
|
3
3
|
import { esbundleTamaguiConfig } from "./extractor/bundle.mjs";
|
|
4
|
+
import { createTsconfigPathsMatcher } from "./extractor/esbuildTsconfigPaths.mjs";
|
|
5
|
+
import { generateConfigMarkdown } from "./extractor/generateConfigMarkdown.mjs";
|
|
4
6
|
|
|
5
7
|
export * from "./checkDeps.mjs"
|
|
6
8
|
|
|
@@ -26,4 +28,4 @@ export * from "./getPragmaOptions.mjs"
|
|
|
26
28
|
|
|
27
29
|
export * from "./zero/index.mjs"
|
|
28
30
|
|
|
29
|
-
export { clearFormatCache, detectModuleFormat, esbundleTamaguiConfig, evaluateComponentModule };
|
|
31
|
+
export { clearFormatCache, createTsconfigPathsMatcher, detectModuleFormat, esbundleTamaguiConfig, evaluateComponentModule, generateConfigMarkdown };
|
|
@@ -187,6 +187,9 @@ async function esbundleTamaguiConfig(props, platform, aliases) {
|
|
|
187
187
|
const result = await esbuild.build({
|
|
188
188
|
...config,
|
|
189
189
|
outfile: tmpFile
|
|
190
|
+
}).catch(async (err) => {
|
|
191
|
+
await FS.remove(tmpFile).catch(() => {});
|
|
192
|
+
throw err;
|
|
190
193
|
});
|
|
191
194
|
await FS.rename(tmpFile, props.outfile);
|
|
192
195
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","names":[],"sources":["esm/extractor/bundle.js"],"sourcesContent":["import { randomBytes } from \"node:crypto\";\nimport { readFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport esbuild from \"esbuild\";\nimport FS from \"fs-extra\";\nimport { staticEvaluationIgnorePlugin } from \"../staticEvaluationIgnoredModules\";\nimport { detectModuleFormat } from \"./detectModuleFormat\";\nimport { esbuildAliasPlugin } from \"./esbuildAliasPlugin\";\nimport { resolveWebOrNativeSpecificEntry } from \"./loadTamagui\";\nimport { TsconfigPathsPlugin } from \"./esbuildTsconfigPaths\";\nconst nodeRequire = createRequire(\n typeof __filename === \"string\" ? __filename : import.meta.url\n);\nconst esbuildLoaderConfig = {\n \".js\": \"jsx\",\n \".png\": \"dataurl\",\n \".jpg\": \"dataurl\",\n \".jpeg\": \"dataurl\",\n \".svg\": \"dataurl\",\n \".gif\": \"dataurl\",\n \".webp\": \"dataurl\",\n \".woff2\": \"dataurl\",\n \".woff\": \"dataurl\",\n \".eot\": \"dataurl\",\n \".otf\": \"dataurl\",\n \".ttf\": \"dataurl\",\n \".mp4\": \"file\",\n \".mpeg4\": \"file\",\n \".mov\": \"file\",\n \".avif\": \"file\",\n \".wmv\": \"file\",\n \".webm\": \"file\",\n \".wav\": \"file\",\n \".aac\": \"file\",\n \".ogg\": \"file\",\n \".flac\": \"file\",\n \".node\": \"empty\"\n};\nconst dataExtensions = Object.keys(esbuildLoaderConfig).filter(\n (k) => esbuildLoaderConfig[k] === \"file\" || esbuildLoaderConfig[k] === \"dataurl\"\n).map((k) => k.slice(1));\nconst esbuildIgnoreFilesRegex = new RegExp(`.(${dataExtensions.join(\"|\")})$`, \"i\");\nfunction getESBuildConfig({\n entryPoints,\n resolvePlatformSpecificEntries,\n dangerouslyIgnoreStaticEvaluationModules = [],\n define: callerDefine,\n ...options\n}, platform, aliases) {\n if (process.env.DEBUG?.startsWith(\"tamagui\")) {\n console.info(`Building`, entryPoints);\n }\n const resolvedEntryPoints = !resolvePlatformSpecificEntries ? entryPoints : entryPoints.map((entry) => resolveWebOrNativeSpecificEntry(entry, platform));\n const detectedFormat = options.format || detectEntryFormat(resolvedEntryPoints[0]);\n const platformDefines = platform === \"web\" ? {\n \"process.env.TAMAGUI_TARGET\": '\"web\"',\n \"process.env.EXPO_OS\": '\"web\"'\n } : {\n \"process.env.TAMAGUI_TARGET\": '\"native\"'\n // EXPO_OS doesn't have a useful \"native\" value (it's ios/android),\n // so leave it alone here and let the consumer set it if needed.\n };\n const res = {\n bundle: true,\n entryPoints: resolvedEntryPoints,\n format: detectedFormat,\n define: {\n ...platformDefines,\n ...callerDefine\n },\n ...platform === \"native\" ? {\n conditions: [\"react-native\"],\n mainFields: [\"react-native\", \"module\", \"main\"]\n } : {},\n // for ESM: prefer \"module\" field for resolution, add require() shim for bundled CJS deps\n ...detectedFormat === \"esm\" ? {\n ...platform === \"web\" ? { mainFields: [\"module\", \"main\"] } : {},\n banner: {\n js: 'import { createRequire as __cr } from \"module\"; const require = __cr(import.meta.url);'\n }\n } : {},\n target: \"node24\",\n jsx: \"transform\",\n jsxFactory: \"react\",\n allowOverwrite: true,\n keepNames: true,\n resolveExtensions: [\n ...platform === \"web\" ? [\".web.tsx\", \".web.ts\", \".web.jsx\", \".web.js\"] : [\".native.tsx\", \".native.ts\", \".native.jsx\", \".native.js\"],\n \".tsx\",\n \".ts\",\n \".jsx\",\n \".js\"\n ],\n platform: \"node\",\n tsconfigRaw: {\n compilerOptions: {\n jsx: \"react-jsx\"\n }\n },\n loader: esbuildLoaderConfig,\n logLevel: \"warning\",\n plugins: [\n TsconfigPathsPlugin(),\n staticEvaluationIgnorePlugin(dangerouslyIgnoreStaticEvaluationModules),\n // handle ESM-only features that can't be used with CJS output\n {\n name: \"handle-esm-features\",\n setup(build) {\n const isCjs = build.initialOptions.format === \"cjs\" || !build.initialOptions.format;\n build.onLoad({ filter: /\\.(ts|tsx|js|jsx|mjs)$/ }, (args) => {\n if (!isCjs) {\n return null;\n }\n if (args.path.includes(\"node_modules\") && !args.path.includes(\"@tamagui\")) {\n return null;\n }\n let contents = readFileSync(args.path, \"utf8\");\n let modified = false;\n if (contents.includes(\"import.meta.env\")) {\n contents = contents.replace(/import\\.meta\\.env/g, \"process.env\");\n modified = true;\n }\n if (contents.includes(\"import.meta.url\")) {\n contents = contents.replace(/import\\.meta\\.url/g, '\"\"');\n modified = true;\n }\n if (contents.includes(\"import.meta.main\")) {\n contents = contents.replace(/import\\.meta\\.main/g, \"false\");\n modified = true;\n }\n if (modified) {\n return {\n contents,\n loader: args.path.endsWith(\".tsx\") ? \"tsx\" : args.path.endsWith(\".ts\") ? \"ts\" : args.path.endsWith(\".jsx\") ? \"jsx\" : \"js\"\n };\n }\n return null;\n });\n }\n },\n {\n name: \"external\",\n setup(build) {\n build.onResolve({ filter: /^@tamagui\\/(core|web)$/ }, (args) => {\n if (args.kind === \"entry-point\") {\n return null;\n }\n return {\n path: platform === \"native\" ? \"@tamagui/core/native\" : args.path,\n external: true\n };\n });\n build.onResolve({ filter: /react-native\\/package.json$/ }, () => {\n return {\n path: \"react-native/package.json\",\n external: true\n };\n });\n build.onResolve({ filter: /^(react-native|react-native\\/.*)$/ }, (args) => {\n return {\n path: args.path.replace(/^react-native/, \"@tamagui/react-native-web-lite\"),\n external: true\n };\n });\n build.onResolve({ filter: /^(framer-motion|motion)/ }, (args) => {\n return {\n path: args.path,\n external: true\n };\n });\n }\n },\n esbuildAliasPlugin({\n ...aliases\n })\n ],\n ...options\n };\n return res;\n}\nfunction detectEntryFormat(entryPoint) {\n if (entryPoint.startsWith(\"/\") || entryPoint.startsWith(\".\")) {\n return detectModuleFormat(entryPoint);\n }\n try {\n const pkgJsonPath = nodeRequire.resolve(entryPoint + \"/package.json\");\n const pkg = JSON.parse(readFileSync(pkgJsonPath, \"utf-8\"));\n return pkg.type === \"module\" ? \"esm\" : \"cjs\";\n } catch {\n return \"cjs\";\n }\n}\nasync function esbundleTamaguiConfig(props, platform, aliases) {\n const config = getESBuildConfig(props, platform, aliases);\n const tmpFile = `${props.outfile}.tmp.${process.pid}-${randomBytes(6).toString(\"hex\")}`;\n const result = await esbuild.build({\n ...config,\n outfile: tmpFile\n });\n await FS.rename(tmpFile, props.outfile);\n return result;\n}\nexport {\n esbuildIgnoreFilesRegex,\n esbuildLoaderConfig,\n esbundleTamaguiConfig\n};\n//# sourceMappingURL=bundle.js.map\n"],"mappings":";;;;;;;;;;;;AAUA,MAAM,cAAc,cAClB,OAAO,eAAe,WAAW,aAAa,YAAY,GAC5D;AACA,MAAM,sBAAsB;CAC1B,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,UAAU;CACV,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,SAAS;AACX;AACA,MAAM,iBAAiB,OAAO,KAAK,mBAAmB,CAAC,CAAC,QACrD,MAAM,oBAAoB,OAAO,UAAU,oBAAoB,OAAO,SACzE,CAAC,CAAC,KAAK,MAAM,EAAE,MAAM,CAAC,CAAC;AACvB,MAAM,0BAA0B,IAAI,OAAO,KAAK,eAAe,KAAK,GAAG,EAAE,KAAK,GAAG;AACjF,SAAS,iBAAiB,EACxB,aACA,gCACA,2CAA2C,CAAC,GAC5C,QAAQ,cACR,GAAG,WACF,UAAU,SAAS;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kB,YAAY;CACrC,IAAI,WAAW,WAAW,GAAG,KAAK,WAAW,WAAW,GAAG,GAAG;EAC5D,OAAO,mBAAmB,UAAU;CACtC;CACA,IAAI;EACF,MAAM,cAAc,YAAY,QAAQ,aAAa,eAAe;EACpE,MAAM,MAAM,KAAK,MAAM,aAAa,aAAa,OAAO,CAAC;EACzD,OAAO,IAAI,SAAS,WAAW,QAAQ;CACzC,QAAQ;EACN,OAAO;CACT;AACF;AACA,eAAe,sBAAsB,OAAO,UAAU,SAAS;CAC7D,MAAM,SAAS,iBAAiB,OAAO,UAAU,OAAO;CACxD,MAAM,UAAU,GAAG,MAAM,QAAQ,OAAO,QAAQ,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,SAAS,KAAK;CACpF,MAAM,SAAS,MAAM,QAAQ,MAAM;EACjC,GAAG;EACH,SAAS;CACX,CAAC;CACD,MAAM,GAAG,OAAO,SAAS,MAAM,OAAO;CACtC,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"bundle.js","names":[],"sources":["esm/extractor/bundle.js"],"sourcesContent":["import { randomBytes } from \"node:crypto\";\nimport { readFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport esbuild from \"esbuild\";\nimport FS from \"fs-extra\";\nimport { staticEvaluationIgnorePlugin } from \"../staticEvaluationIgnoredModules\";\nimport { detectModuleFormat } from \"./detectModuleFormat\";\nimport { esbuildAliasPlugin } from \"./esbuildAliasPlugin\";\nimport { resolveWebOrNativeSpecificEntry } from \"./loadTamagui\";\nimport { TsconfigPathsPlugin } from \"./esbuildTsconfigPaths\";\nconst nodeRequire = createRequire(\n typeof __filename === \"string\" ? __filename : import.meta.url\n);\nconst esbuildLoaderConfig = {\n \".js\": \"jsx\",\n \".png\": \"dataurl\",\n \".jpg\": \"dataurl\",\n \".jpeg\": \"dataurl\",\n \".svg\": \"dataurl\",\n \".gif\": \"dataurl\",\n \".webp\": \"dataurl\",\n \".woff2\": \"dataurl\",\n \".woff\": \"dataurl\",\n \".eot\": \"dataurl\",\n \".otf\": \"dataurl\",\n \".ttf\": \"dataurl\",\n \".mp4\": \"file\",\n \".mpeg4\": \"file\",\n \".mov\": \"file\",\n \".avif\": \"file\",\n \".wmv\": \"file\",\n \".webm\": \"file\",\n \".wav\": \"file\",\n \".aac\": \"file\",\n \".ogg\": \"file\",\n \".flac\": \"file\",\n \".node\": \"empty\"\n};\nconst dataExtensions = Object.keys(esbuildLoaderConfig).filter(\n (k) => esbuildLoaderConfig[k] === \"file\" || esbuildLoaderConfig[k] === \"dataurl\"\n).map((k) => k.slice(1));\nconst esbuildIgnoreFilesRegex = new RegExp(`.(${dataExtensions.join(\"|\")})$`, \"i\");\nfunction getESBuildConfig({\n entryPoints,\n resolvePlatformSpecificEntries,\n dangerouslyIgnoreStaticEvaluationModules = [],\n define: callerDefine,\n ...options\n}, platform, aliases) {\n if (process.env.DEBUG?.startsWith(\"tamagui\")) {\n console.info(`Building`, entryPoints);\n }\n const resolvedEntryPoints = !resolvePlatformSpecificEntries ? entryPoints : entryPoints.map((entry) => resolveWebOrNativeSpecificEntry(entry, platform));\n const detectedFormat = options.format || detectEntryFormat(resolvedEntryPoints[0]);\n const platformDefines = platform === \"web\" ? {\n \"process.env.TAMAGUI_TARGET\": '\"web\"',\n \"process.env.EXPO_OS\": '\"web\"'\n } : {\n \"process.env.TAMAGUI_TARGET\": '\"native\"'\n // EXPO_OS doesn't have a useful \"native\" value (it's ios/android),\n // so leave it alone here and let the consumer set it if needed.\n };\n const res = {\n bundle: true,\n entryPoints: resolvedEntryPoints,\n format: detectedFormat,\n define: {\n ...platformDefines,\n ...callerDefine\n },\n ...platform === \"native\" ? {\n conditions: [\"react-native\"],\n mainFields: [\"react-native\", \"module\", \"main\"]\n } : {},\n // for ESM: prefer \"module\" field for resolution, add require() shim for bundled CJS deps\n ...detectedFormat === \"esm\" ? {\n ...platform === \"web\" ? { mainFields: [\"module\", \"main\"] } : {},\n banner: {\n js: 'import { createRequire as __cr } from \"module\"; const require = __cr(import.meta.url);'\n }\n } : {},\n target: \"node24\",\n jsx: \"transform\",\n jsxFactory: \"react\",\n allowOverwrite: true,\n keepNames: true,\n resolveExtensions: [\n ...platform === \"web\" ? [\".web.tsx\", \".web.ts\", \".web.jsx\", \".web.js\"] : [\".native.tsx\", \".native.ts\", \".native.jsx\", \".native.js\"],\n \".tsx\",\n \".ts\",\n \".jsx\",\n \".js\"\n ],\n platform: \"node\",\n tsconfigRaw: {\n compilerOptions: {\n jsx: \"react-jsx\"\n }\n },\n loader: esbuildLoaderConfig,\n logLevel: \"warning\",\n plugins: [\n TsconfigPathsPlugin(),\n staticEvaluationIgnorePlugin(dangerouslyIgnoreStaticEvaluationModules),\n // handle ESM-only features that can't be used with CJS output\n {\n name: \"handle-esm-features\",\n setup(build) {\n const isCjs = build.initialOptions.format === \"cjs\" || !build.initialOptions.format;\n build.onLoad({ filter: /\\.(ts|tsx|js|jsx|mjs)$/ }, (args) => {\n if (!isCjs) {\n return null;\n }\n if (args.path.includes(\"node_modules\") && !args.path.includes(\"@tamagui\")) {\n return null;\n }\n let contents = readFileSync(args.path, \"utf8\");\n let modified = false;\n if (contents.includes(\"import.meta.env\")) {\n contents = contents.replace(/import\\.meta\\.env/g, \"process.env\");\n modified = true;\n }\n if (contents.includes(\"import.meta.url\")) {\n contents = contents.replace(/import\\.meta\\.url/g, '\"\"');\n modified = true;\n }\n if (contents.includes(\"import.meta.main\")) {\n contents = contents.replace(/import\\.meta\\.main/g, \"false\");\n modified = true;\n }\n if (modified) {\n return {\n contents,\n loader: args.path.endsWith(\".tsx\") ? \"tsx\" : args.path.endsWith(\".ts\") ? \"ts\" : args.path.endsWith(\".jsx\") ? \"jsx\" : \"js\"\n };\n }\n return null;\n });\n }\n },\n {\n name: \"external\",\n setup(build) {\n build.onResolve({ filter: /^@tamagui\\/(core|web)$/ }, (args) => {\n if (args.kind === \"entry-point\") {\n return null;\n }\n return {\n path: platform === \"native\" ? \"@tamagui/core/native\" : args.path,\n external: true\n };\n });\n build.onResolve({ filter: /react-native\\/package.json$/ }, () => {\n return {\n path: \"react-native/package.json\",\n external: true\n };\n });\n build.onResolve({ filter: /^(react-native|react-native\\/.*)$/ }, (args) => {\n return {\n path: args.path.replace(/^react-native/, \"@tamagui/react-native-web-lite\"),\n external: true\n };\n });\n build.onResolve({ filter: /^(framer-motion|motion)/ }, (args) => {\n return {\n path: args.path,\n external: true\n };\n });\n }\n },\n esbuildAliasPlugin({\n ...aliases\n })\n ],\n ...options\n };\n return res;\n}\nfunction detectEntryFormat(entryPoint) {\n if (entryPoint.startsWith(\"/\") || entryPoint.startsWith(\".\")) {\n return detectModuleFormat(entryPoint);\n }\n try {\n const pkgJsonPath = nodeRequire.resolve(entryPoint + \"/package.json\");\n const pkg = JSON.parse(readFileSync(pkgJsonPath, \"utf-8\"));\n return pkg.type === \"module\" ? \"esm\" : \"cjs\";\n } catch {\n return \"cjs\";\n }\n}\nasync function esbundleTamaguiConfig(props, platform, aliases) {\n const config = getESBuildConfig(props, platform, aliases);\n const tmpFile = `${props.outfile}.tmp.${process.pid}-${randomBytes(6).toString(\"hex\")}`;\n const result = await esbuild.build({\n ...config,\n outfile: tmpFile\n }).catch(async (err) => {\n await FS.remove(tmpFile).catch(() => {\n });\n throw err;\n });\n await FS.rename(tmpFile, props.outfile);\n return result;\n}\nexport {\n esbuildIgnoreFilesRegex,\n esbuildLoaderConfig,\n esbundleTamaguiConfig\n};\n//# sourceMappingURL=bundle.js.map\n"],"mappings":";;;;;;;;;;;;AAUA,MAAM,cAAc,cAClB,OAAO,eAAe,WAAW,aAAa,YAAY,GAC5D;AACA,MAAM,sBAAsB;CAC1B,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,UAAU;CACV,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,SAAS;CACT,QAAQ;C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ACN,UAAU;MACZ;KACF,CAAC;KACD,MAAM,UAAU,EAAE,QAAQ,oCAAoC,IAAI,SAAS;MACzE,OAAO;OACL,MAAM,KAAK,KAAK,QAAQ,iBAAiB,gCAAgC;OACzE,UAAU;MACZ;KACF,CAAC;KACD,MAAM,UAAU,EAAE,QAAQ,0BAA0B,IAAI,SAAS;MAC/D,OAAO;OACL,MAAM,KAAK;OACX,UAAU;MACZ;KACF,CAAC;IACH;GACF;GACA,mBAAmB,EACjB,GAAG,QACL,CAAC;EACH;EACA,GAAG;CACL;CACA,OAAO;AACT;AACA,SAAS,kBAAkB,YAAY;CACrC,IAAI,WAAW,WAAW,GAAG,KAAK,WAAW,WAAW,GAAG,GAAG;EAC5D,OAAO,mBAAmB,UAAU;CACtC;CACA,IAAI;EACF,MAAM,cAAc,YAAY,QAAQ,aAAa,eAAe;EACpE,MAAM,MAAM,KAAK,MAAM,aAAa,aAAa,OAAO,CAAC;EACzD,OAAO,IAAI,SAAS,WAAW,QAAQ;CACzC,QAAQ;EACN,OAAO;CACT;AACF;AACA,eAAe,sBAAsB,OAAO,UAAU,SAAS;CAC7D,MAAM,SAAS,iBAAiB,OAAO,UAAU,OAAO;CACxD,MAAM,UAAU,GAAG,MAAM,QAAQ,OAAO,QAAQ,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,SAAS,KAAK;CACpF,MAAM,SAAS,MAAM,QAAQ,MAAM;EACjC,GAAG;EACH,SAAS;CACX,CAAC,CAAC,CAAC,MAAM,OAAO,QAAQ;EACtB,MAAM,GAAG,OAAO,OAAO,CAAC,CAAC,YAAY,CACrC,CAAC;EACD,MAAM;CACR,CAAC;CACD,MAAM,GAAG,OAAO,SAAS,MAAM,OAAO;CACtC,OAAO;AACT"}
|
|
@@ -1,63 +1,98 @@
|
|
|
1
|
+
import { createPathsMatcher, getTsconfig, parseTsconfig } from "get-tsconfig";
|
|
1
2
|
import fs from "node:fs";
|
|
2
3
|
import path from "node:path";
|
|
3
|
-
import { findConfigFile, nodeModuleNameResolver, parseJsonConfigFileContent, readConfigFile, sys } from "typescript";
|
|
4
4
|
|
|
5
5
|
const name = "tsconfig-paths";
|
|
6
|
+
function loadTsconfig(tsconfig, cwd = process.cwd()) {
|
|
7
|
+
if (!tsconfig) {
|
|
8
|
+
return getTsconfig(cwd) || getTsconfig(cwd, "jsconfig.json");
|
|
9
|
+
}
|
|
10
|
+
if (typeof tsconfig === "string") {
|
|
11
|
+
const configPath = path.resolve(cwd, tsconfig);
|
|
12
|
+
if (!fs.existsSync(configPath)) {
|
|
13
|
+
throw new Error(`Specified tsconfig file not found: ${configPath}`);
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
path: configPath,
|
|
17
|
+
config: parseTsconfig(configPath)
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
path: path.join(cwd, "tsconfig.json"),
|
|
22
|
+
config: tsconfig
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function createTsconfigPathsMatcher(tsconfig, cwd = process.cwd()) {
|
|
26
|
+
const loaded = loadTsconfig(tsconfig, cwd);
|
|
27
|
+
return loaded ? createPathsMatcher(loaded) : null;
|
|
28
|
+
}
|
|
29
|
+
function loadTsconfigPathMatcher(tsconfig) {
|
|
30
|
+
let result;
|
|
31
|
+
if (!tsconfig) {
|
|
32
|
+
result = getTsconfig(process.cwd()) || getTsconfig(process.cwd(), "jsconfig.json");
|
|
33
|
+
} else if (typeof tsconfig === "string") {
|
|
34
|
+
if (fs.existsSync(tsconfig)) {
|
|
35
|
+
const configPath = path.resolve(tsconfig);
|
|
36
|
+
result = {
|
|
37
|
+
config: parseTsconfig(configPath),
|
|
38
|
+
path: configPath
|
|
39
|
+
};
|
|
40
|
+
} else {
|
|
41
|
+
throw new Error(`Specified tsconfig file not found: ${tsconfig}`);
|
|
42
|
+
}
|
|
43
|
+
} else {
|
|
44
|
+
result = {
|
|
45
|
+
config: tsconfig,
|
|
46
|
+
path: path.join(process.cwd(), "tsconfig.json")
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
if (!result) return () => [];
|
|
50
|
+
const matchPaths = createPathsMatcher(result);
|
|
51
|
+
const patterns = Object.keys(result.config.compilerOptions?.paths || {});
|
|
52
|
+
if (!matchPaths || patterns.length === 0) return () => [];
|
|
53
|
+
return (specifier) => {
|
|
54
|
+
const matchesExplicitPath = patterns.some((pattern) => {
|
|
55
|
+
const wildcardIndex = pattern.indexOf("*");
|
|
56
|
+
if (wildcardIndex === -1) return pattern === specifier;
|
|
57
|
+
return specifier.startsWith(pattern.slice(0, wildcardIndex)) && specifier.endsWith(pattern.slice(wildcardIndex + 1));
|
|
58
|
+
});
|
|
59
|
+
return matchesExplicitPath ? matchPaths(specifier) : [];
|
|
60
|
+
};
|
|
61
|
+
}
|
|
6
62
|
function TsconfigPathsPlugin() {
|
|
7
|
-
const
|
|
63
|
+
const matchTsconfigPath = loadTsconfigPathMatcher();
|
|
8
64
|
return {
|
|
9
65
|
name,
|
|
10
|
-
setup(
|
|
11
|
-
onResolve({ filter: /.*/ }, (args) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
const paths = compilerOptions.paths || {};
|
|
16
|
-
const hasMatchingPath = Object.keys(paths).some((p) => new RegExp(p.replace("*", "\\w*")).test(args.path));
|
|
17
|
-
if (!hasMatchingPath) {
|
|
66
|
+
setup(build) {
|
|
67
|
+
build.onResolve({ filter: /.*/ }, async (args) => {
|
|
68
|
+
const pluginData = args.pluginData;
|
|
69
|
+
if (pluginData?.tamaguiTsconfigPaths || pluginData?.tamaguiTsconfigPathsResolved) {
|
|
18
70
|
return null;
|
|
19
71
|
}
|
|
20
|
-
|
|
21
|
-
if (!resolvedModule) {
|
|
72
|
+
if (args.path.startsWith("@tamagui/")) {
|
|
22
73
|
return null;
|
|
23
74
|
}
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
75
|
+
for (const candidate of matchTsconfigPath(args.path)) {
|
|
76
|
+
const resolved = await build.resolve(candidate, {
|
|
77
|
+
importer: args.importer,
|
|
78
|
+
kind: args.kind,
|
|
79
|
+
namespace: args.namespace,
|
|
80
|
+
pluginData: {
|
|
81
|
+
...args.pluginData && typeof args.pluginData === "object" ? args.pluginData : {},
|
|
82
|
+
tamaguiTsconfigPaths: true,
|
|
83
|
+
tamaguiTsconfigPathsResolved: true
|
|
84
|
+
},
|
|
85
|
+
resolveDir: args.resolveDir
|
|
86
|
+
});
|
|
87
|
+
if (resolved.path && !resolved.path.endsWith(".d.ts") && resolved.errors.length === 0) {
|
|
88
|
+
return resolved;
|
|
89
|
+
}
|
|
27
90
|
}
|
|
28
|
-
return
|
|
91
|
+
return null;
|
|
29
92
|
});
|
|
30
93
|
}
|
|
31
94
|
};
|
|
32
95
|
}
|
|
33
|
-
function loadCompilerOptionsFromTsconfig(tsconfig) {
|
|
34
|
-
if (!tsconfig) {
|
|
35
|
-
const configPath = findConfigFile(process.cwd(), sys.fileExists, "tsconfig.json") || findConfigFile(process.cwd(), sys.fileExists, "jsconfig.json");
|
|
36
|
-
if (configPath) {
|
|
37
|
-
return parseTsconfig(configPath);
|
|
38
|
-
}
|
|
39
|
-
return {};
|
|
40
|
-
}
|
|
41
|
-
if (typeof tsconfig === "string") {
|
|
42
|
-
if (fs.existsSync(tsconfig)) {
|
|
43
|
-
return parseTsconfig(tsconfig);
|
|
44
|
-
} else {
|
|
45
|
-
throw new Error(`Specified tsconfig file not found: ${tsconfig}`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
const baseDir = process.cwd();
|
|
49
|
-
const parsed = parseJsonConfigFileContent(tsconfig, sys, baseDir);
|
|
50
|
-
return parsed.options;
|
|
51
|
-
}
|
|
52
|
-
function parseTsconfig(configFilePath) {
|
|
53
|
-
const configFile = readConfigFile(configFilePath, sys.readFile);
|
|
54
|
-
if (configFile.error) {
|
|
55
|
-
throw new Error(`Error reading tsconfig file '${configFilePath}': ${configFile.error.messageText}`);
|
|
56
|
-
}
|
|
57
|
-
const baseDir = path.dirname(configFilePath);
|
|
58
|
-
const parsed = parseJsonConfigFileContent(configFile.config, sys, baseDir);
|
|
59
|
-
return parsed.options;
|
|
60
|
-
}
|
|
61
96
|
|
|
62
|
-
export { TsconfigPathsPlugin,
|
|
97
|
+
export { TsconfigPathsPlugin, createTsconfigPathsMatcher, loadTsconfigPathMatcher };
|
|
63
98
|
//# sourceMappingURL=esbuildTsconfigPaths.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esbuildTsconfigPaths.js","names":[],"sources":["esm/extractor/esbuildTsconfigPaths.js"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"esbuildTsconfigPaths.js","names":[],"sources":["esm/extractor/esbuildTsconfigPaths.js"],"sourcesContent":["import {\n createPathsMatcher,\n getTsconfig,\n parseTsconfig\n} from \"get-tsconfig\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nconst name = \"tsconfig-paths\";\nfunction loadTsconfig(tsconfig, cwd = process.cwd()) {\n if (!tsconfig) {\n return getTsconfig(cwd) || getTsconfig(cwd, \"jsconfig.json\");\n }\n if (typeof tsconfig === \"string\") {\n const configPath = path.resolve(cwd, tsconfig);\n if (!fs.existsSync(configPath)) {\n throw new Error(`Specified tsconfig file not found: ${configPath}`);\n }\n return { path: configPath, config: parseTsconfig(configPath) };\n }\n return {\n path: path.join(cwd, \"tsconfig.json\"),\n config: tsconfig\n };\n}\nfunction createTsconfigPathsMatcher(tsconfig, cwd = process.cwd()) {\n const loaded = loadTsconfig(tsconfig, cwd);\n return loaded ? createPathsMatcher(loaded) : null;\n}\nfunction loadTsconfigPathMatcher(tsconfig) {\n let result;\n if (!tsconfig) {\n result = getTsconfig(process.cwd()) || getTsconfig(process.cwd(), \"jsconfig.json\");\n } else if (typeof tsconfig === \"string\") {\n if (fs.existsSync(tsconfig)) {\n const configPath = path.resolve(tsconfig);\n result = { config: parseTsconfig(configPath), path: configPath };\n } else {\n throw new Error(`Specified tsconfig file not found: ${tsconfig}`);\n }\n } else {\n result = { config: tsconfig, path: path.join(process.cwd(), \"tsconfig.json\") };\n }\n if (!result) return () => [];\n const matchPaths = createPathsMatcher(result);\n const patterns = Object.keys(result.config.compilerOptions?.paths || {});\n if (!matchPaths || patterns.length === 0) return () => [];\n return (specifier) => {\n const matchesExplicitPath = patterns.some((pattern) => {\n const wildcardIndex = pattern.indexOf(\"*\");\n if (wildcardIndex === -1) return pattern === specifier;\n return specifier.startsWith(pattern.slice(0, wildcardIndex)) && specifier.endsWith(pattern.slice(wildcardIndex + 1));\n });\n return matchesExplicitPath ? matchPaths(specifier) : [];\n };\n}\nfunction TsconfigPathsPlugin() {\n const matchTsconfigPath = loadTsconfigPathMatcher();\n return {\n name,\n setup(build) {\n build.onResolve({ filter: /.*/ }, async (args) => {\n const pluginData = args.pluginData;\n if (pluginData?.tamaguiTsconfigPaths || pluginData?.tamaguiTsconfigPathsResolved) {\n return null;\n }\n if (args.path.startsWith(\"@tamagui/\")) {\n return null;\n }\n for (const candidate of matchTsconfigPath(args.path)) {\n const resolved = await build.resolve(candidate, {\n importer: args.importer,\n kind: args.kind,\n namespace: args.namespace,\n pluginData: {\n ...args.pluginData && typeof args.pluginData === \"object\" ? args.pluginData : {},\n tamaguiTsconfigPaths: true,\n tamaguiTsconfigPathsResolved: true\n },\n resolveDir: args.resolveDir\n });\n if (resolved.path && !resolved.path.endsWith(\".d.ts\") && resolved.errors.length === 0) {\n return resolved;\n }\n }\n return null;\n });\n }\n };\n}\nexport {\n TsconfigPathsPlugin,\n createTsconfigPathsMatcher,\n loadTsconfigPathMatcher\n};\n//# sourceMappingURL=esbuildTsconfigPaths.js.map\n"],"mappings":";;;;;AAOA,MAAM,OAAO;AACb,SAAS,aAAa,UAAU,MAAM,QAAQ,IAAI,GAAG;CACnD,IAAI,CAAC,UAAU;EACb,OAAO,YAAY,GAAG,KAAK,YAAY,KAAK,eAAe;CAC7D;CACA,IAAI,OAAO,aAAa,UAAU;EAChC,M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