@strifeapp/astro 1.0.7 → 1.0.8
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/index.js +232 -178
- package/dist/services/ImageService.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { loadEnv as f } from "vite";
|
|
2
|
-
import
|
|
2
|
+
import a from "serialize-javascript";
|
|
3
3
|
const y = `/**
|
|
4
4
|
* Creates an indexed item that will be stored in the index.
|
|
5
5
|
* @param {string} name - Name of property to index
|
|
@@ -7,238 +7,291 @@ const y = `/**
|
|
|
7
7
|
* @returns a new object to index and store
|
|
8
8
|
*/
|
|
9
9
|
function storeAs(name, value) {
|
|
10
|
-
|
|
10
|
+
return {
|
|
11
11
|
$value: value,
|
|
12
12
|
$name: name,
|
|
13
|
-
$options: { storage: true }
|
|
14
|
-
|
|
15
|
-
}
|
|
13
|
+
$options: { storage: true },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* Create an indexed item without storing value in the index.
|
|
19
|
-
* @param {string} name - Name of the property to index
|
|
20
|
-
* @param {any} value - The value to index
|
|
21
|
-
* @returns a new object to index (no store)
|
|
22
|
-
*/
|
|
23
|
-
function indexAs(name, value) {
|
|
24
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Create an indexed item without storing value in the index.
|
|
19
|
+
* @param {string} name - Name of the property to index
|
|
20
|
+
* @param {any} value - The value to index
|
|
21
|
+
* @returns a new object to index (no store)
|
|
22
|
+
*/
|
|
23
|
+
function indexAs(name, value) {
|
|
24
|
+
return {
|
|
25
25
|
$value: value,
|
|
26
26
|
$name: name,
|
|
27
|
-
$options: { storage: false }
|
|
28
|
-
|
|
29
|
-
}
|
|
27
|
+
$options: { storage: false },
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
/**
|
|
32
|
-
* Loads the documents referenced by reference objects in the array
|
|
33
|
-
* @param {any} references - Array of document references: { id, collection }
|
|
34
|
-
* @returns The list of loaded documents.
|
|
35
|
-
*/
|
|
36
|
-
function loadRelatedDocuments(references) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
.filter(item => typeof item.id ===
|
|
40
|
-
.map(item => load(item.id, 'Labels'))
|
|
31
|
+
/**
|
|
32
|
+
* Loads the documents referenced by reference objects in the array
|
|
33
|
+
* @param {any} references - Array of document references: { id, collection }
|
|
34
|
+
* @returns The list of loaded documents.
|
|
35
|
+
*/
|
|
36
|
+
function loadRelatedDocuments(references) {
|
|
37
|
+
if (references == null) return null;
|
|
38
|
+
return references
|
|
39
|
+
.filter((item) => typeof item.id === 'string') // Ensure each ID is a string
|
|
40
|
+
.map((item) => load(item.id, 'Labels'))
|
|
41
41
|
.filter(Boolean); // Filter out any null/undefined values
|
|
42
|
-
}
|
|
43
|
-
|
|
42
|
+
}
|
|
44
43
|
|
|
45
|
-
/**
|
|
46
|
-
* Builds an url for a document by traversing its ancestor origins
|
|
47
|
-
* @param {*} doc - The leaf document
|
|
48
|
-
* @returns The full url of the document
|
|
49
|
-
*/
|
|
50
|
-
function buildUrl(doc) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Builds an url for a document by traversing its ancestor origins
|
|
46
|
+
* @param {*} doc - The leaf document
|
|
47
|
+
* @returns The full url of the document
|
|
48
|
+
*/
|
|
49
|
+
function buildUrl(doc) {
|
|
50
|
+
const visited = {};
|
|
51
|
+
const slugs = [];
|
|
52
|
+
let c = doc;
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
do {
|
|
56
55
|
if (c.slug) {
|
|
57
|
-
|
|
56
|
+
slugs.unshift(c.slug);
|
|
58
57
|
}
|
|
59
58
|
if (!c.origin || visited[c.origin.id]) break;
|
|
60
59
|
visited[c.origin.id] = true;
|
|
61
60
|
c = load(c.origin.id, c.origin.collection);
|
|
62
|
-
|
|
61
|
+
} while (c);
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
}
|
|
63
|
+
return slugs.shift() + slugs.join('/');
|
|
64
|
+
}
|
|
66
65
|
|
|
67
|
-
/**
|
|
68
|
-
* Editor types that contains {collection, id} references that we want to load
|
|
69
|
-
*/
|
|
70
|
-
const RELATION_EDITORS = [
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Loads the template document of the specified document
|
|
74
|
-
* @param {any} document - The document to index
|
|
75
|
-
* @returns The document's template, loaded
|
|
76
|
-
*/
|
|
77
|
-
function loadTemplate(document) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
66
|
+
/**
|
|
67
|
+
* Editor types that contains {collection, id} references that we want to load
|
|
68
|
+
*/
|
|
69
|
+
const RELATION_EDITORS = ['related', 'references'];
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Loads the template document of the specified document
|
|
73
|
+
* @param {any} document - The document to index
|
|
74
|
+
* @returns The document's template, loaded
|
|
75
|
+
*/
|
|
76
|
+
function loadTemplate(document) {
|
|
77
|
+
const collection = document['@metadata']['@collection'];
|
|
78
|
+
const template = load('templates/' + collection, 'templates');
|
|
79
|
+
return template;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Loads the metadata template
|
|
84
|
+
* @returns The metadata template
|
|
85
|
+
*/
|
|
86
|
+
function loadMetadataTemplate() {
|
|
87
|
+
const template = load('templates/metadata', 'templates');
|
|
88
|
+
return template;
|
|
89
|
+
}
|
|
82
90
|
|
|
83
|
-
/**
|
|
84
|
-
* Iterates the template's editors and copies the respective values to the
|
|
85
|
-
* result object. Properties containing references are resolved recursively.
|
|
86
|
-
* Mutually recursive with \`loadRelatedDocumentsRecurse\`.
|
|
87
|
-
* @param {*} document - The document to extract values from
|
|
88
|
-
* @param {*} template - The document's template
|
|
89
|
-
* @param {*}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
/**
|
|
92
|
+
* Iterates the template's editors and copies the respective values to the
|
|
93
|
+
* result object. Properties containing references are resolved recursively.
|
|
94
|
+
* Mutually recursive with \`loadRelatedDocumentsRecurse\`.
|
|
95
|
+
* @param {*} document - The document to extract values from
|
|
96
|
+
* @param {*} template - The document's template
|
|
97
|
+
* @param {*} metadataTemplate - The metadata template
|
|
98
|
+
* @param {*} result - The populated result
|
|
99
|
+
*/
|
|
100
|
+
function populateValuesByEditor(document, template, metadataTemplate, result, loadedDocs) {
|
|
101
|
+
const aggregatedEditors = template.editors.concat(metadataTemplate.editors);
|
|
102
|
+
// Add dynamic fields and handle "related" type
|
|
103
|
+
aggregatedEditors.forEach((editor) => {
|
|
94
104
|
if (editor.editor && editor.editor.propertyName) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
const propertyName = editor.editor.propertyName;
|
|
106
|
+
|
|
107
|
+
if (RELATION_EDITORS.includes(editor.editor.type) && Array.isArray(document[propertyName])) {
|
|
108
|
+
// Load related documents in the array of document references
|
|
109
|
+
const relatedDocs = loadRelatedDocumentsRecurse(document[propertyName], metadataTemplate, loadedDocs);
|
|
110
|
+
result[propertyName] = relatedDocs;
|
|
111
|
+
} else if (editor.editor.type === 'content-template') {
|
|
112
|
+
const content = document[propertyName];
|
|
113
|
+
if (content) {
|
|
114
|
+
const contentTemplate = load(editor.editor.attributes.templateId, 'templates');
|
|
115
|
+
const docResult = {};
|
|
116
|
+
populateValuesByEditor(content, contentTemplate, metadataTemplate, docResult, loadedDocs);
|
|
117
|
+
result[propertyName] = docResult;
|
|
118
|
+
}
|
|
119
|
+
} else if (editor.editor.type === 'chapters') {
|
|
120
|
+
const chapters = document[propertyName];
|
|
121
|
+
if (chapters && Array.isArray(chapters)) {
|
|
122
|
+
const docResults = [];
|
|
123
|
+
chapters.forEach((chapter) => {
|
|
124
|
+
if (chapter['@strife'] && chapter['@strife'].templateId) {
|
|
125
|
+
const docResult = {};
|
|
126
|
+
const chaptersTemplate = load(chapter['@strife'].templateId, 'templates');
|
|
127
|
+
populateValuesByEditor(chapter, chaptersTemplate, metadataTemplate, docResult, loadedDocs);
|
|
128
|
+
docResults.push(docResult);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
result[propertyName] = docResults;
|
|
104
132
|
}
|
|
133
|
+
} else if (document[propertyName] !== undefined) {
|
|
134
|
+
// For other types, index the field value directly
|
|
135
|
+
result[propertyName] = document[propertyName];
|
|
136
|
+
}
|
|
105
137
|
}
|
|
106
|
-
|
|
107
|
-
|
|
138
|
+
});
|
|
139
|
+
if (document['@strife']) {
|
|
108
140
|
result['@strife'] = document['@strife'];
|
|
141
|
+
}
|
|
109
142
|
}
|
|
110
|
-
}
|
|
111
143
|
|
|
112
|
-
/**
|
|
113
|
-
* Loads the documents referenced by the array of references. Mutually recursive
|
|
114
|
-
* with \`populateValuesByEditor\`.
|
|
115
|
-
* @param {*} references - List of references to load.
|
|
116
|
-
* @returns
|
|
117
|
-
*/
|
|
118
|
-
function loadRelatedDocumentsRecurse(references) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
.map(id =>
|
|
123
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Loads the documents referenced by the array of references. Mutually recursive
|
|
146
|
+
* with \`populateValuesByEditor\`.
|
|
147
|
+
* @param {*} references - List of references to load.
|
|
148
|
+
* @returns
|
|
149
|
+
*/
|
|
150
|
+
function loadRelatedDocumentsRecurse(references, metadataTemplate, loadedDocs) {
|
|
151
|
+
if (references == null) return null;
|
|
152
|
+
const documents = references
|
|
153
|
+
.map((id) => (typeof id === 'string' ? id : id.id))
|
|
154
|
+
.map((id) => {
|
|
155
|
+
if (loadedDocs.has(id)) return null;
|
|
156
|
+
|
|
157
|
+
const aDoc = load(id, '@all_docs');
|
|
158
|
+
|
|
159
|
+
if (aDoc) {
|
|
160
|
+
loadedDocs.add(id);
|
|
161
|
+
}
|
|
162
|
+
return aDoc;
|
|
163
|
+
})
|
|
124
164
|
.filter(Boolean); // Filter out any null/undefined values
|
|
125
165
|
|
|
126
|
-
|
|
127
|
-
|
|
166
|
+
const docResults = [];
|
|
167
|
+
documents.forEach((doc) => {
|
|
128
168
|
const template = loadTemplate(doc);
|
|
129
169
|
const docResult = {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
170
|
+
id: Id(doc),
|
|
171
|
+
url: buildUrl(doc),
|
|
172
|
+
collection: doc['@metadata']['@collection'],
|
|
173
|
+
labels: loadRelatedDocuments(
|
|
174
|
+
doc.labels.map((l) => {
|
|
175
|
+
return { id: l, collection: 'Labels' };
|
|
176
|
+
}),
|
|
177
|
+
),
|
|
135
178
|
};
|
|
136
|
-
populateValuesByEditor(doc, template, docResult);
|
|
137
|
-
docResults.push(docResult)
|
|
138
|
-
|
|
179
|
+
populateValuesByEditor(doc, template, metadataTemplate, docResult, loadedDocs);
|
|
180
|
+
docResults.push(docResult);
|
|
181
|
+
});
|
|
139
182
|
|
|
140
|
-
|
|
141
|
-
}
|
|
183
|
+
return docResults;
|
|
184
|
+
}
|
|
142
185
|
|
|
143
|
-
/**
|
|
144
|
-
* Maps a document to an index entry for Strife's content index
|
|
145
|
-
* @param {any} document - The document to index
|
|
146
|
-
* @returns An object to be indexed by RavenDB
|
|
147
|
-
*/
|
|
148
|
-
function mapDocument(document) {
|
|
149
|
-
|
|
150
|
-
|
|
186
|
+
/**
|
|
187
|
+
* Maps a document to an index entry for Strife's content index
|
|
188
|
+
* @param {any} document - The document to index
|
|
189
|
+
* @returns An object to be indexed by RavenDB
|
|
190
|
+
*/
|
|
191
|
+
function mapDocument(document) {
|
|
192
|
+
const collection = document['@metadata']['@collection'];
|
|
193
|
+
const template = load('templates/' + collection, 'templates');
|
|
151
194
|
|
|
152
|
-
|
|
195
|
+
if (!template || !template.editors || document.deleted || document.archived) {
|
|
153
196
|
return null;
|
|
154
|
-
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const metadataTemplate = loadMetadataTemplate();
|
|
155
200
|
|
|
156
|
-
|
|
157
|
-
|
|
201
|
+
// Initialize result with static fields
|
|
202
|
+
const result = {
|
|
158
203
|
id: Id(document),
|
|
159
204
|
displayName: document.displayName,
|
|
160
205
|
url: storeAs('url', buildUrl(document)),
|
|
161
206
|
origin: document.origin,
|
|
162
207
|
collection: storeAs('collection', collection),
|
|
163
|
-
publishedDate: document.publishedDate,
|
|
164
|
-
createdAt: document.createdAt,
|
|
165
|
-
|
|
166
|
-
|
|
208
|
+
publishedDate: storeAs('publishedAt', document.publishedDate),
|
|
209
|
+
createdAt: storeAs('createdAt', document.createdAt),
|
|
210
|
+
changedAt: storeAs('changedAt', document.changedAt),
|
|
211
|
+
labels: storeAs(
|
|
212
|
+
'labels',
|
|
213
|
+
loadRelatedDocuments(
|
|
214
|
+
document.labels.map((l) => {
|
|
215
|
+
return { id: l, collection: 'Labels' };
|
|
216
|
+
}),
|
|
217
|
+
),
|
|
218
|
+
),
|
|
167
219
|
deleted: document.deleted,
|
|
168
|
-
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
// Keep tabs of loaded documents to avoid infinite recursion
|
|
223
|
+
const loadedDocuments = new Set(result.id);
|
|
169
224
|
|
|
170
|
-
|
|
171
|
-
|
|
225
|
+
// Add dynamic fields and handle "related" type
|
|
226
|
+
template.editors.forEach((editor) => {
|
|
172
227
|
if (editor.editor && editor.editor.propertyName) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
} else if (editor.editor.type === 'chapters') {
|
|
188
|
-
const chapters = document[propertyName];
|
|
189
|
-
if (chapters && Array.isArray(chapters)) {
|
|
190
|
-
const docResults = [];
|
|
191
|
-
chapters.forEach(chapter => {
|
|
192
|
-
if (chapter['@strife'] && chapter['@strife'].templateId) {
|
|
193
|
-
const docResult = {};
|
|
194
|
-
const template = load(chapter['@strife'].templateId, 'templates');
|
|
195
|
-
populateValuesByEditor(chapter, template, docResult);
|
|
196
|
-
docResults.push(docResult);
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
result[propertyName] = storeAs(propertyName, docResults);
|
|
200
|
-
}
|
|
228
|
+
const propertyName = editor.editor.propertyName;
|
|
229
|
+
|
|
230
|
+
if (RELATION_EDITORS.includes(editor.editor.type) && Array.isArray(document[propertyName])) {
|
|
231
|
+
// Load related documents in the array of document references
|
|
232
|
+
const relatedDocs = loadRelatedDocumentsRecurse(document[propertyName], metadataTemplate, loadedDocuments);
|
|
233
|
+
result[propertyName] = storeAs(propertyName, relatedDocs);
|
|
234
|
+
} else if (editor.editor.type === 'content-template') {
|
|
235
|
+
const content = document[propertyName];
|
|
236
|
+
if (content) {
|
|
237
|
+
const template = load(editor.editor.attributes.templateId, 'templates');
|
|
238
|
+
const docResult = {};
|
|
239
|
+
populateValuesByEditor(content, template, metadataTemplate, docResult, loadedDocuments);
|
|
240
|
+
result[propertyName] = storeAs(propertyName, docResult);
|
|
201
241
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
242
|
+
} else if (editor.editor.type === 'chapters') {
|
|
243
|
+
const chapters = document[propertyName];
|
|
244
|
+
if (chapters && Array.isArray(chapters)) {
|
|
245
|
+
const docResults = [];
|
|
246
|
+
chapters.forEach((chapter) => {
|
|
247
|
+
if (chapter['@strife'] && chapter['@strife'].templateId) {
|
|
248
|
+
const docResult = {};
|
|
249
|
+
const template = load(chapter['@strife'].templateId, 'templates');
|
|
250
|
+
populateValuesByEditor(chapter, template, metadataTemplate, docResult, loadedDocuments);
|
|
251
|
+
docResults.push(docResult);
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
result[propertyName] = storeAs(propertyName, docResults);
|
|
205
255
|
}
|
|
256
|
+
} else if (document[propertyName] !== undefined) {
|
|
257
|
+
// For other types, index the field value directly
|
|
258
|
+
result[propertyName] = indexAs(propertyName, document[propertyName]);
|
|
259
|
+
}
|
|
206
260
|
}
|
|
207
|
-
|
|
261
|
+
});
|
|
208
262
|
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
`, d = "strife:store", i = "\0" + d;
|
|
263
|
+
return result;
|
|
264
|
+
}`, l = "strife:store", d = "\0" + l;
|
|
212
265
|
function h(e) {
|
|
213
266
|
return {
|
|
214
267
|
name: "strife:store",
|
|
215
268
|
resolveId(o) {
|
|
216
|
-
if (o ===
|
|
217
|
-
return
|
|
269
|
+
if (o === l)
|
|
270
|
+
return d;
|
|
218
271
|
},
|
|
219
272
|
load(o) {
|
|
220
273
|
var t;
|
|
221
|
-
if (o ===
|
|
274
|
+
if (o === d)
|
|
222
275
|
return `
|
|
223
276
|
import { DocumentStore, AbstractJavaScriptMultiMapIndexCreationTask, IndexCreation } from "ravendb";
|
|
224
277
|
|
|
225
278
|
const authOptions = {
|
|
226
279
|
type: 'pfx',
|
|
227
|
-
certificate: Buffer.from(${
|
|
228
|
-
password: ${
|
|
280
|
+
certificate: Buffer.from(${a(e.certificate)}, 'base64'),
|
|
281
|
+
password: ${a(e.password)},
|
|
229
282
|
};
|
|
230
283
|
|
|
231
284
|
const store = new DocumentStore(
|
|
232
|
-
${
|
|
233
|
-
${
|
|
285
|
+
${a(e.urls ? e.urls : [])},
|
|
286
|
+
${a(e.database || "")},
|
|
234
287
|
authOptions
|
|
235
288
|
).initialize()
|
|
236
289
|
|
|
237
|
-
class
|
|
290
|
+
class Content_ByUrl extends AbstractJavaScriptMultiMapIndexCreationTask {
|
|
238
291
|
constructor() {
|
|
239
292
|
super();
|
|
240
293
|
|
|
241
|
-
this.additionalSources = {"Helper": ${
|
|
294
|
+
this.additionalSources = {"Helper": ${a(y)}}
|
|
242
295
|
|
|
243
296
|
${(e.collections || ["Posts"]).map((n) => `this.map("${typeof n == "string" ? n : n.name}", (doc) => mapDocument(doc));`).join(`
|
|
244
297
|
`)}
|
|
@@ -249,12 +302,13 @@ function h(e) {
|
|
|
249
302
|
}
|
|
250
303
|
|
|
251
304
|
console.log('Deploying index...');
|
|
252
|
-
|
|
305
|
+
|
|
306
|
+
await IndexCreation.createIndexes([new Content_ByUrl()], store);
|
|
253
307
|
|
|
254
308
|
const bulkInsert = store.bulkInsert();
|
|
255
309
|
|
|
256
310
|
${(t = e.collections) == null ? void 0 : t.map((n) => `
|
|
257
|
-
bulkInsert.store(${JSON.stringify(n)}, 'templates/${n.name}', { '@collection': 'Templates' });
|
|
311
|
+
await bulkInsert.store(${JSON.stringify(n)}, 'templates/${n.name}', { '@collection': 'Templates' });
|
|
258
312
|
`).join(`
|
|
259
313
|
`)}
|
|
260
314
|
|
|
@@ -265,33 +319,33 @@ function h(e) {
|
|
|
265
319
|
}
|
|
266
320
|
};
|
|
267
321
|
}
|
|
268
|
-
const
|
|
322
|
+
const T = {
|
|
269
323
|
type: "pfx"
|
|
270
324
|
};
|
|
271
|
-
function
|
|
325
|
+
function D(e) {
|
|
272
326
|
let o, t;
|
|
273
327
|
return {
|
|
274
328
|
name: "@strife/astro",
|
|
275
329
|
hooks: {
|
|
276
|
-
"astro:config:setup": ({ command: n, config:
|
|
330
|
+
"astro:config:setup": ({ command: n, config: r, updateConfig: c }) => {
|
|
277
331
|
var s;
|
|
278
|
-
o = n, t = f(o,
|
|
279
|
-
const
|
|
332
|
+
o = n, t = f(o, r.vite.envDir ?? "", "");
|
|
333
|
+
const i = {
|
|
280
334
|
urls: (s = t.STRIFE_DATABASE_URLS) == null ? void 0 : s.split(","),
|
|
281
335
|
database: t.STRIFE_DATABASE,
|
|
282
336
|
certificate: t.STRIFE_CERTIFICATE,
|
|
283
337
|
password: t.STRIFE_CERTIFICATE_PASSWORD
|
|
284
338
|
}, u = Object.fromEntries(
|
|
285
|
-
Object.entries(
|
|
339
|
+
Object.entries(i).filter(([R, m]) => m !== void 0)
|
|
286
340
|
), p = {
|
|
287
|
-
...
|
|
341
|
+
...T,
|
|
288
342
|
// Base defaults
|
|
289
343
|
...u,
|
|
290
344
|
// Environment variables override defaults
|
|
291
345
|
...e
|
|
292
346
|
// Explicit options override everything
|
|
293
347
|
};
|
|
294
|
-
|
|
348
|
+
c({
|
|
295
349
|
vite: {
|
|
296
350
|
plugins: [
|
|
297
351
|
h(p)
|
|
@@ -303,5 +357,5 @@ function N(e) {
|
|
|
303
357
|
};
|
|
304
358
|
}
|
|
305
359
|
export {
|
|
306
|
-
|
|
360
|
+
D as default
|
|
307
361
|
};
|