@tamagui/static 1.89.26 → 1.89.27-1708113113238

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. package/dist/cjs/constants.native.js +4 -4
  2. package/dist/cjs/constants.native.js.map +3 -3
  3. package/dist/cjs/extractor/accessSafe.native.js +1 -5
  4. package/dist/cjs/extractor/accessSafe.native.js.map +3 -3
  5. package/dist/cjs/extractor/babelParse.native.js +5 -8
  6. package/dist/cjs/extractor/babelParse.native.js.map +3 -3
  7. package/dist/cjs/extractor/buildClassName.native.js +31 -42
  8. package/dist/cjs/extractor/buildClassName.native.js.map +3 -3
  9. package/dist/cjs/extractor/bundle.js +6 -4
  10. package/dist/cjs/extractor/bundle.js.map +1 -1
  11. package/dist/cjs/extractor/bundle.native.js +321 -56
  12. package/dist/cjs/extractor/bundle.native.js.map +3 -3
  13. package/dist/cjs/extractor/bundleConfig.native.js +499 -187
  14. package/dist/cjs/extractor/bundleConfig.native.js.map +3 -3
  15. package/dist/cjs/extractor/createEvaluator.native.js +9 -11
  16. package/dist/cjs/extractor/createEvaluator.native.js.map +3 -3
  17. package/dist/cjs/extractor/createExtractor.native.js +1240 -906
  18. package/dist/cjs/extractor/createExtractor.native.js.map +3 -3
  19. package/dist/cjs/extractor/ensureImportingConcat.native.js +11 -17
  20. package/dist/cjs/extractor/ensureImportingConcat.native.js.map +3 -3
  21. package/dist/cjs/extractor/esbuildAliasPlugin.native.js +22 -11
  22. package/dist/cjs/extractor/esbuildAliasPlugin.native.js.map +3 -3
  23. package/dist/cjs/extractor/evaluateAstNode.native.js +15 -21
  24. package/dist/cjs/extractor/evaluateAstNode.native.js.map +3 -3
  25. package/dist/cjs/extractor/extractHelpers.native.js +146 -38
  26. package/dist/cjs/extractor/extractHelpers.native.js.map +3 -3
  27. package/dist/cjs/extractor/extractMediaStyle.native.js +127 -54
  28. package/dist/cjs/extractor/extractMediaStyle.native.js.map +3 -3
  29. package/dist/cjs/extractor/extractToClassNames.native.js +449 -252
  30. package/dist/cjs/extractor/extractToClassNames.native.js.map +3 -3
  31. package/dist/cjs/extractor/findTopmostFunction.native.js +4 -4
  32. package/dist/cjs/extractor/findTopmostFunction.native.js.map +3 -3
  33. package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js +415 -54
  34. package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js.map +3 -3
  35. package/dist/cjs/extractor/generatedUid.native.js +2 -2
  36. package/dist/cjs/extractor/generatedUid.native.js.map +3 -3
  37. package/dist/cjs/extractor/getPrefixLogs.native.js +2 -1
  38. package/dist/cjs/extractor/getPrefixLogs.native.js.map +3 -3
  39. package/dist/cjs/extractor/getPropValueFromAttributes.native.js +16 -19
  40. package/dist/cjs/extractor/getPropValueFromAttributes.native.js.map +3 -3
  41. package/dist/cjs/extractor/getSourceModule.native.js +20 -7
  42. package/dist/cjs/extractor/getSourceModule.native.js.map +3 -3
  43. package/dist/cjs/extractor/getStaticBindingsForScope.native.js +336 -94
  44. package/dist/cjs/extractor/getStaticBindingsForScope.native.js.map +3 -3
  45. package/dist/cjs/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +3 -3
  46. package/dist/cjs/extractor/hoistClassNames.native.js +8 -10
  47. package/dist/cjs/extractor/hoistClassNames.native.js.map +3 -3
  48. package/dist/cjs/extractor/literalToAst.native.js +89 -19
  49. package/dist/cjs/extractor/literalToAst.native.js.map +3 -3
  50. package/dist/cjs/extractor/loadFile.native.js +16 -8
  51. package/dist/cjs/extractor/loadFile.native.js.map +3 -3
  52. package/dist/cjs/extractor/loadTamagui.js +3 -3
  53. package/dist/cjs/extractor/loadTamagui.js.map +1 -1
  54. package/dist/cjs/extractor/loadTamagui.native.js +667 -192
  55. package/dist/cjs/extractor/loadTamagui.native.js.map +3 -3
  56. package/dist/cjs/extractor/logLines.native.js +24 -6
  57. package/dist/cjs/extractor/logLines.native.js.map +3 -3
  58. package/dist/cjs/extractor/normalizeTernaries.native.js +71 -20
  59. package/dist/cjs/extractor/normalizeTernaries.native.js.map +3 -3
  60. package/dist/cjs/extractor/propsToFontFamilyCache.native.js +3 -3
  61. package/dist/cjs/extractor/propsToFontFamilyCache.native.js.map +3 -3
  62. package/dist/cjs/extractor/removeUnusedHooks.native.js +69 -36
  63. package/dist/cjs/extractor/removeUnusedHooks.native.js.map +3 -3
  64. package/dist/cjs/extractor/timer.native.js +10 -9
  65. package/dist/cjs/extractor/timer.native.js.map +3 -3
  66. package/dist/cjs/extractor/validHTMLAttributes.native.js +1 -1
  67. package/dist/cjs/extractor/validHTMLAttributes.native.js.map +3 -3
  68. package/dist/cjs/getPragmaOptions.native.js +4 -9
  69. package/dist/cjs/getPragmaOptions.native.js.map +3 -3
  70. package/dist/cjs/helpers/memoize.native.js +5 -3
  71. package/dist/cjs/helpers/memoize.native.js.map +3 -3
  72. package/dist/cjs/helpers/requireTamaguiCore.native.js +2 -1
  73. package/dist/cjs/helpers/requireTamaguiCore.native.js.map +3 -3
  74. package/dist/cjs/index.native.js.map +2 -2
  75. package/dist/cjs/minifyCSS.native.js.map +3 -3
  76. package/dist/cjs/registerRequire.native.js +56 -28
  77. package/dist/cjs/registerRequire.native.js.map +3 -3
  78. package/dist/cjs/server.native.js +175 -21
  79. package/dist/cjs/server.native.js.map +3 -3
  80. package/dist/cjs/setup.native.js.map +3 -3
  81. package/dist/cjs/static.native.js.map +2 -2
  82. package/dist/cjs/types.native.js.map +2 -2
  83. package/dist/cjs/webpackPlugin.native.js +26 -5
  84. package/dist/cjs/webpackPlugin.native.js.map +3 -3
  85. package/dist/esm/constants.native.js +4 -3
  86. package/dist/esm/constants.native.js.map +3 -3
  87. package/dist/esm/extractor/accessSafe.native.js +1 -5
  88. package/dist/esm/extractor/accessSafe.native.js.map +3 -3
  89. package/dist/esm/extractor/babelParse.native.js +5 -7
  90. package/dist/esm/extractor/babelParse.native.js.map +3 -3
  91. package/dist/esm/extractor/buildClassName.native.js +31 -41
  92. package/dist/esm/extractor/buildClassName.native.js.map +3 -3
  93. package/dist/esm/extractor/bundle.js +6 -4
  94. package/dist/esm/extractor/bundle.js.map +1 -1
  95. package/dist/esm/extractor/bundle.mjs +7 -5
  96. package/dist/esm/extractor/bundle.native.js +321 -56
  97. package/dist/esm/extractor/bundle.native.js.map +3 -3
  98. package/dist/esm/extractor/bundleConfig.native.js +499 -187
  99. package/dist/esm/extractor/bundleConfig.native.js.map +3 -3
  100. package/dist/esm/extractor/createEvaluator.native.js +9 -11
  101. package/dist/esm/extractor/createEvaluator.native.js.map +3 -3
  102. package/dist/esm/extractor/createExtractor.native.js +1241 -916
  103. package/dist/esm/extractor/createExtractor.native.js.map +3 -3
  104. package/dist/esm/extractor/ensureImportingConcat.native.js +11 -16
  105. package/dist/esm/extractor/ensureImportingConcat.native.js.map +3 -3
  106. package/dist/esm/extractor/esbuildAliasPlugin.native.js +22 -11
  107. package/dist/esm/extractor/esbuildAliasPlugin.native.js.map +3 -3
  108. package/dist/esm/extractor/evaluateAstNode.native.js +15 -21
  109. package/dist/esm/extractor/evaluateAstNode.native.js.map +3 -3
  110. package/dist/esm/extractor/extractHelpers.native.js +146 -38
  111. package/dist/esm/extractor/extractHelpers.native.js.map +3 -3
  112. package/dist/esm/extractor/extractMediaStyle.native.js +127 -54
  113. package/dist/esm/extractor/extractMediaStyle.native.js.map +3 -3
  114. package/dist/esm/extractor/extractToClassNames.native.js +449 -252
  115. package/dist/esm/extractor/extractToClassNames.native.js.map +3 -3
  116. package/dist/esm/extractor/findTopmostFunction.native.js +4 -4
  117. package/dist/esm/extractor/findTopmostFunction.native.js.map +3 -3
  118. package/dist/esm/extractor/generateTamaguiStudioConfig.native.js +415 -54
  119. package/dist/esm/extractor/generateTamaguiStudioConfig.native.js.map +3 -3
  120. package/dist/esm/extractor/generatedUid.native.js +2 -2
  121. package/dist/esm/extractor/generatedUid.native.js.map +3 -3
  122. package/dist/esm/extractor/getPrefixLogs.native.js +2 -1
  123. package/dist/esm/extractor/getPrefixLogs.native.js.map +3 -3
  124. package/dist/esm/extractor/getPropValueFromAttributes.native.js +16 -19
  125. package/dist/esm/extractor/getPropValueFromAttributes.native.js.map +3 -3
  126. package/dist/esm/extractor/getSourceModule.native.js +20 -7
  127. package/dist/esm/extractor/getSourceModule.native.js.map +3 -3
  128. package/dist/esm/extractor/getStaticBindingsForScope.native.js +336 -94
  129. package/dist/esm/extractor/getStaticBindingsForScope.native.js.map +3 -3
  130. package/dist/esm/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +3 -3
  131. package/dist/esm/extractor/hoistClassNames.native.js +8 -10
  132. package/dist/esm/extractor/hoistClassNames.native.js.map +3 -3
  133. package/dist/esm/extractor/literalToAst.native.js +89 -19
  134. package/dist/esm/extractor/literalToAst.native.js.map +3 -3
  135. package/dist/esm/extractor/loadFile.native.js +16 -8
  136. package/dist/esm/extractor/loadFile.native.js.map +3 -3
  137. package/dist/esm/extractor/loadTamagui.js +1 -2
  138. package/dist/esm/extractor/loadTamagui.js.map +1 -1
  139. package/dist/esm/extractor/loadTamagui.mjs +5 -3
  140. package/dist/esm/extractor/loadTamagui.native.js +668 -203
  141. package/dist/esm/extractor/loadTamagui.native.js.map +3 -3
  142. package/dist/esm/extractor/logLines.native.js +24 -6
  143. package/dist/esm/extractor/logLines.native.js.map +3 -3
  144. package/dist/esm/extractor/normalizeTernaries.native.js +71 -20
  145. package/dist/esm/extractor/normalizeTernaries.native.js.map +3 -3
  146. package/dist/esm/extractor/propsToFontFamilyCache.native.js +3 -3
  147. package/dist/esm/extractor/propsToFontFamilyCache.native.js.map +3 -3
  148. package/dist/esm/extractor/removeUnusedHooks.native.js +69 -35
  149. package/dist/esm/extractor/removeUnusedHooks.native.js.map +3 -3
  150. package/dist/esm/extractor/timer.native.js +10 -9
  151. package/dist/esm/extractor/timer.native.js.map +3 -3
  152. package/dist/esm/extractor/validHTMLAttributes.native.js +1 -1
  153. package/dist/esm/extractor/validHTMLAttributes.native.js.map +3 -3
  154. package/dist/esm/getPragmaOptions.native.js +4 -9
  155. package/dist/esm/getPragmaOptions.native.js.map +3 -3
  156. package/dist/esm/helpers/memoize.native.js +5 -3
  157. package/dist/esm/helpers/memoize.native.js.map +3 -3
  158. package/dist/esm/helpers/requireTamaguiCore.native.js +2 -1
  159. package/dist/esm/helpers/requireTamaguiCore.native.js.map +3 -3
  160. package/dist/esm/index.native.js.map +1 -1
  161. package/dist/esm/minifyCSS.native.js.map +3 -3
  162. package/dist/esm/registerRequire.native.js +56 -28
  163. package/dist/esm/registerRequire.native.js.map +3 -3
  164. package/dist/esm/server.native.js +175 -21
  165. package/dist/esm/server.native.js.map +3 -3
  166. package/dist/esm/setup.native.js.map +3 -3
  167. package/dist/esm/static.native.js.map +3 -3
  168. package/dist/esm/webpackPlugin.native.js +26 -5
  169. package/dist/esm/webpackPlugin.native.js.map +3 -3
  170. package/package.json +14 -15
  171. package/src/extractor/bundle.ts +5 -2
  172. package/src/extractor/loadTamagui.ts +3 -2
  173. package/types/extractor/bundle.d.ts.map +1 -1
  174. package/types/extractor/loadTamagui.d.ts.map +1 -1
  175. package/tamagui.tsconfig.json +0 -5
