sliftutils 0.6.1 → 0.6.3

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.
@@ -17,7 +17,7 @@ async function main() {
17
17
  if (!outputFolder) {
18
18
  throw new Error("No output folder provided. Please use the --outputFolder option.");
19
19
  }
20
- require("../" + entryPoint);
20
+ require(entryPoint);
21
21
 
22
22
  let name = path.basename(entryPoint);
23
23
  if (name.endsWith(".ts") || name.endsWith(".tsx")) {
@@ -1,6 +1,5 @@
1
1
  import child_process from "child_process";
2
2
  import { runPromise } from "socket-function/src/runPromise";
3
- import shellQuote from "shell-quote";
4
3
  import path from "path";
5
4
 
6
5
  export async function bundleEntryCaller(config: {
@@ -8,9 +7,8 @@ export async function bundleEntryCaller(config: {
8
7
  outputFolder: string;
9
8
  }) {
10
9
  let { entryPoint, outputFolder } = config;
11
- entryPoint = path.resolve(entryPoint);
12
- outputFolder = path.resolve(outputFolder);
13
- let bundleEntryPath = path.resolve(__dirname, "bundleEntry.ts");
14
- let command = shellQuote.quote(["yarn", "typenode", bundleEntryPath, "--entryPoint", entryPoint, "--outputFolder", outputFolder]);
15
- await runPromise(command);
10
+ entryPoint = path.resolve(entryPoint).replace(/\\/g, "/");
11
+ outputFolder = path.resolve(outputFolder).replace(/\\/g, "/");
12
+ let bundleEntryPath = path.resolve(__dirname, "bundleEntry.ts").replace(/\\/g, "/");
13
+ await runPromise(`yarn typenode ${JSON.stringify(bundleEntryPath)} --entryPoint ${JSON.stringify(entryPoint)} --outputFolder ${JSON.stringify(outputFolder)}`);
16
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sliftutils",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {