@absolutejs/absolute 0.19.0-beta.811 → 0.19.0-beta.813
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/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/build.js +55 -10
- package/dist/build.js.map +5 -5
- package/dist/cli/index.js +143 -57
- package/dist/index.js +55 -10
- package/dist/index.js.map +5 -5
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-lNot39/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-lNot39/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
48
48
|
getWarningController()?.maybeWarn(primitiveName);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// .angular-partial-tmp-
|
|
51
|
+
// .angular-partial-tmp-lNot39/src/core/streamingSlotRegistry.ts
|
|
52
52
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
53
53
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
54
54
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
package/dist/build.js
CHANGED
|
@@ -9575,22 +9575,66 @@ var init_commonAncestor = () => {};
|
|
|
9575
9575
|
// src/utils/buildDirectoryLock.ts
|
|
9576
9576
|
import { mkdir as mkdir3, rm as rm4, stat as stat2, writeFile as writeFile4 } from "fs/promises";
|
|
9577
9577
|
import { dirname as dirname8, join as join13 } from "path";
|
|
9578
|
-
var DEFAULT_LOCK_TIMEOUT_MS = 120000, DEFAULT_STALE_LOCK_MS, LOCK_POLL_MS = 250, isAlreadyExistsError = (error) => error instanceof Error && ("code" in error) && error.code === "EEXIST", lockPathForBuildDirectory = (buildDirectory) => join13(dirname8(buildDirectory), `.${buildDirectory.split(/[\\/]/).pop()}.lock`),
|
|
9578
|
+
var DEFAULT_LOCK_TIMEOUT_MS = 120000, DEFAULT_STALE_LOCK_MS, LOCK_POLL_MS = 250, heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", isAlreadyExistsError = (error) => error instanceof Error && ("code" in error) && error.code === "EEXIST", lockPathForBuildDirectory = (buildDirectory) => join13(dirname8(buildDirectory), `.${buildDirectory.split(/[\\/]/).pop()}.lock`), readHeldLockEnv = () => new Set((process.env[HELD_LOCKS_ENV] ?? "").split(`
|
|
9579
|
+
`).filter((entry) => entry.length > 0)), writeHeldLockEnv = (locks) => {
|
|
9580
|
+
if (locks.size === 0) {
|
|
9581
|
+
delete process.env[HELD_LOCKS_ENV];
|
|
9582
|
+
return;
|
|
9583
|
+
}
|
|
9584
|
+
process.env[HELD_LOCKS_ENV] = Array.from(locks).join(`
|
|
9585
|
+
`);
|
|
9586
|
+
}, markHeldLock = (buildDirectory) => {
|
|
9587
|
+
const locks = readHeldLockEnv();
|
|
9588
|
+
locks.add(buildDirectory);
|
|
9589
|
+
writeHeldLockEnv(locks);
|
|
9590
|
+
}, unmarkHeldLock = (buildDirectory) => {
|
|
9591
|
+
const locks = readHeldLockEnv();
|
|
9592
|
+
locks.delete(buildDirectory);
|
|
9593
|
+
writeHeldLockEnv(locks);
|
|
9594
|
+
}, acquireBuildDirectoryLock = async (buildDirectory, options = {}) => {
|
|
9595
|
+
if (readHeldLockEnv().has(buildDirectory)) {
|
|
9596
|
+
return async () => {};
|
|
9597
|
+
}
|
|
9598
|
+
const heldLock = heldLocks.get(buildDirectory);
|
|
9599
|
+
if (heldLock) {
|
|
9600
|
+
heldLock.count += 1;
|
|
9601
|
+
return async () => {
|
|
9602
|
+
heldLock.count -= 1;
|
|
9603
|
+
if (heldLock.count === 0) {
|
|
9604
|
+
heldLocks.delete(buildDirectory);
|
|
9605
|
+
await heldLock.release();
|
|
9606
|
+
}
|
|
9607
|
+
};
|
|
9608
|
+
}
|
|
9579
9609
|
const lockPath = lockPathForBuildDirectory(buildDirectory);
|
|
9580
9610
|
const staleLockMs = options.staleLockMs ?? DEFAULT_STALE_LOCK_MS;
|
|
9581
9611
|
const timeoutMs = options.timeoutMs ?? DEFAULT_LOCK_TIMEOUT_MS;
|
|
9582
9612
|
const start = Date.now();
|
|
9583
9613
|
while (true) {
|
|
9584
9614
|
try {
|
|
9615
|
+
await mkdir3(dirname8(lockPath), { recursive: true });
|
|
9585
9616
|
await mkdir3(lockPath);
|
|
9586
9617
|
await writeFile4(join13(lockPath, "owner"), JSON.stringify({
|
|
9587
9618
|
buildDirectory,
|
|
9588
9619
|
createdAt: new Date().toISOString(),
|
|
9589
9620
|
pid: process.pid
|
|
9590
9621
|
}, null, 2));
|
|
9591
|
-
|
|
9622
|
+
const release = async () => {
|
|
9592
9623
|
await rm4(lockPath, { force: true, recursive: true }).catch(() => {});
|
|
9593
9624
|
};
|
|
9625
|
+
heldLocks.set(buildDirectory, { count: 1, release });
|
|
9626
|
+
markHeldLock(buildDirectory);
|
|
9627
|
+
return async () => {
|
|
9628
|
+
const current = heldLocks.get(buildDirectory);
|
|
9629
|
+
if (!current)
|
|
9630
|
+
return;
|
|
9631
|
+
current.count -= 1;
|
|
9632
|
+
if (current.count > 0)
|
|
9633
|
+
return;
|
|
9634
|
+
heldLocks.delete(buildDirectory);
|
|
9635
|
+
unmarkHeldLock(buildDirectory);
|
|
9636
|
+
await current.release();
|
|
9637
|
+
};
|
|
9594
9638
|
} catch (error) {
|
|
9595
9639
|
if (!isAlreadyExistsError(error))
|
|
9596
9640
|
throw error;
|
|
@@ -9617,6 +9661,7 @@ var DEFAULT_LOCK_TIMEOUT_MS = 120000, DEFAULT_STALE_LOCK_MS, LOCK_POLL_MS = 250,
|
|
|
9617
9661
|
};
|
|
9618
9662
|
var init_buildDirectoryLock = __esm(() => {
|
|
9619
9663
|
DEFAULT_STALE_LOCK_MS = 10 * 60000;
|
|
9664
|
+
heldLocks = new Map;
|
|
9620
9665
|
});
|
|
9621
9666
|
|
|
9622
9667
|
// src/utils/validateSafePath.ts
|
|
@@ -13831,8 +13876,8 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13831
13876
|
extractBuildError(reactClientLogs, "react-client", "React client", frameworkNames, isIncremental, throwOnError);
|
|
13832
13877
|
}
|
|
13833
13878
|
const reactClientOutputPaths = reactClientOutputs.map((artifact) => artifact.path);
|
|
13834
|
-
if (
|
|
13835
|
-
await tracePhase("postprocess/react-imports", () => rewriteReactImports(reactClientOutputPaths,
|
|
13879
|
+
if (Object.keys(reactExternalPaths).length > 0 && reactClientOutputPaths.length > 0) {
|
|
13880
|
+
await tracePhase("postprocess/react-imports", () => rewriteReactImports(reactClientOutputPaths, reactExternalPaths));
|
|
13836
13881
|
}
|
|
13837
13882
|
if (hmr && reactClientOutputPaths.length > 0) {
|
|
13838
13883
|
await tracePhase("postprocess/react-refresh-globals", () => patchRefreshGlobals(reactClientOutputPaths));
|
|
@@ -13843,14 +13888,14 @@ ${content.slice(firstUseIdx)}`;
|
|
|
13843
13888
|
const islandClientLogs = islandClientResult?.logs ?? [];
|
|
13844
13889
|
const islandClientOutputs = islandClientResult?.outputs ?? [];
|
|
13845
13890
|
const islandClientOutputPaths = islandClientOutputs.map((artifact) => artifact.path);
|
|
13846
|
-
if (
|
|
13847
|
-
await tracePhase("postprocess/non-react-react-imports", () => rewriteReactImports(nonReactClientOutputPaths,
|
|
13891
|
+
if (Object.keys(nonReactExternalPaths).length > 0 && nonReactClientOutputPaths.length > 0) {
|
|
13892
|
+
await tracePhase("postprocess/non-react-react-imports", () => rewriteReactImports(nonReactClientOutputPaths, nonReactExternalPaths));
|
|
13848
13893
|
}
|
|
13849
13894
|
if (hmr && nonReactClientOutputPaths.length > 0) {
|
|
13850
13895
|
await tracePhase("postprocess/non-react-refresh-globals", () => patchRefreshGlobals(nonReactClientOutputPaths));
|
|
13851
13896
|
}
|
|
13852
|
-
if (
|
|
13853
|
-
await tracePhase("postprocess/island-react-imports", () => rewriteReactImports(islandClientOutputPaths,
|
|
13897
|
+
if (Object.keys(nonReactExternalPaths).length > 0 && islandClientOutputPaths.length > 0) {
|
|
13898
|
+
await tracePhase("postprocess/island-react-imports", () => rewriteReactImports(islandClientOutputPaths, nonReactExternalPaths));
|
|
13854
13899
|
}
|
|
13855
13900
|
if (hmr && islandClientOutputPaths.length > 0) {
|
|
13856
13901
|
await tracePhase("postprocess/island-refresh-globals", () => patchRefreshGlobals(islandClientOutputPaths));
|
|
@@ -17709,7 +17754,7 @@ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g,
|
|
|
17709
17754
|
minify: false,
|
|
17710
17755
|
naming: "[name].[ext]",
|
|
17711
17756
|
outdir: vendorDir,
|
|
17712
|
-
splitting:
|
|
17757
|
+
splitting: false,
|
|
17713
17758
|
target: "browser",
|
|
17714
17759
|
throw: false
|
|
17715
17760
|
});
|
|
@@ -18149,5 +18194,5 @@ export {
|
|
|
18149
18194
|
build
|
|
18150
18195
|
};
|
|
18151
18196
|
|
|
18152
|
-
//# debugId=
|
|
18197
|
+
//# debugId=0D948A8955A280DA64756E2164756E21
|
|
18153
18198
|
//# sourceMappingURL=build.js.map
|