@absolutejs/absolute 0.19.0-beta.864 → 0.19.0-beta.866

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/index.js CHANGED
@@ -9858,14 +9858,20 @@ var ENTITY_DECORATOR_RE, buildHmrTail = (className, encodedIdLiteral) => `
9858
9858
  ]);
9859
9859
  if (!u || typeof u.default !== 'function') return;
9860
9860
  if (${className}.\u0275cmp && typeof core.\u0275\u0275replaceMetadata === 'function') {
9861
- core.\u0275\u0275replaceMetadata(
9862
- ${className},
9863
- u.default,
9864
- [core],
9865
- [],
9866
- import.meta,
9867
- __ng_hmr_id
9868
- );
9861
+ console.log('[abs-hmr] \u0275\u0275replaceMetadata for ${className}, def before:', !!${className}.\u0275cmp);
9862
+ try {
9863
+ core.\u0275\u0275replaceMetadata(
9864
+ ${className},
9865
+ u.default,
9866
+ [core],
9867
+ [],
9868
+ import.meta,
9869
+ __ng_hmr_id
9870
+ );
9871
+ console.log('[abs-hmr] \u0275\u0275replaceMetadata returned for ${className}');
9872
+ } catch (err) {
9873
+ console.error('[abs-hmr] \u0275\u0275replaceMetadata threw for ${className}:', err);
9874
+ }
9869
9875
  } else {
9870
9876
  // Non-component entity (pipe / directive / service) \u2014 no
9871
9877
  // LView tree to walk, just apply the prototype patch.
@@ -17888,14 +17894,26 @@ class ExpressionTranslatorVisitor {
17888
17894
  }
17889
17895
  visitLiteralMapExpr(ast, context) {
17890
17896
  const properties = ast.entries.map((entry) => {
17891
- return entry instanceof o.LiteralMapPropertyAssignment ? {
17892
- kind: "property",
17893
- propertyName: entry.key,
17894
- quoted: entry.quoted,
17895
- value: entry.value.visitExpression(this, context)
17896
- } : {
17897
+ const looksLikeProperty = typeof entry.key === "string" && entry.value !== undefined;
17898
+ const isPropertyAssignment = entry instanceof o.LiteralMapPropertyAssignment || looksLikeProperty;
17899
+ if (isPropertyAssignment) {
17900
+ const e = entry;
17901
+ return {
17902
+ kind: "property",
17903
+ propertyName: e.key,
17904
+ quoted: e.quoted,
17905
+ value: e.value.visitExpression(this, context)
17906
+ };
17907
+ }
17908
+ const spreadEntry = entry;
17909
+ if (!spreadEntry.expression) {
17910
+ const ctorName = entry?.constructor?.name;
17911
+ const keys = entry ? Object.keys(entry).join(",") : "";
17912
+ throw new Error(`[abs translator] LiteralMapExpr entry has neither key+value nor expression; ` + `ctor=${ctorName}, keys=${keys}. Likely a duplicate @angular/compiler ` + `module instance \u2014 investigate import resolution.`);
17913
+ }
17914
+ return {
17897
17915
  kind: "spread",
17898
- expression: entry.expression.visitExpression(this, context)
17916
+ expression: spreadEntry.expression.visitExpression(this, context)
17899
17917
  };
17900
17918
  });
17901
17919
  return this.setSourceMapRange(this.factory.createObjectLiteral(properties), ast.sourceSpan);
@@ -30273,5 +30291,5 @@ export {
30273
30291
  ANGULAR_INIT_TIMEOUT_MS
30274
30292
  };
30275
30293
 
30276
- //# debugId=652560154C5C43EB64756E2164756E21
30294
+ //# debugId=912EE2204CFF6C6C64756E2164756E21
30277
30295
  //# sourceMappingURL=index.js.map