astro 2.9.7 → 3.0.0-beta.0
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/astro.js +2 -2
- package/components/ViewTransitions.astro +65 -12
- package/dist/@types/astro.d.ts +68 -7
- package/dist/@types/astro.js +1 -0
- package/dist/assets/generate.js +7 -3
- package/dist/assets/image-endpoint.d.ts +1 -1
- package/dist/assets/image-endpoint.js +3 -3
- package/dist/assets/internal.js +1 -2
- package/dist/assets/services/noop.d.ts +3 -0
- package/dist/assets/services/noop.js +17 -0
- package/dist/assets/services/vendor/squoosh/image_data.js +3 -0
- package/dist/assets/services/vendor/squoosh/impl.js +2 -3
- package/dist/assets/services/vendor/squoosh/utils/workerPool.js +4 -0
- package/dist/assets/vendor/image-size/types/tiff.js +1 -1
- package/dist/assets/vendor/queue/queue.d.ts +3 -3
- package/dist/assets/vite-plugin-assets.d.ts +1 -1
- package/dist/assets/vite-plugin-assets.js +1 -23
- package/dist/cli/add/index.js +6 -9
- package/dist/cli/build/index.js +1 -1
- package/dist/cli/check/index.d.ts +2 -78
- package/dist/cli/check/index.js +23 -275
- package/dist/cli/dev/index.js +1 -1
- package/dist/cli/index.js +7 -13
- package/dist/cli/info/index.js +3 -4
- package/dist/cli/install-package.d.ts +7 -0
- package/dist/cli/install-package.js +102 -0
- package/dist/cli/preview/index.js +1 -1
- package/dist/cli/sync/index.js +1 -1
- package/dist/content/runtime-assets.js +1 -2
- package/dist/content/runtime.js +3 -5
- package/dist/content/server-listeners.js +1 -2
- package/dist/content/types-generator.js +8 -8
- package/dist/content/utils.js +3 -4
- package/dist/content/vite-plugin-content-assets.js +4 -6
- package/dist/content/vite-plugin-content-imports.js +1 -1
- package/dist/content/vite-plugin-content-virtual-mod.js +5 -6
- package/dist/core/app/index.js +5 -3
- package/dist/core/app/node.d.ts +1 -1
- package/dist/core/app/node.js +7 -2
- package/dist/core/build/css-asset-name.js +2 -4
- package/dist/core/build/generate.js +10 -17
- package/dist/core/build/graph.js +3 -4
- package/dist/core/build/index.js +8 -1
- package/dist/core/build/internal.js +2 -2
- package/dist/core/build/plugin.js +2 -4
- package/dist/core/build/plugins/plugin-analyzer.js +6 -9
- package/dist/core/build/plugins/plugin-component-entry.js +2 -4
- package/dist/core/build/plugins/plugin-css.js +6 -9
- package/dist/core/build/plugins/plugin-hoisted-scripts.js +2 -3
- package/dist/core/build/plugins/plugin-internals.js +1 -2
- package/dist/core/build/plugins/plugin-pages.js +5 -1
- package/dist/core/build/plugins/plugin-ssr.js +12 -8
- package/dist/core/build/static-build.js +8 -12
- package/dist/core/client-directive/build.js +1 -2
- package/dist/core/compile/compile.js +2 -1
- package/dist/core/compile/style.js +2 -3
- package/dist/core/config/schema.d.ts +8 -0
- package/dist/core/config/schema.js +11 -3
- package/dist/core/config/settings.js +3 -3
- package/dist/core/config/timer.js +5 -6
- package/dist/core/constants.js +1 -1
- package/dist/core/cookies/cookies.d.ts +5 -5
- package/dist/core/cookies/cookies.js +9 -9
- package/dist/core/create-vite.js +6 -28
- package/dist/core/dev/container.d.ts +0 -1
- package/dist/core/dev/container.js +0 -5
- package/dist/core/dev/dev.js +2 -3
- package/dist/core/dev/index.d.ts +1 -1
- package/dist/core/dev/index.js +1 -2
- package/dist/core/dev/restart.d.ts +1 -4
- package/dist/core/dev/restart.js +15 -19
- package/dist/core/endpoint/dev/index.js +1 -1
- package/dist/core/endpoint/index.js +3 -4
- package/dist/core/errors/dev/utils.js +12 -16
- package/dist/core/errors/dev/vite.js +11 -13
- package/dist/core/errors/errors-data.d.ts +21 -0
- package/dist/core/errors/errors-data.js +21 -0
- package/dist/core/errors/errors.js +12 -17
- package/dist/core/errors/overlay.js +7 -8
- package/dist/core/errors/utils.js +1 -1
- package/dist/core/fs/index.js +1 -1
- package/dist/core/logger/console.js +1 -1
- package/dist/core/logger/core.d.ts +26 -6
- package/dist/core/logger/core.js +54 -8
- package/dist/core/logger/node.d.ts +4 -4
- package/dist/core/logger/node.js +6 -6
- package/dist/core/messages.js +4 -5
- package/dist/core/module-loader/vite.js +2 -2
- package/dist/core/polyfill.js +12 -4
- package/dist/core/redirects/helpers.js +3 -3
- package/dist/core/render/core.js +1 -4
- package/dist/core/render/params-and-props.js +2 -3
- package/dist/core/render/result.js +1 -2
- package/dist/core/render/route-cache.d.ts +1 -2
- package/dist/core/render/route-cache.js +6 -11
- package/dist/core/routing/manifest/create.js +2 -6
- package/dist/core/routing/params.js +1 -1
- package/dist/core/routing/validation.js +7 -8
- package/dist/core/sync/index.js +1 -1
- package/dist/core/util.js +1 -1
- package/dist/events/error.js +1 -1
- package/dist/events/session.js +12 -13
- package/dist/integrations/astroFeaturesValidation.d.ts +14 -0
- package/dist/integrations/astroFeaturesValidation.js +109 -0
- package/dist/integrations/index.d.ts +3 -1
- package/dist/integrations/index.js +96 -31
- package/dist/jsx/babel.js +1 -2
- package/dist/prerender/metadata.js +1 -2
- package/dist/runtime/client/hmr.js +1 -2
- package/dist/runtime/server/astro-component.js +1 -2
- package/dist/runtime/server/astro-island.js +53 -55
- package/dist/runtime/server/astro-island.prebuilt.d.ts +1 -1
- package/dist/runtime/server/astro-island.prebuilt.js +1 -1
- package/dist/runtime/server/endpoint.d.ts +2 -1
- package/dist/runtime/server/endpoint.js +21 -27
- package/dist/runtime/server/hydration.js +9 -0
- package/dist/runtime/server/jsx.js +3 -2
- package/dist/runtime/server/render/astro/instance.js +6 -3
- package/dist/runtime/server/render/astro/render-template.js +4 -3
- package/dist/runtime/server/render/astro/render.js +3 -3
- package/dist/runtime/server/render/common.js +1 -1
- package/dist/runtime/server/render/component.js +11 -13
- package/dist/runtime/server/render/dom.js +1 -1
- package/dist/runtime/server/render/page.js +2 -3
- package/dist/runtime/server/render/slot.js +2 -1
- package/dist/runtime/server/render/util.js +1 -2
- package/dist/runtime/server/transition.d.ts +1 -0
- package/dist/runtime/server/transition.js +1 -0
- package/dist/transitions/vite-plugin-transitions.js +1 -0
- package/dist/vite-plugin-astro/compile.js +2 -3
- package/dist/vite-plugin-astro/hmr.js +3 -5
- package/dist/vite-plugin-astro/index.js +1 -1
- package/dist/vite-plugin-astro/metadata.js +1 -2
- package/dist/vite-plugin-astro-postprocess/index.js +1 -1
- package/dist/vite-plugin-astro-server/base.js +1 -2
- package/dist/vite-plugin-astro-server/controller.js +2 -3
- package/dist/vite-plugin-astro-server/css.js +1 -1
- package/dist/vite-plugin-astro-server/request.js +1 -1
- package/dist/vite-plugin-astro-server/route.js +1 -2
- package/dist/vite-plugin-astro-server/scripts.js +2 -3
- package/dist/vite-plugin-astro-server/vite.js +1 -1
- package/dist/vite-plugin-config-alias/index.js +1 -1
- package/dist/vite-plugin-env/index.js +2 -2
- package/dist/vite-plugin-head/index.js +4 -6
- package/dist/vite-plugin-html/index.js +1 -2
- package/dist/vite-plugin-html/transform/index.js +1 -1
- package/dist/vite-plugin-html/transform/slots.js +5 -6
- package/dist/vite-plugin-html/transform/utils.js +1 -2
- package/dist/vite-plugin-jsx/import-source.js +1 -2
- package/dist/vite-plugin-jsx/index.js +1 -1
- package/dist/vite-plugin-jsx/tag.js +4 -6
- package/dist/vite-plugin-markdown/index.js +1 -2
- package/dist/vite-plugin-scanner/index.js +2 -1
- package/dist/vite-plugin-scanner/scan.js +1 -1
- package/dist/vite-plugin-scripts/index.js +1 -1
- package/dist/vite-plugin-scripts/page-ssr.js +2 -2
- package/package.json +13 -22
- package/tsconfigs/base.json +8 -6
- package/tsconfigs/strict.json +2 -3
- package/dist/cli/check/print.d.ts +0 -2
- package/dist/cli/check/print.js +0 -95
|
@@ -3,8 +3,9 @@ import fs from "node:fs";
|
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { buildClientDirectiveEntrypoint } from "../core/client-directive/index.js";
|
|
5
5
|
import { mergeConfig } from "../core/config/index.js";
|
|
6
|
-
import { info } from "../core/logger/core.js";
|
|
6
|
+
import { AstroIntegrationLogger, error, info, warn } from "../core/logger/core.js";
|
|
7
7
|
import { isServerLikeOutput } from "../prerender/utils.js";
|
|
8
|
+
import { validateSupportedFeatures } from "./astroFeaturesValidation.js";
|
|
8
9
|
async function withTakingALongTimeMsg({
|
|
9
10
|
name,
|
|
10
11
|
hookResult,
|
|
@@ -18,13 +19,21 @@ async function withTakingALongTimeMsg({
|
|
|
18
19
|
clearTimeout(timeout);
|
|
19
20
|
return result;
|
|
20
21
|
}
|
|
22
|
+
const Loggers = /* @__PURE__ */ new WeakMap();
|
|
23
|
+
function getLogger(integration, logging) {
|
|
24
|
+
if (Loggers.has(integration)) {
|
|
25
|
+
return Loggers.get(integration);
|
|
26
|
+
}
|
|
27
|
+
const logger = new AstroIntegrationLogger(logging, integration.name);
|
|
28
|
+
Loggers.set(integration, logger);
|
|
29
|
+
return logger;
|
|
30
|
+
}
|
|
21
31
|
async function runHookConfigSetup({
|
|
22
32
|
settings,
|
|
23
33
|
command,
|
|
24
34
|
logging,
|
|
25
35
|
isRestart = false
|
|
26
36
|
}) {
|
|
27
|
-
var _a;
|
|
28
37
|
if (settings.config.adapter) {
|
|
29
38
|
settings.config.integrations.push(settings.config.adapter);
|
|
30
39
|
}
|
|
@@ -32,7 +41,7 @@ async function runHookConfigSetup({
|
|
|
32
41
|
let updatedSettings = { ...settings, config: updatedConfig };
|
|
33
42
|
let addedClientDirectives = /* @__PURE__ */ new Map();
|
|
34
43
|
for (const integration of settings.config.integrations) {
|
|
35
|
-
if (
|
|
44
|
+
if (integration.hooks?.["astro:config:setup"]) {
|
|
36
45
|
let addPageExtension2 = function(...input) {
|
|
37
46
|
const exts = input.flat(Infinity).map((ext) => `.${ext.replace(/^\./, "")}`);
|
|
38
47
|
updatedSettings.pageExtensions.push(...exts);
|
|
@@ -42,6 +51,7 @@ async function runHookConfigSetup({
|
|
|
42
51
|
updatedSettings.dataEntryTypes.push(dataEntryType);
|
|
43
52
|
};
|
|
44
53
|
var addPageExtension = addPageExtension2, addContentEntryType = addContentEntryType2, addDataEntryType = addDataEntryType2;
|
|
54
|
+
const logger = getLogger(integration, logging);
|
|
45
55
|
const hooks = {
|
|
46
56
|
config: updatedConfig,
|
|
47
57
|
command,
|
|
@@ -74,7 +84,8 @@ async function runHookConfigSetup({
|
|
|
74
84
|
);
|
|
75
85
|
}
|
|
76
86
|
addedClientDirectives.set(name, buildClientDirectiveEntrypoint(name, entrypoint));
|
|
77
|
-
}
|
|
87
|
+
},
|
|
88
|
+
logger
|
|
78
89
|
};
|
|
79
90
|
Object.defineProperty(hooks, "addPageExtension", {
|
|
80
91
|
value: addPageExtension2,
|
|
@@ -108,9 +119,9 @@ async function runHookConfigDone({
|
|
|
108
119
|
settings,
|
|
109
120
|
logging
|
|
110
121
|
}) {
|
|
111
|
-
var _a;
|
|
112
122
|
for (const integration of settings.config.integrations) {
|
|
113
|
-
|
|
123
|
+
const logger = getLogger(integration, logging);
|
|
124
|
+
if (integration?.hooks?.["astro:config:done"]) {
|
|
114
125
|
await withTakingALongTimeMsg({
|
|
115
126
|
name: integration.name,
|
|
116
127
|
hookResult: integration.hooks["astro:config:done"]({
|
|
@@ -121,8 +132,43 @@ async function runHookConfigDone({
|
|
|
121
132
|
`Integration "${integration.name}" conflicts with "${settings.adapter.name}". You can only configure one deployment integration.`
|
|
122
133
|
);
|
|
123
134
|
}
|
|
135
|
+
if (!adapter.supportedAstroFeatures) {
|
|
136
|
+
warn(
|
|
137
|
+
logging,
|
|
138
|
+
"astro",
|
|
139
|
+
`The adapter ${adapter.name} doesn't provide a feature map. From Astro 3.0, an adapter can provide a feature map. Not providing a feature map will cause an error in Astro 4.0.`
|
|
140
|
+
);
|
|
141
|
+
} else {
|
|
142
|
+
const validationResult = validateSupportedFeatures(
|
|
143
|
+
adapter.name,
|
|
144
|
+
adapter.supportedAstroFeatures,
|
|
145
|
+
settings.config,
|
|
146
|
+
logging
|
|
147
|
+
);
|
|
148
|
+
for (const [featureName, supported] of Object.entries(validationResult)) {
|
|
149
|
+
if (!supported) {
|
|
150
|
+
error(
|
|
151
|
+
logging,
|
|
152
|
+
"astro",
|
|
153
|
+
`The adapter ${adapter.name} doesn't support the feature ${featureName}. Your project won't be built. You should not use it.`
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (!validationResult.assets) {
|
|
158
|
+
info(
|
|
159
|
+
logging,
|
|
160
|
+
"astro",
|
|
161
|
+
`The selected adapter ${adapter.name} does not support Sharp or Squoosh for image processing. To ensure your project is still able to build, image processing has been disabled.`
|
|
162
|
+
);
|
|
163
|
+
settings.config.image.service = {
|
|
164
|
+
entrypoint: "astro/assets/services/noop",
|
|
165
|
+
config: {}
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}
|
|
124
169
|
settings.adapter = adapter;
|
|
125
|
-
}
|
|
170
|
+
},
|
|
171
|
+
logger
|
|
126
172
|
}),
|
|
127
173
|
logging
|
|
128
174
|
});
|
|
@@ -134,12 +180,12 @@ async function runHookServerSetup({
|
|
|
134
180
|
server,
|
|
135
181
|
logging
|
|
136
182
|
}) {
|
|
137
|
-
var _a;
|
|
138
183
|
for (const integration of config.integrations) {
|
|
139
|
-
if (
|
|
184
|
+
if (integration?.hooks?.["astro:server:setup"]) {
|
|
185
|
+
const logger = getLogger(integration, logging);
|
|
140
186
|
await withTakingALongTimeMsg({
|
|
141
187
|
name: integration.name,
|
|
142
|
-
hookResult: integration.hooks["astro:server:setup"]({ server }),
|
|
188
|
+
hookResult: integration.hooks["astro:server:setup"]({ server, logger }),
|
|
143
189
|
logging
|
|
144
190
|
});
|
|
145
191
|
}
|
|
@@ -150,12 +196,12 @@ async function runHookServerStart({
|
|
|
150
196
|
address,
|
|
151
197
|
logging
|
|
152
198
|
}) {
|
|
153
|
-
var _a;
|
|
154
199
|
for (const integration of config.integrations) {
|
|
155
|
-
|
|
200
|
+
const logger = getLogger(integration, logging);
|
|
201
|
+
if (integration?.hooks?.["astro:server:start"]) {
|
|
156
202
|
await withTakingALongTimeMsg({
|
|
157
203
|
name: integration.name,
|
|
158
|
-
hookResult: integration.hooks["astro:server:start"]({ address }),
|
|
204
|
+
hookResult: integration.hooks["astro:server:start"]({ address, logger }),
|
|
159
205
|
logging
|
|
160
206
|
});
|
|
161
207
|
}
|
|
@@ -165,12 +211,12 @@ async function runHookServerDone({
|
|
|
165
211
|
config,
|
|
166
212
|
logging
|
|
167
213
|
}) {
|
|
168
|
-
var _a;
|
|
169
214
|
for (const integration of config.integrations) {
|
|
170
|
-
|
|
215
|
+
const logger = getLogger(integration, logging);
|
|
216
|
+
if (integration?.hooks?.["astro:server:done"]) {
|
|
171
217
|
await withTakingALongTimeMsg({
|
|
172
218
|
name: integration.name,
|
|
173
|
-
hookResult: integration.hooks["astro:server:done"](),
|
|
219
|
+
hookResult: integration.hooks["astro:server:done"]({ logger }),
|
|
174
220
|
logging
|
|
175
221
|
});
|
|
176
222
|
}
|
|
@@ -180,12 +226,12 @@ async function runHookBuildStart({
|
|
|
180
226
|
config,
|
|
181
227
|
logging
|
|
182
228
|
}) {
|
|
183
|
-
var _a;
|
|
184
229
|
for (const integration of config.integrations) {
|
|
185
|
-
if (
|
|
230
|
+
if (integration?.hooks?.["astro:build:start"]) {
|
|
231
|
+
const logger = getLogger(integration, logging);
|
|
186
232
|
await withTakingALongTimeMsg({
|
|
187
233
|
name: integration.name,
|
|
188
|
-
hookResult: integration.hooks["astro:build:start"](),
|
|
234
|
+
hookResult: integration.hooks["astro:build:start"]({ logger }),
|
|
189
235
|
logging
|
|
190
236
|
});
|
|
191
237
|
}
|
|
@@ -198,10 +244,10 @@ async function runHookBuildSetup({
|
|
|
198
244
|
target,
|
|
199
245
|
logging
|
|
200
246
|
}) {
|
|
201
|
-
var _a;
|
|
202
247
|
let updatedConfig = vite;
|
|
203
248
|
for (const integration of config.integrations) {
|
|
204
|
-
if (
|
|
249
|
+
if (integration?.hooks?.["astro:build:setup"]) {
|
|
250
|
+
const logger = getLogger(integration, logging);
|
|
205
251
|
await withTakingALongTimeMsg({
|
|
206
252
|
name: integration.name,
|
|
207
253
|
hookResult: integration.hooks["astro:build:setup"]({
|
|
@@ -210,7 +256,8 @@ async function runHookBuildSetup({
|
|
|
210
256
|
target,
|
|
211
257
|
updateConfig: (newConfig) => {
|
|
212
258
|
updatedConfig = mergeConfig(updatedConfig, newConfig);
|
|
213
|
-
}
|
|
259
|
+
},
|
|
260
|
+
logger
|
|
214
261
|
}),
|
|
215
262
|
logging
|
|
216
263
|
});
|
|
@@ -225,15 +272,16 @@ async function runHookBuildSsr({
|
|
|
225
272
|
entryPoints,
|
|
226
273
|
middlewareEntryPoint
|
|
227
274
|
}) {
|
|
228
|
-
var _a;
|
|
229
275
|
for (const integration of config.integrations) {
|
|
230
|
-
if (
|
|
276
|
+
if (integration?.hooks?.["astro:build:ssr"]) {
|
|
277
|
+
const logger = getLogger(integration, logging);
|
|
231
278
|
await withTakingALongTimeMsg({
|
|
232
279
|
name: integration.name,
|
|
233
280
|
hookResult: integration.hooks["astro:build:ssr"]({
|
|
234
281
|
manifest,
|
|
235
282
|
entryPoints,
|
|
236
|
-
middlewareEntryPoint
|
|
283
|
+
middlewareEntryPoint,
|
|
284
|
+
logger
|
|
237
285
|
}),
|
|
238
286
|
logging
|
|
239
287
|
});
|
|
@@ -244,37 +292,54 @@ async function runHookBuildGenerated({
|
|
|
244
292
|
config,
|
|
245
293
|
logging
|
|
246
294
|
}) {
|
|
247
|
-
var _a;
|
|
248
295
|
const dir = isServerLikeOutput(config) ? config.build.client : config.outDir;
|
|
249
296
|
for (const integration of config.integrations) {
|
|
250
|
-
|
|
297
|
+
const logger = getLogger(integration, logging);
|
|
298
|
+
if (integration?.hooks?.["astro:build:generated"]) {
|
|
251
299
|
await withTakingALongTimeMsg({
|
|
252
300
|
name: integration.name,
|
|
253
|
-
hookResult: integration.hooks["astro:build:generated"]({ dir }),
|
|
301
|
+
hookResult: integration.hooks["astro:build:generated"]({ dir, logger }),
|
|
254
302
|
logging
|
|
255
303
|
});
|
|
256
304
|
}
|
|
257
305
|
}
|
|
258
306
|
}
|
|
259
307
|
async function runHookBuildDone({ config, pages, routes, logging }) {
|
|
260
|
-
var _a;
|
|
261
308
|
const dir = isServerLikeOutput(config) ? config.build.client : config.outDir;
|
|
262
309
|
await fs.promises.mkdir(dir, { recursive: true });
|
|
263
310
|
for (const integration of config.integrations) {
|
|
264
|
-
if (
|
|
311
|
+
if (integration?.hooks?.["astro:build:done"]) {
|
|
312
|
+
const logger = getLogger(integration, logging);
|
|
265
313
|
await withTakingALongTimeMsg({
|
|
266
314
|
name: integration.name,
|
|
267
315
|
hookResult: integration.hooks["astro:build:done"]({
|
|
268
316
|
pages: pages.map((p) => ({ pathname: p })),
|
|
269
317
|
dir,
|
|
270
|
-
routes
|
|
318
|
+
routes,
|
|
319
|
+
logger
|
|
271
320
|
}),
|
|
272
321
|
logging
|
|
273
322
|
});
|
|
274
323
|
}
|
|
275
324
|
}
|
|
276
325
|
}
|
|
326
|
+
function isFunctionPerRouteEnabled(adapter) {
|
|
327
|
+
if (adapter?.adapterFeatures?.functionPerRoute === true) {
|
|
328
|
+
return true;
|
|
329
|
+
} else {
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
function isEdgeMiddlewareEnabled(adapter) {
|
|
334
|
+
if (adapter?.adapterFeatures?.edgeMiddleware === true) {
|
|
335
|
+
return true;
|
|
336
|
+
} else {
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
277
340
|
export {
|
|
341
|
+
isEdgeMiddlewareEnabled,
|
|
342
|
+
isFunctionPerRouteEnabled,
|
|
278
343
|
runHookBuildDone,
|
|
279
344
|
runHookBuildGenerated,
|
|
280
345
|
runHookBuildSetup,
|
package/dist/jsx/babel.js
CHANGED
|
@@ -163,9 +163,8 @@ function astroJSX() {
|
|
|
163
163
|
state.set("imports", imports);
|
|
164
164
|
},
|
|
165
165
|
JSXMemberExpression(path, state) {
|
|
166
|
-
var _a;
|
|
167
166
|
const node = path.node;
|
|
168
|
-
if (
|
|
167
|
+
if (state.filename?.endsWith(".mdx") && t.isJSXIdentifier(node.object) && node.object.name === "_components") {
|
|
169
168
|
return;
|
|
170
169
|
}
|
|
171
170
|
const parent = path.findParent((n) => t.isJSXElement(n.node));
|
|
@@ -11,8 +11,7 @@ function getPrerenderStatus({
|
|
|
11
11
|
return prerenderStatus;
|
|
12
12
|
}
|
|
13
13
|
function getPrerenderMetadata(moduleInfo) {
|
|
14
|
-
|
|
15
|
-
return (_c = (_b = (_a = moduleInfo == null ? void 0 : moduleInfo.meta) == null ? void 0 : _a.astro) == null ? void 0 : _b.pageOptions) == null ? void 0 : _c.prerender;
|
|
14
|
+
return moduleInfo?.meta?.astro?.pageOptions?.prerender;
|
|
16
15
|
}
|
|
17
16
|
export {
|
|
18
17
|
getPrerenderMetadata,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
if (import.meta.hot) {
|
|
2
2
|
const injectedStyles = getInjectedStyles();
|
|
3
3
|
const mo = new MutationObserver((records) => {
|
|
4
|
-
var _a;
|
|
5
4
|
for (const record of records) {
|
|
6
5
|
for (const node of record.addedNodes) {
|
|
7
6
|
if (isViteInjectedStyle(node)) {
|
|
8
|
-
|
|
7
|
+
injectedStyles.get(node.getAttribute("data-vite-dev-id"))?.remove();
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
10
|
}
|
|
@@ -7,8 +7,7 @@ function validateArgs(args) {
|
|
|
7
7
|
return true;
|
|
8
8
|
}
|
|
9
9
|
function baseCreateComponent(cb, moduleId, propagation) {
|
|
10
|
-
|
|
11
|
-
const name = ((_a = moduleId == null ? void 0 : moduleId.split("/").pop()) == null ? void 0 : _a.replace(".astro", "")) ?? "";
|
|
10
|
+
const name = moduleId?.split("/").pop()?.replace(".astro", "") ?? "";
|
|
12
11
|
const fn = (...args) => {
|
|
13
12
|
if (!validateArgs(args)) {
|
|
14
13
|
throw new AstroError({
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _a;
|
|
2
1
|
{
|
|
3
2
|
const propTypes = {
|
|
4
3
|
0: (value) => value,
|
|
@@ -22,59 +21,10 @@ var _a;
|
|
|
22
21
|
if (!customElements.get("astro-island")) {
|
|
23
22
|
customElements.define(
|
|
24
23
|
"astro-island",
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var _a2;
|
|
30
|
-
if (!this.hydrator)
|
|
31
|
-
return;
|
|
32
|
-
if (!this.isConnected)
|
|
33
|
-
return;
|
|
34
|
-
const parentSsrIsland = (_a2 = this.parentElement) == null ? void 0 : _a2.closest("astro-island[ssr]");
|
|
35
|
-
if (parentSsrIsland) {
|
|
36
|
-
parentSsrIsland.addEventListener("astro:hydrate", this.hydrate, { once: true });
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const slotted = this.querySelectorAll("astro-slot");
|
|
40
|
-
const slots = {};
|
|
41
|
-
const templates = this.querySelectorAll("template[data-astro-template]");
|
|
42
|
-
for (const template of templates) {
|
|
43
|
-
const closest = template.closest(this.tagName);
|
|
44
|
-
if (!(closest == null ? void 0 : closest.isSameNode(this)))
|
|
45
|
-
continue;
|
|
46
|
-
slots[template.getAttribute("data-astro-template") || "default"] = template.innerHTML;
|
|
47
|
-
template.remove();
|
|
48
|
-
}
|
|
49
|
-
for (const slot of slotted) {
|
|
50
|
-
const closest = slot.closest(this.tagName);
|
|
51
|
-
if (!(closest == null ? void 0 : closest.isSameNode(this)))
|
|
52
|
-
continue;
|
|
53
|
-
slots[slot.getAttribute("name") || "default"] = slot.innerHTML;
|
|
54
|
-
}
|
|
55
|
-
let props;
|
|
56
|
-
try {
|
|
57
|
-
props = this.hasAttribute("props") ? JSON.parse(this.getAttribute("props"), reviver) : {};
|
|
58
|
-
} catch (e) {
|
|
59
|
-
let componentName = this.getAttribute("component-url") || "<unknown>";
|
|
60
|
-
const componentExport = this.getAttribute("component-export");
|
|
61
|
-
if (componentExport) {
|
|
62
|
-
componentName += ` (export ${componentExport})`;
|
|
63
|
-
}
|
|
64
|
-
console.error(
|
|
65
|
-
`[hydrate] Error parsing props for component ${componentName}`,
|
|
66
|
-
this.getAttribute("props"),
|
|
67
|
-
e
|
|
68
|
-
);
|
|
69
|
-
throw e;
|
|
70
|
-
}
|
|
71
|
-
await this.hydrator(this)(this.Component, props, slots, {
|
|
72
|
-
client: this.getAttribute("client")
|
|
73
|
-
});
|
|
74
|
-
this.removeAttribute("ssr");
|
|
75
|
-
this.dispatchEvent(new CustomEvent("astro:hydrate"));
|
|
76
|
-
};
|
|
77
|
-
}
|
|
24
|
+
class extends HTMLElement {
|
|
25
|
+
Component;
|
|
26
|
+
hydrator;
|
|
27
|
+
static observedAttributes = ["props"];
|
|
78
28
|
connectedCallback() {
|
|
79
29
|
if (!this.hasAttribute("await-children") || this.firstChild) {
|
|
80
30
|
this.childrenConnectedCallback();
|
|
@@ -123,10 +73,58 @@ var _a;
|
|
|
123
73
|
this
|
|
124
74
|
);
|
|
125
75
|
}
|
|
76
|
+
hydrate = async () => {
|
|
77
|
+
if (!this.hydrator)
|
|
78
|
+
return;
|
|
79
|
+
if (!this.isConnected)
|
|
80
|
+
return;
|
|
81
|
+
const parentSsrIsland = this.parentElement?.closest("astro-island[ssr]");
|
|
82
|
+
if (parentSsrIsland) {
|
|
83
|
+
parentSsrIsland.addEventListener("astro:hydrate", this.hydrate, { once: true });
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const slotted = this.querySelectorAll("astro-slot");
|
|
87
|
+
const slots = {};
|
|
88
|
+
const templates = this.querySelectorAll("template[data-astro-template]");
|
|
89
|
+
for (const template of templates) {
|
|
90
|
+
const closest = template.closest(this.tagName);
|
|
91
|
+
if (!closest?.isSameNode(this))
|
|
92
|
+
continue;
|
|
93
|
+
slots[template.getAttribute("data-astro-template") || "default"] = template.innerHTML;
|
|
94
|
+
template.remove();
|
|
95
|
+
}
|
|
96
|
+
for (const slot of slotted) {
|
|
97
|
+
const closest = slot.closest(this.tagName);
|
|
98
|
+
if (!closest?.isSameNode(this))
|
|
99
|
+
continue;
|
|
100
|
+
slots[slot.getAttribute("name") || "default"] = slot.innerHTML;
|
|
101
|
+
}
|
|
102
|
+
let props;
|
|
103
|
+
try {
|
|
104
|
+
props = this.hasAttribute("props") ? JSON.parse(this.getAttribute("props"), reviver) : {};
|
|
105
|
+
} catch (e) {
|
|
106
|
+
let componentName = this.getAttribute("component-url") || "<unknown>";
|
|
107
|
+
const componentExport = this.getAttribute("component-export");
|
|
108
|
+
if (componentExport) {
|
|
109
|
+
componentName += ` (export ${componentExport})`;
|
|
110
|
+
}
|
|
111
|
+
console.error(
|
|
112
|
+
`[hydrate] Error parsing props for component ${componentName}`,
|
|
113
|
+
this.getAttribute("props"),
|
|
114
|
+
e
|
|
115
|
+
);
|
|
116
|
+
throw e;
|
|
117
|
+
}
|
|
118
|
+
await this.hydrator(this)(this.Component, props, slots, {
|
|
119
|
+
client: this.getAttribute("client")
|
|
120
|
+
});
|
|
121
|
+
this.removeAttribute("ssr");
|
|
122
|
+
this.dispatchEvent(new CustomEvent("astro:hydrate"));
|
|
123
|
+
};
|
|
126
124
|
attributeChangedCallback() {
|
|
127
125
|
this.hydrate();
|
|
128
126
|
}
|
|
129
|
-
}
|
|
127
|
+
}
|
|
130
128
|
);
|
|
131
129
|
}
|
|
132
130
|
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Do not edit this directly, but instead edit that file and rerun the prebuild
|
|
4
4
|
* to generate this file.
|
|
5
5
|
*/
|
|
6
|
-
declare const _default: "(()=>{var
|
|
6
|
+
declare const _default: "(()=>{var m=Object.defineProperty;var y=(o,r,t)=>r in o?m(o,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[r]=t;var l=(o,r,t)=>(y(o,typeof r!=\"symbol\"?r+\"\":r,t),t);var h;{let o={0:t=>t,1:t=>JSON.parse(t,r),2:t=>new RegExp(t),3:t=>new Date(t),4:t=>new Map(JSON.parse(t,r)),5:t=>new Set(JSON.parse(t,r)),6:t=>BigInt(t),7:t=>new URL(t),8:t=>new Uint8Array(JSON.parse(t)),9:t=>new Uint16Array(JSON.parse(t)),10:t=>new Uint32Array(JSON.parse(t))},r=(t,s)=>{if(t===\"\"||!Array.isArray(s))return s;let[n,a]=s;return n in o?o[n](a):void 0};customElements.get(\"astro-island\")||customElements.define(\"astro-island\",(h=class extends HTMLElement{constructor(){super(...arguments);l(this,\"Component\");l(this,\"hydrator\");l(this,\"hydrate\",async()=>{var c;if(!this.hydrator||!this.isConnected)return;let s=(c=this.parentElement)==null?void 0:c.closest(\"astro-island[ssr]\");if(s){s.addEventListener(\"astro:hydrate\",this.hydrate,{once:!0});return}let n=this.querySelectorAll(\"astro-slot\"),a={},d=this.querySelectorAll(\"template[data-astro-template]\");for(let e of d){let i=e.closest(this.tagName);i!=null&&i.isSameNode(this)&&(a[e.getAttribute(\"data-astro-template\")||\"default\"]=e.innerHTML,e.remove())}for(let e of n){let i=e.closest(this.tagName);i!=null&&i.isSameNode(this)&&(a[e.getAttribute(\"name\")||\"default\"]=e.innerHTML)}let p;try{p=this.hasAttribute(\"props\")?JSON.parse(this.getAttribute(\"props\"),r):{}}catch(e){let i=this.getAttribute(\"component-url\")||\"<unknown>\",u=this.getAttribute(\"component-export\");throw u&&(i+=` (export ${u})`),console.error(`[hydrate] Error parsing props for component ${i}`,this.getAttribute(\"props\"),e),e}await this.hydrator(this)(this.Component,p,a,{client:this.getAttribute(\"client\")}),this.removeAttribute(\"ssr\"),this.dispatchEvent(new CustomEvent(\"astro:hydrate\"))})}connectedCallback(){!this.hasAttribute(\"await-children\")||this.firstChild?this.childrenConnectedCallback():new MutationObserver((s,n)=>{n.disconnect(),setTimeout(()=>this.childrenConnectedCallback(),0)}).observe(this,{childList:!0})}async childrenConnectedCallback(){let s=this.getAttribute(\"before-hydration-url\");s&&await import(s),this.start()}start(){let s=JSON.parse(this.getAttribute(\"opts\")),n=this.getAttribute(\"client\");if(Astro[n]===void 0){window.addEventListener(`astro:${n}`,()=>this.start(),{once:!0});return}Astro[n](async()=>{let a=this.getAttribute(\"renderer-url\"),[d,{default:p}]=await Promise.all([import(this.getAttribute(\"component-url\")),a?import(a):()=>()=>{}]),c=this.getAttribute(\"component-export\")||\"default\";if(!c.includes(\".\"))this.Component=d[c];else{this.Component=d;for(let e of c.split(\".\"))this.Component=this.Component[e]}return this.hydrator=p,this.hydrate},s,this)}attributeChangedCallback(){this.hydrate()}},l(h,\"observedAttributes\",[\"props\"]),h))}})();";
|
|
7
7
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var astro_island_prebuilt_default = `(()=>{var
|
|
1
|
+
var astro_island_prebuilt_default = `(()=>{var m=Object.defineProperty;var y=(o,r,t)=>r in o?m(o,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[r]=t;var l=(o,r,t)=>(y(o,typeof r!="symbol"?r+"":r,t),t);var h;{let o={0:t=>t,1:t=>JSON.parse(t,r),2:t=>new RegExp(t),3:t=>new Date(t),4:t=>new Map(JSON.parse(t,r)),5:t=>new Set(JSON.parse(t,r)),6:t=>BigInt(t),7:t=>new URL(t),8:t=>new Uint8Array(JSON.parse(t)),9:t=>new Uint16Array(JSON.parse(t)),10:t=>new Uint32Array(JSON.parse(t))},r=(t,s)=>{if(t===""||!Array.isArray(s))return s;let[n,a]=s;return n in o?o[n](a):void 0};customElements.get("astro-island")||customElements.define("astro-island",(h=class extends HTMLElement{constructor(){super(...arguments);l(this,"Component");l(this,"hydrator");l(this,"hydrate",async()=>{var c;if(!this.hydrator||!this.isConnected)return;let s=(c=this.parentElement)==null?void 0:c.closest("astro-island[ssr]");if(s){s.addEventListener("astro:hydrate",this.hydrate,{once:!0});return}let n=this.querySelectorAll("astro-slot"),a={},d=this.querySelectorAll("template[data-astro-template]");for(let e of d){let i=e.closest(this.tagName);i!=null&&i.isSameNode(this)&&(a[e.getAttribute("data-astro-template")||"default"]=e.innerHTML,e.remove())}for(let e of n){let i=e.closest(this.tagName);i!=null&&i.isSameNode(this)&&(a[e.getAttribute("name")||"default"]=e.innerHTML)}let p;try{p=this.hasAttribute("props")?JSON.parse(this.getAttribute("props"),r):{}}catch(e){let i=this.getAttribute("component-url")||"<unknown>",u=this.getAttribute("component-export");throw u&&(i+=\` (export \${u})\`),console.error(\`[hydrate] Error parsing props for component \${i}\`,this.getAttribute("props"),e),e}await this.hydrator(this)(this.Component,p,a,{client:this.getAttribute("client")}),this.removeAttribute("ssr"),this.dispatchEvent(new CustomEvent("astro:hydrate"))})}connectedCallback(){!this.hasAttribute("await-children")||this.firstChild?this.childrenConnectedCallback():new MutationObserver((s,n)=>{n.disconnect(),setTimeout(()=>this.childrenConnectedCallback(),0)}).observe(this,{childList:!0})}async childrenConnectedCallback(){let s=this.getAttribute("before-hydration-url");s&&await import(s),this.start()}start(){let s=JSON.parse(this.getAttribute("opts")),n=this.getAttribute("client");if(Astro[n]===void 0){window.addEventListener(\`astro:\${n}\`,()=>this.start(),{once:!0});return}Astro[n](async()=>{let a=this.getAttribute("renderer-url"),[d,{default:p}]=await Promise.all([import(this.getAttribute("component-url")),a?import(a):()=>()=>{}]),c=this.getAttribute("component-export")||"default";if(!c.includes("."))this.Component=d[c];else{this.Component=d;for(let e of c.split("."))this.Component=this.Component[e]}return this.hydrator=p,this.hydrate},s,this)}attributeChangedCallback(){this.hydrate()}},l(h,"observedAttributes",["props"]),h))}})();`;
|
|
2
2
|
export {
|
|
3
3
|
astro_island_prebuilt_default as default
|
|
4
4
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { APIContext, EndpointHandler } from '../../@types/astro';
|
|
2
|
+
import { type LogOptions } from '../../core/logger/core.js';
|
|
2
3
|
/** Renders an endpoint request to completion, returning the body. */
|
|
3
|
-
export declare function renderEndpoint(mod: EndpointHandler, context: APIContext, ssr: boolean): Promise<Response | import("../../@types/astro").EndpointOutput>;
|
|
4
|
+
export declare function renderEndpoint(mod: EndpointHandler, context: APIContext, ssr: boolean, logging: LogOptions): Promise<Response | import("../../@types/astro").EndpointOutput>;
|
|
@@ -1,21 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
import { warn } from "../../core/logger/core.js";
|
|
2
|
+
function getHandlerFromModule(mod, method, logging) {
|
|
3
|
+
const lowerCaseMethod = method.toLowerCase();
|
|
4
|
+
if (mod[lowerCaseMethod]) {
|
|
5
|
+
warn(
|
|
6
|
+
logging,
|
|
7
|
+
"astro",
|
|
8
|
+
`Lower case endpoint names are deprecated and will not be supported in Astro 4.0. Rename the endpoint ${lowerCaseMethod} to ${method}.`
|
|
9
|
+
);
|
|
10
|
+
}
|
|
2
11
|
if (mod[method]) {
|
|
3
12
|
return mod[method];
|
|
4
13
|
}
|
|
14
|
+
if (mod[lowerCaseMethod]) {
|
|
15
|
+
return mod[lowerCaseMethod];
|
|
16
|
+
}
|
|
5
17
|
if (method === "delete" && mod["del"]) {
|
|
6
18
|
return mod["del"];
|
|
7
19
|
}
|
|
8
20
|
if (mod["all"]) {
|
|
9
21
|
return mod["all"];
|
|
10
22
|
}
|
|
23
|
+
if (mod["ALL"]) {
|
|
24
|
+
return mod["ALL"];
|
|
25
|
+
}
|
|
11
26
|
return void 0;
|
|
12
27
|
}
|
|
13
|
-
async function renderEndpoint(mod, context, ssr) {
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
if (!ssr && ssr === false && chosenMethod && chosenMethod !== "get") {
|
|
28
|
+
async function renderEndpoint(mod, context, ssr, logging) {
|
|
29
|
+
const { request } = context;
|
|
30
|
+
const chosenMethod = request.method?.toUpperCase();
|
|
31
|
+
const handler = getHandlerFromModule(mod, chosenMethod, logging);
|
|
32
|
+
if (!ssr && ssr === false && chosenMethod && chosenMethod !== "GET" && chosenMethod !== "get") {
|
|
19
33
|
console.warn(`
|
|
20
34
|
${chosenMethod} requests are not available when building a static site. Update your config to \`output: 'server'\` or \`output: 'hybrid'\` with an \`export const prerender = false\` to handle ${chosenMethod} requests.`);
|
|
21
35
|
}
|
|
@@ -28,30 +42,10 @@ ${chosenMethod} requests are not available when building a static site. Update y
|
|
|
28
42
|
});
|
|
29
43
|
return response;
|
|
30
44
|
}
|
|
31
|
-
if (handler.length > 1) {
|
|
32
|
-
console.warn(`
|
|
33
|
-
API routes with 2 arguments have been deprecated. Instead they take a single argument in the form of:
|
|
34
|
-
|
|
35
|
-
export function get({ params, request }) {
|
|
36
|
-
//...
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
Update your code to remove this warning.`);
|
|
40
|
-
}
|
|
41
45
|
const proxy = new Proxy(context, {
|
|
42
46
|
get(target, prop) {
|
|
43
47
|
if (prop in target) {
|
|
44
48
|
return Reflect.get(target, prop);
|
|
45
|
-
} else if (prop in params) {
|
|
46
|
-
console.warn(`
|
|
47
|
-
API routes no longer pass params as the first argument. Instead an object containing a params property is provided in the form of:
|
|
48
|
-
|
|
49
|
-
export function get({ params }) {
|
|
50
|
-
// ...
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
Update your code to remove this warning.`);
|
|
54
|
-
return Reflect.get(params, prop);
|
|
55
49
|
} else {
|
|
56
50
|
return void 0;
|
|
57
51
|
}
|
|
@@ -2,6 +2,10 @@ import { AstroError, AstroErrorData } from "../../core/errors/index.js";
|
|
|
2
2
|
import { escapeHTML } from "./escape.js";
|
|
3
3
|
import { serializeProps } from "./serialize.js";
|
|
4
4
|
import { serializeListValue } from "./util.js";
|
|
5
|
+
const transitionDirectivesToCopyOnIsland = Object.freeze([
|
|
6
|
+
"data-astro-transition-scope",
|
|
7
|
+
"data-astro-transition-persist"
|
|
8
|
+
]);
|
|
5
9
|
function extractDirectives(inputProps, clientDirectives) {
|
|
6
10
|
let extracted = {
|
|
7
11
|
isPage: false,
|
|
@@ -104,6 +108,11 @@ async function generateHydrateScript(scriptOptions, metadata) {
|
|
|
104
108
|
value: metadata.hydrateArgs || ""
|
|
105
109
|
})
|
|
106
110
|
);
|
|
111
|
+
transitionDirectivesToCopyOnIsland.forEach((name) => {
|
|
112
|
+
if (props[name]) {
|
|
113
|
+
island.props[name] = props[name];
|
|
114
|
+
}
|
|
115
|
+
});
|
|
107
116
|
return island;
|
|
108
117
|
}
|
|
109
118
|
export {
|
|
@@ -14,6 +14,7 @@ class Skip {
|
|
|
14
14
|
this.vnode = vnode;
|
|
15
15
|
this.count = 0;
|
|
16
16
|
}
|
|
17
|
+
count;
|
|
17
18
|
increment() {
|
|
18
19
|
this.count++;
|
|
19
20
|
}
|
|
@@ -23,8 +24,8 @@ class Skip {
|
|
|
23
24
|
isCompleted() {
|
|
24
25
|
return this.count > 2;
|
|
25
26
|
}
|
|
27
|
+
static symbol = Symbol("astro:jsx:skip");
|
|
26
28
|
}
|
|
27
|
-
Skip.symbol = Symbol("astro:jsx:skip");
|
|
28
29
|
let originalConsoleError;
|
|
29
30
|
let consoleFilterRefs = 0;
|
|
30
31
|
async function renderJSX(result, vnode) {
|
|
@@ -118,7 +119,7 @@ Did you forget to import the component or is it possible there is a typo?`);
|
|
|
118
119
|
try {
|
|
119
120
|
const output2 = await vnode.type(vnode.props ?? {});
|
|
120
121
|
let renderResult;
|
|
121
|
-
if (output2
|
|
122
|
+
if (output2?.[AstroJSX]) {
|
|
122
123
|
renderResult = await renderJSXVNode(result, output2, skip);
|
|
123
124
|
return renderResult;
|
|
124
125
|
} else if (!output2) {
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
var _a;
|
|
2
1
|
import { isPromise } from "../../util.js";
|
|
3
2
|
import { renderChild } from "../any.js";
|
|
4
3
|
import { isAPropagatingComponent } from "./factory.js";
|
|
5
4
|
import { isHeadAndContent } from "./head-and-content.js";
|
|
6
5
|
const astroComponentInstanceSym = Symbol.for("astro.componentInstance");
|
|
7
6
|
class AstroComponentInstance {
|
|
7
|
+
[astroComponentInstanceSym] = true;
|
|
8
|
+
result;
|
|
9
|
+
props;
|
|
10
|
+
slotValues;
|
|
11
|
+
factory;
|
|
12
|
+
returnValue;
|
|
8
13
|
constructor(result, props, slots, factory) {
|
|
9
|
-
this[_a] = true;
|
|
10
14
|
this.result = result;
|
|
11
15
|
this.props = props;
|
|
12
16
|
this.factory = factory;
|
|
@@ -37,7 +41,6 @@ class AstroComponentInstance {
|
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
|
-
_a = astroComponentInstanceSym;
|
|
41
44
|
function validateComponentProps(props, displayName) {
|
|
42
45
|
if (props != null) {
|
|
43
46
|
for (const prop of Object.keys(props)) {
|