@snowtop/ent 0.1.0-alpha136 → 0.1.0-alpha137
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/package.json +1 -1
- package/scripts/custom_graphql.js +11 -4
package/package.json
CHANGED
|
@@ -149,17 +149,24 @@ async function captureDynamic(filePath, gqlCapture) {
|
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
151
|
return await new Promise((resolve, reject) => {
|
|
152
|
-
|
|
153
|
-
const args = [
|
|
152
|
+
let cmd = "";
|
|
153
|
+
const args = [];
|
|
154
154
|
const env = {
|
|
155
155
|
...process.env,
|
|
156
156
|
};
|
|
157
|
-
if
|
|
157
|
+
// really only exists if there's a bug with swc or something. we should almost always be using swc
|
|
158
|
+
if (process.env.DISABLE_SWC) {
|
|
159
|
+
cmd = "ts-node";
|
|
160
|
+
args.push("--transpileOnly");
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
cmd = "node";
|
|
164
|
+
// we seem to get tsconfig-paths by default because child process but not 100% sure...
|
|
158
165
|
args.push("-r", "@swc-node/register");
|
|
159
166
|
env.SWCRC = "true";
|
|
160
167
|
}
|
|
161
168
|
args.push(filePath);
|
|
162
|
-
const r = (0, child_process_1.spawn)(
|
|
169
|
+
const r = (0, child_process_1.spawn)(cmd, args, {
|
|
163
170
|
env,
|
|
164
171
|
});
|
|
165
172
|
const datas = [];
|