@absolutejs/absolute 0.19.0-beta.274 → 0.19.0-beta.276
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 +24 -5
- package/dist/angular/index.js.map +3 -3
- package/dist/build.js +4 -3
- package/dist/build.js.map +4 -4
- package/dist/index.js +31 -11
- package/dist/index.js.map +5 -5
- package/dist/islands/index.js +24 -5
- package/dist/islands/index.js.map +3 -3
- package/dist/islands/server.js +24 -5
- package/dist/islands/server.js.map +3 -3
- package/dist/react/index.js +24 -5
- package/dist/react/index.js.map +3 -3
- package/dist/svelte/index.js +24 -5
- package/dist/svelte/index.js.map +3 -3
- package/dist/vue/index.js +24 -5
- package/dist/vue/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -173740,7 +173740,8 @@ var detectFramework = (filePath, resolved) => {
|
|
|
173740
173740
|
if (resolved?.stylesDir && normalizedPath.startsWith(resolved.stylesDir)) {
|
|
173741
173741
|
return false;
|
|
173742
173742
|
}
|
|
173743
|
-
|
|
173743
|
+
const managedDirPattern = /(^|\/)(build|generated|\.absolutejs|node_modules|\.git)(\/|$)/;
|
|
173744
|
+
return managedDirPattern.test(normalizedPath) || normalizedPath.endsWith(".log") || normalizedPath.endsWith(".tmp");
|
|
173744
173745
|
};
|
|
173745
173746
|
var init_pathUtils = __esm(() => {
|
|
173746
173747
|
init_commonAncestor();
|
|
@@ -173768,7 +173769,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
|
|
|
173768
173769
|
operation: "add"
|
|
173769
173770
|
});
|
|
173770
173771
|
}
|
|
173771
|
-
}, shouldSkipFilename = (filename, isStylesDir) => !isStylesDir && (filename === "compiled" || filename === "build" || filename === "indexes" || filename === "server" || filename === "client" || filename.includes("/compiled/") || filename.includes("/build/") || filename.includes("/indexes/") || filename.includes("/server/") || filename.includes("/client/") || filename.startsWith("compiled/") || filename.startsWith("build/") || filename.startsWith("indexes/") || filename.startsWith("server/") || filename.startsWith("client/")) || filename.endsWith("/") || filename.includes(".tmp.") || filename.endsWith(".tmp") || filename.endsWith("~") || filename.startsWith(".#"), setupWatcher = (absolutePath, isStylesDir, state, onFileChange) => {
|
|
173772
|
+
}, shouldSkipFilename = (filename, isStylesDir) => !isStylesDir && (filename === "compiled" || filename === "generated" || filename === "build" || filename === "indexes" || filename === "server" || filename === "client" || filename.includes("/compiled/") || filename.includes("/generated/") || filename.includes("/build/") || filename.includes("/indexes/") || filename.includes("/server/") || filename.includes("/client/") || filename.startsWith("compiled/") || filename.startsWith("generated/") || filename.startsWith("build/") || filename.startsWith("indexes/") || filename.startsWith("server/") || filename.startsWith("client/")) || filename.endsWith("/") || filename.includes(".tmp.") || filename.endsWith(".tmp") || filename.endsWith("~") || filename.startsWith(".#"), setupWatcher = (absolutePath, isStylesDir, state, onFileChange) => {
|
|
173772
173773
|
const watcher = watch(absolutePath, { recursive: true }, (event, filename) => {
|
|
173773
173774
|
if (!filename) {
|
|
173774
173775
|
return;
|
|
@@ -207234,7 +207235,7 @@ __export(exports_devCert, {
|
|
|
207234
207235
|
});
|
|
207235
207236
|
import { existsSync as existsSync23, mkdirSync as mkdirSync13, readFileSync as readFileSync14, rmSync as rmSync3 } from "fs";
|
|
207236
207237
|
import { platform as platform3 } from "os";
|
|
207237
|
-
import { join as
|
|
207238
|
+
import { join as join23 } from "path";
|
|
207238
207239
|
var CERT_DIR, CERT_PATH, KEY_PATH, CERT_VALIDITY_DAYS = 365, devLog = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[36m[dev]\x1B[0m ${msg}`), devWarn = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[33m[dev]\x1B[0m \x1B[33m${msg}\x1B[0m`), certFilesExist = () => existsSync23(CERT_PATH) && existsSync23(KEY_PATH), isCertExpired = () => {
|
|
207239
207240
|
try {
|
|
207240
207241
|
const certPem = readFileSync14(CERT_PATH, "utf-8");
|
|
@@ -207440,9 +207441,9 @@ var CERT_DIR, CERT_PATH, KEY_PATH, CERT_VALIDITY_DAYS = 365, devLog = (msg) => c
|
|
|
207440
207441
|
return true;
|
|
207441
207442
|
};
|
|
207442
207443
|
var init_devCert = __esm(() => {
|
|
207443
|
-
CERT_DIR =
|
|
207444
|
-
CERT_PATH =
|
|
207445
|
-
KEY_PATH =
|
|
207444
|
+
CERT_DIR = join23(process.cwd(), ".absolutejs");
|
|
207445
|
+
CERT_PATH = join23(CERT_DIR, "cert.pem");
|
|
207446
|
+
KEY_PATH = join23(CERT_DIR, "key.pem");
|
|
207446
207447
|
});
|
|
207447
207448
|
// types/client.ts
|
|
207448
207449
|
var hmrState = {
|
|
@@ -207847,7 +207848,9 @@ var renderVueIslandToHtml = (component, props) => {
|
|
|
207847
207848
|
};
|
|
207848
207849
|
|
|
207849
207850
|
// src/core/svelteServerModule.ts
|
|
207850
|
-
import {
|
|
207851
|
+
import { mkdir as mkdir3 } from "fs/promises";
|
|
207852
|
+
import { dirname as dirname10, extname as extname5, join as join22, relative as relative12, resolve as resolve30 } from "path";
|
|
207853
|
+
var serverCacheRoot = join22(process.cwd(), ".absolutejs", "islands", "svelte");
|
|
207851
207854
|
var compiledModuleCache = new Map;
|
|
207852
207855
|
var transpiler3 = new Bun.Transpiler({
|
|
207853
207856
|
loader: "ts",
|
|
@@ -207857,6 +207860,11 @@ var ensureRelativeImportPath = (from, to) => {
|
|
|
207857
207860
|
const importPath = relative12(dirname10(from), to).replace(/\\/g, "/");
|
|
207858
207861
|
return importPath.startsWith(".") ? importPath : `./${importPath}`;
|
|
207859
207862
|
};
|
|
207863
|
+
var getCachedModulePath = (sourcePath) => {
|
|
207864
|
+
const relativeSourcePath = relative12(process.cwd(), sourcePath).replace(/\\/g, "/");
|
|
207865
|
+
const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
|
|
207866
|
+
return join22(serverCacheRoot, `${normalizedSourcePath}.server.js`);
|
|
207867
|
+
};
|
|
207860
207868
|
var resolveSvelteImport = async (spec, from) => {
|
|
207861
207869
|
if (spec.startsWith("/")) {
|
|
207862
207870
|
return spec;
|
|
@@ -207874,6 +207882,17 @@ var resolveSvelteImport = async (spec, from) => {
|
|
|
207874
207882
|
}
|
|
207875
207883
|
return null;
|
|
207876
207884
|
};
|
|
207885
|
+
var writeIfChanged = async (path, content) => {
|
|
207886
|
+
const targetFile = Bun.file(path);
|
|
207887
|
+
const exists2 = await targetFile.exists();
|
|
207888
|
+
if (exists2) {
|
|
207889
|
+
const currentContent = await targetFile.text();
|
|
207890
|
+
if (currentContent === content) {
|
|
207891
|
+
return;
|
|
207892
|
+
}
|
|
207893
|
+
}
|
|
207894
|
+
await Bun.write(path, content);
|
|
207895
|
+
};
|
|
207877
207896
|
var compileSvelteServerModule = async (sourcePath) => {
|
|
207878
207897
|
const cachedModulePath = compiledModuleCache.get(sourcePath);
|
|
207879
207898
|
if (cachedModulePath) {
|
|
@@ -207900,10 +207919,11 @@ var compileSvelteServerModule = async (sourcePath) => {
|
|
|
207900
207919
|
generate: "server"
|
|
207901
207920
|
}).js.code;
|
|
207902
207921
|
for (const [spec, compiledChildPath] of childModulePaths) {
|
|
207903
|
-
compiledCode = compiledCode.replaceAll(spec, ensureRelativeImportPath(
|
|
207922
|
+
compiledCode = compiledCode.replaceAll(spec, ensureRelativeImportPath(getCachedModulePath(sourcePath), compiledChildPath));
|
|
207904
207923
|
}
|
|
207905
|
-
const compiledModulePath =
|
|
207906
|
-
await
|
|
207924
|
+
const compiledModulePath = getCachedModulePath(sourcePath);
|
|
207925
|
+
await mkdir3(dirname10(compiledModulePath), { recursive: true });
|
|
207926
|
+
await writeIfChanged(compiledModulePath, compiledCode);
|
|
207907
207927
|
compiledModuleCache.set(sourcePath, compiledModulePath);
|
|
207908
207928
|
return compiledModulePath;
|
|
207909
207929
|
};
|
|
@@ -214384,5 +214404,5 @@ export {
|
|
|
214384
214404
|
ANGULAR_INIT_TIMEOUT_MS
|
|
214385
214405
|
};
|
|
214386
214406
|
|
|
214387
|
-
//# debugId=
|
|
214407
|
+
//# debugId=072EB3A73F36B44B64756E2164756E21
|
|
214388
214408
|
//# sourceMappingURL=index.js.map
|