@bitfab/sdk 0.65.4 → 0.65.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/dist/autoTrace-CQw0qMBt.cjs +396 -0
  2. package/dist/autoTrace-CQw0qMBt.cjs.map +1 -0
  3. package/dist/autoTrace-O40k8f5M.js +271 -0
  4. package/dist/autoTrace-O40k8f5M.js.map +1 -0
  5. package/dist/autoTrace.cjs +15 -353
  6. package/dist/autoTrace.d.cts +48 -44
  7. package/dist/autoTrace.d.ts +48 -44
  8. package/dist/autoTrace.js +1 -28
  9. package/dist/babelPlugin-C70OxrqA.js +209 -0
  10. package/dist/babelPlugin-C70OxrqA.js.map +1 -0
  11. package/dist/babelPlugin-Nta4-VcL.cjs +232 -0
  12. package/dist/babelPlugin-Nta4-VcL.cjs.map +1 -0
  13. package/dist/http-lnqCEnB1.js +2154 -0
  14. package/dist/http-lnqCEnB1.js.map +1 -0
  15. package/dist/index-CFOLQ1IF.d.cts +4410 -0
  16. package/dist/index-CFOLQ1IF.d.ts +4410 -0
  17. package/dist/index.cjs +48 -12504
  18. package/dist/index.d.cts +2 -4443
  19. package/dist/index.d.ts +2 -4443
  20. package/dist/index.js +3 -96
  21. package/dist/loaderRuntime-0huddOOP.d.ts +12 -0
  22. package/dist/loaderRuntime-CslfDFO7.d.cts +12 -0
  23. package/dist/node.cjs +56 -12520
  24. package/dist/node.cjs.map +1 -1
  25. package/dist/node.d.cts +2 -1
  26. package/dist/node.d.ts +2 -1
  27. package/dist/node.js +10 -105
  28. package/dist/node.js.map +1 -1
  29. package/dist/registryCommand-Di8x0YoJ.js +1111 -0
  30. package/dist/registryCommand-Di8x0YoJ.js.map +1 -0
  31. package/dist/replayCli.js +49 -87
  32. package/dist/replayCli.js.map +1 -1
  33. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  34. package/dist/seedCli.js +10 -24
  35. package/dist/seedCli.js.map +1 -1
  36. package/dist/src-BungStQw.js +6015 -0
  37. package/dist/src-BungStQw.js.map +1 -0
  38. package/dist/src-FFSCRXpz.cjs +8438 -0
  39. package/dist/src-FFSCRXpz.cjs.map +1 -0
  40. package/dist/transform/babel.cjs +5 -422
  41. package/dist/transform/babel.d.cts +16 -16
  42. package/dist/transform/babel.d.ts +16 -16
  43. package/dist/transform/babel.js +1 -7
  44. package/dist/transform/bun.cjs +9 -478
  45. package/dist/transform/bun.cjs.map +1 -1
  46. package/dist/transform/bun.d.cts +5 -7
  47. package/dist/transform/bun.d.ts +5 -7
  48. package/dist/transform/bun.js +6 -11
  49. package/dist/transform/bun.js.map +1 -1
  50. package/dist/transform/esbuild.cjs +9 -478
  51. package/dist/transform/esbuild.cjs.map +1 -1
  52. package/dist/transform/esbuild.d.cts +5 -7
  53. package/dist/transform/esbuild.d.ts +5 -7
  54. package/dist/transform/esbuild.js +6 -11
  55. package/dist/transform/esbuild.js.map +1 -1
  56. package/dist/transform/loaderRuntime.cjs +85 -532
  57. package/dist/transform/loaderRuntime.cjs.map +1 -1
  58. package/dist/transform/loaderRuntime.d.cts +2 -12
  59. package/dist/transform/loaderRuntime.d.ts +2 -12
  60. package/dist/transform/loaderRuntime.js +56 -98
  61. package/dist/transform/loaderRuntime.js.map +1 -1
  62. package/dist/transform/nest.cjs +12 -481
  63. package/dist/transform/nest.cjs.map +1 -1
  64. package/dist/transform/nest.d.cts +8 -9
  65. package/dist/transform/nest.d.ts +8 -9
  66. package/dist/transform/nest.js +9 -14
  67. package/dist/transform/nest.js.map +1 -1
  68. package/dist/transform/next.cjs +56 -528
  69. package/dist/transform/next.cjs.map +1 -1
  70. package/dist/transform/next.d.cts +25 -25
  71. package/dist/transform/next.d.ts +24 -24
  72. package/dist/transform/next.js +52 -60
  73. package/dist/transform/next.js.map +1 -1
  74. package/dist/transform/nodeLoader.js +260 -506
  75. package/dist/transform/nodeLoader.js.map +1 -1
  76. package/dist/transform/register.js +4 -1
  77. package/dist/transform/register.js.map +1 -1
  78. package/dist/transform/rolldown.cjs +9 -478
  79. package/dist/transform/rolldown.cjs.map +1 -1
  80. package/dist/transform/rolldown.d.cts +5 -7
  81. package/dist/transform/rolldown.d.ts +5 -7
  82. package/dist/transform/rolldown.js +6 -11
  83. package/dist/transform/rolldown.js.map +1 -1
  84. package/dist/transform/rollup.cjs +9 -478
  85. package/dist/transform/rollup.cjs.map +1 -1
  86. package/dist/transform/rollup.d.cts +5 -7
  87. package/dist/transform/rollup.d.ts +5 -7
  88. package/dist/transform/rollup.js +6 -11
  89. package/dist/transform/rollup.js.map +1 -1
  90. package/dist/transform/rsbuild.cjs +9 -478
  91. package/dist/transform/rsbuild.cjs.map +1 -1
  92. package/dist/transform/rsbuild.d.cts +5 -7
  93. package/dist/transform/rsbuild.d.ts +5 -7
  94. package/dist/transform/rsbuild.js +6 -11
  95. package/dist/transform/rsbuild.js.map +1 -1
  96. package/dist/transform/rspack.cjs +9 -478
  97. package/dist/transform/rspack.cjs.map +1 -1
  98. package/dist/transform/rspack.d.cts +5 -7
  99. package/dist/transform/rspack.d.ts +5 -7
  100. package/dist/transform/rspack.js +6 -11
  101. package/dist/transform/rspack.js.map +1 -1
  102. package/dist/transform/swc.cjs +18 -486
  103. package/dist/transform/swc.cjs.map +1 -1
  104. package/dist/transform/swc.d.cts +15 -14
  105. package/dist/transform/swc.d.ts +15 -14
  106. package/dist/transform/swc.js +14 -32
  107. package/dist/transform/swc.js.map +1 -1
  108. package/dist/transform/unplugin.cjs +20 -476
  109. package/dist/transform/unplugin.cjs.map +1 -1
  110. package/dist/transform/unplugin.d.cts +4 -6
  111. package/dist/transform/unplugin.d.ts +4 -6
  112. package/dist/transform/unplugin.js +19 -8
  113. package/dist/transform/unplugin.js.map +1 -1
  114. package/dist/transform/vite.cjs +9 -478
  115. package/dist/transform/vite.cjs.map +1 -1
  116. package/dist/transform/vite.d.cts +5 -7
  117. package/dist/transform/vite.d.ts +5 -7
  118. package/dist/transform/vite.js +6 -11
  119. package/dist/transform/vite.js.map +1 -1
  120. package/dist/transform/webpack.cjs +9 -478
  121. package/dist/transform/webpack.cjs.map +1 -1
  122. package/dist/transform/webpack.d.cts +5 -7
  123. package/dist/transform/webpack.d.ts +5 -7
  124. package/dist/transform/webpack.js +6 -11
  125. package/dist/transform/webpack.js.map +1 -1
  126. package/dist/transform-BcyUocwm.js +36 -0
  127. package/dist/transform-BcyUocwm.js.map +1 -0
  128. package/dist/transform-BjxHGGKc.cjs +47 -0
  129. package/dist/transform-BjxHGGKc.cjs.map +1 -0
  130. package/dist/transformOptions-BsjCELkh.d.cts +11 -0
  131. package/dist/transformOptions-BsjCELkh.d.ts +11 -0
  132. package/package.json +5 -5
  133. package/dist/autoTrace.cjs.map +0 -1
  134. package/dist/autoTrace.js.map +0 -1
  135. package/dist/chunk-27B3UBSS.js +0 -2547
  136. package/dist/chunk-27B3UBSS.js.map +0 -1
  137. package/dist/chunk-B2M4KELA.js +0 -1912
  138. package/dist/chunk-B2M4KELA.js.map +0 -1
  139. package/dist/chunk-I233ERUH.js +0 -2979
  140. package/dist/chunk-I233ERUH.js.map +0 -1
  141. package/dist/chunk-ISU6FQKY.js +0 -6877
  142. package/dist/chunk-ISU6FQKY.js.map +0 -1
  143. package/dist/chunk-MT36GJMW.js +0 -106
  144. package/dist/chunk-MT36GJMW.js.map +0 -1
  145. package/dist/chunk-PTCLRG4E.js +0 -28
  146. package/dist/chunk-PTCLRG4E.js.map +0 -1
  147. package/dist/chunk-QRNHRY7F.js +0 -270
  148. package/dist/chunk-QRNHRY7F.js.map +0 -1
  149. package/dist/chunk-R6M54SPO.js +0 -1176
  150. package/dist/chunk-R6M54SPO.js.map +0 -1
  151. package/dist/chunk-SOP5AFMH.js +0 -2060
  152. package/dist/chunk-SOP5AFMH.js.map +0 -1
  153. package/dist/chunk-YVJAOGHE.js +0 -45
  154. package/dist/chunk-YVJAOGHE.js.map +0 -1
  155. package/dist/chunk-ZG6SHKEF.js +0 -404
  156. package/dist/chunk-ZG6SHKEF.js.map +0 -1
  157. package/dist/http-LL3JD2JE.js +0 -24
  158. package/dist/http-LL3JD2JE.js.map +0 -1
  159. package/dist/http-QZDTQC3C.js +0 -23
  160. package/dist/http-QZDTQC3C.js.map +0 -1
  161. package/dist/index.cjs.map +0 -1
  162. package/dist/index.js.map +0 -1
  163. package/dist/replay-636XZIS2.js +0 -29
  164. package/dist/replay-636XZIS2.js.map +0 -1
  165. package/dist/replay-S4DNF4VR.js +0 -28
  166. package/dist/replay-S4DNF4VR.js.map +0 -1
  167. package/dist/transform/babel.cjs.map +0 -1
  168. package/dist/transform/babel.js.map +0 -1
  169. package/dist/transformOptions-Df2_Chtc.d.cts +0 -10
  170. package/dist/transformOptions-Df2_Chtc.d.ts +0 -10
