@snowtop/ent 0.1.0-alpha160-test2 → 0.1.0-alpha160-test4

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-alpha160-test2",
3
+ "version": "0.1.0-alpha160-test4",
4
4
  "description": "snowtop ent framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,7 +20,6 @@
20
20
  "memoizee": "^0.4.15",
21
21
  "minimist": "^1.2.8",
22
22
  "pascal-case": "^3.1.2",
23
- "patch-package": "^7.0.0",
24
23
  "pg": "^8.11.0",
25
24
  "prettier": "^2.8.8",
26
25
  "snake-case": "^3.0.4",
@@ -31,12 +30,16 @@
31
30
  "uuid": "^9.0.0"
32
31
  },
33
32
  "peerDependencies": {
33
+ "@swc-node/register": "^1.6.5",
34
34
  "better-sqlite3": "^8.4.0",
35
35
  "graphql": "^16.5.0"
36
36
  },
37
37
  "peerDependenciesMeta": {
38
38
  "better-sqlite3": {
39
39
  "optional": true
40
+ },
41
+ "@swc-node/register": {
42
+ "optional": true
40
43
  }
41
44
  },
42
45
  "engines": {
@@ -154,20 +154,23 @@ async function captureDynamic(filePath, gqlCapture) {
154
154
  return;
155
155
  }
156
156
  return new Promise((resolve, reject) => {
157
- let args = [];
157
+ let cmd = "";
158
+ const args = [];
158
159
  const env = {
159
160
  ...process.env,
160
161
  };
161
- // really only exists if there's a bug with swc or something. we should almost always be using swc
162
- if (process.env.DISABLE_SWC) {
163
- args = ["--transpileOnly", filePath];
164
- }
165
- else {
166
- args = ["--swc", filePath];
162
+ if (process.env.ENABLE_SWC) {
163
+ cmd = "node";
167
164
  // we seem to get tsconfig-paths by default because child process but not 100% sure...
165
+ args.push("-r", "@swc-node/register");
168
166
  env.SWCRC = "true";
169
167
  }
170
- const r = (0, child_process_1.spawn)("ts-node", args, {
168
+ else {
169
+ cmd = "ts-node";
170
+ args.push("--transpileOnly");
171
+ }
172
+ args.push(filePath);
173
+ const r = (0, child_process_1.spawn)(cmd, args, {
171
174
  env,
172
175
  });
173
176
  const datas = [];