astro 5.6.0 → 5.6.2
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/actions/plugins.js +1 -1
- package/dist/assets/utils/index.d.ts +5 -1
- package/dist/assets/utils/index.js +5 -1
- package/dist/assets/utils/node/emitAsset.d.ts +8 -0
- package/dist/assets/utils/node/emitAsset.js +45 -3
- package/dist/assets/vite-plugin-assets.d.ts +3 -1
- package/dist/assets/vite-plugin-assets.js +36 -30
- package/dist/cli/add/index.js +3 -1
- package/dist/cli/install-package.js +3 -0
- package/dist/content/content-layer.js +3 -3
- package/dist/content/utils.d.ts +10 -10
- package/dist/content/vite-plugin-content-virtual-mod.js +7 -9
- package/dist/core/build/plugins/plugin-component-entry.js +3 -1
- package/dist/core/build/plugins/plugin-manifest.js +1 -1
- package/dist/core/build/plugins/plugin-pages.js +1 -1
- package/dist/core/build/plugins/plugin-renderers.js +3 -3
- package/dist/core/build/plugins/plugin-ssr.js +2 -2
- package/dist/core/config/schemas/base.d.ts +10 -10
- package/dist/core/config/schemas/base.js +1 -0
- package/dist/core/config/schemas/refined.js +0 -7
- package/dist/core/config/schemas/relative.d.ts +14 -14
- package/dist/core/constants.js +1 -1
- package/dist/core/create-vite.js +1 -1
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/messages.js +2 -2
- package/dist/core/middleware/vite-plugin.js +3 -3
- package/dist/core/render-context.js +1 -0
- package/dist/core/server-islands/vite-plugin-server-islands.js +1 -1
- package/dist/env/schema.d.ts +6 -6
- package/dist/env/vite-plugin-env.js +3 -3
- package/dist/integrations/hooks.js +3 -0
- package/dist/manifest/virtual-module.js +2 -2
- package/dist/prefetch/vite-plugin-prefetch.js +1 -1
- package/dist/runtime/server/render/common.js +8 -0
- package/dist/runtime/server/render/instruction.d.ts +5 -5
- package/dist/runtime/server/render/server-islands.d.ts +1 -0
- package/dist/runtime/server/render/server-islands.js +29 -31
- package/dist/toolbar/vite-plugin-dev-toolbar.js +41 -39
- package/dist/transitions/swap-functions.d.ts +1 -1
- package/dist/transitions/swap-functions.js +7 -6
- package/dist/transitions/vite-plugin-transitions.js +22 -18
- package/dist/types/public/internal.d.ts +1 -0
- package/dist/vite-plugin-load-fallback/index.js +4 -2
- package/dist/vite-plugin-scripts/index.js +9 -3
- package/dist/vite-plugin-ssr-manifest/index.js +4 -3
- package/package.json +3 -3
|
@@ -22,26 +22,30 @@ function astroTransitions({ settings }) {
|
|
|
22
22
|
},
|
|
23
23
|
load(id) {
|
|
24
24
|
if (id === resolvedVirtualModuleId) {
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
return {
|
|
26
|
+
code: `
|
|
27
|
+
export * from "astro/virtual-modules/transitions.js";
|
|
28
|
+
export {
|
|
29
|
+
default as ViewTransitions,
|
|
30
|
+
default as ClientRouter
|
|
31
|
+
} from "astro/components/ClientRouter.astro";
|
|
32
|
+
`
|
|
33
|
+
};
|
|
32
34
|
}
|
|
33
35
|
if (id === resolvedVirtualClientModuleId) {
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
return {
|
|
37
|
+
code: `
|
|
38
|
+
export { navigate, supportsViewTransitions, transitionEnabledOnThisPage } from "astro/virtual-modules/transitions-router.js";
|
|
39
|
+
export * from "astro/virtual-modules/transitions-types.js";
|
|
40
|
+
export {
|
|
41
|
+
TRANSITION_BEFORE_PREPARATION, isTransitionBeforePreparationEvent, TransitionBeforePreparationEvent,
|
|
42
|
+
TRANSITION_AFTER_PREPARATION,
|
|
43
|
+
TRANSITION_BEFORE_SWAP, isTransitionBeforeSwapEvent, TransitionBeforeSwapEvent,
|
|
44
|
+
TRANSITION_AFTER_SWAP, TRANSITION_PAGE_LOAD
|
|
45
|
+
} from "astro/virtual-modules/transitions-events.js";
|
|
46
|
+
export { swapFunctions } from "astro/virtual-modules/transitions-swap-functions.js";
|
|
47
|
+
`
|
|
48
|
+
};
|
|
45
49
|
}
|
|
46
50
|
},
|
|
47
51
|
transform(code, id) {
|
|
@@ -258,6 +258,7 @@ export interface SSRMetadata {
|
|
|
258
258
|
renderedScripts: Set<string>;
|
|
259
259
|
hasDirectives: Set<string>;
|
|
260
260
|
hasRenderedHead: boolean;
|
|
261
|
+
hasRenderedServerIslandRuntime: boolean;
|
|
261
262
|
headInTree: boolean;
|
|
262
263
|
extraHead: string[];
|
|
263
264
|
propagators: Set<AstroComponentInstance>;
|
|
@@ -17,13 +17,19 @@ function astroScriptsPlugin({ settings }) {
|
|
|
17
17
|
},
|
|
18
18
|
async load(id) {
|
|
19
19
|
if (id === BEFORE_HYDRATION_SCRIPT_ID) {
|
|
20
|
-
return
|
|
20
|
+
return {
|
|
21
|
+
code: settings.scripts.filter((s) => s.stage === "before-hydration").map((s) => s.content).join("\n")
|
|
22
|
+
};
|
|
21
23
|
}
|
|
22
24
|
if (id === PAGE_SCRIPT_ID) {
|
|
23
|
-
return
|
|
25
|
+
return {
|
|
26
|
+
code: settings.scripts.filter((s) => s.stage === "page").map((s) => s.content).join("\n")
|
|
27
|
+
};
|
|
24
28
|
}
|
|
25
29
|
if (id === PAGE_SSR_SCRIPT_ID) {
|
|
26
|
-
return
|
|
30
|
+
return {
|
|
31
|
+
code: settings.scripts.filter((s) => s.stage === "page-ssr").map((s) => s.content).join("\n")
|
|
32
|
+
};
|
|
27
33
|
}
|
|
28
34
|
return null;
|
|
29
35
|
},
|
|
@@ -11,12 +11,13 @@ function vitePluginSSRManifest() {
|
|
|
11
11
|
},
|
|
12
12
|
load(id) {
|
|
13
13
|
if (id === resolvedManifestVirtualModuleId) {
|
|
14
|
-
return
|
|
14
|
+
return {
|
|
15
|
+
code: `export let manifest = {};
|
|
15
16
|
export function _privateSetManifestDontUseThis(ssrManifest) {
|
|
16
17
|
manifest = ssrManifest;
|
|
17
|
-
}
|
|
18
|
+
}`
|
|
19
|
+
};
|
|
18
20
|
}
|
|
19
|
-
return void 0;
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.2",
|
|
4
4
|
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "withastro",
|
|
@@ -145,11 +145,11 @@
|
|
|
145
145
|
"tinyexec": "^0.3.2",
|
|
146
146
|
"tinyglobby": "^0.2.12",
|
|
147
147
|
"tsconfck": "^3.1.5",
|
|
148
|
-
"ultrahtml": "^1.
|
|
148
|
+
"ultrahtml": "^1.6.0",
|
|
149
149
|
"unist-util-visit": "^5.0.0",
|
|
150
150
|
"unstorage": "^1.15.0",
|
|
151
151
|
"vfile": "^6.0.3",
|
|
152
|
-
"vite": "^6.2.
|
|
152
|
+
"vite": "^6.2.6",
|
|
153
153
|
"vitefu": "^1.0.6",
|
|
154
154
|
"xxhash-wasm": "^1.1.0",
|
|
155
155
|
"yargs-parser": "^21.1.1",
|