@@ -1,564 +1,318 @@
1
- // ../bitfab-typescript-transform/src/nodeLoader.ts
2
- import { readFile } from "fs/promises";
3
1
  import { createRequire } from "module";
4
- import { isAbsolute, relative, resolve as resolvePath } from "path";
2
+ import { readFile } from "fs/promises";
3
+ import { dirname, isAbsolute, relative, resolve as resolve$1 } from "path";
5
4
  import { fileURLToPath, pathToFileURL } from "url";
6
-
7
- // ../bitfab-typescript-transform/src/loaderRuntime.ts
8
- import { dirname } from "path";
9
- import {
10
- transformFromAstSync,
11
- transformSync as transformSync2
12
- } from "@babel/core";
5
+ import { transformFromAstSync, transformSync } from "@babel/core";
13
6
  import decoratorsPlugin from "@babel/plugin-proposal-decorators";
14
7
  import commonJsPlugin from "@babel/plugin-transform-modules-commonjs";
15
8
  import reactJsxPlugin from "@babel/plugin-transform-react-jsx";
16
9
  import typeScriptPlugin from "@babel/plugin-transform-typescript";
17
10
  import { getTsconfig, parseTsconfig } from "get-tsconfig";
18
-
19
- // ../bitfab-typescript-transform/src/transformOptions.ts
20
- var AUTO_TRACE_FUNCTION_ID_VERSION = "ts-auto-v1";
21
- var AUTO_TRACE_TRANSFORM_MARKER = "__bitfab_auto_trace_transformed_v1__";
11
+ //#region ../bitfab-typescript-transform/src/transformOptions.ts
12
+ const AUTO_TRACE_FUNCTION_ID_VERSION = "ts-auto-v1";
13
+ const AUTO_TRACE_TRANSFORM_MARKER = "__bitfab_auto_trace_transformed_v1__";
22
14
  function autoTraceFunctionId(file, name) {
23
- return `${AUTO_TRACE_FUNCTION_ID_VERSION}:${file}#${name}`;
15
+ return `${AUTO_TRACE_FUNCTION_ID_VERSION}:${file}#${name}`;
24
16
  }
