@donotdev/core 0.0.21 → 0.0.23
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 +35 -12
- package/functions/index.js +17 -8
- package/i18n/locales/eager/dndev_da.json +379 -0
- package/i18n/locales/eager/dndev_nl.json +382 -0
- package/i18n/locales/lazy/auth_da.json +145 -0
- package/i18n/locales/lazy/auth_nl.json +145 -0
- package/i18n/locales/lazy/billing_da.json +82 -0
- package/i18n/locales/lazy/billing_nl.json +82 -0
- package/i18n/locales/lazy/blog_ar.json +9 -0
- package/i18n/locales/lazy/blog_da.json +9 -0
- package/i18n/locales/lazy/blog_de.json +9 -0
- package/i18n/locales/lazy/blog_en.json +9 -0
- package/i18n/locales/lazy/blog_es.json +9 -0
- package/i18n/locales/lazy/blog_fr.json +9 -0
- package/i18n/locales/lazy/blog_it.json +9 -0
- package/i18n/locales/lazy/blog_ja.json +9 -0
- package/i18n/locales/lazy/blog_ko.json +9 -0
- package/i18n/locales/lazy/blog_nl.json +9 -0
- package/i18n/locales/lazy/cookies_da.json +32 -0
- package/i18n/locales/lazy/cookies_nl.json +32 -0
- package/i18n/locales/lazy/crud_ar.json +13 -1
- package/i18n/locales/lazy/crud_da.json +522 -0
- package/i18n/locales/lazy/crud_de.json +14 -2
- package/i18n/locales/lazy/crud_en.json +13 -1
- package/i18n/locales/lazy/crud_es.json +13 -1
- package/i18n/locales/lazy/crud_fr.json +15 -3
- package/i18n/locales/lazy/crud_it.json +15 -3
- package/i18n/locales/lazy/crud_ja.json +13 -1
- package/i18n/locales/lazy/crud_ko.json +13 -1
- package/i18n/locales/lazy/crud_nl.json +522 -0
- package/i18n/locales/lazy/entityFormTemplate_da.json +85 -0
- package/i18n/locales/lazy/entityFormTemplate_nl.json +85 -0
- package/i18n/locales/lazy/homeTemplate_da.json +52 -0
- package/i18n/locales/lazy/homeTemplate_nl.json +52 -0
- package/i18n/locales/lazy/loginTemplate_da.json +21 -0
- package/i18n/locales/lazy/loginTemplate_nl.json +21 -0
- package/i18n/locales/lazy/oauth_da.json +9 -0
- package/i18n/locales/lazy/oauth_nl.json +9 -0
- package/i18n/locales/lazy/privacy_da.json +178 -0
- package/i18n/locales/lazy/privacy_nl.json +178 -0
- package/i18n/locales/lazy/profileDBTemplate_da.json +73 -0
- package/i18n/locales/lazy/profileDBTemplate_nl.json +73 -0
- package/i18n/locales/lazy/profileTemplate_da.json +85 -0
- package/i18n/locales/lazy/profileTemplate_nl.json +85 -0
- package/i18n/locales/lazy/terms_da.json +200 -0
- package/i18n/locales/lazy/terms_nl.json +200 -0
- package/index.d.ts +26 -3
- package/index.js +12 -12
- package/next/index.d.ts +16 -14
- package/next/index.js +33 -13
- package/package.json +1 -1
- package/server.d.ts +11 -0
- package/vite/index.d.ts +18 -16
- package/vite/index.js +50 -30
package/functions/index.d.ts
CHANGED
|
@@ -72,6 +72,8 @@ interface FunctionMeta {
|
|
|
72
72
|
minInstances?: number;
|
|
73
73
|
/** Maximum instances */
|
|
74
74
|
maxInstances?: number;
|
|
75
|
+
/** Secret environment variable names (synced via sync-secrets, read via defineSecret) */
|
|
76
|
+
secrets?: string[];
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
/**
|
|
@@ -358,28 +360,49 @@ declare function createAppFunctionsConfig(
|
|
|
358
360
|
options?: EsbuildOptions
|
|
359
361
|
): BuildOptions;
|
|
360
362
|
|
|
363
|
+
/** Auto-detection options for YAML generation */
|
|
364
|
+
interface AutoDetectOptions {
|
|
365
|
+
/** Path to entry file for export detection (e.g., 'src/index.ts') */
|
|
366
|
+
entryFile?: string;
|
|
367
|
+
/** Path to .env file for secret detection (default: '.env') */
|
|
368
|
+
envPath?: string;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Auto-detect exported function names from entry file
|
|
373
|
+
*/
|
|
374
|
+
declare function detectExportedFunctions(entryFile: string): string[];
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Auto-detect secret keys from .env file (non-config keys)
|
|
378
|
+
*/
|
|
379
|
+
declare function detectSecretsFromEnv(envPath?: string): string[];
|
|
380
|
+
|
|
361
381
|
/**
|
|
362
382
|
* Generate functions.yaml content from config
|
|
363
|
-
*
|
|
364
|
-
* @version 0.0.1
|
|
365
|
-
* @since 0.0.1
|
|
366
|
-
* @author AMBROISE PARK Consulting
|
|
367
383
|
*/
|
|
368
|
-
declare function generateFunctionsYaml(config: FunctionsConfig): string;
|
|
384
|
+
declare function generateFunctionsYaml(config: FunctionsConfig, options?: AutoDetectOptions): string;
|
|
369
385
|
|
|
370
386
|
/**
|
|
371
387
|
* Generate yaml and return metadata
|
|
372
|
-
*
|
|
373
|
-
* @version 0.0.1
|
|
374
|
-
* @since 0.0.1
|
|
375
|
-
* @author AMBROISE PARK Consulting
|
|
376
388
|
*/
|
|
377
|
-
declare function generateFunctionsYamlWithInfo(config: FunctionsConfig): {
|
|
389
|
+
declare function generateFunctionsYamlWithInfo(config: FunctionsConfig, options?: AutoDetectOptions): {
|
|
378
390
|
yaml: string;
|
|
379
391
|
functions: string[];
|
|
380
392
|
staticFunctions: string[];
|
|
381
393
|
crudFunctions: string[];
|
|
394
|
+
autoDetected: string[];
|
|
395
|
+
autoSecrets: string[];
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Filter .env secrets for Firebase deployment
|
|
400
|
+
* Strips secret keys from .env and moves them to .env.local (emulator-only)
|
|
401
|
+
*/
|
|
402
|
+
declare function filterEnvSecrets(config: FunctionsConfig): {
|
|
403
|
+
stripped: string[];
|
|
404
|
+
kept: number;
|
|
382
405
|
};
|
|
383
406
|
|
|
384
|
-
export { createAppFunctionsConfig, createFunctionsEsbuildConfig, createRootFunctionsConfig, generateFunctionsYaml, generateFunctionsYamlWithInfo };
|
|
385
|
-
export type { EsbuildOptions };
|
|
407
|
+
export { createAppFunctionsConfig, createFunctionsEsbuildConfig, createRootFunctionsConfig, detectExportedFunctions, detectSecretsFromEnv, filterEnvSecrets, generateFunctionsYaml, generateFunctionsYamlWithInfo };
|
|
408
|
+
export type { AutoDetectOptions, EsbuildOptions };
|
package/functions/index.js
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import F from"node:fs";import y from"node:path";import{fileURLToPath as Z}from"node:url";var K=Z(import.meta.url),le=y.dirname(K);function D(){let i=process.cwd(),e=10;for(let t=0;t<e;t++){let r=y.join(i,"package.json");if(F.existsSync(r))try{let s=JSON.parse(F.readFileSync(r,"utf8")),o=s.workspaces&&Array.isArray(s.workspaces);if(o&&s.workspaces.some(c=>c==="packages/**"||c.startsWith("packages/"))&&(F.existsSync(y.join(i,"packages","core"))||F.existsSync(y.join(i,"packages","functions"))))return{type:"dndev",root:i};if(o&&s.workspaces.some(c=>c.includes("dndev/packages"))){let f=s.workspaces.find(d=>d.includes("dndev/packages")).replace(/\/packages.*$/,""),m=y.resolve(i,f);if(F.existsSync(y.join(m,"packages","core")))return{type:"dndev",root:m}}}catch{}let n=y.dirname(i);if(n===i)break;i=n}return{type:"npm",root:process.cwd()}}function X(i){return i.type==="dndev"?i.root:null}function I(i){let e={};if(i.type==="dndev"){let t=X(i);t&&(e["@donotdev/types"]=y.join(t,"packages","core","types","src"),e["@donotdev/functions"]=y.join(t,"packages","functions","src"),e["@donotdev/utils"]=y.join(t,"packages","core","utils","src"),e["@donotdev/schemas"]=y.join(t,"packages","core","schemas","src"),e["@donotdev/core"]=y.join(t,"packages","core"))}return e}import*as p from"node:fs";import"node:fs";import{createRequire as ee}from"node:module";import{resolve as z,join as P,dirname as x,relative as L,normalize as te,sep as U,extname as re}from"node:path";import{fileURLToPath as oe}from"node:url";import se from"fast-glob";var _={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"},w={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:[`${_.SOURCE_EAGER}/*_*.json`],lazy:[`${_.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","manifest.json"],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 T={base:{absolute:!0,onlyFiles:!0,ignore:w.globalIgnore},css:{absolute:!0,onlyFiles:!0,ignore:[...w.globalIgnore,"**/*.test.css"]},routes:{absolute:!0,onlyFiles:!0,ignore:[...w.globalIgnore,"**/*.test.tsx","**/*.stories.tsx"]},i18n:{absolute:!0,onlyFiles:!0,ignore:w.globalIgnore},assets:{absolute:!0,onlyFiles:!0,ignore:w.globalIgnore}};function C(i,e=null){let t=w[i];if(!t)throw new Error(`Unknown pattern type: ${i}`);return e&&t.framework?{...t,framework:t.framework.map(r=>`${e}/${r}`)}:t}function N(i){return T[i]||T.base}var R={getGlobOptionsFor:N||void 0,SCAN_PATTERNS:w||void 0,getPatternsFor:C||void 0,I18N_PATHS:_||void 0},g={error:(i,e)=>{},warn:(i,e)=>{},info:i=>{}};function W(i,e){return i().catch(t=>{throw new Error(`${e}: ${t instanceof Error?t.message:String(t)}`)})}var B={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"},O=class i{static _instance=null;options;_repoRoot;_appRoot=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 te(e).split(U).join("/")}catch{return String(e).split(U).join("/")}}getRelativePath(e){let t=this.getAppRoot(),r=L(t,e);return this.normalizePath(r)}getBasename(e){if(!e)return"";let r=this.normalizePath(e).split("/");return r[r.length-1]||""}getDirname(e){return e?this.normalizePath(x(e)):""}resolvePackage(e,t=null){try{let r=t||this.getAppRoot(),s=ee(P(r,"package.json")).resolve(e);return this.normalizePath(s)}catch{return null}}resolveFrameworkPackage(e,t=null){let r=this.resolvePackage(`${e}/package.json`,t);if(r)return this.getDirname(r);if(this.isMonorepo()&&e.startsWith("@donotdev/")){let o=e.replace("@donotdev/",""),a=this.resolveRepoPath(`packages/${o}`);if(this.pathExists(a))return a;if(["auth","billing","crud","oauth"].includes(o)){let l=this.resolveRepoPath(`packages/features/${o}`);if(this.pathExists(l))return l}if(o==="firebase"){let l=this.resolveRepoPath(`packages/providers/${o}`);if(this.pathExists(l))return l}}let n=this.resolveAppPath(`node_modules/${e}`);if(this.pathExists(n))return n;let s=this.resolveRepoPath(`node_modules/${e}`);return this.pathExists(s)?s:null}resolvePackageAsset(e,t=null){return this.resolvePackage(e,t)}resolveAppPath(e){let t=this.getAppRoot(),r=z(t,e);return this.normalizePath(r)}resolveRepoPath(e){let t=this.getRepoRoot(),r=this.normalizePath(e),n=z(t,r);return this.normalizePath(n)}resolvePath(e,t){let r=this.normalizePath(t),n=this.normalizePath(e),s=z(r,n);return this.normalizePath(s)}createImportPath(e){return"./"+this.getRelativePath(e)}getFileInfo(e){try{let t=p.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:re(e).toLowerCase()===".json"?"json":"text"}async read(e,t={}){let{format:r="auto",encoding:n="utf8"}=t,s=this._detectFormat(e,r);try{if(s==="buffer")return await p.promises.readFile(e);let o=await p.promises.readFile(e,n),a=this.stripBom(o);return s==="json"?JSON.parse(a):a}catch(o){return this.options.debug&&g.warn(`Failed to read file: ${e}`,o),null}}readSync(e,t={}){let{format:r="auto",encoding:n="utf8"}=t,s=this._detectFormat(e,r);try{if(s==="buffer")return p.readFileSync(e);let o=p.readFileSync(e,n),a=this.stripBom(o);return s==="json"?JSON.parse(a):a}catch(o){return this.options.debug&&g.warn(`Failed to read file: ${e}`,o),null}}async write(e,t,r={}){let{format:n="auto",overwrite:s=!1,dryRun:o=!1,verbose:a=!1}=r,l=this.normalizePath(e),h=this.normalizePath(x(l)),c=this.pathExists(l);if(c&&!s)return a&&g.info(`Skipping existing file: ${l}`),!1;if(o)return g.info(`[DRY RUN] Would write file: ${l}`),!0;try{await p.promises.mkdir(h,{recursive:!0})}catch(d){if(d?.code!=="EEXIST")throw d}let f=this._detectFormat(e,n),m;Buffer.isBuffer(t)?m=t:f==="json"&&typeof t=="object"?m=JSON.stringify(t,null,2):m=String(t);try{return await W(async()=>(Buffer.isBuffer(m)?await p.promises.writeFile(l,m):await p.promises.writeFile(l,m,"utf8"),a&&g.info(`${c?"Updated":"Created"} file: ${l}`),!0),`Failed to write file: ${l}`)}catch{return!1}}writeSync(e,t,r={}){let{format:n="auto",overwrite:s=!1,dryRun:o=!1,verbose:a=!1}=r,l=this.normalizePath(e),h=this.normalizePath(x(l)),c=this.pathExists(l);if(c&&!s)return a&&g.info(`Skipping existing file: ${l}`),!1;if(o)return g.info(`[DRY RUN] Would write file: ${l}`),!0;try{p.mkdirSync(h,{recursive:!0})}catch(d){if(d?.code!=="EEXIST")throw d}let f=this._detectFormat(e,n),m;Buffer.isBuffer(t)?m=t:f==="json"&&typeof t=="object"?m=JSON.stringify(t,null,2):m=String(t);try{return Buffer.isBuffer(m)?p.writeFileSync(l,m):p.writeFileSync(l,m,"utf8"),a&&g.info(`${c?"Updated":"Created"} file: ${l}`),!0}catch(d){throw new Error(`Failed to write file: ${l}: ${d instanceof Error?d.message:String(d)}`)}}async copy(e,t,r={}){let{overwrite:n=!1,dryRun:s=!1,verbose:o=!1}=r,a=this.normalizePath(t),l=this.pathExists(a);if(l&&!n)return o&&g.info(`Skipping existing file: ${a}`),!1;if(s)return g.info(`[DRY RUN] Would copy file: ${a}`),!0;let h=this.normalizePath(x(a));try{await p.promises.mkdir(h,{recursive:!0})}catch(c){if(c?.code!=="EEXIST")throw c}try{return await W(async()=>(await p.promises.copyFile(e,a),o&&g.info(`${l?"Updated":"Created"} file: ${a}`),!0),`Failed to copy file from ${e} to ${a}`)}catch{return!1}}copySync(e,t,r={}){let{overwrite:n=!1,dryRun:s=!1,verbose:o=!1}=r,a=this.normalizePath(t),l=this.pathExists(a);if(l&&!n)return o&&g.info(`Skipping existing file: ${a}`),!1;if(s)return g.info(`[DRY RUN] Would copy file: ${a}`),!0;let h=this.normalizePath(x(a));try{p.mkdirSync(h,{recursive:!0})}catch(c){if(c?.code!=="EEXIST")throw c}try{return p.copyFileSync(e,a),o&&g.info(`${l?"Updated":"Created"} file: ${a}`),!0}catch{return!1}}pathExists(e,t=!1){try{return p.existsSync(e)}catch(r){return t||g.error(`Error checking path existence: ${e}`,r),!1}}mkdir(e){try{let t=e.startsWith("/")||e.match(/^[A-Z]:/)?this.normalizePath(e):this.resolveAppPath(e);return p.existsSync(t)||p.mkdirSync(t,{recursive:!0}),!0}catch{return!1}}readdirSync(e,t){try{return p.readdirSync(e,t)}catch(r){return this.options.debug&&g.warn(`Failed to read directory: ${e}`,r),t&&typeof t=="object"&&"withFileTypes"in t&&t.withFileTypes?[]:[]}}statSync(e){try{return p.statSync(e)}catch(t){return this.options.debug&&g.warn(`Failed to stat file: ${e}`,t),null}}lstatSync(e){try{return p.lstatSync(e)}catch(t){return this.options.debug&&g.warn(`Failed to lstat file: ${e}`,t),null}}async ensureDir(e){try{await p.promises.mkdir(e,{recursive:!0})}catch(t){if(t?.code!=="EEXIST")throw t}}ensureDirSync(e){try{p.mkdirSync(e,{recursive:!0})}catch(t){if(t?.code!=="EEXIST")throw t}}async remove(e){await p.promises.rm(e,{recursive:!0,force:!0})}removeSync(e){p.rmSync(e,{recursive:!0,force:!0})}async readdir(e,t){return p.promises.readdir(e,t)}stripBom(e){return e.charCodeAt(0)===65279?e.slice(1):e}getRepoRoot(){return this._repoRoot||process.cwd()}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=P(this._repoRoot,"packages");return this.pathExists(e)}isWithinApp(e){let t=this.normalizePath(z(e)),r=this.getAppRoot(),n=L(r,t),s=this.normalizePath(n);return!s.startsWith("../")&&!s.startsWith("/")}async findFiles(e,t,r={}){let n=this.normalizePath(P(e,t)),s=this.getAppRoot(),o=this.normalizePath(s),a=n.startsWith(o)?n.slice(o.length+1):n,l={absolute:!0,onlyFiles:!0,braceExpansion:!0,extglob:!0,globstar:!0,cwd:s,ignore:R.SCAN_PATTERNS?.globalIgnore||["**/node_modules/**","**/dist/**","**/build/**","**/.git/**"]};return await this._globWithNormalization([a],{...l,...r})}clearCache(){}async _resolveFrameworkI18nPattern(e){let t=R.I18N_PATHS;if(!t)return null;let r=e.replace(t.SOURCE_ROOT+"/",""),n=this.resolveFrameworkPackage("@donotdev/core");if(!n)return null;let s=this.normalizePath(P(n,t.PUBLISHED_ROOT,r)),o=s.replace(/\/[^/]*\*.*$/,"");return this.pathExists(o),s}async _globWithNormalization(e,t){return(await se(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 r=[...e.framework,...e.consumer];for(let c of r)if(typeof c!="string"||c.trim()==="")return{frameworkFiles:[],consumerFiles:[]};let n=this.getAppRoot(),s=R.getGlobOptionsFor?R.getGlobOptionsFor(t):{ignore:["**/node_modules/**","**/dist/**","**/build/**"]},o=this.normalizePath(n),a=e.framework.map(c=>{let f=this.normalizePath(c);return f.startsWith(o)?f.slice(o.length+1):f}),l=e.consumer.map(c=>{let f=this.normalizePath(c);return f.startsWith(o)?f.slice(o.length+1):f}),h={...s,onlyFiles:!0,absolute:!0,braceExpansion:!0,extglob:!0,globstar:!0,cwd:n};try{let c=a.length>0?await this._globWithNormalization(a,h):[],f=await this._globWithNormalization(l,h);return{frameworkFiles:c,consumerFiles:f}}catch{return this.options.debug,{frameworkFiles:[],consumerFiles:[]}}}async resolvePatterns(e){if(!R.getPatternsFor)return{framework:[],consumer:[],all:[]};let t=this.getAppRoot(),r=this.getRepoRoot();if(e==="i18n"&&(!t||t===r))throw new Error(`Cannot resolve i18n patterns: appRoot not set (appRoot: ${t}, repoRoot: ${r}). Ensure configResolved hook has run before discovery.`);let n=R.getPatternsFor(e),s=this.isMonorepo();if(e==="i18n"){let l=n,h={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 h.all=[...h.eager,...h.lazy,...h.framework.eager,...h.framework.lazy],h}let o=n,a={framework:s?(o.framework||[]).map(l=>this.resolveRepoPath(l)).filter(Boolean):[],consumer:(o.consumer||[]).map(l=>this.resolveAppPath(l)),all:[]};return a.all=[...a.consumer,...a.framework],a}getEmptyModulePath(e=!1){if(e)return"@donotdev/core/empty";let t=this.resolvePackage("@donotdev/core/empty");if(t)return t;let r=x(oe(import.meta.url));return this.normalizePath(P(r,"../empty.js"))}_findRepoRoot(e){let t=this.normalizePath(e),r=0,n=this.options.maxLevels;for(;r<n;){let s=this.normalizePath(P(t,B.TOOLING)),o=this.normalizePath(P(t,B.CORE));if(this.pathExists(s)&&this.pathExists(o))return t;let a=P(t,"apps");if(this.pathExists(a)&&this.statSync(a)?.isDirectory())return this.normalizePath(t);let l=this.normalizePath(P(t,"package.json"));if(this.pathExists(l)&&this.normalizePath(x(t))===t)return t;let h=this.normalizePath(x(t));if(h===t)break;t=h,r++}return this.normalizePath(e)}};function M(i={}){let{entry:e="src/index.ts",outDir:t="lib",minify:r=!1,sourcemap:n=!0,platform:s="firebase",workspace:o,bundleWorkspaceDeps:a=!1,importFramework:l=!1,external:h=!1,...c}=i,f=O.getInstance(),m=I(o),d={entryPoints:[e],bundle:!0,platform:"node",target:"node20",format:"esm",outdir:t,outExtension:{".js":".js"},minify:r,sourcemap:n,metafile:!0,logLevel:"info",loader:{".ts":"ts",".tsx":"tsx",".css":"empty"},keepNames:!0,treeShaking:!0,...c};a&&Object.keys(m).length>0&&(d.alias=Object.fromEntries(Object.entries(m).map(([k,u])=>[k,f.normalizePath(u)]))),d.mainFields=["module","main"],d.conditions=["import","module","node"];let V=["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 k=o?.root||process.cwd(),u=process.cwd(),v=10;for(let b=0;b<v;b++){let j=f.normalizePath(`${u}/package.json`);if(f.pathExists(j)){let E=f.readSync(j,{format:"json"});if(E&&Array.isArray(E.workspaces)){k=f.normalizePath(u);for(let S of E.workspaces)S==="apps/*"||S==="functions"||!S.includes("*")&&!S.includes("/")&&$.push(S);break}}let A=f.getDirname(u);if(A===u)break;u=A}}catch{}let q={name:"external-node-modules",setup(k){k.onResolve({filter:/^firebase($|\/)/},u=>{if(u.path==="firebase-admin"||u.path.startsWith("firebase-admin/")||u.path==="firebase-functions"||u.path.startsWith("firebase-functions/"))return null;let v;if(o?.type==="dndev"&&o.root)v=f.normalizePath(`${o.root}/packages/core/config/functions/firebase-stub.js`);else{let b=import.meta.url,A=new URL(b).pathname.replace(/^\/([A-Z]:)/i,"$1"),E=f.getDirname(A);v=f.normalizePath(`${E}/firebase-stub.js`)}return{path:v}}),k.onResolve({filter:/.*/},u=>{if(u.kind==="entry-point")return null;if(u.path.match(/@donotdev\/functions\/.+/)&&a&&o?.type==="dndev"){let v=u.path.replace("@donotdev/functions/","");return{path:f.normalizePath(`${o.root}/packages/functions/src/${v}/index.ts`)}}if(u.path==="@donotdev/utils")return o?.type==="dndev"?{path:f.normalizePath(`${o.root}/packages/core/utils/src/server/index.ts`)}:k.resolve("@donotdev/utils/server",{kind:u.kind,resolveDir:u.resolveDir});if(u.path.match(/@donotdev\/utils\/.+/)&&o?.type==="dndev"){let v=u.path.replace("@donotdev/utils/","");return{path:f.normalizePath(`${o.root}/packages/core/utils/src/${v}/index.ts`)}}if(u.path==="@donotdev/core")return o?.type==="dndev"?{path:f.normalizePath(`${o.root}/packages/core/server.ts`)}:k.resolve("@donotdev/core/server",{kind:u.kind,resolveDir:u.resolveDir});if(u.path.match(/@donotdev\/core\/.+/)&&a&&o?.type==="dndev"){let v=u.path.replace("@donotdev/core/","");return{path:f.normalizePath(`${o.root}/packages/core/${v}.ts`)}}if(u.path==="firebase-admin"||u.path.startsWith("firebase-admin/")||u.path==="firebase-functions"||u.path.startsWith("firebase-functions/"))return{path:u.path,external:!0};if(u.path.match(/@donotdev\/core\/.+/)&&a&&o?.type==="dndev"){let v=u.path.replace("@donotdev/core/","");return{path:f.normalizePath(`${o.root}/packages/core/${v}.ts`)}}if(u.path.startsWith("@donotdev/")||u.path==="valibot"||u.path.startsWith("valibot/"))return null;if($.length>0){let v=u.path.split("/")[0];if($.includes(v))return null}return u.path.startsWith(".")||u.path.startsWith("/")?null:{path:u.path,external:!0}})}};if(d.external=[...V,"firebase-admin","firebase-functions"],d.plugins=[q,...d.plugins||[]],d.define={"process.env.NODE_ENV":JSON.stringify(process.env.NODE_ENV||"production"),...d.define||{}},l&&o.type==="dndev"){let k=o.root,u=f.normalizePath(`${k}/functions/lib`);d.alias={...d.alias,"@donotdev/functions":u}}return s==="framework"&&(d.entryPoints={"firebase/index":"src/firebase/index.ts","vercel/api/index":"src/vercel/api/index.ts","shared/index":"src/shared/index.ts"}),d}var G=["create","get","list","listCard","update","delete"];function H(i,e=0){let t=" ".repeat(e),r="";for(let[n,s]of Object.entries(i))if(s!=null)if(typeof s=="object"&&!Array.isArray(s))Object.keys(s).length===0?r+=`${t}${n}: {}
|
|
2
|
-
`:
|
|
3
|
-
${
|
|
4
|
-
`;else{
|
|
5
|
-
`;for(let
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import F from"node:fs";import y from"node:path";import{fileURLToPath as re}from"node:url";var se=re(import.meta.url),ye=y.dirname(se);function W(){let c=process.cwd(),e=10;for(let t=0;t<e;t++){let o=y.join(c,"package.json");if(F.existsSync(o))try{let s=JSON.parse(F.readFileSync(o,"utf8")),r=s.workspaces&&Array.isArray(s.workspaces);if(r&&s.workspaces.some(a=>a==="packages/**"||a.startsWith("packages/"))&&(F.existsSync(y.join(c,"packages","core"))||F.existsSync(y.join(c,"packages","functions"))))return{type:"dndev",root:c};if(r&&s.workspaces.some(a=>a.includes("dndev/packages"))){let u=s.workspaces.find(m=>m.includes("dndev/packages")).replace(/\/packages.*$/,""),f=y.resolve(c,u);if(F.existsSync(y.join(f,"packages","core")))return{type:"dndev",root:f}}}catch{}let n=y.dirname(c);if(n===c)break;c=n}return{type:"npm",root:process.cwd()}}function oe(c){return c.type==="dndev"?c.root:null}function U(c){let e={};if(c.type==="dndev"){let t=oe(c);t&&(e["@donotdev/types"]=y.join(t,"packages","core","types","src"),e["@donotdev/functions"]=y.join(t,"packages","functions","src"),e["@donotdev/utils"]=y.join(t,"packages","core","utils","src"),e["@donotdev/schemas"]=y.join(t,"packages","core","schemas","src"),e["@donotdev/core"]=y.join(t,"packages","core"))}return e}import*as h from"node:fs";import"node:fs";import{createRequire as ie}from"node:module";import{resolve as z,join as P,dirname as x,relative as H,normalize as ae,sep as Y,extname as ce}from"node:path";import{fileURLToPath as le}from"node:url";import ue from"fast-glob";var O={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"},E={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:[`${O.SOURCE_EAGER}/*_*.json`],lazy:[`${O.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","manifest.json"],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 B={base:{absolute:!0,onlyFiles:!0,ignore:E.globalIgnore},css:{absolute:!0,onlyFiles:!0,ignore:[...E.globalIgnore,"**/*.test.css"]},routes:{absolute:!0,onlyFiles:!0,ignore:[...E.globalIgnore,"**/*.test.tsx","**/*.stories.tsx"]},i18n:{absolute:!0,onlyFiles:!0,ignore:E.globalIgnore},assets:{absolute:!0,onlyFiles:!0,ignore:E.globalIgnore}};function G(c,e=null){let t=E[c];if(!t)throw new Error(`Unknown pattern type: ${c}`);return e&&t.framework?{...t,framework:t.framework.map(o=>`${e}/${o}`)}:t}function M(c){return B[c]||B.base}var w={getGlobOptionsFor:M||void 0,SCAN_PATTERNS:E||void 0,getPatternsFor:G||void 0,I18N_PATHS:O||void 0},g={error:(c,e)=>{},warn:(c,e)=>{},info:c=>{}};function V(c,e){return c().catch(t=>{throw new Error(`${e}: ${t instanceof Error?t.message:String(t)}`)})}var J={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"},$=class c{static _instance=null;options;_repoRoot;_appRoot=null;static getInstance(e={}){return c._instance||(c._instance=new c(e)),c._instance}static _reset(){c._instance=null}constructor(e={}){if(c._instance)return c._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,c._instance=this}normalizePath(e){if(!e)return"";try{return ae(e).split(Y).join("/")}catch{return String(e).split(Y).join("/")}}getRelativePath(e){let t=this.getAppRoot(),o=H(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(x(e)):""}resolvePackage(e,t=null){try{let o=t||this.getAppRoot(),s=ie(P(o,"package.json")).resolve(e);return this.normalizePath(s)}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/",""),i=this.resolveRepoPath(`packages/${r}`);if(this.pathExists(i))return i;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 n=this.resolveAppPath(`node_modules/${e}`);if(this.pathExists(n))return n;let s=this.resolveRepoPath(`node_modules/${e}`);return this.pathExists(s)?s:null}resolvePackageAsset(e,t=null){return this.resolvePackage(e,t)}resolveAppPath(e){let t=this.getAppRoot(),o=z(t,e);return this.normalizePath(o)}resolveRepoPath(e){let t=this.getRepoRoot(),o=this.normalizePath(e),n=z(t,o);return this.normalizePath(n)}resolvePath(e,t){let o=this.normalizePath(t),n=this.normalizePath(e),s=z(o,n);return this.normalizePath(s)}createImportPath(e){return"./"+this.getRelativePath(e)}getFileInfo(e){try{let t=h.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:ce(e).toLowerCase()===".json"?"json":"text"}async read(e,t={}){let{format:o="auto",encoding:n="utf8"}=t,s=this._detectFormat(e,o);try{if(s==="buffer")return await h.promises.readFile(e);let r=await h.promises.readFile(e,n),i=this.stripBom(r);return s==="json"?JSON.parse(i):i}catch(r){return this.options.debug&&g.warn(`Failed to read file: ${e}`,r),null}}readSync(e,t={}){let{format:o="auto",encoding:n="utf8"}=t,s=this._detectFormat(e,o);try{if(s==="buffer")return h.readFileSync(e);let r=h.readFileSync(e,n),i=this.stripBom(r);return s==="json"?JSON.parse(i):i}catch(r){return this.options.debug&&g.warn(`Failed to read file: ${e}`,r),null}}async write(e,t,o={}){let{format:n="auto",overwrite:s=!1,dryRun:r=!1,verbose:i=!1}=o,l=this.normalizePath(e),p=this.normalizePath(x(l)),a=this.pathExists(l);if(a&&!s)return i&&g.info(`Skipping existing file: ${l}`),!1;if(r)return g.info(`[DRY RUN] Would write file: ${l}`),!0;try{await h.promises.mkdir(p,{recursive:!0})}catch(m){if(m?.code!=="EEXIST")throw m}let u=this._detectFormat(e,n),f;Buffer.isBuffer(t)?f=t:u==="json"&&typeof t=="object"?f=JSON.stringify(t,null,2):f=String(t);try{return await V(async()=>(Buffer.isBuffer(f)?await h.promises.writeFile(l,f):await h.promises.writeFile(l,f,"utf8"),i&&g.info(`${a?"Updated":"Created"} file: ${l}`),!0),`Failed to write file: ${l}`)}catch{return!1}}writeSync(e,t,o={}){let{format:n="auto",overwrite:s=!1,dryRun:r=!1,verbose:i=!1}=o,l=this.normalizePath(e),p=this.normalizePath(x(l)),a=this.pathExists(l);if(a&&!s)return i&&g.info(`Skipping existing file: ${l}`),!1;if(r)return g.info(`[DRY RUN] Would write file: ${l}`),!0;try{h.mkdirSync(p,{recursive:!0})}catch(m){if(m?.code!=="EEXIST")throw m}let u=this._detectFormat(e,n),f;Buffer.isBuffer(t)?f=t:u==="json"&&typeof t=="object"?f=JSON.stringify(t,null,2):f=String(t);try{return Buffer.isBuffer(f)?h.writeFileSync(l,f):h.writeFileSync(l,f,"utf8"),i&&g.info(`${a?"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,i=this.normalizePath(t),l=this.pathExists(i);if(l&&!n)return r&&g.info(`Skipping existing file: ${i}`),!1;if(s)return g.info(`[DRY RUN] Would copy file: ${i}`),!0;let p=this.normalizePath(x(i));try{await h.promises.mkdir(p,{recursive:!0})}catch(a){if(a?.code!=="EEXIST")throw a}try{return await V(async()=>(await h.promises.copyFile(e,i),r&&g.info(`${l?"Updated":"Created"} file: ${i}`),!0),`Failed to copy file from ${e} to ${i}`)}catch{return!1}}copySync(e,t,o={}){let{overwrite:n=!1,dryRun:s=!1,verbose:r=!1}=o,i=this.normalizePath(t),l=this.pathExists(i);if(l&&!n)return r&&g.info(`Skipping existing file: ${i}`),!1;if(s)return g.info(`[DRY RUN] Would copy file: ${i}`),!0;let p=this.normalizePath(x(i));try{h.mkdirSync(p,{recursive:!0})}catch(a){if(a?.code!=="EEXIST")throw a}try{return h.copyFileSync(e,i),r&&g.info(`${l?"Updated":"Created"} file: ${i}`),!0}catch{return!1}}pathExists(e,t=!1){try{return h.existsSync(e)}catch(o){return t||g.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&&g.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&&g.warn(`Failed to stat file: ${e}`,t),null}}lstatSync(e){try{return h.lstatSync(e)}catch(t){return this.options.debug&&g.warn(`Failed to lstat file: ${e}`,t),null}}async ensureDir(e){try{await h.promises.mkdir(e,{recursive:!0})}catch(t){if(t?.code!=="EEXIST")throw t}}ensureDirSync(e){try{h.mkdirSync(e,{recursive:!0})}catch(t){if(t?.code!=="EEXIST")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()}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=P(this._repoRoot,"packages");return this.pathExists(e)}isWithinApp(e){let t=this.normalizePath(z(e)),o=this.getAppRoot(),n=H(o,t),s=this.normalizePath(n);return!s.startsWith("../")&&!s.startsWith("/")}async findFiles(e,t,o={}){let n=this.normalizePath(P(e,t)),s=this.getAppRoot(),r=this.normalizePath(s),i=n.startsWith(r)?n.slice(r.length+1):n,l={absolute:!0,onlyFiles:!0,braceExpansion:!0,extglob:!0,globstar:!0,cwd:s,ignore:w.SCAN_PATTERNS?.globalIgnore||["**/node_modules/**","**/dist/**","**/build/**","**/.git/**"]};return await this._globWithNormalization([i],{...l,...o})}clearCache(){}async _resolveFrameworkI18nPattern(e){let t=w.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(P(n,t.PUBLISHED_ROOT,o)),r=s.replace(/\/[^/]*\*.*$/,"");return this.pathExists(r),s}async _globWithNormalization(e,t){return(await ue(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 a of o)if(typeof a!="string"||a.trim()==="")return{frameworkFiles:[],consumerFiles:[]};let n=this.getAppRoot(),s=w.getGlobOptionsFor?w.getGlobOptionsFor(t):{ignore:["**/node_modules/**","**/dist/**","**/build/**"]},r=this.normalizePath(n),i=e.framework.map(a=>{let u=this.normalizePath(a);return u.startsWith(r)?u.slice(r.length+1):u}),l=e.consumer.map(a=>{let u=this.normalizePath(a);return u.startsWith(r)?u.slice(r.length+1):u}),p={...s,onlyFiles:!0,absolute:!0,braceExpansion:!0,extglob:!0,globstar:!0,cwd:n};try{let a=i.length>0?await this._globWithNormalization(i,p):[],u=await this._globWithNormalization(l,p);return{frameworkFiles:a,consumerFiles:u}}catch{return this.options.debug,{frameworkFiles:[],consumerFiles:[]}}}async resolvePatterns(e){if(!w.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=w.getPatternsFor(e),s=this.isMonorepo();if(e==="i18n"){let l=n,p={eager:l.eager.map(a=>a.startsWith("!")?"!"+this.resolveAppPath(a.slice(1)):this.resolveAppPath(a)),lazy:l.lazy.map(a=>a.startsWith("!")?"!"+this.resolveAppPath(a.slice(1)):this.resolveAppPath(a)),framework:{eager:s?(l.framework?.eager||[]).map(a=>this.resolveRepoPath(a)).filter(Boolean):await Promise.all((l.framework?.eager||[]).map(a=>this._resolveFrameworkI18nPattern(a))).then(a=>a.filter(Boolean)),lazy:s?(l.framework?.lazy||[]).map(a=>this.resolveRepoPath(a)).filter(Boolean):await Promise.all((l.framework?.lazy||[]).map(a=>this._resolveFrameworkI18nPattern(a))).then(a=>a.filter(Boolean))},all:[]};return p.all=[...p.eager,...p.lazy,...p.framework.eager,...p.framework.lazy],p}let r=n,i={framework:s?(r.framework||[]).map(l=>this.resolveRepoPath(l)).filter(Boolean):[],consumer:(r.consumer||[]).map(l=>this.resolveAppPath(l)),all:[]};return i.all=[...i.consumer,...i.framework],i}getEmptyModulePath(e=!1){if(e)return"@donotdev/core/empty";let t=this.resolvePackage("@donotdev/core/empty");if(t)return t;let o=x(le(import.meta.url));return this.normalizePath(P(o,"../empty.js"))}_findRepoRoot(e){let t=this.normalizePath(e),o=0,n=this.options.maxLevels;for(;o<n;){let s=this.normalizePath(P(t,J.TOOLING)),r=this.normalizePath(P(t,J.CORE));if(this.pathExists(s)&&this.pathExists(r))return t;let i=P(t,"apps");if(this.pathExists(i)&&this.statSync(i)?.isDirectory())return this.normalizePath(t);let l=this.normalizePath(P(t,"package.json"));if(this.pathExists(l)&&this.normalizePath(x(t))===t)return t;let p=this.normalizePath(x(t));if(p===t)break;t=p,o++}return this.normalizePath(e)}};function K(c={}){let{entry:e="src/index.ts",outDir:t="lib",minify:o=!1,sourcemap:n=!0,platform:s="firebase",workspace:r,bundleWorkspaceDeps:i=!1,importFramework:l=!1,external:p=!1,...a}=c,u=$.getInstance(),f=U(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,...a};i&&Object.keys(f).length>0&&(m.alias=Object.fromEntries(Object.entries(f).map(([k,d])=>[k,u.normalizePath(d)]))),m.mainFields=["module","main"],m.conditions=["import","module","node"];let D=["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"],C=[];if(i)try{let k=r?.root||process.cwd(),d=process.cwd(),v=10;for(let b=0;b<v;b++){let T=u.normalizePath(`${d}/package.json`);if(u.pathExists(T)){let S=u.readSync(T,{format:"json"});if(S&&Array.isArray(S.workspaces)){k=u.normalizePath(d);for(let R of S.workspaces)R==="apps/*"||R==="functions"||!R.includes("*")&&!R.includes("/")&&C.push(R);break}}let A=u.getDirname(d);if(A===d)break;d=A}}catch{}let te={name:"external-node-modules",setup(k){k.onResolve({filter:/^firebase($|\/)/},d=>{if(d.path==="firebase-admin"||d.path.startsWith("firebase-admin/")||d.path==="firebase-functions"||d.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,A=new URL(b).pathname.replace(/^\/([A-Z]:)/i,"$1"),S=u.getDirname(A);v=u.normalizePath(`${S}/firebase-stub.js`)}return{path:v}}),k.onResolve({filter:/.*/},d=>{if(d.kind==="entry-point")return null;if(d.path.match(/@donotdev\/functions\/.+/)&&i&&r?.type==="dndev"){let v=d.path.replace("@donotdev/functions/","");return{path:u.normalizePath(`${r.root}/packages/functions/src/${v}/index.ts`)}}if(d.path==="@donotdev/utils")return r?.type==="dndev"?{path:u.normalizePath(`${r.root}/packages/core/utils/src/server/index.ts`)}:k.resolve("@donotdev/utils/server",{kind:d.kind,resolveDir:d.resolveDir});if(d.path.match(/@donotdev\/utils\/.+/)&&r?.type==="dndev"){let v=d.path.replace("@donotdev/utils/","");return{path:u.normalizePath(`${r.root}/packages/core/utils/src/${v}/index.ts`)}}if(d.path==="@donotdev/core")return r?.type==="dndev"?{path:u.normalizePath(`${r.root}/packages/core/server.ts`)}:k.resolve("@donotdev/core/server",{kind:d.kind,resolveDir:d.resolveDir});if(d.path.match(/@donotdev\/core\/.+/)&&i&&r?.type==="dndev"){let v=d.path.replace("@donotdev/core/","");return{path:u.normalizePath(`${r.root}/packages/core/${v}.ts`)}}if(d.path==="firebase-admin"||d.path.startsWith("firebase-admin/")||d.path==="firebase-functions"||d.path.startsWith("firebase-functions/"))return{path:d.path,external:!0};if(d.path.match(/@donotdev\/core\/.+/)&&i&&r?.type==="dndev"){let v=d.path.replace("@donotdev/core/","");return{path:u.normalizePath(`${r.root}/packages/core/${v}.ts`)}}if(d.path.startsWith("@donotdev/")||d.path==="valibot"||d.path.startsWith("valibot/"))return null;if(C.length>0){let v=d.path.split("/")[0];if(C.includes(v))return null}return d.path.startsWith(".")||d.path.startsWith("/")?null:{path:d.path,external:!0}})}};if(m.external=[...D,"firebase-admin","firebase-functions"],m.plugins=[te,...m.plugins||[]],m.define={"process.env.NODE_ENV":JSON.stringify(process.env.NODE_ENV||"production"),...m.define||{}},l&&r.type==="dndev"){let k=r.root,d=u.normalizePath(`${k}/functions/lib`);m.alias={...m.alias,"@donotdev/functions":d}}return s==="framework"&&(m.entryPoints={"firebase/index":"src/firebase/index.ts","vercel/api/index":"src/vercel/api/index.ts","shared/index":"src/shared/index.ts"}),m}import{readFileSync as j,writeFileSync as N,existsSync as I}from"fs";import"path";var L=["create","get","list","listCard","update","delete"];function q(c,e=0){let t=" ".repeat(e),o="";for(let[n,s]of Object.entries(c))if(s!=null)if(typeof s=="object"&&!Array.isArray(s))Object.keys(s).length===0?o+=`${t}${n}: {}
|
|
2
|
+
`:o+=`${t}${n}:
|
|
3
|
+
${q(s,e+1)}`;else if(Array.isArray(s))if(s.length===0)o+=`${t}${n}: []
|
|
4
|
+
`;else{o+=`${t}${n}:
|
|
5
|
+
`;for(let r of s)if(typeof r=="object"&&r!==null){let i=Object.entries(r),[l,p]=i[0];o+=`${t} - ${l}: ${p}
|
|
6
|
+
`;for(let a=1;a<i.length;a++){let[u,f]=i[a];o+=`${t} ${u}: ${f}
|
|
7
|
+
`}}else o+=`${t} - ${r}
|
|
8
|
+
`}else o+=`${t}${n}: ${s}
|
|
9
|
+
`;return o}var pe=["X_GOOGLE_","FIREBASE_","EXT_","GCLOUD_"],fe=["FIREBASE_REGION","FIREBASE_PROJECT_ID","FIREBASE_AUTH_DOMAIN"];function X(c){if(!I(c))return[];let e=j(c,"utf-8"),t=[],o=e.matchAll(/export\s*\{([^}]+)\}/g);for(let s of o)if(s[1]){let r=s[1].split(",").map(i=>{let l=i.trim().split(/\s+as\s+/);return(l[1]||l[0]||"").trim()}).filter(Boolean);t.push(...r)}let n=e.matchAll(/export\s+const\s+(\w+)/g);for(let s of n)s[1]&&t.push(s[1]);return[...new Set(t)]}function _(c=".env"){if(!I(c))return[];let e=j(c,"utf-8"),t=[];for(let o of e.split(/\r?\n/)){let n=o.trim();if(!n||n.startsWith("#"))continue;let s=n.indexOf("=");if(s<=0)continue;let r=n.substring(0,s).trim();fe.includes(r)||pe.some(i=>r.startsWith(i))||t.push(r)}return t}function Z(c){return L.some(e=>c.startsWith(`${e}_`))}function Q(c,e={}){let t=c.defaults||{},o=t.labels||{},n={},s=e.envPath?_(e.envPath):_(),r=s.length>0?s.map(u=>({key:u})):void 0,i=e.entryFile?X(e.entryFile):[],l=c.functions||{},p=new Set(Object.keys(l));for(let u of i)!Z(u)&&!p.has(u)&&p.add(u);for(let u of p){let f=l[u]||{},m={...o,...f.labels};f.category&&(m.category=f.category),n[u]={region:f.region||t.region||["us-central1"],platform:f.platform||t.platform||"gcfv2",entryPoint:f.entryPoint||u,labels:m},f.trigger==="http"?n[u].httpsTrigger={}:n[u].callableTrigger={},f.secrets?.length?n[u].secretEnvironmentVariables=f.secrets.map(D=>({key:D})):r&&(n[u].secretEnvironmentVariables=r)}if(c.crud?.entities)for(let u of c.crud.entities)for(let f of L){let m=`${f}_${u}`;n[m]={region:t.region||["us-central1"],platform:t.platform||"gcfv2",callableTrigger:{},entryPoint:m,labels:{...o,category:"crud"}},r&&(n[m].secretEnvironmentVariables=r)}return`# Firebase Functions Configuration
|
|
8
10
|
# Generated by @donotdev/core/functions - DO NOT EDIT MANUALLY
|
|
9
11
|
# Generated at: ${new Date().toISOString()}
|
|
10
12
|
|
|
11
|
-
`+
|
|
13
|
+
`+q({endpoints:n,specVersion:"v1alpha1",requiredAPIs:[]})}function de(c,e={}){let t=Object.keys(c.functions||{}),o=[];if(c.crud?.entities)for(let l of c.crud.entities)for(let p of L)o.push(`${p}_${l}`);let s=(e.entryFile?X(e.entryFile):[]).filter(l=>!Z(l)&&!t.includes(l)),r=[...t,...s],i=e.envPath?_(e.envPath):_();return{yaml:Q(c,e),functions:[...r,...o],staticFunctions:r,crudFunctions:o,autoDetected:s,autoSecrets:i}}function he(c){let e=new Set;for(let p of Object.values(c.functions||{}))if(p.secrets)for(let a of p.secrets)e.add(a);let t=_();for(let p of t)e.add(p);if(e.size===0||!I(".env"))return{stripped:[],kept:0};let n=j(".env","utf-8").split(/\r?\n/),s=[],r=[];for(let p of n){let a=p.trim();if(!a||a.startsWith("#")){s.push(p);continue}let u=a.indexOf("="),f=u>0?a.substring(0,u).trim():"";e.has(f)?r.push(p):s.push(p)}if(r.length===0)return{stripped:[],kept:s.length};N(".env",s.join(`
|
|
14
|
+
`));let i=`# Secrets managed by sync-secrets (auto-filtered by build)
|
|
15
|
+
`;if(I(".env.local")){let p=j(".env.local","utf-8"),a=new Set(p.split(/\r?\n/).filter(f=>f.trim()&&!f.trim().startsWith("#")).map(f=>f.split("=")[0].trim())),u=r.filter(f=>!a.has(f.split("=")[0].trim()));u.length>0&&N(".env.local",p.trimEnd()+`
|
|
16
|
+
`+i+u.join(`
|
|
17
|
+
`)+`
|
|
18
|
+
`)}else N(".env.local",i+r.join(`
|
|
19
|
+
`)+`
|
|
20
|
+
`);return{stripped:r.map(p=>p.split("=")[0].trim()),kept:s.length}}function ee(c={}){let{entry:e="src/index.ts",outDir:t="lib",minify:o=!1,sourcemap:n=!0,platform:s="firebase",...r}=c,i=W();return K({entry:e,outDir:t,minify:o,sourcemap:n,platform:s,workspace:i,...r})}function Te(c={}){return ee({...c,platform:"framework",bundleWorkspaceDeps:!0})}function Ne(c={}){return ee({...c,platform:"firebase",bundleWorkspaceDeps:!0,importFramework:!0})}export{Ne as createAppFunctionsConfig,ee as createFunctionsEsbuildConfig,Te as createRootFunctionsConfig,he as filterEnvSecrets,Q as generateFunctionsYaml,de as generateFunctionsYamlWithInfo};
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
{
|
|
2
|
+
"signIn": "Log ind",
|
|
3
|
+
"choosePlatform": "Vælg en platform at logge ind med",
|
|
4
|
+
"providers": {
|
|
5
|
+
"google": "Google",
|
|
6
|
+
"facebook": "Facebook",
|
|
7
|
+
"github": "GitHub",
|
|
8
|
+
"twitter": "Twitter",
|
|
9
|
+
"microsoft": "Microsoft",
|
|
10
|
+
"yahoo": "Yahoo",
|
|
11
|
+
"apple": "Apple"
|
|
12
|
+
},
|
|
13
|
+
"buttons": {
|
|
14
|
+
"signIn": "Log ind med {{provider}}",
|
|
15
|
+
"continue": "Fortsæt med {{provider}}",
|
|
16
|
+
"verify": "Bekræft e-mail",
|
|
17
|
+
"sendVerification": "Send bekræftelsesmail",
|
|
18
|
+
"signOut": "Log ud",
|
|
19
|
+
"loading": "Henter..."
|
|
20
|
+
},
|
|
21
|
+
"accountLinking": {
|
|
22
|
+
"title": "Kontokobling påkrævet",
|
|
23
|
+
"message": "Den her e-mail er allerede knyttet til andre login-metoder ({{methods}}). Log ind med en af dem for at koble dine konti sammen.",
|
|
24
|
+
"instruction": "Log ind med en af følgende metoder for at koble dine konti:",
|
|
25
|
+
"explanation": "Når du logger ind, kobles dine konti automatisk, så du fremover kan bruge begge metoder.",
|
|
26
|
+
"success": "Kontierne er koblet sammen.",
|
|
27
|
+
"error": "Kontokobling mislykkedes. Prøv igen.",
|
|
28
|
+
"emailLabel": "E-mail:"
|
|
29
|
+
},
|
|
30
|
+
"emailVerification": {
|
|
31
|
+
"title": "Bekræft din e-mail",
|
|
32
|
+
"status": {
|
|
33
|
+
"verified": "Din e-mail er bekræftet.",
|
|
34
|
+
"unverified": "Bekræft din e-mail for at bruge alle funktioner."
|
|
35
|
+
},
|
|
36
|
+
"sending": "Sender bekræftelsesmail...",
|
|
37
|
+
"success": "Bekræftelsesmail sendt. Tjek din indbakke.",
|
|
38
|
+
"alreadyVerified": "Din e-mail er allerede bekræftet.",
|
|
39
|
+
"notSignedIn": "Du skal være logget ind for at bekræfte din e-mail.",
|
|
40
|
+
"error": "Kunne ikke sende bekræftelsesmail. Prøv igen."
|
|
41
|
+
},
|
|
42
|
+
"errors": {
|
|
43
|
+
"auth/popup-closed-by-user": "Login-vinduet blev lukket før du var færdig.",
|
|
44
|
+
"auth/cancelled-popup-request": "Login blev annulleret.",
|
|
45
|
+
"auth/popup-blocked": "Browseren blokerede login-vinduet.",
|
|
46
|
+
"auth/email-already-in-use": "E-mailen er allerede i brug.",
|
|
47
|
+
"auth/invalid-email": "Ugyldig e-mailadresse.",
|
|
48
|
+
"auth/operation-not-allowed": "Den her login-metode er ikke slået til.",
|
|
49
|
+
"auth/weak-password": "Adgangskoden er for svag.",
|
|
50
|
+
"auth/user-disabled": "Kontoen er deaktiveret.",
|
|
51
|
+
"auth/user-not-found": "Ingen konto med den e-mail.",
|
|
52
|
+
"auth/wrong-password": "Forkert adgangskode.",
|
|
53
|
+
"auth/network-request-failed": "Netværksfejl. Prøv igen.",
|
|
54
|
+
"auth/internal-error": "Der opstod en fejl. Prøv igen.",
|
|
55
|
+
"auth/invalid-credential": "Ugyldige loginoplysninger.",
|
|
56
|
+
"auth/account-exists-with-different-credential": "Der findes allerede en konto med den e-mail, men andre loginoplysninger.",
|
|
57
|
+
"auth/provider-not-enabled": "Login med {{provider}} er ikke slået til",
|
|
58
|
+
"auth/unknown-provider": "Ukendt tjeneste: {{provider}}",
|
|
59
|
+
"auth/missing-provider": "Login-tjenesten er ikke sat op",
|
|
60
|
+
"auth/no-user-signed-in": "Der er ingen logget ind",
|
|
61
|
+
"auth/oauth-incomplete": "Login blev afbrudt. Prøv at logge ind igen.",
|
|
62
|
+
"fallback": {
|
|
63
|
+
"title": "Du skal logge ind",
|
|
64
|
+
"description": "Log ind for at se denne side.",
|
|
65
|
+
"chooseProvider": "Vælg hvordan du vil logge ind",
|
|
66
|
+
"authOptions": "Login-muligheder",
|
|
67
|
+
"secure": "Dine data er sikre og krypteret.",
|
|
68
|
+
"terms": "Ved login accepterer du vores vilkår."
|
|
69
|
+
},
|
|
70
|
+
"genericError": "Login mislykkedes. Prøv igen.",
|
|
71
|
+
"fieldUpdate": "Kunne ikke opdatere {{field}}",
|
|
72
|
+
"hiddenField": "Fejl ved {{field}}",
|
|
73
|
+
"unsupportedFieldType": "Felttypen {{type}} understøttes ikke",
|
|
74
|
+
"fieldRendering": "Fejl ved felt {{field}}",
|
|
75
|
+
"fallingBackToTextField": "Bruger tekstfelt i stedet for {{type}}",
|
|
76
|
+
"invalidFieldProps": "Ugyldig indstilling for {{field}}"
|
|
77
|
+
},
|
|
78
|
+
"status": {
|
|
79
|
+
"loading": "Henter...",
|
|
80
|
+
"authenticating": "Logger ind...",
|
|
81
|
+
"verifying": "Tjekker...",
|
|
82
|
+
"checking": "Tjekker adgang..."
|
|
83
|
+
},
|
|
84
|
+
"aria": {
|
|
85
|
+
"signInOptions": "Login-muligheder",
|
|
86
|
+
"signInButton": "Log ind med {{provider}}",
|
|
87
|
+
"loadingState": "Logger ind",
|
|
88
|
+
"errorAlert": "Loginfejl",
|
|
89
|
+
"successAlert": "Succes",
|
|
90
|
+
"accountLinkingRequired": "Kontokobling påkrævet",
|
|
91
|
+
"verificationRequired": "E-mail skal bekræftes"
|
|
92
|
+
},
|
|
93
|
+
"home": {
|
|
94
|
+
"title": "DoNotDev",
|
|
95
|
+
"description": "DoNotDev er en platform til at bygge webapps med TypeScript og ren CSS.",
|
|
96
|
+
"getStarted": "Kom i gang",
|
|
97
|
+
"whyChooseDoNotDev": "Hvorfor DoNotDev?",
|
|
98
|
+
"openSource": "Open Source",
|
|
99
|
+
"freeAndOpenSource": "Gratis og open source med et levende fællesskab.",
|
|
100
|
+
"customizable": "Tilpasningsmuligheder",
|
|
101
|
+
"flexibleComponents": "Komponenter der kan skræddersyes til dit projekt.",
|
|
102
|
+
"developerFocused": "Udviklere i centrum",
|
|
103
|
+
"scalableArchitecture": "Skalerbar arkitektur",
|
|
104
|
+
"secureByDesign": "Sikkerhed indbygget fra start",
|
|
105
|
+
"fastIntegration": "Hurtig at komme i gang",
|
|
106
|
+
"scaleEffortlessly": "Skalér fra prototyper til store løsninger.",
|
|
107
|
+
"header": { "purchase": "Køb" }
|
|
108
|
+
},
|
|
109
|
+
"actions": {
|
|
110
|
+
"create": "Opret",
|
|
111
|
+
"update": "Opdater",
|
|
112
|
+
"delete": "Slet",
|
|
113
|
+
"cancel": "Annuller",
|
|
114
|
+
"save": "Gem",
|
|
115
|
+
"confirm": "Bekræft",
|
|
116
|
+
"back": "Tilbage",
|
|
117
|
+
"next": "Næste",
|
|
118
|
+
"previous": "Forrige",
|
|
119
|
+
"search": "Søg",
|
|
120
|
+
"searchPlaceholder": "Søg...",
|
|
121
|
+
"filter": "Filter",
|
|
122
|
+
"clear": "Ryd",
|
|
123
|
+
"reset": "Nulstil",
|
|
124
|
+
"apply": "Anvend",
|
|
125
|
+
"select": "Vælg",
|
|
126
|
+
"upload": "Upload",
|
|
127
|
+
"download": "Hent",
|
|
128
|
+
"close": "Luk"
|
|
129
|
+
},
|
|
130
|
+
"messages": {
|
|
131
|
+
"createSuccess": "{{entity}} oprettet.",
|
|
132
|
+
"updateSuccess": "{{entity}} opdateret.",
|
|
133
|
+
"deleteSuccess": "{{entity}} slettet.",
|
|
134
|
+
"error": "Der opstod en fejl",
|
|
135
|
+
"loading": "Henter...",
|
|
136
|
+
"noResults": "Ingen resultater",
|
|
137
|
+
"confirmDelete": "Er du sikker på, at du vil slette denne {{entity}}?",
|
|
138
|
+
"unsavedChanges": "Du har ændringer der ikke er gemt",
|
|
139
|
+
"sessionExpired": "Din session er udløbet",
|
|
140
|
+
"networkError": "Netværksfejl",
|
|
141
|
+
"unauthorized": "Ingen adgang",
|
|
142
|
+
"forbidden": "Adgang nægtet",
|
|
143
|
+
"serverError": "Serverfejl",
|
|
144
|
+
"notFound": {
|
|
145
|
+
"title": "Siden findes ikke",
|
|
146
|
+
"description": "Siden du leder efter findes ikke eller er flyttet.",
|
|
147
|
+
"suggestions": "Måske leder du efter:",
|
|
148
|
+
"goHome": "Til forsiden",
|
|
149
|
+
"goBack": "Tilbage"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"nav": { "signIn": "Log ind" },
|
|
153
|
+
"pagination": {
|
|
154
|
+
"showing": "Viser {{from}}–{{to}} af {{total}}",
|
|
155
|
+
"previous": "Forrige",
|
|
156
|
+
"next": "Næste",
|
|
157
|
+
"page": "Side {{page}} af {{total}}"
|
|
158
|
+
},
|
|
159
|
+
"filters": {
|
|
160
|
+
"title": "Filtre",
|
|
161
|
+
"apply": "Brug filtre",
|
|
162
|
+
"clear": "Ryd filtre",
|
|
163
|
+
"noResults": "Ingen resultater matcher",
|
|
164
|
+
"selected": "{{count}} valgt"
|
|
165
|
+
},
|
|
166
|
+
"settings": {
|
|
167
|
+
"title": "Indstillinger",
|
|
168
|
+
"theme": "Tema",
|
|
169
|
+
"language": "Sprog",
|
|
170
|
+
"clearCache": {
|
|
171
|
+
"title": "Ryd cache",
|
|
172
|
+
"localStorage": "Lokal lagring",
|
|
173
|
+
"sessionStorage": "Session",
|
|
174
|
+
"applicationCache": "App-cache",
|
|
175
|
+
"serviceWorker": "Service Worker",
|
|
176
|
+
"cookies": "Cookies",
|
|
177
|
+
"indexedDB": "IndexedDB",
|
|
178
|
+
"webSQL": "WebSQL",
|
|
179
|
+
"memoryCache": "Hukommelse",
|
|
180
|
+
"button": "Ryd cache",
|
|
181
|
+
"clearing": "Rydder...",
|
|
182
|
+
"error": "Kunne ikke rydde cache",
|
|
183
|
+
"success": "Cache ryddet: {{items}}",
|
|
184
|
+
"noItemsCleared": "Intet blev ryddet"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"common": {
|
|
188
|
+
"app": { "name": "DoNotDev App" },
|
|
189
|
+
"defaultTitle": "Side",
|
|
190
|
+
"defaultDescription": "Sidebeskrivelse",
|
|
191
|
+
"locale": "da_DK",
|
|
192
|
+
"themeSelector": {
|
|
193
|
+
"changeTheme": "Skift tema",
|
|
194
|
+
"tooltipWithTransition": "Tema: {{current}} → {{next}}",
|
|
195
|
+
"tooltipWithCurrent": "Tema: {{current}}",
|
|
196
|
+
"tooltipWithNext": "Skift til {{next}}"
|
|
197
|
+
},
|
|
198
|
+
"languageSelector": { "changeLanguage": "Skift sprog" }
|
|
199
|
+
},
|
|
200
|
+
"footer": {
|
|
201
|
+
"landing": {
|
|
202
|
+
"company": {
|
|
203
|
+
"defaultName": "Virksomhed",
|
|
204
|
+
"description": "Byg bedre produkter hurtigere med vores platform."
|
|
205
|
+
},
|
|
206
|
+
"social": {
|
|
207
|
+
"twitter": "Twitter",
|
|
208
|
+
"github": "GitHub",
|
|
209
|
+
"discord": "Discord"
|
|
210
|
+
},
|
|
211
|
+
"sections": {
|
|
212
|
+
"product": {
|
|
213
|
+
"title": "Produkt",
|
|
214
|
+
"features": "Funktioner",
|
|
215
|
+
"pricing": "Priser",
|
|
216
|
+
"docs": "Dokumentation",
|
|
217
|
+
"updates": "Opdateringer"
|
|
218
|
+
},
|
|
219
|
+
"support": {
|
|
220
|
+
"title": "Support",
|
|
221
|
+
"help": "Hjælp",
|
|
222
|
+
"contact": "Kontakt",
|
|
223
|
+
"status": "Status",
|
|
224
|
+
"community": "Fællesskab"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"legal": {
|
|
229
|
+
"allRightsReserved": "Alle rettigheder forbeholdes.",
|
|
230
|
+
"cookieSettings": "Cookie-indstillinger",
|
|
231
|
+
"legalNotice": "Juridisk information",
|
|
232
|
+
"privacyPolicy": "Privatlivspolitik",
|
|
233
|
+
"termsOfService": "Vilkår og betingelser",
|
|
234
|
+
"builtWith": "Lavet med ❤️ og DoNotDev ©",
|
|
235
|
+
"collapse": "Luk footer",
|
|
236
|
+
"expand": "Åbn footer"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"search": { "ariaLabel": "Søg", "label": "Søg" },
|
|
240
|
+
"goTo": { "ariaLabel": "Gå til side", "label": "Gå til" },
|
|
241
|
+
"globalGoTo": {
|
|
242
|
+
"placeholder": "Søg i sider eller gå til...",
|
|
243
|
+
"noResults": "Ingen sider fundet.",
|
|
244
|
+
"favorites": "Favoritter",
|
|
245
|
+
"allPages": "Alle sider",
|
|
246
|
+
"addFavorite": "Tilføj til favoritter",
|
|
247
|
+
"removeFavorite": "Fjern fra favoritter"
|
|
248
|
+
},
|
|
249
|
+
"copyToClipboard": "Kopier",
|
|
250
|
+
"copied": "Kopieret!",
|
|
251
|
+
"copyPassword": "Kopier adgangskode",
|
|
252
|
+
"table": {
|
|
253
|
+
"searchPlaceholder": "Søg...",
|
|
254
|
+
"filters": "Filtre",
|
|
255
|
+
"selectAllRows": "Vælg alle",
|
|
256
|
+
"selectRow": "Vælg række {{index}}",
|
|
257
|
+
"showingResults": "Viser {{from}}–{{to}} af {{total}}",
|
|
258
|
+
"previous": "Forrige",
|
|
259
|
+
"next": "Næste",
|
|
260
|
+
"page": "Side {{current}} af {{total}}"
|
|
261
|
+
},
|
|
262
|
+
"language": {
|
|
263
|
+
"selectLanguage": "Vælg sprog",
|
|
264
|
+
"searchLanguages": "Søg sprog...",
|
|
265
|
+
"noLanguagesFound": "Ingen sprog fundet",
|
|
266
|
+
"changeLanguage": "Skift sprog"
|
|
267
|
+
},
|
|
268
|
+
"form": {
|
|
269
|
+
"submit": "Send",
|
|
270
|
+
"cancel": "Annuller",
|
|
271
|
+
"submitting": "Sender...",
|
|
272
|
+
"loading": "Henter...",
|
|
273
|
+
"add": "Tilføj",
|
|
274
|
+
"remove": "Fjern",
|
|
275
|
+
"typeAndPressAdd": "Skriv og tryk Tilføj...",
|
|
276
|
+
"enterLocationData": "Indtast placering (JSON)"
|
|
277
|
+
},
|
|
278
|
+
"navigation": { "more": "Mere", "home": "Forside" },
|
|
279
|
+
"pwa": {
|
|
280
|
+
"update": {
|
|
281
|
+
"title": "Ny version klar",
|
|
282
|
+
"description": "Opdater siden for at hente den nye version.",
|
|
283
|
+
"button": "Opdater",
|
|
284
|
+
"altText": "Opdater app"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"code": {
|
|
288
|
+
"copyCode": "Kopier kode",
|
|
289
|
+
"copied": "Kopieret!",
|
|
290
|
+
"copyCodeToClipboard": "Kopier kode"
|
|
291
|
+
},
|
|
292
|
+
"video": { "clickToWatch": "Klik for at se", "watchVideo": "Se video" },
|
|
293
|
+
"inspector": {
|
|
294
|
+
"pageSource": "Sidekilde",
|
|
295
|
+
"inspectPageSourceCode": "Se sidekoden"
|
|
296
|
+
},
|
|
297
|
+
"sheet": {
|
|
298
|
+
"navigation": "Navigation",
|
|
299
|
+
"codeInspector": "Kodeinspector",
|
|
300
|
+
"debugPanel": "Fejlsøgningspanel"
|
|
301
|
+
},
|
|
302
|
+
"routeError": {
|
|
303
|
+
"title": "Noget gik galt",
|
|
304
|
+
"description": "Der opstod en fejl under indlæsning af siden.",
|
|
305
|
+
"dataSafe": "Dine data er i sikkerhed.",
|
|
306
|
+
"errorId": "Fejl-ID",
|
|
307
|
+
"errorMessage": "Fejlbesked",
|
|
308
|
+
"copied": "Kopieret",
|
|
309
|
+
"copyDetails": "Kopier detaljer",
|
|
310
|
+
"tryAgain": "Prøv igen",
|
|
311
|
+
"goHome": "Til forsiden",
|
|
312
|
+
"goBack": "Tilbage",
|
|
313
|
+
"contactSupport": "Kontakt support hvis fejlen fortsætter."
|
|
314
|
+
},
|
|
315
|
+
"redirectOverlay": {
|
|
316
|
+
"phases": {
|
|
317
|
+
"connecting": "Opretter forbindelse...",
|
|
318
|
+
"preparing": "Forbereder...",
|
|
319
|
+
"redirecting": "Omdirigerer...",
|
|
320
|
+
"timeout": "Det tager længere end forventet..."
|
|
321
|
+
},
|
|
322
|
+
"cancel": "Annuller",
|
|
323
|
+
"doNotRefresh": "Lad vær med at opdatere eller gå tilbage",
|
|
324
|
+
"default": {
|
|
325
|
+
"title": "Omdirigerer",
|
|
326
|
+
"message": "Vent venligst...",
|
|
327
|
+
"subtitle": "Det tager et øjeblik",
|
|
328
|
+
"ariaLabel": "Omdirigerer"
|
|
329
|
+
},
|
|
330
|
+
"stripe-checkout": {
|
|
331
|
+
"title": "Til betaling",
|
|
332
|
+
"message": "Forbereder sikker betaling...",
|
|
333
|
+
"subtitle": "Vent et øjeblik",
|
|
334
|
+
"ariaLabel": "Forbereder betaling"
|
|
335
|
+
},
|
|
336
|
+
"stripe-portal": {
|
|
337
|
+
"title": "Til fakturering",
|
|
338
|
+
"message": "Åbner din konto...",
|
|
339
|
+
"subtitle": "Administrer abonnement og fakturaer",
|
|
340
|
+
"ariaLabel": "Åbner fakturering"
|
|
341
|
+
},
|
|
342
|
+
"oauth-google": {
|
|
343
|
+
"title": "Logger ind med Google",
|
|
344
|
+
"message": "Forbinder til Google...",
|
|
345
|
+
"subtitle": "Du sendes videre til login",
|
|
346
|
+
"ariaLabel": "Logger ind med Google"
|
|
347
|
+
},
|
|
348
|
+
"oauth-github": {
|
|
349
|
+
"title": "Logger ind med GitHub",
|
|
350
|
+
"message": "Forbinder til GitHub...",
|
|
351
|
+
"subtitle": "Du sendes videre til login",
|
|
352
|
+
"ariaLabel": "Logger ind med GitHub"
|
|
353
|
+
},
|
|
354
|
+
"oauth-apple": {
|
|
355
|
+
"title": "Logger ind med Apple",
|
|
356
|
+
"message": "Forbinder til Apple...",
|
|
357
|
+
"subtitle": "Du sendes videre til login",
|
|
358
|
+
"ariaLabel": "Logger ind med Apple"
|
|
359
|
+
},
|
|
360
|
+
"oauth-microsoft": {
|
|
361
|
+
"title": "Logger ind med Microsoft",
|
|
362
|
+
"message": "Forbinder til Microsoft...",
|
|
363
|
+
"subtitle": "Du sendes videre til login",
|
|
364
|
+
"ariaLabel": "Logger ind med Microsoft"
|
|
365
|
+
},
|
|
366
|
+
"oauth-facebook": {
|
|
367
|
+
"title": "Logger ind med Facebook",
|
|
368
|
+
"message": "Forbinder til Facebook...",
|
|
369
|
+
"subtitle": "Du sendes videre til login",
|
|
370
|
+
"ariaLabel": "Logger ind med Facebook"
|
|
371
|
+
},
|
|
372
|
+
"auth-email-link": {
|
|
373
|
+
"title": "Sender bekræftelse",
|
|
374
|
+
"message": "Forbereder bekræftelseslink...",
|
|
375
|
+
"subtitle": "Tjek din indbakke",
|
|
376
|
+
"ariaLabel": "Sender bekræftelsesmail"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|