@absolutejs/absolute 0.19.0-beta.714 → 0.19.0-beta.715
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/build.js +43 -35
- package/dist/build.js.map +3 -3
- package/dist/index.js +43 -35
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49368,35 +49368,43 @@ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g,
|
|
|
49368
49368
|
if (rewritten !== original)
|
|
49369
49369
|
writeFileSync8(filePath, rewritten);
|
|
49370
49370
|
}
|
|
49371
|
-
},
|
|
49372
|
-
const {
|
|
49371
|
+
}, collectTransitiveImports = async (specs, alreadyVendored) => {
|
|
49372
|
+
const { readFileSync: readFileSync15 } = await import("fs");
|
|
49373
49373
|
const transpiler4 = new Bun.Transpiler({ loader: "js" });
|
|
49374
49374
|
const newSpecs = new Set;
|
|
49375
|
-
|
|
49376
|
-
|
|
49377
|
-
entries = readdirSync2(vendorDir).filter((f) => f.endsWith(".js"));
|
|
49378
|
-
} catch {
|
|
49379
|
-
return newSpecs;
|
|
49380
|
-
}
|
|
49381
|
-
for (const entry of entries) {
|
|
49375
|
+
for (const spec of specs) {
|
|
49376
|
+
let resolved;
|
|
49382
49377
|
try {
|
|
49383
|
-
|
|
49384
|
-
|
|
49385
|
-
|
|
49386
|
-
|
|
49387
|
-
|
|
49388
|
-
|
|
49389
|
-
|
|
49390
|
-
|
|
49391
|
-
|
|
49392
|
-
|
|
49393
|
-
|
|
49394
|
-
|
|
49395
|
-
|
|
49396
|
-
|
|
49397
|
-
|
|
49398
|
-
|
|
49399
|
-
|
|
49378
|
+
resolved = Bun.resolveSync(spec, process.cwd());
|
|
49379
|
+
} catch {
|
|
49380
|
+
continue;
|
|
49381
|
+
}
|
|
49382
|
+
let content;
|
|
49383
|
+
try {
|
|
49384
|
+
content = readFileSync15(resolved, "utf-8");
|
|
49385
|
+
} catch {
|
|
49386
|
+
continue;
|
|
49387
|
+
}
|
|
49388
|
+
let imports;
|
|
49389
|
+
try {
|
|
49390
|
+
imports = transpiler4.scanImports(content);
|
|
49391
|
+
} catch {
|
|
49392
|
+
continue;
|
|
49393
|
+
}
|
|
49394
|
+
for (const imp of imports) {
|
|
49395
|
+
const child = imp.path;
|
|
49396
|
+
if (!isBareSpecifier(child))
|
|
49397
|
+
continue;
|
|
49398
|
+
if (isFrameworkSpecifier(child))
|
|
49399
|
+
continue;
|
|
49400
|
+
if (isAbsolutePackageSpecifier(child))
|
|
49401
|
+
continue;
|
|
49402
|
+
if (alreadyVendored.has(child))
|
|
49403
|
+
continue;
|
|
49404
|
+
if (!isResolvable4(child))
|
|
49405
|
+
continue;
|
|
49406
|
+
newSpecs.add(child);
|
|
49407
|
+
}
|
|
49400
49408
|
}
|
|
49401
49409
|
return newSpecs;
|
|
49402
49410
|
}, buildDepVendorPass = async (specifiers, vendorDir, tmpDir) => {
|
|
@@ -49427,19 +49435,19 @@ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g,
|
|
|
49427
49435
|
const tmpDir = join22(buildDir, "_dep_vendor_tmp");
|
|
49428
49436
|
mkdirSync11(tmpDir, { recursive: true });
|
|
49429
49437
|
const allSpecs = new Set(initialSpecs);
|
|
49430
|
-
let
|
|
49438
|
+
let frontier = allSpecs;
|
|
49431
49439
|
for (let pass = 0;pass < MAX_VENDOR_DISCOVERY_PASSES; pass++) {
|
|
49432
|
-
const
|
|
49433
|
-
if (!result.success) {
|
|
49434
|
-
console.warn("\u26A0\uFE0F Dependency vendor build had errors:", result.logs);
|
|
49435
|
-
success = false;
|
|
49436
|
-
break;
|
|
49437
|
-
}
|
|
49438
|
-
const additional = await collectUnvendoredImports(vendorDir, allSpecs);
|
|
49440
|
+
const additional = await collectTransitiveImports(frontier, allSpecs);
|
|
49439
49441
|
if (additional.size === 0)
|
|
49440
49442
|
break;
|
|
49441
49443
|
for (const spec of additional)
|
|
49442
49444
|
allSpecs.add(spec);
|
|
49445
|
+
frontier = additional;
|
|
49446
|
+
}
|
|
49447
|
+
const result = await buildDepVendorPass(Array.from(allSpecs), vendorDir, tmpDir);
|
|
49448
|
+
const success = result.success;
|
|
49449
|
+
if (!success) {
|
|
49450
|
+
console.warn("\u26A0\uFE0F Dependency vendor build had errors:", result.logs);
|
|
49443
49451
|
}
|
|
49444
49452
|
await rm9(tmpDir, { force: true, recursive: true });
|
|
49445
49453
|
if (success)
|
|
@@ -58205,5 +58213,5 @@ export {
|
|
|
58205
58213
|
ANGULAR_INIT_TIMEOUT_MS
|
|
58206
58214
|
};
|
|
58207
58215
|
|
|
58208
|
-
//# debugId=
|
|
58216
|
+
//# debugId=C5600232735DC36764756E2164756E21
|
|
58209
58217
|
//# sourceMappingURL=index.js.map
|