@@ -1,46 +1,36 @@
1
1
  import * as t from "@babel/types";
2
- const buildClassName = (objectsIn, extras = "") => {
3
- let objects = buildClassNameLogic(objectsIn);
4
- return objects ? (t.isStringLiteral(objects) ? objects.value = `${extras} ${objects.value}` : objects = t.binaryExpression("+", t.stringLiteral(extras), objects), objects) : null;
5
- }, buildClassNameLogic = (objects) => objects.reduce((acc, val) => {
6
- if (acc == null)
7
- return (
8
- // pass conditional expressions through
9
- t.isConditionalExpression(val) || // pass non-null literals through
10
- t.isStringLiteral(val) || t.isNumericLiteral(val) ? val : t.logicalExpression("||", val, t.stringLiteral(""))
11
- );
12
- let inner;
13
- if (t.isStringLiteral(val)) {
14
- if (t.isStringLiteral(acc))
15
- return t.stringLiteral(`${acc.value} ${val.value}`);
16
- inner = t.stringLiteral(` ${val.value}`);
17
- } else if (t.isLiteral(val))
18
- inner = t.binaryExpression("+", t.stringLiteral(" "), val);
19
- else if (t.isConditionalExpression(val) || t.isBinaryExpression(val)) {
20
- if (t.isStringLiteral(acc))
21
- return t.binaryExpression("+", t.stringLiteral(`${acc.value} `), val);
22
- inner = t.binaryExpression("+", t.stringLiteral(" "), val);
23
- } else if (t.isIdentifier(val) || t.isMemberExpression(val))
24
- inner = t.conditionalExpression(
25
- val,
26
- t.binaryExpression("+", t.stringLiteral(" "), val),
27
- t.stringLiteral("")
28
- );
29
- else {
30
- if (t.isStringLiteral(acc))
31
- return t.binaryExpression(
32
- "+",
33
- t.stringLiteral(`${acc.value} `),
34
- t.logicalExpression("||", val, t.stringLiteral(""))
2
+ var buildClassName = function(objectsIn) {
3
+ var extras = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", objects = buildClassNameLogic(objectsIn);
4
+ return objects ? (t.isStringLiteral(objects) ? objects.value = "".concat(extras, " ").concat(objects.value) : objects = t.binaryExpression("+", t.stringLiteral(extras), objects), objects) : null;
5
+ }, buildClassNameLogic = function(objects) {
6
+ return objects.reduce(function(acc, val) {
7
+ if (acc == null)
8
+ return (
9
+ // pass conditional expressions through
10
+ t.isConditionalExpression(val) || // pass non-null literals through
11
+ t.isStringLiteral(val) || t.isNumericLiteral(val) ? val : t.logicalExpression("||", val, t.stringLiteral(""))
35
12
  );
36
- inner = t.binaryExpression(
37
- "+",
38
- t.stringLiteral(" "),
39
- t.logicalExpression("||", val, t.stringLiteral(""))
40
- );
41
- }
42
- return t.binaryExpression("+", acc, inner);
43
- }, null);
13
+ var inner;
14
+ if (t.isStringLiteral(val)) {
15
+ if (t.isStringLiteral(acc))
16
+ return t.stringLiteral("".concat(acc.value, " ").concat(val.value));
17
+ inner = t.stringLiteral(" ".concat(val.value));
18
+ } else if (t.isLiteral(val))
19
+ inner = t.binaryExpression("+", t.stringLiteral(" "), val);
20
+ else if (t.isConditionalExpression(val) || t.isBinaryExpression(val)) {
21
+ if (t.isStringLiteral(acc))
22
+ return t.binaryExpression("+", t.stringLiteral("".concat(acc.value, " ")), val);
23
+ inner = t.binaryExpression("+", t.stringLiteral(" "), val);
24
+ } else if (t.isIdentifier(val) || t.isMemberExpression(val))
25
+ inner = t.conditionalExpression(val, t.binaryExpression("+", t.stringLiteral(" "), val), t.stringLiteral(""));
26
+ else {
27
+ if (t.isStringLiteral(acc))
28
+ return t.binaryExpression("+", t.stringLiteral("".concat(acc.value, " ")), t.logicalExpression("||", val, t.stringLiteral("")));
29
+ inner = t.binaryExpression("+", t.stringLiteral(" "), t.logicalExpression("||", val, t.stringLiteral("")));
30
+ }
31
+ return t.binaryExpression("+", acc, inner);
32
+ }, null);
33
+ };
44
34
  export {
45
35
  buildClassName,
46
36
  buildClassNameLogic
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/extractor/buildClassName.ts"],
4
- "mappings": "AAAA,YAAY,OAAO;AASZ,MAAM,iBAA0B,CAAC,WAAW,SAAS,OAAO;AACjE,MAAI,UAAU,oBAAoB,SAAS;AAC3C,SAAK,WACD,EAAE,gBAAgB,OAAO,IAE3B,QAAQ,QAAQ,GAAG,MAAM,IAAI,QAAQ,KAAK,KAE1C,UAAU,EAAE,iBAAiB,KAAK,EAAE,cAAc,MAAM,GAAG,OAAO,GAE7D,WAPc;AAQvB,GAEa,sBAA+B,CAAC,YACpC,QAAQ,OAA4B,CAAC,KAAK,QAAQ;AACvD,MAAI,OAAO;AACT;AAAA;AAAA,MAEE,EAAE,wBAAwB,GAAG;AAAA,MAE7B,EAAE,gBAAgB,GAAG,KACrB,EAAE,iBAAiB,GAAG,IAEf,MAEF,EAAE,kBAAkB,MAAM,KAAK,EAAE,cAAc,EAAE,CAAC;AAAA;AAG3D,MAAI;AACJ,MAAI,EAAE,gBAAgB,GAAG,GAAG;AAC1B,QAAI,EAAE,gBAAgB,GAAG;AAEvB,aAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,IAAI,KAAK,EAAE;AAEpD,YAAQ,EAAE,cAAc,IAAI,IAAI,KAAK,EAAE;AAAA,EACzC,WAAW,EAAE,UAAU,GAA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GAAAA,GAC9CZ,EAAES,cAAc,EAAA,CAAA;SAEb;AACL,UAAIT,EAAEM,gBAAgBK,GAAAA;AACpB,eAAOX,EAAEQ,iBACP,KACAR,EAAES,cAAe,GAAY,OAAVE,IAAIJ,OAAM,GAAA,CAAA,GAC7BP,EAAEe,kBAAkB,MAAMH,KAAKZ,EAAES,cAAc,EAAA,CAAA,CAAA;AAInDO,cAAQhB,EAAEQ,iBACR,KACAR,EAAES,cAAc,GAAA,GAChBT,EAAEe,kBAAkB,MAAMH,KAAKZ,EAAES,cAAc,EAAA,CAAA,CAAA;IAEnD;AAEA,WAAOT,EAAEQ,iBAAiB,KAAKG,KAAKK,KAAAA;EACtC,GAAG,IAAA;AACL;",
5
+ "names": ["t", "buildClassName", "objectsIn", "extras", "objects", "buildClassNameLogic", "isStringLiteral", "value", "binaryExpression", "stringLiteral", "reduce", "acc", "val", "isConditionalExpression", "isNumericLiteral", "logicalExpression", "inner", "isLiteral", "isBinaryExpression", "isIdentifier", "isMemberExpression", "conditionalExpression"]
6
6
  }
@@ -30,9 +30,7 @@ const esbuildLoaderConfig = {
30
30
  (k) => esbuildLoaderConfig[k] === "file" || esbuildLoaderConfig[k] === "dataurl"
31
31
  ).map((k) => k.slice(1)), esbuildIgnoreFilesRegex = new RegExp(`.(${dataExtensions.join("|")})$`, "i");
32
32
  function getESBuildConfig({ entryPoints, resolvePlatformSpecificEntries, ...options }, platform, aliases) {
33
- process.env.DEBUG?.startsWith("tamagui") && console.info("Building", entryPoints);
34
- const tsconfig = join(__dirname, "..", "..", "..", "tamagui.tsconfig.json");
35
- return {
33
+ return process.env.DEBUG?.startsWith("tamagui") && console.info("Building", entryPoints), {
36
34
  bundle: !0,
37
35
  entryPoints: resolvePlatformSpecificEntries ? entryPoints.map(resolveWebOrNativeSpecificEntry) : entryPoints,
38
36
  format: "cjs",
@@ -52,7 +50,11 @@ function getESBuildConfig({ entryPoints, resolvePlatformSpecificEntries, ...opti
52
50
  ".js"
53
51
  ],
54
52
  platform: "node",
55
- tsconfig,
53
+ tsconfigRaw: {
54
+ compilerOptions: {
55
+ jsx: "react-jsx"
56
+ }
57
+ },
56
58
  loader: esbuildLoaderConfig,
57
59
  logLevel: "warning",
58
60
  plugins: [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/extractor/bundle.ts"],
4
- "mappings": "AAAA,SAAS,UAAU,SAAS,YAAY;AAExC,OAAO,aAAa;AACpB,SAAS,YAAY,MAAM,iBAAiB;AAG5C,SAAS,0BAA0B;AACnC,SAAS,uCAAuC;AAEzC,MAAM,sBAAsB;AAAA,EACjC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AACX,GAEM,iBAAiB,OAAO,KAAK,mBAAmB,EACnD;AAAA,EACC,CAAC,MAAM,oBAAoB,CAAC,MAAM,UAAU,oBAAoB,CAAC,MAAM;AACzE,EACC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAEX,0BAA0B,IAAI,OAAO,KAAM,eAAe,KAAK,GAAG,CAAC,MAAM,GAAG;AAYzF,SAAS,iBACP,EAAE,aAAa,gCAAgC,GAAG,QAAQ,GAC1D,UACA,SACA;AACA,EAAI,QAAQ,IAAI,OAAO,WAAW,SAAS,KACzC,QAAQ,KAAK,YAAY,WAAW;AAEtC,QAAM,WAAW,KAAK,WAAW,MAAM,MAAM,MAAM,uBAAuB;AAyE1E,SAnEkC;AAAA,IAChC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MAAM;AAAA,YACN,UAAU;AAAA,UACZ,EACD,GAED,MAAM,UAAU,EAAE,QAAQ,0BAA0B,GAAG,CAAC,UAC/C;AAAA,YACL,MAAM;AAAA,YACN,UAAU;AAAA,UACZ,EACD;AAAA,QACH;AAAA,MACF;AAAA,MACA,mBAAmB;AAAA,QACjB,GAAG;AAAA,MACL,CAAC;AAAA,IACH;AAAA,IACA,GAAG;AAAA,EACL;AAGF;AAEA,eAAsB,OACpB,OACA,UACA,SACA;AACA,QAAM,UAAU,KAAK;AACrB,QAAM,SAAS,iBAAiB,OAAO,UAAU,OAAO;AACxD,SAAO,QAAQ,MAAM,MAAM;AAC7B;AAGA,eAAe,UAAU,OAAc;AACrC,QAAM,WAAW,KAAK,QAAQ,MAAM,OAAO,GAAG,SAAS,MAAM,SAAS,OAAO,CAAC,GACxE,WAAW,MAAM,KAAK,QAAQ,EAAE,MAAM,MAAM;AAAA,EAElD,CAAC;AAID,OAHqB,YAEjB,oBAAI,KAAK,GAAE,QAAQ,IAAI,IAAI,KAAK,SAAS,KAAK,EAAE,QAAQ,IADxD,SAEc,KAAK;AACrB,IAAI,QAAQ,IAAI,OAAO,WAAW,SAAS,KACzC,QAAQ,KAAK,8BAA8B,MAAM,WAAW;AAE9D,QAAI,QAAQ;AACZ,WAAO,WAAS;AACd,UAAI,MAAM,WAAW,MAAM,OAAO;AAChC;AAEF,YAAM,IAAI,QAAQ,CAAC,QAAQ,WAAW,KAAK,EAAE,CAAC;AAAA,IAChD;AAAA,EACF;AACA,EAAK,UAAU,UAAU,EAAE;AAC7B;",
5
5
  "names": []
6
6
  }
@@ -34,9 +34,7 @@ function getESBuildConfig({
34
34
  resolvePlatformSpecificEntries,
35
35
  ...options
36
36
  }, platform, aliases) {
37
- process.env.DEBUG?.startsWith("tamagui") && console.info("Building", entryPoints);
38
- const tsconfig = join(__dirname, "..", "..", "..", "tamagui.tsconfig.json");
39
- return {
37
+ return process.env.DEBUG?.startsWith("tamagui") && console.info("Building", entryPoints), {
40
38
  bundle: !0,
41
39
  entryPoints: resolvePlatformSpecificEntries ? entryPoints.map(resolveWebOrNativeSpecificEntry) : entryPoints,
42
40
  format: "cjs",
@@ -47,7 +45,11 @@ function getESBuildConfig({
47
45
  keepNames: !0,
48
46
  resolveExtensions: [".web.tsx", ".web.ts", ".web.jsx", ".web.js", ".tsx", ".ts", ".jsx", ".js"],
49
47
  platform: "node",
50
- tsconfig,
48
+ tsconfigRaw: {
49
+ compilerOptions: {
50
+ jsx: "react-jsx"
51
+ }
52
+ },
51
53
  loader: esbuildLoaderConfig,
52
54
  logLevel: "warning",
53
55
  plugins: [{
@@ -94,7 +96,7 @@ async function bundle(props, platform, aliases) {
94
96
  async function asyncLock(props) {
95
97
  const lockFile = join(dirname(props.outfile), basename(props.outfile, ".lock")),
96
98
  lockStat = await stat(lockFile).catch(() => {});
97
- if ((lockStat ? /* @__PURE__ */new Date().getTime() - new Date(lockStat.mtime).getTime() : 1 / 0) < 500) {
99
+ if ((lockStat ? ( /* @__PURE__ */new Date()).getTime() - new Date(lockStat.mtime).getTime() : 1 / 0) < 500) {
98
100
  process.env.DEBUG?.startsWith("tamagui") && console.info("Waiting for existing build", props.entryPoints);
99
101
  let tries = 5;
100
102
  for (; tries--;) {
@@ -3,7 +3,191 @@ import esbuild from "esbuild";
3
3
  import { pathExists, stat, writeFile } from "fs-extra";
4
4
  import { esbuildAliasPlugin } from "./esbuildAliasPlugin";
5
5
  import { resolveWebOrNativeSpecificEntry } from "./loadTamagui";
6
- const esbuildLoaderConfig = {
6
+ function _array_like_to_array(arr, len) {
7
+ (len == null || len > arr.length) && (len = arr.length);
8
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
9
+ arr2[i] = arr[i];
10
+ return arr2;
11
+ }
12
+ function _array_without_holes(arr) {
13
+ if (Array.isArray(arr))
14
+ return _array_like_to_array(arr);
15
+ }
16
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
17
+ try {
18
+ var info = gen[key](arg), value = info.value;
19
+ } catch (error) {
20
+ reject(error);
21
+ return;
22
+ }
23
+ info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
24
+ }
25
+ function _async_to_generator(fn) {
26
+ return function() {
27
+ var self = this, args = arguments;
28
+ return new Promise(function(resolve, reject) {
29
+ var gen = fn.apply(self, args);
30
+ function _next(value) {
31
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
32
+ }
33
+ function _throw(err) {
34
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
35
+ }
36
+ _next(void 0);
37
+ });
38
+ };
39
+ }
40
+ function _define_property(obj, key, value) {
41
+ return key in obj ? Object.defineProperty(obj, key, {
42
+ value,
43
+ enumerable: !0,
44
+ configurable: !0,
45
+ writable: !0
46
+ }) : obj[key] = value, obj;
47
+ }
48
+ function _iterable_to_array(iter) {
49
+ if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
50
+ return Array.from(iter);
51
+ }
52
+ function _non_iterable_spread() {
53
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
54
+ }
55
+ function _object_spread(target) {
56
+ for (var i = 1; i < arguments.length; i++) {
57
+ var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
58
+ typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
59
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
60
+ }))), ownKeys.forEach(function(key) {
61
+ _define_property(target, key, source[key]);
62
+ });
63
+ }
64
+ return target;
65
+ }
66
+ function _object_without_properties(source, excluded) {
67
+ if (source == null)
68
+ return {};
69
+ var target = _object_without_properties_loose(source, excluded), key, i;
70
+ if (Object.getOwnPropertySymbols) {
71
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
72
+ for (i = 0; i < sourceSymbolKeys.length; i++)
73
+ key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
74
+ }
75
+ return target;
76
+ }
77
+ function _object_without_properties_loose(source, excluded) {
78
+ if (source == null)
79
+ return {};
80
+ var target = {}, sourceKeys = Object.keys(source), key, i;
81
+ for (i = 0; i < sourceKeys.length; i++)
82
+ key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
83
+ return target;
84
+ }
85
+ function _to_consumable_array(arr) {
86
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
87
+ }
88
+ function _unsupported_iterable_to_array(o, minLen) {
89
+ if (o) {
90
+ if (typeof o == "string")
91
+ return _array_like_to_array(o, minLen);
92
+ var n = Object.prototype.toString.call(o).slice(8, -1);
93
+ if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
94
+ return Array.from(n);
95
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
96
+ return _array_like_to_array(o, minLen);
97
+ }
98
+ }
99
+ function _ts_generator(thisArg, body) {
100
+ var f, y, t, g, _ = {
101
+ label: 0,
102
+ sent: function() {
103
+ if (t[0] & 1)
104
+ throw t[1];
105
+ return t[1];
106
+ },
107
+ trys: [],
108
+ ops: []
109
+ };
110
+ return g = {
111
+ next: verb(0),
112
+ throw: verb(1),
113
+ return: verb(2)
114
+ }, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
115
+ return this;
116
+ }), g;
117
+ function verb(n) {
118
+ return function(v) {
119
+ return step([
120
+ n,
121
+ v
122
+ ]);
123
+ };
124
+ }
125
+ function step(op) {
126
+ if (f)
127
+ throw new TypeError("Generator is already executing.");
128
+ for (; _; )
129
+ try {
130
+ if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
131
+ return t;
132
+ switch (y = 0, t && (op = [
133
+ op[0] & 2,
134
+ t.value
135
+ ]), op[0]) {
136
+ case 0:
137
+ case 1:
138
+ t = op;
139
+ break;
140
+ case 4:
141
+ return _.label++, {
142
+ value: op[1],
143
+ done: !1
144
+ };
145
+ case 5:
146
+ _.label++, y = op[1], op = [
147
+ 0
148
+ ];
149
+ continue;
150
+ case 7:
151
+ op = _.ops.pop(), _.trys.pop();
152
+ continue;
153
+ default:
154
+ if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
155
+ _ = 0;
156
+ continue;
157
+ }
158
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
159
+ _.label = op[1];
160
+ break;
161
+ }
162
+ if (op[0] === 6 && _.label < t[1]) {
163
+ _.label = t[1], t = op;
164
+ break;
165
+ }
166
+ if (t && _.label < t[2]) {
167
+ _.label = t[2], _.ops.push(op);
168
+ break;
169
+ }
170
+ t[2] && _.ops.pop(), _.trys.pop();
171
+ continue;
172
+ }
173
+ op = body.call(thisArg, _);
174
+ } catch (e) {
175
+ op = [
176
+ 6,
177
+ e
178
+ ], y = 0;
179
+ } finally {
180
+ f = t = 0;
181
+ }
182
+ if (op[0] & 5)
183
+ throw op[1];
184
+ return {
185
+ value: op[0] ? op[1] : void 0,
186
+ done: !0
187
+ };
188
+ }
189
+ }
190
+ var esbuildLoaderConfig = {
7
191
  ".js": "jsx",
8
192
  ".png": "dataurl",
9
193
  ".jpg": "dataurl",
@@ -26,84 +210,165 @@ const esbuildLoaderConfig = {
26
210
  ".aac": "file",
27
211
  ".ogg": "file",
28
212
  ".flac": "file"
29
- }, dataExtensions = Object.keys(esbuildLoaderConfig).filter(
30
- (k) => esbuildLoaderConfig[k] === "file" || esbuildLoaderConfig[k] === "dataurl"
31
- ).map((k) => k.slice(1)), esbuildIgnoreFilesRegex = new RegExp(`.(${dataExtensions.join("|")})$`, "i");
32
- function getESBuildConfig({ entryPoints, resolvePlatformSpecificEntries, ...options }, platform, aliases) {
33
- var _a;
34
- (_a = process.env.DEBUG) != null && _a.startsWith("tamagui") && console.info("Building", entryPoints);
35
- const tsconfig = join(__dirname, "..", "..", "..", "tamagui.tsconfig.json");
36
- return {
213
+ }, dataExtensions = Object.keys(esbuildLoaderConfig).filter(function(k) {
214
+ return esbuildLoaderConfig[k] === "file" || esbuildLoaderConfig[k] === "dataurl";
215
+ }).map(function(k) {
216
+ return k.slice(1);
217
+ }), esbuildIgnoreFilesRegex = new RegExp(".(".concat(dataExtensions.join("|"), ")$"), "i");
218
+ function getESBuildConfig(_param, platform, aliases) {
219
+ var entryPoints = _param.entryPoints, resolvePlatformSpecificEntries = _param.resolvePlatformSpecificEntries, options = _object_without_properties(_param, [
220
+ "entryPoints",
221
+ "resolvePlatformSpecificEntries"
222
+ ]), _process_env_DEBUG;
223
+ !((_process_env_DEBUG = process.env.DEBUG) === null || _process_env_DEBUG === void 0) && _process_env_DEBUG.startsWith("tamagui") && console.info("Building", entryPoints);
224
+ var resolvedEntryPoints = resolvePlatformSpecificEntries ? entryPoints.map(resolveWebOrNativeSpecificEntry) : entryPoints, res = _object_spread({
37
225
  bundle: !0,
38
- entryPoints: resolvePlatformSpecificEntries ? entryPoints.map(resolveWebOrNativeSpecificEntry) : entryPoints,
226
+ entryPoints: resolvedEntryPoints,
39
227
  format: "cjs",
40
228
  target: "node16",
41
229
  jsx: "transform",
42
230
  jsxFactory: "react",
43
231
  allowOverwrite: !0,
44
232
  keepNames: !0,
45
- resolveExtensions: [
233
+ resolveExtensions: _to_consumable_array([
46
234
  ".native.tsx",
47
235
  ".native.ts",
48
236
  ".native.jsx",
49
- ".native.js",
237
+ ".native.js"
238
+ ]).concat([
50
239
  ".tsx",
51
240
  ".ts",
52
241
  ".jsx",
53
242
  ".js"
54
- ],
243
+ ]),
55
244
  platform: "node",
56
- tsconfig,
245
+ tsconfigRaw: {
246
+ compilerOptions: {
247
+ jsx: "react-jsx"
248
+ }
249
+ },
57
250
  loader: esbuildLoaderConfig,
58
251
  logLevel: "warning",
59
252
  plugins: [
60
253
  {
61
254
  name: "external",
62
- setup(build) {
63
- build.onResolve({ filter: /@tamagui\/core/ }, (args) => ({
64
- path: platform === "native" ? "@tamagui/core/native" : "@tamagui/core",
65
- external: !0
66
- })), build.onResolve({ filter: /react-native\/package.json$/ }, (args) => ({
67
- path: "react-native/package.json",
68
- external: !0
69
- })), build.onResolve({ filter: /@tamagui\/web/ }, (args) => ({
70
- path: platform === "native" ? "@tamagui/core/native" : "@tamagui/core",
71
- external: !0
72
- })), build.onResolve({ filter: /^(react-native|react-native\/.*)$/ }, (args) => ({
73
- path: "react-native-web-lite",
74
- external: !0
75
- })), build.onResolve({ filter: /react-native-reanimated/ }, (args) => ({
76
- path: "react-native-reanimated",
77
- external: !0
78
- }));
255
+ setup: function(build) {
256
+ build.onResolve({
257
+ filter: /@tamagui\/core/
258
+ }, function(args) {
259
+ return {
260
+ path: platform === "native" ? "@tamagui/core/native" : "@tamagui/core",
261
+ external: !0
262
+ };
263
+ }), build.onResolve({
264
+ filter: /react-native\/package.json$/
265
+ }, function(args) {
266
+ return {
267
+ path: "react-native/package.json",
268
+ external: !0
269
+ };
270
+ }), build.onResolve({
271
+ filter: /@tamagui\/web/
272
+ }, function(args) {
273
+ return {
274
+ path: platform === "native" ? "@tamagui/core/native" : "@tamagui/core",
275
+ external: !0
276
+ };
277
+ }), build.onResolve({
278
+ filter: /^(react-native|react-native\/.*)$/
279
+ }, function(args) {
280
+ return {
281
+ path: "react-native-web-lite",
282
+ external: !0
283
+ };
284
+ }), build.onResolve({
285
+ filter: /react-native-reanimated/
286
+ }, function(args) {
287
+ return {
288
+ path: "react-native-reanimated",
289
+ external: !0
290
+ };
291
+ });
79
292
  }
80
293
  },
81
- esbuildAliasPlugin({
82
- ...aliases
83
- })
84
- ],
85
- ...options
86
- };
294
+ esbuildAliasPlugin(_object_spread({}, aliases))
295
+ ]
296
+ }, options);
297
+ return res;
87
298
  }
88
- async function bundle(props, platform, aliases) {
89
- await asyncLock(props);
90
- const config = getESBuildConfig(props, platform, aliases);
91
- return esbuild.build(config);
92
- }
93
- async function asyncLock(props) {
94
- var _a;
95
- const lockFile = join(dirname(props.outfile), basename(props.outfile, ".lock")), lockStat = await stat(lockFile).catch(() => {
96
- });
97
- if ((lockStat ? (/* @__PURE__ */ new Date()).getTime() - new Date(lockStat.mtime).getTime() : 1 / 0) < 500) {
98
- (_a = process.env.DEBUG) != null && _a.startsWith("tamagui") && console.info("Waiting for existing build", props.entryPoints);
99
- let tries = 5;
100
- for (; tries--; ) {
101
- if (await pathExists(props.outfile))
102
- return;
103
- await new Promise((res) => setTimeout(res, 50));
104
- }
105
- }
106
- writeFile(lockFile, "");
299
+ function bundle(props, platform, aliases) {
300
+ return _bundle.apply(this, arguments);
301
+ }
302
+ function _bundle() {
303
+ return _bundle = _async_to_generator(function(props, platform, aliases) {
304
+ var config;
305
+ return _ts_generator(this, function(_state) {
306
+ switch (_state.label) {
307
+ case 0:
308
+ return [
309
+ 4,
310
+ asyncLock(props)
311
+ ];
312
+ case 1:
313
+ return _state.sent(), config = getESBuildConfig(props, platform, aliases), [
314
+ 2,
315
+ esbuild.build(config)
316
+ ];
317
+ }
318
+ });
319
+ }), _bundle.apply(this, arguments);
320
+ }
321
+ function asyncLock(props) {
322
+ return _asyncLock.apply(this, arguments);
323
+ }
324
+ function _asyncLock() {
325
+ return _asyncLock = // until i do fancier things w plugins:
326
+ _async_to_generator(function(props) {
327
+ var lockFile, lockStat, lockedMsAgo, _process_env_DEBUG, tries;
328
+ return _ts_generator(this, function(_state) {
329
+ switch (_state.label) {
330
+ case 0:
331
+ return lockFile = join(dirname(props.outfile), basename(props.outfile, ".lock")), [
332
+ 4,
333
+ stat(lockFile).catch(function() {
334
+ })
335
+ ];
336
+ case 1:
337
+ if (lockStat = _state.sent(), lockedMsAgo = lockStat ? (/* @__PURE__ */ new Date()).getTime() - new Date(lockStat.mtime).getTime() : 1 / 0, !(lockedMsAgo < 500))
338
+ return [
339
+ 3,
340
+ 5
341
+ ];
342
+ !((_process_env_DEBUG = process.env.DEBUG) === null || _process_env_DEBUG === void 0) && _process_env_DEBUG.startsWith("tamagui") && console.info("Waiting for existing build", props.entryPoints), tries = 5, _state.label = 2;
343
+ case 2:
344
+ return tries-- ? [
345
+ 4,
346
+ pathExists(props.outfile)
347
+ ] : [
348
+ 3,
349
+ 5
350
+ ];
351
+ case 3:
352
+ return _state.sent() ? [
353
+ 2
354
+ ] : [
355
+ 4,
356
+ new Promise(function(res) {
357
+ return setTimeout(res, 50);
358
+ })
359
+ ];
360
+ case 4:
361
+ return _state.sent(), [
362
+ 3,
363
+ 2
364
+ ];
365
+ case 5:
366
+ return writeFile(lockFile, ""), [
367
+ 2
368
+ ];
369
+ }
370
+ });
371
+ }), _asyncLock.apply(this, arguments);
107
372
  }
108
373
  export {
109
374
  bundle,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/extractor/bundle.ts"],
4
- "mappings": "AAAA,SAAS,UAAU,SAAS,YAAY;AAExC,OAAO,aAAa;AACpB,SAAS,YAAY,MAAM,iBAAiB;AAG5C,SAAS,0BAA0B;AACnC,SAAS,uCAAuC;AAEzC,MAAM,sBAAsB;AAAA,EACjC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AACX,GAEM,iBAAiB,OAAO,KAAK,mBAAmB,EACnD;AAAA,EACC,CAAC,MAAM,oBAAoB,CAAC,MAAM,U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AAAA;;;;EACvB,CAAA,GARsBrB,QAAAA,MAAAA,MAAAA,SAAAA;;SAWPsB,UAAUF,OAAY;SAAtBE,WAAAA,MAAAA,MAAAA,SAAAA;;SAAAA,aAAAA;AAAAA;EAAf,oBAAA,SAAyBF,OAAY;QAC7BG,UACAC,UAGAC,aAIAjC,oBAGAkC;;;;AAXAH,4BAAWtD,KAAKD,QAAQoD,MAAMO,OAAO,GAAG5D,SAASqD,MAAMO,SAAS,OAAA,CAAA,GACrD;;YAAMvD,KAAKmD,QAAAA,EAAUK,MAAM,WAAA;YAE5C,CAAA;;;cAFMJ,WAAW,OAAA,KAAA,GAGXC,cAAeD,YAEjB,oBAAIK,KAAAA,GAAOC,QAAO,IAAK,IAAID,KAAKL,SAASO,KAAK,EAAED,QAAO,IADvDE,SAEAP,cAAc;AAAdA,mBAAAA;;;;AACF,UAAIjC,wBAAAA,QAAQC,IAAIC,WAAK,QAAjBF,uBAAAA,WAAAA,mBAAmBG,WAAW,SAAA,KAChCC,QAAQC,KAAM,8BAA6BuB,MAAM/B,WAAW,GAE1DqC,QAAQ;;iBACLA,UACD;;YAAMvD,WAAWiD,MAAMO,OAAO;cAD7BD;;;;;AACL,iBAAI,OAAA,KAAA,IACF;;cAEF;;YAAM,IAAIO,QAAQ,SAAClC,KAAAA;qBAAQmC,WAAWnC,KAAK,EAAA;;;;AAA3C,wBAAA,KAAA;;;;;AAGJ,iBAAK1B,UAAUkD,UAAU,EAAA;;;;;EAC3B,CAAA,GArBeD,WAAAA,MAAAA,MAAAA,SAAAA;;",
5
+ "names": ["basename", "dirname", "join", "esbuild", "pathExists", "stat", "writeFile", "esbuildAliasPlugin", "resolveWebOrNativeSpecificEntry", "esbuildLoaderConfig", "dataExtensions", "Object", "keys", "filter", "k", "map", "slice", "esbuildIgnoreFilesRegex", "RegExp", "getESBuildConfig", "platform", "aliases", "entryPoints", "resolvePlatformSpecificEntries", "options", "process", "env", "DEBUG", "startsWith", "console", "info", "resolvedEntryPoints", "res", "bundle", "format", "target", "jsx", "jsxFactory", "allowOverwrite", "keepNames", "resolveExtensions", "tsconfigRaw", "compilerOptions", "loader", "logLevel", "plugins", "name", "setup", "build", "onResolve", "args", "path", "external", "props", "config", "asyncLock", "lockFile", "lockStat", "lockedMsAgo", "tries", "outfile", "catch", "Date", "getTime", "mtime", "Infinity", "Promise", "setTimeout"]
6
6
  }