@absolutejs/absolute 0.19.0-beta.705 → 0.19.0-beta.707
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/browser.js +6 -4
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/constants.js +1 -0
- package/dist/angular/index.js +17 -10
- package/dist/angular/index.js.map +5 -5
- package/dist/angular/server.js +17 -10
- package/dist/angular/server.js.map +5 -5
- package/dist/build.js +126 -66
- package/dist/build.js.map +12 -12
- package/dist/cli/index.js +186 -126
- package/dist/dev/client/cssUtils.ts +47 -47
- package/dist/dev/client/handlers/angular.ts +40 -19
- package/dist/dev/client/handlers/angularRuntime.ts +28 -8
- package/dist/dev/client/handlers/html.ts +6 -5
- package/dist/dev/client/handlers/htmx.ts +8 -2
- package/dist/dev/client/handlers/svelte.ts +16 -14
- package/dist/dev/client/hmrClient.ts +25 -3
- package/dist/dev/client/reactRefreshSetup.ts +2 -3
- package/dist/index.js +151 -79
- package/dist/index.js.map +14 -14
- package/dist/islands/index.js +4 -4
- package/dist/islands/index.js.map +4 -4
- package/dist/react/index.js +17 -10
- package/dist/react/index.js.map +5 -5
- package/dist/react/server.js +15 -8
- package/dist/react/server.js.map +4 -4
- package/dist/src/angular/components/constants.d.ts +1 -0
- package/dist/src/build/buildAngularVendor.d.ts +3 -4
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/utils/imageProcessing.d.ts +1 -1
- package/dist/src/vue/components/Image.d.ts +1 -1
- package/dist/svelte/index.js +17 -10
- package/dist/svelte/index.js.map +5 -5
- package/dist/svelte/server.js +15 -8
- package/dist/svelte/server.js.map +4 -4
- package/dist/types/globals.d.ts +1 -0
- package/dist/vue/index.js +17 -10
- package/dist/vue/index.js.map +5 -5
- package/dist/vue/server.js +15 -8
- package/dist/vue/server.js.map +4 -4
- package/package.json +1 -1
package/dist/build.js
CHANGED
|
@@ -79,7 +79,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
79
79
|
var __require = import.meta.require;
|
|
80
80
|
|
|
81
81
|
// src/constants.ts
|
|
82
|
-
var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
|
|
82
|
+
var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_CODE = 27, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
|
|
83
83
|
var init_constants = __esm(() => {
|
|
84
84
|
MILLISECONDS_IN_A_MINUTE = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;
|
|
85
85
|
MILLISECONDS_IN_A_DAY = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE * MINUTES_IN_AN_HOUR * HOURS_IN_DAY;
|
|
@@ -2234,9 +2234,9 @@ var renderAngularIslandToHtmlInternal = async (component, props, islandId) => {
|
|
|
2234
2234
|
}, renderAngularIslandToHtml2, renderReactIslandToHtml = (component, props) => import("react").then(({ createElement }) => import("react-dom/server").then(({ renderToStaticMarkup }) => renderToStaticMarkup(createElement(component, props)))), renderSvelteIslandToHtml = (component, props) => import("svelte/server").then(({ render }) => {
|
|
2235
2235
|
const { body } = render(component, { props });
|
|
2236
2236
|
return body;
|
|
2237
|
-
}), renderVueIslandToHtml = (component, props) => import("vue").then(({ createSSRApp, h }) => {
|
|
2237
|
+
}), renderVueIslandToHtml = (component, props) => import("vue").then(({ createSSRApp, h: createVueVNode }) => {
|
|
2238
2238
|
const app = createSSRApp({
|
|
2239
|
-
render: () =>
|
|
2239
|
+
render: () => createVueVNode(component, props)
|
|
2240
2240
|
});
|
|
2241
2241
|
return import("vue/server-renderer").then(({ renderToString }) => renderToString(app));
|
|
2242
2242
|
});
|
|
@@ -41296,9 +41296,11 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY = 75, OPTIMIZATIO
|
|
|
41296
41296
|
return actual.startsWith(prefix);
|
|
41297
41297
|
}
|
|
41298
41298
|
return actual === pattern;
|
|
41299
|
-
}, MIME_MAP, callSharp = (sharpRef, input) => {
|
|
41300
|
-
|
|
41301
|
-
|
|
41299
|
+
}, MIME_MAP, isSharpFactory = (value2) => typeof value2 === "function", callSharp = (sharpRef, input) => {
|
|
41300
|
+
if (!isSharpFactory(sharpRef)) {
|
|
41301
|
+
throw new Error("Loaded sharp module is not callable.");
|
|
41302
|
+
}
|
|
41303
|
+
return sharpRef(input);
|
|
41302
41304
|
}, toBuffer = (input) => {
|
|
41303
41305
|
if (Buffer.isBuffer(input))
|
|
41304
41306
|
return input;
|
|
@@ -44380,13 +44382,49 @@ __export(exports_buildAngularVendor, {
|
|
|
44380
44382
|
import { mkdirSync as mkdirSync7 } from "fs";
|
|
44381
44383
|
import { join as join17 } from "path";
|
|
44382
44384
|
import { rm as rm6 } from "fs/promises";
|
|
44383
|
-
var {build: bunBuild4 } = globalThis.Bun;
|
|
44384
|
-
var
|
|
44385
|
+
var {build: bunBuild4, Glob: Glob6 } = globalThis.Bun;
|
|
44386
|
+
var REQUIRED_ANGULAR_SPECIFIERS, SERVER_ONLY_ANGULAR_SPECIFIERS, SCAN_SKIP_DIRS, isResolvable2 = (specifier) => {
|
|
44387
|
+
try {
|
|
44388
|
+
Bun.resolveSync(specifier, process.cwd());
|
|
44389
|
+
return true;
|
|
44390
|
+
} catch {
|
|
44391
|
+
return false;
|
|
44392
|
+
}
|
|
44393
|
+
}, isAngularBrowserSpecifier = (spec) => spec.startsWith("@angular/") && !SERVER_ONLY_ANGULAR_SPECIFIERS.has(spec), scanAngularSpecifiers = async (directories) => {
|
|
44394
|
+
const found = new Set;
|
|
44395
|
+
const transpiler4 = new Bun.Transpiler({ loader: "tsx" });
|
|
44396
|
+
const glob = new Glob6("**/*.{ts,tsx,js,jsx}");
|
|
44397
|
+
for (const dir of directories) {
|
|
44398
|
+
try {
|
|
44399
|
+
for await (const file3 of glob.scan({ absolute: true, cwd: dir })) {
|
|
44400
|
+
const rel = file3.slice(dir.length + 1);
|
|
44401
|
+
const [first] = rel.split("/");
|
|
44402
|
+
if (first && SCAN_SKIP_DIRS.has(first))
|
|
44403
|
+
continue;
|
|
44404
|
+
try {
|
|
44405
|
+
const content = await Bun.file(file3).text();
|
|
44406
|
+
for (const imp of transpiler4.scanImports(content)) {
|
|
44407
|
+
if (isAngularBrowserSpecifier(imp.path)) {
|
|
44408
|
+
found.add(imp.path);
|
|
44409
|
+
}
|
|
44410
|
+
}
|
|
44411
|
+
} catch {}
|
|
44412
|
+
}
|
|
44413
|
+
} catch {}
|
|
44414
|
+
}
|
|
44415
|
+
return found;
|
|
44416
|
+
}, toSafeFileName2 = (specifier) => specifier.replace(/^@/, "").replace(/\//g, "_"), resolveAngularSpecifiers = async (directories) => {
|
|
44417
|
+
const discovered = await scanAngularSpecifiers(directories);
|
|
44418
|
+
for (const spec of REQUIRED_ANGULAR_SPECIFIERS)
|
|
44419
|
+
discovered.add(spec);
|
|
44420
|
+
return Array.from(discovered).filter(isResolvable2);
|
|
44421
|
+
}, buildAngularVendor = async (buildDir, directories = []) => {
|
|
44385
44422
|
const vendorDir = join17(buildDir, "angular", "vendor");
|
|
44386
44423
|
mkdirSync7(vendorDir, { recursive: true });
|
|
44387
44424
|
const tmpDir = join17(buildDir, "_angular_vendor_tmp");
|
|
44388
44425
|
mkdirSync7(tmpDir, { recursive: true });
|
|
44389
|
-
const
|
|
44426
|
+
const specifiers = await resolveAngularSpecifiers(directories);
|
|
44427
|
+
const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
|
|
44390
44428
|
const safeName = toSafeFileName2(specifier);
|
|
44391
44429
|
const entryPath = join17(tmpDir, `${safeName}.ts`);
|
|
44392
44430
|
await Bun.write(entryPath, `export * from '${specifier}';
|
|
@@ -44408,22 +44446,35 @@ var angularSpecifiers, toSafeFileName2 = (specifier) => specifier.replace(/^@/,
|
|
|
44408
44446
|
if (!result.success) {
|
|
44409
44447
|
console.warn("\u26A0\uFE0F Angular vendor build had errors:", result.logs);
|
|
44410
44448
|
}
|
|
44411
|
-
|
|
44449
|
+
return specifiers;
|
|
44450
|
+
}, computeAngularVendorPaths = (specifiers = REQUIRED_ANGULAR_SPECIFIERS) => {
|
|
44412
44451
|
const paths = {};
|
|
44413
|
-
for (const specifier of
|
|
44452
|
+
for (const specifier of specifiers) {
|
|
44414
44453
|
paths[specifier] = `/angular/vendor/${toSafeFileName2(specifier)}.js`;
|
|
44415
44454
|
}
|
|
44416
44455
|
return paths;
|
|
44417
44456
|
};
|
|
44418
44457
|
var init_buildAngularVendor = __esm(() => {
|
|
44419
44458
|
init_angularLinkerPlugin();
|
|
44420
|
-
|
|
44459
|
+
REQUIRED_ANGULAR_SPECIFIERS = [
|
|
44421
44460
|
"@angular/core",
|
|
44422
44461
|
"@angular/compiler",
|
|
44423
44462
|
"@angular/common",
|
|
44424
44463
|
"@angular/common/http",
|
|
44425
44464
|
"@angular/platform-browser"
|
|
44426
44465
|
];
|
|
44466
|
+
SERVER_ONLY_ANGULAR_SPECIFIERS = new Set([
|
|
44467
|
+
"@angular/platform-server",
|
|
44468
|
+
"@angular/ssr",
|
|
44469
|
+
"@angular/compiler-cli"
|
|
44470
|
+
]);
|
|
44471
|
+
SCAN_SKIP_DIRS = new Set([
|
|
44472
|
+
"node_modules",
|
|
44473
|
+
"build",
|
|
44474
|
+
"dist",
|
|
44475
|
+
".absolutejs",
|
|
44476
|
+
"generated"
|
|
44477
|
+
]);
|
|
44427
44478
|
});
|
|
44428
44479
|
|
|
44429
44480
|
// src/build/buildVueVendor.ts
|
|
@@ -44501,14 +44552,14 @@ import { mkdirSync as mkdirSync9 } from "fs";
|
|
|
44501
44552
|
import { join as join19 } from "path";
|
|
44502
44553
|
import { rm as rm8 } from "fs/promises";
|
|
44503
44554
|
var {build: bunBuild6 } = globalThis.Bun;
|
|
44504
|
-
var svelteSpecifiers,
|
|
44555
|
+
var svelteSpecifiers, isResolvable3 = (specifier) => {
|
|
44505
44556
|
try {
|
|
44506
44557
|
__require.resolve(specifier);
|
|
44507
44558
|
return true;
|
|
44508
44559
|
} catch {
|
|
44509
44560
|
return false;
|
|
44510
44561
|
}
|
|
44511
|
-
}, resolveVendorSpecifiers2 = () => svelteSpecifiers.filter(
|
|
44562
|
+
}, resolveVendorSpecifiers2 = () => svelteSpecifiers.filter(isResolvable3), toSafeFileName4 = (specifier) => specifier.replace(/\//g, "_"), buildSvelteVendor = async (buildDir) => {
|
|
44512
44563
|
const specifiers = resolveVendorSpecifiers2();
|
|
44513
44564
|
if (specifiers.length === 0)
|
|
44514
44565
|
return;
|
|
@@ -44604,7 +44655,7 @@ import {
|
|
|
44604
44655
|
} from "fs";
|
|
44605
44656
|
import { basename as basename7, dirname as dirname11, join as join20, relative as relative10, resolve as resolve18 } from "path";
|
|
44606
44657
|
import { cwd, env as env2, exit } from "process";
|
|
44607
|
-
var {build: bunBuild7, Glob:
|
|
44658
|
+
var {build: bunBuild7, Glob: Glob7 } = globalThis.Bun;
|
|
44608
44659
|
var isDev, collectConventionSourceFiles = (entry) => {
|
|
44609
44660
|
if (!entry)
|
|
44610
44661
|
return [];
|
|
@@ -44675,7 +44726,7 @@ var isDev, collectConventionSourceFiles = (entry) => {
|
|
|
44675
44726
|
exit(1);
|
|
44676
44727
|
}, copyHtmxVendor = (htmxDir, htmxDestDir) => {
|
|
44677
44728
|
mkdirSync10(htmxDestDir, { recursive: true });
|
|
44678
|
-
const glob = new
|
|
44729
|
+
const glob = new Glob7("htmx*.min.js");
|
|
44679
44730
|
for (const relPath of glob.scanSync({ cwd: htmxDir })) {
|
|
44680
44731
|
const src = join20(htmxDir, relPath);
|
|
44681
44732
|
const dest = join20(htmxDestDir, "htmx.min.js");
|
|
@@ -44693,15 +44744,19 @@ var isDev, collectConventionSourceFiles = (entry) => {
|
|
|
44693
44744
|
resolve18(import.meta.dir, "..", "..", "package.json"),
|
|
44694
44745
|
resolve18(import.meta.dir, "..", "package.json")
|
|
44695
44746
|
];
|
|
44696
|
-
|
|
44747
|
+
const resolveCandidate = async (remaining) => {
|
|
44748
|
+
const [candidate, ...rest] = remaining;
|
|
44749
|
+
if (!candidate) {
|
|
44750
|
+
return;
|
|
44751
|
+
}
|
|
44697
44752
|
const pkg = await tryReadPackageJson(candidate);
|
|
44698
|
-
if (!pkg)
|
|
44699
|
-
|
|
44700
|
-
|
|
44701
|
-
|
|
44753
|
+
if (!pkg || pkg.name !== "@absolutejs/absolute") {
|
|
44754
|
+
await resolveCandidate(rest);
|
|
44755
|
+
return;
|
|
44756
|
+
}
|
|
44702
44757
|
globalThis.__absoluteVersion = pkg.version;
|
|
44703
|
-
|
|
44704
|
-
|
|
44758
|
+
};
|
|
44759
|
+
await resolveCandidate(candidates);
|
|
44705
44760
|
}, SKIP_DIRS, addWorkerPathIfExists = (file3, relPath, workerPaths) => {
|
|
44706
44761
|
const absPath = resolve18(file3, "..", relPath);
|
|
44707
44762
|
try {
|
|
@@ -44723,7 +44778,7 @@ var isDev, collectConventionSourceFiles = (entry) => {
|
|
|
44723
44778
|
collectWorkerPathsFromContent(content, pattern, file3, workerPaths);
|
|
44724
44779
|
}
|
|
44725
44780
|
}, scanWorkerReferencesInDir = async (dir, patterns, workerPaths) => {
|
|
44726
|
-
const glob = new
|
|
44781
|
+
const glob = new Glob7("**/*.{ts,tsx,js,jsx,svelte,vue}");
|
|
44727
44782
|
for await (const file3 of glob.scan({ absolute: true, cwd: dir })) {
|
|
44728
44783
|
const relToDir = file3.slice(dir.length + 1);
|
|
44729
44784
|
const [firstSegment] = relToDir.split("/");
|
|
@@ -44735,9 +44790,7 @@ var isDev, collectConventionSourceFiles = (entry) => {
|
|
|
44735
44790
|
const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
|
|
44736
44791
|
const resolvePattern = /import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g;
|
|
44737
44792
|
const workerPaths = new Set;
|
|
44738
|
-
|
|
44739
|
-
await scanWorkerReferencesInDir(dir, [urlPattern, resolvePattern], workerPaths);
|
|
44740
|
-
}
|
|
44793
|
+
await dirs.reduce((chain, dir) => chain.then(() => scanWorkerReferencesInDir(dir, [urlPattern, resolvePattern], workerPaths)), Promise.resolve());
|
|
44741
44794
|
return [...workerPaths];
|
|
44742
44795
|
}, copyDevIndexes = async ({
|
|
44743
44796
|
buildPath,
|
|
@@ -45271,7 +45324,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45271
45324
|
let angularVendorPaths2 = getAngularVendorPaths();
|
|
45272
45325
|
if (!angularVendorPaths2 && hmr && angularDir) {
|
|
45273
45326
|
const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await Promise.resolve().then(() => (init_buildAngularVendor(), exports_buildAngularVendor));
|
|
45274
|
-
angularVendorPaths2 = computeAngularVendorPaths2();
|
|
45327
|
+
angularVendorPaths2 = computeAngularVendorPaths2(globalThis.__angularVendorSpecifiers);
|
|
45275
45328
|
setAngularVendorPaths(angularVendorPaths2);
|
|
45276
45329
|
}
|
|
45277
45330
|
let vueVendorPaths2 = getVueVendorPaths();
|
|
@@ -45349,16 +45402,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45349
45402
|
"svelte/*",
|
|
45350
45403
|
"vue",
|
|
45351
45404
|
"vue/*",
|
|
45352
|
-
"@angular
|
|
45353
|
-
"@angular/core/*",
|
|
45354
|
-
"@angular/common",
|
|
45355
|
-
"@angular/common/*",
|
|
45356
|
-
"@angular/compiler",
|
|
45357
|
-
"@angular/compiler/*",
|
|
45358
|
-
"@angular/platform-browser",
|
|
45359
|
-
"@angular/platform-browser/*",
|
|
45360
|
-
"@angular/platform-server",
|
|
45361
|
-
"@angular/platform-server/*",
|
|
45405
|
+
"@angular/*",
|
|
45362
45406
|
"typescript"
|
|
45363
45407
|
],
|
|
45364
45408
|
format: "esm",
|
|
@@ -45412,9 +45456,9 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45412
45456
|
entrypoints: globalCssEntries,
|
|
45413
45457
|
naming: `[dir]/[name].[hash].[ext]`,
|
|
45414
45458
|
outdir: stylesDir ? join20(buildPath, basename7(stylesDir)) : buildPath,
|
|
45459
|
+
plugins: [stylePreprocessorPlugin2],
|
|
45415
45460
|
root: stylesDir || clientRoot,
|
|
45416
45461
|
target: "browser",
|
|
45417
|
-
plugins: [stylePreprocessorPlugin2],
|
|
45418
45462
|
throw: false
|
|
45419
45463
|
}) : undefined,
|
|
45420
45464
|
vueCssPaths.length > 0 ? bunBuild7({
|
|
@@ -45705,7 +45749,7 @@ var init_build = __esm(() => {
|
|
|
45705
45749
|
|
|
45706
45750
|
// src/dev/dependencyGraph.ts
|
|
45707
45751
|
import { existsSync as existsSync19, readFileSync as readFileSync11 } from "fs";
|
|
45708
|
-
var {Glob:
|
|
45752
|
+
var {Glob: Glob8 } = globalThis.Bun;
|
|
45709
45753
|
import { resolve as resolve19 } from "path";
|
|
45710
45754
|
var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
|
|
45711
45755
|
const lower = filePath.toLowerCase();
|
|
@@ -45767,7 +45811,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
|
|
|
45767
45811
|
dependencies.forEach(addDependent);
|
|
45768
45812
|
}, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
|
|
45769
45813
|
const processedFiles = new Set;
|
|
45770
|
-
const glob = new
|
|
45814
|
+
const glob = new Glob8("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
|
|
45771
45815
|
const resolvedDirs = directories.map((dir) => resolve19(dir)).filter((dir) => existsSync19(dir));
|
|
45772
45816
|
const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
|
|
45773
45817
|
for (const file3 of allFiles) {
|
|
@@ -47789,7 +47833,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, getStyleTr
|
|
|
47789
47833
|
if (!angVendorPaths) {
|
|
47790
47834
|
const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await Promise.resolve().then(() => (init_buildAngularVendor(), exports_buildAngularVendor));
|
|
47791
47835
|
const { setAngularVendorPaths: setAngularVendorPaths2 } = await Promise.resolve().then(() => exports_devVendorPaths);
|
|
47792
|
-
angVendorPaths = computeAngularVendorPaths2();
|
|
47836
|
+
angVendorPaths = computeAngularVendorPaths2(globalThis.__angularVendorSpecifiers);
|
|
47793
47837
|
setAngularVendorPaths2(angVendorPaths);
|
|
47794
47838
|
}
|
|
47795
47839
|
const clientResult = await bunBuild8({
|
|
@@ -49077,15 +49121,15 @@ __export(exports_buildDepVendor, {
|
|
|
49077
49121
|
import { mkdirSync as mkdirSync11 } from "fs";
|
|
49078
49122
|
import { join as join22 } from "path";
|
|
49079
49123
|
import { rm as rm9 } from "fs/promises";
|
|
49080
|
-
var {build: bunBuild8, Glob:
|
|
49081
|
-
var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g, "").replace(/-/g, "_"),
|
|
49124
|
+
var {build: bunBuild8, Glob: Glob9 } = globalThis.Bun;
|
|
49125
|
+
var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g, "").replace(/-/g, "_"), isResolvable4 = (specifier) => {
|
|
49082
49126
|
try {
|
|
49083
49127
|
Bun.resolveSync(specifier, process.cwd());
|
|
49084
49128
|
return true;
|
|
49085
49129
|
} catch {
|
|
49086
49130
|
return false;
|
|
49087
49131
|
}
|
|
49088
|
-
}, isBareSpecifier = (spec) => !spec.startsWith(".") && !spec.startsWith("/") && !spec.startsWith("@src/"), isAbsolutePackageSpecifier = (spec) => spec === "@absolutejs/absolute" || spec.startsWith("@absolutejs/absolute/"), FRAMEWORK_SPECIFIERS, isSkippedFile = (file3) => file3.includes("node_modules") || file3.includes("/build/") || file3.includes("/dist/") || file3.includes("/indexes/"), isDepSpecifier = (path2) => isBareSpecifier(path2) && !
|
|
49132
|
+
}, isBareSpecifier = (spec) => !spec.startsWith(".") && !spec.startsWith("/") && !spec.startsWith("@src/"), isAbsolutePackageSpecifier = (spec) => spec === "@absolutejs/absolute" || spec.startsWith("@absolutejs/absolute/"), FRAMEWORK_SPECIFIERS, FRAMEWORK_NAMESPACE_PREFIXES, isFrameworkSpecifier = (spec) => FRAMEWORK_SPECIFIERS.has(spec) || FRAMEWORK_NAMESPACE_PREFIXES.some((prefix) => spec.startsWith(prefix)), FRAMEWORK_EXTERNALS, isSkippedFile = (file3) => file3.includes("node_modules") || file3.includes("/build/") || file3.includes("/dist/") || file3.includes("/indexes/"), isDepSpecifier = (path2) => isBareSpecifier(path2) && !isFrameworkSpecifier(path2) && !isAbsolutePackageSpecifier(path2), readFileSpecifiers = async (file3, transpiler4) => {
|
|
49089
49133
|
const empty = [];
|
|
49090
49134
|
try {
|
|
49091
49135
|
const content = await Bun.file(file3).text();
|
|
@@ -49095,7 +49139,7 @@ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g,
|
|
|
49095
49139
|
}
|
|
49096
49140
|
}, scanDirFiles = async (dir) => {
|
|
49097
49141
|
const empty = [];
|
|
49098
|
-
const glob = new
|
|
49142
|
+
const glob = new Glob9("**/*.{ts,tsx,js,jsx}");
|
|
49099
49143
|
try {
|
|
49100
49144
|
const all = await Array.fromAsync(glob.scan({ absolute: true, cwd: dir }));
|
|
49101
49145
|
return all.filter((file3) => !isSkippedFile(file3));
|
|
@@ -49112,7 +49156,7 @@ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g,
|
|
|
49112
49156
|
const specifiers = new Set;
|
|
49113
49157
|
const transpiler4 = new Bun.Transpiler({ loader: "tsx" });
|
|
49114
49158
|
await Promise.all(directories.map((dir) => collectDirSpecifiers(dir, transpiler4, specifiers)));
|
|
49115
|
-
return Array.from(specifiers).filter(
|
|
49159
|
+
return Array.from(specifiers).filter(isResolvable4);
|
|
49116
49160
|
}, generateEntrySource2 = (specifier) => `export * from '${specifier}';
|
|
49117
49161
|
`, rewriteVendorFiles = async (vendorDir) => {
|
|
49118
49162
|
const { readdirSync: readdirSync2, readFileSync: readFileSync15, writeFileSync: writeFileSync8 } = await import("fs");
|
|
@@ -49148,7 +49192,7 @@ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g,
|
|
|
49148
49192
|
}));
|
|
49149
49193
|
const result = await bunBuild8({
|
|
49150
49194
|
entrypoints,
|
|
49151
|
-
external:
|
|
49195
|
+
external: FRAMEWORK_EXTERNALS,
|
|
49152
49196
|
format: "esm",
|
|
49153
49197
|
minify: false,
|
|
49154
49198
|
naming: "[name].[ext]",
|
|
@@ -49196,14 +49240,13 @@ var init_buildDepVendor = __esm(() => {
|
|
|
49196
49240
|
"svelte/compiler",
|
|
49197
49241
|
"vue",
|
|
49198
49242
|
"vue/server-renderer",
|
|
49199
|
-
"@vue/compiler-sfc"
|
|
49200
|
-
"@angular/core",
|
|
49201
|
-
"@angular/common",
|
|
49202
|
-
"@angular/compiler",
|
|
49203
|
-
"@angular/platform-browser",
|
|
49204
|
-
"@angular/platform-server",
|
|
49205
|
-
"@angular/ssr"
|
|
49243
|
+
"@vue/compiler-sfc"
|
|
49206
49244
|
]);
|
|
49245
|
+
FRAMEWORK_NAMESPACE_PREFIXES = ["@angular/"];
|
|
49246
|
+
FRAMEWORK_EXTERNALS = [
|
|
49247
|
+
...FRAMEWORK_SPECIFIERS,
|
|
49248
|
+
...FRAMEWORK_NAMESPACE_PREFIXES.map((prefix) => `${prefix}*`)
|
|
49249
|
+
];
|
|
49207
49250
|
});
|
|
49208
49251
|
|
|
49209
49252
|
// src/core/devBuild.ts
|
|
@@ -49285,9 +49328,11 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
|
|
|
49285
49328
|
delete target[key];
|
|
49286
49329
|
}
|
|
49287
49330
|
}, REBUILD_POLL_MS = 10, waitForRebuild = async (state) => {
|
|
49288
|
-
|
|
49289
|
-
|
|
49331
|
+
if (!state.isRebuilding) {
|
|
49332
|
+
return;
|
|
49290
49333
|
}
|
|
49334
|
+
await Bun.sleep(REBUILD_POLL_MS);
|
|
49335
|
+
await waitForRebuild(state);
|
|
49291
49336
|
}, rebuildManifest = async (cached) => {
|
|
49292
49337
|
const state = cached.hmrState;
|
|
49293
49338
|
await waitForRebuild(state);
|
|
@@ -49353,12 +49398,25 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
|
|
|
49353
49398
|
resolve32(import.meta.dir, "..", "..", "package.json"),
|
|
49354
49399
|
resolve32(import.meta.dir, "..", "package.json")
|
|
49355
49400
|
];
|
|
49356
|
-
|
|
49357
|
-
|
|
49358
|
-
|
|
49359
|
-
return;
|
|
49360
|
-
}
|
|
49401
|
+
const [candidate, ...remaining] = candidates;
|
|
49402
|
+
if (!candidate) {
|
|
49403
|
+
return;
|
|
49361
49404
|
}
|
|
49405
|
+
const found = await tryReadPackageVersion(candidate);
|
|
49406
|
+
if (found) {
|
|
49407
|
+
return;
|
|
49408
|
+
}
|
|
49409
|
+
await resolveAbsoluteVersionFromCandidates(remaining);
|
|
49410
|
+
}, resolveAbsoluteVersionFromCandidates = async (candidates) => {
|
|
49411
|
+
const [candidate, ...remaining] = candidates;
|
|
49412
|
+
if (!candidate) {
|
|
49413
|
+
return;
|
|
49414
|
+
}
|
|
49415
|
+
const found = await tryReadPackageVersion(candidate);
|
|
49416
|
+
if (found) {
|
|
49417
|
+
return;
|
|
49418
|
+
}
|
|
49419
|
+
await resolveAbsoluteVersionFromCandidates(remaining);
|
|
49362
49420
|
}, loadVendorFiles = async (assetStore, vendorDir, framework) => {
|
|
49363
49421
|
const emptyStringArray = [];
|
|
49364
49422
|
const entries = await readdir4(vendorDir).catch(() => emptyStringArray);
|
|
@@ -49375,9 +49433,10 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
|
|
|
49375
49433
|
}
|
|
49376
49434
|
const startupSteps = [];
|
|
49377
49435
|
const recordStep = (label, startedAt) => {
|
|
49436
|
+
const durationMs = performance.now() - startedAt;
|
|
49378
49437
|
startupSteps.push({
|
|
49379
|
-
|
|
49380
|
-
|
|
49438
|
+
durationMs,
|
|
49439
|
+
label
|
|
49381
49440
|
});
|
|
49382
49441
|
};
|
|
49383
49442
|
let stepStartedAt = performance.now();
|
|
@@ -49435,9 +49494,10 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
|
|
|
49435
49494
|
}
|
|
49436
49495
|
return true;
|
|
49437
49496
|
}) : undefined;
|
|
49438
|
-
const buildAngularVendorTask = config.angularDirectory ? buildAngularVendor(state.resolvedPaths.buildDir).then(async () => {
|
|
49497
|
+
const buildAngularVendorTask = config.angularDirectory ? buildAngularVendor(state.resolvedPaths.buildDir, sourceDirs).then(async (specs) => {
|
|
49439
49498
|
const vendorDir = resolve32(state.resolvedPaths.buildDir, "angular", "vendor");
|
|
49440
49499
|
await loadVendorFiles(state.assetStore, vendorDir, "angular");
|
|
49500
|
+
globalThis.__angularVendorSpecifiers = specs;
|
|
49441
49501
|
return true;
|
|
49442
49502
|
}) : undefined;
|
|
49443
49503
|
const buildSvelteVendorTask = config.svelteDirectory ? buildSvelteVendor(state.resolvedPaths.buildDir).then(async () => {
|
|
@@ -49525,5 +49585,5 @@ export {
|
|
|
49525
49585
|
build
|
|
49526
49586
|
};
|
|
49527
49587
|
|
|
49528
|
-
//# debugId=
|
|
49588
|
+
//# debugId=190704CAF3619A9764756E2164756E21
|
|
49529
49589
|
//# sourceMappingURL=build.js.map
|