ts-arc 1.2.0 → 1.2.1
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/loader.js +2 -2
- package/package.json +1 -1
package/dist/loader.js
CHANGED
|
@@ -372,11 +372,11 @@ async function load(urlStr, context, nextLoad) {
|
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
374
|
function loadSync(urlStr, context, nextLoadSync) {
|
|
375
|
-
if (urlStr.startsWith("
|
|
375
|
+
if (urlStr.startsWith("copycat://")) {
|
|
376
376
|
const u = new URL(urlStr);
|
|
377
377
|
const real = u.searchParams.get("real");
|
|
378
378
|
if (!real) {
|
|
379
|
-
throw new Error("
|
|
379
|
+
throw new Error("copycat:// missing real source path");
|
|
380
380
|
}
|
|
381
381
|
const filePath = path.resolve(real);
|
|
382
382
|
let rawSource = fs.readFileSync(filePath, "utf8");
|