@absolutejs/absolute 0.19.0-beta.769 → 0.19.0-beta.772
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/index.js +102 -96
- package/dist/angular/index.js.map +6 -6
- package/dist/angular/server.js +84 -78
- package/dist/angular/server.js.map +6 -6
- package/dist/build.js +5364 -37973
- package/dist/build.js.map +14 -10
- package/dist/cli/index.js +118 -6
- package/dist/client/index.js +23 -18
- package/dist/client/index.js.map +5 -5
- package/dist/index.js +10582 -43181
- package/dist/index.js.map +17 -12
- package/dist/islands/index.js +42 -37
- package/dist/islands/index.js.map +5 -5
- package/dist/react/index.js +42 -37
- package/dist/react/index.js.map +5 -5
- package/dist/src/build/index.d.ts +2 -0
- package/dist/src/build/tailwindCompiler.d.ts +8 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/svelte/index.js +23 -18
- package/dist/svelte/index.js.map +5 -5
- package/dist/vue/index.js +42 -37
- package/dist/vue/index.js.map +5 -5
- package/package.json +1 -6
package/dist/react/index.js
CHANGED
|
@@ -1069,9 +1069,25 @@ var requireCurrentIslandRegistry = () => {
|
|
|
1069
1069
|
globalThis.__absoluteIslandRegistry = registry;
|
|
1070
1070
|
};
|
|
1071
1071
|
|
|
1072
|
+
// src/angular/resolveAngularPackage.ts
|
|
1073
|
+
import { existsSync } from "fs";
|
|
1074
|
+
import { resolve } from "path";
|
|
1075
|
+
var resolveAngularPackage = (specifier) => {
|
|
1076
|
+
const fromCompiledRuntime = process.env.ABSOLUTE_BUILD_DIR ? resolve(process.env.ABSOLUTE_BUILD_DIR, "node_modules", specifier) : null;
|
|
1077
|
+
if (fromCompiledRuntime && existsSync(fromCompiledRuntime)) {
|
|
1078
|
+
return fromCompiledRuntime;
|
|
1079
|
+
}
|
|
1080
|
+
const fromProject = resolve(process.cwd(), "node_modules", specifier);
|
|
1081
|
+
if (existsSync(fromProject)) {
|
|
1082
|
+
return fromProject;
|
|
1083
|
+
}
|
|
1084
|
+
return specifier;
|
|
1085
|
+
};
|
|
1086
|
+
var init_resolveAngularPackage = () => {};
|
|
1087
|
+
|
|
1072
1088
|
// src/angular/injectorPatch.ts
|
|
1073
|
-
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
1074
|
-
import { dirname, join
|
|
1089
|
+
import { existsSync as existsSync2, readFileSync, writeFileSync } from "fs";
|
|
1090
|
+
import { dirname, join } from "path";
|
|
1075
1091
|
var applyInjectorPatch = (chunkPath, content) => {
|
|
1076
1092
|
if (content.includes('Symbol.for("angular.currentInjector")')) {
|
|
1077
1093
|
return;
|
|
@@ -1107,9 +1123,9 @@ var applyInjectorPatch = (chunkPath, content) => {
|
|
|
1107
1123
|
}
|
|
1108
1124
|
writeFileSync(chunkPath, patched, "utf-8");
|
|
1109
1125
|
}, resolveAngularCoreDir = () => {
|
|
1110
|
-
const
|
|
1111
|
-
if (
|
|
1112
|
-
return
|
|
1126
|
+
const resolved = resolveAngularPackage("@angular/core");
|
|
1127
|
+
if (existsSync2(join(resolved, "package.json"))) {
|
|
1128
|
+
return resolved;
|
|
1113
1129
|
}
|
|
1114
1130
|
return dirname(__require.resolve("@angular/core/package.json"));
|
|
1115
1131
|
}, patchAngularInjectorSingleton = () => {
|
|
@@ -1121,21 +1137,10 @@ var applyInjectorPatch = (chunkPath, content) => {
|
|
|
1121
1137
|
} catch {}
|
|
1122
1138
|
};
|
|
1123
1139
|
var init_injectorPatch = __esm(() => {
|
|
1140
|
+
init_resolveAngularPackage();
|
|
1124
1141
|
patchAngularInjectorSingleton();
|
|
1125
1142
|
});
|
|
1126
1143
|
|
|
1127
|
-
// src/angular/resolveAngularPackage.ts
|
|
1128
|
-
import { existsSync as existsSync2 } from "fs";
|
|
1129
|
-
import { resolve as resolve2 } from "path";
|
|
1130
|
-
var resolveAngularPackage = (specifier) => {
|
|
1131
|
-
const fromProject = resolve2(process.cwd(), "node_modules", specifier);
|
|
1132
|
-
if (existsSync2(fromProject)) {
|
|
1133
|
-
return fromProject;
|
|
1134
|
-
}
|
|
1135
|
-
return specifier;
|
|
1136
|
-
};
|
|
1137
|
-
var init_resolveAngularPackage = () => {};
|
|
1138
|
-
|
|
1139
1144
|
// src/angular/angularPatch.ts
|
|
1140
1145
|
var exports_angularPatch = {};
|
|
1141
1146
|
__export(exports_angularPatch, {
|
|
@@ -1739,7 +1744,7 @@ var init_islandSsr = __esm(() => {
|
|
|
1739
1744
|
});
|
|
1740
1745
|
|
|
1741
1746
|
// src/build/resolvePackageImport.ts
|
|
1742
|
-
import { resolve as
|
|
1747
|
+
import { resolve as resolve2, join as join2 } from "path";
|
|
1743
1748
|
import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
|
|
1744
1749
|
var resolveExportPath = (entry, conditions) => {
|
|
1745
1750
|
if (typeof entry === "string")
|
|
@@ -1761,10 +1766,10 @@ var resolveExportPath = (entry, conditions) => {
|
|
|
1761
1766
|
const packageName = isScoped ? `${parts[0]}/${parts[1]}` : parts[0];
|
|
1762
1767
|
const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
|
|
1763
1768
|
const exportKey = subpath ? `./${subpath}` : ".";
|
|
1764
|
-
const currentPackageJsonPath =
|
|
1769
|
+
const currentPackageJsonPath = resolve2(process.cwd(), "package.json");
|
|
1765
1770
|
const currentPackageJson = existsSync3(currentPackageJsonPath) ? JSON.parse(readFileSync2(currentPackageJsonPath, "utf-8")) : null;
|
|
1766
1771
|
const currentPackageDir = currentPackageJson?.name === packageName ? process.cwd() : null;
|
|
1767
|
-
const packageDir = currentPackageDir ??
|
|
1772
|
+
const packageDir = currentPackageDir ?? resolve2(process.cwd(), "node_modules", packageName ?? "");
|
|
1768
1773
|
const packageJsonPath = join2(packageDir, "package.json");
|
|
1769
1774
|
if (!existsSync3(packageJsonPath))
|
|
1770
1775
|
return null;
|
|
@@ -1780,12 +1785,12 @@ var resolveExportPath = (entry, conditions) => {
|
|
|
1780
1785
|
if (!importPath)
|
|
1781
1786
|
return null;
|
|
1782
1787
|
if (currentPackageDir && importPath.startsWith("./dist/")) {
|
|
1783
|
-
const sourceCandidate =
|
|
1788
|
+
const sourceCandidate = resolve2(packageDir, importPath.replace(/^\.\/dist\//, "./src/"));
|
|
1784
1789
|
if (existsSync3(sourceCandidate)) {
|
|
1785
1790
|
return sourceCandidate;
|
|
1786
1791
|
}
|
|
1787
1792
|
}
|
|
1788
|
-
const resolved =
|
|
1793
|
+
const resolved = resolve2(packageDir, importPath);
|
|
1789
1794
|
return existsSync3(resolved) ? resolved : null;
|
|
1790
1795
|
} catch {
|
|
1791
1796
|
return null;
|
|
@@ -1936,7 +1941,7 @@ __export(exports_stylePreprocessor, {
|
|
|
1936
1941
|
import { existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
|
|
1937
1942
|
import { readFile } from "fs/promises";
|
|
1938
1943
|
import { createRequire } from "module";
|
|
1939
|
-
import { dirname as dirname2, extname, isAbsolute, join as join3, relative, resolve as
|
|
1944
|
+
import { dirname as dirname2, extname, isAbsolute, join as join3, relative, resolve as resolve3 } from "path";
|
|
1940
1945
|
import { fileURLToPath } from "url";
|
|
1941
1946
|
var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTERN, STYLE_LANGUAGE_PATTERN, importOptionalPeer, requireOptionalPeer, requireFromCwd, isPreprocessableStylePath = (filePath) => STYLE_EXTENSION_PATTERN.test(filePath), isStyleModulePath = (filePath) => STYLE_MODULE_EXTENSION_PATTERN.test(filePath), isStylePath = (filePath) => /\.(css|s[ac]ss|less|styl(?:us)?)$/i.test(filePath), getStyleBaseName = (filePath) => filePath.replace(/\.(css|s[ac]ss|less|styl(?:us)?)$/i, ""), getStyleLanguage = (filePathOrLanguage) => {
|
|
1942
1947
|
const normalized = filePathOrLanguage.toLowerCase();
|
|
@@ -1958,7 +1963,7 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
|
|
|
1958
1963
|
}, normalizeLoadPaths = (filePath, paths = []) => [
|
|
1959
1964
|
dirname2(filePath),
|
|
1960
1965
|
process.cwd(),
|
|
1961
|
-
...paths.map((path) =>
|
|
1966
|
+
...paths.map((path) => resolve3(process.cwd(), path))
|
|
1962
1967
|
], tsconfigAliasCache, stripJsonComments = (source) => source.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[^:])\/\/.*$/gm, "$1"), normalizeAliasEntries = (aliases) => Object.entries(aliases ?? {}).map(([pattern, value]) => ({
|
|
1963
1968
|
pattern,
|
|
1964
1969
|
replacements: Array.isArray(value) ? value : [value]
|
|
@@ -1966,7 +1971,7 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
|
|
|
1966
1971
|
const cwd = process.cwd();
|
|
1967
1972
|
if (tsconfigAliasCache?.cwd === cwd)
|
|
1968
1973
|
return tsconfigAliasCache;
|
|
1969
|
-
const tsconfigPath =
|
|
1974
|
+
const tsconfigPath = resolve3(cwd, "tsconfig.json");
|
|
1970
1975
|
const empty = { aliases: [], baseUrl: cwd, cwd };
|
|
1971
1976
|
if (!existsSync4(tsconfigPath)) {
|
|
1972
1977
|
tsconfigAliasCache = empty;
|
|
@@ -1975,7 +1980,7 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
|
|
|
1975
1980
|
try {
|
|
1976
1981
|
const parsed = JSON.parse(stripJsonComments(readFileSync3(tsconfigPath, "utf-8")));
|
|
1977
1982
|
const compilerOptions = parsed.compilerOptions ?? {};
|
|
1978
|
-
const baseUrl =
|
|
1983
|
+
const baseUrl = resolve3(cwd, compilerOptions.baseUrl ?? ".");
|
|
1979
1984
|
tsconfigAliasCache = {
|
|
1980
1985
|
aliases: normalizeAliasEntries(compilerOptions.paths),
|
|
1981
1986
|
baseUrl,
|
|
@@ -2000,7 +2005,7 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
|
|
|
2000
2005
|
continue;
|
|
2001
2006
|
const wildcard = match[1] ?? "";
|
|
2002
2007
|
for (const replacement of alias.replacements) {
|
|
2003
|
-
targets.push(
|
|
2008
|
+
targets.push(resolve3(baseUrl, replacement.replace("*", wildcard)));
|
|
2004
2009
|
}
|
|
2005
2010
|
}
|
|
2006
2011
|
return targets;
|
|
@@ -2027,8 +2032,8 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
|
|
|
2027
2032
|
}, resolveImportPath = (specifier, fromDirectory, loadPaths, language, config) => {
|
|
2028
2033
|
const rawCandidates = [
|
|
2029
2034
|
...resolveAliasTargets(specifier, config),
|
|
2030
|
-
isAbsolute(specifier) ? specifier :
|
|
2031
|
-
...loadPaths.map((path) =>
|
|
2035
|
+
isAbsolute(specifier) ? specifier : resolve3(fromDirectory, specifier),
|
|
2036
|
+
...loadPaths.map((path) => resolve3(path, specifier))
|
|
2032
2037
|
];
|
|
2033
2038
|
for (const candidate of rawCandidates.flatMap((path) => getCandidatePaths(path, language))) {
|
|
2034
2039
|
if (existsSync4(candidate))
|
|
@@ -2053,7 +2058,7 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
|
|
|
2053
2058
|
if (!trimmedUrl || isExternalCssUrl(trimmedUrl))
|
|
2054
2059
|
return match;
|
|
2055
2060
|
const { marker, path } = splitCssUrl(trimmedUrl);
|
|
2056
|
-
const rebased = relative(entryDir,
|
|
2061
|
+
const rebased = relative(entryDir, resolve3(sourceDir, path)).replace(/\\/g, "/");
|
|
2057
2062
|
const normalized = rebased.startsWith(".") ? rebased : `./${rebased}`;
|
|
2058
2063
|
const nextQuote = quote || '"';
|
|
2059
2064
|
return `url(${nextQuote}${normalized}${marker}${nextQuote})`;
|
|
@@ -2091,7 +2096,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
2091
2096
|
}
|
|
2092
2097
|
return mod;
|
|
2093
2098
|
}, loadPostcssConfigFile = async (configPath) => {
|
|
2094
|
-
const resolved =
|
|
2099
|
+
const resolved = resolve3(process.cwd(), configPath);
|
|
2095
2100
|
const loaded = resolved.endsWith(".cjs") || resolved.endsWith(".cts") ? requireOptionalPeerSync(resolved) : await importOptionalPeer(`${new URL(`file://${resolved}`).href}?t=${Date.now()}`);
|
|
2096
2101
|
const config = normalizePostcssModule(loaded);
|
|
2097
2102
|
const value = typeof config === "function" ? await config({
|
|
@@ -2169,9 +2174,9 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
2169
2174
|
install(less, pluginManager) {
|
|
2170
2175
|
const baseManager = new less.FileManager;
|
|
2171
2176
|
const manager = Object.create(baseManager);
|
|
2172
|
-
manager.supports = (filename, currentDirectory) => Boolean(resolveImportPath(filename,
|
|
2177
|
+
manager.supports = (filename, currentDirectory) => Boolean(resolveImportPath(filename, resolve3(currentDirectory), loadPaths, "less", config));
|
|
2173
2178
|
manager.loadFile = async (filename, currentDirectory) => {
|
|
2174
|
-
const resolved = resolveImportPath(filename,
|
|
2179
|
+
const resolved = resolveImportPath(filename, resolve3(currentDirectory), loadPaths, "less", config);
|
|
2175
2180
|
if (!resolved) {
|
|
2176
2181
|
throw new Error(`Unable to resolve Less import "${filename}"`);
|
|
2177
2182
|
}
|
|
@@ -2369,7 +2374,7 @@ var init_stylePreprocessor = __esm(() => {
|
|
|
2369
2374
|
|
|
2370
2375
|
// src/core/svelteServerModule.ts
|
|
2371
2376
|
import { mkdir, readdir } from "fs/promises";
|
|
2372
|
-
import { basename as basename2, dirname as dirname3, extname as extname2, join as join4, relative as relative2, resolve as
|
|
2377
|
+
import { basename as basename2, dirname as dirname3, extname as extname2, join as join4, relative as relative2, resolve as resolve4 } from "path";
|
|
2373
2378
|
var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, ensureRelativeImportPath = (from, target) => {
|
|
2374
2379
|
const importPath = relative2(dirname3(from), target).replace(/\\/g, "/");
|
|
2375
2380
|
return importPath.startsWith(".") ? importPath : `./${importPath}`;
|
|
@@ -2417,7 +2422,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
|
|
|
2417
2422
|
if (!spec.startsWith(".")) {
|
|
2418
2423
|
return null;
|
|
2419
2424
|
}
|
|
2420
|
-
const basePath =
|
|
2425
|
+
const basePath = resolve4(dirname3(from), spec);
|
|
2421
2426
|
const candidates = [
|
|
2422
2427
|
basePath,
|
|
2423
2428
|
`${basePath}.ts`,
|
|
@@ -2449,7 +2454,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
|
|
|
2449
2454
|
if (!spec.startsWith(".")) {
|
|
2450
2455
|
return null;
|
|
2451
2456
|
}
|
|
2452
|
-
const explicitPath =
|
|
2457
|
+
const explicitPath = resolve4(dirname3(from), spec);
|
|
2453
2458
|
if (extname2(explicitPath) === ".svelte") {
|
|
2454
2459
|
return explicitPath;
|
|
2455
2460
|
}
|
|
@@ -3638,5 +3643,5 @@ export {
|
|
|
3638
3643
|
Island
|
|
3639
3644
|
};
|
|
3640
3645
|
|
|
3641
|
-
//# debugId=
|
|
3646
|
+
//# debugId=61A2A9BD46C7B6A864756E2164756E21
|
|
3642
3647
|
//# sourceMappingURL=index.js.map
|