25
17
  function sourceFilename(filename) {
26
- return filename.replace(/\\/g, "/").split(/[?#]/, 1)[0] ?? "";
18
+ return filename.replace(/\\/g, "/").split(/[?#]/, 1)[0] ?? "";
27
19
  }
28
20
  function autoTraceFilename(filename, cwd) {
29
- const normalized = sourceFilename(filename);
30
- const normalizedCwd = cwd.replace(/\\/g, "/").replace(/\/$/, "");
31
- return normalized.startsWith(`${normalizedCwd}/`) ? normalized.slice(normalizedCwd.length + 1) : normalized;
21
+ const normalized = sourceFilename(filename);
22
+ const normalizedCwd = cwd.replace(/\\/g, "/").replace(/\/$/, "");
23
+ return normalized.startsWith(`${normalizedCwd}/`) ? normalized.slice(normalizedCwd.length + 1) : normalized;
32
24
  }
33
25
  function shouldTransformBitfabFile(filename, options) {
34
- if (!filename) {
35
- return false;
36
- }
37
- if (options.include && !options.include(filename)) {
38
- return false;
39
- }
40
- const normalized = sourceFilename(filename);
41
- const normalizedCwd = options.cwd?.replace(/\\/g, "/").replace(/\/$/, "");
42
- const isAbsolute2 = normalized.startsWith("/") || /^[A-Za-z]:\//.test(normalized);
43
- if (normalizedCwd && isAbsolute2 && normalized !== normalizedCwd && !normalized.startsWith(`${normalizedCwd}/`)) {
44
- return false;
45
- }
46
- return !normalized.includes("/node_modules/") && !normalized.endsWith(".d.ts") && /\.[cm]?[jt]sx?$/.test(normalized);
26
+ if (!filename) return false;
27
+ if (options.include && !options.include(filename)) return false;
28
+ const normalized = sourceFilename(filename);
29
+ const normalizedCwd = options.cwd?.replace(/\\/g, "/").replace(/\/$/, "");
30
+ const isAbsolute = normalized.startsWith("/") || /^[A-Za-z]:\//.test(normalized);
31
+ if (normalizedCwd && isAbsolute && normalized !== normalizedCwd && !normalized.startsWith(`${normalizedCwd}/`)) return false;
32
+ return !normalized.includes("/node_modules/") && !normalized.endsWith(".d.ts") && /\.[cm]?[jt]sx?$/.test(normalized);
47
33
  }
48
-
49
- // ../bitfab-typescript-transform/src/babelPlugin.ts
34
+ //#endregion
35
+ //#region ../bitfab-typescript-transform/src/babelPlugin.ts
50
36
  function propertyName(node, types) {
51
- if (types.isIdentifier(node)) {
52
- return node.name;
53
- }
54
- if (types.isStringLiteral(node)) {
55
- return node.value;
56
- }
57
- return null;
37
+ if (types.isIdentifier(node)) return node.name;
38
+ if (types.isStringLiteral(node)) return node.value;
39
+ return null;
58
40
  }
59
41
  function functionName(path, types) {
60
- const node = path.node;
61
- if (types.isFunctionDeclaration(node) || types.isFunctionExpression(node)) {
62
- if (node.id) {
63
- return node.id.name;
64
- }
65
- }
66
- if ((types.isClassMethod(node) || types.isObjectMethod(node)) && !node.computed && types.isIdentifier(node.key)) {
67
- return node.key.name;
68
- }
69
- const parent = path.parentPath?.node;
70
- if (types.isVariableDeclarator(parent)) {
71
- return propertyName(parent.id, types) ?? "anonymous";
72
- }
73
- if (types.isObjectProperty(parent) && !parent.computed) {
74
- return propertyName(parent.key, types) ?? "anonymous";
75
- }
76
- if (types.isClassProperty(parent) && !parent.computed) {
77
- const name = propertyName(parent.key, types);
78
- if (name) {
79
- return name;
80
- }
81
- }
82
- const { line, column } = sourcePosition(path);
83
- return `anonymous-${line}-${column}`;
42
+ const node = path.node;
43
+ if (types.isFunctionDeclaration(node) || types.isFunctionExpression(node)) {
44
+ if (node.id) return node.id.name;
45
+ }
46
+ if ((types.isClassMethod(node) || types.isObjectMethod(node)) && !node.computed && types.isIdentifier(node.key)) return node.key.name;
47
+ const parent = path.parentPath?.node;
48
+ if (types.isVariableDeclarator(parent)) return propertyName(parent.id, types) ?? "anonymous";
49
+ if (types.isObjectProperty(parent) && !parent.computed) return propertyName(parent.key, types) ?? "anonymous";
50
+ if (types.isClassProperty(parent) && !parent.computed) {
51
+ const name = propertyName(parent.key, types);
52
+ if (name) return name;
53
+ }
54
+ const { line, column } = sourcePosition(path);
55
+ return `anonymous-${line}-${column}`;
84
56
  }
85
57
  function isInstrumentableFunction(node, types) {
86
- if (node.generator || types.isClassPrivateMethod(node)) {
87
- return false;
88
- }
89
- return !(types.isClassMethod(node) || types.isObjectMethod(node)) || node.kind === "method";
58
+ if (node.generator || types.isClassPrivateMethod(node)) return false;
59
+ return !(types.isClassMethod(node) || types.isObjectMethod(node)) || node.kind === "method";
90
60
  }
91
61
  function sourcePosition(path) {
92
- const exportDeclaration = path.parentPath?.isExportDeclaration() ? path.parentPath.node : void 0;
93
- const start = (exportDeclaration ?? path.node).loc?.start;
94
- return { line: start?.line ?? 0, column: start?.column ?? 0 };
62
+ const start = ((path.parentPath?.isExportDeclaration() ? path.parentPath.node : void 0) ?? path.node).loc?.start;
63
+ return {
64
+ line: start?.line ?? 0,
65
+ column: start?.column ?? 0
66
+ };
95
67
  }
96
68
  function qualifiedFunctionName(path, types) {
97
- const ownName = functionName(path, types);
98
- if (ownName.startsWith("anonymous-")) {
99
- return ownName;
100
- }
101
- const scopes = [];
102
- let ancestor = path.parentPath;
103
- while (ancestor) {
104
- if (ancestor.isFunction()) {
105
- if (!isInstrumentableFunction(ancestor.node, types)) {
106
- ancestor = ancestor.parentPath;
107
- continue;
108
- }
109
- const name = functionName(
110
- ancestor,
111
- types
112
- );
113
- if (!name.startsWith("anonymous-")) {
114
- scopes.unshift(name);
115
- }
116
- } else if ((ancestor.isClassDeclaration() || ancestor.isClassExpression()) && ancestor.node.id) {
117
- scopes.unshift(ancestor.node.id.name);
118
- } else if (ancestor.isObjectExpression()) {
119
- const parent = ancestor.parentPath?.node;
120
- if (types.isVariableDeclarator(parent)) {
121
- const name = propertyName(parent.id, types);
122
- if (name) {
123
- scopes.unshift(name);
124
- }
125
- } else if (types.isObjectProperty(parent) && !parent.computed) {
126
- const name = propertyName(parent.key, types);
127
- if (name) {
128
- scopes.unshift(name);
129
- }
130
- }
131
- }
132
- ancestor = ancestor.parentPath;
133
- }
134
- return [...scopes, ownName].join(".");
69
+ const ownName = functionName(path, types);
70
+ if (ownName.startsWith("anonymous-")) return ownName;
71
+ const scopes = [];
72
+ let ancestor = path.parentPath;
73
+ while (ancestor) {
74
+ if (ancestor.isFunction()) {
75
+ if (!isInstrumentableFunction(ancestor.node, types)) {
76
+ ancestor = ancestor.parentPath;
77
+ continue;
78
+ }
79
+ const name = functionName(ancestor, types);
80
+ if (!name.startsWith("anonymous-")) scopes.unshift(name);
81
+ } else if ((ancestor.isClassDeclaration() || ancestor.isClassExpression()) && ancestor.node.id) scopes.unshift(ancestor.node.id.name);
82
+ else if (ancestor.isObjectExpression()) {
83
+ const parent = ancestor.parentPath?.node;
84
+ if (types.isVariableDeclarator(parent)) {
85
+ const name = propertyName(parent.id, types);
86
+ if (name) scopes.unshift(name);
87
+ } else if (types.isObjectProperty(parent) && !parent.computed) {
88
+ const name = propertyName(parent.key, types);
89
+ if (name) scopes.unshift(name);
90
+ }
91
+ }
92
+ ancestor = ancestor.parentPath;
93
+ }
94
+ return [...scopes, ownName].join(".");
135
95
  }
136
96
  function isTraceDecoratorRoot(path, types) {
137
- const node = path.node;
138
- const parent = path.parentPath?.node;
139
- const decorated = types.isClassMethod(node) || types.isClassPrivateMethod(node) ? node : types.isClassProperty(parent) && parent.value === node ? parent : null;
140
- if (!decorated) {
141
- return false;
142
- }
143
- return decorated.decorators?.some((decorator) => {
144
- const expression = decorator.expression;
145
- if (!types.isCallExpression(expression)) {
146
- return false;
147
- }
148
- const callee = expression.callee;
149
- return types.isMemberExpression(callee) && !callee.computed && types.isIdentifier(callee.property, { name: "trace" });
150
- }) ?? false;
97
+ const node = path.node;
98
+ const parent = path.parentPath?.node;
99
+ const decorated = types.isClassMethod(node) || types.isClassPrivateMethod(node) ? node : types.isClassProperty(parent) && parent.value === node ? parent : null;
100
+ if (!decorated) return false;
101
+ return decorated.decorators?.some((decorator) => {
102
+ const expression = decorator.expression;
103
+ if (!types.isCallExpression(expression)) return false;
104
+ const callee = expression.callee;
105
+ return types.isMemberExpression(callee) && !callee.computed && types.isIdentifier(callee.property, { name: "trace" });
106
+ }) ?? false;
151
107
  }
152
108
  function withNodeFunctionName(path, types) {
153
- if (path.node.arguments.length > 2) {
154
- return null;
155
- }
156
- const callee = path.node.callee;
157
- if (!types.isMemberExpression(callee) || callee.computed || !types.isIdentifier(callee.property, { name: "withNode" })) {
158
- return null;
159
- }
160
- const fn = path.node.arguments[path.node.arguments.length - 1];
161
- if (types.isIdentifier(fn)) {
162
- return fn.name;
163
- }
164
- if (types.isMemberExpression(fn) && !fn.computed) {
165
- return propertyName(fn.property, types);
166
- }
167
- if (types.isFunctionExpression(fn) && fn.id) {
168
- return fn.id.name;
169
- }
170
- return null;
109
+ if (path.node.arguments.length > 2) return null;
110
+ const callee = path.node.callee;
111
+ if (!types.isMemberExpression(callee) || callee.computed || !types.isIdentifier(callee.property, { name: "withNode" })) return null;
112
+ const fn = path.node.arguments[path.node.arguments.length - 1];
113
+ if (types.isIdentifier(fn)) return fn.name;
114
+ if (types.isMemberExpression(fn) && !fn.computed) return propertyName(fn.property, types);
115
+ if (types.isFunctionExpression(fn) && fn.id) return fn.id.name;
116
+ return null;
171
117
  }
172
118
  function runtimeParameters(node, types) {
173
- return node.params.filter(
174
- (parameter) => !types.isIdentifier(parameter, { name: "this" })
175
- );
119
+ return node.params.filter((parameter) => !types.isIdentifier(parameter, { name: "this" }));
176
120
  }
177
121
  function parameterInputs(path, types) {
178
- const elements = [];
179
- for (const [index, parameter] of runtimeParameters(
180
- path.node,
181
- types
182
- ).entries()) {
183
- if (!types.isArrowFunctionExpression(path.node)) {
184
- if (types.isRestElement(parameter)) {
185
- elements.push(
186
- types.spreadElement(
187
- types.callExpression(
188
- types.memberExpression(
189
- types.arrayExpression([
190
- types.spreadElement(types.identifier("arguments"))
191
- ]),
192
- types.identifier("slice")
193
- ),
194
- [types.numericLiteral(index)]
195
- )
196
- )
197
- );
198
- } else {
199
- elements.push(
200
- types.memberExpression(
201
- types.identifier("arguments"),
202
- types.numericLiteral(index),
203
- true
204
- )
205
- );
206
- }
207
- continue;
208
- }
209
- if (types.isIdentifier(parameter)) {
210
- elements.push(types.identifier(parameter.name));
211
- } else if (types.isRestElement(parameter) && types.isIdentifier(parameter.argument)) {
212
- elements.push(
213
- types.spreadElement(types.identifier(parameter.argument.name))
214
- );
215
- }
216
- }
217
- return types.arrayExpression(elements);
122
+ const elements = [];
123
+ for (const [index, parameter] of runtimeParameters(path.node, types).entries()) {
124
+ if (!types.isArrowFunctionExpression(path.node)) {
125
+ if (types.isRestElement(parameter)) elements.push(types.spreadElement(types.callExpression(types.memberExpression(types.arrayExpression([types.spreadElement(types.identifier("arguments"))]), types.identifier("slice")), [types.numericLiteral(index)])));
126
+ else elements.push(types.memberExpression(types.identifier("arguments"), types.numericLiteral(index), true));
127
+ continue;
128
+ }
129
+ if (types.isIdentifier(parameter)) elements.push(types.identifier(parameter.name));
130
+ else if (types.isRestElement(parameter) && types.isIdentifier(parameter.argument)) elements.push(types.spreadElement(types.identifier(parameter.argument.name)));
131
+ }
132
+ return types.arrayExpression(elements);
218
133
  }
219
134
  function needsArgumentWrapper(path, types) {
220
- return types.isArrowFunctionExpression(path.node) && path.node.params.some(
221
- (parameter) => !types.isIdentifier(parameter) && !(types.isRestElement(parameter) && types.isIdentifier(parameter.argument))
222
- );
135
+ return types.isArrowFunctionExpression(path.node) && path.node.params.some((parameter) => !types.isIdentifier(parameter) && !(types.isRestElement(parameter) && types.isIdentifier(parameter.argument)));
223
136
  }
224
137
  function isRestWrapper(path, types) {
225
- const parameters = runtimeParameters(path.node, types);
226
- return parameters.length === 1 && types.isRestElement(parameters[0]);
138
+ const parameters = runtimeParameters(path.node, types);
139
+ return parameters.length === 1 && types.isRestElement(parameters[0]);
227
140
  }
228
141
  function bitfabBabelPlugin(api) {
229
- const { types } = api;
230
- return {
231
- name: "bitfab-auto-trace",
232
- visitor: {
233
- Program: {
234
- enter(path, state) {
235
- const filename = state.file.opts.filename ?? "unknown";
236
- state.skipFile = !shouldTransformBitfabFile(filename, state.opts) || path.scope.hasBinding(AUTO_TRACE_TRANSFORM_MARKER) || path.node.directives.some(
237
- (directive) => directive.value.value === "use client"
238
- );
239
- state.runtimeIdentifier = path.scope.generateUidIdentifier("bitfabAutoSpan");
240
- state.activeIdentifier = path.scope.generateUidIdentifier(
241
- "bitfabAutoTraceActive"
242
- );
243
- state.wrapperIdentifier = path.scope.generateUidIdentifier("bitfabAutoWrap");
244
- state.definitions = [];
245
- state.usedRuntime = false;
246
- state.usedWrapper = false;
247
- },
248
- exit(path, state) {
249
- if (state.skipFile || !state.usedRuntime || !state.runtimeIdentifier || !state.activeIdentifier || !state.wrapperIdentifier) {
250
- return;
251
- }
252
- state.file.metadata[AUTO_TRACE_TRANSFORM_MARKER] = true;
253
- path.unshiftContainer("body", [
254
- types.importDeclaration(
255
- [
256
- types.importSpecifier(
257
- state.runtimeIdentifier,
258
- types.identifier("__bitfabAutoSpan")
259
- ),
260
- types.importSpecifier(
261
- state.activeIdentifier,
262
- types.identifier("__bitfabAutoTraceActive")
263
- ),
264
- ...state.usedWrapper ? [
265
- types.importSpecifier(
266
- state.wrapperIdentifier,
267
- types.identifier("__bitfabAutoWrap")
268
- )
269
- ] : []
270
- ],
271
- types.stringLiteral(
272
- state.opts.runtimeModule ?? "@bitfab/sdk/auto"
273
- )
274
- ),
275
- types.variableDeclaration("const", [
276
- types.variableDeclarator(
277
- types.identifier(AUTO_TRACE_TRANSFORM_MARKER),
278
- types.assignmentExpression(
279
- "=",
280
- types.memberExpression(
281
- types.identifier("globalThis"),
282
- types.identifier(AUTO_TRACE_TRANSFORM_MARKER)
283
- ),
284
- types.booleanLiteral(true)
285
- )
286
- )
287
- ]),
288
- ...state.definitions ?? []
289
- ]);
290
- }
291
- },
292
- CallExpression: {
293
- exit(path, state) {
294
- if (state.skipFile) {
295
- return;
296
- }
297
- const configuredName = withNodeFunctionName(path, types);
298
- if (configuredName === null) {
299
- return;
300
- }
301
- if (path.node.arguments.length === 1) {
302
- path.node.arguments.push(types.identifier("undefined"));
303
- }
304
- path.node.arguments.push(types.stringLiteral(configuredName));
305
- }
306
- },
307
- Function: {
308
- exit(path, state) {
309
- const node = path.node;
310
- if (state.skipFile || node._bitfabInstrumented || !isInstrumentableFunction(node, types) || isTraceDecoratorRoot(path, types) || !state.runtimeIdentifier || !state.activeIdentifier || !state.wrapperIdentifier) {
311
- return;
312
- }
313
- const name = qualifiedFunctionName(path, types);
314
- if (name.startsWith("anonymous-")) {
315
- return;
316
- }
317
- const normalizedFilename = autoTraceFilename(
318
- state.file.opts.filename ?? "unknown",
319
- state.opts.cwd ?? state.file.opts.cwd ?? process.cwd()
320
- );
321
- const { line, column } = sourcePosition(path);
322
- const definition = types.objectExpression([
323
- types.objectProperty(
324
- types.identifier("id"),
325
- types.stringLiteral(
326
- autoTraceFunctionId(normalizedFilename, name)
327
- )
328
- ),
329
- types.objectProperty(
330
- types.identifier("name"),
331
- types.stringLiteral(name)
332
- ),
333
- types.objectProperty(
334
- types.identifier("file"),
335
- types.stringLiteral(normalizedFilename)
336
- ),
337
- types.objectProperty(
338
- types.identifier("line"),
339
- types.numericLiteral(line)
340
- ),
341
- types.objectProperty(
342
- types.identifier("column"),
343
- types.numericLiteral(column)
344
- ),
345
- ...node.async ? [
346
- types.objectProperty(
347
- types.identifier("async"),
348
- types.booleanLiteral(true)
349
- )
350
- ] : [],
351
- ...isRestWrapper(path, types) ? [
352
- types.objectProperty(
353
- types.identifier("wrapper"),
354
- types.booleanLiteral(true)
355
- )
356
- ] : []
357
- ]);
358
- const definitionIdentifier = path.scope.getProgramParent().generateUidIdentifier("bitfabAutoDefinition");
359
- state.definitions?.push(
360
- types.variableDeclaration("const", [
361
- types.variableDeclarator(definitionIdentifier, definition)
362
- ])
363
- );
364
- if (needsArgumentWrapper(path, types)) {
365
- node._bitfabInstrumented = true;
366
- path.replaceWith(
367
- types.callExpression(types.cloneNode(state.wrapperIdentifier), [
368
- types.cloneNode(definitionIdentifier),
369
- node
370
- ])
371
- );
372
- state.usedRuntime = true;
373
- state.usedWrapper = true;
374
- return;
375
- }
376
- const originalBody = types.isBlockStatement(node.body) ? node.body : types.blockStatement([types.returnStatement(node.body)]);
377
- const directives = originalBody.directives;
378
- originalBody.directives = [];
379
- const body = types.blockStatement(
380
- [
381
- types.ifStatement(
382
- types.callExpression(
383
- types.cloneNode(state.activeIdentifier),
384
- []
385
- ),
386
- types.blockStatement([
387
- types.returnStatement(
388
- types.callExpression(
389
- types.cloneNode(state.runtimeIdentifier),
390
- [
391
- types.cloneNode(definitionIdentifier),
392
- parameterInputs(path, types),
393
- types.arrowFunctionExpression(
394
- [],
395
- types.cloneNode(originalBody, true),
396
- node.async ?? false
397
- )
398
- ]
399
- )
400
- )
401
- ])
402
- ),
403
- ...originalBody.body
404
- ],
405
- directives
406
- );
407
- node.body = body;
408
- node._bitfabInstrumented = true;
409
- state.usedRuntime = true;
410
- }
411
- }
412
- }
413
- };
142
+ const { types } = api;
143
+ return {
144
+ name: "bitfab-auto-trace",
145
+ visitor: {
146
+ Program: {
147
+ enter(path, state) {
148
+ state.skipFile = !shouldTransformBitfabFile(state.file.opts.filename ?? "unknown", state.opts) || path.scope.hasBinding("__bitfab_auto_trace_transformed_v1__") || path.node.directives.some((directive) => directive.value.value === "use client");
149
+ state.runtimeIdentifier = path.scope.generateUidIdentifier("bitfabAutoSpan");
150
+ state.activeIdentifier = path.scope.generateUidIdentifier("bitfabAutoTraceActive");
151
+ state.wrapperIdentifier = path.scope.generateUidIdentifier("bitfabAutoWrap");
152
+ state.definitions = [];
153
+ state.usedRuntime = false;
154
+ state.usedWrapper = false;
155
+ },
156
+ exit(path, state) {
157
+ if (state.skipFile || !state.usedRuntime || !state.runtimeIdentifier || !state.activeIdentifier || !state.wrapperIdentifier) return;
158
+ state.file.metadata[AUTO_TRACE_TRANSFORM_MARKER] = true;
159
+ path.unshiftContainer("body", [
160
+ types.importDeclaration([
161
+ types.importSpecifier(state.runtimeIdentifier, types.identifier("__bitfabAutoSpan")),
162
+ types.importSpecifier(state.activeIdentifier, types.identifier("__bitfabAutoTraceActive")),
163
+ ...state.usedWrapper ? [types.importSpecifier(state.wrapperIdentifier, types.identifier("__bitfabAutoWrap"))] : []
164
+ ], types.stringLiteral(state.opts.runtimeModule ?? "@bitfab/sdk/auto")),
165
+ types.variableDeclaration("const", [types.variableDeclarator(types.identifier(AUTO_TRACE_TRANSFORM_MARKER), types.assignmentExpression("=", types.memberExpression(types.identifier("globalThis"), types.identifier(AUTO_TRACE_TRANSFORM_MARKER)), types.booleanLiteral(true)))]),
166
+ ...state.definitions ?? []
167
+ ]);
168
+ }
169
+ },
170
+ CallExpression: { exit(path, state) {
171
+ if (state.skipFile) return;
172
+ const configuredName = withNodeFunctionName(path, types);
173
+ if (configuredName === null) return;
174
+ if (path.node.arguments.length === 1) path.node.arguments.push(types.identifier("undefined"));
175
+ path.node.arguments.push(types.stringLiteral(configuredName));
176
+ } },
177
+ Function: { exit(path, state) {
178
+ const node = path.node;
179
+ if (state.skipFile || node._bitfabInstrumented || !isInstrumentableFunction(node, types) || isTraceDecoratorRoot(path, types) || !state.runtimeIdentifier || !state.activeIdentifier || !state.wrapperIdentifier) return;
180
+ const name = qualifiedFunctionName(path, types);
181
+ if (name.startsWith("anonymous-")) return;
182
+ const normalizedFilename = autoTraceFilename(state.file.opts.filename ?? "unknown", state.opts.cwd ?? state.file.opts.cwd ?? process.cwd());
183
+ const { line, column } = sourcePosition(path);
184
+ const definition = types.objectExpression([
185
+ types.objectProperty(types.identifier("id"), types.stringLiteral(autoTraceFunctionId(normalizedFilename, name))),
186
+ types.objectProperty(types.identifier("name"), types.stringLiteral(name)),
187
+ types.objectProperty(types.identifier("file"), types.stringLiteral(normalizedFilename)),
188
+ types.objectProperty(types.identifier("line"), types.numericLiteral(line)),
189
+ types.objectProperty(types.identifier("column"), types.numericLiteral(column)),
190
+ ...node.async ? [types.objectProperty(types.identifier("async"), types.booleanLiteral(true))] : [],
191
+ ...isRestWrapper(path, types) ? [types.objectProperty(types.identifier("wrapper"), types.booleanLiteral(true))] : []
192
+ ]);
193
+ const definitionIdentifier = path.scope.getProgramParent().generateUidIdentifier("bitfabAutoDefinition");
194
+ state.definitions?.push(types.variableDeclaration("const", [types.variableDeclarator(definitionIdentifier, definition)]));
195
+ if (needsArgumentWrapper(path, types)) {
196
+ node._bitfabInstrumented = true;
197
+ path.replaceWith(types.callExpression(types.cloneNode(state.wrapperIdentifier), [types.cloneNode(definitionIdentifier), node]));
198
+ state.usedRuntime = true;
199
+ state.usedWrapper = true;
200
+ return;
201
+ }
202
+ const originalBody = types.isBlockStatement(node.body) ? node.body : types.blockStatement([types.returnStatement(node.body)]);
203
+ const directives = originalBody.directives;
204
+ originalBody.directives = [];
205
+ node.body = types.blockStatement([types.ifStatement(types.callExpression(types.cloneNode(state.activeIdentifier), []), types.blockStatement([types.returnStatement(types.callExpression(types.cloneNode(state.runtimeIdentifier), [
206
+ types.cloneNode(definitionIdentifier),
207
+ parameterInputs(path, types),
208
+ types.arrowFunctionExpression([], types.cloneNode(originalBody, true), node.async ?? false)
209
+ ]))])), ...originalBody.body], directives);
210
+ node._bitfabInstrumented = true;
211
+ state.usedRuntime = true;
212
+ } }
213
+ }
214
+ };
414
215
  }
415
-
416
- // ../bitfab-typescript-transform/src/transform.ts
417
- import { transformSync } from "@babel/core";
216
+ //#endregion
217
+ //#region ../bitfab-typescript-transform/src/transform.ts
418
218
  function parserPlugins(filename) {
419
- const path = sourceFilename(filename);
420
- const typescript = /\.[cm]?tsx?$/.test(path);
421
- const jsx = /\.tsx$/.test(path) || /\.[cm]?jsx?$/.test(path);
422
- return [
423
- ...typescript ? ["typescript"] : [],
424
- ...jsx ? ["jsx"] : [],
425
- "decorators"
426
- ];
219
+ const path = sourceFilename(filename);
220
+ const typescript = /\.[cm]?tsx?$/.test(path);
221
+ const jsx = /\.tsx$/.test(path) || /\.[cm]?jsx?$/.test(path);
222
+ return [
223
+ ...typescript ? ["typescript"] : [],
224
+ ...jsx ? ["jsx"] : [],
225
+ "decorators"
226
+ ];
427
227
  }
428
-
429
- // ../bitfab-typescript-transform/src/loaderRuntime.ts
228
+ //#endregion
229
+ //#region ../bitfab-typescript-transform/src/loaderRuntime.ts
430
230
  function readCompilerOptions(filename, configuredPath) {
431
- const config = configuredPath ? parseTsconfig(configuredPath) : getTsconfig(dirname(filename))?.config;
432
- return config?.compilerOptions ?? {};
231
+ return (configuredPath ? parseTsconfig(configuredPath) : getTsconfig(dirname(filename))?.config)?.compilerOptions ?? {};
433
232
  }
434
233
  function reactJsxOptions(compilerOptions) {
435
- if (compilerOptions.jsx === "react") {
436
- return [
437
- reactJsxPlugin,
438
- {
439
- runtime: "classic",
440
- ...compilerOptions.jsxFactory && {
441
- pragma: compilerOptions.jsxFactory
442
- },
443
- ...compilerOptions.jsxFragmentFactory && {
444
- pragmaFrag: compilerOptions.jsxFragmentFactory
445
- }
446
- }
447
- ];
448
- }
449
- return [
450
- reactJsxPlugin,
451
- {
452
- runtime: "automatic",
453
- importSource: compilerOptions.jsxImportSource ?? "react"
454
- }
455
- ];
234
+ if (compilerOptions.jsx === "react") return [reactJsxPlugin, {
235
+ runtime: "classic",
236
+ ...compilerOptions.jsxFactory && { pragma: compilerOptions.jsxFactory },
237
+ ...compilerOptions.jsxFragmentFactory && { pragmaFrag: compilerOptions.jsxFragmentFactory }
238
+ }];
239
+ return [reactJsxPlugin, {
240
+ runtime: "automatic",
241
+ importSource: compilerOptions.jsxImportSource ?? "react"
242
+ }];
456
243
  }
457
244
  function compilePlugins(filename, compilerOptions, format) {
458
- const path = sourceFilename(filename);
459
- const isTypeScript = /\.[cm]?tsx?$/.test(path);
460
- const hasJsx = /\.[jt]sx$/.test(path);
461
- const isCommonJs = format === "commonjs" || path.endsWith(".cts");
462
- return [
463
- ...isTypeScript ? [
464
- [
465
- typeScriptPlugin,
466
- {
467
- onlyRemoveTypeImports: compilerOptions.verbatimModuleSyntax === true
468
- }
469
- ]
470
- ] : [],
471
- [
472
- decoratorsPlugin,
473
- {
474
- version: compilerOptions.experimentalDecorators ? "legacy" : "2023-11"
475
- }
476
- ],
477
- ...hasJsx ? [reactJsxOptions(compilerOptions)] : [],
478
- ...isCommonJs ? [commonJsPlugin] : []
479
- ];
245
+ const path = sourceFilename(filename);
246
+ const isTypeScript = /\.[cm]?tsx?$/.test(path);
247
+ const hasJsx = /\.[jt]sx$/.test(path);
248
+ const isCommonJs = format === "commonjs" || path.endsWith(".cts");
249
+ return [
250
+ ...isTypeScript ? [[typeScriptPlugin, { onlyRemoveTypeImports: compilerOptions.verbatimModuleSyntax === true }]] : [],
251
+ [decoratorsPlugin, { version: compilerOptions.experimentalDecorators ? "legacy" : "2023-11" }],
252
+ ...hasJsx ? [reactJsxOptions(compilerOptions)] : [],
253
+ ...isCommonJs ? [commonJsPlugin] : []
254
+ ];
480
255
  }
481
256
  function transformBitfabModuleToJavaScript(source, filename, options = {}, format, sourceMapMode = "external") {
482
- const { tsconfig, ...transformOptions } = options;
483
- if (!shouldTransformBitfabFile(filename, transformOptions)) {
484
- return { code: source };
485
- }
486
- const sourceFile = sourceFilename(filename);
487
- const instrumented = transformSync2(source, {
488
- ast: true,
489
- babelrc: false,
490
- code: false,
491
- configFile: false,
492
- filename: sourceFile,
493
- parserOpts: { plugins: parserPlugins(filename), sourceType: "module" },
494
- plugins: [[bitfabBabelPlugin, transformOptions]]
495
- });
496
- if (!instrumented?.ast) {
497
- throw new Error(`Bitfab could not parse ${sourceFile}`);
498
- }
499
- const compiled = transformFromAstSync(instrumented.ast, source, {
500
- babelrc: false,
501
- cloneInputAst: false,
502
- configFile: false,
503
- filename: sourceFile,
504
- plugins: compilePlugins(
505
- filename,
506
- readCompilerOptions(filename, tsconfig),
507
- format
508
- ),
509
- sourceMaps: sourceMapMode === "inline" ? "inline" : true
510
- });
511
- if (compiled?.code === void 0 || compiled.code === null) {
512
- throw new Error(`Bitfab could not compile ${sourceFile}`);
513
- }
514
- return {
515
- code: compiled.code,
516
- ...compiled.map ? { map: JSON.stringify(compiled.map) } : {}
517
- };
257
+ const { tsconfig, ...transformOptions } = options;
258
+ if (!shouldTransformBitfabFile(filename, transformOptions)) return { code: source };
259
+ const sourceFile = sourceFilename(filename);
260
+ const instrumented = transformSync(source, {
261
+ ast: true,
262
+ babelrc: false,
263
+ code: false,
264
+ configFile: false,
265
+ filename: sourceFile,
266
+ parserOpts: {
267
+ plugins: parserPlugins(filename),
268
+ sourceType: "module"
269
+ },
270
+ plugins: [[bitfabBabelPlugin, transformOptions]]
271
+ });
272
+ if (!instrumented?.ast) throw new Error(`Bitfab could not parse ${sourceFile}`);
273
+ const compiled = transformFromAstSync(instrumented.ast, source, {
274
+ babelrc: false,
275
+ cloneInputAst: false,
276
+ configFile: false,
277
+ filename: sourceFile,
278
+ plugins: compilePlugins(filename, readCompilerOptions(filename, tsconfig), format),
279
+ sourceMaps: sourceMapMode === "inline" ? "inline" : true
280
+ });
281
+ if (compiled?.code === void 0 || compiled.code === null) throw new Error(`Bitfab could not compile ${sourceFile}`);
282
+ return {
283
+ code: compiled.code,
284
+ ...compiled.map ? { map: JSON.stringify(compiled.map) } : {}
285
+ };
518
286
  }
519
-
520
- // ../bitfab-typescript-transform/src/nodeLoader.ts
521
- var runtimeParentURL = process.env.BITFAB_SDK_RESOLVE_FROM === void 0 ? import.meta.url : pathToFileURL(resolvePath(process.env.BITFAB_SDK_RESOLVE_FROM)).href;
287
+ //#endregion
288
+ //#region ../bitfab-typescript-transform/src/nodeLoader.ts
289
+ const runtimeParentURL = process.env.BITFAB_SDK_RESOLVE_FROM === void 0 ? import.meta.url : pathToFileURL(resolve$1(process.env.BITFAB_SDK_RESOLVE_FROM)).href;
522
290
  async function resolve(specifier, context, nextResolve) {
523
- return specifier === "bitfab:runtime/auto" ? nextResolve("@bitfab/sdk/auto", {
524
- ...context,
525
- parentURL: runtimeParentURL
526
- }) : nextResolve(specifier, context);
291
+ return specifier === "bitfab:runtime/auto" ? nextResolve("@bitfab/sdk/auto", {
292
+ ...context,
293
+ parentURL: runtimeParentURL
294
+ }) : nextResolve(specifier, context);
527
295
  }
528
296
  function runtimeFormat(format, filename) {
529
- return format?.startsWith("commonjs") || /\.c(?:js|ts)$/.test(filename) ? "commonjs" : "module";
297
+ return format?.startsWith("commonjs") || /\.c(?:js|ts)$/.test(filename) ? "commonjs" : "module";
530
298
  }
531
299
  function isInsideWorkingDirectory(filename) {
532
- const path = relative(process.cwd(), filename);
533
- return path !== ".." && !path.startsWith(`..${process.platform === "win32" ? "\\" : "/"}`) && !isAbsolute(path);
300
+ const path = relative(process.cwd(), filename);
301
+ return path !== ".." && !path.startsWith(`..${process.platform === "win32" ? "\\" : "/"}`) && !isAbsolute(path);
534
302
  }
535
303
  async function load(url, context, nextLoad) {
536
- if (!url.startsWith("file:")) {
537
- return nextLoad(url, context);
538
- }
539
- const filename = fileURLToPath(url);
540
- if (!isInsideWorkingDirectory(filename) || !shouldTransformBitfabFile(filename, {})) {
541
- return nextLoad(url, context);
542
- }
543
- const source = await readFile(filename, "utf8");
544
- const format = runtimeFormat(context.format, filename);
545
- const transformed = transformBitfabModuleToJavaScript(
546
- source,
547
- filename,
548
- format === "commonjs" ? {
549
- runtimeModule: createRequire(runtimeParentURL).resolve("@bitfab/sdk/auto")
550
- } : { runtimeModule: "bitfab:runtime/auto" },
551
- format,
552
- "inline"
553
- );
554
- return {
555
- format,
556
- shortCircuit: true,
557
- source: transformed.code
558
- };
304
+ if (!url.startsWith("file:")) return nextLoad(url, context);
305
+ const filename = fileURLToPath(url);
306
+ if (!isInsideWorkingDirectory(filename) || !shouldTransformBitfabFile(filename, {})) return nextLoad(url, context);
307
+ const source = await readFile(filename, "utf8");
308
+ const format = runtimeFormat(context.format, filename);
309
+ return {
310
+ format,
311
+ shortCircuit: true,
312
+ source: transformBitfabModuleToJavaScript(source, filename, format === "commonjs" ? { runtimeModule: createRequire(runtimeParentURL).resolve("@bitfab/sdk/auto") } : { runtimeModule: "bitfab:runtime/auto" }, format, "inline").code
313
+ };
559
314
  }
560
- export {
561
- load,
562
- resolve
563
- };
315
+ //#endregion
316
+ export { load, resolve };
317
+
564
318
  //# sourceMappingURL=nodeLoader.js.map