@absolutejs/absolute 0.19.0-beta.939 → 0.19.0-beta.940
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/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/build.js +76 -9
- package/dist/build.js.map +6 -6
- package/dist/index.js +76 -9
- package/dist/index.js.map +6 -6
- package/dist/src/dev/angular/fastHmrCompiler.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-kZ3iUZ/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-kZ3iUZ/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
48
48
|
getWarningController()?.maybeWarn(primitiveName);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// .angular-partial-tmp-
|
|
51
|
+
// .angular-partial-tmp-kZ3iUZ/src/core/streamingSlotRegistry.ts
|
|
52
52
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
53
53
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
54
54
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
package/dist/build.js
CHANGED
|
@@ -9957,7 +9957,7 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames =
|
|
|
9957
9957
|
}, createAngularHmrInjectionPlugin = (params) => ({
|
|
9958
9958
|
name: "absolute-angular-hmr-injection",
|
|
9959
9959
|
setup(build) {
|
|
9960
|
-
build.onLoad({ filter: /\.
|
|
9960
|
+
build.onLoad({ filter: /\.js$/ }, async (args) => {
|
|
9961
9961
|
const text = await readFile5(args.path, "utf8");
|
|
9962
9962
|
const transformed = applyAngularHmrInjection(text, args.path, params);
|
|
9963
9963
|
if (transformed === undefined)
|
|
@@ -17709,8 +17709,8 @@ export default {};
|
|
|
17709
17709
|
const stat3 = statSync2(filePath);
|
|
17710
17710
|
const resolvedVueDir = vueDir ? resolve31(vueDir) : undefined;
|
|
17711
17711
|
let content = REACT_EXTENSIONS.has(ext) ? transformReactFile(filePath, projectRoot, rewriter) : transformPlainFile(filePath, projectRoot, rewriter, resolvedVueDir);
|
|
17712
|
-
const
|
|
17713
|
-
if (
|
|
17712
|
+
const isAngularGeneratedJs = ext === ".js" && filePath.replace(/\\/g, "/").includes("/.absolutejs/generated/angular/");
|
|
17713
|
+
if (isAngularGeneratedJs) {
|
|
17714
17714
|
const userAngularRoot = await getAngularUserRoot(projectRoot);
|
|
17715
17715
|
if (userAngularRoot) {
|
|
17716
17716
|
const { applyAngularHmrInjection: applyAngularHmrInjection2 } = await Promise.resolve().then(() => (init_hmrInjectionPlugin(), exports_hmrInjectionPlugin));
|
|
@@ -18958,6 +18958,12 @@ var fail = (reason, detail, location) => ({
|
|
|
18958
18958
|
return false;
|
|
18959
18959
|
if (a.changeDetection !== b2.changeDetection)
|
|
18960
18960
|
return false;
|
|
18961
|
+
if (a.importsArraySig !== b2.importsArraySig)
|
|
18962
|
+
return false;
|
|
18963
|
+
if (a.hostDirectivesSig !== b2.hostDirectivesSig)
|
|
18964
|
+
return false;
|
|
18965
|
+
if (a.animationsArraySig !== b2.animationsArraySig)
|
|
18966
|
+
return false;
|
|
18961
18967
|
return true;
|
|
18962
18968
|
}, recordFingerprint = (id, fp) => {
|
|
18963
18969
|
fingerprintCache.set(id, fp);
|
|
@@ -19208,6 +19214,8 @@ var fail = (reason, detail, location) => ({
|
|
|
19208
19214
|
const styleUrlsExpr = getProperty(args, "styleUrls");
|
|
19209
19215
|
const stylesExpr = getProperty(args, "styles");
|
|
19210
19216
|
const importsExpr = getProperty(args, "imports");
|
|
19217
|
+
const hostDirectivesExpr = getProperty(args, "hostDirectives");
|
|
19218
|
+
const animationsExpr = getProperty(args, "animations");
|
|
19211
19219
|
const styleUrls = [];
|
|
19212
19220
|
if (styleUrlsExpr && ts7.isArrayLiteralExpression(styleUrlsExpr)) {
|
|
19213
19221
|
for (const el of styleUrlsExpr.elements) {
|
|
@@ -19237,6 +19245,8 @@ var fail = (reason, detail, location) => ({
|
|
|
19237
19245
|
hasProviders: getProperty(args, "providers") !== null,
|
|
19238
19246
|
hasViewProviders: getProperty(args, "viewProviders") !== null,
|
|
19239
19247
|
importsExpr: importsExpr && ts7.isArrayLiteralExpression(importsExpr) ? importsExpr : null,
|
|
19248
|
+
hostDirectivesExpr: hostDirectivesExpr && ts7.isArrayLiteralExpression(hostDirectivesExpr) ? hostDirectivesExpr : null,
|
|
19249
|
+
animationsExpr: animationsExpr && ts7.isArrayLiteralExpression(animationsExpr) ? animationsExpr : null,
|
|
19240
19250
|
preserveWhitespaces: getBooleanProperty(args, "preserveWhitespaces") ?? projectDefaults.preserveWhitespaces ?? false,
|
|
19241
19251
|
selector: getStringProperty(args, "selector"),
|
|
19242
19252
|
standalone: getBooleanProperty(args, "standalone") ?? true,
|
|
@@ -19988,6 +19998,43 @@ var fail = (reason, detail, location) => ({
|
|
|
19988
19998
|
h2 = h2 * 33 ^ s2.charCodeAt(i);
|
|
19989
19999
|
}
|
|
19990
20000
|
return (h2 >>> 0).toString(36);
|
|
20001
|
+
}, initializerShapeIsStructural = (node) => {
|
|
20002
|
+
if (ts7.isArrowFunction(node) || ts7.isFunctionExpression(node) || ts7.isCallExpression(node) || ts7.isNewExpression(node)) {
|
|
20003
|
+
return true;
|
|
20004
|
+
}
|
|
20005
|
+
if (ts7.isConditionalExpression(node)) {
|
|
20006
|
+
return initializerShapeIsStructural(node.whenTrue) || initializerShapeIsStructural(node.whenFalse);
|
|
20007
|
+
}
|
|
20008
|
+
if (ts7.isParenthesizedExpression(node)) {
|
|
20009
|
+
return initializerShapeIsStructural(node.expression);
|
|
20010
|
+
}
|
|
20011
|
+
if (ts7.isAsExpression(node) || ts7.isTypeAssertionExpression(node)) {
|
|
20012
|
+
return initializerShapeIsStructural(node.expression);
|
|
20013
|
+
}
|
|
20014
|
+
if (ts7.isNonNullExpression(node)) {
|
|
20015
|
+
return initializerShapeIsStructural(node.expression);
|
|
20016
|
+
}
|
|
20017
|
+
if (ts7.isObjectLiteralExpression(node)) {
|
|
20018
|
+
for (const prop of node.properties) {
|
|
20019
|
+
if (ts7.isPropertyAssignment(prop) && initializerShapeIsStructural(prop.initializer)) {
|
|
20020
|
+
return true;
|
|
20021
|
+
}
|
|
20022
|
+
if (ts7.isShorthandPropertyAssignment(prop))
|
|
20023
|
+
continue;
|
|
20024
|
+
if (ts7.isSpreadAssignment(prop) && initializerShapeIsStructural(prop.expression)) {
|
|
20025
|
+
return true;
|
|
20026
|
+
}
|
|
20027
|
+
}
|
|
20028
|
+
return false;
|
|
20029
|
+
}
|
|
20030
|
+
if (ts7.isArrayLiteralExpression(node)) {
|
|
20031
|
+
for (const el of node.elements) {
|
|
20032
|
+
if (initializerShapeIsStructural(el))
|
|
20033
|
+
return true;
|
|
20034
|
+
}
|
|
20035
|
+
return false;
|
|
20036
|
+
}
|
|
20037
|
+
return false;
|
|
19991
20038
|
}, extractArrowFieldSig = (cls) => {
|
|
19992
20039
|
const entries = [];
|
|
19993
20040
|
for (const member of cls.members) {
|
|
@@ -19996,9 +20043,8 @@ var fail = (reason, detail, location) => ({
|
|
|
19996
20043
|
const init = member.initializer;
|
|
19997
20044
|
if (!init)
|
|
19998
20045
|
continue;
|
|
19999
|
-
if (!
|
|
20046
|
+
if (!initializerShapeIsStructural(init))
|
|
20000
20047
|
continue;
|
|
20001
|
-
}
|
|
20002
20048
|
const name = member.name.getText();
|
|
20003
20049
|
const bodyHash = djb2Hash(init.getText());
|
|
20004
20050
|
entries.push(`${name}:${bodyHash}`);
|
|
@@ -20142,8 +20188,9 @@ var fail = (reason, detail, location) => ({
|
|
|
20142
20188
|
}, extractPropertyFieldNames = (cls) => {
|
|
20143
20189
|
const names = [];
|
|
20144
20190
|
for (const member of cls.members) {
|
|
20145
|
-
if (!ts7.isPropertyDeclaration(member))
|
|
20191
|
+
if (!ts7.isPropertyDeclaration(member) && !ts7.isMethodDeclaration(member) && !ts7.isGetAccessorDeclaration(member) && !ts7.isSetAccessorDeclaration(member)) {
|
|
20146
20192
|
continue;
|
|
20193
|
+
}
|
|
20147
20194
|
const name = member.name;
|
|
20148
20195
|
if (name === undefined)
|
|
20149
20196
|
continue;
|
|
@@ -20208,7 +20255,11 @@ var fail = (reason, detail, location) => ({
|
|
|
20208
20255
|
const providerImportSig = extractProviderImportSig(decoratorMeta.importsExpr, sourceFile, componentDir);
|
|
20209
20256
|
const topLevelImports = extractTopLevelImports(sourceFile);
|
|
20210
20257
|
const propertyFieldNames = extractPropertyFieldNames(cls);
|
|
20258
|
+
const importsArraySig = decoratorMeta.importsExpr ? djb2Hash(decoratorMeta.importsExpr.getText()) : "";
|
|
20259
|
+
const hostDirectivesSig = decoratorMeta.hostDirectivesExpr ? djb2Hash(decoratorMeta.hostDirectivesExpr.getText()) : "";
|
|
20260
|
+
const animationsArraySig = decoratorMeta.animationsExpr ? djb2Hash(decoratorMeta.animationsExpr.getText()) : "";
|
|
20211
20261
|
return {
|
|
20262
|
+
animationsArraySig,
|
|
20212
20263
|
arrowFieldSig,
|
|
20213
20264
|
changeDetection: decoratorMeta.changeDetection,
|
|
20214
20265
|
className,
|
|
@@ -20216,6 +20267,8 @@ var fail = (reason, detail, location) => ({
|
|
|
20216
20267
|
encapsulation: decoratorMeta.encapsulation,
|
|
20217
20268
|
hasProviders: decoratorMeta.hasProviders,
|
|
20218
20269
|
hasViewProviders: decoratorMeta.hasViewProviders,
|
|
20270
|
+
hostDirectivesSig,
|
|
20271
|
+
importsArraySig,
|
|
20219
20272
|
inputs: inputNames,
|
|
20220
20273
|
memberDecoratorSig,
|
|
20221
20274
|
outputs: outputNames,
|
|
@@ -20401,7 +20454,8 @@ ${block}
|
|
|
20401
20454
|
componentSource: sourceFile,
|
|
20402
20455
|
fingerprintChanged: false,
|
|
20403
20456
|
moduleText,
|
|
20404
|
-
ok: true
|
|
20457
|
+
ok: true,
|
|
20458
|
+
rebootstrapRequired: false
|
|
20405
20459
|
};
|
|
20406
20460
|
}
|
|
20407
20461
|
if (inheritsDecoratedClass(classNode, sourceFile, dirname19(componentFilePath), projectRoot)) {
|
|
@@ -20474,6 +20528,7 @@ ${block}
|
|
|
20474
20528
|
const currentFingerprint = extractFingerprint(classNode, className, decoratorMeta, inputs, outputs, sourceFile, componentDir);
|
|
20475
20529
|
const cachedFingerprint = fingerprintCache.get(fingerprintId);
|
|
20476
20530
|
const fingerprintChanged = cachedFingerprint !== undefined && !fingerprintsEqual(cachedFingerprint, currentFingerprint);
|
|
20531
|
+
const rebootstrapRequired = cachedFingerprint !== undefined && (cachedFingerprint.importsArraySig !== currentFingerprint.importsArraySig || cachedFingerprint.hostDirectivesSig !== currentFingerprint.hostDirectivesSig);
|
|
20477
20532
|
const sourceFileObj = new compiler.ParseSourceFile(tsSource, componentFilePath);
|
|
20478
20533
|
const zeroLoc = new compiler.ParseLocation(sourceFileObj, 0, 0, 0);
|
|
20479
20534
|
const typeSourceSpan = new compiler.ParseSourceSpan(zeroLoc, zeroLoc);
|
|
@@ -20660,7 +20715,8 @@ ${block}
|
|
|
20660
20715
|
componentSource: sourceFile,
|
|
20661
20716
|
fingerprintChanged,
|
|
20662
20717
|
moduleText,
|
|
20663
|
-
ok: true
|
|
20718
|
+
ok: true,
|
|
20719
|
+
rebootstrapRequired
|
|
20664
20720
|
};
|
|
20665
20721
|
} catch (err) {
|
|
20666
20722
|
return fail("unexpected-error", String(err));
|
|
@@ -21377,6 +21433,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
21377
21433
|
const queue = [];
|
|
21378
21434
|
const queueIds = new Set;
|
|
21379
21435
|
let anyFingerprintChanged = false;
|
|
21436
|
+
let rebootstrapClassName = null;
|
|
21380
21437
|
let totalResolveMs = 0;
|
|
21381
21438
|
let totalCompileMs = 0;
|
|
21382
21439
|
const { resolveDescendantsOfParent: resolveDescendantsOfParent2 } = await Promise.resolve().then(() => (init_resolveOwningComponents(), exports_resolveOwningComponents));
|
|
@@ -21445,6 +21502,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
21445
21502
|
if (result.fingerprintChanged) {
|
|
21446
21503
|
anyFingerprintChanged = true;
|
|
21447
21504
|
}
|
|
21505
|
+
if (result.rebootstrapRequired && rebootstrapClassName === null) {
|
|
21506
|
+
rebootstrapClassName = className;
|
|
21507
|
+
}
|
|
21448
21508
|
queueIds.add(id);
|
|
21449
21509
|
queue.push({ className, id });
|
|
21450
21510
|
}
|
|
@@ -21454,6 +21514,13 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
21454
21514
|
resolveMs: Math.round(totalResolveMs),
|
|
21455
21515
|
compileMs: Math.round(totalCompileMs)
|
|
21456
21516
|
};
|
|
21517
|
+
if (rebootstrapClassName !== null) {
|
|
21518
|
+
return {
|
|
21519
|
+
kind: "rebootstrap",
|
|
21520
|
+
reason: `${rebootstrapClassName}: imports/hostDirectives array changed \u2014 directive matching can't be re-run on existing host elements`,
|
|
21521
|
+
tier: 1
|
|
21522
|
+
};
|
|
21523
|
+
}
|
|
21457
21524
|
if (anyFingerprintChanged) {
|
|
21458
21525
|
return { breakdown, kind: "remount", queue, tier: 1 };
|
|
21459
21526
|
}
|
|
@@ -23428,5 +23495,5 @@ export {
|
|
|
23428
23495
|
build
|
|
23429
23496
|
};
|
|
23430
23497
|
|
|
23431
|
-
//# debugId=
|
|
23498
|
+
//# debugId=F6D2F5C153FD49AF64756E2164756E21
|
|
23432
23499
|
//# sourceMappingURL=build.js.map
|