@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snowtop/ent",
3
- "version": "0.1.0-alpha136",
3
+ "version": "0.1.0-alpha137",
4
4
  "description": "snowtop ent framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -149,17 +149,24 @@ async function captureDynamic(filePath, gqlCapture) {
149
149
  return;
150
150
  }
151
151
  return await new Promise((resolve, reject) => {
152
- // we seem to get tsconfig-paths by default because child process but not 100% sure...
153
- const args = ["--transpileOnly"];
152
+ let cmd = "";
153
+ const args = [];
154
154
  const env = {
155
155
  ...process.env,
156
156
  };
157
- if (!process.env.DISABLE_SWC) {
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)("ts-node", args, {
169
+ const r = (0, child_process_1.spawn)(cmd, args, {
163
170
  env,
164
171
  });
165
172
  const datas = [];