@absolutejs/absolute 0.19.0-beta.875 → 0.19.0-beta.877
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-0mULKL/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-0mULKL/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-0mULKL/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
|
@@ -9561,12 +9561,12 @@ __export(exports_hmrInjectionPlugin, {
|
|
|
9561
9561
|
});
|
|
9562
9562
|
import { readFile as readFile5 } from "fs/promises";
|
|
9563
9563
|
import { relative as relative6, resolve as resolve12 } from "path";
|
|
9564
|
-
var ENTITY_DECORATOR_RE, IMPORT_RE,
|
|
9564
|
+
var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames = (jsSource) => {
|
|
9565
9565
|
const names = new Set;
|
|
9566
9566
|
IMPORT_RE.lastIndex = 0;
|
|
9567
|
-
let
|
|
9568
|
-
while ((
|
|
9569
|
-
const [, , nsName, defaultName, namedAfterDefault, named] =
|
|
9567
|
+
let importMatch;
|
|
9568
|
+
while ((importMatch = IMPORT_RE.exec(jsSource)) !== null) {
|
|
9569
|
+
const [, , nsName, defaultName, namedAfterDefault, named] = importMatch;
|
|
9570
9570
|
if (nsName)
|
|
9571
9571
|
names.add(nsName);
|
|
9572
9572
|
if (defaultName)
|
|
@@ -9584,6 +9584,13 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, extractImportedLocalNames = (jsSource) => {
|
|
|
9584
9584
|
}
|
|
9585
9585
|
}
|
|
9586
9586
|
}
|
|
9587
|
+
TOP_LEVEL_DECL_RE.lastIndex = 0;
|
|
9588
|
+
let declMatch;
|
|
9589
|
+
while ((declMatch = TOP_LEVEL_DECL_RE.exec(jsSource)) !== null) {
|
|
9590
|
+
const name = declMatch[1];
|
|
9591
|
+
if (name)
|
|
9592
|
+
names.add(name);
|
|
9593
|
+
}
|
|
9587
9594
|
return [...names];
|
|
9588
9595
|
}, buildHmrTail = (className, encodedIdLiteral) => `
|
|
9589
9596
|
|
|
@@ -9706,8 +9713,8 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, extractImportedLocalNames = (jsSource) => {
|
|
|
9706
9713
|
const id = `${projectRel}@${className}`;
|
|
9707
9714
|
return buildHmrTail(className, JSON.stringify(id));
|
|
9708
9715
|
}).join("");
|
|
9709
|
-
const
|
|
9710
|
-
const depsKeys =
|
|
9716
|
+
const topLevelNames = extractAllTopLevelNames(text);
|
|
9717
|
+
const depsKeys = topLevelNames.filter((n) => !classNames.includes(n)).join(", ");
|
|
9711
9718
|
const depsBlock = classNames.length > 0 && depsKeys ? `
|
|
9712
9719
|
|
|
9713
9720
|
// absolutejs HMR \u2014 Tier 1a class-deps registry
|
|
@@ -9722,6 +9729,7 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, extractImportedLocalNames = (jsSource) => {
|
|
|
9722
9729
|
var init_hmrInjectionPlugin = __esm(() => {
|
|
9723
9730
|
ENTITY_DECORATOR_RE = /([A-Z][A-Za-z0-9_$]*)\s*=\s*__legacyDecorateClassTS[A-Za-z0-9_$]*\s*\(\s*\[[\s\S]*?\b(?:Component|Directive|Pipe|Injectable)[A-Za-z0-9_$]*\s*\(/g;
|
|
9724
9731
|
IMPORT_RE = /^\s*import\s+(?:(?:(\*)\s+as\s+([A-Za-z_$][\w$]*)\s+from)|(?:([A-Za-z_$][\w$]*)(?:\s*,\s*\{([^}]*)\})?\s+from)|(?:\{([^}]*)\}\s+from))\s*['"][^'"]+['"]/gm;
|
|
9732
|
+
TOP_LEVEL_DECL_RE = /^(?:export\s+)?(?:const|let|var|function|class)\s+([A-Za-z_$][\w$]*)/gm;
|
|
9725
9733
|
});
|
|
9726
9734
|
|
|
9727
9735
|
// src/utils/cleanStaleOutputs.ts
|
|
@@ -19066,26 +19074,41 @@ ${block}
|
|
|
19066
19074
|
while ((idMatch = identRe.exec(provisionalMethodsBlock)) !== null) {
|
|
19067
19075
|
referencedNames.add(idMatch[0]);
|
|
19068
19076
|
}
|
|
19069
|
-
const
|
|
19077
|
+
const sourceScopeNames = new Set;
|
|
19070
19078
|
for (const stmt of sourceFile.statements) {
|
|
19071
|
-
if (
|
|
19072
|
-
|
|
19073
|
-
|
|
19079
|
+
if (ts7.isImportDeclaration(stmt)) {
|
|
19080
|
+
if (!ts7.isStringLiteral(stmt.moduleSpecifier))
|
|
19081
|
+
continue;
|
|
19082
|
+
const clause = stmt.importClause;
|
|
19083
|
+
if (clause?.name)
|
|
19084
|
+
sourceScopeNames.add(clause.name.text);
|
|
19085
|
+
if (clause?.namedBindings && ts7.isNamedImports(clause.namedBindings)) {
|
|
19086
|
+
for (const el of clause.namedBindings.elements) {
|
|
19087
|
+
if (el.isTypeOnly)
|
|
19088
|
+
continue;
|
|
19089
|
+
sourceScopeNames.add(el.name.text);
|
|
19090
|
+
}
|
|
19091
|
+
} else if (clause?.namedBindings && ts7.isNamespaceImport(clause.namedBindings)) {
|
|
19092
|
+
sourceScopeNames.add(clause.namedBindings.name.text);
|
|
19093
|
+
}
|
|
19074
19094
|
continue;
|
|
19075
|
-
|
|
19076
|
-
if (
|
|
19077
|
-
|
|
19078
|
-
|
|
19079
|
-
|
|
19080
|
-
|
|
19081
|
-
|
|
19082
|
-
sourceImportedNames.add(el.name.text);
|
|
19095
|
+
}
|
|
19096
|
+
if (ts7.isVariableStatement(stmt) || stmt.kind === ts7.SyntaxKind.VariableStatement) {
|
|
19097
|
+
const varStmt = stmt;
|
|
19098
|
+
for (const decl of varStmt.declarationList.declarations) {
|
|
19099
|
+
if (ts7.isIdentifier(decl.name)) {
|
|
19100
|
+
sourceScopeNames.add(decl.name.text);
|
|
19101
|
+
}
|
|
19083
19102
|
}
|
|
19084
|
-
|
|
19085
|
-
|
|
19103
|
+
continue;
|
|
19104
|
+
}
|
|
19105
|
+
if (ts7.isFunctionDeclaration(stmt) || ts7.isClassDeclaration(stmt)) {
|
|
19106
|
+
if (stmt.name)
|
|
19107
|
+
sourceScopeNames.add(stmt.name.text);
|
|
19086
19108
|
}
|
|
19087
19109
|
}
|
|
19088
|
-
|
|
19110
|
+
sourceScopeNames.delete(className);
|
|
19111
|
+
const depsToDestructure = [...sourceScopeNames].filter((n) => referencedNames.has(n));
|
|
19089
19112
|
const tsSourceText = fnText;
|
|
19090
19113
|
const transpiled = ts7.transpileModule(tsSourceText, {
|
|
19091
19114
|
compilerOptions: {
|
|
@@ -21789,5 +21812,5 @@ export {
|
|
|
21789
21812
|
build
|
|
21790
21813
|
};
|
|
21791
21814
|
|
|
21792
|
-
//# debugId=
|
|
21815
|
+
//# debugId=53ACDD84AE5243BB64756E2164756E21
|
|
21793
21816
|
//# sourceMappingURL=build.js.map
|