ts-arc 1.1.13 → 1.1.15

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/dist/bin.js CHANGED
@@ -7,6 +7,7 @@ import * as url from "node:url";
7
7
  var __filename = url.fileURLToPath(import.meta.url);
8
8
  var __dirname = path.dirname(__filename);
9
9
  var loaderPath = path.join(__dirname, "loader.js");
10
+ var loaderUrl = url.pathToFileURL(loaderPath).href;
10
11
  var require2 = createRequire(import.meta.url);
11
12
  function stripJsonComments(input) {
12
13
  let output = "";
@@ -82,8 +83,8 @@ function findTsConfig(dir) {
82
83
  }
83
84
  var tsArcConfig = { baseUrl: null, paths: {}, tsconfigDir: null };
84
85
  async function registerLoader() {
85
- const loaderUrl = url.pathToFileURL(loaderPath).href;
86
- register(loaderUrl, { data: tsArcConfig });
86
+ console.log("Registering ts-arc module loader..");
87
+ register("./loader.js", import.meta.url, { data: tsArcConfig });
87
88
  }
88
89
  async function loadModule(scriptUrl) {
89
90
  const scriptPath = url.fileURLToPath(scriptUrl);
package/dist/cli.js CHANGED
@@ -13,6 +13,7 @@ import * as url from "node:url";
13
13
  var __filename = url.fileURLToPath(import.meta.url);
14
14
  var __dirname = path.dirname(__filename);
15
15
  var loaderPath = path.join(__dirname, "loader.js");
16
+ var loaderUrl = url.pathToFileURL(loaderPath).href;
16
17
  var require2 = createRequire(import.meta.url);
17
18
  function stripJsonComments(input) {
18
19
  let output = "";
@@ -88,8 +89,8 @@ function findTsConfig(dir) {
88
89
  }
89
90
  var tsArcConfig = { baseUrl: null, paths: {}, tsconfigDir: null };
90
91
  async function registerLoader() {
91
- const loaderUrl = url.pathToFileURL(loaderPath).href;
92
- register(loaderUrl, { data: tsArcConfig });
92
+ console.log("Registering ts-arc module loader..");
93
+ register("./loader.js", import.meta.url, { data: tsArcConfig });
93
94
  }
94
95
  async function loadModule(scriptUrl2) {
95
96
  const scriptPath2 = url.fileURLToPath(scriptUrl2);
package/dist/loader.js CHANGED
@@ -56,14 +56,11 @@ async function resolve2(specifier, context, nextResolve) {
56
56
  }
57
57
  const isPathLike = specifier.startsWith(".") || specifier.startsWith("/");
58
58
  if (isPathLike) {
59
- console.log("Attempting to resolve a path-like specifier:", specifier);
60
59
  const resolved = await resolveLocal(parentPath, specifier);
61
60
  return { ...resolved, shortCircuit: true };
62
61
  } else {
63
- console.log("Attempting to resolve non path-like specifier:", specifier);
64
62
  const { paths } = config;
65
63
  const effectiveBase = getEffectiveBase();
66
- console.log("That specifiers effectiveBase is:", specifier);
67
64
  for (const key of Object.keys(paths)) {
68
65
  let capture = null;
69
66
  const isWildcard = key.endsWith("/*");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-arc",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "type": "module",
5
5
  "description": "A simple typescript runtime.",
6
6
  "main": "dist/bin.js",