@absolutejs/absolute 0.20.0-beta.129 → 0.20.0-beta.130
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/CHANGELOG.md +16 -0
- package/changelog.json +26 -0
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/build.js +612 -558
- package/dist/build.js.map +7 -7
- package/dist/cli/{buildDepVendor-rz5w5cp0.js → buildDepVendor-8akhr8n8.js} +3 -6
- package/dist/cli/{dev-m9qttkr7.js → dev-qg7fr16s.js} +26 -1
- package/dist/cli/index-4rhxthsy.js +8 -0
- package/dist/cli/index.js +1 -1
- package/dist/dev/serverBootstrap.js +44 -22
- package/dist/index.js +633 -576
- package/dist/index.js.map +10 -10
- package/dist/mobile/remoteMacAgentEntry.js +1 -1
- package/dist/src/dev/fileHashTracker.d.ts +1 -0
- package/dist/src/dev/hot/appLifecycle.d.ts +1 -0
- package/dist/src/dev/hot/plugin.d.ts +11 -1
- package/dist/src/dev/hot/reload.d.ts +3 -0
- package/dist/src/dev/hot/runtime.d.ts +5 -1
- package/dist/types/globals.d.ts +10 -0
- package/package.json +1 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
isTestSourcePath
|
|
4
|
+
} from "./index-4rhxthsy.js";
|
|
2
5
|
import {
|
|
3
6
|
devProfileEnabled
|
|
4
7
|
} from "./index-1rabqyq0.js";
|
|
@@ -36,12 +39,6 @@ export const __ABSOLUTE_VENDOR_NAMESPACE__ = __abs_ns;
|
|
|
36
39
|
`;
|
|
37
40
|
};
|
|
38
41
|
|
|
39
|
-
// src/utils/isTestSourcePath.ts
|
|
40
|
-
var isTestSourcePath = (file) => {
|
|
41
|
-
const normalized = file.replace(/\\/g, "/");
|
|
42
|
-
return normalized.includes("/__tests__/") || /\.(?:test|spec)\.[cm]?[jt]sx?$/.test(normalized);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
42
|
// src/build/buildDepVendor.ts
|
|
46
43
|
var toSafeFileName = (specifier) => {
|
|
47
44
|
const prefix = specifier.startsWith("@") ? "_" : "";
|
|
@@ -39,6 +39,9 @@ import {
|
|
|
39
39
|
sendTelemetryEvent
|
|
40
40
|
} from "./index-9kwmb3c0.js";
|
|
41
41
|
import"./index-w5vswatm.js";
|
|
42
|
+
import {
|
|
43
|
+
isTestSourcePath
|
|
44
|
+
} from "./index-4rhxthsy.js";
|
|
42
45
|
import"./index-1rabqyq0.js";
|
|
43
46
|
import {
|
|
44
47
|
COMPOSE_PATH,
|
|
@@ -71,6 +74,26 @@ import {
|
|
|
71
74
|
// src/dev/serverEntryCopies.ts
|
|
72
75
|
var isAbsoluteServerEntryCopyPath = (path) => /(?:^|[/\\])\.absolutejs-hmr-/.test(path);
|
|
73
76
|
|
|
77
|
+
// src/dev/restartScope.ts
|
|
78
|
+
import { realpathSync } from "fs";
|
|
79
|
+
var MODULE_FILE = /\.(?:[cm]?[jt]sx?|mts|cts)$/;
|
|
80
|
+
var DOCUMENT_FILE = /\.(?:md|mdx|markdown|txt|rst|adoc|log|csv)$/i;
|
|
81
|
+
var realPath = (path) => {
|
|
82
|
+
try {
|
|
83
|
+
return realpathSync(path);
|
|
84
|
+
} catch {
|
|
85
|
+
return path;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
var isLoadedByThisProcess = (path) => (path in __require.cache) || (realPath(path) in __require.cache);
|
|
89
|
+
var changeNeedsRestart = (path, isLoaded = isLoadedByThisProcess) => {
|
|
90
|
+
if (DOCUMENT_FILE.test(path) || isTestSourcePath(path))
|
|
91
|
+
return false;
|
|
92
|
+
if (MODULE_FILE.test(path))
|
|
93
|
+
return isLoaded(path);
|
|
94
|
+
return true;
|
|
95
|
+
};
|
|
96
|
+
|
|
74
97
|
// src/cli/scripts/dev.ts
|
|
75
98
|
var {$, env } = globalThis.Bun;
|
|
76
99
|
import { spawn as nodeSpawn } from "child_process";
|
|
@@ -740,7 +763,7 @@ var serializeDependencies = (graph) => {
|
|
|
740
763
|
return dependencies;
|
|
741
764
|
};
|
|
742
765
|
var computePayload = async (config, vendorSourceDirs) => {
|
|
743
|
-
const { computeDepVendorPaths } = await import("./buildDepVendor-
|
|
766
|
+
const { computeDepVendorPaths } = await import("./buildDepVendor-8akhr8n8.js");
|
|
744
767
|
const vendors = computeDepVendorPaths(vendorSourceDirs);
|
|
745
768
|
const graph = {
|
|
746
769
|
dependencies: new Map,
|
|
@@ -2632,6 +2655,8 @@ var dev = async (serverEntry, configPath, options = {}) => {
|
|
|
2632
2655
|
return;
|
|
2633
2656
|
if (ROOT_RESTART_DENY.has(filename))
|
|
2634
2657
|
return;
|
|
2658
|
+
if (!changeNeedsRestart(join2(serverEntryDir, filename), () => false))
|
|
2659
|
+
return;
|
|
2635
2660
|
const now = Date.now();
|
|
2636
2661
|
const last = recentlyHandled.get(filename) ?? 0;
|
|
2637
2662
|
if (now - last < 100)
|
package/dist/cli/index.js
CHANGED
|
@@ -58,7 +58,7 @@ if (command === "dev") {
|
|
|
58
58
|
}
|
|
59
59
|
const positionalArgs = stripNamedArgs("--config", "--android-device", "--ios-device").filter((arg) => arg !== "--no-mobile" && arg !== "--eager");
|
|
60
60
|
const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
|
|
61
|
-
const { dev } = await import("./dev-
|
|
61
|
+
const { dev } = await import("./dev-qg7fr16s.js");
|
|
62
62
|
await dev(serverEntry, configPath, {
|
|
63
63
|
androidDevice,
|
|
64
64
|
eager: args.includes("--eager"),
|
|
@@ -1627,6 +1627,7 @@ var init_analyze = __esm(() => {
|
|
|
1627
1627
|
});
|
|
1628
1628
|
|
|
1629
1629
|
// src/dev/hot/runtime.ts
|
|
1630
|
+
import { relative } from "path";
|
|
1630
1631
|
var records, recordFor = (path) => {
|
|
1631
1632
|
const existing = records.get(path);
|
|
1632
1633
|
if (existing)
|
|
@@ -1636,6 +1637,7 @@ var records, recordFor = (path) => {
|
|
|
1636
1637
|
generation: 0,
|
|
1637
1638
|
keys: new Map,
|
|
1638
1639
|
lastChanged: new Set,
|
|
1640
|
+
lastTimings: new Map,
|
|
1639
1641
|
meta: {},
|
|
1640
1642
|
path,
|
|
1641
1643
|
revisions: new Map,
|
|
@@ -1687,11 +1689,23 @@ var records, recordFor = (path) => {
|
|
|
1687
1689
|
reran: new Set,
|
|
1688
1690
|
seen: new Set,
|
|
1689
1691
|
slots: new Map,
|
|
1692
|
+
timings: new Map,
|
|
1690
1693
|
...decideReruns(record, plan, meta)
|
|
1691
1694
|
};
|
|
1692
1695
|
record.pending = pending;
|
|
1693
1696
|
const { generation } = pending;
|
|
1694
|
-
const owned = (id, work) =>
|
|
1697
|
+
const owned = (id, work) => {
|
|
1698
|
+
const startedAt = performance.now();
|
|
1699
|
+
const result = runOwned(ownerOf(path, id), generation, work);
|
|
1700
|
+
pending.timings.set(id, performance.now() - startedAt);
|
|
1701
|
+
return result;
|
|
1702
|
+
};
|
|
1703
|
+
const ownedAsync = async (id, work) => {
|
|
1704
|
+
const startedAt = performance.now();
|
|
1705
|
+
const result = await runOwned(ownerOf(path, id), generation, work);
|
|
1706
|
+
pending.timings.set(id, performance.now() - startedAt);
|
|
1707
|
+
return result;
|
|
1708
|
+
};
|
|
1695
1709
|
const kept = (id) => {
|
|
1696
1710
|
pending.seen.add(id);
|
|
1697
1711
|
const previous = record.slots.get(id);
|
|
@@ -1717,7 +1731,7 @@ var records, recordFor = (path) => {
|
|
|
1717
1731
|
ca: async (name, id, init) => {
|
|
1718
1732
|
if (kept(id) && name in record.cells)
|
|
1719
1733
|
return;
|
|
1720
|
-
record.cells[name] = await
|
|
1734
|
+
record.cells[name] = await ownedAsync(id, init);
|
|
1721
1735
|
store(id, undefined);
|
|
1722
1736
|
},
|
|
1723
1737
|
end: () => commit(record, pending),
|
|
@@ -1731,7 +1745,7 @@ var records, recordFor = (path) => {
|
|
|
1731
1745
|
const previous = kept(id);
|
|
1732
1746
|
if (previous)
|
|
1733
1747
|
return previous.value;
|
|
1734
|
-
return store(id, await
|
|
1748
|
+
return store(id, await ownedAsync(id, factory));
|
|
1735
1749
|
},
|
|
1736
1750
|
r: (id, effect) => {
|
|
1737
1751
|
if (kept(id))
|
|
@@ -1742,7 +1756,7 @@ var records, recordFor = (path) => {
|
|
|
1742
1756
|
ra: async (id, effect) => {
|
|
1743
1757
|
if (kept(id))
|
|
1744
1758
|
return;
|
|
1745
|
-
await
|
|
1759
|
+
await ownedAsync(id, effect);
|
|
1746
1760
|
store(id, undefined);
|
|
1747
1761
|
}
|
|
1748
1762
|
};
|
|
@@ -1762,7 +1776,7 @@ var records, recordFor = (path) => {
|
|
|
1762
1776
|
}, statementOwners = (path, ids) => new Set([...ids].map((id) => ownerOf(path, id))), logDisposed = (path, counts) => {
|
|
1763
1777
|
const parts = Object.entries(counts).map(([kind, count]) => `${count} ${kind}${count === 1 ? "" : "s"}`);
|
|
1764
1778
|
if (parts.length > 0)
|
|
1765
|
-
console.log(`[hmr] stopped ${parts.join(", ")} started by replaced code in ${path}`);
|
|
1779
|
+
console.log(`[hmr] stopped ${parts.join(", ")} started by replaced code in ${relative(process.cwd(), path) || path}`);
|
|
1766
1780
|
}, stopReplaced = async (record, pending, replaced) => {
|
|
1767
1781
|
const owners = statementOwners(record.path, replaced.keys());
|
|
1768
1782
|
const counts = await disposeResources((owner, generation) => owners.has(owner) && generation < pending.generation);
|
|
@@ -1781,6 +1795,7 @@ var records, recordFor = (path) => {
|
|
|
1781
1795
|
record.meta = pending.meta;
|
|
1782
1796
|
record.keys = pending.keys;
|
|
1783
1797
|
record.lastChanged = pending.changedExports;
|
|
1798
|
+
record.lastTimings = pending.timings;
|
|
1784
1799
|
for (const name of pending.changedExports)
|
|
1785
1800
|
record.revisions.set(name, (record.revisions.get(name) ?? 0) + 1);
|
|
1786
1801
|
if (replaced.size === 0)
|
|
@@ -1815,7 +1830,7 @@ var records, recordFor = (path) => {
|
|
|
1815
1830
|
};
|
|
1816
1831
|
var init_runtime = __esm(() => {
|
|
1817
1832
|
init_hotResources();
|
|
1818
|
-
records = new Map;
|
|
1833
|
+
records = globalThis.__absoluteHotRecords ??= new Map;
|
|
1819
1834
|
});
|
|
1820
1835
|
|
|
1821
1836
|
// node_modules/source-map/lib/base64.js
|
|
@@ -2032,7 +2047,7 @@ var require_util = __commonJS(function(exports) {
|
|
|
2032
2047
|
exports.isAbsolute = function(aPath) {
|
|
2033
2048
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
2034
2049
|
};
|
|
2035
|
-
function
|
|
2050
|
+
function relative2(aRoot, aPath) {
|
|
2036
2051
|
if (aRoot === "") {
|
|
2037
2052
|
aRoot = ".";
|
|
2038
2053
|
}
|
|
@@ -2051,7 +2066,7 @@ var require_util = __commonJS(function(exports) {
|
|
|
2051
2066
|
}
|
|
2052
2067
|
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
2053
2068
|
}
|
|
2054
|
-
exports.relative =
|
|
2069
|
+
exports.relative = relative2;
|
|
2055
2070
|
var supportsNullProto = function() {
|
|
2056
2071
|
var obj = Object.create(null);
|
|
2057
2072
|
return !("__proto__" in obj);
|
|
@@ -4002,7 +4017,7 @@ var require_source_map_support = __commonJS(function(exports, module) {
|
|
|
4002
4017
|
|
|
4003
4018
|
// node_modules/typescript/lib/typescript.js
|
|
4004
4019
|
var require_typescript = __commonJS(function(exports, module) {
|
|
4005
|
-
var __dirname = "/tmp/claude-1000/-home-alexkahn-onspark-absolutejs-dealroom/2bfd88db-2cb9-4088-8977-3c07598f96a5/scratchpad/
|
|
4020
|
+
var __dirname = "/tmp/claude-1000/-home-alexkahn-onspark-absolutejs-dealroom/2bfd88db-2cb9-4088-8977-3c07598f96a5/scratchpad/gate130/node_modules/typescript/lib", __filename = "/tmp/claude-1000/-home-alexkahn-onspark-absolutejs-dealroom/2bfd88db-2cb9-4088-8977-3c07598f96a5/scratchpad/gate130/node_modules/typescript/lib/typescript.js";
|
|
4006
4021
|
/*! *****************************************************************************
|
|
4007
4022
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4008
4023
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -12861,11 +12876,11 @@ ${lanes.join(`
|
|
|
12861
12876
|
return toComponents;
|
|
12862
12877
|
}
|
|
12863
12878
|
const components = toComponents.slice(start);
|
|
12864
|
-
const
|
|
12879
|
+
const relative2 = [];
|
|
12865
12880
|
for (;start < fromComponents.length; start++) {
|
|
12866
|
-
|
|
12881
|
+
relative2.push("..");
|
|
12867
12882
|
}
|
|
12868
|
-
return ["", ...
|
|
12883
|
+
return ["", ...relative2, ...components];
|
|
12869
12884
|
}
|
|
12870
12885
|
function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) {
|
|
12871
12886
|
Debug.assert(getRootLength(fromDirectory) > 0 === getRootLength(to) > 0, "Paths must either both be absolute or both be relative");
|
|
@@ -50161,9 +50176,9 @@ ${lanes.join(`
|
|
|
50161
50176
|
if (!startsWithDirectory(target, realPathDirectory, getCanonicalFileName)) {
|
|
50162
50177
|
return;
|
|
50163
50178
|
}
|
|
50164
|
-
const
|
|
50179
|
+
const relative2 = getRelativePathFromDirectory(realPathDirectory, target, getCanonicalFileName);
|
|
50165
50180
|
for (const symlinkDirectory of symlinkDirectories) {
|
|
50166
|
-
const option = resolvePath(symlinkDirectory,
|
|
50181
|
+
const option = resolvePath(symlinkDirectory, relative2);
|
|
50167
50182
|
const result2 = cb(option, target === referenceRedirect);
|
|
50168
50183
|
shouldFilterIgnoredPaths = true;
|
|
50169
50184
|
if (result2)
|
|
@@ -172723,8 +172738,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
172723
172738
|
|
|
172724
172739
|
// src/dev/hot/plugin.ts
|
|
172725
172740
|
import { mkdirSync as mkdirSync2, readFileSync as readFileSync2, realpathSync, writeFileSync } from "fs";
|
|
172726
|
-
import { extname as extname2, join as join2, relative, resolve as resolve2, sep } from "path";
|
|
172727
|
-
var HOT_QUERY,
|
|
172741
|
+
import { extname as extname2, join as join2, relative as relative2, resolve as resolve2, sep } from "path";
|
|
172742
|
+
var HOT_QUERY, SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS_LOADER = "ts", LOADERS, loaderFor = (path) => LOADERS[extname2(path)] ?? TS_LOADER, realPath = (path) => {
|
|
172728
172743
|
try {
|
|
172729
172744
|
return realpathSync(path);
|
|
172730
172745
|
} catch {
|
|
@@ -172733,7 +172748,8 @@ var HOT_QUERY, JS_LOADER = "js", SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS
|
|
|
172733
172748
|
}, escapeRegex = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), typescript, loadTypescript = async () => {
|
|
172734
172749
|
typescript ??= await Promise.resolve().then(() => __toESM(require_typescript(), 1));
|
|
172735
172750
|
return typescript;
|
|
172736
|
-
},
|
|
172751
|
+
}, shared, analyses, isHotManaged = (path) => {
|
|
172752
|
+
const state2 = shared.installed;
|
|
172737
172753
|
if (!state2)
|
|
172738
172754
|
return false;
|
|
172739
172755
|
const file = realPath(path);
|
|
@@ -172762,6 +172778,7 @@ var HOT_QUERY, JS_LOADER = "js", SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS
|
|
|
172762
172778
|
return typeof Reflect.get(value, "reason") === "string";
|
|
172763
172779
|
return status === true && typeof Reflect.get(value, "code") === "string" && typeof Reflect.get(value, "exports") === "object" && Array.isArray(Reflect.get(value, "reexports")) && Array.isArray(Reflect.get(value, "plan"));
|
|
172764
172780
|
}, cachePath = (cacheDir, key) => join2(cacheDir, `${key}.json`), readCached = (key) => {
|
|
172781
|
+
const state2 = shared.installed;
|
|
172765
172782
|
if (!state2)
|
|
172766
172783
|
return;
|
|
172767
172784
|
try {
|
|
@@ -172771,6 +172788,7 @@ var HOT_QUERY, JS_LOADER = "js", SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS
|
|
|
172771
172788
|
return;
|
|
172772
172789
|
}
|
|
172773
172790
|
}, writeCached = (key, analysis) => {
|
|
172791
|
+
const state2 = shared.installed;
|
|
172774
172792
|
if (!state2)
|
|
172775
172793
|
return;
|
|
172776
172794
|
try {
|
|
@@ -172804,7 +172822,7 @@ var HOT_QUERY, JS_LOADER = "js", SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS
|
|
|
172804
172822
|
return { contents: source, loader: loaderFor(path) };
|
|
172805
172823
|
return {
|
|
172806
172824
|
contents: facadeSource(path, `${path}?absolute-hot=${currentTag(path)}`, analysis),
|
|
172807
|
-
loader:
|
|
172825
|
+
loader: loaderFor(path)
|
|
172808
172826
|
};
|
|
172809
172827
|
}, SEPARATOR = "[\\\\/]", installHotModulePlugin = async (options) => {
|
|
172810
172828
|
try {
|
|
@@ -172823,7 +172841,7 @@ var HOT_QUERY, JS_LOADER = "js", SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS
|
|
|
172823
172841
|
excludedDirs: options.excludedDirs.map((dir) => realPath(resolve2(dir))),
|
|
172824
172842
|
root
|
|
172825
172843
|
};
|
|
172826
|
-
|
|
172844
|
+
shared.installed = installed;
|
|
172827
172845
|
installHotRuntime();
|
|
172828
172846
|
const { entryPath } = installed;
|
|
172829
172847
|
Bun.plugin({
|
|
@@ -172850,7 +172868,7 @@ var HOT_QUERY, JS_LOADER = "js", SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS
|
|
|
172850
172868
|
return true;
|
|
172851
172869
|
}, managedFilter = (options) => {
|
|
172852
172870
|
const under = (dir) => {
|
|
172853
|
-
const rel =
|
|
172871
|
+
const rel = relative2(options.root, dir);
|
|
172854
172872
|
if (rel === "" || rel.startsWith(".."))
|
|
172855
172873
|
return;
|
|
172856
172874
|
return `(?!${escapeRegex(rel).split(sep).join(SEPARATOR)}(?:${SEPARATOR}|\\?|$))`;
|
|
@@ -172860,7 +172878,7 @@ var HOT_QUERY, JS_LOADER = "js", SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, TS
|
|
|
172860
172878
|
join2(ABSOLUTE_ROOT, "src"),
|
|
172861
172879
|
join2(ABSOLUTE_ROOT, "dist")
|
|
172862
172880
|
].map(under).filter((pattern) => pattern !== undefined);
|
|
172863
|
-
const config =
|
|
172881
|
+
const config = relative2(options.root, options.configPath);
|
|
172864
172882
|
const configPattern = config && !config.startsWith("..") ? `(?!${escapeRegex(config).split(sep).join(SEPARATOR)}(?:\\?|$))` : "";
|
|
172865
172883
|
return new RegExp([
|
|
172866
172884
|
`^${escapeRegex(options.root)}${SEPARATOR}`,
|
|
@@ -172887,7 +172905,11 @@ var init_plugin = __esm(() => {
|
|
|
172887
172905
|
".mjs": "js",
|
|
172888
172906
|
".tsx": "tsx"
|
|
172889
172907
|
};
|
|
172890
|
-
|
|
172908
|
+
shared = globalThis.__absoluteHotPlugin ??= {
|
|
172909
|
+
analyses: new Map,
|
|
172910
|
+
installed: undefined
|
|
172911
|
+
};
|
|
172912
|
+
({ analyses } = shared);
|
|
172891
172913
|
});
|
|
172892
172914
|
|
|
172893
172915
|
// src/dev/hot/install.ts
|