@absolutejs/absolute 0.20.0-beta.173 → 0.20.0-beta.175
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/CHANGELOG.md +30 -0
- package/changelog.json +71 -0
- package/dist/angular/browser.js +13 -2
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +113 -34
- package/dist/angular/index.js.map +12 -9
- package/dist/angular/server.js +113 -34
- package/dist/angular/server.js.map +12 -9
- package/dist/build.js +946 -731
- package/dist/build.js.map +40 -37
- package/dist/cli/{add-ae6mg79m.js → add-ntg96znk.js} +32 -31
- package/dist/cli/{compile-ndc36zna.js → compile-w2z6c9vt.js} +16 -14
- package/dist/cli/config/server.js +85 -65
- package/dist/cli/{dev-x49583aj.js → dev-8br5mr7t.js} +17 -3
- package/dist/cli/{expoProject-h404n2r8.js → expoProject-1qtw97js.js} +2 -1
- package/dist/cli/{generate-brvjesd6.js → generate-5vyz1s44.js} +7 -6
- package/dist/cli/{htmx-5twhjz7p.js → htmx-26hs6jdm.js} +2 -1
- package/dist/cli/{index-gyjxrnnz.js → index-23hvdyxf.js} +18 -16
- package/dist/cli/index-4j1twret.js +22 -0
- package/dist/cli/{index-z794p5qg.js → index-6522t968.js} +43 -21
- package/dist/cli/{index-25e7k849.js → index-7z1hh3fg.js} +4 -4
- package/dist/cli/{index-s0r5q839.js → index-cksezef8.js} +10 -8
- package/dist/cli/{index-q3snnhyd.js → index-enbw9484.js} +34 -33
- package/dist/cli/{index-b1wht4q5.js → index-kes8he5s.js} +6 -4
- package/dist/cli/{index-vh68jb0e.js → index-pkw3jktb.js} +17 -16
- package/dist/cli/{index-rervww4p.js → index-zyd80s3h.js} +119 -119
- package/dist/cli/index.js +11 -11
- package/dist/cli/{islands-p4vgx7a2.js → islands-bx67g15t.js} +8 -7
- package/dist/cli/{mobile-nqdkk3gd.js → mobile-we5q51ey.js} +5 -4
- package/dist/cli/{remove-abaf0w6k.js → remove-4jh862qa.js} +6 -5
- package/dist/cli/{start-t3cq57wn.js → start-srs11bm8.js} +5 -4
- package/dist/cli/{typecheck-fag7djt5.js → typecheck-7fvww3b7.js} +28 -26
- package/dist/client/chunks/index-4j1snyh2.js +18 -0
- package/dist/client/chunks/index-4j1snyh2.js.map +10 -0
- package/dist/client/chunks/{index-6b66nzyf.js → index-a3rpg5kw.js} +6 -16
- package/dist/client/chunks/{index-6b66nzyf.js.map → index-a3rpg5kw.js.map} +3 -4
- package/dist/client/chunks/{islands-s2ta5ajb.js → islands-mfjmdwnb.js} +11 -4
- package/dist/client/chunks/{islands-s2ta5ajb.js.map → islands-mfjmdwnb.js.map} +3 -3
- package/dist/client/chunks/{react-dcvkaba2.js → react-sprprqzs.js} +20 -4
- package/dist/client/chunks/react-sprprqzs.js.map +10 -0
- package/dist/client/chunks/svelte-6ewphsvj.js +30 -0
- package/dist/client/chunks/svelte-6ewphsvj.js.map +10 -0
- package/dist/client/chunks/{vue-a84fzp3v.js → vue-db6ppn1f.js} +14 -4
- package/dist/client/chunks/vue-db6ppn1f.js.map +10 -0
- package/dist/client/index.js +65 -8
- package/dist/client/index.js.map +4 -4
- package/dist/client/navigation.js +5 -3
- package/dist/client/navigation.js.map +2 -2
- package/dist/client/prefetch.js +1 -1
- package/dist/dev/client/handlers/islands.ts +85 -0
- package/dist/dev/client/hmrClient.ts +6 -0
- package/dist/dev/importCostReport.js +45 -26
- package/dist/index.js +1080 -852
- package/dist/index.js.map +41 -38
- package/dist/islands/index.js +57 -10
- package/dist/islands/index.js.map +9 -7
- package/dist/mobile/index.js +115 -95
- package/dist/mobile/index.js.map +6 -5
- package/dist/mobile/remoteMacAgentEntry.js +205 -651
- package/dist/react/browser.js +15 -4
- package/dist/react/browser.js.map +5 -5
- package/dist/react/components/client.js +506 -0
- package/dist/react/components/index.js +14 -15
- package/dist/react/components/index.js.map +4 -4
- package/dist/react/components/server/index.js +728 -0
- package/dist/react/hooks/index.js +14 -15
- package/dist/react/hooks/index.js.map +4 -4
- package/dist/react/index.js +66 -6
- package/dist/react/index.js.map +11 -9
- package/dist/react/router/browser.js +7 -8
- package/dist/react/router/browser.js.map +4 -4
- package/dist/react/router/index.js +7 -8
- package/dist/react/router/index.js.map +4 -4
- package/dist/react/server.js +14 -1
- package/dist/react/server.js.map +4 -4
- package/dist/src/build/buildReactServerComponents.d.ts +4 -0
- package/dist/src/build/islandEntries.d.ts +5 -0
- package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +3 -3
- package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +3 -3
- package/dist/src/client/hydrators/react.d.ts +7 -0
- package/dist/src/client/hydrators/svelte.d.ts +3 -0
- package/dist/src/client/hydrators/vue.d.ts +3 -0
- package/dist/src/client/preserveIslandMarkup.d.ts +5 -0
- package/dist/src/core/islandServerGeneration.d.ts +3 -0
- package/dist/src/dev/angular/fastHmrCompiler.d.ts +2 -2
- package/dist/src/dev/angular/hmrImportGenerator.d.ts +2 -2
- package/dist/src/dev/angular/vendor/translator/ts_util.d.ts +2 -2
- package/dist/src/dev/angular/vendor/translator/typescript_ast_factory.d.ts +40 -40
- package/dist/src/dev/angular/vendor/translator/typescript_translator.d.ts +3 -3
- package/dist/src/react/components/client.d.ts +4 -0
- package/dist/src/react/components/server/index.d.ts +8 -0
- package/dist/src/react/serverComponents/constants.d.ts +2 -1
- package/dist/src/utils/lazyTypescript.d.ts +3 -0
- package/dist/svelte/index.js +66 -6
- package/dist/svelte/index.js.map +10 -8
- package/dist/svelte/server.js +38 -3
- package/dist/svelte/server.js.map +6 -5
- package/dist/types/build.d.ts +3 -2
- package/dist/types/globals.d.ts +15 -0
- package/dist/vue/browser.js +26 -16
- package/dist/vue/browser.js.map +5 -5
- package/dist/vue/index.js +65 -21
- package/dist/vue/index.js.map +10 -9
- package/package.json +1 -1
- package/dist/client/chunks/react-dcvkaba2.js.map +0 -10
- package/dist/client/chunks/svelte-4yfa5bxa.js +0 -17
- package/dist/client/chunks/svelte-4yfa5bxa.js.map +0 -10
- package/dist/client/chunks/vue-a84fzp3v.js.map +0 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type TS from 'typescript';
|
|
2
2
|
import type { AngularEntityKind } from './resolveOwningComponents';
|
|
3
3
|
export type FastHmrFallbackReason = 'file-not-found' | 'class-not-found' | 'no-component-decorator' | 'unsupported-decorator-args' | 'inherits-decorated-class' | 'multiple-decorators-on-class' | 'template-parse-error' | 'template-resource-not-found' | 'style-resource-not-found' | 'style-compile-error' | 'structural-change' | 'unexpected-error';
|
|
4
4
|
export type ComponentFingerprint = {
|
|
@@ -31,7 +31,7 @@ export type ComponentFingerprint = {
|
|
|
31
31
|
export type FastHmrSuccess = {
|
|
32
32
|
ok: true;
|
|
33
33
|
moduleText: string;
|
|
34
|
-
componentSource:
|
|
34
|
+
componentSource: TS.SourceFile;
|
|
35
35
|
fingerprintChanged: boolean;
|
|
36
36
|
rebootstrapRequired: boolean;
|
|
37
37
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type TS from 'typescript';
|
|
2
2
|
import type { ImportGenerator } from './vendor/translator/api/import_generator';
|
|
3
|
-
export declare const createHmrImportGenerator: (namespaceMap: Map<string, string>) => ImportGenerator<
|
|
3
|
+
export declare const createHmrImportGenerator: (namespaceMap: Map<string, string>) => ImportGenerator<TS.SourceFile, TS.Expression>;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
8
|
+
import type TS from 'typescript';
|
|
9
9
|
/**
|
|
10
10
|
* Creates a TypeScript node representing a numeric value.
|
|
11
11
|
*/
|
|
12
|
-
export declare function tsNumericExpression(value: number):
|
|
12
|
+
export declare function tsNumericExpression(value: number): TS.NumericLiteral | TS.PrefixUnaryExpression;
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
8
|
+
import type TS from 'typescript';
|
|
9
9
|
import { AstFactory, BinaryOperator, BuiltInType, LeadingComment, ObjectLiteralProperty, Parameter, SourceMapRange, TemplateLiteral, UnaryOperator, VariableDeclarationType } from './api/ast_factory';
|
|
10
10
|
/**
|
|
11
11
|
* A TypeScript flavoured implementation of the AstFactory.
|
|
12
12
|
*/
|
|
13
|
-
export declare class TypeScriptAstFactory implements AstFactory<
|
|
13
|
+
export declare class TypeScriptAstFactory implements AstFactory<TS.Statement, TS.Expression, TS.TypeNode> {
|
|
14
14
|
private annotateForClosureCompiler;
|
|
15
15
|
private externalSourceFiles;
|
|
16
16
|
private readonly UNARY_OPERATORS;
|
|
@@ -18,49 +18,49 @@ export declare class TypeScriptAstFactory implements AstFactory<ts.Statement, ts
|
|
|
18
18
|
private readonly VAR_TYPES;
|
|
19
19
|
constructor(annotateForClosureCompiler: boolean);
|
|
20
20
|
attachComments: typeof attachComments;
|
|
21
|
-
createArrayLiteral: (elements?: readonly
|
|
22
|
-
createAssignment(target:
|
|
23
|
-
createBinaryExpression(leftOperand:
|
|
24
|
-
createBlock(body:
|
|
25
|
-
createCallExpression(callee:
|
|
26
|
-
createConditional(condition:
|
|
27
|
-
createElementAccess: (expression:
|
|
28
|
-
createExpressionStatement: (expression:
|
|
29
|
-
createDynamicImport(url: string |
|
|
30
|
-
createFunctionDeclaration(functionName: string, parameters: Parameter<
|
|
31
|
-
createFunctionExpression(functionName: string | null, parameters: Parameter<
|
|
32
|
-
createArrowFunctionExpression(parameters: Parameter<
|
|
21
|
+
createArrayLiteral: (elements?: readonly TS.Expression[], multiLine?: boolean) => TS.ArrayLiteralExpression;
|
|
22
|
+
createAssignment(target: TS.Expression, operator: BinaryOperator, value: TS.Expression): TS.Expression;
|
|
23
|
+
createBinaryExpression(leftOperand: TS.Expression, operator: BinaryOperator, rightOperand: TS.Expression): TS.Expression;
|
|
24
|
+
createBlock(body: TS.Statement[]): TS.Statement;
|
|
25
|
+
createCallExpression(callee: TS.Expression, args: TS.Expression[], pure: boolean): TS.Expression;
|
|
26
|
+
createConditional(condition: TS.Expression, whenTrue: TS.Expression, whenFalse: TS.Expression): TS.Expression;
|
|
27
|
+
createElementAccess: (expression: TS.Expression, index: number | TS.Expression) => TS.ElementAccessExpression;
|
|
28
|
+
createExpressionStatement: (expression: TS.Expression) => TS.ExpressionStatement;
|
|
29
|
+
createDynamicImport(url: string | TS.Expression): TS.CallExpression;
|
|
30
|
+
createFunctionDeclaration(functionName: string, parameters: Parameter<TS.TypeNode>[], body: TS.Statement): TS.Statement;
|
|
31
|
+
createFunctionExpression(functionName: string | null, parameters: Parameter<TS.TypeNode>[], body: TS.Statement): TS.Expression;
|
|
32
|
+
createArrowFunctionExpression(parameters: Parameter<TS.TypeNode>[], body: TS.Statement | TS.Expression): TS.Expression;
|
|
33
33
|
private createParameter;
|
|
34
|
-
createIdentifier: (text: string) =>
|
|
35
|
-
createIfStatement(condition:
|
|
36
|
-
createLiteral(value: string | number | boolean | null | undefined):
|
|
37
|
-
createNewExpression(expression:
|
|
38
|
-
createObjectLiteral(properties: ObjectLiteralProperty<
|
|
39
|
-
createParenthesizedExpression: (expression:
|
|
40
|
-
createPropertyAccess: (expression:
|
|
41
|
-
createSpreadElement: (expression:
|
|
42
|
-
createReturnStatement(expression:
|
|
43
|
-
createTaggedTemplate(tag:
|
|
44
|
-
createTemplateLiteral(template: TemplateLiteral<
|
|
45
|
-
createThrowStatement: (expression:
|
|
46
|
-
createTypeOfExpression: (expression:
|
|
47
|
-
createVoidExpression: (expression:
|
|
48
|
-
createUnaryExpression(operator: UnaryOperator, operand:
|
|
49
|
-
createVariableDeclaration(variableName: string, initializer:
|
|
50
|
-
createRegularExpressionLiteral(body: string, flags: string | null):
|
|
51
|
-
setSourceMapRange<T extends
|
|
52
|
-
createBuiltInType(type: BuiltInType):
|
|
53
|
-
createExpressionType(expression:
|
|
54
|
-
createArrayType(elementType:
|
|
55
|
-
createMapType(valueType:
|
|
56
|
-
transplantType(type:
|
|
34
|
+
createIdentifier: (text: string) => TS.Identifier;
|
|
35
|
+
createIfStatement(condition: TS.Expression, thenStatement: TS.Statement, elseStatement: TS.Statement | null): TS.Statement;
|
|
36
|
+
createLiteral(value: string | number | boolean | null | undefined): TS.Expression;
|
|
37
|
+
createNewExpression(expression: TS.Expression, args: TS.Expression[]): TS.Expression;
|
|
38
|
+
createObjectLiteral(properties: ObjectLiteralProperty<TS.Expression>[]): TS.Expression;
|
|
39
|
+
createParenthesizedExpression: (expression: TS.Expression) => TS.ParenthesizedExpression;
|
|
40
|
+
createPropertyAccess: (expression: TS.Expression, name: string | TS.MemberName) => TS.PropertyAccessExpression;
|
|
41
|
+
createSpreadElement: (expression: TS.Expression) => TS.SpreadElement;
|
|
42
|
+
createReturnStatement(expression: TS.Expression | null): TS.Statement;
|
|
43
|
+
createTaggedTemplate(tag: TS.Expression, template: TemplateLiteral<TS.Expression>): TS.Expression;
|
|
44
|
+
createTemplateLiteral(template: TemplateLiteral<TS.Expression>): TS.TemplateLiteral;
|
|
45
|
+
createThrowStatement: (expression: TS.Expression) => TS.ThrowStatement;
|
|
46
|
+
createTypeOfExpression: (expression: TS.Expression) => TS.TypeOfExpression;
|
|
47
|
+
createVoidExpression: (expression: TS.Expression) => TS.VoidExpression;
|
|
48
|
+
createUnaryExpression(operator: UnaryOperator, operand: TS.Expression): TS.Expression;
|
|
49
|
+
createVariableDeclaration(variableName: string, initializer: TS.Expression | null, variableType: VariableDeclarationType, type: TS.TypeNode | null): TS.Statement;
|
|
50
|
+
createRegularExpressionLiteral(body: string, flags: string | null): TS.Expression;
|
|
51
|
+
setSourceMapRange<T extends TS.Node>(node: T, sourceMapRange: SourceMapRange | null): T;
|
|
52
|
+
createBuiltInType(type: BuiltInType): TS.TypeNode;
|
|
53
|
+
createExpressionType(expression: TS.Expression, typeParams: TS.TypeNode[] | null): TS.TypeNode;
|
|
54
|
+
createArrayType(elementType: TS.TypeNode): TS.TypeNode;
|
|
55
|
+
createMapType(valueType: TS.TypeNode): TS.TypeNode;
|
|
56
|
+
transplantType(type: TS.TypeNode): TS.TypeNode;
|
|
57
57
|
}
|
|
58
|
-
export declare function createTemplateMiddle(cooked: string, raw: string):
|
|
59
|
-
export declare function createTemplateTail(cooked: string, raw: string):
|
|
58
|
+
export declare function createTemplateMiddle(cooked: string, raw: string): TS.TemplateMiddle;
|
|
59
|
+
export declare function createTemplateTail(cooked: string, raw: string): TS.TemplateTail;
|
|
60
60
|
/**
|
|
61
61
|
* Attach the given `leadingComments` to the `statement` node.
|
|
62
62
|
*
|
|
63
63
|
* @param statement The statement that will have comments attached.
|
|
64
64
|
* @param leadingComments The comments to attach to the statement.
|
|
65
65
|
*/
|
|
66
|
-
export declare function attachComments(statement:
|
|
66
|
+
export declare function attachComments(statement: TS.Statement | TS.Expression, leadingComments: LeadingComment[]): void;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import * as o from '@angular/compiler';
|
|
9
|
-
import
|
|
9
|
+
import type TS from 'typescript';
|
|
10
10
|
import { ImportGenerator } from './api/import_generator';
|
|
11
11
|
import { TranslatorOptions } from './translator';
|
|
12
|
-
export declare function translateExpression(contextFile:
|
|
13
|
-
export declare function translateStatement(contextFile:
|
|
12
|
+
export declare function translateExpression(contextFile: TS.SourceFile, expression: o.Expression, imports: ImportGenerator<TS.SourceFile, TS.Expression>, options?: TranslatorOptions<TS.Expression>): TS.Expression;
|
|
13
|
+
export declare function translateStatement(contextFile: TS.SourceFile, statement: o.Statement, imports: ImportGenerator<TS.SourceFile, TS.Expression>, options?: TranslatorOptions<TS.Expression>): TS.Statement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Head } from '../Head';
|
|
2
|
+
export { Image } from '../Image';
|
|
3
|
+
export { JsonLd } from '../JsonLd';
|
|
4
|
+
export { SuspenseSlot } from '../SuspenseSlot';
|
|
5
|
+
export { StreamSlot } from '../StreamSlot';
|
|
6
|
+
export { Link, usePrefetch } from '../client';
|
|
7
|
+
export type { LinkProps, UsePrefetchOptions } from '../client';
|
|
8
|
+
export type { PrefetchKind, PrefetchMode } from '../../../../types/prefetch';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Manifest key of the browser entry that hydrates every RSC page. */
|
|
2
2
|
export declare const REACT_SERVER_CLIENT_MANIFEST_KEY = "ReactServerClient";
|
|
3
|
-
/** `asset(manifest, '<Page>RSC')` names a page's react-server bundle.
|
|
3
|
+
/** `asset(manifest, '<Page>RSC')` names a page's react-server bundle. A
|
|
4
|
+
* page whose name already ends in RSC is not suffixed twice. */
|
|
4
5
|
export declare const REACT_SERVER_PAGE_MANIFEST_SUFFIX = "RSC";
|
|
5
6
|
/** Global array the inline Flight payload scripts push into. */
|
|
6
7
|
export declare const REACT_SERVER_PAYLOAD_GLOBAL = "__absoluteReactServerPayload";
|
package/dist/svelte/index.js
CHANGED
|
@@ -986,10 +986,25 @@ var init_lazyModule = __esm(() => {
|
|
|
986
986
|
LAZY_RESOLVED_KEY = Symbol.for("absolutejs.svelte.lazy-resolved");
|
|
987
987
|
});
|
|
988
988
|
|
|
989
|
+
// src/core/islandServerGeneration.ts
|
|
990
|
+
var readGeneration = () => globalThis.__absoluteIslandServerGeneration ?? 0, bumpIslandServerGeneration = () => {
|
|
991
|
+
globalThis.__absoluteIslandServerGeneration = readGeneration() + 1;
|
|
992
|
+
}, createIslandGenerationGuard = (reset) => {
|
|
993
|
+
let seen = readGeneration();
|
|
994
|
+
return () => {
|
|
995
|
+
const current = readGeneration();
|
|
996
|
+
if (current === seen)
|
|
997
|
+
return current;
|
|
998
|
+
seen = current;
|
|
999
|
+
reset();
|
|
1000
|
+
return current;
|
|
1001
|
+
};
|
|
1002
|
+
};
|
|
1003
|
+
|
|
989
1004
|
// src/core/svelteServerModule.ts
|
|
990
1005
|
import { mkdir, readdir } from "fs/promises";
|
|
991
1006
|
import { basename, dirname as dirname2, extname as extname2, join as join3, relative as relative2, resolve as resolve3 } from "path";
|
|
992
|
-
var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, ensureRelativeImportPath = (from, target) => {
|
|
1007
|
+
var serverCacheRoot, compiledModuleCache, originalSourcePathCache, syncIslandGeneration, transpiler, ensureRelativeImportPath = (from, target) => {
|
|
993
1008
|
const importPath = relative2(dirname2(from), target).replace(/\\/g, "/");
|
|
994
1009
|
return importPath.startsWith(".") ? importPath : `./${importPath}`;
|
|
995
1010
|
}, processDirectoryEntries = (entries, dir, targetFileName, stack) => {
|
|
@@ -1056,7 +1071,9 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
|
|
|
1056
1071
|
}, getCachedModulePath = (sourcePath) => {
|
|
1057
1072
|
const relativeSourcePath = relative2(process.cwd(), sourcePath).replace(/\\/g, "/");
|
|
1058
1073
|
const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
|
|
1059
|
-
|
|
1074
|
+
const generation = syncIslandGeneration();
|
|
1075
|
+
const generationSuffix = generation > 0 ? `.g${generation}` : "";
|
|
1076
|
+
return join3(serverCacheRoot, `${normalizedSourcePath}${generationSuffix}.server.js`);
|
|
1060
1077
|
}, resolveSvelteImport = async (spec, from) => {
|
|
1061
1078
|
if (!spec.startsWith(".") && !spec.startsWith("/")) {
|
|
1062
1079
|
const resolved = resolvePackageImport(spec);
|
|
@@ -1088,6 +1105,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
|
|
|
1088
1105
|
}
|
|
1089
1106
|
await Bun.write(path, content);
|
|
1090
1107
|
}, compileSvelteServerModule = async (sourcePath) => {
|
|
1108
|
+
syncIslandGeneration();
|
|
1091
1109
|
const cachedModulePath = compiledModuleCache.get(sourcePath);
|
|
1092
1110
|
if (cachedModulePath) {
|
|
1093
1111
|
return cachedModulePath;
|
|
@@ -1170,6 +1188,10 @@ var init_svelteServerModule = __esm(() => {
|
|
|
1170
1188
|
serverCacheRoot = join3(process.cwd(), ".absolutejs", "islands", "svelte");
|
|
1171
1189
|
compiledModuleCache = new Map;
|
|
1172
1190
|
originalSourcePathCache = new Map;
|
|
1191
|
+
syncIslandGeneration = createIslandGenerationGuard(() => {
|
|
1192
|
+
compiledModuleCache.clear();
|
|
1193
|
+
originalSourcePathCache.clear();
|
|
1194
|
+
});
|
|
1173
1195
|
transpiler = new Bun.Transpiler({
|
|
1174
1196
|
loader: "ts",
|
|
1175
1197
|
target: "browser"
|
|
@@ -4106,6 +4128,19 @@ var init_ssrRender = __esm(() => {
|
|
|
4106
4128
|
selectorCache = new Map;
|
|
4107
4129
|
});
|
|
4108
4130
|
|
|
4131
|
+
// src/dev/client/cspNonce.ts
|
|
4132
|
+
var applyPageNonce = (element) => {
|
|
4133
|
+
const nonce = readPageNonce();
|
|
4134
|
+
if (nonce)
|
|
4135
|
+
element.nonce = nonce;
|
|
4136
|
+
return element;
|
|
4137
|
+
}, readPageNonce = () => {
|
|
4138
|
+
if (typeof document === "undefined")
|
|
4139
|
+
return;
|
|
4140
|
+
const carrier = document.querySelector("script[nonce], style[nonce]");
|
|
4141
|
+
return carrier?.nonce || undefined;
|
|
4142
|
+
};
|
|
4143
|
+
|
|
4109
4144
|
// src/angular/islands.ts
|
|
4110
4145
|
var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_islandId) => angularIslandSelector, wrapperMetadataCache, requestRenderCache, getRequestRenderCache = () => {
|
|
4111
4146
|
const requestId = getSsrContextId();
|
|
@@ -4749,13 +4784,15 @@ import { readFileSync as readFileSync5, realpathSync } from "fs";
|
|
|
4749
4784
|
import { mkdir as mkdir3 } from "fs/promises";
|
|
4750
4785
|
import { dirname as dirname4, join as join7, relative as relative4, resolve as resolve5 } from "path";
|
|
4751
4786
|
var {Transpiler } = globalThis.Bun;
|
|
4752
|
-
var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, transpiler2, ensureRelativeImportPath2 = (from, target) => {
|
|
4787
|
+
var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, syncIslandGeneration2, transpiler2, ensureRelativeImportPath2 = (from, target) => {
|
|
4753
4788
|
const importPath = relative4(dirname4(from), target).replace(/\\/g, "/");
|
|
4754
4789
|
return importPath.startsWith(".") ? importPath : `./${importPath}`;
|
|
4755
4790
|
}, getCachedModulePath3 = (sourcePath) => {
|
|
4756
4791
|
const relativeSourcePath = relative4(process.cwd(), sourcePath).replace(/\\/g, "/");
|
|
4757
4792
|
const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
|
|
4758
|
-
|
|
4793
|
+
const generation = syncIslandGeneration2();
|
|
4794
|
+
const generationSuffix = generation > 0 ? `.g${generation}` : "";
|
|
4795
|
+
return join7(serverCacheRoot3, `${normalizedSourcePath}${generationSuffix}.server.js`);
|
|
4759
4796
|
}, writeIfChanged2 = async (path, content) => {
|
|
4760
4797
|
const targetFile = Bun.file(path);
|
|
4761
4798
|
if (await targetFile.exists()) {
|
|
@@ -4782,6 +4819,7 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
|
|
|
4782
4819
|
`) : nonVueLines.join(`
|
|
4783
4820
|
`);
|
|
4784
4821
|
}, extractRelativeVueImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => typeof importPath === "string" && importPath.startsWith(".") && importPath.endsWith(".vue")), compileVueServerModule = async (sourcePath) => {
|
|
4822
|
+
syncIslandGeneration2();
|
|
4785
4823
|
const cachedModulePath = compiledModuleCache3.get(sourcePath);
|
|
4786
4824
|
if (cachedModulePath)
|
|
4787
4825
|
return cachedModulePath;
|
|
@@ -4842,6 +4880,9 @@ var init_vueServerModule = __esm(() => {
|
|
|
4842
4880
|
init_isFile();
|
|
4843
4881
|
serverCacheRoot3 = join7(process.cwd(), ".absolutejs", "islands", "vue");
|
|
4844
4882
|
compiledModuleCache3 = new Map;
|
|
4883
|
+
syncIslandGeneration2 = createIslandGenerationGuard(() => {
|
|
4884
|
+
compiledModuleCache3.clear();
|
|
4885
|
+
});
|
|
4845
4886
|
transpiler2 = new Transpiler({ loader: "ts", target: "browser" });
|
|
4846
4887
|
});
|
|
4847
4888
|
|
|
@@ -4884,7 +4925,7 @@ var init_islandMarkupAttributes = __esm(() => {
|
|
|
4884
4925
|
});
|
|
4885
4926
|
|
|
4886
4927
|
// src/core/renderIslandMarkup.ts
|
|
4887
|
-
var islandSequence = 0, resolvedServerComponentCache, resolvedServerBuildComponentCache, nextIslandId = () => {
|
|
4928
|
+
var islandSequence = 0, resolvedServerComponentCache, resolvedServerBuildComponentCache, syncIslandGeneration3, nextIslandId = () => {
|
|
4888
4929
|
islandSequence += 1;
|
|
4889
4930
|
return `island-${islandSequence}`;
|
|
4890
4931
|
}, isRecord9 = (value) => typeof value === "object" && value !== null, isReactServerIslandComponent = (value) => typeof value === "function", isSvelteServerIslandComponent = (value) => typeof value === "function", isVueServerIslandComponent = (value) => typeof value === "function" || isRecord9(value), isAngularServerIslandComponent = (value) => typeof value === "function", resolveBuildReferencePath = (source, registryPath) => {
|
|
@@ -4898,6 +4939,7 @@ var islandSequence = 0, resolvedServerComponentCache, resolvedServerBuildCompone
|
|
|
4898
4939
|
const loadedModule = await import(compiledModulePath);
|
|
4899
4940
|
return "default" in loadedModule ? loadedModule.default : loadedModule;
|
|
4900
4941
|
}, loadServerBuildComponent = async (buildReferencePath) => {
|
|
4942
|
+
syncIslandGeneration3();
|
|
4901
4943
|
const cachedBuildComponent = resolvedServerBuildComponentCache.get(buildReferencePath);
|
|
4902
4944
|
if (cachedBuildComponent) {
|
|
4903
4945
|
return cachedBuildComponent;
|
|
@@ -4936,6 +4978,7 @@ var islandSequence = 0, resolvedServerComponentCache, resolvedServerBuildCompone
|
|
|
4936
4978
|
}
|
|
4937
4979
|
return loadServerImportComponent(resolvedComponent);
|
|
4938
4980
|
}, resolveServerIslandComponent = async (component) => {
|
|
4981
|
+
syncIslandGeneration3();
|
|
4939
4982
|
const cachedResolvedComponent = resolvedServerComponentCache.get(component);
|
|
4940
4983
|
if (cachedResolvedComponent) {
|
|
4941
4984
|
return cachedResolvedComponent;
|
|
@@ -5034,6 +5077,10 @@ var init_renderIslandMarkup = __esm(() => {
|
|
|
5034
5077
|
init_islands2();
|
|
5035
5078
|
resolvedServerComponentCache = new Map;
|
|
5036
5079
|
resolvedServerBuildComponentCache = new Map;
|
|
5080
|
+
syncIslandGeneration3 = createIslandGenerationGuard(() => {
|
|
5081
|
+
resolvedServerComponentCache.clear();
|
|
5082
|
+
resolvedServerBuildComponentCache.clear();
|
|
5083
|
+
});
|
|
5037
5084
|
});
|
|
5038
5085
|
|
|
5039
5086
|
// src/core/currentIslandRegistry.ts
|
|
@@ -5625,6 +5672,17 @@ var defineFileRouteWith = (framework, route, render) => {
|
|
|
5625
5672
|
|
|
5626
5673
|
// src/core/lookup.ts
|
|
5627
5674
|
init_requestContext();
|
|
5675
|
+
var DOUBLED_RSC_SUFFIX = "RSCRSC";
|
|
5676
|
+
var warnedDoubledRscKeys = new Set;
|
|
5677
|
+
var warnDoubledRscKey = (source, name, assetPath) => {
|
|
5678
|
+
if (!name.endsWith(DOUBLED_RSC_SUFFIX))
|
|
5679
|
+
return;
|
|
5680
|
+
const current = name.slice(0, -"RSC".length);
|
|
5681
|
+
if (source[current] !== assetPath || warnedDoubledRscKeys.has(name))
|
|
5682
|
+
return;
|
|
5683
|
+
warnedDoubledRscKeys.add(name);
|
|
5684
|
+
console.warn(`[asset] key "${name}" is deprecated: React Server Components pages whose file name ends in RSC no longer get the suffix twice. Use asset(manifest, '${current}').`);
|
|
5685
|
+
};
|
|
5628
5686
|
var asset = (source, name) => {
|
|
5629
5687
|
const assetPath = source[name];
|
|
5630
5688
|
if (assetPath === undefined) {
|
|
@@ -5638,6 +5696,8 @@ var asset = (source, name) => {
|
|
|
5638
5696
|
console.warn(`[asset] key "${name}" not found in manifest (dev mode \u2014 skipping)`);
|
|
5639
5697
|
return "";
|
|
5640
5698
|
}
|
|
5699
|
+
if (!isProductionRuntime())
|
|
5700
|
+
warnDoubledRscKey(source, name, assetPath);
|
|
5641
5701
|
return assetPath;
|
|
5642
5702
|
};
|
|
5643
5703
|
|
|
@@ -6101,5 +6161,5 @@ export {
|
|
|
6101
6161
|
useIslandStore
|
|
6102
6162
|
};
|
|
6103
6163
|
|
|
6104
|
-
//# debugId=
|
|
6164
|
+
//# debugId=3C69D998E176291964756E2164756E21
|
|
6105
6165
|
//# sourceMappingURL=index.js.map
|