@absolutejs/absolute 0.19.0-beta.1031 → 0.19.0-beta.1033
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 +18 -16
- package/dist/angular/browser.js.map +8 -8
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/hmrPreserveCore.ts +86 -121
- package/dist/angular/index.js +57 -50
- package/dist/angular/index.js.map +17 -17
- package/dist/angular/server.js +42 -35
- package/dist/angular/server.js.map +12 -12
- package/dist/build.js +145 -138
- package/dist/build.js.map +31 -31
- package/dist/cli/config/client.js +1 -1
- package/dist/cli/config/server.js +43 -43
- package/dist/cli/index.js +71 -18
- package/dist/client/index.js +17 -10
- package/dist/client/index.js.map +10 -10
- package/dist/dev/client/errorOverlay.ts +4 -4
- package/dist/dev/client/handlers/angularHmrShim.ts +18 -18
- package/dist/dev/client/handlers/angularRemount.ts +10 -8
- package/dist/dev/client/handlers/angularRemountWiring.ts +2 -2
- package/dist/dev/client/hmrToast.ts +20 -20
- package/dist/index.js +159 -153
- package/dist/index.js.map +38 -38
- package/dist/islands/browser.js.map +1 -1
- package/dist/islands/index.js +13 -6
- package/dist/islands/index.js.map +8 -8
- package/dist/react/browser.js.map +1 -1
- package/dist/react/components/index.js +2 -2
- package/dist/react/components/index.js.map +3 -3
- package/dist/react/hooks/index.js.map +1 -1
- package/dist/react/index.js +29 -22
- package/dist/react/index.js.map +11 -11
- package/dist/react/server.js +17 -17
- package/dist/react/server.js.map +5 -5
- package/dist/src/angular/hmrPreserveCore.d.ts +6 -19
- package/dist/src/angular/islands.d.ts +1 -1
- package/dist/src/angular/ssrRender.d.ts +4 -1
- package/dist/src/cli/config/packageJson/editPackageJson.d.ts +2 -2
- package/dist/src/cli/config/schema/fromJsonSchema.d.ts +1 -1
- package/dist/src/cli/instanceStatus.d.ts +1 -0
- package/dist/src/client/hydrators/react.d.ts +1 -1
- package/dist/src/client/hydrators/svelte.d.ts +1 -1
- package/dist/src/client/hydrators/vue.d.ts +1 -1
- package/dist/src/client/islandStore.d.ts +3 -3
- package/dist/src/core/build.d.ts +1 -1
- package/dist/src/core/devRouteRegistrationCallsite.d.ts +1 -5
- package/dist/src/dev/angular/fastHmrCompiler.d.ts +2 -2
- package/dist/src/dev/angular/hmrCompiler.d.ts +1 -1
- package/dist/src/dev/angular/resolveOwningComponents.d.ts +1 -1
- package/dist/src/svelte/router/hashMode.d.ts +1 -6
- package/dist/src/svelte/router/matchPath.d.ts +2 -22
- package/dist/src/svelte/router/page.svelte.d.ts +1 -10
- package/dist/src/svelte/router/prefetchCache.d.ts +2 -6
- package/dist/src/utils/formatBytes.d.ts +2 -0
- package/dist/src/utils/generatedDir.d.ts +1 -1
- package/dist/src/utils/inlinePageCss.d.ts +1 -3
- package/dist/src/utils/jsonLd.d.ts +1 -1
- package/dist/src/utils/loadConfig.d.ts +2 -3
- package/dist/src/utils/resolveConvention.d.ts +1 -1
- package/dist/src/utils/resolveDevPort.d.ts +4 -1
- package/dist/src/utils/runtimeMode.d.ts +1 -1
- package/dist/src/vue/defineVuePage.d.ts +1 -11
- package/dist/svelte/browser.js.map +1 -1
- package/dist/svelte/index.js +34 -27
- package/dist/svelte/index.js.map +11 -11
- package/dist/svelte/router/hashMode.ts +6 -12
- package/dist/svelte/router/matchPath.ts +23 -45
- package/dist/svelte/router/page.d.ts +1 -10
- package/dist/svelte/router/page.js +6 -6
- package/dist/svelte/router/prefetchCache.ts +17 -21
- package/dist/svelte/server.js +22 -22
- package/dist/svelte/server.js.map +5 -5
- package/dist/types/cli.d.ts +2 -0
- package/dist/vue/browser.js +2 -2
- package/dist/vue/browser.js.map +4 -4
- package/dist/vue/index.js +37 -30
- package/dist/vue/index.js.map +14 -14
- package/dist/vue/server.js +24 -24
- package/dist/vue/server.js.map +7 -7
- package/package.json +38 -38
package/dist/index.js
CHANGED
|
@@ -6668,7 +6668,7 @@ var init_streamingSlots = __esm(() => {
|
|
|
6668
6668
|
});
|
|
6669
6669
|
|
|
6670
6670
|
// src/utils/runtimeMode.ts
|
|
6671
|
-
var ENV_VAR = "NODE_ENV",
|
|
6671
|
+
var ENV_VAR = "NODE_ENV", isDevelopmentRuntime = () => process.env[ENV_VAR] === "development", isProductionRuntime = () => process.env[ENV_VAR] === "production";
|
|
6672
6672
|
|
|
6673
6673
|
// src/angular/angularPatch.ts
|
|
6674
6674
|
var exports_angularPatch = {};
|
|
@@ -6760,7 +6760,14 @@ var ensureHead = (doc) => {
|
|
|
6760
6760
|
}
|
|
6761
6761
|
try {
|
|
6762
6762
|
const adapter = new \u{275}DominoAdapter;
|
|
6763
|
-
const
|
|
6763
|
+
const resolveSeedDoc = () => {
|
|
6764
|
+
if (typeof adapter.createHtmlDocument === "function")
|
|
6765
|
+
return adapter.createHtmlDocument();
|
|
6766
|
+
if (typeof adapter.getDefaultDocument === "function")
|
|
6767
|
+
return adapter.getDefaultDocument();
|
|
6768
|
+
return null;
|
|
6769
|
+
};
|
|
6770
|
+
const seedDoc = resolveSeedDoc();
|
|
6764
6771
|
if (seedDoc) {
|
|
6765
6772
|
patchElementLayout(seedDoc);
|
|
6766
6773
|
const probe = seedDoc.createElement("div");
|
|
@@ -7046,7 +7053,7 @@ __export(exports_islands, {
|
|
|
7046
7053
|
isAngularComponent: () => isAngularComponent,
|
|
7047
7054
|
getAngularIslandSelector: () => getAngularIslandSelector
|
|
7048
7055
|
});
|
|
7049
|
-
var angularIslandSelector = "abs-angular-island", isAngularComponent = (value) => typeof value === "function",
|
|
7056
|
+
var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_islandId) => angularIslandSelector, isAngularComponent = (value) => typeof value === "function", getSelectorFromRenderedIsland = (rootElement) => {
|
|
7050
7057
|
const firstChild = rootElement.firstElementChild;
|
|
7051
7058
|
if (!(firstChild instanceof HTMLElement)) {
|
|
7052
7059
|
return null;
|
|
@@ -7937,8 +7944,8 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
|
|
|
7937
7944
|
const compiledScript = hasScript ? compiler.compileScript(descriptor, {
|
|
7938
7945
|
fs: {
|
|
7939
7946
|
fileExists: existsSync6,
|
|
7940
|
-
|
|
7941
|
-
|
|
7947
|
+
realpath: realpathSync,
|
|
7948
|
+
readFile: (file) => existsSync6(file) ? readFileSync6(file, "utf-8") : undefined
|
|
7942
7949
|
},
|
|
7943
7950
|
id: componentId,
|
|
7944
7951
|
inlineTemplate: false
|
|
@@ -9004,6 +9011,12 @@ import { Elysia } from "elysia";
|
|
|
9004
9011
|
var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, PAGE_HANDLER_NAMES, pageHandlerWrappers, handlerSourceMentionsPageHelper = (handler) => {
|
|
9005
9012
|
const source = handler.toString();
|
|
9006
9013
|
return PAGE_HANDLER_NAMES.some((name) => source.includes(name));
|
|
9014
|
+
}, getOriginalPageHandlerSource = (handler) => {
|
|
9015
|
+
if (typeof handler !== "function")
|
|
9016
|
+
return;
|
|
9017
|
+
const fn2 = handler;
|
|
9018
|
+
const info = pageHandlerWrappers.get(fn2);
|
|
9019
|
+
return (info?.originalHandler ?? fn2).toString();
|
|
9007
9020
|
}, isPageHandler = (handler) => {
|
|
9008
9021
|
if (typeof handler !== "function")
|
|
9009
9022
|
return false;
|
|
@@ -9011,12 +9024,6 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
|
|
|
9011
9024
|
if (pageHandlerWrappers.has(fn2))
|
|
9012
9025
|
return true;
|
|
9013
9026
|
return handlerSourceMentionsPageHelper(fn2);
|
|
9014
|
-
}, getOriginalPageHandlerSource = (handler) => {
|
|
9015
|
-
if (typeof handler !== "function")
|
|
9016
|
-
return;
|
|
9017
|
-
const fn2 = handler;
|
|
9018
|
-
const info = pageHandlerWrappers.get(fn2);
|
|
9019
|
-
return (info?.originalHandler ?? fn2).toString();
|
|
9020
9027
|
}, isObjectRecord3 = (value) => Boolean(value) && typeof value === "object", isAsyncLocalStorage2 = (value) => isObjectRecord3(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function", isRouteMethod = (value) => typeof value === "function", getRouteCallsiteStorage = () => {
|
|
9021
9028
|
const value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);
|
|
9022
9029
|
if (value === null || typeof value === "undefined") {
|
|
@@ -10003,7 +10010,7 @@ var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((se
|
|
|
10003
10010
|
return null;
|
|
10004
10011
|
}, readPropertyKey = (property) => {
|
|
10005
10012
|
if (ts3.isPropertyAssignment(property)) {
|
|
10006
|
-
const name = property
|
|
10013
|
+
const { name } = property;
|
|
10007
10014
|
if (ts3.isIdentifier(name) || ts3.isStringLiteral(name))
|
|
10008
10015
|
return name.text;
|
|
10009
10016
|
}
|
|
@@ -10214,7 +10221,7 @@ var DYNAMIC_SEGMENT_PATTERN2, pathHasDynamic2 = (path) => path.split("/").some((
|
|
|
10214
10221
|
return null;
|
|
10215
10222
|
}, readPropertyKey2 = (property) => {
|
|
10216
10223
|
if (ts4.isPropertyAssignment(property)) {
|
|
10217
|
-
const name = property
|
|
10224
|
+
const { name } = property;
|
|
10218
10225
|
if (ts4.isIdentifier(name) || ts4.isStringLiteral(name))
|
|
10219
10226
|
return name.text;
|
|
10220
10227
|
}
|
|
@@ -10528,7 +10535,7 @@ var DYNAMIC_SEGMENT_PATTERN4, pathHasDynamic4 = (path) => path.split("/").some((
|
|
|
10528
10535
|
return null;
|
|
10529
10536
|
}, readPropertyKey3 = (property) => {
|
|
10530
10537
|
if (ts5.isPropertyAssignment(property)) {
|
|
10531
|
-
const name = property
|
|
10538
|
+
const { name } = property;
|
|
10532
10539
|
if (ts5.isIdentifier(name) || ts5.isStringLiteral(name))
|
|
10533
10540
|
return name.text;
|
|
10534
10541
|
}
|
|
@@ -11109,6 +11116,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
|
|
|
11109
11116
|
case "webp":
|
|
11110
11117
|
return pipeline.webp({ quality }).toBuffer();
|
|
11111
11118
|
}
|
|
11119
|
+
throw new Error(`Unsupported image format: ${format}`);
|
|
11112
11120
|
}, optimizeWithSharp = async (sharpRef, buffer, width, quality, format) => {
|
|
11113
11121
|
const pipeline = sharpRef(buffer).rotate().resize(width, undefined, { withoutEnlargement: true });
|
|
11114
11122
|
switch (format) {
|
|
@@ -11124,6 +11132,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
|
|
|
11124
11132
|
case "webp":
|
|
11125
11133
|
return pipeline.webp({ quality }).toBuffer();
|
|
11126
11134
|
}
|
|
11135
|
+
throw new Error(`Unsupported image format: ${format}`);
|
|
11127
11136
|
}, optimizeImage = async (buffer, width, quality, format) => {
|
|
11128
11137
|
const input = toBuffer(buffer);
|
|
11129
11138
|
try {
|
|
@@ -12018,7 +12027,7 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames =
|
|
|
12018
12027
|
const { generatedAngularRoot, userAngularRoot, projectRoot } = params;
|
|
12019
12028
|
const normalizedGenRoot = resolve19(generatedAngularRoot).replace(/\\/g, "/");
|
|
12020
12029
|
const normalizedPath = componentJsAbsPath.replace(/\\/g, "/");
|
|
12021
|
-
if (!normalizedPath.startsWith(normalizedGenRoot
|
|
12030
|
+
if (!normalizedPath.startsWith(`${normalizedGenRoot}/`))
|
|
12022
12031
|
return;
|
|
12023
12032
|
const seen = new Set;
|
|
12024
12033
|
const classNames = [];
|
|
@@ -12045,8 +12054,8 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames =
|
|
|
12045
12054
|
const depsBlock = classNames.length > 0 && depsKeys ? `
|
|
12046
12055
|
|
|
12047
12056
|
// absolutejs HMR \u2014 Tier 1a class-deps registry
|
|
12048
|
-
|
|
12049
|
-
`)
|
|
12057
|
+
${classNames.map((c) => `try { ${c}.__abs_deps = { ${depsKeys} }; } catch {}`).join(`
|
|
12058
|
+
`)}
|
|
12050
12059
|
` : "";
|
|
12051
12060
|
return jsSource + tail + depsBlock;
|
|
12052
12061
|
}, createAngularHmrInjectionPlugin = (params) => ({
|
|
@@ -12096,7 +12105,7 @@ __export(exports_generatedDir, {
|
|
|
12096
12105
|
getFrameworkGeneratedDir: () => getFrameworkGeneratedDir
|
|
12097
12106
|
});
|
|
12098
12107
|
import { join as join22 } from "path";
|
|
12099
|
-
var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs",
|
|
12108
|
+
var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs", getFrameworkGeneratedDir = (framework, projectRoot = process.cwd()) => join22(getGeneratedRoot(projectRoot), framework), getGeneratedRoot = (projectRoot = process.cwd()) => join22(projectRoot, ABSOLUTE_CACHE_DIR_NAME, GENERATED_DIR_NAME);
|
|
12100
12109
|
var init_generatedDir = () => {};
|
|
12101
12110
|
|
|
12102
12111
|
// src/utils/cleanup.ts
|
|
@@ -12210,7 +12219,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
|
|
|
12210
12219
|
process.kill(pid, 0);
|
|
12211
12220
|
return true;
|
|
12212
12221
|
} catch (err) {
|
|
12213
|
-
const code = err
|
|
12222
|
+
const { code } = err;
|
|
12214
12223
|
if (code === "ESRCH")
|
|
12215
12224
|
return false;
|
|
12216
12225
|
if (code === "EPERM")
|
|
@@ -16740,8 +16749,9 @@ var fail = (reason, detail, location) => ({
|
|
|
16740
16749
|
if (a.schemasSig !== b2.schemasSig)
|
|
16741
16750
|
return false;
|
|
16742
16751
|
return true;
|
|
16743
|
-
},
|
|
16744
|
-
fingerprintCache.
|
|
16752
|
+
}, invalidateFingerprintCache = () => {
|
|
16753
|
+
fingerprintCache.clear();
|
|
16754
|
+
entityFingerprintCache.clear();
|
|
16745
16755
|
}, primeComponentFingerprint = async (componentFilePath) => {
|
|
16746
16756
|
let source;
|
|
16747
16757
|
try {
|
|
@@ -16804,9 +16814,8 @@ var fail = (reason, detail, location) => ({
|
|
|
16804
16814
|
} catch {}
|
|
16805
16815
|
}
|
|
16806
16816
|
}
|
|
16807
|
-
},
|
|
16808
|
-
fingerprintCache.
|
|
16809
|
-
entityFingerprintCache.clear();
|
|
16817
|
+
}, recordFingerprint = (id, fp) => {
|
|
16818
|
+
fingerprintCache.set(id, fp);
|
|
16810
16819
|
}, entityFingerprintCache, entityFingerprintsEqual = (a, b2) => {
|
|
16811
16820
|
if (a.className !== b2.className)
|
|
16812
16821
|
return false;
|
|
@@ -16866,13 +16875,13 @@ var fail = (reason, detail, location) => ({
|
|
|
16866
16875
|
break;
|
|
16867
16876
|
}
|
|
16868
16877
|
return {
|
|
16878
|
+
arrowFieldSig: extractArrowFieldSig(cls),
|
|
16869
16879
|
className,
|
|
16870
|
-
decoratorArgsText,
|
|
16871
16880
|
ctorParamTypes,
|
|
16872
|
-
|
|
16881
|
+
decoratorArgsText,
|
|
16873
16882
|
memberDecoratorSig: extractMemberDecoratorSig(cls),
|
|
16874
|
-
|
|
16875
|
-
|
|
16883
|
+
propertyFieldNames: extractPropertyFieldNames(cls),
|
|
16884
|
+
topLevelImports: extractTopLevelImports(sourceFile)
|
|
16876
16885
|
};
|
|
16877
16886
|
}, findClassDeclaration = (sourceFile, className) => {
|
|
16878
16887
|
let found = null;
|
|
@@ -17017,7 +17026,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17017
17026
|
continue;
|
|
17018
17027
|
if (member.modifiers?.some((m) => m.kind === ts15.SyntaxKind.StaticKeyword))
|
|
17019
17028
|
continue;
|
|
17020
|
-
const name = member
|
|
17029
|
+
const { name } = member;
|
|
17021
17030
|
if (name === undefined)
|
|
17022
17031
|
continue;
|
|
17023
17032
|
const nameText = ts15.isIdentifier(name) ? name.text : name.getText();
|
|
@@ -17136,10 +17145,10 @@ var fail = (reason, detail, location) => ({
|
|
|
17136
17145
|
return {
|
|
17137
17146
|
classPropertyName,
|
|
17138
17147
|
meta: {
|
|
17139
|
-
classPropertyName,
|
|
17140
17148
|
bindingPropertyName,
|
|
17141
|
-
|
|
17149
|
+
classPropertyName,
|
|
17142
17150
|
isSignal: false,
|
|
17151
|
+
required,
|
|
17143
17152
|
transformFunction
|
|
17144
17153
|
}
|
|
17145
17154
|
};
|
|
@@ -17179,10 +17188,10 @@ var fail = (reason, detail, location) => ({
|
|
|
17179
17188
|
return {
|
|
17180
17189
|
classPropertyName,
|
|
17181
17190
|
meta: {
|
|
17182
|
-
classPropertyName,
|
|
17183
17191
|
bindingPropertyName,
|
|
17184
|
-
|
|
17192
|
+
classPropertyName,
|
|
17185
17193
|
isSignal: true,
|
|
17194
|
+
required,
|
|
17186
17195
|
transformFunction
|
|
17187
17196
|
}
|
|
17188
17197
|
};
|
|
@@ -17200,7 +17209,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17200
17209
|
const arg = expr.arguments[0];
|
|
17201
17210
|
if (arg && ts15.isStringLiteral(arg))
|
|
17202
17211
|
bindingName = arg.text;
|
|
17203
|
-
return {
|
|
17212
|
+
return { bindingName, classPropertyName };
|
|
17204
17213
|
}
|
|
17205
17214
|
return null;
|
|
17206
17215
|
}, isOutputSignalCall = (init) => {
|
|
@@ -17225,7 +17234,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17225
17234
|
if (aliasNode !== null)
|
|
17226
17235
|
bindingName = aliasNode;
|
|
17227
17236
|
}
|
|
17228
|
-
return {
|
|
17237
|
+
return { bindingName, classPropertyName };
|
|
17229
17238
|
}, extractInputsAndOutputs = (cls, compiler) => {
|
|
17230
17239
|
const inputs = {};
|
|
17231
17240
|
const outputs = {};
|
|
@@ -17258,7 +17267,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17258
17267
|
hasSignalIO = true;
|
|
17259
17268
|
}
|
|
17260
17269
|
}
|
|
17261
|
-
return {
|
|
17270
|
+
return { hasDecoratorIO, hasSignalIO, inputs, outputs };
|
|
17262
17271
|
}, ATTR_BINDING_RE, EVENT_BINDING_RE, emptyHost = () => ({
|
|
17263
17272
|
attributes: {},
|
|
17264
17273
|
listeners: {},
|
|
@@ -17323,7 +17332,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17323
17332
|
continue;
|
|
17324
17333
|
const event = eventArg.text;
|
|
17325
17334
|
const argsArg = expr.arguments[1];
|
|
17326
|
-
|
|
17335
|
+
const argsList = [];
|
|
17327
17336
|
if (argsArg && ts15.isArrayLiteralExpression(argsArg)) {
|
|
17328
17337
|
for (const el of argsArg.elements) {
|
|
17329
17338
|
if (ts15.isStringLiteral(el))
|
|
@@ -17344,7 +17353,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17344
17353
|
descendants = getBooleanProperty(opts, "descendants") ?? true;
|
|
17345
17354
|
emitDistinctChangesOnly = getBooleanProperty(opts, "emitDistinctChangesOnly") ?? true;
|
|
17346
17355
|
}
|
|
17347
|
-
return {
|
|
17356
|
+
return { descendants, emitDistinctChangesOnly, static_ };
|
|
17348
17357
|
}, queryPredicateFromArg = (arg, compiler) => {
|
|
17349
17358
|
if (ts15.isStringLiteral(arg)) {
|
|
17350
17359
|
return arg.text.split(",").map((s2) => s2.trim()).filter(Boolean);
|
|
@@ -17384,14 +17393,14 @@ var fail = (reason, detail, location) => ({
|
|
|
17384
17393
|
}
|
|
17385
17394
|
}
|
|
17386
17395
|
const meta = {
|
|
17387
|
-
propertyName,
|
|
17388
|
-
first: fn2.text === "ViewChild" || fn2.text === "ContentChild",
|
|
17389
|
-
predicate,
|
|
17390
17396
|
descendants,
|
|
17391
17397
|
emitDistinctChangesOnly,
|
|
17398
|
+
first: fn2.text === "ViewChild" || fn2.text === "ContentChild",
|
|
17399
|
+
isSignal: false,
|
|
17400
|
+
predicate,
|
|
17401
|
+
propertyName,
|
|
17392
17402
|
read,
|
|
17393
|
-
static: static_
|
|
17394
|
-
isSignal: false
|
|
17403
|
+
static: static_
|
|
17395
17404
|
};
|
|
17396
17405
|
if (fn2.text === "ViewChild" || fn2.text === "ViewChildren") {
|
|
17397
17406
|
viewQueries.push(meta);
|
|
@@ -17407,7 +17416,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17407
17416
|
for (const member of cls.members) {
|
|
17408
17417
|
if (!ts15.isPropertyDeclaration(member) || !member.initializer)
|
|
17409
17418
|
continue;
|
|
17410
|
-
|
|
17419
|
+
const init = member.initializer;
|
|
17411
17420
|
if (!ts15.isCallExpression(init))
|
|
17412
17421
|
continue;
|
|
17413
17422
|
let queryName;
|
|
@@ -17438,14 +17447,14 @@ var fail = (reason, detail, location) => ({
|
|
|
17438
17447
|
read = new compiler.WrappedNodeExpr(readNode);
|
|
17439
17448
|
}
|
|
17440
17449
|
const meta = {
|
|
17441
|
-
propertyName,
|
|
17442
|
-
first: runtime.first,
|
|
17443
|
-
predicate,
|
|
17444
17450
|
descendants,
|
|
17445
17451
|
emitDistinctChangesOnly: true,
|
|
17452
|
+
first: runtime.first,
|
|
17453
|
+
isSignal: true,
|
|
17454
|
+
predicate,
|
|
17455
|
+
propertyName,
|
|
17446
17456
|
read,
|
|
17447
|
-
static: false
|
|
17448
|
-
isSignal: true
|
|
17457
|
+
static: false
|
|
17449
17458
|
};
|
|
17450
17459
|
if (runtime.isView)
|
|
17451
17460
|
viewQueries.push(meta);
|
|
@@ -17478,11 +17487,11 @@ var fail = (reason, detail, location) => ({
|
|
|
17478
17487
|
if (ts15.isIdentifier(el)) {
|
|
17479
17488
|
out.push({
|
|
17480
17489
|
directive: {
|
|
17481
|
-
|
|
17482
|
-
|
|
17490
|
+
type: new compiler.WrappedNodeExpr(el),
|
|
17491
|
+
value: new compiler.WrappedNodeExpr(el)
|
|
17483
17492
|
},
|
|
17484
|
-
isForwardReference: false,
|
|
17485
17493
|
inputs: null,
|
|
17494
|
+
isForwardReference: false,
|
|
17486
17495
|
outputs: null
|
|
17487
17496
|
});
|
|
17488
17497
|
continue;
|
|
@@ -17509,11 +17518,11 @@ var fail = (reason, detail, location) => ({
|
|
|
17509
17518
|
};
|
|
17510
17519
|
out.push({
|
|
17511
17520
|
directive: {
|
|
17512
|
-
|
|
17513
|
-
|
|
17521
|
+
type: new compiler.WrappedNodeExpr(directiveNode),
|
|
17522
|
+
value: new compiler.WrappedNodeExpr(directiveNode)
|
|
17514
17523
|
},
|
|
17515
|
-
isForwardReference: false,
|
|
17516
17524
|
inputs: collectMap(inputsNode),
|
|
17525
|
+
isForwardReference: false,
|
|
17517
17526
|
outputs: collectMap(outputsNode)
|
|
17518
17527
|
});
|
|
17519
17528
|
}
|
|
@@ -17539,14 +17548,14 @@ var fail = (reason, detail, location) => ({
|
|
|
17539
17548
|
const animationsNode = getProperty(decoratorArgs, "animations");
|
|
17540
17549
|
const animations = animationsNode ? new compiler.WrappedNodeExpr(animationsNode) : null;
|
|
17541
17550
|
return {
|
|
17542
|
-
|
|
17551
|
+
animations,
|
|
17543
17552
|
contentQueries,
|
|
17544
|
-
viewQueries,
|
|
17545
17553
|
exportAs: extractExportAs(decoratorArgs),
|
|
17554
|
+
host,
|
|
17555
|
+
hostDirectives: extractHostDirectives(decoratorArgs, compiler),
|
|
17546
17556
|
providers,
|
|
17547
17557
|
viewProviders,
|
|
17548
|
-
|
|
17549
|
-
hostDirectives: extractHostDirectives(decoratorArgs, compiler)
|
|
17558
|
+
viewQueries
|
|
17550
17559
|
};
|
|
17551
17560
|
}, childComponentInfoCache, getChildComponentInfoFromTsSource = (filePath, className) => {
|
|
17552
17561
|
const cacheKey2 = `ts:${filePath}:${className}`;
|
|
@@ -17994,7 +18003,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17994
18003
|
const spec = moduleSpec.text;
|
|
17995
18004
|
if (!spec.startsWith(".") && !spec.startsWith("/"))
|
|
17996
18005
|
continue;
|
|
17997
|
-
const importClause = stmt
|
|
18006
|
+
const { importClause } = stmt;
|
|
17998
18007
|
if (!importClause)
|
|
17999
18008
|
continue;
|
|
18000
18009
|
let matches = false;
|
|
@@ -18055,7 +18064,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18055
18064
|
if (!ts15.isPropertyDeclaration(member) && !ts15.isMethodDeclaration(member) && !ts15.isGetAccessorDeclaration(member) && !ts15.isSetAccessorDeclaration(member)) {
|
|
18056
18065
|
continue;
|
|
18057
18066
|
}
|
|
18058
|
-
const name = member
|
|
18067
|
+
const { name } = member;
|
|
18059
18068
|
if (name === undefined)
|
|
18060
18069
|
continue;
|
|
18061
18070
|
const text = ts15.isIdentifier(name) ? name.text : ts15.isStringLiteral(name) || ts15.isNoSubstitutionTemplateLiteral(name) ? name.text : name.getText();
|
|
@@ -18278,10 +18287,10 @@ ${transpiled}
|
|
|
18278
18287
|
for (const url of urls) {
|
|
18279
18288
|
const css = resolveAndReadStyleResource(componentDir, url);
|
|
18280
18289
|
if (css === null)
|
|
18281
|
-
return {
|
|
18290
|
+
return { missing: url, styles };
|
|
18282
18291
|
styles.push(css);
|
|
18283
18292
|
}
|
|
18284
|
-
return {
|
|
18293
|
+
return { missing: null, styles };
|
|
18285
18294
|
}, buildSimpleEntityModule = (classNode, className) => {
|
|
18286
18295
|
const block = buildFreshClassMethodsBlock(classNode, className);
|
|
18287
18296
|
if (!block) {
|
|
@@ -18415,9 +18424,9 @@ ${block}
|
|
|
18415
18424
|
const lineTextValue = typeof lineIndex === "number" && lineIndex >= 0 ? templateText.split(/\r?\n/)[lineIndex] ?? undefined : undefined;
|
|
18416
18425
|
return fail("template-parse-error", parsed.errors.map((e) => e.toString()).join(`
|
|
18417
18426
|
`), {
|
|
18427
|
+
column: typeof colIndex === "number" ? colIndex + 1 : undefined,
|
|
18418
18428
|
file: templatePath,
|
|
18419
18429
|
line: typeof lineIndex === "number" ? lineIndex + 1 : undefined,
|
|
18420
|
-
column: typeof colIndex === "number" ? colIndex + 1 : undefined,
|
|
18421
18430
|
lineText: lineTextValue
|
|
18422
18431
|
});
|
|
18423
18432
|
}
|
|
@@ -18445,44 +18454,44 @@ ${block}
|
|
|
18445
18454
|
type: new compiler.WrappedNodeExpr(entry.identifier)
|
|
18446
18455
|
}));
|
|
18447
18456
|
const meta = {
|
|
18448
|
-
|
|
18449
|
-
|
|
18450
|
-
|
|
18451
|
-
|
|
18457
|
+
animations: advancedMetadata.animations,
|
|
18458
|
+
changeDetection: decoratorMeta.changeDetection,
|
|
18459
|
+
controlCreate: extractControlCreate(classNode),
|
|
18460
|
+
declarationListEmitMode: declarations.length > 0 ? 1 : 0,
|
|
18461
|
+
declarations,
|
|
18462
|
+
defer: { dependenciesFn: null, mode: 1 },
|
|
18452
18463
|
deps: null,
|
|
18453
|
-
|
|
18454
|
-
|
|
18455
|
-
|
|
18464
|
+
encapsulation: decoratorMeta.encapsulation,
|
|
18465
|
+
exportAs: advancedMetadata.exportAs,
|
|
18466
|
+
hasDirectiveDependencies: declarations.length > 0,
|
|
18456
18467
|
host: advancedMetadata.host,
|
|
18468
|
+
hostDirectives: advancedMetadata.hostDirectives,
|
|
18469
|
+
i18nUseExternalIds: projectDefaults.i18nUseExternalIds ?? false,
|
|
18470
|
+
inputs,
|
|
18471
|
+
isSignal: (hasSignalIO || advancedMetadata.contentQueries.some((q2) => q2.isSignal) || advancedMetadata.viewQueries.some((q2) => q2.isSignal)) && !hasDecoratorIO && !advancedMetadata.contentQueries.some((q2) => !q2.isSignal) && !advancedMetadata.viewQueries.some((q2) => !q2.isSignal),
|
|
18472
|
+
isStandalone: decoratorMeta.standalone,
|
|
18457
18473
|
lifecycle: {
|
|
18458
18474
|
usesOnChanges: classNode.members.some((m) => ts15.isMethodDeclaration(m) && m.name !== undefined && ts15.isIdentifier(m.name) && m.name.text === "ngOnChanges")
|
|
18459
18475
|
},
|
|
18460
|
-
|
|
18476
|
+
name: className,
|
|
18461
18477
|
outputs,
|
|
18462
|
-
usesInheritance: false,
|
|
18463
|
-
controlCreate: extractControlCreate(classNode),
|
|
18464
|
-
exportAs: advancedMetadata.exportAs,
|
|
18465
18478
|
providers: advancedMetadata.providers,
|
|
18466
|
-
|
|
18467
|
-
|
|
18468
|
-
|
|
18479
|
+
queries: advancedMetadata.contentQueries,
|
|
18480
|
+
relativeContextFilePath: projectRelPath,
|
|
18481
|
+
relativeTemplatePath: null,
|
|
18482
|
+
selector: decoratorMeta.selector,
|
|
18483
|
+
styles,
|
|
18469
18484
|
template: {
|
|
18470
|
-
nodes: parsed.nodes,
|
|
18471
18485
|
ngContentSelectors: parsed.ngContentSelectors ?? [],
|
|
18486
|
+
nodes: parsed.nodes,
|
|
18472
18487
|
preserveWhitespaces: decoratorMeta.preserveWhitespaces
|
|
18473
18488
|
},
|
|
18474
|
-
|
|
18475
|
-
|
|
18476
|
-
|
|
18477
|
-
|
|
18478
|
-
encapsulation: decoratorMeta.encapsulation,
|
|
18479
|
-
animations: advancedMetadata.animations,
|
|
18489
|
+
type: { type: wrappedClass, value: wrappedClass },
|
|
18490
|
+
typeArgumentCount: 0,
|
|
18491
|
+
typeSourceSpan,
|
|
18492
|
+
usesInheritance: false,
|
|
18480
18493
|
viewProviders: advancedMetadata.viewProviders,
|
|
18481
|
-
|
|
18482
|
-
i18nUseExternalIds: projectDefaults.i18nUseExternalIds ?? false,
|
|
18483
|
-
changeDetection: decoratorMeta.changeDetection,
|
|
18484
|
-
relativeTemplatePath: null,
|
|
18485
|
-
hasDirectiveDependencies: declarations.length > 0
|
|
18494
|
+
viewQueries: advancedMetadata.viewQueries
|
|
18486
18495
|
};
|
|
18487
18496
|
let compiled;
|
|
18488
18497
|
try {
|
|
@@ -18490,20 +18499,20 @@ ${block}
|
|
|
18490
18499
|
const bindingParser = compiler.makeBindingParser();
|
|
18491
18500
|
compiled = compiler.compileComponentFromMetadata(meta, pool, bindingParser);
|
|
18492
18501
|
const namespaceDependencies = [
|
|
18493
|
-
{
|
|
18502
|
+
{ assignedName: "\u0275hmr0", moduleName: "@angular/core" }
|
|
18494
18503
|
];
|
|
18495
18504
|
const callback = compiler.compileHmrUpdateCallback([
|
|
18496
18505
|
{
|
|
18497
|
-
name: "\u0275cmp",
|
|
18498
18506
|
initializer: compiled.expression,
|
|
18507
|
+
name: "\u0275cmp",
|
|
18499
18508
|
statements: compiled.statements ?? []
|
|
18500
18509
|
}
|
|
18501
18510
|
], pool.statements, {
|
|
18502
|
-
type: wrappedClass,
|
|
18503
18511
|
className,
|
|
18504
18512
|
filePath: projectRelPath,
|
|
18513
|
+
localDependencies: [],
|
|
18505
18514
|
namespaceDependencies,
|
|
18506
|
-
|
|
18515
|
+
type: wrappedClass
|
|
18507
18516
|
});
|
|
18508
18517
|
const namespaceMap = new Map;
|
|
18509
18518
|
for (const dep of namespaceDependencies) {
|
|
@@ -18606,7 +18615,7 @@ ${block}
|
|
|
18606
18615
|
if (fnOpeningIdx >= 0 && (methodsBlock || depsDestructure)) {
|
|
18607
18616
|
const insertAt = fnOpeningIdx + fnOpening.length;
|
|
18608
18617
|
moduleText = moduleText.slice(0, insertAt) + depsDestructure + (methodsBlock ? `
|
|
18609
|
-
|
|
18618
|
+
${methodsBlock}
|
|
18610
18619
|
` : "") + moduleText.slice(insertAt);
|
|
18611
18620
|
}
|
|
18612
18621
|
if (methodsBlock) {
|
|
@@ -18674,10 +18683,10 @@ var init_fastHmrCompiler = __esm(() => {
|
|
|
18674
18683
|
"ContentChildren"
|
|
18675
18684
|
]);
|
|
18676
18685
|
SIGNAL_QUERY_TO_RUNTIME = {
|
|
18677
|
-
|
|
18678
|
-
|
|
18679
|
-
|
|
18680
|
-
|
|
18686
|
+
contentChild: { first: true, isView: false },
|
|
18687
|
+
contentChildren: { first: false, isView: false },
|
|
18688
|
+
viewChild: { first: true, isView: true },
|
|
18689
|
+
viewChildren: { first: false, isView: true }
|
|
18681
18690
|
};
|
|
18682
18691
|
childComponentInfoCache = new Map;
|
|
18683
18692
|
INPUT_OUTPUT_DECORATORS = new Set(["Input", "Output"]);
|
|
@@ -20262,7 +20271,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
20262
20271
|
};
|
|
20263
20272
|
const tracePhase = async (name, fn2, metadata2) => {
|
|
20264
20273
|
if (!traceEnabled)
|
|
20265
|
-
return
|
|
20274
|
+
return fn2();
|
|
20266
20275
|
const phaseStart = performance.now();
|
|
20267
20276
|
try {
|
|
20268
20277
|
const result = await fn2();
|
|
@@ -21538,7 +21547,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
21538
21547
|
}, build2 = async (config) => {
|
|
21539
21548
|
const projectRoot = cwd();
|
|
21540
21549
|
const buildPath = validateSafePath(config.buildDirectory ?? "build", projectRoot);
|
|
21541
|
-
return
|
|
21550
|
+
return withBuildDirectoryLock(buildPath, () => buildUnlocked(config));
|
|
21542
21551
|
};
|
|
21543
21552
|
var init_build = __esm(() => {
|
|
21544
21553
|
init_constants();
|
|
@@ -22242,7 +22251,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
|
|
|
22242
22251
|
for (const ref of refs) {
|
|
22243
22252
|
const refAbs = normalizePath(resolve31(componentDir, ref));
|
|
22244
22253
|
const refDir = normalizePath(dirname21(refAbs));
|
|
22245
|
-
if (refDir === angularRootNormalized || refDir.startsWith(angularRootNormalized
|
|
22254
|
+
if (refDir === angularRootNormalized || refDir.startsWith(`${angularRootNormalized}/`)) {
|
|
22246
22255
|
continue;
|
|
22247
22256
|
}
|
|
22248
22257
|
out.add(refDir);
|
|
@@ -22831,7 +22840,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
|
|
|
22831
22840
|
for (const prop of obj.properties) {
|
|
22832
22841
|
if (!ts16.isPropertyAssignment(prop))
|
|
22833
22842
|
continue;
|
|
22834
|
-
const propName = ts16.isIdentifier(prop.name)
|
|
22843
|
+
const propName = ts16.isIdentifier(prop.name) || ts16.isStringLiteral(prop.name) ? prop.name.text : null;
|
|
22835
22844
|
if (propName !== name)
|
|
22836
22845
|
continue;
|
|
22837
22846
|
const init = prop.initializer;
|
|
@@ -22845,7 +22854,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
|
|
|
22845
22854
|
for (const prop of obj.properties) {
|
|
22846
22855
|
if (!ts16.isPropertyAssignment(prop))
|
|
22847
22856
|
continue;
|
|
22848
|
-
const propName = ts16.isIdentifier(prop.name)
|
|
22857
|
+
const propName = ts16.isIdentifier(prop.name) || ts16.isStringLiteral(prop.name) ? prop.name.text : null;
|
|
22849
22858
|
if (propName !== name)
|
|
22850
22859
|
continue;
|
|
22851
22860
|
const init = prop.initializer;
|
|
@@ -22892,10 +22901,10 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
|
|
|
22892
22901
|
}
|
|
22893
22902
|
const entry = {
|
|
22894
22903
|
className: node.name.text,
|
|
22904
|
+
extendsName,
|
|
22895
22905
|
kind,
|
|
22896
22906
|
styleUrls: [],
|
|
22897
|
-
templateUrls: []
|
|
22898
|
-
extendsName
|
|
22907
|
+
templateUrls: []
|
|
22899
22908
|
};
|
|
22900
22909
|
const arg = expr.arguments[0];
|
|
22901
22910
|
if (arg && ts16.isObjectLiteralExpression(arg) && kind === "component") {
|
|
@@ -23045,7 +23054,9 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
|
|
|
23045
23054
|
const bundle = { parentFile, resource };
|
|
23046
23055
|
indexByRoot.set(userAngularRoot, bundle);
|
|
23047
23056
|
return bundle;
|
|
23048
|
-
}, getOrBuildResourceIndex = (userAngularRoot) => getOrBuildIndexes(userAngularRoot).resource,
|
|
23057
|
+
}, getOrBuildResourceIndex = (userAngularRoot) => getOrBuildIndexes(userAngularRoot).resource, invalidateResourceIndex = () => {
|
|
23058
|
+
indexByRoot.clear();
|
|
23059
|
+
}, resolveDescendantsOfParent = (params) => {
|
|
23049
23060
|
const norm = safeNormalize(params.changedFilePath);
|
|
23050
23061
|
let rootStat;
|
|
23051
23062
|
try {
|
|
@@ -23057,15 +23068,13 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
|
|
|
23057
23068
|
return [];
|
|
23058
23069
|
const bundle = getOrBuildIndexes(params.userAngularRoot);
|
|
23059
23070
|
return bundle.parentFile.get(norm) ?? [];
|
|
23060
|
-
}, invalidateResourceIndex = () => {
|
|
23061
|
-
indexByRoot.clear();
|
|
23062
23071
|
};
|
|
23063
23072
|
var init_resolveOwningComponents = __esm(() => {
|
|
23064
23073
|
ENTITY_DECORATORS = {
|
|
23065
23074
|
Component: "component",
|
|
23066
23075
|
Directive: "directive",
|
|
23067
|
-
|
|
23068
|
-
|
|
23076
|
+
Injectable: "service",
|
|
23077
|
+
Pipe: "pipe"
|
|
23069
23078
|
};
|
|
23070
23079
|
indexByRoot = new Map;
|
|
23071
23080
|
});
|
|
@@ -23090,9 +23099,7 @@ var trySendMessage = (client2, messageStr) => {
|
|
|
23090
23099
|
...message,
|
|
23091
23100
|
timestamp: Date.now()
|
|
23092
23101
|
});
|
|
23093
|
-
const shouldRemove = (client2) =>
|
|
23094
|
-
return !trySendMessage(client2, messageStr);
|
|
23095
|
-
};
|
|
23102
|
+
const shouldRemove = (client2) => !trySendMessage(client2, messageStr);
|
|
23096
23103
|
const clientsToRemove = [];
|
|
23097
23104
|
state.connectedClients.forEach((client2) => {
|
|
23098
23105
|
if (shouldRemove(client2))
|
|
@@ -23573,8 +23580,8 @@ ${code}`;
|
|
|
23573
23580
|
compilerOptions: {
|
|
23574
23581
|
bindingMetadata: compiledScript.bindings,
|
|
23575
23582
|
expressionPlugins: ["typescript"],
|
|
23576
|
-
|
|
23577
|
-
|
|
23583
|
+
prefixIdentifiers: true,
|
|
23584
|
+
isCustomElement: (tag) => tag === "absolute-island"
|
|
23578
23585
|
},
|
|
23579
23586
|
filename: filePath,
|
|
23580
23587
|
id: componentId,
|
|
@@ -23630,8 +23637,8 @@ ${code}`;
|
|
|
23630
23637
|
const compiledScript = hasScript ? vueCompiler.compileScript(descriptor, {
|
|
23631
23638
|
fs: {
|
|
23632
23639
|
fileExists: existsSync33,
|
|
23633
|
-
|
|
23634
|
-
|
|
23640
|
+
realpath: realpathSync3,
|
|
23641
|
+
readFile: (file5) => existsSync33(file5) ? readFileSync28(file5, "utf-8") : undefined
|
|
23635
23642
|
},
|
|
23636
23643
|
id: componentId,
|
|
23637
23644
|
inlineTemplate: false
|
|
@@ -23842,9 +23849,9 @@ export default {};
|
|
|
23842
23849
|
const { getFrameworkGeneratedDir: getFrameworkGeneratedDir2 } = await Promise.resolve().then(() => (init_generatedDir(), exports_generatedDir));
|
|
23843
23850
|
const generatedAngularRoot = getFrameworkGeneratedDir2("angular").replace(/\\/g, "/");
|
|
23844
23851
|
const normalized = filePath.replace(/\\/g, "/");
|
|
23845
|
-
if (normalized.startsWith(generatedAngularRoot
|
|
23852
|
+
if (normalized.startsWith(`${generatedAngularRoot}/`) || normalized.startsWith(generatedAngularRoot)) {
|
|
23846
23853
|
const tail = normalized.slice(generatedAngularRoot.length + 1);
|
|
23847
|
-
const absoluteCandidate =
|
|
23854
|
+
const absoluteCandidate = `/${tail.replace(/^\/+/, "")}`;
|
|
23848
23855
|
const candidates = [
|
|
23849
23856
|
absoluteCandidate,
|
|
23850
23857
|
resolve37(projectRoot, tail)
|
|
@@ -24122,7 +24129,10 @@ __export(exports_hmrCompiler, {
|
|
|
24122
24129
|
});
|
|
24123
24130
|
import { dirname as dirname25, relative as relative16, resolve as resolve38 } from "path";
|
|
24124
24131
|
import { performance as performance2 } from "perf_hooks";
|
|
24125
|
-
var
|
|
24132
|
+
var encodeHmrComponentId = (absoluteFilePath, className) => {
|
|
24133
|
+
const projectRel = relative16(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
|
|
24134
|
+
return `${projectRel}@${className}`;
|
|
24135
|
+
}, getApplyMetadataModule = async (encodedId) => {
|
|
24126
24136
|
const decoded = decodeURIComponent(encodedId);
|
|
24127
24137
|
const at2 = decoded.lastIndexOf("@");
|
|
24128
24138
|
if (at2 === -1)
|
|
@@ -24151,9 +24161,6 @@ var getApplyMetadataModule = async (encodedId) => {
|
|
|
24151
24161
|
return fast.moduleText;
|
|
24152
24162
|
}
|
|
24153
24163
|
return null;
|
|
24154
|
-
}, encodeHmrComponentId = (absoluteFilePath, className) => {
|
|
24155
|
-
const projectRel = relative16(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
|
|
24156
|
-
return `${projectRel}@${className}`;
|
|
24157
24164
|
};
|
|
24158
24165
|
var init_hmrCompiler = __esm(() => {
|
|
24159
24166
|
init_logger();
|
|
@@ -24248,7 +24255,7 @@ var resolveRequestPathname = (request) => {
|
|
|
24248
24255
|
}, buildHtmlShell = (headTag, bodyContent, indexPath, props) => {
|
|
24249
24256
|
const propsScript = `window.__INITIAL_PROPS__=${JSON.stringify(props ?? {})};`;
|
|
24250
24257
|
const indexImport = indexPath ? `<script type="module" src="${indexPath}"></script>` : "";
|
|
24251
|
-
return `<!DOCTYPE html><html>${headTag}<body>` + `<div id="ember-root">${bodyContent}</div>` + `<script>${propsScript}</script
|
|
24258
|
+
return `<!DOCTYPE html><html>${headTag}<body>` + `<div id="ember-root">${bodyContent}</div>` + `<script>${propsScript}</script>${indexImport}</body></html>`;
|
|
24252
24259
|
}, handleEmberPageRequest = async (input) => {
|
|
24253
24260
|
const { indexPath, pagePath, headTag } = input;
|
|
24254
24261
|
const userProps = input.props;
|
|
@@ -24448,7 +24455,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
24448
24455
|
}
|
|
24449
24456
|
return { ...parsed, framework: detectedFw };
|
|
24450
24457
|
}, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync34(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
|
|
24451
|
-
const config = state
|
|
24458
|
+
const { config } = state;
|
|
24452
24459
|
const cwd2 = process.cwd();
|
|
24453
24460
|
const absDeleted = resolve41(deletedFile).replace(/\\/g, "/");
|
|
24454
24461
|
for (const { configKey, framework } of FRAMEWORK_DIR_KEYS_FOR_CLEANUP) {
|
|
@@ -24619,7 +24626,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
24619
24626
|
}
|
|
24620
24627
|
enqueueAngularOwningComponentForStyle(state, changedStylePath);
|
|
24621
24628
|
}, enqueueAngularOwningComponentForStyle = (state, changedStylePath) => {
|
|
24622
|
-
const angularDir = state.resolvedPaths
|
|
24629
|
+
const { angularDir } = state.resolvedPaths;
|
|
24623
24630
|
if (!angularDir)
|
|
24624
24631
|
return;
|
|
24625
24632
|
const visited = new Set;
|
|
@@ -24658,17 +24665,17 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
24658
24665
|
if (!hasFileChanged(filePath, currentHash, state.fileHashes)) {
|
|
24659
24666
|
return;
|
|
24660
24667
|
}
|
|
24661
|
-
const publicDir = state.resolvedPaths
|
|
24662
|
-
const assetsDir = state.resolvedPaths
|
|
24668
|
+
const { publicDir } = state.resolvedPaths;
|
|
24669
|
+
const { assetsDir } = state.resolvedPaths;
|
|
24663
24670
|
const handleStaticMirror = async (sourceDir, urlPrefix) => {
|
|
24664
24671
|
const absSource = resolve41(filePath);
|
|
24665
24672
|
const normalizedSource = absSource.replace(/\\/g, "/");
|
|
24666
24673
|
const normalizedDir = sourceDir.replace(/\\/g, "/");
|
|
24667
|
-
if (!normalizedSource.startsWith(normalizedDir
|
|
24674
|
+
if (!normalizedSource.startsWith(`${normalizedDir}/`))
|
|
24668
24675
|
return false;
|
|
24669
24676
|
try {
|
|
24670
24677
|
const relFromDir = normalizedSource.slice(normalizedDir.length + 1);
|
|
24671
|
-
const buildDir = state.resolvedPaths
|
|
24678
|
+
const { buildDir } = state.resolvedPaths;
|
|
24672
24679
|
const destPath = resolve41(buildDir, urlPrefix ? `${urlPrefix}/${relFromDir}` : relFromDir);
|
|
24673
24680
|
const { mkdir: mkdir8, copyFile, readFile: readFile6 } = await import("fs/promises");
|
|
24674
24681
|
const { dirname: dirname27 } = await import("path");
|
|
@@ -24698,7 +24705,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
24698
24705
|
invalidate(resolve41(filePath));
|
|
24699
24706
|
const relPath = relative17(process.cwd(), filePath);
|
|
24700
24707
|
logHmrUpdate(relPath);
|
|
24701
|
-
const angularDir = state.resolvedPaths
|
|
24708
|
+
const { angularDir } = state.resolvedPaths;
|
|
24702
24709
|
let hasAngularDependent = false;
|
|
24703
24710
|
if (angularDir && state.dependencyGraph) {
|
|
24704
24711
|
try {
|
|
@@ -24938,8 +24945,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
24938
24945
|
createStylePreprocessorPlugin(getStyleTransformConfig(state.config)),
|
|
24939
24946
|
createAngularHmrInjectionPlugin2({
|
|
24940
24947
|
generatedAngularRoot,
|
|
24941
|
-
|
|
24942
|
-
|
|
24948
|
+
projectRoot: process.cwd(),
|
|
24949
|
+
userAngularRoot
|
|
24943
24950
|
})
|
|
24944
24951
|
],
|
|
24945
24952
|
root: clientRoot,
|
|
@@ -25060,7 +25067,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
25060
25067
|
if (owners.length === 0 && (editedFile.endsWith(".ts") || editedFile.endsWith(".json")) && !editedFile.endsWith(".d.ts")) {
|
|
25061
25068
|
const normalized = editedFile.replace(/\\/g, "/");
|
|
25062
25069
|
const angularDirAbs = resolve41(angularDir).replace(/\\/g, "/");
|
|
25063
|
-
if (normalized.startsWith(angularDirAbs
|
|
25070
|
+
if (normalized.startsWith(`${angularDirAbs}/`)) {
|
|
25064
25071
|
return {
|
|
25065
25072
|
kind: "rebootstrap",
|
|
25066
25073
|
reason: `non-decorated angular file edited (${editedFile}) \u2014 consumers may hold stale resolved values`,
|
|
@@ -25113,9 +25120,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
25113
25120
|
}
|
|
25114
25121
|
}
|
|
25115
25122
|
const breakdown = {
|
|
25123
|
+
compileMs: Math.round(totalCompileMs),
|
|
25116
25124
|
importsMs: Math.round(importsMs),
|
|
25117
|
-
resolveMs: Math.round(totalResolveMs)
|
|
25118
|
-
compileMs: Math.round(totalCompileMs)
|
|
25125
|
+
resolveMs: Math.round(totalResolveMs)
|
|
25119
25126
|
};
|
|
25120
25127
|
if (rebootstrapClassName !== null) {
|
|
25121
25128
|
return {
|
|
@@ -28150,7 +28157,7 @@ import { dirname as dirname28, join as join49, resolve as resolve46 } from "path
|
|
|
28150
28157
|
var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP_PATTERNS2, isAtomicWriteTemp = (filename) => filename.endsWith(".tmp") || filename.includes(".tmp.") || filename.endsWith("~") || filename.startsWith(".#") || ATOMIC_WRITE_TEMP_PATTERNS2.some((re2) => re2.test(filename)), startServerEntryWatcher = () => {
|
|
28151
28158
|
if (globalThis.__absoluteEntryWatcherStarted)
|
|
28152
28159
|
return;
|
|
28153
|
-
const main = Bun
|
|
28160
|
+
const { main } = Bun;
|
|
28154
28161
|
if (!main || !existsSync39(main))
|
|
28155
28162
|
return;
|
|
28156
28163
|
globalThis.__absoluteEntryWatcherStarted = true;
|
|
@@ -28178,7 +28185,7 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP
|
|
|
28178
28185
|
if (hmrState2) {
|
|
28179
28186
|
const { broadcastToClients: broadcastToClients2 } = await Promise.resolve().then(() => (init_webSocket(), exports_webSocket));
|
|
28180
28187
|
broadcastToClients2(hmrState2, {
|
|
28181
|
-
data: {
|
|
28188
|
+
data: { cause, entryPath },
|
|
28182
28189
|
type: "server-entry-reloaded"
|
|
28183
28190
|
});
|
|
28184
28191
|
}
|
|
@@ -28274,7 +28281,6 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP
|
|
|
28274
28281
|
}
|
|
28275
28282
|
if (dir === configDir2 && filename === configBase) {
|
|
28276
28283
|
scheduleConfigChange(filename);
|
|
28277
|
-
return;
|
|
28278
28284
|
}
|
|
28279
28285
|
};
|
|
28280
28286
|
const entryWatcher = watch2(entryDir, { recursive: false }, (event, file5) => handleEvent(entryDir, event, file5));
|
|
@@ -28866,6 +28872,14 @@ var derivePageName = (pagePath) => {
|
|
|
28866
28872
|
return toPascal(name);
|
|
28867
28873
|
};
|
|
28868
28874
|
var normalizeConventionPageName = (name) => toPascal(name).replace(/\d+$/, "");
|
|
28875
|
+
var hasErrorConvention = (framework) => {
|
|
28876
|
+
const conventions2 = getMap()[framework];
|
|
28877
|
+
if (!conventions2)
|
|
28878
|
+
return false;
|
|
28879
|
+
if (conventions2.defaults?.error)
|
|
28880
|
+
return true;
|
|
28881
|
+
return Object.values(conventions2.pages ?? {}).some((page) => Boolean(page.error));
|
|
28882
|
+
};
|
|
28869
28883
|
var resolveErrorConventionPath = (framework, pageName) => {
|
|
28870
28884
|
const conventions2 = getMap()[framework];
|
|
28871
28885
|
if (!conventions2)
|
|
@@ -28882,14 +28896,6 @@ var resolveErrorConventionPath = (framework, pageName) => {
|
|
|
28882
28896
|
return conventions2.defaults?.error;
|
|
28883
28897
|
};
|
|
28884
28898
|
var resolveNotFoundConventionPath = (framework) => getMap()[framework]?.defaults?.notFound;
|
|
28885
|
-
var hasErrorConvention = (framework) => {
|
|
28886
|
-
const conventions2 = getMap()[framework];
|
|
28887
|
-
if (!conventions2)
|
|
28888
|
-
return false;
|
|
28889
|
-
if (conventions2.defaults?.error)
|
|
28890
|
-
return true;
|
|
28891
|
-
return Object.values(conventions2.pages ?? {}).some((page) => Boolean(page.error));
|
|
28892
|
-
};
|
|
28893
28899
|
var setConventions = (map) => {
|
|
28894
28900
|
Reflect.set(globalThis, CONVENTIONS_KEY, map);
|
|
28895
28901
|
};
|
|
@@ -28902,7 +28908,7 @@ var buildErrorProps = (error) => {
|
|
|
28902
28908
|
...isDev() && error.stack ? { stack: error.stack } : {}
|
|
28903
28909
|
};
|
|
28904
28910
|
}
|
|
28905
|
-
return {
|
|
28911
|
+
return { message: String(error), name: "Error" };
|
|
28906
28912
|
};
|
|
28907
28913
|
var renderReactError = async (conventionPath, errorProps) => {
|
|
28908
28914
|
const { createElement } = await import("react");
|
|
@@ -29744,8 +29750,8 @@ var networking = (app) => {
|
|
|
29744
29750
|
app.compile();
|
|
29745
29751
|
} catch {}
|
|
29746
29752
|
liveServer.reload({
|
|
29747
|
-
|
|
29748
|
-
|
|
29753
|
+
routes: {},
|
|
29754
|
+
fetch: (request) => app.fetch(request)
|
|
29749
29755
|
});
|
|
29750
29756
|
return app;
|
|
29751
29757
|
}
|
|
@@ -29807,6 +29813,7 @@ var defineConfig = (config) => config;
|
|
|
29807
29813
|
var defineRenderErrorPage = (fn2) => fn2;
|
|
29808
29814
|
var defineRenderNotFoundPage = (fn2) => fn2;
|
|
29809
29815
|
// src/utils/jsonLd.ts
|
|
29816
|
+
var jsonLd2 = (schema) => `<script type="application/ld+json">${serializeJsonLd(schema)}</script>`;
|
|
29810
29817
|
var serializeJsonLd = (schema) => {
|
|
29811
29818
|
const schemaOrgContext = "https://schema.org";
|
|
29812
29819
|
const data = Array.isArray(schema) ? schema.map((s2) => ({
|
|
@@ -29815,7 +29822,6 @@ var serializeJsonLd = (schema) => {
|
|
|
29815
29822
|
})) : { "@context": schemaOrgContext, ...schema };
|
|
29816
29823
|
return JSON.stringify(data);
|
|
29817
29824
|
};
|
|
29818
|
-
var jsonLd2 = (schema) => `<script type="application/ld+json">${serializeJsonLd(schema)}</script>`;
|
|
29819
29825
|
|
|
29820
29826
|
// src/utils/generateHeadElement.ts
|
|
29821
29827
|
var renderRobotsContent = (robots) => {
|
|
@@ -36286,5 +36292,5 @@ export {
|
|
|
36286
36292
|
ANGULAR_INIT_TIMEOUT_MS
|
|
36287
36293
|
};
|
|
36288
36294
|
|
|
36289
|
-
//# debugId=
|
|
36295
|
+
//# debugId=1B2D51012874D95D64756E2164756E21
|
|
36290
36296
|
//# sourceMappingURL=index.js.map
|