@donotdev/core 0.3.1 → 0.3.3
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/functions/index.d.ts +99 -10
- package/functions/index.js +20 -18
- package/i18n/flags/af.svg +1 -0
- package/i18n/flags/al.svg +1 -0
- package/i18n/flags/am.svg +1 -0
- package/i18n/flags/ar.svg +1 -0
- package/i18n/flags/at.svg +1 -0
- package/i18n/flags/au.svg +1 -0
- package/i18n/flags/az.svg +1 -0
- package/i18n/flags/ba.svg +1 -0
- package/i18n/flags/bd.svg +1 -0
- package/i18n/flags/be.svg +1 -0
- package/i18n/flags/bg.svg +1 -0
- package/i18n/flags/bn.svg +1 -0
- package/i18n/flags/br.svg +1 -0
- package/i18n/flags/bs.svg +1 -0
- package/i18n/flags/by.svg +1 -0
- package/i18n/flags/bzh.svg +1 -0
- package/i18n/flags/ca.svg +1 -0
- package/i18n/flags/ch.svg +1 -0
- package/i18n/flags/co.svg +1 -0
- package/i18n/flags/cs.svg +1 -0
- package/i18n/flags/cy.svg +1 -0
- package/i18n/flags/da.svg +1 -0
- package/i18n/flags/de.svg +1 -0
- package/i18n/flags/dz.svg +1 -0
- package/i18n/flags/ee.svg +1 -0
- package/i18n/flags/el.svg +1 -0
- package/i18n/flags/en.svg +1 -0
- package/i18n/flags/es.svg +1 -0
- package/i18n/flags/et.svg +1 -0
- package/i18n/flags/eu.svg +1 -0
- package/i18n/flags/fa.svg +1 -0
- package/i18n/flags/fi.svg +1 -0
- package/i18n/flags/fr-cor.svg +1 -0
- package/i18n/flags/fr.svg +1 -0
- package/i18n/flags/ga.svg +1 -0
- package/i18n/flags/gb-sct.svg +1 -0
- package/i18n/flags/gb.svg +1 -0
- package/i18n/flags/gd.svg +1 -0
- package/i18n/flags/ge.svg +1 -0
- package/i18n/flags/gl.svg +1 -0
- package/i18n/flags/gu.svg +1 -0
- package/i18n/flags/he.svg +1 -0
- package/i18n/flags/hi.svg +1 -0
- package/i18n/flags/hr.svg +1 -0
- package/i18n/flags/hu.svg +1 -0
- package/i18n/flags/hy.svg +1 -0
- package/i18n/flags/id.svg +1 -0
- package/i18n/flags/ie.svg +1 -0
- package/i18n/flags/in.svg +1 -0
- package/i18n/flags/ir.svg +1 -0
- package/i18n/flags/is.svg +1 -0
- package/i18n/flags/it.svg +1 -0
- package/i18n/flags/ja.svg +1 -0
- package/i18n/flags/ke.svg +1 -0
- package/i18n/flags/kg.svg +1 -0
- package/i18n/flags/kh.svg +1 -0
- package/i18n/flags/kk.svg +1 -0
- package/i18n/flags/km.svg +1 -0
- package/i18n/flags/kn.svg +1 -0
- package/i18n/flags/ko.svg +1 -0
- package/i18n/flags/kz.svg +1 -0
- package/i18n/flags/la.svg +1 -0
- package/i18n/flags/lb.svg +1 -0
- package/i18n/flags/lk.svg +1 -0
- package/i18n/flags/lt.svg +1 -0
- package/i18n/flags/lv.svg +1 -0
- package/i18n/flags/ly.svg +1 -0
- package/i18n/flags/ma.svg +1 -0
- package/i18n/flags/md.svg +1 -0
- package/i18n/flags/mk.svg +1 -0
- package/i18n/flags/ml.svg +1 -0
- package/i18n/flags/mm.svg +1 -0
- package/i18n/flags/mn.svg +1 -0
- package/i18n/flags/mr.svg +1 -0
- package/i18n/flags/ms.svg +1 -0
- package/i18n/flags/mt.svg +1 -0
- package/i18n/flags/mx.svg +1 -0
- package/i18n/flags/my.svg +1 -0
- package/i18n/flags/ne.svg +1 -0
- package/i18n/flags/nl.svg +1 -0
- package/i18n/flags/no.svg +1 -0
- package/i18n/flags/np.svg +1 -0
- package/i18n/flags/oc.svg +1 -0
- package/i18n/flags/pa.svg +1 -0
- package/i18n/flags/pk.svg +1 -0
- package/i18n/flags/pl.svg +1 -0
- package/i18n/flags/ps.svg +1 -0
- package/i18n/flags/pt.svg +1 -0
- package/i18n/flags/rm.svg +1 -0
- package/i18n/flags/ro.svg +1 -0
- package/i18n/flags/ru.svg +1 -0
- package/i18n/flags/sa.svg +1 -0
- package/i18n/flags/si.svg +1 -0
- package/i18n/flags/sk.svg +1 -0
- package/i18n/flags/sl.svg +1 -0
- package/i18n/flags/sr.svg +1 -0
- package/i18n/flags/sv.svg +1 -0
- package/i18n/flags/sw.svg +1 -0
- package/i18n/flags/ta.svg +1 -0
- package/i18n/flags/te.svg +1 -0
- package/i18n/flags/th.svg +1 -0
- package/i18n/flags/tj.svg +1 -0
- package/i18n/flags/tl.svg +1 -0
- package/i18n/flags/tn.svg +1 -0
- package/i18n/flags/tr.svg +1 -0
- package/i18n/flags/ua.svg +1 -0
- package/i18n/flags/ur.svg +1 -0
- package/i18n/flags/us.svg +1 -0
- package/i18n/flags/uz.svg +1 -0
- package/i18n/flags/vi.svg +1 -0
- package/i18n/flags/za.svg +1 -0
- package/i18n/flags/zh.svg +1 -0
- package/i18n/locales/eager/dndev_ar.json +2 -1
- package/i18n/locales/eager/dndev_da.json +2 -1
- package/i18n/locales/eager/dndev_de.json +2 -1
- package/i18n/locales/eager/dndev_en.json +2 -1
- package/i18n/locales/eager/dndev_es.json +2 -1
- package/i18n/locales/eager/dndev_fr.json +2 -1
- package/i18n/locales/eager/dndev_it.json +2 -1
- package/i18n/locales/eager/dndev_ja.json +2 -1
- package/i18n/locales/eager/dndev_ko.json +2 -1
- package/i18n/locales/eager/dndev_nl.json +2 -1
- package/i18n/locales/eager/dndev_pl.json +2 -1
- package/i18n/locales/eager/dndev_pt.json +2 -1
- package/i18n/locales/eager/dndev_zh.json +2 -1
- package/i18n/locales/lazy/auth_ar.json +19 -2
- package/i18n/locales/lazy/auth_da.json +22 -2
- package/i18n/locales/lazy/auth_de.json +19 -2
- package/i18n/locales/lazy/auth_en.json +19 -2
- package/i18n/locales/lazy/auth_es.json +19 -2
- package/i18n/locales/lazy/auth_fr.json +19 -2
- package/i18n/locales/lazy/auth_it.json +19 -2
- package/i18n/locales/lazy/auth_ja.json +19 -2
- package/i18n/locales/lazy/auth_ko.json +19 -2
- package/i18n/locales/lazy/auth_nl.json +22 -2
- package/i18n/locales/lazy/auth_pl.json +19 -2
- package/i18n/locales/lazy/auth_pt.json +19 -2
- package/i18n/locales/lazy/auth_zh.json +19 -2
- package/i18n/locales/lazy/crud_ar.json +3 -1
- package/i18n/locales/lazy/crud_da.json +3 -1
- package/i18n/locales/lazy/crud_de.json +3 -1
- package/i18n/locales/lazy/crud_en.json +3 -1
- package/i18n/locales/lazy/crud_es.json +3 -1
- package/i18n/locales/lazy/crud_fr.json +3 -1
- package/i18n/locales/lazy/crud_it.json +3 -1
- package/i18n/locales/lazy/crud_ja.json +3 -1
- package/i18n/locales/lazy/crud_ko.json +3 -1
- package/i18n/locales/lazy/crud_nl.json +3 -1
- package/i18n/locales/lazy/crud_pl.json +3 -1
- package/i18n/locales/lazy/crud_pt.json +3 -1
- package/i18n/locales/lazy/crud_zh.json +3 -1
- package/index.d.ts +6927 -6153
- package/index.js +3 -3
- package/next/index.d.ts +250 -23
- package/next/index.js +556 -594
- package/next/runtime.js +3 -3
- package/package.json +4 -3
- package/server.d.ts +6950 -6153
- package/shared.js +2 -1
- package/symbol-index.json +1 -1
- package/vite/index.d.ts +85 -10
- package/vite/index.js +152 -152
- package/chunks/FlagBase-IQILJTOA.js +0 -1
- package/chunks/chunk-I6HT4XNS.js +0 -1
- package/chunks/chunk-PX544BGJ.js +0 -1
- package/chunks/flagAF-JHV34XMS.js +0 -1
- package/chunks/flagAL-UH6NKHXO.js +0 -1
- package/chunks/flagAM-7XYXA6G6.js +0 -1
- package/chunks/flagAR-LO3YLUZF.js +0 -1
- package/chunks/flagAT-6SWWBNVY.js +0 -1
- package/chunks/flagAU-FIJG7J4T.js +0 -1
- package/chunks/flagAZ-6AIO4DNL.js +0 -1
- package/chunks/flagBA-PIQRWY42.js +0 -1
- package/chunks/flagBD-7PXOE6GM.js +0 -1
- package/chunks/flagBE-2ZP6HCIM.js +0 -1
- package/chunks/flagBG-4XSHCVYH.js +0 -1
- package/chunks/flagBN-OF5XRA5N.js +0 -1
- package/chunks/flagBR-Y2266PSZ.js +0 -1
- package/chunks/flagBS-UV5PVKWJ.js +0 -1
- package/chunks/flagBY-MNAFXBA6.js +0 -1
- package/chunks/flagBZH-AOCZVEVI.js +0 -1
- package/chunks/flagCA-VR6MSBTS.js +0 -1
- package/chunks/flagCH-Q7MV5SPV.js +0 -1
- package/chunks/flagCO-C2YBOMO2.js +0 -1
- package/chunks/flagCS-5BC7NJX6.js +0 -1
- package/chunks/flagCY-PPAUTJGB.js +0 -1
- package/chunks/flagDA-LPI2JRTO.js +0 -1
- package/chunks/flagDE-MQDJAEWL.js +0 -1
- package/chunks/flagDZ-M6NVCF3D.js +0 -1
- package/chunks/flagEE-LY2JJ44X.js +0 -1
- package/chunks/flagEL-PP2HZIV7.js +0 -1
- package/chunks/flagEN-TGFHJYK7.js +0 -1
- package/chunks/flagES-C3H6SSSI.js +0 -1
- package/chunks/flagET-GEZLWRTF.js +0 -1
- package/chunks/flagEU-YJF5577W.js +0 -1
- package/chunks/flagFA-QCQKNEUZ.js +0 -1
- package/chunks/flagFI-LN5ICHNF.js +0 -1
- package/chunks/flagFR-5JPZSUVS.js +0 -1
- package/chunks/flagFR-COR-KPRNU2U6.js +0 -1
- package/chunks/flagGA-PUAQ7VY3.js +0 -1
- package/chunks/flagGB-SCT-RJGHRDJP.js +0 -1
- package/chunks/flagGB-XD2JB7EC.js +0 -1
- package/chunks/flagGD-ABOZBNKE.js +0 -1
- package/chunks/flagGE-N7C2KHVA.js +0 -1
- package/chunks/flagGL-AO2LC4XU.js +0 -1
- package/chunks/flagGU-RNGQ3TIY.js +0 -1
- package/chunks/flagHE-QUAWLF43.js +0 -1
- package/chunks/flagHI-JOOJFNKB.js +0 -1
- package/chunks/flagHR-2U7YEA7P.js +0 -1
- package/chunks/flagHU-6SPEV3OO.js +0 -1
- package/chunks/flagHY-L62LW6BP.js +0 -1
- package/chunks/flagID-LV75M4R3.js +0 -1
- package/chunks/flagIE-LBTC7LCK.js +0 -1
- package/chunks/flagIN-3UWOJ2S3.js +0 -1
- package/chunks/flagIR-44N33GFX.js +0 -1
- package/chunks/flagIS-VCPTXPLZ.js +0 -1
- package/chunks/flagIT-KB4NWTBO.js +0 -1
- package/chunks/flagJA-KLHM6VYH.js +0 -1
- package/chunks/flagKE-MZONPGAJ.js +0 -1
- package/chunks/flagKG-VF3T4E3E.js +0 -1
- package/chunks/flagKH-K5ZXX3DS.js +0 -1
- package/chunks/flagKK-ZZTJKPMR.js +0 -1
- package/chunks/flagKM-Y3XA6HXW.js +0 -1
- package/chunks/flagKN-OMVHGIUS.js +0 -1
- package/chunks/flagKO-UBLOXGRF.js +0 -1
- package/chunks/flagKZ-PYOALOB6.js +0 -1
- package/chunks/flagLA-4ONTEYIB.js +0 -1
- package/chunks/flagLB-FGOBUCL4.js +0 -1
- package/chunks/flagLK-BEVYO56P.js +0 -1
- package/chunks/flagLT-TYWQGIIQ.js +0 -1
- package/chunks/flagLV-S34SVWJJ.js +0 -1
- package/chunks/flagLY-AVR5B6N3.js +0 -1
- package/chunks/flagMA-KHTPMDTL.js +0 -1
- package/chunks/flagMD-TQMYMRQI.js +0 -1
- package/chunks/flagMK-C4CIIAUH.js +0 -1
- package/chunks/flagML-JEE5UGDD.js +0 -1
- package/chunks/flagMM-M72A7CHZ.js +0 -1
- package/chunks/flagMN-34CH7Q43.js +0 -1
- package/chunks/flagMR-KIJ2BPCC.js +0 -1
- package/chunks/flagMS-6COZCDLY.js +0 -1
- package/chunks/flagMT-HDBP7BED.js +0 -1
- package/chunks/flagMX-3XBPZTP5.js +0 -1
- package/chunks/flagMY-Y7C3QGRG.js +0 -1
- package/chunks/flagNE-LCWCYEQW.js +0 -1
- package/chunks/flagNL-3RFQSLLH.js +0 -1
- package/chunks/flagNO-RNDXHKBT.js +0 -1
- package/chunks/flagNP-IKVTRWFR.js +0 -1
- package/chunks/flagOC-JWCST6MI.js +0 -1
- package/chunks/flagPA-5SGZJRNZ.js +0 -1
- package/chunks/flagPK-KQ674PEZ.js +0 -1
- package/chunks/flagPL-V2ITOKFK.js +0 -1
- package/chunks/flagPS-WBOKI4MV.js +0 -1
- package/chunks/flagPT-PFIUVBWR.js +0 -1
- package/chunks/flagRM-MEV6U4AJ.js +0 -1
- package/chunks/flagRO-JPMXEGLK.js +0 -1
- package/chunks/flagRU-3BBKEK34.js +0 -1
- package/chunks/flagSA-N7OI2M6Y.js +0 -1
- package/chunks/flagSI-UTODFLQZ.js +0 -1
- package/chunks/flagSK-EV5JZ2DI.js +0 -1
- package/chunks/flagSL-Y4LHIV2J.js +0 -1
- package/chunks/flagSR-MTRWQPJ5.js +0 -1
- package/chunks/flagSV-LYVDSSJ4.js +0 -1
- package/chunks/flagSW-GJO5P4HE.js +0 -1
- package/chunks/flagTA-CDT3KYEB.js +0 -1
- package/chunks/flagTE-5EXMXH6E.js +0 -1
- package/chunks/flagTH-ODJA4CWB.js +0 -1
- package/chunks/flagTJ-CE5SV6V4.js +0 -1
- package/chunks/flagTL-TRVUF3XO.js +0 -1
- package/chunks/flagTN-G6ERYSZ3.js +0 -1
- package/chunks/flagTR-33VFGL2S.js +0 -1
- package/chunks/flagUA-HESNDKQJ.js +0 -1
- package/chunks/flagUR-ECIZZCDG.js +0 -1
- package/chunks/flagUS-M7R4WRRU.js +0 -1
- package/chunks/flagUZ-YW54WCES.js +0 -1
- package/chunks/flagVI-K3DF2THA.js +0 -1
- package/chunks/flagZA-5UIOKDJH.js +0 -1
- package/chunks/flagZH-5IE3RZVQ.js +0 -1
package/functions/index.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ interface FunctionMeta {
|
|
|
71
71
|
minInstances?: number;
|
|
72
72
|
/** Maximum instances */
|
|
73
73
|
maxInstances?: number;
|
|
74
|
-
/** Secret
|
|
74
|
+
/** Secret names to bind, replacing the ones the function declares in code (synced via sync-secrets, read via defineSecret) */
|
|
75
75
|
secrets?: string[];
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -205,12 +205,23 @@ declare function createAppFunctionsConfig(
|
|
|
205
205
|
options?: EsbuildOptions
|
|
206
206
|
): BuildOptions;
|
|
207
207
|
|
|
208
|
+
/**
|
|
209
|
+
* Secrets each function of the built bundle declares
|
|
210
|
+
* (`secrets: [defineSecret('X')]`): entry point → secret names.
|
|
211
|
+
* Functions that declare none are absent.
|
|
212
|
+
*/
|
|
213
|
+
type DeclaredSecrets = Record<string, string[]>;
|
|
214
|
+
|
|
208
215
|
/** Auto-detection options for YAML generation */
|
|
209
216
|
interface AutoDetectOptions {
|
|
210
217
|
/** Path to entry file for export detection (e.g., 'src/index.ts') */
|
|
211
218
|
entryFile?: string;
|
|
212
|
-
/**
|
|
219
|
+
/** Unused for secrets: bindings come from the functions' declarations */
|
|
213
220
|
envPath?: string;
|
|
221
|
+
/** Built functions package directory the declarations are read from (default: '.') */
|
|
222
|
+
functionsDir?: string;
|
|
223
|
+
/** Declarations already read with {@link detectDeclaredSecrets} (skips reading the bundle) */
|
|
224
|
+
declaredSecrets?: DeclaredSecrets;
|
|
214
225
|
}
|
|
215
226
|
|
|
216
227
|
/**
|
|
@@ -219,12 +230,25 @@ interface AutoDetectOptions {
|
|
|
219
230
|
declare function detectExportedFunctions(entryFile: string): string[];
|
|
220
231
|
|
|
221
232
|
/**
|
|
222
|
-
*
|
|
233
|
+
* List the non-config keys of a .env file. Not used for secret binding:
|
|
234
|
+
* functions.yaml binds what the functions declare ({@link detectDeclaredSecrets}).
|
|
223
235
|
*/
|
|
224
236
|
declare function detectSecretsFromEnv(envPath?: string): string[];
|
|
225
237
|
|
|
226
238
|
/**
|
|
227
|
-
*
|
|
239
|
+
* Read the secrets each function of the built bundle declares, through the
|
|
240
|
+
* firebase-functions SDK manifest (the bin firebase-tools runs for discovery,
|
|
241
|
+
* with `FUNCTIONS_MANIFEST_OUTPUT_PATH`). Needs no secret value and no network.
|
|
242
|
+
*
|
|
243
|
+
* @param functionsDir - Built functions package directory (default: '.')
|
|
244
|
+
* @throws Error when firebase-functions is missing or the bundle fails to load
|
|
245
|
+
*/
|
|
246
|
+
declare function detectDeclaredSecrets(functionsDir?: string): DeclaredSecrets;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Generate functions.yaml content from config.
|
|
250
|
+
* Each endpoint binds (`secretEnvironmentVariables`) the secrets its function
|
|
251
|
+
* declares; `config.functions[name].secrets` overrides them; none → no key.
|
|
228
252
|
*/
|
|
229
253
|
declare function generateFunctionsYaml(
|
|
230
254
|
config: FunctionsConfig,
|
|
@@ -243,14 +267,22 @@ declare function generateFunctionsYamlWithInfo(
|
|
|
243
267
|
staticFunctions: string[];
|
|
244
268
|
crudFunctions: string[];
|
|
245
269
|
autoDetected: string[];
|
|
270
|
+
/** Secret names the bundle declares (union over functions, sorted) */
|
|
246
271
|
autoSecrets: string[];
|
|
272
|
+
/** Per-function declarations, to pass to {@link filterEnvSecrets} */
|
|
273
|
+
declaredSecrets: DeclaredSecrets;
|
|
247
274
|
};
|
|
248
275
|
|
|
249
276
|
/**
|
|
250
|
-
* Filter .env secrets for Firebase deployment
|
|
251
|
-
* Strips secret keys
|
|
277
|
+
* Filter .env secrets for Firebase deployment.
|
|
278
|
+
* Strips the declared secret keys (the functions' declarations plus
|
|
279
|
+
* `config.functions[name].secrets`) from .env and moves them to .env.local
|
|
280
|
+
* (emulator-only). Every other key stays in .env as plain config.
|
|
252
281
|
*/
|
|
253
|
-
declare function filterEnvSecrets(
|
|
282
|
+
declare function filterEnvSecrets(
|
|
283
|
+
config: FunctionsConfig,
|
|
284
|
+
options?: Pick<AutoDetectOptions, 'functionsDir' | 'declaredSecrets'>
|
|
285
|
+
): {
|
|
254
286
|
stripped: string[];
|
|
255
287
|
kept: number;
|
|
256
288
|
};
|
|
@@ -269,13 +301,14 @@ interface BuildFunctionsOptions {
|
|
|
269
301
|
analyze?: boolean;
|
|
270
302
|
/** Entry file for auto-detection (default: 'src/index.ts') */
|
|
271
303
|
entryFile?: string;
|
|
272
|
-
/**
|
|
304
|
+
/** Unused for secrets: bindings come from the functions' declarations */
|
|
273
305
|
envPath?: string;
|
|
274
306
|
}
|
|
275
307
|
|
|
276
308
|
/**
|
|
277
309
|
* Build Firebase Functions in one call.
|
|
278
310
|
* Handles: esbuild bundling, functions.yaml generation, .env secret filtering.
|
|
311
|
+
* Each endpoint binds the secrets its function declares in the built bundle.
|
|
279
312
|
*
|
|
280
313
|
* @example
|
|
281
314
|
* ```js
|
|
@@ -290,5 +323,61 @@ declare function buildFunctions(
|
|
|
290
323
|
options?: BuildFunctionsOptions
|
|
291
324
|
): Promise<void>;
|
|
292
325
|
|
|
293
|
-
|
|
294
|
-
|
|
326
|
+
/** Vercel Node.js runtime of scaffolded Vercel functions (`nodejs22.x`) */
|
|
327
|
+
declare const VERCEL_FUNCTIONS_RUNTIME: string;
|
|
328
|
+
|
|
329
|
+
/** Build options for buildVercelFunctions */
|
|
330
|
+
interface BuildVercelFunctionsOptions {
|
|
331
|
+
/** Function sources, one function per file, URL `/api/<path>` (default: 'src/api') */
|
|
332
|
+
apiDir?: string;
|
|
333
|
+
/** Build Output directory (default: '.vercel/output') */
|
|
334
|
+
outDir?: string;
|
|
335
|
+
/** Vercel runtime (default: {@link VERCEL_FUNCTIONS_RUNTIME}) */
|
|
336
|
+
runtime?: string;
|
|
337
|
+
/** Minify output (default: true in production) */
|
|
338
|
+
minify?: boolean;
|
|
339
|
+
/** Emit source maps (default: true) */
|
|
340
|
+
sourcemap?: boolean;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** Build Output API v3 `.vc-config.json` of one Node.js function */
|
|
344
|
+
interface VercelFunctionConfig {
|
|
345
|
+
runtime: string;
|
|
346
|
+
handler: 'index.mjs';
|
|
347
|
+
launcherType: 'Nodejs';
|
|
348
|
+
shouldAddHelpers: true;
|
|
349
|
+
shouldAddSourcemapSupport: boolean;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* `.vc-config.json` of a Vercel function built by {@link buildVercelFunctions}:
|
|
354
|
+
* `index.mjs` default-exports the `(req, res)` handler, with Vercel's Node helpers.
|
|
355
|
+
*/
|
|
356
|
+
declare function vercelFunctionConfig(options: {
|
|
357
|
+
runtime: string;
|
|
358
|
+
sourcemap: boolean;
|
|
359
|
+
}): VercelFunctionConfig;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Build Vercel Functions in one call: each `src/api/<path>.ts` becomes the Build
|
|
363
|
+
* Output API v3 function `.vercel/output/functions/api/<path>.func` (bundled
|
|
364
|
+
* `index.mjs` + `.vc-config.json`), served at `/api/<path>`. `dndev deploy`
|
|
365
|
+
* uploads them with the frontend as one deployment. Files named `_*` / `.*`,
|
|
366
|
+
* `*.d.ts` and tests are not functions. Exits 1 when `src/api` is missing or
|
|
367
|
+
* empty, a path has a `[param]` segment (never matched), or esbuild fails.
|
|
368
|
+
*
|
|
369
|
+
* @example
|
|
370
|
+
* ```js
|
|
371
|
+
* import { buildVercelFunctions } from '@donotdev/core/functions';
|
|
372
|
+
*
|
|
373
|
+
* buildVercelFunctions();
|
|
374
|
+
* ```
|
|
375
|
+
*
|
|
376
|
+
* @returns Function paths built (`api/auth/getCustomClaims`)
|
|
377
|
+
*/
|
|
378
|
+
declare function buildVercelFunctions(
|
|
379
|
+
options?: BuildVercelFunctionsOptions
|
|
380
|
+
): Promise<string[]>;
|
|
381
|
+
|
|
382
|
+
export { VERCEL_FUNCTIONS_RUNTIME, buildFunctions, buildVercelFunctions, createAppFunctionsConfig, createFunctionsEsbuildConfig, createRootFunctionsConfig, detectDeclaredSecrets, detectExportedFunctions, detectSecretsFromEnv, filterEnvSecrets, generateFunctionsYaml, generateFunctionsYamlWithInfo, vercelFunctionConfig };
|
|
383
|
+
export type { AutoDetectOptions, BuildFunctionsOptions, BuildVercelFunctionsOptions, DeclaredSecrets, EsbuildOptions, VercelFunctionConfig };
|
package/functions/index.js
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
`:
|
|
3
|
-
`:d=String(t);try{return Buffer.isBuffer(d)?h.writeFileSync(l,d):h.writeFileSync(l,d,"utf8"),this._writtenPaths?.add(l),a&&v.info(`${c?"Updated":"Created"} file: ${l}`),!0}catch(m){throw new Error(`Failed to write file: ${l}: ${m instanceof Error?m.message:String(m)}`)}}async copy(e,t,o={}){let{overwrite:n=!1,dryRun:s=!1,verbose:r=!1}=o,a=this.normalizePath(t),l=this.pathExists(a);if(l&&!n)return r&&v.info(`Skipping existing file: ${a}`),!1;if(s)return v.info(`[DRY RUN] Would copy file: ${a}`),!0;let f=this.normalizePath(A(a));try{await h.promises.mkdir(f,{recursive:!0})}catch(c){if(!z(c))throw c}try{return await q(async()=>(await h.promises.copyFile(e,a),r&&v.info(`${l?"Updated":"Created"} file: ${a}`),!0),`Failed to copy file from ${e} to ${a}`)}catch{return!1}}copySync(e,t,o={}){let{overwrite:n=!1,dryRun:s=!1,verbose:r=!1}=o,a=this.normalizePath(t),l=this.pathExists(a);if(l&&!n)return r&&v.info(`Skipping existing file: ${a}`),!1;if(s)return v.info(`[DRY RUN] Would copy file: ${a}`),!0;let f=this.normalizePath(A(a));try{h.mkdirSync(f,{recursive:!0})}catch(c){if(!z(c))throw c}try{return h.copyFileSync(e,a),this._writtenPaths?.add(a),r&&v.info(`${l?"Updated":"Created"} file: ${a}`),!0}catch{return!1}}pathExists(e,t=!1){try{return h.existsSync(e)}catch(o){return t||v.error(`Error checking path existence: ${e}`,o),!1}}mkdir(e){try{let t=e.startsWith("/")||e.match(/^[A-Z]:/)?this.normalizePath(e):this.resolveAppPath(e);return h.existsSync(t)||h.mkdirSync(t,{recursive:!0}),!0}catch{return!1}}readdirSync(e,t){try{return h.readdirSync(e,t)}catch(o){return this.options.debug&&v.warn(`Failed to read directory: ${e}`,o),t&&typeof t=="object"&&"withFileTypes"in t&&t.withFileTypes?[]:[]}}statSync(e){try{return h.statSync(e)}catch(t){return this.options.debug&&v.warn(`Failed to stat file: ${e}`,t),null}}realpathSync(e){return h.realpathSync(e)}watch(e,t,o){return h.watch(e,t,o)}lstatSync(e){try{return h.lstatSync(e)}catch(t){return this.options.debug&&v.warn(`Failed to lstat file: ${e}`,t),null}}async ensureDir(e){try{await h.promises.mkdir(e,{recursive:!0})}catch(t){if(!z(t))throw t}}ensureDirSync(e){try{h.mkdirSync(e,{recursive:!0})}catch(t){if(!z(t))throw t}}async remove(e){await h.promises.rm(e,{recursive:!0,force:!0})}removeSync(e){h.rmSync(e,{recursive:!0,force:!0})}async readdir(e,t){return h.promises.readdir(e,t)}stripBom(e){return e.charCodeAt(0)===65279?e.slice(1):e}getRepoRoot(){return this._repoRoot||process.cwd()}startWriteRecording(){this._writtenPaths=new Set}stopWriteRecording(){if(!this._writtenPaths)throw new Error("stopWriteRecording() called without startWriteRecording()");let e=this._writtenPaths;return this._writtenPaths=null,e}getAppRoot(){return this._appRoot?this._appRoot:this._repoRoot}setAppRoot(e){if(!e)throw new Error("PathResolver.setAppRoot: root cannot be undefined or null");this._appRoot=this.normalizePath(e)}isMonorepo(){let e=_(this._repoRoot,"packages");return this.pathExists(e)}isWithinApp(e){let t=this.normalizePath(I(e)),o=this.getAppRoot(),n=J(o,t),s=this.normalizePath(n);return!s.startsWith("../")&&!s.startsWith("/")}async findFiles(e,t,o={}){let n=this.normalizePath(_(e,t)),s=this.getAppRoot(),r=this.normalizePath(s),a=n.startsWith(r)?n.slice(r.length+1):n,l={absolute:!0,onlyFiles:!0,braceExpansion:!0,extglob:!0,globstar:!0,cwd:s,ignore:$.SCAN_PATTERNS?.globalIgnore||["**/node_modules/**","**/dist/**","**/build/**","**/.git/**"]};return await this._globWithNormalization([a],{...l,...o})}clearCache(){}async _resolveFrameworkI18nPattern(e){let t=$.I18N_PATHS;if(!t)return null;let o=e.replace(t.SOURCE_ROOT+"/",""),n=this.resolveFrameworkPackage("@donotdev/core");if(!n)return null;let s=this.normalizePath(_(n,t.PUBLISHED_ROOT,o)),r=s.replace(/\/[^/]*\*.*$/,"");return this.pathExists(r),s}async _globWithNormalization(e,t){return(await fe(e,t)).map(n=>{let s=typeof n=="string"?n:n.path;return this.normalizePath(s)})}async resolveFiles(e,t="css"){if(!e||typeof e!="object")return{frameworkFiles:[],consumerFiles:[]};if(t==="i18n")return{frameworkFiles:[],consumerFiles:[]};if(Array.isArray(e.framework)||(e.framework=[]),!Array.isArray(e.consumer))return{frameworkFiles:[],consumerFiles:[]};let o=[...e.framework,...e.consumer];for(let c of o)if(typeof c!="string"||c.trim()==="")return{frameworkFiles:[],consumerFiles:[]};let n=this.getAppRoot(),s=$.getGlobOptionsFor?$.getGlobOptionsFor(t):{ignore:["**/node_modules/**","**/dist/**","**/build/**"]},r=this.normalizePath(n),a=e.framework.map(c=>{let u=this.normalizePath(c);return u.startsWith(r)?u.slice(r.length+1):u}),l=e.consumer.map(c=>{let u=this.normalizePath(c);return u.startsWith(r)?u.slice(r.length+1):u}),f={...s,onlyFiles:!0,absolute:!0,braceExpansion:!0,extglob:!0,globstar:!0,cwd:n};try{let c=a.length>0?await this._globWithNormalization(a,f):[],u=await this._globWithNormalization(l,f);return{frameworkFiles:c,consumerFiles:u}}catch{return this.options.debug,{frameworkFiles:[],consumerFiles:[]}}}async resolvePatterns(e){if(!$.getPatternsFor)return{framework:[],consumer:[],all:[]};let t=this.getAppRoot(),o=this.getRepoRoot();if(e==="i18n"&&(!t||t===o))throw new Error(`Cannot resolve i18n patterns: appRoot not set (appRoot: ${t}, repoRoot: ${o}). Ensure configResolved hook has run before discovery.`);let n=$.getPatternsFor(e),s=this.isMonorepo();if(e==="i18n"){let l=n,f={eager:l.eager.map(c=>c.startsWith("!")?"!"+this.resolveAppPath(c.slice(1)):this.resolveAppPath(c)),lazy:l.lazy.map(c=>c.startsWith("!")?"!"+this.resolveAppPath(c.slice(1)):this.resolveAppPath(c)),framework:{eager:s?(l.framework?.eager||[]).map(c=>this.resolveRepoPath(c)).filter(Boolean):await Promise.all((l.framework?.eager||[]).map(c=>this._resolveFrameworkI18nPattern(c))).then(c=>c.filter(Boolean)),lazy:s?(l.framework?.lazy||[]).map(c=>this.resolveRepoPath(c)).filter(Boolean):await Promise.all((l.framework?.lazy||[]).map(c=>this._resolveFrameworkI18nPattern(c))).then(c=>c.filter(Boolean))},all:[]};return f.all=[...f.eager,...f.lazy,...f.framework.eager,...f.framework.lazy],f}let r=n,a={framework:s?(r.framework||[]).map(l=>this.resolveRepoPath(l)).filter(Boolean):[],consumer:(r.consumer||[]).map(l=>this.resolveAppPath(l)),all:[]};return a.all=[...a.consumer,...a.framework],a}getEmptyModulePath(){return this.getEmptyCjsModulePath().replace(/\.cjs$/,".js")}getEmptyFlagModulePath(){let e=A(pe(import.meta.url));return this.normalizePath(I(e,"emptyFlag.js"))}getEmptyCjsModulePath(){let e=this.resolvePackage("@donotdev/core/empty");if(!e)throw new Error("Cannot resolve @donotdev/core/empty \u2014 package setup is broken");return e}_findRepoRoot(e){let t=this.normalizePath(e),o=0,n=this.options.maxLevels;for(;o<n;){let s=this.normalizePath(_(t,Z.TOOLING)),r=this.normalizePath(_(t,Z.CORE));if(this.pathExists(s)&&this.pathExists(r))return t;let a=_(t,"apps");if(this.pathExists(a)&&this.statSync(a)?.isDirectory())return this.normalizePath(t);let l=this.normalizePath(_(t,"package.json"));if(this.pathExists(l)&&this.normalizePath(A(t))===t)return t;let f=this.normalizePath(A(t));if(f===t)break;t=f,o++}return this.normalizePath(e)}};function L(i={}){let{entry:e="src/index.ts",outDir:t="lib",minify:o=!1,sourcemap:n=!0,platform:s="firebase",workspace:r,bundleWorkspaceDeps:a=!1,importFramework:l=!1,external:f=!1,...c}=i,u=S.getInstance(),d=G(r),m={entryPoints:[e],bundle:!0,platform:"node",target:"node20",format:"esm",outdir:t,outExtension:{".js":".js"},minify:o,sourcemap:n,metafile:!0,logLevel:"info",loader:{".ts":"ts",".tsx":"tsx",".css":"empty"},keepNames:!0,treeShaking:!0,...c};a&&Object.keys(d).length>0&&(m.alias=Object.fromEntries(Object.entries(d).map(([y,p])=>[y,u.normalizePath(p)]))),m.mainFields=["module","main"],m.conditions=["react-server","import","module","node"];let R=["fs","path","crypto","util","stream","events","buffer","url","querystring","http","https","zlib","os","child_process","assert","constants","domain","punycode","string_decoder","timers","tty","vm","worker_threads","perf_hooks","async_hooks"],j=[];if(a)try{let y=r?.root||process.cwd(),p=process.cwd(),g=10;for(let k=0;k<g;k++){let w=u.normalizePath(`${p}/package.json`);if(u.pathExists(w)){let E=u.readSync(w,{format:"json"});if(E&&Array.isArray(E.workspaces)){y=u.normalizePath(p);for(let O of E.workspaces)O==="apps/*"||O==="functions"||!O.includes("*")&&!O.includes("/")&&j.push(O);break}}let x=u.getDirname(p);if(x===p)break;p=x}}catch{}let M={name:"external-node-modules",setup(y){y.onResolve({filter:/^firebase($|\/)/},p=>{if(p.path==="firebase-admin"||p.path.startsWith("firebase-admin/")||p.path==="firebase-functions"||p.path.startsWith("firebase-functions/"))return null;let g;if(r?.type==="dndev"&&r.root)g=u.normalizePath(`${r.root}/packages/core/config/functions/firebase-stub.js`);else{let k=import.meta.url,x=new URL(k).pathname.replace(/^\/([A-Z]:)/i,"$1"),E=u.getDirname(x);g=u.normalizePath(`${E}/firebase-stub.js`)}return{path:g}}),y.onResolve({filter:/.*/},p=>{if(p.kind==="entry-point")return null;if(p.path.match(/@donotdev\/functions\/.+/)&&a&&r?.type==="dndev"){let g=p.path.replace("@donotdev/functions/","");return{path:u.normalizePath(`${r.root}/packages/functions/src/${g}/index.ts`)}}if(p.path==="@donotdev/utils")return r?.type==="dndev"?{path:u.normalizePath(`${r.root}/packages/core/utils/src/server/index.ts`)}:y.resolve("@donotdev/utils/server",{kind:p.kind,resolveDir:p.resolveDir});if(p.path.match(/@donotdev\/utils\/.+/)&&r?.type==="dndev"){let g=p.path.replace("@donotdev/utils/","");return{path:u.normalizePath(`${r.root}/packages/core/utils/src/${g}/index.ts`)}}if(p.path==="@donotdev/supabase")return r?.type==="dndev"?{path:u.normalizePath(`${r.root}/packages/providers/supabase/src/server/index.ts`)}:y.resolve("@donotdev/supabase/server",{kind:p.kind,resolveDir:p.resolveDir});if(p.path==="@donotdev/core")return r?.type==="dndev"?{path:u.normalizePath(`${r.root}/packages/core/server.ts`)}:y.resolve("@donotdev/core/server",{kind:p.kind,resolveDir:p.resolveDir});if(p.path.match(/@donotdev\/core\/.+/)&&a&&r?.type==="dndev"){let g=p.path.replace("@donotdev/core/","");return{path:u.normalizePath(`${r.root}/packages/core/${g}.ts`)}}if(p.path==="firebase-admin"||p.path.startsWith("firebase-admin/")||p.path==="firebase-functions"||p.path.startsWith("firebase-functions/"))return{path:p.path,external:!0};if(p.path.match(/@donotdev\/core\/.+/)&&a&&r?.type==="dndev"){let g=p.path.replace("@donotdev/core/","");return{path:u.normalizePath(`${r.root}/packages/core/${g}.ts`)}}if(p.path.startsWith("@donotdev/")||p.path==="valibot"||p.path.startsWith("valibot/"))return null;if(j.length>0){let g=p.path.split("/")[0];if(j.includes(g))return null}return p.path.startsWith(".")||p.path.startsWith("/")?null:{path:p.path,external:!0}})}};if(m.external=[...R,"firebase-admin","firebase-functions"],m.plugins=[M,...m.plugins||[]],m.define={"process.env.NODE_ENV":JSON.stringify(process.env.NODE_ENV||"production"),...m.define||{}},l&&r.type==="dndev"){let y=r.root,p=u.normalizePath(`${y}/functions/lib`);m.alias={...m.alias,"@donotdev/functions":p}}if(s==="framework"){let y=S.getInstance(),p=r?.root?y.normalizePath(`${r.root}/packages/functions`):process.cwd(),g=y.normalizePath(`${p}/package.json`),k=y.readSync(g,{format:"json"});if(k?.exports){let w={};for(let[,x]of Object.entries(k.exports)){let E=x?.import||x?.default||(typeof x=="string"?x:null);if(!E||!E.endsWith(".ts"))continue;let O=E.replace(/^\.\/src\//,"").replace(/\.ts$/,"");w[O]=E}Object.keys(w).length>0&&(m.entryPoints=w,m.splitting=!0,m.chunkNames="chunks/[name]-[hash]")}}return m}var b=S.getInstance(),W=["create","get","list","listCard","update","delete","bulk"];function X(i,e=0){let t=" ".repeat(e),o="";for(let[n,s]of Object.entries(i))if(s!=null)if(typeof s=="object"&&!Array.isArray(s))Object.keys(s).length===0?o+=`${t}${n}: {}
|
|
4
|
-
`:o+=`${t}${
|
|
5
|
-
${
|
|
6
|
-
`;else{o+=`${t}${
|
|
7
|
-
`;for(let r of
|
|
8
|
-
`;for(let
|
|
1
|
+
import I from"node:fs";import k from"node:path";import{fileURLToPath as le}from"node:url";var ue=le(import.meta.url),Oe=k.dirname(ue);function T(){let i=process.cwd(),e=10;for(let t=0;t<e;t++){let o=k.join(i,"package.json");if(I.existsSync(o))try{let n=JSON.parse(I.readFileSync(o,"utf8")),r=n.workspaces&&Array.isArray(n.workspaces);if(r&&n.workspaces.some(s=>s==="packages/**"||s.startsWith("packages/"))&&(I.existsSync(k.join(i,"packages","core"))||I.existsSync(k.join(i,"packages","functions"))))return{type:"dndev",root:i};if(r&&n.workspaces.some(s=>s.includes("dndev/packages"))){let u=n.workspaces.find(f=>f.includes("dndev/packages")).replace(/\/packages.*$/,""),h=k.resolve(i,u);if(I.existsSync(k.join(h,"packages","core")))return{type:"dndev",root:h}}}catch{}let c=k.dirname(i);if(c===i)break;i=c}return{type:"npm",root:process.cwd()}}function pe(i){return i.type==="dndev"?i.root:null}function V(i){let e={};if(i.type==="dndev"){let t=pe(i);t&&(e["@donotdev/types"]=k.join(t,"packages","core","types","src"),e["@donotdev/functions"]=k.join(t,"packages","functions","src"),e["@donotdev/utils"]=k.join(t,"packages","core","utils","src"),e["@donotdev/schemas"]=k.join(t,"packages","core","schemas","src"),e["@donotdev/core"]=k.join(t,"packages","core"))}return e}import*as d from"node:fs";import"node:fs";import{createRequire as he}from"node:module";import{resolve as U,join as F,dirname as O,relative as K,normalize as me,sep as Z,extname as ge}from"node:path";import ve from"fast-glob";var fe="/og-image.png";var L={SOURCE_ROOT:"packages/core/i18n",SOURCE_LOCALES:"packages/core/i18n/locales",SOURCE_EAGER:"packages/core/i18n/locales/eager",SOURCE_LAZY:"packages/core/i18n/locales/lazy",PUBLISHED_ROOT:"i18n",PUBLISHED_LOCALES:"i18n/locales",PUBLISHED_EAGER:"i18n/locales/eager",PUBLISHED_LAZY:"i18n/locales/lazy",PUBLISHED_FLAGS:"i18n/flags"},R={routes:{consumer:["src/**/*Page.tsx","src/pages/**/*Page.tsx"],exclude:["**/node_modules/**","**/dist/**","**/build/**","**/*.test.tsx","**/*.stories.tsx"],extensions:[".tsx"]},css:{consumer:["src/**/*.css"],themes:["src/**/*.css"],extensions:[".css",".scss",".sass"],framework:["packages/ui/src/**/*.css","packages/core/components/src/**/*.css","packages/core/templates/src/**/*.css"]},i18n:{eager:["src/locales/*_*.json"],lazy:["src/**/locales/*_*.json","!src/locales/*_*.json","../../entities/locales/*_*.json"],additional:[],framework:{eager:[`${L.SOURCE_EAGER}/*_*.json`],lazy:[`${L.SOURCE_LAZY}/*_*.json`]},extensions:[".json"]},assets:{consumer:["public/**/*"],fallback:["manifest.json"],modern:["logo.svg","favicon.svg","apple-touch-icon.png","android-chrome-192x192.png","android-chrome-512x512.png"],patterns:["favicon.svg","favicon.ico","favicon-*.png","logo.svg","logo.png","logo.webp","logo.avif","apple-touch-icon*.png","android-chrome-*.png","icon-*x*.png",fe.slice(1)],fonts:["fonts/**/*.woff2","fonts/**/*.woff","fonts/**/*.ttf"],framework:["packages/ui/assets/**/*"]},pwa:{consumer:["public/manifest.json","public/service-worker.js","public/sw.js","public/icon-192x192.png","public/icon-512x512.png","public/favicon.ico","public/favicon.svg","public/apple-touch-icon.png","public/logo.svg"],exclude:["**/node_modules/**","**/dist/**","**/build/**"],extensions:[".json",".js",".png",".svg",".ico"],framework:["packages/ui/assets/**/*"]},globalIgnore:["**/node_modules/**","**/dist/**","**/build/**","**/.git/**","**/coverage/**","**/test/**"]};var Y={base:{absolute:!0,onlyFiles:!0,ignore:R.globalIgnore},css:{absolute:!0,onlyFiles:!0,ignore:[...R.globalIgnore,"**/*.test.css"]},routes:{absolute:!0,onlyFiles:!0,ignore:[...R.globalIgnore,"**/*.test.tsx","**/*.stories.tsx"]},i18n:{absolute:!0,onlyFiles:!0,ignore:R.globalIgnore},assets:{absolute:!0,onlyFiles:!0,ignore:R.globalIgnore}};function J(i,e=null){let t=R[i];if(!t)throw new Error(`Unknown pattern type: ${i}`);return e&&t.framework?{...t,framework:t.framework.map(o=>`${e}/${o}`)}:t}function q(i){return Y[i]||Y.base}var D={getGlobOptionsFor:q||void 0,SCAN_PATTERNS:R||void 0,getPatternsFor:J||void 0,I18N_PATHS:L||void 0},y={error:(i,e)=>{},warn:(i,e)=>{},info:i=>{}};function N(i){return typeof i=="object"&&i!==null&&"code"in i&&i.code==="EEXIST"}function X(i,e){return i().catch(t=>{throw new Error(`${e}: ${t instanceof Error?t.message:String(t)}`)})}var Q={CLI:"packages/cli",COMPONENTS:"packages/core/components",CONFIG:"packages/core/config",CORE:"packages/core",CRUD:"packages/core/crud",FEATURES:"packages/features",HOOKS:"packages/core/hooks",I18N:"packages/core/i18n",SCHEMAS:"packages/core/schemas",STORES:"packages/core/stores",TEMPLATES:"packages/templates",TOOLING:"packages/tooling",TYPES:"packages/core/types",UI:"packages/ui",UTILS:"packages/core/utils",AUTH:"packages/features/auth",BILLING:"packages/features/billing",OAUTH:"packages/features/oauth",FIREBASE:"packages/providers/firebase",FUNCTIONS:"packages/functions"},E=class i{static _instance=null;options;_repoRoot;_appRoot=null;_writtenPaths=null;static getInstance(e={}){return i._instance||(i._instance=new i(e)),i._instance}static _reset(){i._instance=null}constructor(e={}){if(i._instance)return i._instance;this.options={maxLevels:e.maxLevels??10,customMarkers:e.customMarkers||[],cache:e.cache??!1,debug:e.debug??!1};try{let t=process.cwd();if(!t)throw new Error("PathResolver: process.cwd() returned undefined. This should never happen.");this._repoRoot=this._findRepoRoot(t)}catch(t){throw new Error(`PathResolver constructor failed: ${t instanceof Error?t.message:String(t)}. cwd: ${process.cwd()}`)}this._appRoot=null,i._instance=this}normalizePath(e){if(!e)return"";try{return me(e).split(Z).join("/")}catch{return String(e).split(Z).join("/")}}getRelativePath(e){let t=this.getAppRoot(),o=K(t,e);return this.normalizePath(o)}getBasename(e){if(!e)return"";let o=this.normalizePath(e).split("/");return o[o.length-1]||""}getDirname(e){return e?this.normalizePath(O(e)):""}resolvePackage(e,t=null){try{let o=t||this.getAppRoot(),n=he(F(o,"package.json")).resolve(e);return this.normalizePath(n)}catch{return null}}resolveFrameworkPackage(e,t=null){let o=this.resolvePackage(`${e}/package.json`,t);if(o)return this.getDirname(o);if(this.isMonorepo()&&e.startsWith("@donotdev/")){let r=e.replace("@donotdev/",""),a=this.resolveRepoPath(`packages/${r}`);if(this.pathExists(a))return a;if(["auth","billing","crud","oauth"].includes(r)){let l=this.resolveRepoPath(`packages/features/${r}`);if(this.pathExists(l))return l}if(r==="firebase"){let l=this.resolveRepoPath(`packages/providers/${r}`);if(this.pathExists(l))return l}}let c=this.resolveAppPath(`node_modules/${e}`);if(this.pathExists(c))return c;let n=this.resolveRepoPath(`node_modules/${e}`);return this.pathExists(n)?n:null}resolvePackageAsset(e,t=null){return this.resolvePackage(e,t)}resolveAppPath(e){let t=this.getAppRoot(),o=U(t,e);return this.normalizePath(o)}resolveRepoPath(e){let t=this.getRepoRoot(),o=this.normalizePath(e),c=U(t,o);return this.normalizePath(c)}resolvePath(e,t){let o=this.normalizePath(t),c=this.normalizePath(e),n=U(o,c);return this.normalizePath(n)}createImportPath(e){return"./"+this.getRelativePath(e)}getFileInfo(e){try{let t=d.statSync(e);return{absolutePath:this.normalizePath(e),relativePath:this.getRelativePath(e),importPath:this.createImportPath(e),size:t.size,isFile:t.isFile(),isDirectory:t.isDirectory()}}catch{return null}}_detectFormat(e,t){return t&&t!=="auto"?t:ge(e).toLowerCase()===".json"?"json":"text"}async read(e,t={}){let{format:o="auto",encoding:c="utf8"}=t,n=this._detectFormat(e,o);try{if(n==="buffer")return await d.promises.readFile(e);let r=await d.promises.readFile(e,c),a=this.stripBom(r);return n==="json"?JSON.parse(a):a}catch(r){return this.options.debug&&y.warn(`Failed to read file: ${e}`,r),null}}readSync(e,t={}){let{format:o="auto",encoding:c="utf8"}=t,n=this._detectFormat(e,o);try{if(n==="buffer")return d.readFileSync(e);let r=d.readFileSync(e,c),a=this.stripBom(r);return n==="json"?JSON.parse(a):a}catch(r){return this.options.debug&&y.warn(`Failed to read file: ${e}`,r),null}}async write(e,t,o={}){let{format:c="auto",overwrite:n=!1,dryRun:r=!1,verbose:a=!1}=o,l=this.normalizePath(e),m=this.normalizePath(O(l)),s=this.pathExists(l);if(s&&!n)return a&&y.info(`Skipping existing file: ${l}`),!1;if(r)return y.info(`[DRY RUN] Would write file: ${l}`),!0;try{await d.promises.mkdir(m,{recursive:!0})}catch(f){if(!N(f))throw f}let u=this._detectFormat(e,c),h;Buffer.isBuffer(t)?h=t:u==="json"&&typeof t=="object"?h=`${JSON.stringify(t,null,2)}
|
|
2
|
+
`:h=String(t);try{return await X(async()=>(Buffer.isBuffer(h)?await d.promises.writeFile(l,h):await d.promises.writeFile(l,h,"utf8"),a&&y.info(`${s?"Updated":"Created"} file: ${l}`),!0),`Failed to write file: ${l}`)}catch{return!1}}writeSync(e,t,o={}){let{format:c="auto",overwrite:n=!1,dryRun:r=!1,verbose:a=!1}=o,l=this.normalizePath(e),m=this.normalizePath(O(l)),s=this.pathExists(l);if(s&&!n)return a&&y.info(`Skipping existing file: ${l}`),!1;if(r)return y.info(`[DRY RUN] Would write file: ${l}`),!0;try{d.mkdirSync(m,{recursive:!0})}catch(f){if(!N(f))throw f}let u=this._detectFormat(e,c),h;Buffer.isBuffer(t)?h=t:u==="json"&&typeof t=="object"?h=`${JSON.stringify(t,null,2)}
|
|
3
|
+
`:h=String(t);try{return Buffer.isBuffer(h)?d.writeFileSync(l,h):d.writeFileSync(l,h,"utf8"),this._writtenPaths?.add(l),a&&y.info(`${s?"Updated":"Created"} file: ${l}`),!0}catch(f){throw new Error(`Failed to write file: ${l}: ${f instanceof Error?f.message:String(f)}`)}}async copy(e,t,o={}){let{overwrite:c=!1,dryRun:n=!1,verbose:r=!1}=o,a=this.normalizePath(t),l=this.pathExists(a);if(l&&!c)return r&&y.info(`Skipping existing file: ${a}`),!1;if(n)return y.info(`[DRY RUN] Would copy file: ${a}`),!0;let m=this.normalizePath(O(a));try{await d.promises.mkdir(m,{recursive:!0})}catch(s){if(!N(s))throw s}try{return await X(async()=>(await d.promises.copyFile(e,a),r&&y.info(`${l?"Updated":"Created"} file: ${a}`),!0),`Failed to copy file from ${e} to ${a}`)}catch{return!1}}copySync(e,t,o={}){let{overwrite:c=!1,dryRun:n=!1,verbose:r=!1}=o,a=this.normalizePath(t),l=this.pathExists(a);if(l&&!c)return r&&y.info(`Skipping existing file: ${a}`),!1;if(n)return y.info(`[DRY RUN] Would copy file: ${a}`),!0;let m=this.normalizePath(O(a));try{d.mkdirSync(m,{recursive:!0})}catch(s){if(!N(s))throw s}try{return d.copyFileSync(e,a),this._writtenPaths?.add(a),r&&y.info(`${l?"Updated":"Created"} file: ${a}`),!0}catch{return!1}}pathExists(e,t=!1){try{return d.existsSync(e)}catch(o){return t||y.error(`Error checking path existence: ${e}`,o),!1}}mkdir(e){try{let t=e.startsWith("/")||e.match(/^[A-Z]:/)?this.normalizePath(e):this.resolveAppPath(e);return d.existsSync(t)||d.mkdirSync(t,{recursive:!0}),!0}catch{return!1}}readdirSync(e,t){try{return d.readdirSync(e,t)}catch(o){return this.options.debug&&y.warn(`Failed to read directory: ${e}`,o),t&&typeof t=="object"&&"withFileTypes"in t&&t.withFileTypes?[]:[]}}statSync(e){try{return d.statSync(e)}catch(t){return this.options.debug&&y.warn(`Failed to stat file: ${e}`,t),null}}realpathSync(e){return d.realpathSync(e)}watch(e,t,o){return d.watch(e,t,o)}lstatSync(e){try{return d.lstatSync(e)}catch(t){return this.options.debug&&y.warn(`Failed to lstat file: ${e}`,t),null}}async ensureDir(e){try{await d.promises.mkdir(e,{recursive:!0})}catch(t){if(!N(t))throw t}}ensureDirSync(e){try{d.mkdirSync(e,{recursive:!0})}catch(t){if(!N(t))throw t}}async remove(e){await d.promises.rm(e,{recursive:!0,force:!0})}removeSync(e){d.rmSync(e,{recursive:!0,force:!0})}async readdir(e,t){return d.promises.readdir(e,t)}stripBom(e){return e.charCodeAt(0)===65279?e.slice(1):e}getRepoRoot(){return this._repoRoot||process.cwd()}startWriteRecording(){this._writtenPaths=new Set}stopWriteRecording(){if(!this._writtenPaths)throw new Error("stopWriteRecording() called without startWriteRecording()");let e=this._writtenPaths;return this._writtenPaths=null,e}getAppRoot(){return this._appRoot?this._appRoot:this._repoRoot}setAppRoot(e){if(!e)throw new Error("PathResolver.setAppRoot: root cannot be undefined or null");this._appRoot=this.normalizePath(e)}isMonorepo(){let e=F(this._repoRoot,"packages");return this.pathExists(e)}isWithinApp(e){let t=this.normalizePath(U(e)),o=this.getAppRoot(),c=K(o,t),n=this.normalizePath(c);return!n.startsWith("../")&&!n.startsWith("/")}async findFiles(e,t,o={}){let c=this.normalizePath(F(e,t)),n=this.getAppRoot(),r=this.normalizePath(n),a=c.startsWith(r)?c.slice(r.length+1):c,l={absolute:!0,onlyFiles:!0,braceExpansion:!0,extglob:!0,globstar:!0,cwd:n,ignore:D.SCAN_PATTERNS?.globalIgnore||["**/node_modules/**","**/dist/**","**/build/**","**/.git/**"]};return await this._globWithNormalization([a],{...l,...o})}clearCache(){}async _resolveFrameworkI18nPattern(e){let t=D.I18N_PATHS;if(!t)return null;let o=e.replace(t.SOURCE_ROOT+"/",""),c=this.resolveFrameworkPackage("@donotdev/core");if(!c)return null;let n=this.normalizePath(F(c,t.PUBLISHED_ROOT,o)),r=n.replace(/\/[^/]*\*.*$/,"");return this.pathExists(r),n}async _globWithNormalization(e,t){return(await ve(e,t)).map(c=>{let n=typeof c=="string"?c:c.path;return this.normalizePath(n)}).sort()}async resolveFiles(e,t="css"){if(!e||typeof e!="object")return{frameworkFiles:[],consumerFiles:[]};if(t==="i18n")return{frameworkFiles:[],consumerFiles:[]};if(Array.isArray(e.framework)||(e.framework=[]),!Array.isArray(e.consumer))return{frameworkFiles:[],consumerFiles:[]};let o=[...e.framework,...e.consumer];for(let s of o)if(typeof s!="string"||s.trim()==="")return{frameworkFiles:[],consumerFiles:[]};let c=this.getAppRoot(),n=D.getGlobOptionsFor?D.getGlobOptionsFor(t):{ignore:["**/node_modules/**","**/dist/**","**/build/**"]},r=this.normalizePath(c),a=e.framework.map(s=>{let u=this.normalizePath(s);return u.startsWith(r)?u.slice(r.length+1):u}),l=e.consumer.map(s=>{let u=this.normalizePath(s);return u.startsWith(r)?u.slice(r.length+1):u}),m={...n,onlyFiles:!0,absolute:!0,braceExpansion:!0,extglob:!0,globstar:!0,cwd:c};try{let s=a.length>0?await this._globWithNormalization(a,m):[],u=await this._globWithNormalization(l,m);return{frameworkFiles:s,consumerFiles:u}}catch{return this.options.debug,{frameworkFiles:[],consumerFiles:[]}}}async resolvePatterns(e){if(!D.getPatternsFor)return{framework:[],consumer:[],all:[]};let t=this.getAppRoot(),o=this.getRepoRoot();if(e==="i18n"&&(!t||t===o))throw new Error(`Cannot resolve i18n patterns: appRoot not set (appRoot: ${t}, repoRoot: ${o}). Ensure configResolved hook has run before discovery.`);let c=D.getPatternsFor(e),n=this.isMonorepo();if(e==="i18n"){let l=c,m={eager:l.eager.map(s=>s.startsWith("!")?"!"+this.resolveAppPath(s.slice(1)):this.resolveAppPath(s)),lazy:l.lazy.map(s=>s.startsWith("!")?"!"+this.resolveAppPath(s.slice(1)):this.resolveAppPath(s)),framework:{eager:n?(l.framework?.eager||[]).map(s=>this.resolveRepoPath(s)).filter(Boolean):await Promise.all((l.framework?.eager||[]).map(s=>this._resolveFrameworkI18nPattern(s))).then(s=>s.filter(Boolean)),lazy:n?(l.framework?.lazy||[]).map(s=>this.resolveRepoPath(s)).filter(Boolean):await Promise.all((l.framework?.lazy||[]).map(s=>this._resolveFrameworkI18nPattern(s))).then(s=>s.filter(Boolean))},all:[]};return m.all=[...m.eager,...m.lazy,...m.framework.eager,...m.framework.lazy],m}let r=c,a={framework:n?(r.framework||[]).map(l=>this.resolveRepoPath(l)).filter(Boolean):[],consumer:(r.consumer||[]).map(l=>this.resolveAppPath(l)),all:[]};return a.all=[...a.consumer,...a.framework],a}getEmptyModulePath(){return this.getEmptyCjsModulePath().replace(/\.cjs$/,".js")}getEmptyCjsModulePath(){let e=this.resolvePackage("@donotdev/core/empty");if(!e)throw new Error("Cannot resolve @donotdev/core/empty \u2014 package setup is broken");return e}_findRepoRoot(e){let t=this.normalizePath(e),o=0,c=this.options.maxLevels;for(;o<c;){let n=this.normalizePath(F(t,Q.TOOLING)),r=this.normalizePath(F(t,Q.CORE));if(this.pathExists(n)&&this.pathExists(r))return t;let a=F(t,"apps");if(this.pathExists(a)&&this.statSync(a)?.isDirectory())return this.normalizePath(t);let l=this.normalizePath(F(t,"package.json"));if(this.pathExists(l)&&this.normalizePath(O(t))===t)return t;let m=this.normalizePath(O(t));if(m===t)break;t=m,o++}return this.normalizePath(e)}};function M(i={}){let{entry:e="src/index.ts",outDir:t="lib",minify:o=!1,sourcemap:c=!0,platform:n="firebase",workspace:r,bundleWorkspaceDeps:a=!1,importFramework:l=!1,external:m=!1,...s}=i,u=E.getInstance(),h=V(r),f={entryPoints:[e],bundle:!0,platform:"node",target:"node20",format:"esm",outdir:t,outExtension:{".js":".js"},minify:o,sourcemap:c,metafile:!0,logLevel:"info",loader:{".ts":"ts",".tsx":"tsx",".css":"empty"},keepNames:!0,treeShaking:!0,...s};a&&Object.keys(h).length>0&&(f.alias=Object.fromEntries(Object.entries(h).map(([g,p])=>[g,u.normalizePath(p)]))),f.mainFields=["module","main"],f.conditions=["react-server","import","module","node"];let w=["fs","path","crypto","util","stream","events","buffer","url","querystring","http","https","zlib","os","child_process","assert","constants","domain","punycode","string_decoder","timers","tty","vm","worker_threads","perf_hooks","async_hooks"],$=[];if(a)try{let g=r?.root||process.cwd(),p=process.cwd(),v=10;for(let b=0;b<v;b++){let x=u.normalizePath(`${p}/package.json`);if(u.pathExists(x)){let S=u.readSync(x,{format:"json"});if(S&&Array.isArray(S.workspaces)){g=u.normalizePath(p);for(let A of S.workspaces)A==="apps/*"||A==="functions"||!A.includes("*")&&!A.includes("/")&&$.push(A);break}}let P=u.getDirname(p);if(P===p)break;p=P}}catch{}let z={name:"external-node-modules",setup(g){g.onResolve({filter:/^firebase($|\/)/},p=>{if(p.path==="firebase-admin"||p.path.startsWith("firebase-admin/")||p.path==="firebase-functions"||p.path.startsWith("firebase-functions/"))return null;let v;if(r?.type==="dndev"&&r.root)v=u.normalizePath(`${r.root}/packages/core/config/functions/firebase-stub.js`);else{let b=import.meta.url,P=new URL(b).pathname.replace(/^\/([A-Z]:)/i,"$1"),S=u.getDirname(P);v=u.normalizePath(`${S}/firebase-stub.js`)}return{path:v}}),g.onResolve({filter:/.*/},p=>{if(p.kind==="entry-point")return null;if(p.path.match(/@donotdev\/functions\/.+/)&&a&&r?.type==="dndev"){let v=p.path.replace("@donotdev/functions/","");return{path:u.normalizePath(`${r.root}/packages/functions/src/${v}/index.ts`)}}if(p.path==="@donotdev/utils")return r?.type==="dndev"?{path:u.normalizePath(`${r.root}/packages/core/utils/src/server/index.ts`)}:g.resolve("@donotdev/utils/server",{kind:p.kind,resolveDir:p.resolveDir});if(p.path.match(/@donotdev\/utils\/.+/)&&r?.type==="dndev"){let v=p.path.replace("@donotdev/utils/","");return{path:u.normalizePath(`${r.root}/packages/core/utils/src/${v}/index.ts`)}}if(p.path==="@donotdev/supabase")return r?.type==="dndev"?{path:u.normalizePath(`${r.root}/packages/providers/supabase/src/server/index.ts`)}:g.resolve("@donotdev/supabase/server",{kind:p.kind,resolveDir:p.resolveDir});if(p.path==="@donotdev/core")return r?.type==="dndev"?{path:u.normalizePath(`${r.root}/packages/core/server.ts`)}:g.resolve("@donotdev/core/server",{kind:p.kind,resolveDir:p.resolveDir});if(p.path.match(/@donotdev\/core\/.+/)&&a&&r?.type==="dndev"){let v=p.path.replace("@donotdev/core/","");return{path:u.normalizePath(`${r.root}/packages/core/${v}.ts`)}}if(p.path==="firebase-admin"||p.path.startsWith("firebase-admin/")||p.path==="firebase-functions"||p.path.startsWith("firebase-functions/"))return{path:p.path,external:!0};if(p.path.match(/@donotdev\/core\/.+/)&&a&&r?.type==="dndev"){let v=p.path.replace("@donotdev/core/","");return{path:u.normalizePath(`${r.root}/packages/core/${v}.ts`)}}if(p.path.startsWith("@donotdev/")||p.path==="valibot"||p.path.startsWith("valibot/"))return null;if($.length>0){let v=p.path.split("/")[0];if($.includes(v))return null}return p.path.startsWith(".")||p.path.startsWith("/")?null:{path:p.path,external:!0}})}};if(f.external=[...w,"firebase-admin","firebase-functions"],f.plugins=[z,...f.plugins||[]],f.define={"process.env.NODE_ENV":JSON.stringify(process.env.NODE_ENV||"production"),...f.define||{}},l&&r.type==="dndev"){let g=r.root,p=u.normalizePath(`${g}/functions/lib`);f.alias={...f.alias,"@donotdev/functions":p}}if(n==="framework"){let g=E.getInstance(),p=r?.root?g.normalizePath(`${r.root}/packages/functions`):process.cwd(),v=g.normalizePath(`${p}/package.json`),b=g.readSync(v,{format:"json"});if(b?.exports){let x={};for(let[,P]of Object.entries(b.exports)){let S=P?.import||P?.default||(typeof P=="string"?P:null);if(!S||!S.endsWith(".ts"))continue;let A=S.replace(/^\.\/src\//,"").replace(/\.ts$/,"");x[A]=S}Object.keys(x).length>0&&(f.entryPoints=x,f.splitting=!0,f.chunkNames="chunks/[name]-[hash]")}}return f}import{spawnSync as ye}from"node:child_process";import C from"node:fs";import be from"node:os";import j from"node:path";var _=E.getInstance(),W=["create","get","list","listCard","update","delete","bulk"];function te(i,e=0){let t=" ".repeat(e),o="";for(let[c,n]of Object.entries(i))if(n!=null)if(typeof n=="object"&&!Array.isArray(n))Object.keys(n).length===0?o+=`${t}${c}: {}
|
|
4
|
+
`:o+=`${t}${c}:
|
|
5
|
+
${te(n,e+1)}`;else if(Array.isArray(n))if(n.length===0)o+=`${t}${c}: []
|
|
6
|
+
`;else{o+=`${t}${c}:
|
|
7
|
+
`;for(let r of n)if(typeof r=="object"&&r!==null){let a=Object.entries(r),[l,m]=a[0];o+=`${t} - ${l}: ${m}
|
|
8
|
+
`;for(let s=1;s<a.length;s++){let[u,h]=a[s];o+=`${t} ${u}: ${h}
|
|
9
9
|
`}}else o+=`${t} - ${r}
|
|
10
|
-
`}else o+=`${t}${
|
|
11
|
-
`;return o}
|
|
10
|
+
`}else o+=`${t}${c}: ${n}
|
|
11
|
+
`;return o}function re(i){if(!_.pathExists(i))return[];let e=_.readSync(i,{format:"text"}),t=[],o=e.matchAll(/export\s*\{([^}]+)\}/g);for(let n of o)if(n[1]){let r=n[1].split(",").map(a=>{let l=a.trim().split(/\s+as\s+/);return(l[1]||l[0]||"").trim()}).filter(Boolean);t.push(...r)}let c=e.matchAll(/export\s+const\s+(\w+)/g);for(let n of c)n[1]&&t.push(n[1]);return[...new Set(t)]}var ke=6e4;function Pe(i){let e=i;for(;;){let t=j.join(e,"node_modules","firebase-functions","package.json");if(C.existsSync(t)){let c=JSON.parse(C.readFileSync(t,"utf8")),n=typeof c.bin=="string"?c.bin:c.bin?.["firebase-functions"];if(!n)throw new Error(`${t} declares no firebase-functions bin: upgrade firebase-functions.`);return j.join(j.dirname(t),n)}let o=j.dirname(e);if(o===e)throw new Error(`firebase-functions not found from ${i}: add it to the functions package dependencies.`);e=o}}function B(i="."){let e=j.resolve(i),t=Pe(e),o=C.mkdtempSync(j.join(be.tmpdir(),"dndev-functions-manifest-")),c=j.join(o,"manifest.json");try{let n=ye("node",[t],{cwd:e,env:{HOME:process.env.HOME,PATH:process.env.PATH,NODE_ENV:process.env.NODE_ENV,FUNCTIONS_MANIFEST_OUTPUT_PATH:c},encoding:"utf8",stdio:["ignore","pipe","pipe"],timeout:ke});if(n.error)throw new Error(`Could not read the secrets the functions declare (firebase-functions manifest in ${e}): ${n.error.message}`);if(n.status!==0)throw new Error(`Could not read the secrets the functions declare: the firebase-functions SDK failed to load the bundle in ${e} (exit ${n.status}). Build the functions first.
|
|
12
|
+
${String(n.stderr).trim()}`);let r=JSON.parse(C.readFileSync(c,"utf8")),a={};for(let[l,m]of Object.entries(r.endpoints??{})){let s=(m?.secretEnvironmentVariables??[]).map(u=>{if(typeof u?.key!="string"||!u.key)throw new Error(`firebase-functions manifest: endpoint "${l}" has a secret without a key.`);return u.key});s.length>0&&(a[m.entryPoint??l]=s)}return a}finally{C.rmSync(o,{recursive:!0,force:!0})}}function ee(i,e){let t=i?.length?i:e;return t?.length?t.map(o=>({key:o})):void 0}function oe(i){return W.some(e=>i.startsWith(`${e}_`))}function se(i,e={}){let t=i.defaults||{},o=t.labels||{},c={},n=e.declaredSecrets??B(e.functionsDir),r=e.entryFile?re(e.entryFile):[],a=i.functions||{},l=new Set(Object.keys(a));for(let s of r)!oe(s)&&!l.has(s)&&l.add(s);for(let s of l){let u=a[s]||{},h={...o,...u.labels};u.category&&(h.category=u.category);let f=u.entryPoint||s;c[s]={region:u.region||t.region||["europe-west1"],platform:u.platform||t.platform||"gcfv2",entryPoint:f,labels:h},u.trigger==="http"?c[s].httpsTrigger={}:c[s].callableTrigger={};let w=ee(u.secrets,n[f]);w&&(c[s].secretEnvironmentVariables=w)}if(i.crud?.entities)for(let s of i.crud.entities)for(let u of W){let h=`${u}_${s}`;c[h]={region:t.region||["europe-west1"],platform:t.platform||"gcfv2",callableTrigger:{},entryPoint:h,labels:{...o,category:"crud"}};let f=ee(void 0,n[h]);f&&(c[h].secretEnvironmentVariables=f)}return`# Firebase Functions Configuration
|
|
12
13
|
# Generated by @donotdev/core/functions - DO NOT EDIT MANUALLY
|
|
13
14
|
# Generated at: ${new Date().toISOString()}
|
|
14
15
|
|
|
15
|
-
`+
|
|
16
|
+
`+te({endpoints:c,specVersion:"v1alpha1",requiredAPIs:[]})}function ne(i){let e=i.crud?.entities||[],o=[`// Auto-generated CRUD exports - DO NOT EDIT MANUALLY
|
|
16
17
|
// Generated by @donotdev/core/functions at ${new Date().toISOString()}
|
|
17
18
|
|
|
18
19
|
import * as entities from 'entities';
|
|
19
20
|
import { createCrudFunctions } from '@donotdev/functions/firebase';
|
|
20
21
|
|
|
21
22
|
const crud = createCrudFunctions(entities);
|
|
22
|
-
`];for(let
|
|
23
|
+
`];for(let c of e){let n=[""];for(let r of W){let a=`${r}_${c}`;n.push(`export const ${a} = crud['${a}'];`)}o.push(n.join(`
|
|
23
24
|
`))}return o.join(`
|
|
24
25
|
`)+`
|
|
25
|
-
`}function
|
|
26
|
-
`));let
|
|
27
|
-
`;if(
|
|
28
|
-
`+
|
|
26
|
+
`}function G(i,e={}){let t=Object.keys(i.functions||{}),o=[];if(i.crud?.entities)for(let l of i.crud.entities)for(let m of W)o.push(`${m}_${l}`);let n=(e.entryFile?re(e.entryFile):[]).filter(l=>!oe(l)&&!t.includes(l)),r=[...t,...n],a=e.declaredSecrets??B(e.functionsDir);return{yaml:se(i,{...e,declaredSecrets:a}),functions:[...r,...o],staticFunctions:r,crudFunctions:o,autoDetected:n,autoSecrets:[...new Set(Object.values(a).flat())].sort(),declaredSecrets:a}}function H(i,e={}){let t=new Set;for(let s of Object.values(i.functions||{}))if(s.secrets)for(let u of s.secrets)t.add(u);let o=e.declaredSecrets??B(e.functionsDir);for(let s of Object.values(o))for(let u of s)t.add(u);if(t.size===0||!_.pathExists(".env"))return{stripped:[],kept:0};let n=_.readSync(".env").split(/\r?\n/),r=[],a=[];for(let s of n){let u=s.trim();if(!u||u.startsWith("#")){r.push(s);continue}let h=u.indexOf("="),f=h>0?u.substring(0,h).trim():"";t.has(f)?a.push(s):r.push(s)}if(a.length===0)return{stripped:[],kept:r.length};_.writeSync(".env",r.join(`
|
|
27
|
+
`),{overwrite:!0});let l=`# Secrets managed by sync-secrets (auto-filtered by build)
|
|
28
|
+
`;if(_.pathExists(".env.local")){let s=_.readSync(".env.local"),u=new Set(s.split(/\r?\n/).filter(f=>f.trim()&&!f.trim().startsWith("#")).map(f=>f.split("=")[0].trim())),h=a.filter(f=>!u.has(f.split("=")[0].trim()));h.length>0&&_.writeSync(".env.local",s.trimEnd()+`
|
|
29
|
+
`+l+h.join(`
|
|
29
30
|
`)+`
|
|
30
|
-
|
|
31
|
+
`,{overwrite:!0})}else _.writeSync(".env.local",l+a.join(`
|
|
31
32
|
`)+`
|
|
32
|
-
`);return{stripped:
|
|
33
|
+
`);return{stripped:a.map(s=>s.split("=")[0].trim()),kept:r.length}}function Se(i={}){let e=T();return M({...i,platform:"firebase",bundleWorkspaceDeps:!0,importFramework:!0,workspace:e})}async function Ee(i,e={}){let{entry:t="src/index.ts",outDir:o="lib",minify:c=process.env.NODE_ENV==="production",sourcemap:n=!0,analyze:r=!1,entryFile:a="src/index.ts",envPath:l=".env",...m}=e;try{let s=E.getInstance(),u=ne(i);s.writeSync("src/.generated/crud-exports.ts",u,{overwrite:!0});let{build:h}=await import("esbuild"),f=Se({entry:t,outDir:o,minify:c,sourcemap:n,...m}),w=await h(f);w.errors.length>0&&process.exit(1),w.warnings.length>0;let{yaml:$,staticFunctions:z,crudFunctions:g,autoDetected:p,autoSecrets:v,declaredSecrets:b}=G(i,{entryFile:a,envPath:l});s.writeSync("functions.yaml",$,{overwrite:!0}),p.length>0,v.length>0;let{stripped:x}=H(i,{declaredSecrets:b});if(x.length>0,r&&w.metafile){let{analyzeMetafile:P}=await import("esbuild"),S=await P(w.metafile)}}catch{process.exit(1)}}var ie="nodejs22.x",we=["import { createRequire as __dndevCreateRequire } from 'node:module';","import { fileURLToPath as __dndevFileURLToPath } from 'node:url';","import { dirname as __dndevDirname } from 'node:path';","const require = __dndevCreateRequire(import.meta.url);","const __filename = __dndevFileURLToPath(import.meta.url);","const __dirname = __dndevDirname(__filename);"].join(`
|
|
34
|
+
`);function xe(i){return i.startsWith("_")||i.startsWith(".")||i.endsWith(".d.ts")||/\.(test|spec)\.ts$/.test(i)?!1:i.endsWith(".ts")}function _e(i,e){let t=[],o=(c,n)=>{for(let r of i.readdirSync(c,{withFileTypes:!0}))if(r.isDirectory()){if(r.name==="__tests__"||r.name.startsWith("_")||r.name.startsWith("."))continue;o(`${c}/${r.name}`,`${n}${r.name}/`)}else r.isFile()&&xe(r.name)&&t.push(`${n}${r.name}`)};return o(e,""),t.sort()}function ae({runtime:i,sourcemap:e}){return{runtime:i,handler:"index.mjs",launcherType:"Nodejs",shouldAddHelpers:!0,shouldAddSourcemapSupport:e}}async function Re(i={}){let{apiDir:e="src/api",outDir:t=".vercel/output",runtime:o=ie,minify:c=process.env.NODE_ENV==="production",sourcemap:n=!0}=i,r=E.getInstance(),a=r.normalizePath(process.cwd()),l=r.normalizePath(`${a}/${e}`),m=r.normalizePath(`${a}/${t}/functions`);try{if(!r.statSync(l)?.isDirectory())throw new Error(`${e}/ not found in ${a}: Vercel functions live in ${e}/<path>.ts (URL /api/<path>)`);let s=_e(r,l);if(s.length===0)throw new Error(`No function in ${e}/ (expected ${e}/<path>.ts)`);let u=s.filter(g=>/[[\]]/.test(g));if(u.length>0)throw new Error(`Dynamic route segments are not supported in ${e}/: ${u.join(", ")}. Read the value from the query string or the body instead.`);r.removeSync(m);let h=Object.fromEntries(s.map(g=>[`api/${g.slice(0,-3)}.func/index`,`${l}/${g}`])),{build:f}=await import("esbuild");(await f({entryPoints:h,outdir:m,outExtension:{".js":".mjs"},bundle:!0,platform:"node",target:"node22",format:"esm",minify:c,sourcemap:n,keepNames:!0,treeShaking:!0,logLevel:"info",loader:{".css":"empty"},mainFields:["module","main"],conditions:["react-server","import","module","node"],banner:{js:we},define:{"process.env.NODE_ENV":JSON.stringify(process.env.NODE_ENV||"production")}})).errors.length>0&&process.exit(1);let $=ae({runtime:o,sourcemap:!!n}),z=s.map(g=>`api/${g.slice(0,-3)}`);for(let g of z)r.writeSync(`${m}/${g}.func/.vc-config.json`,$,{format:"json",overwrite:!0});return z}catch{process.exit(1)}}function ce(i={}){let{entry:e="src/index.ts",outDir:t="lib",minify:o=!1,sourcemap:c=!0,platform:n="firebase",...r}=i,a=T();return M({entry:e,outDir:t,minify:o,sourcemap:c,platform:n,workspace:a,...r})}function st(i={}){return ce({...i,platform:"framework",bundleWorkspaceDeps:!0})}function nt(i={}){return ce({...i,platform:"firebase",bundleWorkspaceDeps:!0,importFramework:!0})}export{ie as VERCEL_FUNCTIONS_RUNTIME,Ee as buildFunctions,Re as buildVercelFunctions,nt as createAppFunctionsConfig,ce as createFunctionsEsbuildConfig,st as createRootFunctionsConfig,B as detectDeclaredSecrets,H as filterEnvSecrets,se as generateFunctionsYaml,G as generateFunctionsYamlWithInfo,ae as vercelFunctionConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><defs><clipPath id="za-a"><path fill-opacity=".7" d="M-71.9 0h682.7v512H-71.9z"></path></clipPath></defs><g clip-path="url(#za-a)" transform="translate(67.4)scale(.93748)"><g fill-rule="evenodd" stroke-width="1pt"><path fill="#000001" d="M-71.9 407.8V104.4L154 256.1z"></path><path fill="#000c8a" d="m82.2 512.1 253.6-170.6H696V512H82.2z"></path><path fill="#e1392d" d="M66 0h630v170.8H335.7S69.3-1.7 66 0"></path><path fill="#ffb915" d="M-71.9 64v40.4L154 256-72 407.8v40.3l284.5-192z"></path><path fill="#007847" d="M-71.9 64V0h95l301.2 204h371.8v104.2H324.3L23 512h-94.9v-63.9l284.4-192L-71.8 64z"></path><path fill="#fff" d="M23 0h59.2l253.6 170.7H696V204H324.3zm0 512.1h59.2l253.6-170.6H696v-33.2H324.3L23 512z"></path></g></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480" xmlns:xlink="http://www.w3.org/1999/xlink"><path fill="red" d="M0 0h640v480H0z"></path><path id="al-a" fill="#000001" d="M272 93.3c-4.6 0-12.3 1.5-12.2 5-13-2.1-14.3 3.2-13.5 8 1.2-1.9 2.7-3 3.9-3.1 1.7-.3 3.5.3 5.4 1.4a21.6 21.6 0 0 1 4.8 4.1c-4.6 1.1-8.2.4-11.8-.2a16.5 16.5 0 0 1-5.7-2.4c-1.5-1-2-2-4.3-4.3-2.7-2.8-5.6-2-4.7 2.3 2.1 4 5.6 5.8 10 6.6 2.1.3 5.3 1 8.9 1 3.6 0 7.6-.5 9.8 0-1.3.8-2.8 2.3-5.8 2.8-3 .6-7.5-1.8-10.3-2.4.3 2.3 3.3 4.5 9.1 5.7 9.6 2 17.5 3.6 22.8 6.5a37.3 37.3 0 0 1 10.9 9.2c4.7 5.5 5 9.8 5.2 10.8 1 8.8-2.1 13.8-7.9 15.4-2.8.7-8-.7-9.8-2.9-2-2.2-3.7-6-3.2-12 .5-2.2 3.1-8.3.9-9.5a273.7 273.7 0 0 0-32.3-15.1c-2.5-1-4.5 2.4-5.3 3.8a50.2 50.2 0 0 1-36-23.7c-4.2-7.6-11.3 0-10.1 7.3 1.9 8 8 13.8 15.4 18 7.5 4.1 17 8.2 26.5 8 5.2 1 5.1 7.6-1 8.9-12.1 0-21.8-.2-30.9-9-6.9-6.3-10.7 1.2-8.8 5.4 3.4 13.1 22.1 16.8 41 12.6 7.4-1.2 3 6.6 1 6.7-8 5.7-22.1 11.2-34.6 0-5.7-4.4-9.6-.8-7.4 5.5 5.5 16.5 26.7 13 41.2 5 3.7-2.1 7.1 2.7 2.6 6.4-18.1 12.6-27.1 12.8-35.3 8-10.2-4.1-11 7.2-5 11 6.7 4 23.8 1 36.4-7 5.4-4 5.6 2.3 2.2 4.8-14.9 12.9-20.8 16.3-36.3 14.2-7.7-.6-7.6 8.9-1.6 12.6 8.3 5.1 24.5-3.3 37-13.8 5.3-2.8 6.2 1.8 3.6 7.3a53.9 53.9 0 0 1-21.8 18c-7 2.7-13.6 2.3-18.3.7-5.8-2-6.5 4-3.3 9.4 1.9 3.3 9.8 4.3 18.4 1.3 8.6-3 17.8-10.2 24.1-18.5 5.5-4.9 4.9 1.6 2.3 6.2-12.6 20-24.2 27.4-39.5 26.2-6.7-1.2-8.3 4-4 9 7.6 6.2 17 6 25.4-.2 7.3-7 21.4-22.4 28.8-30.6 5.2-4.1 6.9 0 5.3 8.4-1.4 4.8-4.8 10-14.3 13.6-6.5 3.7-1.6 8.8 3.2 9 2.7 0 8.1-3.2 12.3-7.8 5.4-6.2 5.8-10.3 8.8-19.9 2.8-4.6 7.9-2.4 7.9 2.4-2.5 9.6-4.5 11.3-9.5 15.2-4.7 4.5 3.3 6 6 4.1 7.8-5.2 10.6-12 13.2-18.2 2-4.4 7.4-2.3 4.8 5-6 17.4-16 24.2-33.3 27.8-1.7.3-2.8 1.3-2.2 3.3l7 7c-10.7 3.2-19.4 5-30.2 8l-14.8-9.8c-1.3-3.2-2-8.2-9.8-4.7-5.2-2.4-7.7-1.5-10.6 1 4.2 0 6 1.2 7.7 3.1 2.2 5.7 7.2 6.3 12.3 4.7 3.3 2.7 5 4.9 8.4 7.7l-16.7-.5c-6-6.3-10.6-6-14.8-1-3.3.5-4.6.5-6.8 4.4 3.4-1.4 5.6-1.8 7.1-.3 6.3 3.7 10.4 2.9 13.5 0l17.5 1.1c-2.2 2-5.2 3-7.5 4.8-9-2.6-13.8 1-15.4 8.3a17 17 0 0 0-1.2 9.3c.8-3 2.3-5.5 4.9-7 8 2 11-1.3 11.5-6.1 4-3.2 9.8-3.9 13.7-7.1 4.6 1.4 6.8 2.3 11.4 3.8 1.6 5 5.3 6.9 11.3 5.6 7 .2 5.8 3.2 6.4 5.5 2-3.3 1.9-6.6-2.5-9.6-1.6-4.3-5.2-6.3-9.8-3.8-4.4-1.2-5.5-3-9.9-4.3 11-3.5 18.8-4.3 29.8-7.8l7.7 6.8c1.5.9 2.9 1.1 3.8 0 6.9-10 10-18.7 16.3-25.3 2.5-2.8 5.6-6.4 9-7.3 1.7-.5 3.8-.2 5.2 1.3 1.3 1.4 2.4 4.1 2 8.2-.7 5.7-2.1 7.6-3.7 11-1.7 3.5-3.6 5.6-5.7 8.3-4 5.3-9.4 8.4-12.6 10.5-6.4 4.1-9 2.3-14 2-6.4.7-8 3.8-2.8 8.1 4.8 2.6 9.2 2.9 12.8 2.2 3-.6 6.6-4.5 9.2-6.6 2.8-3.3 7.6.6 4.3 4.5-5.9 7-11.7 11.6-19 11.5-7.7 1-6.2 5.3-1.2 7.4 9.2 3.7 17.4-3.3 21.6-8 3.2-3.5 5.5-3.6 5 1.9-3.3 9.9-7.6 13.7-14.8 14.2-5.8-.6-5.9 4-1.6 7 9.6 6.6 16.6-4.8 19.9-11.6 2.3-6.2 5.9-3.3 6.3 1.8 0 6.9-3 12.4-11.3 19.4 6.3 10.1 13.7 20.4 20 30.5l19.2-214L320 139c-2-1.8-8.8-9.8-10.5-11-.7-.6-1-1-.1-1.4.9-.4 3-.8 4.5-1-4-4.1-7.6-5.4-15.3-7.6 1.9-.8 3.7-.4 9.3-.6a30.2 30.2 0 0 0-13.5-10.2c4.2-3 5-3.2 9.2-6.7a86.3 86.3 0 0 1-19.5-3.8 37.4 37.4 0 0 0-12-3.4zm.8 8.4c3.8 0 6.1 1.3 6.1 2.9 0 1.6-2.3 2.9-6.1 2.9s-6.2-1.5-6.2-3c0-1.6 2.4-2.8 6.2-2.8"></path><use xlink:href="#al-a" width="100%" height="100%" transform="matrix(-1 0 0 1 640 0)"></use></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><g fill-rule="evenodd"><path fill="#f2a800" d="M0 0h640v480H0z"></path><path fill="#0033a0" d="M0 0h640v320H0z"></path><path fill="#d90012" d="M0 0h640v160H0z"></path></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#74acdf" d="M0 0h640v480H0z"></path><path fill="#fff" d="M0 160h640v160H0z"></path><g transform="translate(320 240)"><circle r="45" fill="#f6b40e" stroke="#85340a" stroke-width="1.5"></circle><circle r="40" fill="#f6b40e"></circle><g fill="#85340a"><path d="M0-35l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M0 35l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M-35 0l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M35 0l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M-25-25l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M25 25l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M25-25l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M-25 25l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M-18-30l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M18 30l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M18-30l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M-18 30l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M-30-18l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M30 18l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M30-18l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path><path d="M-30 18l3 9h10l-8 6 3 9-8-6-8 6 3-9-8-6h10z"></path></g><circle r="12" fill="#85340a"></circle></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><g fill-rule="evenodd" stroke-width="1pt"><path fill="#fff" d="M0 0h640v480H0z"></path><path fill="#ed2939" d="M0 160h640v160H0z"></path></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#012169" d="M0 0h640v480H0z"></path><path fill="#FFF" d="m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0z"></path><path fill="#C8102E" d="m424 281 216 159v40L369 281zm-184 20 6 35L54 480H0zM640 0v3L391 191l2-44L590 0zM0 0l239 176h-60L0 42z"></path><path fill="#FFF" d="M241 0v480h160V0zM0 160v160h640V160z"></path><path fill="#C8102E" d="M0 193v96h640v-96zM273 0v480h96V0z"></path><path fill="#012169" d="M0 0l320 240L0 480zm640 0L320 240l320 240z"></path><path fill="#FFF" d="m171 286.7 20.6 63.4 53.4-38.8-33 51.1 53.4-38.8-66.4 2.1 20.6 63.4-20.6-63.4-66.4 2.1 53.4 38.8-33-51.1z"></path><path fill="#FFF" d="m396.8 91.4 13.7 42.3 35.6-25.9-22 34.1 35.6-25.9-44.3 1.4 13.7 42.3-13.7-42.3-44.3 1.4 35.6 25.9-22-34.1z"></path><path fill="#FFF" d="m430.4 328.6 13.7 42.3 35.6-25.9-22 34.1 35.6-25.9-44.3 1.4 13.7 42.3-13.7-42.3-44.3 1.4 35.6 25.9-22-34.1z"></path><path fill="#FFF" d="m488.2 209.7 13.7 42.3 35.6-25.9-22 34.1 35.6-25.9-44.3 1.4 13.7 42.3-13.7-42.3-44.3 1.4 35.6 25.9-22-34.1z"></path><path fill="#FFF" d="m351.8 251 13.7 42.3 35.6-25.9-22 34.1 35.6-25.9-44.3 1.4 13.7 42.3-13.7-42.3-44.3 1.4 35.6 25.9-22-34.1z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#3f9c35" d="M.1 0h640v480H.1z"></path><path fill="#ed2939" d="M.1 0h640v320H.1z"></path><path fill="#00b9e4" d="M.1 0h640v160H.1z"></path><circle cx="304" cy="240" r="72" fill="#fff"></circle><circle cx="320" cy="240" r="60" fill="#ed2939"></circle><path fill="#fff" d="m384 200 7.7 21.5 20.6-9.8-9.8 20.7L424 240l-21.5 7.7 9.8 20.6-20.6-9.8L384 280l-7.7-21.5-20.6 9.8 9.8-20.6L344 240l21.5-7.7-9.8-20.6 20.6 9.8z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 8"><rect width="16" height="8" fill="#002395"></rect><path d="m4.24 0h8v8z" fill="#fecb00"></path><g id="g"><path d="M2.353283.5248529 2.8-.85 3.246717.524853 2.077197-.324853H3.522803z" fill="#fff" id="s"></path><use xlink:href="#s" x="1" y="1"></use><use xlink:href="#s" x="2" y="2"></use></g><use xlink:href="#g" x="3" y="3"></use><use xlink:href="#g" x="6" y="6"></use></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#006a4e" d="M0 0h640v480H0z"></path><circle cx="280" cy="240" r="160" fill="#f42a41"></circle></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 780"><path fill="#ef3340" d="M0 0h900v780H0z"></path><path fill="#fdda25" d="M0 0h600v780H0z"></path><path d="M0 0h300v780H0z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#fff" d="M0 0h640v160H0z"></path><path fill="#00966e" d="M0 160h640v160H0z"></path><path fill="#d62612" d="M0 320h640v160H0z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="bn-a" fill="#da291c" d="m109.1 193.3-33-14.7 16-35.8 33 14.7zm65.6-25-33.3-14.2-15.1 35.3 33.3 14.2z"></path></defs><path fill="#f7e017" d="M0 0h640v480H0z"></path><path fill="#fff" d="M43.7 0H157l483 234.9V339z"></path><path d="M0 141.1V245L535.4 480h104.5z"></path><g fill="#da291c" transform="matrix(1.65625 0 0 1.65625 210.5 137.9)"><use xlink:href="#bn-a" width="100%" height="100%"></use><use xlink:href="#bn-a" width="100%" height="100%" transform="matrix(-1 0 0 1 133 0)"></use><path d="M66.1 127.3c-23-22-26.6-56.7-4.4-80 23.4-24.6 57.3-26.7 82-2.5-12.7-5.1-33.4-1.7-41 12.3-7.5 13.7.8 28.5 7.9 33.5-13.4-6-29.4 6-27.5 18a47.3 47.3 0 0 0 17.5 13c-14.2-4.2-22.3 2.1-34.5 5.7"></path><path d="M66 123c-7-4.1-13-17.7-13-17.7 2.3-1.6 6-1.5 8 0s1.8 4 1.2 5.5c2 4.3 3.8 12.2 3.8 12.2"></path><path d="M63.6 109.6s.4-4.8-1.5-6.6c2.2-.6 6 .2 7 2.6zM69 32h-5v55.3h5z"></path><path fill="#f7e017" d="M32.6 121s11.2-12.7 34.6 0c0 0-7.3-3.7-17-3-9.5.7-17.6 3-17.6 3"></path></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-2100 -1470 4200 2940"><defs><g id="G"><clipPath id="g"><path d="m-31.5 0v-70h63v70zm31.5-47v12h31.5v-12z"></path></clipPath><use clip-path="url(#g)" xlink:href="#O"></use><path d="M5-35H31.5V-25H5z"></path><path d="m21.5-35h10v35h-10z"></path></g><g id="R"><use xlink:href="#P"></use><path d="m28 0c0-10 0-32-15-32h-19c22 0 22 22 22 32"></path></g><g id="s" fill="#fff"><g id="c"><path id="t" transform="rotate(18,0,-1)" d="m0-1v1h0.5"></path><use transform="scale(-1,1)" xlink:href="#t"></use></g><use transform="rotate(72)" xlink:href="#c"></use><use transform="rotate(-72)" xlink:href="#c"></use><use transform="rotate(144)" xlink:href="#c"></use><use transform="rotate(216)" xlink:href="#c"></use></g><g id="a"><use transform="scale(31.5)" xlink:href="#s"></use></g><g id="b"><use transform="scale(26.25)" xlink:href="#s"></use></g><g id="f"><use transform="scale(21)" xlink:href="#s"></use></g><g id="h"><use transform="scale(15)" xlink:href="#s"></use></g><g id="i"><use transform="scale(10.5)" xlink:href="#s"></use></g><path id="D" d="m-31.5 0h33a30 30 0 0 0 30-30v-10a30 30 0 0 0-30-30h-33zm13-13h19a19 19 0 0 0 19-19v-6a19 19 0 0 0-19-19h-19z" fill-rule="evenodd"></path><path id="E" transform="translate(-31.5)" d="m0 0h63v-13h-51v-18h40v-12h-40v-14h48v-13h-60z"></path><path id="e" d="m-26.25 0h52.5v-12h-40.5v-16h33v-12h-33v-11h39.25v-12h-51.25z"></path><path id="M" d="m-31.5 0h12v-48l14 48h11l14-48v48h12v-70h-17.5l-14 48-14-48h-17.5z"></path><path id="O" d="m0 0a31.5 35 0 0 0 0-70 31.5 35 0 0 0 0 70m0-13a18.5 22 0 0 0 0-44 18.5 22 0 0 0 0 44" fill-rule="evenodd"></path><path id="P" d="m-31.5 0h13v-26h28a22 22 0 0 0 0-44h-40zm13-39h27a9 9 0 0 0 0-18h-27z" fill-rule="evenodd"></path><path id="S" d="m-15.75-22c0 7 6.75 10.5 16.75 10.5s14.74-3.25 14.75-7.75c0-14.25-46.75-5.25-46.5-30.25 0.25-21.5 24.75-20.5 33.75-20.5s26 4 25.75 21.25h-15.25c0-7.5-7-10.25-15-10.25-7.75 0-13.25 1.25-13.25 8.5-0.25 11.75 46.25 4 46.25 28.75 0 18.25-18 21.75-31.5 21.75-11.5 0-31.55-4.5-31.5-22z"></path></defs><clipPath id="B"><circle r="735"></circle></clipPath><path d="m-2100-1470h4200v2940h-4200z" fill="#009440"></path><path d="M -1743,0 0,1113 1743,0 0,-1113 Z" fill="#ffcb00"></path><circle r="735" fill="#302681"></circle><path d="m-2205 1470a1785 1785 0 0 1 3570 0h-105a1680 1680 0 1 0-3360 0z" clip-path="url(#B)" fill="#fff"></path><g transform="translate(-420,1470)" fill="#009440"><use transform="rotate(-7)" y="-1697.5" xlink:href="#O"></use><use transform="rotate(-4)" y="-1697.5" xlink:href="#R"></use><use transform="rotate(-1)" y="-1697.5" xlink:href="#D"></use><use transform="rotate(2)" y="-1697.5" xlink:href="#E"></use><use transform="rotate(5)" y="-1697.5" xlink:href="#M"></use><use transform="rotate(9.75)" y="-1697.5" xlink:href="#e"></use><use transform="rotate(14.5)" y="-1697.5" xlink:href="#P"></use><use transform="rotate(17.5)" y="-1697.5" xlink:href="#R"></use><use transform="rotate(20.5)" y="-1697.5" xlink:href="#O"></use><use transform="rotate(23.5)" y="-1697.5" xlink:href="#G"></use><use transform="rotate(26.5)" y="-1697.5" xlink:href="#R"></use><use transform="rotate(29.5)" y="-1697.5" xlink:href="#E"></use><use transform="rotate(32.5)" y="-1697.5" xlink:href="#S"></use><use transform="rotate(35.5)" y="-1697.5" xlink:href="#S"></use><use transform="rotate(38.5)" y="-1697.5" xlink:href="#O"></use></g><use x="-600" y="-132" xlink:href="#a"></use><use x="-535" y="177" xlink:href="#a"></use><use x="-625" y="243" xlink:href="#b"></use><use x="-463" y="132" xlink:href="#h"></use><use x="-382" y="250" xlink:href="#b"></use><use x="-404" y="323" xlink:href="#f"></use><use x="228" y="-228" xlink:href="#a"></use><use x="515" y="258" xlink:href="#a"></use><use x="617" y="265" xlink:href="#f"></use><use x="545" y="323" xlink:href="#b"></use><use x="368" y="477" xlink:href="#b"></use><use x="367" y="551" xlink:href="#f"></use><use x="441" y="419" xlink:href="#f"></use><use x="500" y="382" xlink:href="#b"></use><use x="365" y="405" xlink:href="#f"></use><use x="-280" y="30" xlink:href="#b"></use><use x="200" y="-37" xlink:href="#f"></use><use y="330" xlink:href="#a"></use><use x="85" y="184" xlink:href="#b"></use><use y="118" xlink:href="#b"></use><use x="-74" y="184" xlink:href="#f"></use><use x="-37" y="235" xlink:href="#h"></use><use x="220" y="495" xlink:href="#b"></use><use x="283" y="430" xlink:href="#f"></use><use x="162" y="412" xlink:href="#f"></use><use x="-295" y="390" xlink:href="#a"></use><use y="575" xlink:href="#i"></use></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><defs><clipPath id="ba-a"><path fill-opacity=".7" d="M-85.3 0h682.6v512H-85.3z"></path></clipPath></defs><g fill-rule="evenodd" clip-path="url(#ba-a)" transform="translate(80)scale(.9375)"><path fill="#009" d="M-85.3 0h682.6v512H-85.3z"></path><path fill="#FC0" d="m56.5 0 511 512.3V.3z"></path><path fill="#FFF" d="M439.9 481.5 412 461.2l-28.6 20.2 10.8-33.2-28.2-20.5h35l10.8-33.2 10.7 33.3h35l-28 20.7zm81.3 10.4-35-.1-10.7-33.3-10.8 33.2h-35l28.2 20.5-10.8 33.2 28.6-20.2 28 20.3-10.5-33zM365.6 384.7l28-20.7-35-.1-10.7-33.2-10.8 33.2-35-.1 28.2 20.5-10.8 33.3 28.6-20.3 28 20.4zm-64.3-64.5 28-20.6-35-.1-10.7-33.3-10.9 33.2h-34.9l28.2 20.5-10.8 33.2 28.6-20.2 27.9 20.3zm-63.7-63.6 28-20.7h-35L220 202.5l-10.8 33.2h-35l28.2 20.4-10.8 33.3 28.6-20.3 28 20.4-10.5-33zm-64.4-64.3 28-20.6-35-.1-10.7-33.3-10.9 33.2h-34.9L138 192l-10.8 33.2 28.6-20.2 27.9 20.3-10.4-33zm-63.6-63.9 27.9-20.7h-35L91.9 74.3 81 107.6H46L74.4 128l-10.9 33.2L92.1 141l27.8 20.4zm-64-64 27.9-20.7h-35L27.9 10.3 17 43.6h-35L10.4 64l-11 33.3L28.1 77l27.8 20.4zm-64-64L9.4-20.3h-35l-10.7-33.3L-47-20.4h-35L-53.7 0l-10.8 33.2L-35.9 13l27.8 20.4z"></path></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#ce1126" d="M0 0h640v320H0z"></path><path fill="#009e60" d="M0 320h640v160H0z"></path><path fill="#fff" d="M0 0h106.7v480H0z"></path><g fill="#ce1126"><path d="M42 480 0 448l16-16L0 416l16-16L0 384l16-16L0 352l16-16L0 320l16-16L0 288l16-16L0 256l16-16L0 224l16-16L0 192l16-16L0 160l16-16L0 128l16-16L0 96l16-16L0 64l16-16L0 32l16-16L0 0l42 42L84 0l16 16-16 16 16 16-16 16 16 16-16 16 16 16-16 16 16 16-16 16 16 16-16 16 16 16-16 16 16 16-16 16 16 16-16 16 16 16-16 16 16 16-16 16 16 16L84 480z"></path><path d="M53.3 358.5 35.8 376l17.5 17.5 17.5-17.5zm0-96L35.8 280l17.5 17.5 17.5-17.5zm0-96L35.8 184l17.5 17.5 17.5-17.5zm0-96L35.8 88l17.5 17.5 17.5-17.5zm0 336 4.7 4.7 4.6-4.7-4.6-4.7zm0-48 4.7 4.7 4.6-4.7-4.6-4.7zm0-48 4.7 4.7 4.6-4.7-4.6-4.7zm0-48 4.7 4.7 4.6-4.7-4.6-4.7zm0-48 4.7 4.7 4.6-4.7-4.6-4.7zm0-48 4.7 4.7 4.6-4.7-4.6-4.7zm0-48 4.7 4.7 4.6-4.7-4.6-4.7zm0-48 4.7 4.7 4.6-4.7-4.6-4.7z"></path></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1350 900"><rect width="1350" height="900" fill="#fff"></rect><rect x="600" width="1350" height="100" fill="#000"></rect><rect x="600" y="200" width="1350" height="100" fill="#000"></rect><rect y="400" width="1350" height="100" fill="#000"></rect><rect y="600" width="1350" height="100" fill="#000"></rect><rect y="800" width="1350" height="100" fill="#000"></rect><use xlink:href="#ermine" x="-225" y="-122.5"></use><use xlink:href="#ermine" x="-75" y="-122.5"></use><use xlink:href="#ermine" x="75" y="-122.5"></use><use xlink:href="#ermine" x="225" y="-122.5"></use><use xlink:href="#ermine" x="-150"></use><g id="ermine" fill="#000"><use xlink:href="#s" transform="rotate(-90 300,167.5)"></use><path id="s" d="M 300,167.5 l -9,-13.5 l 9,-22.5 l 9,22.5 z"></path><use xlink:href="#s" transform="rotate(90 300,167.5)"></use><path d="M 300,167.5 l 40.5,99 l -31.5,-13.5 l -9,18 l -9,-18 l -31.5,13.5 z"></path></g><use xlink:href="#ermine" x="150"></use><use xlink:href="#ermine" x="-225" y="122.5"></use><use xlink:href="#ermine" x="-75" y="122.5"></use><use xlink:href="#ermine" x="75" y="122.5"></use><use xlink:href="#ermine" x="225" y="122.5"></use></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#fcdd09" d="M0 0h640v480H0z"></path><path stroke="#da121a" stroke-width="60" d="M0 90h810m0 120H0m0 120h810m0 120H0" transform="scale(.79012 .88889)"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#da121a" d="M0 0h640v480H0z"></path><g fill="#fff"><path d="M170 195h300v90H170z"></path><path d="M275 90h90v300h-90z"></path></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 600"><path fill="#ffcd00" d="M0 0h900v600H0z"></path><path fill="#003087" d="M0 300h900v300H0z"></path><path fill="#c8102e" d="M0 450h900v150H0z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#fff" d="M0 0h640v240H0z"></path><path fill="#d7141a" d="M0 240h640v240H0z"></path><path fill="#11457e" d="M360 240 0 0v480z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#00ab39" d="M0 240h640v240H0z"></path><path fill="#fff" d="M0 0h640v240H0z"></path><g stroke="#000" stroke-width="1.4"><path fill="#d21034" d="M419 70.8h-.1zm-.1 0a693.8 693.8 0 0 0-111.8 75c-17 14.9-12.2 26.7-12.9 40 .6 9-1.9 17.4-7.4 22.4l-37.8 7.6-3.6-10.4c1.1-5.4 5.5-8 14.9-4.7.7-6.8-4.9-9.6-11.3-12-2.3-1.8-5-3-4.7-9-1-13.5 20.6 1 20.8 1 .2 0-.8-13.7-10.7-16.4-5.4-1.9-7.7-7.6-5.6-11.8 4.3-8.7 12.5.6 18.7 1-.2-5.7-1.8-9.7-6.7-14.2-2.6-1.7-9-2.9-9.2-5.6-.1-3.6 6-5.2 14.5-4.2-1.8-5.1-7.5-8.4-15.3-10.8l-4.6-8.1c-2.2-4-3.2-4.2 1.9-11.8 4.5-3 10.6-7.2 15.2-10.1l-5-.6c.6-5.5.7-7.4 2-16.5-5 6.7-11 5.5-16.6 8.2 0 0-15.6 2.8-20.7 9.5l-39.4-2c-8.4 1.1-15.5 3.5-16.9 11.6-19.1 2-39.1.3-53.7 18.5 10-.4 18.6-2.8 29.8-1.4 0 0 9.5.2 11.4 10.3.2.4 3.3.4 3.3.4l3.6 2.8 1.4-3.8 3.2 2.2 1-4.2 3.2 2.2.2-5 4.2 3v-6.7s15.6 0 20.4 10c.2.1-43.7 8-86.1 4.3l12.2-6c-15.4-3.2-30-6-43.6-16.7 5.1 19.4 31.7 42.1 37.2 42l-5.2-9.4 46 2c1.7 5.1 1 10.8 5 15.3 0 0-2.5 8.4 3.2 11.8.2.4 6.7-17 6.7-17s2 4.7 4 7.8c3-15 19.4-17.5 19.4-17.5l3.4 8c-5.1.8-11.5 11.2-8 17-3.5 0-9.6 10.1-7.7 15.6-2.9 2.9-10 6.7-8.3 18.8-5.6 1.2-9 11.5-7.2 22.5-8.8 8.1-6.6 23 1.2 29.1-3.2 3-5.2 5.1-5.2 8.7-3.1-1.1-6-.2-7.3 1.8-3.8-3.9-9.2-7.2-13-3.6-1-4.6-7-9.6-13.5-9a12.3 12.3 0 0 0-9-13s-1.5-22.6-8.3-30c-.7-4 .4-6.8 6-10.2 5.7-3 6.9-5.3 6.4-13.9 2.3-5.7 4-11.5-3-15.4.2 6.8-1.8 10-4.6 13-3.3-.4-4.4 3.4-6.6 5-3.1-4.1 6.5-10.6-.6-19.9-.4-.4-5-12-16.3-11.8 5.3 3.1 7.6 8.4 7.6 13.9a41.3 41.3 0 0 0-1.8 29.3c-4.7-7-7.4-20.4-11.3-22.7-3.4-.7-5-8.7-18.3-6.4 5.7 1.5 7.6 5.9 9 9.8-3.4 1.8-1.7 6.6.9 9.9-.5 7.7 4.1 12.2 11 15L85.6 237c-2.7-.3-7 10.4-8.6 10.7-2.7 1.7-7.4 6.2-2 7.5-1.6 5.7-3.1 9.2-11.7 10.4 0 0 9 5.4 16.6-3.8 8-.2 5.4-9.8 9.3-14 0-.3 2.3-1.7 5.5-10.2 1.4 7.6 9.2 30.8 26.7 42.3 15.3 16.4 28 31.9 27.8 53.7a54 54 0 0 0 12.3-22.7 89 89 0 0 1 30.8-3.6c-1.8 3.9-3.9 7.6-1.3 10-7.4 2.6-9 8-6 13.3-7.8 5.3-8.3 8.7-8.4 17.5-14.5 18.5-23.4 17.9-37.7 13-4.6-2.7-12-6.6-15.3-4.5-6.1-4.2-15-4.8-16.5 4.6 4.7-3.9 7.4-3.1 11.1.6-.7 1.9-1.3 3.7 1.4 4.8l-3.6 4c-6.6-1-15.6-1-17.9 8.7 3.4-2.9 11-3.5 17-.8l3.5 1.2.4 4.6s-9-1.4-11.4 13.3c8.4-9 14.4-6.7 14.4-6.7 3.3 4.8 15.3 4.1 24-3.8 12.1-6.8 15.7 3 23.5-3.4 6.5-4.8 14.2-1.6 19.5 4 6.1 2.3 12.5 4.2 17.5 0 0 0 6.2-3.9 12.3 2.4 0-7-5-10.9-11.8-11l-2-2c-6.5-1.4-13.7-.8-19.4-4a58 58 0 0 1 14.1-27c9.3-10 16.2-14.6 28-29.9-.5 8.7 6.1 18.3 9.6 27 0 0 7-11.1 8-20.3.3 0 8.9-4.4 12.5-8.3 7.8 4.9 20.4-3.8 28.6-11 5 2 8.9 1.8 14.7 0-4.7 9.6 2.7 18.5 14.5 22.2 1 8.4 9.6 10.2 22.5 10.2.6 5 8.3 5.7 8.3 5.7-5 2.2-7.4 4.5-7.3 9.6-5 0-8.7 1.3-10 7-6.9.2-13.9.7-19.8 4-6.3-.9-14-3.5-18.9-8.6-2.5-2.1-3.2-5.2-7.6-6.4-2.8-3.3-6.2-2.6-7.3.6-2.9-2.3-13.8-3.3-15.7 7 5.2-3.7 9.7-5.1 13-.5-1.8 3.1 4.2 5 9.4 6.2 3.7.2 10.2 3.6 12.2 9.2a20 20 0 0 1-16.7-2.6 11 11 0 0 0-13-.8c-4.4-2.8-14.7 2.5-15.1 10.9 4.3-4 8.3-6 12.3-3.4-2 .4-1.3.6-1 1.8l10 5.8c-5 1.3-9.6 3.3-7.4 12.5 0 0 4-8 13-5 .2-.3 1.3 2.8 3.9.7 3.9-4.4 12.8-6.4 20.7-7.2 6.3-.7 12.6-2.6 18 1 5-2.5 10.4-4.2 16-.2 6.6 2 11.4 9.8 19.7 6.3 4.2-3 9.3-3 14.5 2.8 0-7.4-5.5-9.9-13.3-11.5l-5.4-3.2c-5-.8-10 .1-15.1-2.3a92.3 92.3 0 0 0 57.7-42.4l12.5 4.4c3 .2 3.2 1.2 9.3 3 .2-8.9-3.7-18.1-19.8-19l-21-8c-4.6-4.8-6.6-14.9-.9-20.8 5.6-5 6.6-4.4 10.3-10.5 4.5-.4 8.7 4.2 12.8 4.2 2 5.9 13.4 11 20.6 9.3 4.5 4 13 6.2 22.5 3a18.2 18.2 0 0 0 20.5 3c2.2 2.2 6.8 4 12 2.8.5 0 2.8 5.8 8.5 7.9-2.5 2.4-1 13 1.7 16.9a17 17 0 0 0-.9 12.7c-5.8 3.7-7 6.5-4.4 12.8-7.6 12.3-16.7 13.7-25.3 10l-9.3-6-9.8-9.6c-1.7-1.6-5.2-2-5.9 1.4 0 0-12.6-2.8-13.7 7.9 5.3-5.1 12.7-.6 12.7-.4s-1.8 1.4-.4 3.4c.3-.3 9.3 3.3 17.2 6.7 4.3 1.7 5.3 2.2 7.2 3.2a340.8 340.8 0 0 0-7.2-3.2 32.8 32.8 0 0 0-11-2.9c-4.4-.4-9.2-1-11.4 2.4-4.8 2-12.4 3.7-12 12.7 3.2-5.4 7.7-5.1 13.4-4.6l-.4 1.2c6.2 2.8 5-.8 10.8-1.3a44 44 0 0 1 15.3 2.5c-4.5 1.3-10.7.7-13.6 4-.6 1-2.5.6-1.6 3.2 0 0-9-.2-11.3 12 9-5.7 15.9-5.5 16-5.5l2.9.6 11-7.3c.3 0 10.6-4.6 15.3.6 4.2 2 8.6 2.2 13-.4 8.4-3.7 16.3-4 24 1.2l7.1 4.2 3-2s8-2.2 13.8 4.9c-2.4-12.3-11.2-12.7-11.2-12.7l-2-1.8-12.4-4.9c-1.9-4.5-6.4-8-1.9-13.4 4.7-23.1 10.2-40.4 1.2-63.8 8.4 3.6 14.7 14.8 25.2 10.9 0-9.4-34.6-27.3-61-41.6C508 264 560 232.1 540 191.5l9.4-29.4c4.5 9 13.5 15.8 21.6 18.7-6.7-12.7-10.5-51.6-6.7-78.4a627 627 0 0 1-57.1 60c10 2.4 18.9.7 28.6-.5l-8.2 17c-26.6-15.7-57.8-4-58 16.8.9 24.2 30.8 27.7 48.1 19.2-3.4 22.1-54.2 14-54.2 14-18-6.2-35.1-5.2-54-5 3.9-12.1 25.7-22.9 42.4-18.1-23.3-26.2 3.3-58.7 35.4-68.6-35-11.6-4.9-38.3 21.3-57.4 0 0-75.3 31.7-82.2 31.6-21.4-1.6-15.6-27-7.4-40.6zm-236.4 30.4c1.8 0 3.8.2 5.5.6 3.4.9 7.5 1.3 7.5 2.4-1.6 2.6-5.5 5.7-9.3 5.6-3.8-.2-6-2.5-7.2-8.2.4-.2 1.8-.4 3.5-.4zm317 89.4c5 0 10.9 2 16.6 8.2-2.7 8-26.8 12-28.4.2-.5-3.6 4.6-8.3 11.8-8.4z"></path><path fill="none" stroke-linejoin="round" d="m207.4 171.2 3.7 5.3m-.2.1s0 7.2 1.5 7.3m-3.3 3.9 3.8 6.3m-10.5 1.6c.2 0 4.7 5.2 4.7 5.2m3.9-4c0 .2 4.2 8.1 4.5 8.1m-10-2.6s1.4 9.6 2.7 9.3m-9 8.3 4.2 6.5m3.7-13.3s2.3 9.1 4.1 8.3m1.9-13.8c.1.2 4.3 6.1 5.4 5.3m-1 2.3 4 8m-10.6-1.8 3.3 9.4m-11-4.6s3 10.1 5.7 8.5m-6.8 5s.2 5.3 2.8 5.6m1.8-8.3c0 .2 2.7 3.8 2.7 3.8m5-10.1 2.1 3.5m4.9-10 3.3 4.1M206 176.7c.1 4.5 7.2-1.6 10-5.4m-13 21s7.7-5.5 13.7-13.8m-16.3 26.9c5.5-1.5 15.6-13.7 17.6-20.2m-18.7 32.3c1.5.7 20.3-13 20.8-22.9M198.8 228c0-.1 17.2-4.4 24.3-23.3M198 242.3s27.5-16.5 29-28.6M412.4 270s-1.8 14.2-16 16.4m20.5 9c.1-.2 13.6-15 10.1-19.5m21.1 5.2s-.2 10.3-8.6 17.4m25.4-14.4s.3 12.4-5 17.4m20.4-10s-6 11.7-8.1 12.9m7.9 7.8s7.8 2 10.3-3.2m-8.3 20.1s7.2 1.3 10.6-5.6m-11.4 18.7s5.9 5 9.9-1.6m-94-94.4s-.7 25.3 34.8 30.4c39.7 11 58.5 5.2 60.8 49.7-1.5 17-3.6 36-16 28.7m-117.4-85.5s5.7 10.1 12.5 9.4c9-2.6 12.3 2.9 12.3 2.9m-49-2.2s15 7.3 27.7-4.5m-26-6c1.3 17.5-20.1 27.5-28.6 25.8m29.6 41c.1 0 11.6-6.8 9.3-11.6m-32.1 1.5c.3-.4 19.3-2.2 22.8-9m-31.6-19s26.9.2 28.7 5.1m7-21s-26.2 44.9 22.2 44.9m-50-45.5s-5.6 16.7-13.6 22.4m-14.2-28.2s9.7 18.8 0 28.1M261 280.8c.1.3 3.1 26.7-3.5 34.2m-9.2-33.4s1 16.8-4 22.8 1.2 18.4 1.2 18.4m-60.5 8s3.6 6.3 8.5 4.1m-2.5-17.8s8 3.5 10.7 2.2m-2-30.4s-11.8 3.3-7.3 17.3c6.8 5.5 13.4 4.6 13.4 4.6m-29.4 37.4c-.1 0 1.4 11 9 2.7 5.3-11.2 22-42.6 25.9-53.4m7.8-5.1s-8.1-6.3-7.8 2.5c-.2 5.5 2.5 6.8 2.5 6.8.3 4 3.8 9.6 6.6 4.5 1.2-5-.8-7.2-.8-7.2m4.7-9c-7.3-.4-11.3 15.7 2.8 5.6m4.8-11s-1.8 2.5-4.7-.2c-1.5-2.6-6.8 12 2.5 12.5 1.7-4.3 6.8-5.5 6.8-5.5m4.4-13.8s-4.2 2-5.7 1.7c-5 1.1-4 12.8 2.3 12.1 2.2-2.5 4.5-6 4.5-6m-40.3-23c-.2 0-16.5 25.7 9.1 32.5m198-71s-10 8.4-.7 22c-31-.5-47.5 13.8-48.8 23.4-39.4-2.8-32.2 8.8-45 12.6-17.1-14.3-42.2-6.3-40.6 8-11.4-16.1-29-8.3-31.2-4.3-2.1 4-1.3-19.8-1.3-19.8s-11.5 5.2-19.4 14.6v-19.9c-9.6 2-18.9 2-28.8 1.8m-25.9-7.3s14.3 8 32-2.8M166 226.3s11 10 32 6.8m-25-29.7s2.4 8.1 26.3 8.6M181 184.6s9 11 21.2 9.3m-13.5-25s3.5 6 16.8 7m-9-24.5s7 7.6 15 6.3M238 89.3s3.1-3 8.3-1.5m-10.5 17.8s-9.6-.3-9-4c.8-4.4 10.2-7.5 10.2-7.5s12.5-8 14.4-10.8m-56.6 44 12.2 23.3 5.8-8.8 3 6 5-8.7 8.6 5.5-3.2-10.7 7.2-.5s-2-5.1-8.4-6.2c1.7-1.3 7.7-5.3 7.7-5.3s-3.4-4-8.8-4.1c1.8-1.9 4.2-6.5 4-6.5l-5.3-1.2s12.2 4 21.6-1.6M221 89.7c.1.1-.7 4.8-3.3 7.5m-43.7 5.3s7.5-2 13.1-.9c5.6 1.2 13.1 3.2 13.1 3.2s9-1.2 11.9-3.3m-56.8 6s-1 3.6-1.4 6c0 1.7-5.5 4-5.5 4m10.3-17.4s4.8 6 5 9.5c.1 3.4-3.6 6-3.6 6M109 141l-5-8 4.5-1.6m90.5 121c-4-5.2 3-84.2 17.7-104.8-5.1 37.2 12 75.2 16.3 75m-79-97s6.8 2.5 20.7-8.6m18.9 26.8 10 .1m300.3-62s-166.7 77.8-169.1 82c28.1-8.6 147.5-28.5 150.4-26.8-7 1.7-151.9 35-158.7 43 36.2-1.2 111.9 11.6 123.8 24C424.5 198.3 347.6 187 324 192c17.2 4.1 83.2 46.8 83.2 53.6-10-9.5-89.3-42.2-92.4-39 18.2 10.9 43.9 51.4 43.9 61.3-5.3-8.4-51.2-57.7-53.9-54.5 4.9 6.7 14.5 64.9 9.6 67.6 0-7-17.8-58-19.3-59.4-3.6 1-26.3 62-21.8 67.8-3-20.4.5-63 6-61.3-10 1.5-41.7 43.4-38.3 50 1-10.5 2.4-17.4 20.4-52.1-20 1.2-61.2 27.1-68.2 36.4 5.6-16.5 40.5-44.4 55.8-46.4m72-60.7c17.6-9.8 72-29.7 108.4-44.4m-142.6 97s12-.2 24-32.8c11.8-44.6 105.7-94.3 107.6-103.6M128 252.8s-2.8 6-6.2 7.6m19.7 1.4s-3.7 7.2-4.6 10.6m17.5-7s3 9.8.5 14.4m-36.4-40.1c-9.4 5.3 5.4 39 50.1 42.2m-7.2-18.2s-1.2 6 7.2 18c-2.4 13.4 10.2 23.9 15.2 25.6m-26-164.2 1.4-3.6 1.5 4 2.5-.1 1.6-4 1.4 4h2.4l1.5-4.4 2.3 4.2h2l1.5-5 3 3.6 1.2-.4 1-5.2 3.1 3.6 1-.5 1.4-5 2.5 3.7 1.3-.4 1.2-4.3 2.4 4m-39 6.2 18.8-.3c6 0 15.8-8.3 26.7-5.7m-84.9 46s3.1 6.8 7.4 3m-14.6 1.5s-6 16.2 1.2 20m-9.8-37.8s0 3.8 8-2m-32.5 86.7s6.3 2 5.3 6.7m-3-80.8s4 1.9 7.8-4m34.2 189.7c6.1-.4 7.5 2.4 13 2.4 6.6.2 12.9-2.4 21-4.7m53.1 15c-.2 0-3 5.8-.5 8.7m-87.5-8.2s9.8-8 15-3.1c4.9 1.7 7.6 1.4 7.6 1.4m-17.5-21.3s2.4 6.2-5.6 5.3m-2.4 9s5.1 3.2-.7 7.5m3.8 5.8s7 1 2.9 6.7M346 341.6s19 2 20 3.4c2.2-2.3 19.2-16.2-1.7-18.1a19 19 0 0 1-18.3 14.7zm-6.8 9.5c7.1 5.7 4.2 9.1 26.6-5.9m-36.8 13s10.5 11.4 18.2-2.4m-38.3 6.5-14.3 7.5M269 380.3s8.7-7.4 12.7-3.5c4.1 4 21.3-3.4 21.3-3.4M275.5 348s3 6-2.8 6.7m-8.5 11.9s3 5.6-2.8 7m9.5 8.1s9 .5 5.8 7.3m78.4-8.5s-5 4.2-1.3 9m73-39s5.7 2.8-1.1 7.5m-5.7 9.9s4.3 4.5 1.4 8.2m10.6 9s5.9 1.7 5.2 6.6m77.8-11s-5 3.7-2.3 8.4M427 236.3c11.8-1.4 28.8 25 37.5 30.1m51.9-67.4s6 5.3.7 18m10.4-38.2c1.7 1.3 8.1 4.8 12.4 12.8m4.1-52.2-8.3 22.5m17.6-23.6s-1.6 20-4 24M516 198.8c-2.7 8-26.8 12-28.4.2-.9-6 14.2-15.3 28.4-.2z"></path><path stroke-linejoin="round" d="m182.3 101.3 9.3 1.7s-6.5 8.8-9.3-1.7z"></path></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#c8102e" d="M0 0h640.1v480H0z"></path><path fill="#fff" d="M205.7 0h68.6v480h-68.6z"></path><path fill="#fff" d="M0 205.7h640.1v68.6H0z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#fc0" d="M0 320h640v160H0z"></path><path fill="#000001" d="M0 0h640v160H0z"></path><path fill="red" d="M0 160h640v160H0z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#fff" d="M0 0h640v480H0z"></path><path fill="#009739" d="M320 0h320v480H320z"></path><path fill="#d21034" d="M405.3 240a114.7 114.7 0 1 1-229.4 0 114.7 114.7 0 0 1 229.4 0z"></path><path fill="#fff" d="M320 180.2a59.8 59.8 0 0 0-59.8 59.8h119.6a59.8 59.8 0 0 0-59.8-59.8z"></path><path fill="#d21034" d="M367.6 240 320 215.2l-47.6 24.8v19.6l47.6 24.8 47.6-24.8z"></path><path fill="#d21034" d="m320 135.2 12.2 37.6h39.6l-32 23.2 12.2 37.6-32-23.2-32 23.2 12.2-37.6-32-23.2h39.6z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#1791ff" d="M0 0h640v160H0z"></path><path fill="#000001" d="M0 160h640v160H0z"></path><path fill="#fff" d="M0 320h640v160H0z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#0d5eaf" fill-rule="evenodd" d="M0 0h640v53.3H0z"></path><path fill="#fff" fill-rule="evenodd" d="M0 53.3h640v53.4H0z"></path><path fill="#0d5eaf" fill-rule="evenodd" d="M0 106.7h640V160H0z"></path><path fill="#fff" fill-rule="evenodd" d="M0 160h640v53.3H0z"></path><path fill="#0d5eaf" d="M0 0h266.7v266.7H0z"></path><path fill="#0d5eaf" fill-rule="evenodd" d="M0 213.3h640v53.4H0z"></path><path fill="#fff" fill-rule="evenodd" d="M0 266.7h640V320H0z"></path><path fill="#0d5eaf" fill-rule="evenodd" d="M0 320h640v53.3H0z"></path><path fill="#fff" fill-rule="evenodd" d="M0 373.3h640v53.4H0z"></path><g fill="#fff" fill-rule="evenodd" stroke-width="1.3"><path d="M106.7 0H160v266.7h-53.3z"></path><path d="M0 106.7h266.7V160H0z"></path></g><path fill="#0d5eaf" d="M0 426.7h640V480H0z"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><path fill="#012169" d="M0 0h640v480H0z"></path><path fill="#FFF" d="m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0z"></path><path fill="#C8102E" d="m424 281 216 159v40L369 281zm-184 20 6 35L54 480H0zM640 0v3L391 191l2-44L590 0zM0 0l239 176h-60L0 42z"></path><path fill="#FFF" d="M241 0v480h160V0zM0 160v160h640V160z"></path><path fill="#C8102E" d="M0 193v96h640v-96zM273 0v480h96V0z"></path></svg>
|