@sveltejs/kit 1.0.0-next.440 → 1.0.0-next.441
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/package.json
CHANGED
|
@@ -109,23 +109,25 @@ function create_routes_and_nodes(cwd, config, fallback) {
|
|
|
109
109
|
|
|
110
110
|
segment_map.set(
|
|
111
111
|
id,
|
|
112
|
-
segments
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
112
|
+
segments
|
|
113
|
+
.filter((segment) => segment !== '' && affects_path(segment))
|
|
114
|
+
.map((segment) => {
|
|
115
|
+
/** @type {import('./types').Part[]} */
|
|
116
|
+
const parts = [];
|
|
117
|
+
segment.split(/\[(.+?)\]/).map((content, i) => {
|
|
118
|
+
const dynamic = !!(i % 2);
|
|
119
|
+
|
|
120
|
+
if (!content) return;
|
|
121
|
+
|
|
122
|
+
parts.push({
|
|
123
|
+
content,
|
|
124
|
+
dynamic,
|
|
125
|
+
rest: dynamic && content.startsWith('...'),
|
|
126
|
+
type: (dynamic && content.split('=')[1]) || null
|
|
127
|
+
});
|
|
125
128
|
});
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
})
|
|
129
|
+
return parts;
|
|
130
|
+
})
|
|
129
131
|
);
|
|
130
132
|
|
|
131
133
|
/** @type {import('types').RouteData} */
|
|
@@ -26,7 +26,7 @@ export function write_root(manifest_data, output) {
|
|
|
26
26
|
while (l--) {
|
|
27
27
|
pyramid = `
|
|
28
28
|
{#if components[${l + 1}]}
|
|
29
|
-
<svelte:component this={components[${l}]} data={data_${l}}>
|
|
29
|
+
<svelte:component this={components[${l}]} data={data_${l}} {errors}>
|
|
30
30
|
${pyramid.replace(/\n/g, '\n\t\t\t\t\t')}
|
|
31
31
|
</svelte:component>
|
|
32
32
|
{:else}
|