@absolutejs/absolute 0.19.0-beta.1114 → 0.19.0-beta.1116
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 +53 -47
- package/dist/angular/browser.js.map +5 -5
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/hmrPreserveCore.ts +73 -34
- package/dist/angular/index.js +63 -58
- package/dist/angular/index.js.map +10 -10
- package/dist/angular/server.js +20 -38
- package/dist/angular/server.js.map +8 -8
- package/dist/build.js +601 -547
- package/dist/build.js.map +32 -32
- package/dist/cli/config/client.js +8 -8
- package/dist/cli/config/server.js +87 -75
- package/dist/cli/index.js +146 -127
- package/dist/client/index.js +1 -19
- package/dist/client/index.js.map +3 -3
- package/dist/core/streamingSlotRegistrar.js +1 -19
- package/dist/core/streamingSlotRegistrar.js.map +2 -2
- package/dist/core/streamingSlotRegistry.js +1 -19
- package/dist/core/streamingSlotRegistry.js.map +2 -2
- package/dist/dev/client/errorOverlay.ts +11 -10
- package/dist/dev/client/handlers/angularHmrShim.ts +6 -6
- package/dist/dev/client/handlers/angularRemount.ts +64 -44
- package/dist/dev/client/hmrClient.ts +31 -26
- package/dist/dev/client/hmrToast.ts +2 -4
- package/dist/dev/serverBootstrap.js +36 -0
- package/dist/index.js +742 -615
- package/dist/index.js.map +39 -38
- package/dist/islands/browser.js +1 -19
- package/dist/islands/browser.js.map +2 -2
- package/dist/islands/index.js +1 -19
- package/dist/islands/index.js.map +3 -3
- package/dist/react/browser.js +1 -19
- package/dist/react/browser.js.map +2 -2
- package/dist/react/components/index.js +1 -19
- package/dist/react/components/index.js.map +2 -2
- package/dist/react/hooks/index.js +1 -19
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +15 -37
- package/dist/react/index.js.map +7 -7
- package/dist/react/jsxDevRuntimeCompat.js +1 -19
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/router/browser.js +1 -19
- package/dist/react/router/browser.js.map +2 -2
- package/dist/react/router/index.js +1 -19
- package/dist/react/router/index.js.map +2 -2
- package/dist/react/server.js +15 -37
- package/dist/react/server.js.map +6 -6
- package/dist/src/angular/hmrPreserveCore.d.ts +2 -2
- package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +1 -1
- package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +1 -1
- package/dist/src/cli/config/packageJson/resolvePackageJson.d.ts +1 -2
- package/dist/src/cli/config/schema/fromType.d.ts +1 -2
- package/dist/src/cli/config/server.d.ts +2 -2
- package/dist/src/core/build.d.ts +3 -2
- package/dist/src/core/prepare.d.ts +1 -0
- package/dist/src/dev/angular/fastHmrCompiler.d.ts +4 -2
- package/dist/src/dev/serverBootstrap.d.ts +1 -0
- package/dist/src/dev/serverEntryWatcher.d.ts +3 -3
- package/dist/src/dev/webSocket.d.ts +1 -1
- package/dist/src/plugins/hmr.d.ts +1 -0
- package/dist/src/svelte/router/matchPath.d.ts +2 -2
- package/dist/src/utils/defineConvention.d.ts +2 -2
- package/dist/src/utils/inlinePageCss.d.ts +1 -1
- package/dist/src/utils/isTestSourcePath.d.ts +1 -0
- package/dist/svelte/browser.js +1 -19
- package/dist/svelte/browser.js.map +2 -2
- package/dist/svelte/index.js +15 -36
- package/dist/svelte/index.js.map +8 -8
- package/dist/svelte/router/Link.svelte.d.ts +3 -3
- package/dist/svelte/router/Route.svelte.d.ts +5 -5
- package/dist/svelte/router/Router.svelte.d.ts +3 -3
- package/dist/svelte/router/matchPath.ts +25 -20
- package/dist/svelte/router/prefetchCache.ts +6 -4
- package/dist/svelte/router/viewTransitions.ts +22 -12
- package/dist/svelte/server.js +15 -36
- package/dist/svelte/server.js.map +7 -7
- package/dist/types/angular.d.ts +1 -1
- package/dist/types/globals.d.ts +5 -0
- package/dist/vue/browser.js +1 -19
- package/dist/vue/browser.js.map +2 -2
- package/dist/vue/components/Image.js +1 -19
- package/dist/vue/components/Image.js.map +2 -2
- package/dist/vue/components/index.js +1 -19
- package/dist/vue/components/index.js.map +2 -2
- package/dist/vue/index.js +41 -55
- package/dist/vue/index.js.map +10 -10
- package/dist/vue/server.js +32 -48
- package/dist/vue/server.js.map +8 -8
- package/package.json +285 -19
package/dist/cli/index.js
CHANGED
|
@@ -279,7 +279,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
|
|
|
279
279
|
releaseAllSync();
|
|
280
280
|
throw err;
|
|
281
281
|
});
|
|
282
|
-
}, isAlreadyExistsError = (error) => error instanceof Error && ("code" in error) && error
|
|
282
|
+
}, isAlreadyExistsError = (error) => error instanceof Error && ("code" in error) && Reflect.get(error, "code") === "EEXIST", lockPathForBuildDirectory = (buildDirectory) => join3(dirname2(buildDirectory), ".absolutejs", "build.lock"), readHeldLockEnv = () => new Set((process.env[HELD_LOCKS_ENV] ?? "").split(`
|
|
283
283
|
`).filter((entry) => entry.length > 0)), writeHeldLockEnv = (locks) => {
|
|
284
284
|
if (locks.size === 0) {
|
|
285
285
|
delete process.env[HELD_LOCKS_ENV];
|
|
@@ -316,7 +316,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
|
|
|
316
316
|
process.kill(pid, 0);
|
|
317
317
|
return true;
|
|
318
318
|
} catch (err) {
|
|
319
|
-
const
|
|
319
|
+
const code = typeof err === "object" && err !== null ? Reflect.get(err, "code") : undefined;
|
|
320
320
|
if (code === "ESRCH")
|
|
321
321
|
return false;
|
|
322
322
|
if (code === "EPERM")
|
|
@@ -395,7 +395,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
|
|
|
395
395
|
}
|
|
396
396
|
const portInfo = existing.port ? ` on port ${existing.port}` : "";
|
|
397
397
|
const elapsedNote = wait ? ` Waited ${Math.round((Date.now() - start) / 1000)}s.` : "";
|
|
398
|
-
throw new Error(`AbsoluteJS build lock is held by PID ${existing.pid}${portInfo} (started ${existing.startedAt}).${elapsedNote} ` + `Another process owns ${buildDirectory}. ` + `Run \`kill ${existing.pid}\` (or wait for it to finish) and try again
|
|
398
|
+
throw new Error(`AbsoluteJS build lock is held by PID ${existing.pid}${portInfo} (started ${existing.startedAt}).${elapsedNote} ` + `Another process owns ${buildDirectory}. ` + `Run \`kill ${existing.pid}\` (or wait for it to finish) and try again.`, { cause: error });
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
const releaseSync = () => {
|
|
@@ -760,7 +760,7 @@ var COMPOSE_PATH = "db/docker-compose.db.yml", DEFAULT_SERVER_ENTRY = "src/backe
|
|
|
760
760
|
process.kill(pid, "SIGTERM");
|
|
761
761
|
} catch {}
|
|
762
762
|
}, findFreePort = () => {
|
|
763
|
-
const server2 = Bun.serve({ fetch: () => new Response
|
|
763
|
+
const server2 = Bun.serve({ port: 0, fetch: () => new Response });
|
|
764
764
|
const { port } = server2;
|
|
765
765
|
server2.stop(true);
|
|
766
766
|
if (port === undefined) {
|
|
@@ -172530,6 +172530,9 @@ var init_mem = __esm(() => {
|
|
|
172530
172530
|
HEADERS = ["NAME", "SOURCE", "PORT", "RSS", "% SYS"];
|
|
172531
172531
|
});
|
|
172532
172532
|
|
|
172533
|
+
// src/cli/config/guards.ts
|
|
172534
|
+
var isRecord3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
172535
|
+
|
|
172533
172536
|
// src/cli/config/schema/fromType.ts
|
|
172534
172537
|
import {
|
|
172535
172538
|
existsSync as existsSync14,
|
|
@@ -172548,10 +172551,11 @@ var import_typescript3, VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DE
|
|
|
172548
172551
|
}
|
|
172549
172552
|
}, compilerOptionsFor = (cwd) => {
|
|
172550
172553
|
const tsconfigPath = import_typescript3.default.findConfigFile(cwd, import_typescript3.default.sys.fileExists, "tsconfig.json");
|
|
172551
|
-
const
|
|
172554
|
+
const parseConfigHost = {
|
|
172552
172555
|
...import_typescript3.default.sys,
|
|
172553
172556
|
onUnRecoverableConfigFileDiagnostic: () => {}
|
|
172554
|
-
}
|
|
172557
|
+
};
|
|
172558
|
+
const base = tsconfigPath && import_typescript3.default.getParsedCommandLineOfConfigFile(tsconfigPath, {}, parseConfigHost)?.options;
|
|
172555
172559
|
return {
|
|
172556
172560
|
...base ?? import_typescript3.default.getDefaultCompilerOptions(),
|
|
172557
172561
|
noEmit: true,
|
|
@@ -172589,7 +172593,7 @@ var import_typescript3, VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DE
|
|
|
172589
172593
|
}, readDiskCache = (cwd, typeName, signature, specifier) => {
|
|
172590
172594
|
try {
|
|
172591
172595
|
const cached = JSON.parse(readFileSync16(cacheFile(cwd, typeName, specifier), "utf-8"));
|
|
172592
|
-
if (cached
|
|
172596
|
+
if (isRecord3(cached) && cached.signature === signature && Array.isArray(cached.fields)) {
|
|
172593
172597
|
return cached.fields;
|
|
172594
172598
|
}
|
|
172595
172599
|
} catch {}
|
|
@@ -172704,7 +172708,7 @@ export { value };
|
|
|
172704
172708
|
sourceFile.forEachChild((node) => {
|
|
172705
172709
|
if (!import_typescript3.default.isVariableStatement(node))
|
|
172706
172710
|
return;
|
|
172707
|
-
const declaration = node.declarationList.declarations
|
|
172711
|
+
const [declaration] = node.declarationList.declarations;
|
|
172708
172712
|
if (!declaration)
|
|
172709
172713
|
return;
|
|
172710
172714
|
const type = checker.getTypeAtLocation(declaration);
|
|
@@ -172768,22 +172772,21 @@ var import_typescript4, CONFIG_CANDIDATES2, RUNTIME_FIELDS, findConfigPath2 = (c
|
|
|
172768
172772
|
}
|
|
172769
172773
|
return null;
|
|
172770
172774
|
}, parseSource = (configPath2, text) => import_typescript4.default.createSourceFile(configPath2, text, import_typescript4.default.ScriptTarget.Latest, true), findConfigObject = (sourceFile) => {
|
|
172771
|
-
|
|
172772
|
-
|
|
172773
|
-
|
|
172774
|
-
|
|
172775
|
-
|
|
172776
|
-
|
|
172777
|
-
|
|
172775
|
+
const pending = [sourceFile];
|
|
172776
|
+
while (pending.length > 0) {
|
|
172777
|
+
const node = pending.pop();
|
|
172778
|
+
if (!node)
|
|
172779
|
+
continue;
|
|
172780
|
+
const [firstArgument] = import_typescript4.default.isCallExpression(node) ? node.arguments : [];
|
|
172781
|
+
if (import_typescript4.default.isCallExpression(node) && import_typescript4.default.isIdentifier(node.expression) && node.expression.text === "defineConfig" && firstArgument && import_typescript4.default.isObjectLiteralExpression(firstArgument)) {
|
|
172782
|
+
return firstArgument;
|
|
172778
172783
|
}
|
|
172779
172784
|
if (import_typescript4.default.isExportAssignment(node) && import_typescript4.default.isObjectLiteralExpression(node.expression)) {
|
|
172780
|
-
|
|
172781
|
-
return;
|
|
172785
|
+
return node.expression;
|
|
172782
172786
|
}
|
|
172783
|
-
|
|
172784
|
-
}
|
|
172785
|
-
|
|
172786
|
-
return found;
|
|
172787
|
+
node.forEachChild((child) => pending.push(child));
|
|
172788
|
+
}
|
|
172789
|
+
return null;
|
|
172787
172790
|
}, parseConfigObject = (configPath2) => {
|
|
172788
172791
|
const text = readFileSync17(configPath2, "utf-8");
|
|
172789
172792
|
return { object: findConfigObject(parseSource(configPath2, text)), text };
|
|
@@ -172998,11 +173001,11 @@ var init_frameworks = __esm(() => {
|
|
|
172998
173001
|
|
|
172999
173002
|
// src/cli/generate/context.ts
|
|
173000
173003
|
import { dirname as dirname5, isAbsolute, join as join14, relative as relative3, resolve as resolve13 } from "path";
|
|
173001
|
-
var asString = (value) => typeof value === "string" ? value : undefined,
|
|
173004
|
+
var asString = (value) => typeof value === "string" ? value : undefined, isRecord4 = (value) => typeof value === "object" && value !== null, resolveDir = (cwd, value) => isAbsolute(value) ? value : resolve13(cwd, value), resolveStylesDir = (cwd, config) => {
|
|
173002
173005
|
const styles = config.stylesConfig;
|
|
173003
173006
|
if (typeof styles === "string")
|
|
173004
173007
|
return resolveDir(cwd, styles);
|
|
173005
|
-
if (
|
|
173008
|
+
if (isRecord4(styles)) {
|
|
173006
173009
|
const indexes = asString(styles.indexes);
|
|
173007
173010
|
if (indexes)
|
|
173008
173011
|
return resolveDir(cwd, indexes);
|
|
@@ -173013,7 +173016,7 @@ var asString = (value) => typeof value === "string" ? value : undefined, isRecor
|
|
|
173013
173016
|
return dir ? dirname5(dir) : resolve13(project.cwd, "src/frontend");
|
|
173014
173017
|
}, resolveProject = async (cwd, configOverride) => {
|
|
173015
173018
|
const loaded = await loadConfig(configOverride);
|
|
173016
|
-
const config =
|
|
173019
|
+
const config = isRecord4(loaded) ? loaded : {};
|
|
173017
173020
|
const frameworkDirs = {};
|
|
173018
173021
|
for (const key of FRAMEWORK_KEYS2) {
|
|
173019
173022
|
const dir = asString(config[frameworks2[key].configDirKey]);
|
|
@@ -173976,9 +173979,6 @@ var init_generate = __esm(() => {
|
|
|
173976
173979
|
SUBCOMMANDS = new Set(["api", "component", "page"]);
|
|
173977
173980
|
});
|
|
173978
173981
|
|
|
173979
|
-
// src/cli/config/guards.ts
|
|
173980
|
-
var isRecord4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
173981
|
-
|
|
173982
173982
|
// src/cli/config/schema/serialize.ts
|
|
173983
173983
|
var isIdentifier = (key) => /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(key), serializeValue = (value, level = 1, indent = "\t") => {
|
|
173984
173984
|
if (value === null)
|
|
@@ -173998,7 +173998,7 @@ ${value.map((item) => `${pad}${serializeValue(item, level + 1, indent)}`).join(`
|
|
|
173998
173998
|
`)}
|
|
173999
173999
|
${indent.repeat(level)}]`;
|
|
174000
174000
|
}
|
|
174001
|
-
if (
|
|
174001
|
+
if (isRecord3(value)) {
|
|
174002
174002
|
const keys = Object.keys(value);
|
|
174003
174003
|
if (keys.length === 0)
|
|
174004
174004
|
return "{}";
|
|
@@ -174066,20 +174066,20 @@ var import_typescript8, lineStartOffset = (text, position) => {
|
|
|
174066
174066
|
};
|
|
174067
174067
|
}
|
|
174068
174068
|
const indent = indentBefore2(text, last.getStart(sourceFile));
|
|
174069
|
-
let
|
|
174070
|
-
const hasComma = text[
|
|
174069
|
+
let insertionIndex = last.getEnd();
|
|
174070
|
+
const hasComma = text[insertionIndex] === ",";
|
|
174071
174071
|
if (hasComma)
|
|
174072
|
-
|
|
174072
|
+
insertionIndex += 1;
|
|
174073
174073
|
const insertion = `${hasComma ? "" : ","}
|
|
174074
174074
|
${indent}${entry}`;
|
|
174075
|
-
writeFileSync13(configPath2, text.slice(0,
|
|
174075
|
+
writeFileSync13(configPath2, text.slice(0, insertionIndex) + insertion + text.slice(insertionIndex), "utf-8");
|
|
174076
174076
|
} else {
|
|
174077
|
-
const
|
|
174077
|
+
const insertionIndex = object.getStart(sourceFile) + 1;
|
|
174078
174078
|
const indent = `${indentBefore2(text, object.getStart(sourceFile))} `;
|
|
174079
174079
|
const insertion = `
|
|
174080
174080
|
${indent}${entry}
|
|
174081
174081
|
${indentBefore2(text, object.getStart(sourceFile))}`;
|
|
174082
|
-
writeFileSync13(configPath2, text.slice(0,
|
|
174082
|
+
writeFileSync13(configPath2, text.slice(0, insertionIndex) + insertion + text.slice(insertionIndex), "utf-8");
|
|
174083
174083
|
}
|
|
174084
174084
|
return { message: `Updated ${request.name}`, ok: true };
|
|
174085
174085
|
} catch (error) {
|
|
@@ -174721,23 +174721,21 @@ var import_typescript9, AUTH_PACKAGE = "@absolutejs/auth", CONFIG_CANDIDATES3, f
|
|
|
174721
174721
|
}
|
|
174722
174722
|
return null;
|
|
174723
174723
|
}, parseSource2 = (configPath2, text) => import_typescript9.default.createSourceFile(configPath2, text, import_typescript9.default.ScriptTarget.Latest, true), findAuthSettingsObject = (sourceFile) => {
|
|
174724
|
-
|
|
174725
|
-
|
|
174726
|
-
|
|
174727
|
-
|
|
174724
|
+
const pending = [sourceFile];
|
|
174725
|
+
while (pending.length > 0) {
|
|
174726
|
+
const node = pending.pop();
|
|
174727
|
+
if (!node)
|
|
174728
|
+
continue;
|
|
174728
174729
|
const [firstArgument] = import_typescript9.default.isCallExpression(node) ? node.arguments : [];
|
|
174729
174730
|
if (import_typescript9.default.isCallExpression(node) && import_typescript9.default.isIdentifier(node.expression) && node.expression.text === "defineAuthSettings" && firstArgument && import_typescript9.default.isObjectLiteralExpression(firstArgument)) {
|
|
174730
|
-
|
|
174731
|
-
return;
|
|
174731
|
+
return firstArgument;
|
|
174732
174732
|
}
|
|
174733
174733
|
if (import_typescript9.default.isExportAssignment(node) && import_typescript9.default.isObjectLiteralExpression(node.expression)) {
|
|
174734
|
-
|
|
174735
|
-
return;
|
|
174734
|
+
return node.expression;
|
|
174736
174735
|
}
|
|
174737
|
-
|
|
174738
|
-
}
|
|
174739
|
-
|
|
174740
|
-
return found;
|
|
174736
|
+
node.forEachChild((child) => pending.push(child));
|
|
174737
|
+
}
|
|
174738
|
+
return null;
|
|
174741
174739
|
}, parseAuthSettingsObject = (configPath2) => {
|
|
174742
174740
|
const text = readFileSync23(configPath2, "utf-8");
|
|
174743
174741
|
return {
|
|
@@ -174925,18 +174923,17 @@ var import_typescript10, AUTH_PACKAGE2 = "@absolutejs/auth", REPO_URL = "https:/
|
|
|
174925
174923
|
const bindings = authBindings(sourceFile);
|
|
174926
174924
|
if (bindings.size === 0)
|
|
174927
174925
|
return null;
|
|
174928
|
-
|
|
174929
|
-
|
|
174930
|
-
|
|
174931
|
-
|
|
174926
|
+
const pending = [sourceFile];
|
|
174927
|
+
while (pending.length > 0) {
|
|
174928
|
+
const node = pending.pop();
|
|
174929
|
+
if (!node)
|
|
174930
|
+
continue;
|
|
174932
174931
|
if (import_typescript10.default.isCallExpression(node) && isAuthCall(node, bindings)) {
|
|
174933
|
-
|
|
174934
|
-
return;
|
|
174932
|
+
return matchFromCall(node);
|
|
174935
174933
|
}
|
|
174936
|
-
|
|
174937
|
-
}
|
|
174938
|
-
|
|
174939
|
-
return match;
|
|
174934
|
+
node.forEachChild((child) => pending.push(child));
|
|
174935
|
+
}
|
|
174936
|
+
return null;
|
|
174940
174937
|
}, featureStatuses = (keys) => AUTH_FEATURES.map((feature) => ({
|
|
174941
174938
|
blurb: feature.blurb,
|
|
174942
174939
|
configKey: feature.configKey,
|
|
@@ -176129,13 +176126,13 @@ import { dirname as dirname13, join as join28, resolve as resolve18, sep } from
|
|
|
176129
176126
|
var DEPENDENCY_FIELDS, TYPE_GRAPH_PACKAGES, readManifest = (path) => {
|
|
176130
176127
|
try {
|
|
176131
176128
|
const parsed = JSON.parse(readFileSync30(path, "utf-8"));
|
|
176132
|
-
return
|
|
176129
|
+
return isRecord3(parsed) ? parsed : null;
|
|
176133
176130
|
} catch {
|
|
176134
176131
|
return null;
|
|
176135
176132
|
}
|
|
176136
176133
|
}, dependencyRecord = (manifest, field) => {
|
|
176137
176134
|
const value = Reflect.get(manifest, field);
|
|
176138
|
-
return
|
|
176135
|
+
return isRecord3(value) ? value : {};
|
|
176139
176136
|
}, dependencyNames = (manifest) => [
|
|
176140
176137
|
...new Set(DEPENDENCY_FIELDS.flatMap((field) => Object.keys(dependencyRecord(manifest, field))))
|
|
176141
176138
|
], declaresPackage = (manifest, name) => DEPENDENCY_FIELDS.some((field) => Object.hasOwn(dependencyRecord(manifest, field), name)), manifestName = (manifest, fallback) => {
|
|
@@ -176266,7 +176263,7 @@ var DEPENDENCY_FIELDS, TYPE_GRAPH_PACKAGES, readManifest = (path) => {
|
|
|
176266
176263
|
if (!manifest)
|
|
176267
176264
|
return [];
|
|
176268
176265
|
const existing = Reflect.get(manifest, "overrides");
|
|
176269
|
-
const overrides =
|
|
176266
|
+
const overrides = isRecord3(existing) ? existing : {};
|
|
176270
176267
|
const changes = [];
|
|
176271
176268
|
const rootName = manifestName(manifest, "<workspace>");
|
|
176272
176269
|
for (const duplicate of duplicates) {
|
|
@@ -177213,9 +177210,11 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
177213
177210
|
if (!encoded)
|
|
177214
177211
|
return;
|
|
177215
177212
|
const map = JSON.parse(Buffer.from(encoded, "base64").toString("utf-8"));
|
|
177213
|
+
if (!isRecord3(map))
|
|
177214
|
+
return;
|
|
177216
177215
|
if (!Array.isArray(map.sources))
|
|
177217
177216
|
return;
|
|
177218
|
-
const sourceRoot = map.sourceRoot
|
|
177217
|
+
const sourceRoot = typeof map.sourceRoot === "string" ? map.sourceRoot : "";
|
|
177219
177218
|
const bundleDirectory = dirname16(filePath);
|
|
177220
177219
|
map.sources = map.sources.map((entry) => {
|
|
177221
177220
|
if (/^[A-Za-z][A-Za-z0-9+.-]*:/.test(entry))
|
|
@@ -177274,20 +177273,20 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
177274
177273
|
SERVER_RUNTIME_ASSET_RE.lastIndex = 0;
|
|
177275
177274
|
let match;
|
|
177276
177275
|
while ((match = SERVER_RUNTIME_ASSET_RE.exec(source)) !== null) {
|
|
177277
|
-
const relPath = match
|
|
177276
|
+
const [, relPath] = match;
|
|
177278
177277
|
if (!relPath)
|
|
177279
177278
|
continue;
|
|
177280
177279
|
copyReference(filePath, relPath);
|
|
177281
177280
|
}
|
|
177282
177281
|
SERVER_RUNTIME_IMPORT_META_DIR_JOIN_RE.lastIndex = 0;
|
|
177283
177282
|
while ((match = SERVER_RUNTIME_IMPORT_META_DIR_JOIN_RE.exec(source)) !== null) {
|
|
177284
|
-
const args = match
|
|
177283
|
+
const [, args] = match;
|
|
177285
177284
|
if (!args)
|
|
177286
177285
|
continue;
|
|
177287
177286
|
SERVER_RUNTIME_STRING_ARG_RE.lastIndex = 0;
|
|
177288
177287
|
const parts = [];
|
|
177289
177288
|
for (const partMatch of args.matchAll(SERVER_RUNTIME_STRING_ARG_RE)) {
|
|
177290
|
-
const part = partMatch
|
|
177289
|
+
const [, part] = partMatch;
|
|
177291
177290
|
if (part)
|
|
177292
177291
|
parts.push(part);
|
|
177293
177292
|
}
|
|
@@ -177375,11 +177374,11 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
177375
177374
|
return specifier;
|
|
177376
177375
|
return requireForCompile.resolve(specifier, { paths: [process.cwd()] });
|
|
177377
177376
|
}, resolveCompileNativeAssetEnv = (buildConfig) => {
|
|
177378
|
-
const
|
|
177377
|
+
const nativeAssetEnv = {};
|
|
177379
177378
|
for (const asset of resolveCompileNativeAssets(buildConfig)) {
|
|
177380
|
-
|
|
177379
|
+
nativeAssetEnv[asset.env] = resolveNativeAssetForRuntime(asset.import);
|
|
177381
177380
|
}
|
|
177382
|
-
return
|
|
177381
|
+
return nativeAssetEnv;
|
|
177383
177382
|
}, tryReadNodePackageJson = (packageDir) => {
|
|
177384
177383
|
try {
|
|
177385
177384
|
return JSON.parse(readFileSync34(join32(packageDir, "package.json"), "utf-8"));
|
|
@@ -177455,18 +177454,17 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
177455
177454
|
}
|
|
177456
177455
|
specifiers.push(entry.name);
|
|
177457
177456
|
}
|
|
177458
|
-
return specifiers.sort((
|
|
177457
|
+
return specifiers.sort((firstSpecifier, secondSpecifier) => secondSpecifier.length - firstSpecifier.length);
|
|
177459
177458
|
}, ensureRelativeModuleSpecifier = (fromFile, toFile) => {
|
|
177460
177459
|
const rel = relative11(dirname16(fromFile), toFile).replace(/\\/g, "/");
|
|
177461
177460
|
return rel.startsWith(".") ? rel : `./${rel}`;
|
|
177462
177461
|
}, pickExportEntry = (value) => {
|
|
177463
177462
|
if (typeof value === "string")
|
|
177464
177463
|
return value;
|
|
177465
|
-
if (!value
|
|
177464
|
+
if (!isRecord3(value))
|
|
177466
177465
|
return;
|
|
177467
|
-
const record = value;
|
|
177468
177466
|
for (const key of ["bun", "node", "import", "module", "default"]) {
|
|
177469
|
-
const entry = pickExportEntry(
|
|
177467
|
+
const entry = pickExportEntry(value[key]);
|
|
177470
177468
|
if (entry)
|
|
177471
177469
|
return entry;
|
|
177472
177470
|
}
|
|
@@ -177529,7 +177527,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
177529
177527
|
continue;
|
|
177530
177528
|
const source = readFileSync34(filePath, "utf-8");
|
|
177531
177529
|
for (const match of source.matchAll(MODULE_SPECIFIER_RE)) {
|
|
177532
|
-
const specifier = match
|
|
177530
|
+
const [, , , specifier] = match;
|
|
177533
177531
|
if (!specifier || specifier.startsWith(".") || specifier.startsWith("/") || specifier.startsWith("#") || specifier.startsWith("node:") || specifier.startsWith("bun:")) {
|
|
177534
177532
|
continue;
|
|
177535
177533
|
}
|
|
@@ -178077,11 +178075,12 @@ console.log(\`
|
|
|
178077
178075
|
});
|
|
178078
178076
|
}
|
|
178079
178077
|
}), FRAMEWORK_EXTERNALS, collectUserServerExternals = (buildConfig) => {
|
|
178080
|
-
const bunBuild = buildConfig
|
|
178078
|
+
const { bunBuild } = buildConfig;
|
|
178081
178079
|
if (!bunBuild)
|
|
178082
178080
|
return [];
|
|
178083
|
-
const override = Array.isArray(bunBuild.external) ? bunBuild.external : [];
|
|
178084
|
-
const
|
|
178081
|
+
const override = "external" in bunBuild && Array.isArray(bunBuild.external) ? bunBuild.external : [];
|
|
178082
|
+
const defaultBuild = "default" in bunBuild ? bunBuild.default : undefined;
|
|
178083
|
+
const fromDefault = Array.isArray(defaultBuild?.external) ? defaultBuild.external : [];
|
|
178085
178084
|
return [...override, ...fromDefault];
|
|
178086
178085
|
}, resolveServerBundleExternals = (buildConfig) => [
|
|
178087
178086
|
...FRAMEWORK_EXTERNALS.filter((specifier) => {
|
|
@@ -178144,7 +178143,6 @@ console.log(\`
|
|
|
178144
178143
|
entrypoints: [resolve22(serverEntry)],
|
|
178145
178144
|
external: resolveServerBundleExternals(buildConfig),
|
|
178146
178145
|
outdir: resolvedOutdir,
|
|
178147
|
-
sourcemap: "inline",
|
|
178148
178146
|
plugins: [
|
|
178149
178147
|
...islandRegistryPlugin ? [islandRegistryPlugin] : [],
|
|
178150
178148
|
createStubPlugin({
|
|
@@ -178156,6 +178154,7 @@ console.log(\`
|
|
|
178156
178154
|
createExternalAssetPlugin(resolvedOutdir, userSourceRoots),
|
|
178157
178155
|
...buildConfig.compile?.plugins ?? []
|
|
178158
178156
|
],
|
|
178157
|
+
sourcemap: "inline",
|
|
178159
178158
|
target: "bun",
|
|
178160
178159
|
throw: false
|
|
178161
178160
|
});
|
|
@@ -178171,7 +178170,7 @@ console.log(\`
|
|
|
178171
178170
|
}
|
|
178172
178171
|
if (existsSync37(resolve22(resolvedOutdir, "angular", "vendor", "server"))) {
|
|
178173
178172
|
const vendorDir = resolve22(resolvedOutdir, "angular", "vendor", "server");
|
|
178174
|
-
const vendorEntries = readdirSync7(vendorDir).filter((
|
|
178173
|
+
const vendorEntries = readdirSync7(vendorDir).filter((fileName) => fileName.endsWith(".js"));
|
|
178175
178174
|
const angularServerVendorPaths = {};
|
|
178176
178175
|
for (const file of vendorEntries) {
|
|
178177
178176
|
const stem = file.replace(/\.js$/, "");
|
|
@@ -178317,7 +178316,8 @@ import { existsSync as existsSync38, readFileSync as readFileSync35 } from "fs";
|
|
|
178317
178316
|
import { mkdir as mkdir2, writeFile } from "fs/promises";
|
|
178318
178317
|
var isCommandService3 = (service) => service.kind === "command" || Array.isArray(service.command), resolveConfigPath = (configPath2) => resolve23(configPath2 ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts"), getTypecheckTargets = async (configPath2) => {
|
|
178319
178318
|
if (!existsSync38(resolveConfigPath(configPath2))) {
|
|
178320
|
-
|
|
178319
|
+
const defaultService = {};
|
|
178320
|
+
return [defaultService];
|
|
178321
178321
|
}
|
|
178322
178322
|
const rawConfig = await loadRawConfig(configPath2);
|
|
178323
178323
|
if (!isWorkspaceConfig(rawConfig)) {
|
|
@@ -179194,18 +179194,18 @@ init_portScan();
|
|
|
179194
179194
|
|
|
179195
179195
|
// src/utils/resolveDevPort.ts
|
|
179196
179196
|
import { createServer } from "net";
|
|
179197
|
-
var isPortFree = (port, host = "localhost") => new Promise((
|
|
179197
|
+
var isPortFree = (port, host = "localhost") => new Promise((resolve2) => {
|
|
179198
179198
|
const server2 = createServer();
|
|
179199
179199
|
server2.unref();
|
|
179200
179200
|
server2.once("error", (err) => {
|
|
179201
179201
|
if (err.code === "EADDRINUSE") {
|
|
179202
|
-
|
|
179202
|
+
resolve2(false);
|
|
179203
179203
|
return;
|
|
179204
179204
|
}
|
|
179205
|
-
|
|
179205
|
+
resolve2(false);
|
|
179206
179206
|
});
|
|
179207
179207
|
server2.listen(port, host, () => {
|
|
179208
|
-
server2.close(() =>
|
|
179208
|
+
server2.close(() => resolve2(true));
|
|
179209
179209
|
});
|
|
179210
179210
|
});
|
|
179211
179211
|
var resolveDevPort = async (requestedPort, options = {}) => {
|
|
@@ -179234,6 +179234,8 @@ var cliTag = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[cl
|
|
|
179234
179234
|
var DEFAULT_PORT_RANGE = 10;
|
|
179235
179235
|
var RESTART_PARK_POLL_MS = 20;
|
|
179236
179236
|
var NODE_API_IMPORT_ERROR = "To load Node-API modules, use require() or process.dlopen instead of import.";
|
|
179237
|
+
var sourceServerBootstrap = resolve3(import.meta.dir, "../../dev/serverBootstrap.ts");
|
|
179238
|
+
var serverBootstrap = existsSync5(sourceServerBootstrap) ? sourceServerBootstrap : resolve3(import.meta.dir, "../dev/serverBootstrap.js");
|
|
179237
179239
|
var formatServerBootDiagnostic = (output, serverEntry) => {
|
|
179238
179240
|
if (!output.includes(NODE_API_IMPORT_ERROR))
|
|
179239
179241
|
return null;
|
|
@@ -179433,6 +179435,8 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179433
179435
|
interactive?.showPrompt();
|
|
179434
179436
|
};
|
|
179435
179437
|
const RESTART_MARKER = "[abs:restart]";
|
|
179438
|
+
const ANSI_ESCAPE = String.fromCharCode(27);
|
|
179439
|
+
const ANSI_COLOR_SEQUENCE_RE = new RegExp(`${ANSI_ESCAPE}\\[[0-9;]*m`, "g");
|
|
179436
179440
|
let restartScanBuffer = "";
|
|
179437
179441
|
const handleChunk = (value) => {
|
|
179438
179442
|
const text = value.toString("utf8");
|
|
@@ -179445,7 +179449,7 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179445
179449
|
const markerIdx = line.indexOf(RESTART_MARKER);
|
|
179446
179450
|
if (markerIdx === -1)
|
|
179447
179451
|
continue;
|
|
179448
|
-
const path = line.slice(markerIdx + RESTART_MARKER.length).replace(
|
|
179452
|
+
const path = line.slice(markerIdx + RESTART_MARKER.length).replace(ANSI_COLOR_SEQUENCE_RE, "").trim();
|
|
179449
179453
|
scheduleServerRestart(path);
|
|
179450
179454
|
}
|
|
179451
179455
|
if (restartScanBuffer.length > 4096) {
|
|
@@ -179470,29 +179474,31 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179470
179474
|
} catch {
|
|
179471
179475
|
return;
|
|
179472
179476
|
}
|
|
179473
|
-
const
|
|
179477
|
+
const refreshedDevConfig = resolveDevConfig(cfg?.dev);
|
|
179474
179478
|
const desiredBuildDir = cfg?.buildDirectory ? resolve3(process.cwd(), cfg.buildDirectory) : resolve3(process.cwd(), "build");
|
|
179475
179479
|
if (desiredBuildDir !== buildDirectory && desiredBuildDir !== lastBuildDirectoryWarned) {
|
|
179476
179480
|
lastBuildDirectoryWarned = desiredBuildDir;
|
|
179477
179481
|
console.log(cliTag("\x1B[33m", `buildDirectory changed in config (${buildDirectory} \u2192 ${desiredBuildDir}) \u2014 restart \`absolute dev\` to apply (the parent CLI holds a directory lock at the original path).`));
|
|
179478
179482
|
}
|
|
179479
|
-
if (
|
|
179480
|
-
const probe = await resolveDevPort(
|
|
179481
|
-
host:
|
|
179482
|
-
portRange:
|
|
179483
|
-
strictPort:
|
|
179483
|
+
if (refreshedDevConfig.port !== resolvedDev.port || refreshedDevConfig.host !== resolvedDev.host || refreshedDevConfig.portRange !== resolvedDev.portRange || refreshedDevConfig.strictPort !== resolvedDev.strictPort) {
|
|
179484
|
+
const probe = await resolveDevPort(refreshedDevConfig.port, {
|
|
179485
|
+
host: refreshedDevConfig.host,
|
|
179486
|
+
portRange: refreshedDevConfig.portRange,
|
|
179487
|
+
strictPort: refreshedDevConfig.strictPort
|
|
179484
179488
|
}).catch((err) => {
|
|
179485
179489
|
console.error(cliTag("\x1B[31m", String(err.message ?? err)));
|
|
179486
179490
|
return;
|
|
179487
179491
|
});
|
|
179488
179492
|
if (probe && probe.port !== port) {
|
|
179489
|
-
const
|
|
179490
|
-
|
|
179491
|
-
|
|
179493
|
+
const { port: nextPort } = probe;
|
|
179494
|
+
const { host } = refreshedDevConfig;
|
|
179495
|
+
const displayHost = host === "0.0.0.0" ? "localhost" : host;
|
|
179496
|
+
console.log(cliTag("\x1B[36m", `Port changed in config \u2014 switching to http://${displayHost}:${nextPort}/`));
|
|
179497
|
+
port = nextPort;
|
|
179492
179498
|
updateLockMetadata(buildDirectory, { port });
|
|
179493
179499
|
updateInstance(instancePid, { port });
|
|
179494
179500
|
}
|
|
179495
|
-
resolvedDev =
|
|
179501
|
+
resolvedDev = refreshedDevConfig;
|
|
179496
179502
|
}
|
|
179497
179503
|
};
|
|
179498
179504
|
const readDotenvFiles = () => {
|
|
@@ -179510,11 +179516,11 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179510
179516
|
const line = rawLine.trim();
|
|
179511
179517
|
if (!line || line.startsWith("#"))
|
|
179512
179518
|
continue;
|
|
179513
|
-
const
|
|
179514
|
-
if (
|
|
179519
|
+
const equalsIndex = line.indexOf("=");
|
|
179520
|
+
if (equalsIndex === -1)
|
|
179515
179521
|
continue;
|
|
179516
|
-
const key = line.slice(0,
|
|
179517
|
-
let val = line.slice(
|
|
179522
|
+
const key = line.slice(0, equalsIndex).trim();
|
|
179523
|
+
let val = line.slice(equalsIndex + 1).trim();
|
|
179518
179524
|
if (val.startsWith('"') && val.endsWith('"') || val.startsWith("'") && val.endsWith("'")) {
|
|
179519
179525
|
val = val.slice(1, -1);
|
|
179520
179526
|
}
|
|
@@ -179544,7 +179550,7 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179544
179550
|
"--hot",
|
|
179545
179551
|
"--no-clear-screen",
|
|
179546
179552
|
...heapSnapshotEnabled ? ["--preload", heapPreloadPath] : [],
|
|
179547
|
-
|
|
179553
|
+
serverBootstrap
|
|
179548
179554
|
], {
|
|
179549
179555
|
cwd: process.cwd(),
|
|
179550
179556
|
detached: true,
|
|
@@ -179552,9 +179558,10 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179552
179558
|
...process.env,
|
|
179553
179559
|
...readDotenvFiles(),
|
|
179554
179560
|
ABSOLUTE_INSTANCE_MANAGED: "1",
|
|
179561
|
+
ABSOLUTE_PORT: String(port),
|
|
179562
|
+
ABSOLUTE_SERVER_ENTRY: resolve3(serverEntry),
|
|
179555
179563
|
FORCE_COLOR: "1",
|
|
179556
179564
|
NODE_ENV: "development",
|
|
179557
|
-
ABSOLUTE_PORT: String(port),
|
|
179558
179565
|
PORT: String(port),
|
|
179559
179566
|
...configPath2 ? { ABSOLUTE_CONFIG: configPath2 } : {},
|
|
179560
179567
|
...httpsEnabled ? { ABSOLUTE_HTTPS: "true" } : {}
|
|
@@ -179619,7 +179626,7 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179619
179626
|
};
|
|
179620
179627
|
try {
|
|
179621
179628
|
const { watch } = await import("fs");
|
|
179622
|
-
const { dirname: dirname3
|
|
179629
|
+
const { dirname: dirname3 } = await import("path");
|
|
179623
179630
|
const absServerEntry = resolve3(serverEntry);
|
|
179624
179631
|
const serverEntryDir = dirname3(absServerEntry);
|
|
179625
179632
|
const ROOT_RESTART_DENY = new Set([
|
|
@@ -179652,7 +179659,7 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179652
179659
|
if (now - last < 100)
|
|
179653
179660
|
return;
|
|
179654
179661
|
recentlyHandled.set(filename, now);
|
|
179655
|
-
scheduleServerRestart(
|
|
179662
|
+
scheduleServerRestart(join6(serverEntryDir, filename));
|
|
179656
179663
|
};
|
|
179657
179664
|
const recoveryScan = async () => {
|
|
179658
179665
|
let entries;
|
|
@@ -179669,13 +179676,13 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179669
179676
|
continue;
|
|
179670
179677
|
if (isAtomicWriteTemp(entry.name))
|
|
179671
179678
|
continue;
|
|
179672
|
-
let
|
|
179679
|
+
let fileStat;
|
|
179673
179680
|
try {
|
|
179674
|
-
|
|
179681
|
+
fileStat = statSync(join6(serverEntryDir, entry.name));
|
|
179675
179682
|
} catch {
|
|
179676
179683
|
continue;
|
|
179677
179684
|
}
|
|
179678
|
-
if (now -
|
|
179685
|
+
if (now - fileStat.ctimeMs > ATOMIC_RECOVERY_WINDOW_MS)
|
|
179679
179686
|
continue;
|
|
179680
179687
|
handleCandidate(entry.name);
|
|
179681
179688
|
}
|
|
@@ -179730,9 +179737,9 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179730
179737
|
};
|
|
179731
179738
|
const killChildTree = (signal) => signalChildTree(serverProcess, signal);
|
|
179732
179739
|
const FORCE_KILL_GRACE_MS = 2 * MILLISECONDS_IN_A_SECOND;
|
|
179733
|
-
const terminateChild = (proc) => new Promise((
|
|
179740
|
+
const terminateChild = (proc) => new Promise((_resolve) => {
|
|
179734
179741
|
if (proc.exitCode !== null || typeof proc.pid !== "number") {
|
|
179735
|
-
|
|
179742
|
+
_resolve();
|
|
179736
179743
|
return;
|
|
179737
179744
|
}
|
|
179738
179745
|
let settled = false;
|
|
@@ -179741,7 +179748,7 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179741
179748
|
return;
|
|
179742
179749
|
settled = true;
|
|
179743
179750
|
clearTimeout(killTimer);
|
|
179744
|
-
|
|
179751
|
+
_resolve();
|
|
179745
179752
|
};
|
|
179746
179753
|
proc.once("exit", finish);
|
|
179747
179754
|
signalChildTree(proc, "SIGTERM");
|
|
@@ -179764,12 +179771,12 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179764
179771
|
if (paused)
|
|
179765
179772
|
sendSignal("SIGCONT");
|
|
179766
179773
|
killChildTree("SIGTERM");
|
|
179767
|
-
await new Promise((
|
|
179774
|
+
await new Promise((_resolve) => {
|
|
179768
179775
|
if (serverProcess.exitCode !== null) {
|
|
179769
|
-
|
|
179776
|
+
_resolve();
|
|
179770
179777
|
return;
|
|
179771
179778
|
}
|
|
179772
|
-
serverProcess.once("exit", () =>
|
|
179779
|
+
serverProcess.once("exit", () => _resolve());
|
|
179773
179780
|
setTimeout(() => {
|
|
179774
179781
|
killChildTree("SIGKILL");
|
|
179775
179782
|
}, 2000).unref();
|
|
@@ -179923,8 +179930,10 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179923
179930
|
return false;
|
|
179924
179931
|
}
|
|
179925
179932
|
const now = Date.now();
|
|
179926
|
-
|
|
179933
|
+
let [oldestCrash] = recentCrashes;
|
|
179934
|
+
while (oldestCrash !== undefined && now - oldestCrash > CRASH_WINDOW_MS) {
|
|
179927
179935
|
recentCrashes.shift();
|
|
179936
|
+
[oldestCrash] = recentCrashes;
|
|
179928
179937
|
}
|
|
179929
179938
|
recentCrashes.push(now);
|
|
179930
179939
|
if (recentCrashes.length > MAX_CRASHES_PER_WINDOW) {
|
|
@@ -179956,12 +179965,12 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
179956
179965
|
return;
|
|
179957
179966
|
}
|
|
179958
179967
|
const current = serverProcess;
|
|
179959
|
-
const exitCode = await new Promise((
|
|
179968
|
+
const exitCode = await new Promise((_resolve) => {
|
|
179960
179969
|
if (current.exitCode !== null) {
|
|
179961
|
-
|
|
179970
|
+
_resolve(current.exitCode);
|
|
179962
179971
|
return;
|
|
179963
179972
|
}
|
|
179964
|
-
current.once("exit", (code) =>
|
|
179973
|
+
current.once("exit", (code) => _resolve(code));
|
|
179965
179974
|
});
|
|
179966
179975
|
if (intentionalRestart) {
|
|
179967
179976
|
await waitForIntentionalRestart();
|
|
@@ -180039,15 +180048,15 @@ var FLAG_VALUE_FLAGS = new Set([
|
|
|
180039
180048
|
"--concurrency"
|
|
180040
180049
|
]);
|
|
180041
180050
|
var hasUserPositional = (args) => {
|
|
180042
|
-
for (let
|
|
180043
|
-
const arg = args[
|
|
180051
|
+
for (let index = 0;index < args.length; index++) {
|
|
180052
|
+
const arg = args[index];
|
|
180044
180053
|
if (arg === undefined)
|
|
180045
180054
|
continue;
|
|
180046
180055
|
if (arg.startsWith("-")) {
|
|
180047
180056
|
if (arg.includes("="))
|
|
180048
180057
|
continue;
|
|
180049
180058
|
if (FLAG_VALUE_FLAGS.has(arg))
|
|
180050
|
-
|
|
180059
|
+
index++;
|
|
180051
180060
|
continue;
|
|
180052
180061
|
}
|
|
180053
180062
|
return true;
|
|
@@ -180286,13 +180295,13 @@ Move ignores into a standalone block at the top of your config:
|
|
|
180286
180295
|
|
|
180287
180296
|
Detected at: ${configPath2}${reset}`);
|
|
180288
180297
|
};
|
|
180289
|
-
var formatDuration = (
|
|
180290
|
-
if (
|
|
180291
|
-
return `${
|
|
180292
|
-
if (
|
|
180293
|
-
return `${(
|
|
180294
|
-
const minutes = Math.floor(
|
|
180295
|
-
const seconds = Math.round(
|
|
180298
|
+
var formatDuration = (durationMs) => {
|
|
180299
|
+
if (durationMs < 1000)
|
|
180300
|
+
return `${durationMs}ms`;
|
|
180301
|
+
if (durationMs < 60000)
|
|
180302
|
+
return `${(durationMs / 1000).toFixed(2)}s`;
|
|
180303
|
+
const minutes = Math.floor(durationMs / 60000);
|
|
180304
|
+
const seconds = Math.round(durationMs % 60000 / 1000);
|
|
180296
180305
|
return `${minutes}m ${seconds}s`;
|
|
180297
180306
|
};
|
|
180298
180307
|
var handleClearCache = (cacheLocation, cwd = process.cwd()) => {
|
|
@@ -180933,7 +180942,7 @@ var start = async (serverEntry, outdir, configPath2) => {
|
|
|
180933
180942
|
if (existsSync8(resolve8(resolvedOutdir, "angular", "vendor", "server"))) {
|
|
180934
180943
|
const { readdirSync: readdirSync2 } = await import("fs");
|
|
180935
180944
|
const vendorDir = resolve8(resolvedOutdir, "angular", "vendor", "server");
|
|
180936
|
-
const vendorEntries = readdirSync2(vendorDir).filter((
|
|
180945
|
+
const vendorEntries = readdirSync2(vendorDir).filter((fileName) => fileName.endsWith(".js"));
|
|
180937
180946
|
const angularServerVendorPaths = {};
|
|
180938
180947
|
const { relative: pathRelative, dirname: pathDirname } = await import("path");
|
|
180939
180948
|
for (const file of vendorEntries) {
|
|
@@ -181347,7 +181356,13 @@ var createWorkspaceTui = ({
|
|
|
181347
181356
|
const timestamp = formatTimestamp2();
|
|
181348
181357
|
logEntries.push({ level, message: line, source, timestamp });
|
|
181349
181358
|
if (headless) {
|
|
181350
|
-
const
|
|
181359
|
+
const levelColors = {
|
|
181360
|
+
error: colors.red,
|
|
181361
|
+
info: colors.dim,
|
|
181362
|
+
success: colors.green,
|
|
181363
|
+
warn: colors.yellow
|
|
181364
|
+
};
|
|
181365
|
+
const levelColor = levelColors[level];
|
|
181351
181366
|
process.stdout.write(`${colors.dim}${timestamp}${colors.reset} ${levelColor}${source}${colors.reset} ${line}
|
|
181352
181367
|
`);
|
|
181353
181368
|
}
|
|
@@ -181618,6 +181633,8 @@ var createWorkspaceTui = ({
|
|
|
181618
181633
|
|
|
181619
181634
|
// src/cli/scripts/workspace.ts
|
|
181620
181635
|
init_utils();
|
|
181636
|
+
var sourceServerBootstrap2 = resolve9(import.meta.dir, "../../dev/serverBootstrap.ts");
|
|
181637
|
+
var serverBootstrap2 = existsSync9(sourceServerBootstrap2) ? sourceServerBootstrap2 : resolve9(import.meta.dir, "../dev/serverBootstrap.js");
|
|
181621
181638
|
var ANSI_REGEX2 = new RegExp(`${String.fromCharCode(ANSI_ESCAPE_CODE)}\\[[0-?]*[ -/]*[@-~]`, "g");
|
|
181622
181639
|
var sleep = (durationMs) => Bun.sleep(durationMs);
|
|
181623
181640
|
var stripAnsi2 = (value) => value.replace(ANSI_REGEX2, "");
|
|
@@ -182042,12 +182059,14 @@ var resolveService = (name, service, workspaceEnv, options) => {
|
|
|
182042
182059
|
});
|
|
182043
182060
|
if (isAbsoluteService(service)) {
|
|
182044
182061
|
const configPath2 = resolveAbsoluteServiceConfigPath(service, cwd, options);
|
|
182045
|
-
Object.assign(envVars, configPath2 ? { ABSOLUTE_CONFIG: configPath2 } : {}
|
|
182062
|
+
Object.assign(envVars, configPath2 ? { ABSOLUTE_CONFIG: configPath2 } : {}, {
|
|
182063
|
+
ABSOLUTE_SERVER_ENTRY: resolve9(cwd, service.entry ?? DEFAULT_SERVER_ENTRY)
|
|
182064
|
+
});
|
|
182046
182065
|
const command = [
|
|
182047
182066
|
process.execPath,
|
|
182048
182067
|
"--hot",
|
|
182049
182068
|
"--no-clear-screen",
|
|
182050
|
-
|
|
182069
|
+
serverBootstrap2
|
|
182051
182070
|
];
|
|
182052
182071
|
return {
|
|
182053
182072
|
command,
|