@donotdev/core 0.0.9 → 0.0.11
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/{next/empty.js → empty.js} +5 -5
- package/functions/index.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +42 -51
- package/next/index.js +11 -11
- package/package.json +11 -6
- package/server.js +16 -16
- package/vite/index.js +1 -1
- package/vite/empty.js +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Empty placeholder for optional features
|
|
3
|
-
* @description Used by Next.js/Turbopack resolution to alias missing optional features
|
|
4
|
-
*/
|
|
5
|
-
export default {};
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Empty placeholder for optional features
|
|
3
|
+
* @description Used by Next.js/Turbopack resolution to alias missing optional features
|
|
4
|
+
*/
|
|
5
|
+
export default {};
|
package/functions/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var Y=(l,e)=>()=>(l&&(e=l(l=0)),e);function K(l,e=null){let t=x[l];if(!t)throw new Error(`Unknown pattern type: ${l}`);return e&&t.framework?{...t,framework:t.framework.map(r=>`${e}/${r}`)}:t}function Z(l){return q[l]||q.base}var O,x,q,X=Y(()=>{"use strict";y();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"},x={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"],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/**"]},q={base:{absolute:!0,onlyFiles:!0,ignore:x.globalIgnore},css:{absolute:!0,onlyFiles:!0,ignore:[...x.globalIgnore,"**/*.test.css"]},routes:{absolute:!0,onlyFiles:!0,ignore:[...x.globalIgnore,"**/*.test.tsx","**/*.stories.tsx"]},i18n:{absolute:!0,onlyFiles:!0,ignore:x.globalIgnore},assets:{absolute:!0,onlyFiles:!0,ignore:x.globalIgnore}}});import{createRequire as ce}from"node:module";import{fileURLToPath as le}from"node:url";import{dirname as ue,resolve as Re}from"node:path";import{Buffer as b}from"node:buffer";import v from"node:process";var pe,E,A,y=Y(()=>{"use strict";pe=ce(import.meta.url),E=le(import.meta.url),A=ue(E);typeof globalThis<"u"&&(globalThis.require=pe,globalThis.__filename=E,globalThis.__dirname=A,globalThis.Buffer=b,globalThis.process=v,typeof global>"u"&&(globalThis.global=globalThis))});y();y();y();import{createRequire as fe}from"node:module";import{resolve as W,join as k,dirname as S,relative as V,normalize as de,sep as Q,extname as he}from"node:path";import{fileURLToPath as me}from"node:url";import*as u from"node:fs";X();import ge from"fast-glob";var F={getGlobOptionsFor:Z||void 0,SCAN_PATTERNS:x||void 0,getPatternsFor:K||void 0,I18N_PATHS:O||void 0},m={error:(l,e)=>{},warn:(l,e)=>{},info:l=>{}};function J(l,e){return l().catch(t=>{throw new Error(`${e}: ${t instanceof Error?t.message:String(t)}`)})}var ee={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"},L=class l{static _instance=null;options;_repoRoot;_appRoot=null;static getInstance(e={}){return l._instance||(l._instance=new l(e)),l._instance}static _reset(){l._instance=null}constructor(e={}){if(l._instance)return l._instance;this.options={maxLevels:e.maxLevels??10,customMarkers:e.customMarkers||[],cache:e.cache??!1,debug:e.debug??!1};try{let t=v.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: ${v.cwd()}`)}this._appRoot=null,l._instance=this}normalizePath(e){if(!e)return"";try{return de(e).split(Q).join("/")}catch{return String(e).split(Q).join("/")}}getRelativePath(e){let t=this.getAppRoot(),r=V(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(S(e)):""}resolvePackage(e,t=null){try{let r=t||this.getAppRoot(),n=fe(k(r,"package.json")).resolve(e);return this.normalizePath(n)}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 s=e.replace("@donotdev/",""),o=this.resolveRepoPath(`packages/${s}`);if(this.pathExists(o))return o;if(["auth","billing","crud","oauth"].includes(s)){let i=this.resolveRepoPath(`packages/features/${s}`);if(this.pathExists(i))return i}if(s==="firebase"){let i=this.resolveRepoPath(`packages/providers/${s}`);if(this.pathExists(i))return i}}let a=this.resolveAppPath(`node_modules/${e}`);if(this.pathExists(a))return a;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(),r=W(t,e);return this.normalizePath(r)}resolveRepoPath(e){let t=this.getRepoRoot(),r=this.normalizePath(e),a=W(t,r);return this.normalizePath(a)}resolvePath(e,t){let r=this.normalizePath(t),a=this.normalizePath(e),n=W(r,a);return this.normalizePath(n)}createImportPath(e){return"./"+this.getRelativePath(e)}getFileInfo(e){try{let t=u.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:he(e).toLowerCase()===".json"?"json":"text"}async read(e,t={}){let{format:r="auto",encoding:a="utf8"}=t,n=this._detectFormat(e,r);try{if(n==="buffer")return await u.promises.readFile(e);let s=await u.promises.readFile(e,a),o=this.stripBom(s);return n==="json"?JSON.parse(o):o}catch(s){return this.options.debug&&m.warn(`Failed to read file: ${e}`,s),null}}readSync(e,t={}){let{format:r="auto",encoding:a="utf8"}=t,n=this._detectFormat(e,r);try{if(n==="buffer")return u.readFileSync(e);let s=u.readFileSync(e,a),o=this.stripBom(s);return n==="json"?JSON.parse(o):o}catch(s){return this.options.debug&&m.warn(`Failed to read file: ${e}`,s),null}}async write(e,t,r={}){let{format:a="auto",overwrite:n=!1,dryRun:s=!1,verbose:o=!1}=r,i=this.normalizePath(e),f=this.normalizePath(S(i)),c=this.pathExists(i);if(c&&!n)return o&&m.info(`Skipping existing file: ${i}`),!1;if(s)return m.info(`[DRY RUN] Would write file: ${i}`),!0;try{await u.promises.mkdir(f,{recursive:!0})}catch(h){if(h?.code!=="EEXIST")throw h}let d=this._detectFormat(e,a),g;b.isBuffer(t)?g=t:d==="json"&&typeof t=="object"?g=JSON.stringify(t,null,2):g=String(t);try{return await J(async()=>(b.isBuffer(g)?await u.promises.writeFile(i,g):await u.promises.writeFile(i,g,"utf8"),o&&m.info(`${c?"Updated":"Created"} file: ${i}`),!0),`Failed to write file: ${i}`)}catch{return!1}}writeSync(e,t,r={}){let{format:a="auto",overwrite:n=!1,dryRun:s=!1,verbose:o=!1}=r,i=this.normalizePath(e),f=this.normalizePath(S(i)),c=this.pathExists(i);if(c&&!n)return o&&m.info(`Skipping existing file: ${i}`),!1;if(s)return m.info(`[DRY RUN] Would write file: ${i}`),!0;try{u.mkdirSync(f,{recursive:!0})}catch(h){if(h?.code!=="EEXIST")throw h}let d=this._detectFormat(e,a),g;b.isBuffer(t)?g=t:d==="json"&&typeof t=="object"?g=JSON.stringify(t,null,2):g=String(t);try{return b.isBuffer(g)?u.writeFileSync(i,g):u.writeFileSync(i,g,"utf8"),o&&m.info(`${c?"Updated":"Created"} file: ${i}`),!0}catch(h){throw new Error(`Failed to write file: ${i}: ${h instanceof Error?h.message:String(h)}`)}}async copy(e,t,r={}){let{overwrite:a=!1,dryRun:n=!1,verbose:s=!1}=r,o=this.normalizePath(t),i=this.pathExists(o);if(i&&!a)return s&&m.info(`Skipping existing file: ${o}`),!1;if(n)return m.info(`[DRY RUN] Would copy file: ${o}`),!0;let f=this.normalizePath(S(o));try{await u.promises.mkdir(f,{recursive:!0})}catch(c){if(c?.code!=="EEXIST")throw c}try{return await J(async()=>(await u.promises.copyFile(e,o),s&&m.info(`${i?"Updated":"Created"} file: ${o}`),!0),`Failed to copy file from ${e} to ${o}`)}catch{return!1}}copySync(e,t,r={}){let{overwrite:a=!1,dryRun:n=!1,verbose:s=!1}=r,o=this.normalizePath(t),i=this.pathExists(o);if(i&&!a)return s&&m.info(`Skipping existing file: ${o}`),!1;if(n)return m.info(`[DRY RUN] Would copy file: ${o}`),!0;let f=this.normalizePath(S(o));try{u.mkdirSync(f,{recursive:!0})}catch(c){if(c?.code!=="EEXIST")throw c}try{return u.copyFileSync(e,o),s&&m.info(`${i?"Updated":"Created"} file: ${o}`),!0}catch{return!1}}pathExists(e,t=!1){try{return u.existsSync(e)}catch(r){return t||m.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 u.existsSync(t)||u.mkdirSync(t,{recursive:!0}),!0}catch{return!1}}readdirSync(e,t){try{return u.readdirSync(e,t)}catch(r){return this.options.debug&&m.warn(`Failed to read directory: ${e}`,r),t&&typeof t=="object"&&"withFileTypes"in t&&t.withFileTypes?[]:[]}}statSync(e){try{return u.statSync(e)}catch(t){return this.options.debug&&m.warn(`Failed to stat file: ${e}`,t),null}}lstatSync(e){try{return u.lstatSync(e)}catch(t){return this.options.debug&&m.warn(`Failed to lstat file: ${e}`,t),null}}async ensureDir(e){try{await u.promises.mkdir(e,{recursive:!0})}catch(t){if(t?.code!=="EEXIST")throw t}}ensureDirSync(e){try{u.mkdirSync(e,{recursive:!0})}catch(t){if(t?.code!=="EEXIST")throw t}}async remove(e){await u.promises.rm(e,{recursive:!0,force:!0})}removeSync(e){u.rmSync(e,{recursive:!0,force:!0})}async readdir(e,t){return u.promises.readdir(e,t)}stripBom(e){return e.charCodeAt(0)===65279?e.slice(1):e}getRepoRoot(){return this._repoRoot||v.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=k(this._repoRoot,"packages");return this.pathExists(e)}isWithinApp(e){let t=this.normalizePath(W(e)),r=this.getAppRoot(),a=V(r,t),n=this.normalizePath(a);return!n.startsWith("../")&&!n.startsWith("/")}async findFiles(e,t,r={}){let a=this.normalizePath(k(e,t)),n=this.getAppRoot(),s=this.normalizePath(n),o=a.startsWith(s)?a.slice(s.length+1):a,i={absolute:!0,onlyFiles:!0,braceExpansion:!0,extglob:!0,globstar:!0,cwd:n,ignore:F.SCAN_PATTERNS?.globalIgnore||["**/node_modules/**","**/dist/**","**/build/**","**/.git/**"]};return await this._globWithNormalization([o],{...i,...r})}clearCache(){}async _resolveFrameworkI18nPattern(e){let t=F.I18N_PATHS;if(!t)return null;let r=e.replace(t.SOURCE_ROOT+"/",""),a=this.resolveFrameworkPackage("@donotdev/core");if(!a)return null;let n=this.normalizePath(k(a,t.PUBLISHED_ROOT,r)),s=n.replace(/\/[^/]*\*.*$/,"");return this.pathExists(s),n}async _globWithNormalization(e,t){return(await ge(e,t)).map(a=>{let n=typeof a=="string"?a:a.path;return this.normalizePath(n)})}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 a=this.getAppRoot(),n=F.getGlobOptionsFor?F.getGlobOptionsFor(t):{ignore:["**/node_modules/**","**/dist/**","**/build/**"]},s=this.normalizePath(a),o=e.framework.map(c=>{let d=this.normalizePath(c);return d.startsWith(s)?d.slice(s.length+1):d}),i=e.consumer.map(c=>{let d=this.normalizePath(c);return d.startsWith(s)?d.slice(s.length+1):d}),f={...n,onlyFiles:!0,absolute:!0,braceExpansion:!0,extglob:!0,globstar:!0,cwd:a};try{let c=o.length>0?await this._globWithNormalization(o,f):[],d=await this._globWithNormalization(i,f);return{frameworkFiles:c,consumerFiles:d}}catch{return this.options.debug,{frameworkFiles:[],consumerFiles:[]}}}async resolvePatterns(e){if(!F.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 a=F.getPatternsFor(e),n=this.isMonorepo();if(e==="i18n"){let i=a,f={eager:i.eager.map(c=>c.startsWith("!")?"!"+this.resolveAppPath(c.slice(1)):this.resolveAppPath(c)),lazy:i.lazy.map(c=>c.startsWith("!")?"!"+this.resolveAppPath(c.slice(1)):this.resolveAppPath(c)),framework:{eager:n?(i.framework?.eager||[]).map(c=>this.resolveRepoPath(c)).filter(Boolean):await Promise.all((i.framework?.eager||[]).map(c=>this._resolveFrameworkI18nPattern(c))).then(c=>c.filter(Boolean)),lazy:n?(i.framework?.lazy||[]).map(c=>this.resolveRepoPath(c)).filter(Boolean):await Promise.all((i.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 s=a,o={framework:n?(s.framework||[]).map(i=>this.resolveRepoPath(i)).filter(Boolean):[],consumer:(s.consumer||[]).map(i=>this.resolveAppPath(i)),all:[]};return o.all=[...o.consumer,...o.framework],o}getEmptyModulePath(){let e=S(me(import.meta.url));return this.normalizePath(k(e,"../vite/empty.js"))}_findRepoRoot(e){let t=this.normalizePath(e),r=0,a=this.options.maxLevels;for(;r<a;){let n=this.normalizePath(k(t,ee.TOOLING)),s=this.normalizePath(k(t,ee.CORE));if(this.pathExists(n)&&this.pathExists(s))return t;let o=k(t,"apps");if(this.pathExists(o)&&this.statSync(o)?.isDirectory())return this.normalizePath(t);let i=this.normalizePath(k(t,"package.json"));if(this.pathExists(i)&&this.normalizePath(S(t))===t)return t;let f=this.normalizePath(S(t));if(f===t)break;t=f,r++}return this.normalizePath(e)}};y();import U from"node:fs";import P from"node:path";import{fileURLToPath as ve}from"node:url";var ye=ve(import.meta.url),We=P.dirname(ye);function te(){let l=v.cwd(),e=10;for(let t=0;t<e;t++){let r=P.join(l,"package.json");if(U.existsSync(r))try{let n=JSON.parse(U.readFileSync(r,"utf8"));if(n.workspaces&&Array.isArray(n.workspaces)&&n.workspaces.some(f=>f==="packages/**"||f.startsWith("packages/"))&&(U.existsSync(P.join(l,"packages","core"))||U.existsSync(P.join(l,"packages","functions"))))return{type:"dndev",root:l}}catch{}let a=P.dirname(l);if(a===l)break;l=a}return{type:"npm",root:v.cwd()}}function be(l){return l.type==="dndev"?l.root:null}function re(l){let e={};if(l.type==="dndev"){let t=be(l);t&&(e["@donotdev/types"]=P.join(t,"packages","core","types","src"),e["@donotdev/functions"]=P.join(t,"packages","functions","src"),e["@donotdev/utils"]=P.join(t,"packages","core","utils","src"),e["@donotdev/schemas"]=P.join(t,"packages","core","schemas","src"),e["@donotdev/core"]=P.join(t,"packages","core"))}return e}function se(l={}){let{entry:e="src/index.ts",outDir:t="lib",minify:r=!1,sourcemap:a=!0,platform:n="firebase",workspace:s,bundleWorkspaceDeps:o=!1,importFramework:i=!1,external:f=!1,...c}=l,d=L.getInstance(),g=re(s),h={entryPoints:[e],bundle:!0,platform:"node",target:"node20",format:"esm",outdir:t,outExtension:{".js":".js"},minify:r,sourcemap:a,metafile:!0,logLevel:"info",loader:{".ts":"ts",".tsx":"tsx",".css":"empty"},keepNames:!0,treeShaking:!0,...c};o&&Object.keys(g).length>0&&(h.alias=Object.fromEntries(Object.entries(g).map(([w,p])=>[w,d.normalizePath(p)]))),h.mainFields=["module","main"],h.conditions=["import","module","node"];let ne=["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"],B=[];if(o)try{let w=s?.root||v.cwd(),p=v.cwd(),R=10;for(let z=0;z<R;z++){let G=d.normalizePath(`${p}/package.json`);if(d.pathExists(G)){let M=d.readSync(G,{format:"json"});if(M&&Array.isArray(M.workspaces)){w=d.normalizePath(p);for(let _ of M.workspaces)_==="apps/*"||_==="functions"||!_.includes("*")&&!_.includes("/")&&B.push(_);break}}let H=d.getDirname(p);if(H===p)break;p=H}}catch{}let ie={name:"external-node-modules",setup(w){w.onResolve({filter:/.*/},p=>{if(p.kind==="entry-point")return null;if(p.path.match(/@donotdev\/functions\/.+/)&&o&&s?.type==="dndev"){let R=p.path.replace("@donotdev/functions/","");return{path:d.normalizePath(`${s.root}/packages/functions/src/${R}/index.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\/.+/)&&o&&s?.type==="dndev"){let R=p.path.replace("@donotdev/core/","");return{path:d.normalizePath(`${s.root}/packages/core/${R}.ts`)}}if(p.path.startsWith("@donotdev/")||p.path==="valibot"||p.path.startsWith("valibot/"))return null;if(B.length>0){let R=p.path.split("/")[0];if(B.includes(R))return null}return p.path.startsWith(".")||p.path.startsWith("/")?null:{path:p.path,external:!0}})}};if(h.external=[...ne,"firebase-admin","firebase-functions"],h.plugins=[ie,...h.plugins||[]],h.define={"process.env.NODE_ENV":JSON.stringify(v.env.NODE_ENV||"production"),...h.define||{}},i&&s.type==="dndev"){let w=s.root,p=d.normalizePath(`${w}/functions/lib`);h.alias={...h.alias,"@donotdev/functions":p}}return n==="framework"&&(h.entryPoints={"firebase/index":"src/firebase/index.ts","vercel/api/index":"src/vercel/api/index.ts","shared/index":"src/shared/index.ts"}),h}function oe(l={}){let{entry:e="src/index.ts",outDir:t="lib",minify:r=!1,sourcemap:a=!0,platform:n="firebase",...s}=l,o=te();return se({entry:e,outDir:t,minify:r,sourcemap:a,platform:n,workspace:o,...s})}function Ke(l={}){return oe({...l,platform:"framework",bundleWorkspaceDeps:!0})}function Ze(l={}){return oe({...l,platform:"firebase",bundleWorkspaceDeps:!0,importFramework:!0})}export{Ze as createAppFunctionsConfig,oe as createFunctionsEsbuildConfig,Ke as createRootFunctionsConfig};
|
|
1
|
+
var Y=(l,e)=>()=>(l&&(e=l(l=0)),e);function V(l,e=null){let t=x[l];if(!t)throw new Error(`Unknown pattern type: ${l}`);return e&&t.framework?{...t,framework:t.framework.map(r=>`${e}/${r}`)}:t}function K(l){return q[l]||q.base}var O,x,q,Z=Y(()=>{"use strict";y();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"},x={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"],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/**"]},q={base:{absolute:!0,onlyFiles:!0,ignore:x.globalIgnore},css:{absolute:!0,onlyFiles:!0,ignore:[...x.globalIgnore,"**/*.test.css"]},routes:{absolute:!0,onlyFiles:!0,ignore:[...x.globalIgnore,"**/*.test.tsx","**/*.stories.tsx"]},i18n:{absolute:!0,onlyFiles:!0,ignore:x.globalIgnore},assets:{absolute:!0,onlyFiles:!0,ignore:x.globalIgnore}}});import{createRequire as ce}from"node:module";import{fileURLToPath as le}from"node:url";import{dirname as ue,resolve as Re}from"node:path";import{Buffer as b}from"node:buffer";import v from"node:process";var pe,E,A,y=Y(()=>{"use strict";pe=ce(import.meta.url),E=le(import.meta.url),A=ue(E);typeof globalThis<"u"&&(globalThis.require=pe,globalThis.__filename=E,globalThis.__dirname=A,globalThis.Buffer=b,globalThis.process=v,typeof global>"u"&&(globalThis.global=globalThis))});y();y();y();import{createRequire as fe}from"node:module";import{resolve as W,join as k,dirname as S,relative as X,normalize as de,sep as Q,extname as he}from"node:path";import{fileURLToPath as me}from"node:url";import*as u from"node:fs";Z();import ge from"fast-glob";var F={getGlobOptionsFor:K||void 0,SCAN_PATTERNS:x||void 0,getPatternsFor:V||void 0,I18N_PATHS:O||void 0},m={error:(l,e)=>{},warn:(l,e)=>{},info:l=>{}};function J(l,e){return l().catch(t=>{throw new Error(`${e}: ${t instanceof Error?t.message:String(t)}`)})}var ee={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"},L=class l{static _instance=null;options;_repoRoot;_appRoot=null;static getInstance(e={}){return l._instance||(l._instance=new l(e)),l._instance}static _reset(){l._instance=null}constructor(e={}){if(l._instance)return l._instance;this.options={maxLevels:e.maxLevels??10,customMarkers:e.customMarkers||[],cache:e.cache??!1,debug:e.debug??!1};try{let t=v.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: ${v.cwd()}`)}this._appRoot=null,l._instance=this}normalizePath(e){if(!e)return"";try{return de(e).split(Q).join("/")}catch{return String(e).split(Q).join("/")}}getRelativePath(e){let t=this.getAppRoot(),r=X(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(S(e)):""}resolvePackage(e,t=null){try{let r=t||this.getAppRoot(),n=fe(k(r,"package.json")).resolve(e);return this.normalizePath(n)}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 s=e.replace("@donotdev/",""),o=this.resolveRepoPath(`packages/${s}`);if(this.pathExists(o))return o;if(["auth","billing","crud","oauth"].includes(s)){let i=this.resolveRepoPath(`packages/features/${s}`);if(this.pathExists(i))return i}if(s==="firebase"){let i=this.resolveRepoPath(`packages/providers/${s}`);if(this.pathExists(i))return i}}let a=this.resolveAppPath(`node_modules/${e}`);if(this.pathExists(a))return a;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(),r=W(t,e);return this.normalizePath(r)}resolveRepoPath(e){let t=this.getRepoRoot(),r=this.normalizePath(e),a=W(t,r);return this.normalizePath(a)}resolvePath(e,t){let r=this.normalizePath(t),a=this.normalizePath(e),n=W(r,a);return this.normalizePath(n)}createImportPath(e){return"./"+this.getRelativePath(e)}getFileInfo(e){try{let t=u.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:he(e).toLowerCase()===".json"?"json":"text"}async read(e,t={}){let{format:r="auto",encoding:a="utf8"}=t,n=this._detectFormat(e,r);try{if(n==="buffer")return await u.promises.readFile(e);let s=await u.promises.readFile(e,a),o=this.stripBom(s);return n==="json"?JSON.parse(o):o}catch(s){return this.options.debug&&m.warn(`Failed to read file: ${e}`,s),null}}readSync(e,t={}){let{format:r="auto",encoding:a="utf8"}=t,n=this._detectFormat(e,r);try{if(n==="buffer")return u.readFileSync(e);let s=u.readFileSync(e,a),o=this.stripBom(s);return n==="json"?JSON.parse(o):o}catch(s){return this.options.debug&&m.warn(`Failed to read file: ${e}`,s),null}}async write(e,t,r={}){let{format:a="auto",overwrite:n=!1,dryRun:s=!1,verbose:o=!1}=r,i=this.normalizePath(e),f=this.normalizePath(S(i)),c=this.pathExists(i);if(c&&!n)return o&&m.info(`Skipping existing file: ${i}`),!1;if(s)return m.info(`[DRY RUN] Would write file: ${i}`),!0;try{await u.promises.mkdir(f,{recursive:!0})}catch(h){if(h?.code!=="EEXIST")throw h}let d=this._detectFormat(e,a),g;b.isBuffer(t)?g=t:d==="json"&&typeof t=="object"?g=JSON.stringify(t,null,2):g=String(t);try{return await J(async()=>(b.isBuffer(g)?await u.promises.writeFile(i,g):await u.promises.writeFile(i,g,"utf8"),o&&m.info(`${c?"Updated":"Created"} file: ${i}`),!0),`Failed to write file: ${i}`)}catch{return!1}}writeSync(e,t,r={}){let{format:a="auto",overwrite:n=!1,dryRun:s=!1,verbose:o=!1}=r,i=this.normalizePath(e),f=this.normalizePath(S(i)),c=this.pathExists(i);if(c&&!n)return o&&m.info(`Skipping existing file: ${i}`),!1;if(s)return m.info(`[DRY RUN] Would write file: ${i}`),!0;try{u.mkdirSync(f,{recursive:!0})}catch(h){if(h?.code!=="EEXIST")throw h}let d=this._detectFormat(e,a),g;b.isBuffer(t)?g=t:d==="json"&&typeof t=="object"?g=JSON.stringify(t,null,2):g=String(t);try{return b.isBuffer(g)?u.writeFileSync(i,g):u.writeFileSync(i,g,"utf8"),o&&m.info(`${c?"Updated":"Created"} file: ${i}`),!0}catch(h){throw new Error(`Failed to write file: ${i}: ${h instanceof Error?h.message:String(h)}`)}}async copy(e,t,r={}){let{overwrite:a=!1,dryRun:n=!1,verbose:s=!1}=r,o=this.normalizePath(t),i=this.pathExists(o);if(i&&!a)return s&&m.info(`Skipping existing file: ${o}`),!1;if(n)return m.info(`[DRY RUN] Would copy file: ${o}`),!0;let f=this.normalizePath(S(o));try{await u.promises.mkdir(f,{recursive:!0})}catch(c){if(c?.code!=="EEXIST")throw c}try{return await J(async()=>(await u.promises.copyFile(e,o),s&&m.info(`${i?"Updated":"Created"} file: ${o}`),!0),`Failed to copy file from ${e} to ${o}`)}catch{return!1}}copySync(e,t,r={}){let{overwrite:a=!1,dryRun:n=!1,verbose:s=!1}=r,o=this.normalizePath(t),i=this.pathExists(o);if(i&&!a)return s&&m.info(`Skipping existing file: ${o}`),!1;if(n)return m.info(`[DRY RUN] Would copy file: ${o}`),!0;let f=this.normalizePath(S(o));try{u.mkdirSync(f,{recursive:!0})}catch(c){if(c?.code!=="EEXIST")throw c}try{return u.copyFileSync(e,o),s&&m.info(`${i?"Updated":"Created"} file: ${o}`),!0}catch{return!1}}pathExists(e,t=!1){try{return u.existsSync(e)}catch(r){return t||m.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 u.existsSync(t)||u.mkdirSync(t,{recursive:!0}),!0}catch{return!1}}readdirSync(e,t){try{return u.readdirSync(e,t)}catch(r){return this.options.debug&&m.warn(`Failed to read directory: ${e}`,r),t&&typeof t=="object"&&"withFileTypes"in t&&t.withFileTypes?[]:[]}}statSync(e){try{return u.statSync(e)}catch(t){return this.options.debug&&m.warn(`Failed to stat file: ${e}`,t),null}}lstatSync(e){try{return u.lstatSync(e)}catch(t){return this.options.debug&&m.warn(`Failed to lstat file: ${e}`,t),null}}async ensureDir(e){try{await u.promises.mkdir(e,{recursive:!0})}catch(t){if(t?.code!=="EEXIST")throw t}}ensureDirSync(e){try{u.mkdirSync(e,{recursive:!0})}catch(t){if(t?.code!=="EEXIST")throw t}}async remove(e){await u.promises.rm(e,{recursive:!0,force:!0})}removeSync(e){u.rmSync(e,{recursive:!0,force:!0})}async readdir(e,t){return u.promises.readdir(e,t)}stripBom(e){return e.charCodeAt(0)===65279?e.slice(1):e}getRepoRoot(){return this._repoRoot||v.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=k(this._repoRoot,"packages");return this.pathExists(e)}isWithinApp(e){let t=this.normalizePath(W(e)),r=this.getAppRoot(),a=X(r,t),n=this.normalizePath(a);return!n.startsWith("../")&&!n.startsWith("/")}async findFiles(e,t,r={}){let a=this.normalizePath(k(e,t)),n=this.getAppRoot(),s=this.normalizePath(n),o=a.startsWith(s)?a.slice(s.length+1):a,i={absolute:!0,onlyFiles:!0,braceExpansion:!0,extglob:!0,globstar:!0,cwd:n,ignore:F.SCAN_PATTERNS?.globalIgnore||["**/node_modules/**","**/dist/**","**/build/**","**/.git/**"]};return await this._globWithNormalization([o],{...i,...r})}clearCache(){}async _resolveFrameworkI18nPattern(e){let t=F.I18N_PATHS;if(!t)return null;let r=e.replace(t.SOURCE_ROOT+"/",""),a=this.resolveFrameworkPackage("@donotdev/core");if(!a)return null;let n=this.normalizePath(k(a,t.PUBLISHED_ROOT,r)),s=n.replace(/\/[^/]*\*.*$/,"");return this.pathExists(s),n}async _globWithNormalization(e,t){return(await ge(e,t)).map(a=>{let n=typeof a=="string"?a:a.path;return this.normalizePath(n)})}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 a=this.getAppRoot(),n=F.getGlobOptionsFor?F.getGlobOptionsFor(t):{ignore:["**/node_modules/**","**/dist/**","**/build/**"]},s=this.normalizePath(a),o=e.framework.map(c=>{let d=this.normalizePath(c);return d.startsWith(s)?d.slice(s.length+1):d}),i=e.consumer.map(c=>{let d=this.normalizePath(c);return d.startsWith(s)?d.slice(s.length+1):d}),f={...n,onlyFiles:!0,absolute:!0,braceExpansion:!0,extglob:!0,globstar:!0,cwd:a};try{let c=o.length>0?await this._globWithNormalization(o,f):[],d=await this._globWithNormalization(i,f);return{frameworkFiles:c,consumerFiles:d}}catch{return this.options.debug,{frameworkFiles:[],consumerFiles:[]}}}async resolvePatterns(e){if(!F.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 a=F.getPatternsFor(e),n=this.isMonorepo();if(e==="i18n"){let i=a,f={eager:i.eager.map(c=>c.startsWith("!")?"!"+this.resolveAppPath(c.slice(1)):this.resolveAppPath(c)),lazy:i.lazy.map(c=>c.startsWith("!")?"!"+this.resolveAppPath(c.slice(1)):this.resolveAppPath(c)),framework:{eager:n?(i.framework?.eager||[]).map(c=>this.resolveRepoPath(c)).filter(Boolean):await Promise.all((i.framework?.eager||[]).map(c=>this._resolveFrameworkI18nPattern(c))).then(c=>c.filter(Boolean)),lazy:n?(i.framework?.lazy||[]).map(c=>this.resolveRepoPath(c)).filter(Boolean):await Promise.all((i.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 s=a,o={framework:n?(s.framework||[]).map(i=>this.resolveRepoPath(i)).filter(Boolean):[],consumer:(s.consumer||[]).map(i=>this.resolveAppPath(i)),all:[]};return o.all=[...o.consumer,...o.framework],o}getEmptyModulePath(e=!1){if(e)return"@donotdev/core/empty";let t=this.resolvePackage("@donotdev/core/empty");if(t)return t;let r=S(me(import.meta.url));return this.normalizePath(k(r,"../empty.js"))}_findRepoRoot(e){let t=this.normalizePath(e),r=0,a=this.options.maxLevels;for(;r<a;){let n=this.normalizePath(k(t,ee.TOOLING)),s=this.normalizePath(k(t,ee.CORE));if(this.pathExists(n)&&this.pathExists(s))return t;let o=k(t,"apps");if(this.pathExists(o)&&this.statSync(o)?.isDirectory())return this.normalizePath(t);let i=this.normalizePath(k(t,"package.json"));if(this.pathExists(i)&&this.normalizePath(S(t))===t)return t;let f=this.normalizePath(S(t));if(f===t)break;t=f,r++}return this.normalizePath(e)}};y();import U from"node:fs";import P from"node:path";import{fileURLToPath as ve}from"node:url";var ye=ve(import.meta.url),We=P.dirname(ye);function te(){let l=v.cwd(),e=10;for(let t=0;t<e;t++){let r=P.join(l,"package.json");if(U.existsSync(r))try{let n=JSON.parse(U.readFileSync(r,"utf8"));if(n.workspaces&&Array.isArray(n.workspaces)&&n.workspaces.some(f=>f==="packages/**"||f.startsWith("packages/"))&&(U.existsSync(P.join(l,"packages","core"))||U.existsSync(P.join(l,"packages","functions"))))return{type:"dndev",root:l}}catch{}let a=P.dirname(l);if(a===l)break;l=a}return{type:"npm",root:v.cwd()}}function be(l){return l.type==="dndev"?l.root:null}function re(l){let e={};if(l.type==="dndev"){let t=be(l);t&&(e["@donotdev/types"]=P.join(t,"packages","core","types","src"),e["@donotdev/functions"]=P.join(t,"packages","functions","src"),e["@donotdev/utils"]=P.join(t,"packages","core","utils","src"),e["@donotdev/schemas"]=P.join(t,"packages","core","schemas","src"),e["@donotdev/core"]=P.join(t,"packages","core"))}return e}function se(l={}){let{entry:e="src/index.ts",outDir:t="lib",minify:r=!1,sourcemap:a=!0,platform:n="firebase",workspace:s,bundleWorkspaceDeps:o=!1,importFramework:i=!1,external:f=!1,...c}=l,d=L.getInstance(),g=re(s),h={entryPoints:[e],bundle:!0,platform:"node",target:"node20",format:"esm",outdir:t,outExtension:{".js":".js"},minify:r,sourcemap:a,metafile:!0,logLevel:"info",loader:{".ts":"ts",".tsx":"tsx",".css":"empty"},keepNames:!0,treeShaking:!0,...c};o&&Object.keys(g).length>0&&(h.alias=Object.fromEntries(Object.entries(g).map(([w,p])=>[w,d.normalizePath(p)]))),h.mainFields=["module","main"],h.conditions=["import","module","node"];let ne=["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"],B=[];if(o)try{let w=s?.root||v.cwd(),p=v.cwd(),R=10;for(let z=0;z<R;z++){let G=d.normalizePath(`${p}/package.json`);if(d.pathExists(G)){let M=d.readSync(G,{format:"json"});if(M&&Array.isArray(M.workspaces)){w=d.normalizePath(p);for(let _ of M.workspaces)_==="apps/*"||_==="functions"||!_.includes("*")&&!_.includes("/")&&B.push(_);break}}let H=d.getDirname(p);if(H===p)break;p=H}}catch{}let ie={name:"external-node-modules",setup(w){w.onResolve({filter:/.*/},p=>{if(p.kind==="entry-point")return null;if(p.path.match(/@donotdev\/functions\/.+/)&&o&&s?.type==="dndev"){let R=p.path.replace("@donotdev/functions/","");return{path:d.normalizePath(`${s.root}/packages/functions/src/${R}/index.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\/.+/)&&o&&s?.type==="dndev"){let R=p.path.replace("@donotdev/core/","");return{path:d.normalizePath(`${s.root}/packages/core/${R}.ts`)}}if(p.path.startsWith("@donotdev/")||p.path==="valibot"||p.path.startsWith("valibot/"))return null;if(B.length>0){let R=p.path.split("/")[0];if(B.includes(R))return null}return p.path.startsWith(".")||p.path.startsWith("/")?null:{path:p.path,external:!0}})}};if(h.external=[...ne,"firebase-admin","firebase-functions"],h.plugins=[ie,...h.plugins||[]],h.define={"process.env.NODE_ENV":JSON.stringify(v.env.NODE_ENV||"production"),...h.define||{}},i&&s.type==="dndev"){let w=s.root,p=d.normalizePath(`${w}/functions/lib`);h.alias={...h.alias,"@donotdev/functions":p}}return n==="framework"&&(h.entryPoints={"firebase/index":"src/firebase/index.ts","vercel/api/index":"src/vercel/api/index.ts","shared/index":"src/shared/index.ts"}),h}function oe(l={}){let{entry:e="src/index.ts",outDir:t="lib",minify:r=!1,sourcemap:a=!0,platform:n="firebase",...s}=l,o=te();return se({entry:e,outDir:t,minify:r,sourcemap:a,platform:n,workspace:o,...s})}function Ve(l={}){return oe({...l,platform:"framework",bundleWorkspaceDeps:!0})}function Ke(l={}){return oe({...l,platform:"firebase",bundleWorkspaceDeps:!0,importFramework:!0})}export{Ke as createAppFunctionsConfig,oe as createFunctionsEsbuildConfig,Ve as createRootFunctionsConfig};
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import { ReactNode,
|
|
3
|
+
import { ReactNode, ReactElement, ComponentType } from 'react';
|
|
4
4
|
export { ReactNode } from 'react';
|
|
5
5
|
import * as zustand from 'zustand';
|
|
6
6
|
import { UseBoundStore, StoreApi as StoreApi$1 } from 'zustand';
|