twenty-sdk 0.3.0-alpha → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -48,6 +48,7 @@ export default defineFunction({
48
48
  // type: 'route',
49
49
  // path: '/${r}',
50
50
  // httpMethod: 'POST',
51
+ // isAuthRequired: true,
51
52
  // },
52
53
  // Cron trigger example:
53
54
  // {
@@ -296,10 +297,10 @@ ${i.join(`
296
297
  ${u.join(`
297
298
  `)}`,r)}return a},Yy=async n=>await Ie.readFile(n,"utf8"),Hy=async(n,i={})=>{try{const r=await Ie.readFile(n,"utf8");return zy(r,i)}catch(r){throw r instanceof uo?new uo(r.message,r.parseErrors,n):new Error(`Failed to read file ${n}: ${r}`)}};class mo extends Error{constructor(i){const r=i.map(a=>` • ${a.path}: ${a.message}`).join(`
298
299
  `);super(`Manifest validation failed:
299
- ${r}`),this.errors=i,this.name="ManifestValidationError"}}const Ky=n=>{const i=[];if(n.application?.universalIdentifier&&i.push({id:n.application.universalIdentifier,location:"application"}),n.application?.applicationVariables)for(const[r,a]of Object.entries(n.application.applicationVariables))a.universalIdentifier&&i.push({id:a.universalIdentifier,location:`application.variables.${r}`});for(const r of n.objects??[]){r.universalIdentifier&&i.push({id:r.universalIdentifier,location:`objects/${r.nameSingular}`});for(const a of r.fields??[])a.universalIdentifier&&i.push({id:a.universalIdentifier,location:`objects/${r.nameSingular}.fields.${a.label}`})}for(const r of n.serverlessFunctions??[]){r.universalIdentifier&&i.push({id:r.universalIdentifier,location:`functions/${r.name??r.handlerName}`});for(const a of r.triggers??[])a.universalIdentifier&&i.push({id:a.universalIdentifier,location:`functions/${r.name??r.handlerName}.triggers.${a.type}`})}for(const r of n.roles??[])r.universalIdentifier&&i.push({id:r.universalIdentifier,location:`roles/${r.label}`});return i},Xy=n=>{const i=new Map;for(const{id:r,location:a}of n){const u=i.get(r)??[];u.push(a),i.set(r,u)}return Array.from(i.entries()).filter(([r,a])=>a.length>1).map(([r,a])=>({id:r,locations:a}))},Zy=(n,i)=>{if(!n){i.push({path:"application",message:"Application config is required"});return}n.universalIdentifier||i.push({path:"application",message:"Application must have a universalIdentifier"})},e_=(n,i)=>{for(const r of n){const a=`objects/${r.nameSingular??"unknown"}`;r.universalIdentifier||i.push({path:a,message:"Object must have a universalIdentifier"}),r.nameSingular||i.push({path:a,message:"Object must have a nameSingular"}),r.namePlural||i.push({path:a,message:"Object must have a namePlural"});for(const u of r.fields??[]){const p=`${a}.fields.${u.label??"unknown"}`;u.universalIdentifier||i.push({path:p,message:"Field must have a universalIdentifier"}),u.type||i.push({path:p,message:"Field must have a type"}),u.label||i.push({path:p,message:"Field must have a label"}),(u.type===kn.s.SELECT||u.type===kn.s.MULTI_SELECT)&&(!u.options||u.options.length===0)&&i.push({path:p,message:"SELECT/MULTI_SELECT field must have options"})}}},t_=(n,i)=>{for(const r of n){const a=`functions/${r.name??r.handlerName??"unknown"}`;r.universalIdentifier||i.push({path:a,message:"Function must have a universalIdentifier"}),(!r.triggers||r.triggers.length===0)&&i.push({path:a,message:"Function must have at least one trigger"});for(const u of r.triggers??[]){const p=`${a}.triggers.${u.type??"unknown"}`;if(u.universalIdentifier||i.push({path:p,message:"Trigger must have a universalIdentifier"}),!u.type){i.push({path:p,message:"Trigger must have a type"});continue}switch(u.type){case"route":u.path||i.push({path:p,message:"Route trigger must have a path"}),u.httpMethod||i.push({path:p,message:"Route trigger must have an httpMethod"});break;case"cron":u.pattern||i.push({path:p,message:"Cron trigger must have a pattern"});break;case"databaseEvent":u.eventName||i.push({path:p,message:"Database event trigger must have an eventName"});break}}}},n_=(n,i)=>{for(const r of n){const a=`roles/${r.label??"unknown"}`;r.universalIdentifier||i.push({path:a,message:"Role must have a universalIdentifier"}),r.label||i.push({path:a,message:"Role must have a label"})}},r_=n=>{const i=[],r=[];Zy(n.application,i),e_(n.objects??[],i),t_(n.serverlessFunctions??[],i),n_(n.roles??[],i);const a=Ky(n),u=Xy(a);for(const p of u)i.push({path:p.locations.join(", "),message:`Duplicate universalIdentifier: ${p.id}`});return(!n.objects||n.objects.length===0)&&r.push({message:"No objects defined in src/app/objects/"}),(!n.serverlessFunctions||n.serverlessFunctions.length===0)&&r.push({message:"No functions defined in src/app/functions/"}),{isValid:i.length===0,errors:i,warnings:r}},i_=async n=>{const i=yt.default.join(n,"src","app");if(!await Ie.pathExists(i))throw new Error(`Missing src/app/ folder in ${n}.
300
- Create it with: mkdir -p src/app`);const r=yt.default.join(n,"src","app","application.config.ts");if(!await Ie.pathExists(r))throw new Error("Missing src/app/application.config.ts")},vo=(n,i)=>ke.relative(i,n).split(ke.sep).join(ke.posix.sep),wr=async(n,i)=>ev.glob(n,{cwd:i,absolute:!0,ignore:["**/node_modules/**","**/*.d.ts","**/dist/**"]}),s_=async n=>{const i=await wr(["src/app/**/*.object.ts"],n),r=[];for(const a of i)try{const u=await go(a);r.push(u)}catch(u){const p=vo(a,n);throw new Error(`Failed to load object from ${p}: ${u instanceof Error?u.message:String(u)}`)}return r},o_=async n=>{const i=await wr(["src/app/**/*.function.ts"],n),r=[];for(const a of i)try{const{config:u,handlerName:p,handlerPath:v}=await Qy(a,n),I=u,N={universalIdentifier:I.universalIdentifier,name:I.name,description:I.description,timeoutSeconds:I.timeoutSeconds,triggers:I.triggers??[],handlerPath:v,handlerName:p};r.push(N)}catch(u){const p=vo(a,n);throw new Error(`Failed to load function from ${p}: ${u instanceof Error?u.message:String(u)}`)}return r},a_=async n=>{const i=await wr(["src/app/**/*.role.ts"],n),r=[];for(const a of i)try{const u=await go(a);r.push(u)}catch(u){const p=vo(a,n);throw new Error(`Failed to load role from ${p}: ${u instanceof Error?u.message:String(u)}`)}return r},u_=async n=>{const i={},r=await wr(["src/**/*.ts"],n);for(const a of r){const p=ke.relative(n,a).split(ke.sep),v=await Ie.readFile(a,"utf8");let I=i;for(let N=0;N<p.length;N++){const R=p[N];N===p.length-1?I[R]=v:(I[R]=I[R]??{},I=I[R])}}return i},c_=async n=>{const i=await wr(["src/**/*.ts"],n),r=/from\s+['"][^'"]*\/generated(?:\/[^'"]*)?['"]|from\s+['"]generated['"]/;for(const a of i){const u=await Ie.readFile(a,"utf8");if(r.test(u))return!0}return!1},mr=async n=>{await i_(n);const i=await Hy(await ac(n,"package.json")),r=await Yy(await ac(n,"yarn.lock")),a=yt.default.join(n,"src","app","application.config.ts"),u=await go(a),[p,v,I,N,R]=await Promise.all([s_(n),o_(n),a_(n),u_(n),c_(n)]),O={application:u,objects:p,serverlessFunctions:v,roles:I,sources:N},M=r_({application:u,objects:p,serverlessFunctions:v,roles:I});if(!M.isValid)throw new mo(M.errors);return{packageJson:i,yarnLock:r,manifest:O,shouldGenerate:R,warnings:M.warnings}};class l_{constructor(){this.apiService=new Vn}async execute({appPath:i=vt,askForConfirmation:r}){try{console.log(F.default.blue("🚀 Uninstall Twenty Application")),console.log(F.default.gray(`📁 App Path: ${i}`)),console.log(""),r&&!await this.confirmationPrompt()&&(console.error(F.default.red("⛔️ Aborting uninstall")),process.exit(1));const{manifest:a}=await mr(i),u=await this.apiService.uninstallApplication(a.application.universalIdentifier);return u.success===!1?console.error(F.default.red("❌ Uninstall failed:"),u.error):console.log(F.default.green("✅ Application uninstalled successfully")),u}catch(a){throw console.error(F.default.red("Uninstall failed:"),a instanceof Error?a.message:a),a}}async confirmationPrompt(){const{confirmation:i}=await $n.default.prompt([{type:"confirm",name:"confirmation",message:"Are you sure you want to uninstall this application?",default:!1}]);return i}}const Yc=n=>{const i=n.application.displayName??"Application";console.log(F.default.green(` ✓ Loaded "${i}"`)),console.log(F.default.green(` ✓ Found ${n.objects.length} object(s)`)),console.log(F.default.green(` ✓ Found ${n.serverlessFunctions.length} function(s)`)),console.log(F.default.green(` ✓ Found ${n.roles?.length??"no"} role(s)`))},Hc=n=>{if(!(!n||n.length===0)){console.log("");for(const i of n){const r=i.path?`${i.path}: `:"";console.log(F.default.yellow(` ⚠ ${r}${i.message}`))}}},Kc=n=>{console.log(F.default.red(`
300
+ ${r}`),this.errors=i,this.name="ManifestValidationError"}}const Ky=n=>{const i=[];if(n.application?.universalIdentifier&&i.push({id:n.application.universalIdentifier,location:"application"}),n.application?.applicationVariables)for(const[r,a]of Object.entries(n.application.applicationVariables))a.universalIdentifier&&i.push({id:a.universalIdentifier,location:`application.variables.${r}`});for(const r of n.objects??[]){r.universalIdentifier&&i.push({id:r.universalIdentifier,location:`objects/${r.nameSingular}`});for(const a of r.fields??[])a.universalIdentifier&&i.push({id:a.universalIdentifier,location:`objects/${r.nameSingular}.fields.${a.label}`})}for(const r of n.serverlessFunctions??[]){r.universalIdentifier&&i.push({id:r.universalIdentifier,location:`functions/${r.name??r.handlerName}`});for(const a of r.triggers??[])a.universalIdentifier&&i.push({id:a.universalIdentifier,location:`functions/${r.name??r.handlerName}.triggers.${a.type}`})}for(const r of n.roles??[])r.universalIdentifier&&i.push({id:r.universalIdentifier,location:`roles/${r.label}`});return i},Xy=n=>{const i=new Map;for(const{id:r,location:a}of n){const u=i.get(r)??[];u.push(a),i.set(r,u)}return Array.from(i.entries()).filter(([r,a])=>a.length>1).map(([r,a])=>({id:r,locations:a}))},Zy=(n,i)=>{if(!n){i.push({path:"application",message:"Application config is required"});return}n.universalIdentifier||i.push({path:"application",message:"Application must have a universalIdentifier"})},e_=(n,i)=>{for(const r of n){const a=`objects/${r.nameSingular??"unknown"}`;r.universalIdentifier||i.push({path:a,message:"Object must have a universalIdentifier"}),r.nameSingular||i.push({path:a,message:"Object must have a nameSingular"}),r.namePlural||i.push({path:a,message:"Object must have a namePlural"});for(const u of r.fields??[]){const p=`${a}.fields.${u.label??"unknown"}`;u.universalIdentifier||i.push({path:p,message:"Field must have a universalIdentifier"}),u.type||i.push({path:p,message:"Field must have a type"}),u.label||i.push({path:p,message:"Field must have a label"}),(u.type===kn.s.SELECT||u.type===kn.s.MULTI_SELECT)&&(!u.options||u.options.length===0)&&i.push({path:p,message:"SELECT/MULTI_SELECT field must have options"})}}},t_=(n,i)=>{for(const r of n){const a=`functions/${r.name??r.handlerName??"unknown"}`;r.universalIdentifier||i.push({path:a,message:"Function must have a universalIdentifier"});for(const u of r.triggers??[]){const p=`${a}.triggers.${u.type??"unknown"}`;if(u.universalIdentifier||i.push({path:p,message:"Trigger must have a universalIdentifier"}),!u.type){i.push({path:p,message:"Trigger must have a type"});continue}switch(u.type){case"route":u.path||i.push({path:p,message:"Route trigger must have a path"}),u.httpMethod||i.push({path:p,message:"Route trigger must have an httpMethod"});break;case"cron":u.pattern||i.push({path:p,message:"Cron trigger must have a pattern"});break;case"databaseEvent":u.eventName||i.push({path:p,message:"Database event trigger must have an eventName"});break}}}},n_=(n,i)=>{for(const r of n){const a=`roles/${r.label??"unknown"}`;r.universalIdentifier||i.push({path:a,message:"Role must have a universalIdentifier"}),r.label||i.push({path:a,message:"Role must have a label"})}},r_=n=>{const i=[],r=[];Zy(n.application,i),e_(n.objects??[],i),t_(n.serverlessFunctions??[],i),n_(n.roles??[],i);const a=Ky(n),u=Xy(a);for(const p of u)i.push({path:p.locations.join(", "),message:`Duplicate universalIdentifier: ${p.id}`});return(!n.objects||n.objects.length===0)&&r.push({message:"No objects defined in src/app/objects/"}),(!n.serverlessFunctions||n.serverlessFunctions.length===0)&&r.push({message:"No functions defined in src/app/functions/"}),{isValid:i.length===0,errors:i,warnings:r}},i_=async n=>{const i=yt.default.join(n,"src","app");if(!await Ie.pathExists(i))throw new Error(`Missing src/app/ folder in ${n}.
301
+ Create it with: mkdir -p src/app`);const r=yt.default.join(n,"src","app","application.config.ts");if(!await Ie.pathExists(r))throw new Error("Missing src/app/application.config.ts")},vo=(n,i)=>ke.relative(i,n).split(ke.sep).join(ke.posix.sep),wr=async(n,i)=>ev.glob(n,{cwd:i,absolute:!0,ignore:["**/node_modules/**","**/*.d.ts","**/dist/**"]}),s_=async n=>{const i=await wr(["src/app/**/*.object.ts"],n),r=[];for(const a of i)try{const u=await go(a);r.push(u)}catch(u){const p=vo(a,n);throw new Error(`Failed to load object from ${p}: ${u instanceof Error?u.message:String(u)}`)}return r},o_=async n=>{const i=await wr(["src/app/**/*.function.ts"],n),r=[];for(const a of i)try{const{config:u,handlerName:p,handlerPath:v}=await Qy(a,n),I=u,N={universalIdentifier:I.universalIdentifier,name:I.name,description:I.description,timeoutSeconds:I.timeoutSeconds,triggers:I.triggers??[],handlerPath:v,handlerName:p};r.push(N)}catch(u){const p=vo(a,n);throw new Error(`Failed to load function from ${p}: ${u instanceof Error?u.message:String(u)}`)}return r},a_=async n=>{const i=await wr(["src/app/**/*.role.ts"],n),r=[];for(const a of i)try{const u=await go(a);r.push(u)}catch(u){const p=vo(a,n);throw new Error(`Failed to load role from ${p}: ${u instanceof Error?u.message:String(u)}`)}return r},u_=async n=>{const i={},r=await wr(["src/**/*.ts","generated/**/*.ts"],n);for(const a of r){const p=ke.relative(n,a).split(ke.sep),v=await Ie.readFile(a,"utf8");let I=i;for(let N=0;N<p.length;N++){const R=p[N];N===p.length-1?I[R]=v:(I[R]=I[R]??{},I=I[R])}}return i},c_=async n=>{const i=await wr(["src/**/*.ts"],n),r=/from\s+['"][^'"]*\/generated(?:\/[^'"]*)?['"]|from\s+['"]generated['"]/;for(const a of i){const u=await Ie.readFile(a,"utf8");if(r.test(u))return!0}return!1},mr=async n=>{await i_(n);const i=await Hy(await ac(n,"package.json")),r=await Yy(await ac(n,"yarn.lock")),a=yt.default.join(n,"src","app","application.config.ts"),u=await go(a),[p,v,I,N,R]=await Promise.all([s_(n),o_(n),a_(n),u_(n),c_(n)]),O={application:u,objects:p,serverlessFunctions:v,roles:I,sources:N},M=r_({application:u,objects:p,serverlessFunctions:v,roles:I});if(!M.isValid)throw new mo(M.errors);return{packageJson:i,yarnLock:r,manifest:O,shouldGenerate:R,warnings:M.warnings}};class l_{constructor(){this.apiService=new Vn}async execute({appPath:i=vt,askForConfirmation:r}){try{console.log(F.default.blue("🚀 Uninstall Twenty Application")),console.log(F.default.gray(`📁 App Path: ${i}`)),console.log(""),r&&!await this.confirmationPrompt()&&(console.error(F.default.red("⛔️ Aborting uninstall")),process.exit(1));const{manifest:a}=await mr(i),u=await this.apiService.uninstallApplication(a.application.universalIdentifier);return u.success===!1?console.error(F.default.red("❌ Uninstall failed:"),u.error):console.log(F.default.green("✅ Application uninstalled successfully")),u}catch(a){throw console.error(F.default.red("Uninstall failed:"),a instanceof Error?a.message:a),a}}async confirmationPrompt(){const{confirmation:i}=await $n.default.prompt([{type:"confirm",name:"confirmation",message:"Are you sure you want to uninstall this application?",default:!1}]);return i}}const Yc=n=>{const i=n.application.displayName??"Application";console.log(F.default.green(` ✓ Loaded "${i}"`)),console.log(F.default.green(` ✓ Found ${n.objects.length} object(s)`)),console.log(F.default.green(` ✓ Found ${n.serverlessFunctions.length} function(s)`)),console.log(F.default.green(` ✓ Found ${n.roles?.length??"no"} role(s)`))},Hc=n=>{if(!(!n||n.length===0)){console.log("");for(const i of n){const r=i.path?`${i.path}: `:"";console.log(F.default.yellow(` ⚠ ${r}${i.message}`))}}},Kc=n=>{console.log(F.default.red(`
301
302
  ✗ Manifest validation failed:
302
- `));for(const i of n.errors)console.log(F.default.red(` • ${i.path}: ${i.message}`));console.log("")};class f_{constructor(){this.apiService=new Vn}async execute(i){try{const r=i.appPath??vt,a=parseInt(i.debounce,10);this.logStartupInfo(r,a),await this.synchronize(r);const u=this.setupFileWatcher(r,a);this.setupGracefulShutdown(u)}catch(r){console.error(F.default.red("Development mode failed:"),r instanceof Error?r.message:r),process.exit(1)}}async synchronize(i){try{const{manifest:r,packageJson:a,yarnLock:u,warnings:p}=await mr(i);Yc(r),Hc(p),await this.apiService.syncApplication({manifest:r,packageJson:a,yarnLock:u}),console.log(F.default.green(" ✓ Synced with server"))}catch(r){throw r instanceof mo&&Kc(r),r}}logStartupInfo(i,r){console.log(F.default.blue("🚀 Starting Twenty Application Development Mode")),console.log(F.default.gray(`📁 App Path: ${i}`)),console.log(F.default.gray(`⏱️ Debounce: ${r}ms`)),console.log("")}setupFileWatcher(i,r){const a=uv.watch(i,{ignored:/node_modules|\.git/,persistent:!0});let u=null;const p=()=>{u&&clearTimeout(u),u=setTimeout(async()=>{console.log(F.default.blue("🔄 Changes detected, syncing...")),await this.synchronize(i),console.log(F.default.gray("👀 Watching for changes... (Press Ctrl+C to stop)"))},r)};return a.on("change",()=>{p()}),console.log(F.default.gray("👀 Watching for changes... (Press Ctrl+C to stop)")),a}setupGracefulShutdown(i){process.on("SIGINT",()=>{console.log(F.default.yellow(`
303
+ `));for(const i of n.errors)console.log(F.default.red(` • ${i.path}: ${i.message}`));console.log("")};class f_{constructor(){this.apiService=new Vn}async execute(i){const r=i.appPath??vt,a=parseInt(i.debounce,10);this.logStartupInfo(r,a),await this.synchronize(r);const u=this.setupFileWatcher(r,a);this.setupGracefulShutdown(u)}async synchronize(i){try{const{manifest:r,packageJson:a,yarnLock:u,warnings:p}=await mr(i);Yc(r),Hc(p),await this.apiService.syncApplication({manifest:r,packageJson:a,yarnLock:u}),console.log(F.default.green(" ✓ Synced with server"))}catch(r){r instanceof mo?Kc(r):console.error(F.default.red(" ✗ Sync failed:"),r instanceof Error?r.message:r)}}logStartupInfo(i,r){console.log(F.default.blue("🚀 Starting Twenty Application Development Mode")),console.log(F.default.gray(`📁 App Path: ${i}`)),console.log(F.default.gray(`⏱️ Debounce: ${r}ms`)),console.log("")}setupFileWatcher(i,r){const a=uv.watch(i,{ignored:/node_modules|\.git/,persistent:!0});let u=null;const p=()=>{u&&clearTimeout(u),u=setTimeout(async()=>{console.log(F.default.blue("🔄 Changes detected, syncing...")),await this.synchronize(i),console.log(F.default.gray("👀 Watching for changes... (Press Ctrl+C to stop)"))},r)};return a.on("change",()=>{p()}),console.log(F.default.gray("👀 Watching for changes... (Press Ctrl+C to stop)")),a}setupGracefulShutdown(i){process.on("SIGINT",()=>{console.log(F.default.yellow(`
303
304
  🛑 Stopping development mode...`)),i.close(),process.exit(0)})}}const p_="TWENTY_API_KEY",h_="TWENTY_API_URL",d_="generated";class Xc{constructor(){this.configService=new At,this.apiService=new Vn}async generateClient(i){const r=ke.join(i,d_);console.log(F.default.blue("📦 Generating Twenty client...")),console.log(F.default.gray(`📁 Output Path: ${r}`)),console.log("");const a=await this.configService.getConfig(),u=a.apiUrl,p=a.apiKey;if(!u||!p){console.log(F.default.yellow("⚠️ Skipping Client generation: API URL or token not configured"));return}console.log(F.default.gray(`API URL: ${u}`)),console.log(F.default.gray(`Output: ${r}`));const v=await this.apiService.getSchema();if(!v.success)return;const{data:I}=v,N=ke.resolve(r);await sv.generate({schema:I,output:N,scalarTypes:{DateTime:"string",JSON:"Record<string, unknown>",UUID:"string"}}),await this.injectTwentyClient(N),console.log(F.default.green("✓ Client generated successfully!")),console.log(F.default.gray(`Generated files at: ${r}`))}async injectTwentyClient(i){const r=`
304
305
 
305
306
  // ----------------------------------------------------
@@ -339,4 +340,4 @@ export default class Twenty {
339
340
  }
340
341
  }
341
342
 
342
- `;await Ie.appendFile(ke.join(i,"index.ts"),r)}}class g_{constructor(){this.apiService=new Vn,this.generateService=new Xc}async execute(i=vt){try{return console.log(F.default.blue("🚀 Syncing Twenty Application")),console.log(F.default.gray(`📁 App Path: ${i}`)),console.log(""),await this.synchronize({appPath:i})}catch(r){throw console.error(F.default.red("Sync failed:"),r instanceof Error?r.message:r),r}}async synchronize({appPath:i}){try{const{manifest:r,packageJson:a,yarnLock:u,shouldGenerate:p,warnings:v}=await mr(i);Yc(r),Hc(v);let I=await this.apiService.syncApplication({manifest:r,packageJson:a,yarnLock:u});if(p){await this.generateService.generateClient(i);const{manifest:N}=await mr(i);I=await this.apiService.syncApplication({manifest:N,packageJson:a,yarnLock:u})}return I.success===!1?console.error(F.default.red("❌ Serverless functions Sync failed:"),I.error):console.log(F.default.green("✅ Serverless functions synced successfully")),I}catch(r){throw r instanceof mo&&Kc(r),r}}}const Fn=n=>n&&!n?.startsWith("/")?ke.join(vt,n):n;class m_{constructor(){this.generateService=new Xc}async execute(i=vt){try{await this.generateService.generateClient(i)}catch(r){throw console.error(F.default.red("Generate Twenty client failed:"),r instanceof Error?r.message:r),r}}}class v_{constructor(){this.apiService=new Vn}async execute({appPath:i=vt,functionUniversalIdentifier:r,functionName:a}){try{const{manifest:u}=await mr(i);this.logWatchInfo({appName:u.application.displayName,functionUniversalIdentifier:r,functionName:a}),await this.apiService.subscribeToLogs({applicationUniversalIdentifier:u.application.universalIdentifier,functionUniversalIdentifier:r,functionName:a})}catch(u){console.error(F.default.red("Watch logs failed:"),u instanceof Error?u.message:u),process.exit(1)}}logWatchInfo({appName:i,functionUniversalIdentifier:r,functionName:a}){const u=i??"Twenty Application",p=r||a?`function "${r||a}"`:"functions";console.log(F.default.blue(`🚀 Watching ${u} ${p} logs:`)),console.log("")}}class y_{constructor(){this.devCommand=new f_,this.syncCommand=new g_,this.uninstallCommand=new l_,this.addCommand=new vv,this.generateCommand=new m_,this.logsCommand=new v_}getCommand(){const i=new Ii.Command("app");return i.description("Application development commands"),i.command("dev [appPath]").description("Watch and sync local application changes").option("-d, --debounce <ms>","Debounce delay in milliseconds","1000").action(async(r,a)=>{await this.devCommand.execute({...a,appPath:Fn(r)})}),i.command("sync [appPath]").description("Sync application to Twenty").action(async r=>{try{(await this.syncCommand.execute(Fn(r))).success||process.exit(1)}catch{process.exit(1)}}),i.command("uninstall [appPath]").description("Uninstall application from Twenty").action(async r=>{try{(await this.uninstallCommand.execute({appPath:Fn(r),askForConfirmation:!0})).success||process.exit(1)}catch{process.exit(1)}}),i.command("delete [appPath]",{hidden:!0}).description("Delete application from Twenty").action(async r=>{try{(await this.uninstallCommand.execute({appPath:Fn(r),askForConfirmation:!0})).success||process.exit(1)}catch{process.exit(1)}}),i.command("add [entityType]").option("--path <path>","Path in which the entity should be created.").description(`Add a new entity to your application (${Object.values(wi).join("|")})`).action(async(r,a)=>{r&&!mv(r)&&(console.error(F.default.red(`Invalid entity type "${r}". Must be one of: ${Object.values(wi).join("|")}`)),process.exit(1)),await this.addCommand.execute(r,a?.path)}),i.command("generate [appPath]").description("Generate Twenty client").action(async r=>{await this.generateCommand.execute(Fn(r))}),i.command("logs [appPath]").option("-u, --functionUniversalIdentifier <functionUniversalIdentifier>","Only show logs for the function with this universal ID").option("-n, --functionName <functionName>","Only show logs for the function with this name").description("Watch application function logs").action(async(r,a)=>{await this.logsCommand.execute({...a,appPath:Fn(r)})}),i}}class __{constructor(){this.configService=new At,this.apiService=new Vn}getCommand(){const i=new Ii.Command("auth");return i.description("Authentication commands"),i.command("login").description("Authenticate with Twenty").option("--api-key <key>","API key for authentication").option("--api-url <url>","Twenty API URL").action(async r=>{await this.login(r)}),i.command("logout").description("Remove authentication credentials").action(async()=>{await this.logout()}),i.command("status").description("Check authentication status").action(async()=>{await this.status()}),i}async login(i){try{let{apiKey:r,apiUrl:a}=i;const u=await this.configService.getConfig();if(a||(a=(await $n.default.prompt([{type:"input",name:"apiUrl",message:"Twenty API URL:",default:u.apiUrl,validate:I=>{try{return new URL(I),!0}catch{return"Please enter a valid URL"}}}])).apiUrl),r||(r=(await $n.default.prompt([{type:"password",name:"apiKey",message:"API Key:",mask:"*",validate:I=>I.length>0||"API key is required"}])).apiKey),await this.configService.setConfig({apiUrl:a,apiKey:r}),await this.apiService.validateAuth()){const v=At.getActiveWorkspace();console.log(F.default.green(`✓ Successfully authenticated with Twenty (workspace: ${v})`))}else console.log(F.default.red("✗ Authentication failed. Please check your credentials.")),process.exit(1)}catch(r){console.error(F.default.red("Login failed:"),r instanceof Error?r.message:r),process.exit(1)}}async logout(){try{await this.configService.clearConfig();const i=At.getActiveWorkspace();console.log(F.default.green(`✓ Successfully logged out (workspace: ${i})`))}catch(i){console.error(F.default.red("Logout failed:"),i instanceof Error?i.message:i),process.exit(1)}}async status(){try{const i=At.getActiveWorkspace(),r=await this.configService.getConfig();if(console.log(F.default.blue("Authentication Status:")),console.log(`Workspace: ${i}`),console.log(`API URL: ${r.apiUrl}`),console.log(`API Key: ${r.apiKey?"***"+r.apiKey.slice(-4):"Not set"}`),r.apiKey){const a=await this.apiService.validateAuth();console.log(`Status: ${a?F.default.green("✓ Valid"):F.default.red("✗ Invalid")}`)}else console.log(`Status: ${F.default.yellow("⚠ Not authenticated")}`)}catch(i){console.error(F.default.red("Status check failed:"),i instanceof Error?i.message:i),process.exit(1)}}}const T_="0.3.0-alpha",w_={version:T_},vn=new Ii.Command;vn.name("twenty").description("CLI for Twenty application development").version(w_.version);vn.option("--workspace <name>","Use a specific workspace configuration","default");vn.hook("preAction",n=>{const r=(n.optsWithGlobals?n.optsWithGlobals():n.opts()).workspace;At.setActiveWorkspace(r),console.log(F.default.gray(`👩‍💻 Workspace - ${At.getActiveWorkspace()}`))});vn.addCommand(new __().getCommand());vn.addCommand(new y_().getCommand());vn.exitOverride();try{vn.parse()}catch(n){n instanceof Ii.CommanderError&&process.exit(n.exitCode),n instanceof Error&&(console.error(F.default.red("Error:"),n.message),process.exit(1))}
343
+ `;await Ie.appendFile(ke.join(i,"index.ts"),r)}}class g_{constructor(){this.apiService=new Vn,this.generateService=new Xc}async execute(i=vt){try{return console.log(F.default.blue("🚀 Syncing Twenty Application")),console.log(F.default.gray(`📁 App Path: ${i}`)),console.log(""),await this.synchronize({appPath:i})}catch(r){throw console.error(F.default.red("Sync failed:"),r instanceof Error?r.message:r),r}}async synchronize({appPath:i}){try{const{manifest:r,packageJson:a,yarnLock:u,shouldGenerate:p,warnings:v}=await mr(i);Yc(r),Hc(v);let I=await this.apiService.syncApplication({manifest:r,packageJson:a,yarnLock:u});if(p){await this.generateService.generateClient(i);const{manifest:N}=await mr(i);I=await this.apiService.syncApplication({manifest:N,packageJson:a,yarnLock:u})}return I.success===!1?console.error(F.default.red("❌ Serverless functions Sync failed:"),I.error):console.log(F.default.green("✅ Serverless functions synced successfully")),I}catch(r){throw r instanceof mo&&Kc(r),r}}}const Fn=n=>n&&!n?.startsWith("/")?ke.join(vt,n):n;class m_{constructor(){this.generateService=new Xc}async execute(i=vt){try{await this.generateService.generateClient(i)}catch(r){throw console.error(F.default.red("Generate Twenty client failed:"),r instanceof Error?r.message:r),r}}}class v_{constructor(){this.apiService=new Vn}async execute({appPath:i=vt,functionUniversalIdentifier:r,functionName:a}){try{const{manifest:u}=await mr(i);this.logWatchInfo({appName:u.application.displayName,functionUniversalIdentifier:r,functionName:a}),await this.apiService.subscribeToLogs({applicationUniversalIdentifier:u.application.universalIdentifier,functionUniversalIdentifier:r,functionName:a})}catch(u){console.error(F.default.red("Watch logs failed:"),u instanceof Error?u.message:u),process.exit(1)}}logWatchInfo({appName:i,functionUniversalIdentifier:r,functionName:a}){const u=i??"Twenty Application",p=r||a?`function "${r||a}"`:"functions";console.log(F.default.blue(`🚀 Watching ${u} ${p} logs:`)),console.log("")}}class y_{constructor(){this.devCommand=new f_,this.syncCommand=new g_,this.uninstallCommand=new l_,this.addCommand=new vv,this.generateCommand=new m_,this.logsCommand=new v_}getCommand(){const i=new Ii.Command("app");return i.description("Application development commands"),i.command("dev [appPath]").description("Watch and sync local application changes").option("-d, --debounce <ms>","Debounce delay in milliseconds","1000").action(async(r,a)=>{await this.devCommand.execute({...a,appPath:Fn(r)})}),i.command("sync [appPath]").description("Sync application to Twenty").action(async r=>{try{(await this.syncCommand.execute(Fn(r))).success||process.exit(1)}catch{process.exit(1)}}),i.command("uninstall [appPath]").description("Uninstall application from Twenty").action(async r=>{try{(await this.uninstallCommand.execute({appPath:Fn(r),askForConfirmation:!0})).success||process.exit(1)}catch{process.exit(1)}}),i.command("delete [appPath]",{hidden:!0}).description("Delete application from Twenty").action(async r=>{try{(await this.uninstallCommand.execute({appPath:Fn(r),askForConfirmation:!0})).success||process.exit(1)}catch{process.exit(1)}}),i.command("add [entityType]").option("--path <path>","Path in which the entity should be created.").description(`Add a new entity to your application (${Object.values(wi).join("|")})`).action(async(r,a)=>{r&&!mv(r)&&(console.error(F.default.red(`Invalid entity type "${r}". Must be one of: ${Object.values(wi).join("|")}`)),process.exit(1)),await this.addCommand.execute(r,a?.path)}),i.command("generate [appPath]").description("Generate Twenty client").action(async r=>{await this.generateCommand.execute(Fn(r))}),i.command("logs [appPath]").option("-u, --functionUniversalIdentifier <functionUniversalIdentifier>","Only show logs for the function with this universal ID").option("-n, --functionName <functionName>","Only show logs for the function with this name").description("Watch application function logs").action(async(r,a)=>{await this.logsCommand.execute({...a,appPath:Fn(r)})}),i}}class __{constructor(){this.configService=new At,this.apiService=new Vn}getCommand(){const i=new Ii.Command("auth");return i.description("Authentication commands"),i.command("login").description("Authenticate with Twenty").option("--api-key <key>","API key for authentication").option("--api-url <url>","Twenty API URL").action(async r=>{await this.login(r)}),i.command("logout").description("Remove authentication credentials").action(async()=>{await this.logout()}),i.command("status").description("Check authentication status").action(async()=>{await this.status()}),i}async login(i){try{let{apiKey:r,apiUrl:a}=i;const u=await this.configService.getConfig();if(a||(a=(await $n.default.prompt([{type:"input",name:"apiUrl",message:"Twenty API URL:",default:u.apiUrl,validate:I=>{try{return new URL(I),!0}catch{return"Please enter a valid URL"}}}])).apiUrl),r||(r=(await $n.default.prompt([{type:"password",name:"apiKey",message:"API Key:",mask:"*",validate:I=>I.length>0||"API key is required"}])).apiKey),await this.configService.setConfig({apiUrl:a,apiKey:r}),await this.apiService.validateAuth()){const v=At.getActiveWorkspace();console.log(F.default.green(`✓ Successfully authenticated with Twenty (workspace: ${v})`))}else console.log(F.default.red("✗ Authentication failed. Please check your credentials.")),process.exit(1)}catch(r){console.error(F.default.red("Login failed:"),r instanceof Error?r.message:r),process.exit(1)}}async logout(){try{await this.configService.clearConfig();const i=At.getActiveWorkspace();console.log(F.default.green(`✓ Successfully logged out (workspace: ${i})`))}catch(i){console.error(F.default.red("Logout failed:"),i instanceof Error?i.message:i),process.exit(1)}}async status(){try{const i=At.getActiveWorkspace(),r=await this.configService.getConfig();if(console.log(F.default.blue("Authentication Status:")),console.log(`Workspace: ${i}`),console.log(`API URL: ${r.apiUrl}`),console.log(`API Key: ${r.apiKey?"***"+r.apiKey.slice(-4):"Not set"}`),r.apiKey){const a=await this.apiService.validateAuth();console.log(`Status: ${a?F.default.green("✓ Valid"):F.default.red("✗ Invalid")}`)}else console.log(`Status: ${F.default.yellow("⚠ Not authenticated")}`)}catch(i){console.error(F.default.red("Status check failed:"),i instanceof Error?i.message:i),process.exit(1)}}}const T_="0.3.0",w_={version:T_},vn=new Ii.Command;vn.name("twenty").description("CLI for Twenty application development").version(w_.version);vn.option("--workspace <name>","Use a specific workspace configuration","default");vn.hook("preAction",n=>{const r=(n.optsWithGlobals?n.optsWithGlobals():n.opts()).workspace;At.setActiveWorkspace(r),console.log(F.default.gray(`👩‍💻 Workspace - ${At.getActiveWorkspace()}`))});vn.addCommand(new __().getCommand());vn.addCommand(new y_().getCommand());vn.exitOverride();try{vn.parse()}catch(n){n instanceof Ii.CommanderError&&process.exit(n.exitCode),n instanceof Error&&(console.error(F.default.red("Error:"),n.message),process.exit(1))}
package/dist/cli.mjs CHANGED
@@ -74,6 +74,7 @@ export default defineFunction({
74
74
  // type: 'route',
75
75
  // path: '/${r}',
76
76
  // httpMethod: 'POST',
77
+ // isAuthRequired: true,
77
78
  // },
78
79
  // Cron trigger example:
79
80
  // {
@@ -9155,9 +9156,6 @@ const Qy = (t) => {
9155
9156
  r.universalIdentifier || i.push({
9156
9157
  path: a,
9157
9158
  message: "Function must have a universalIdentifier"
9158
- }), (!r.triggers || r.triggers.length === 0) && i.push({
9159
- path: a,
9160
- message: "Function must have at least one trigger"
9161
9159
  });
9162
9160
  for (const u of r.triggers ?? []) {
9163
9161
  const p = `${a}.triggers.${u.type ?? "unknown"}`;
@@ -9290,7 +9288,10 @@ Create it with: mkdir -p src/app`
9290
9288
  }
9291
9289
  return r;
9292
9290
  }, i_ = async (t) => {
9293
- const i = {}, r = await _r(["src/**/*.ts"], t);
9291
+ const i = {}, r = await _r(
9292
+ ["src/**/*.ts", "generated/**/*.ts"],
9293
+ t
9294
+ );
9294
9295
  for (const a of r) {
9295
9296
  const p = ac(t, a).split(uc), v = await Ie.readFile(a, "utf8");
9296
9297
  let I = i;
@@ -9408,17 +9409,10 @@ class a_ {
9408
9409
  this.apiService = new Gt();
9409
9410
  }
9410
9411
  async execute(i) {
9411
- try {
9412
- const r = i.appPath ?? vn, a = parseInt(i.debounce, 10);
9413
- this.logStartupInfo(r, a), await this.synchronize(r);
9414
- const u = this.setupFileWatcher(r, a);
9415
- this.setupGracefulShutdown(u);
9416
- } catch (r) {
9417
- console.error(
9418
- F.red("Development mode failed:"),
9419
- r instanceof Error ? r.message : r
9420
- ), process.exit(1);
9421
- }
9412
+ const r = i.appPath ?? vn, a = parseInt(i.debounce, 10);
9413
+ this.logStartupInfo(r, a), await this.synchronize(r);
9414
+ const u = this.setupFileWatcher(r, a);
9415
+ this.setupGracefulShutdown(u);
9422
9416
  }
9423
9417
  async synchronize(i) {
9424
9418
  try {
@@ -9429,7 +9423,10 @@ class a_ {
9429
9423
  yarnLock: u
9430
9424
  }), console.log(F.green(" ✓ Synced with server"));
9431
9425
  } catch (r) {
9432
- throw r instanceof ho && Xc(r), r;
9426
+ r instanceof ho ? Xc(r) : console.error(
9427
+ F.red(" ✗ Sync failed:"),
9428
+ r instanceof Error ? r.message : r
9429
+ );
9433
9430
  }
9434
9431
  }
9435
9432
  logStartupInfo(i, r) {
@@ -9793,7 +9790,7 @@ class g_ {
9793
9790
  }
9794
9791
  }
9795
9792
  }
9796
- const m_ = "0.3.0-alpha", v_ = {
9793
+ const m_ = "0.3.0", v_ = {
9797
9794
  version: m_
9798
9795
  }, vt = new oo();
9799
9796
  vt.name("twenty").description("CLI for Twenty application development").version(v_.version);
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./ObjectRecordGroupByDateGranularity-CtpRADP1-Duv5iOeZ.js");require("lodash.camelcase");const M=a=>{if(!a.universalIdentifier)throw new Error("App must have a universalIdentifier");return a};var D=(a=>(a.CASCADE="CASCADE",a.RESTRICT="RESTRICT",a.SET_NULL="SET_NULL",a.NO_ACTION="NO_ACTION",a))(D||{}),H=(a=>(a.MANY_TO_ONE="MANY_TO_ONE",a.ONE_TO_MANY="ONE_TO_MANY",a))(H||{});const G=a=>()=>{},F=a=>()=>{},N=a=>{if(!a.universalIdentifier)throw new Error("Function must have a universalIdentifier");if(typeof a.handler!="function")throw new Error("Function must have a handler");if(!a.triggers||a.triggers.length===0)throw new Error("Function must have at least one trigger");for(const i of a.triggers){if(!i.universalIdentifier)throw new Error("Each trigger must have a universalIdentifier");if(!i.type)throw new Error("Each trigger must have a type");switch(i.type){case"route":if(!i.path)throw new Error("Route trigger must have a path");if(!i.httpMethod)throw new Error("Route trigger must have an httpMethod");break;case"cron":if(!i.pattern)throw new Error("Cron trigger must have a pattern");break;case"databaseEvent":if(!i.eventName)throw new Error("Database event trigger must have an eventName");break;default:throw new Error(`Unknown trigger type: ${i.type}`)}}return a},P=a=>{if(!a.universalIdentifier)throw new Error("Object must have a universalIdentifier");if(!a.nameSingular)throw new Error("Object must have a nameSingular");if(!a.namePlural)throw new Error("Object must have a namePlural");if(!a.labelSingular)throw new Error("Object must have a labelSingular");if(!a.labelPlural)throw new Error("Object must have a labelPlural");if(!a.fields||a.fields.length===0)throw new Error("Object must have at least one field");for(const i of a.fields){if(!i.universalIdentifier)throw new Error(`Field "${i.label}" must have a universalIdentifier`);if(!i.type)throw new Error(`Field "${i.label}" must have a type`);if(!i.name)throw new Error("Field must have a name");if(!i.label)throw new Error("Field must have a label");if((i.type===g.s.SELECT||i.type===g.s.MULTI_SELECT)&&(!i.options||i.options.length===0))throw new Error(`Field "${i.label}" is a SELECT/MULTI_SELECT type and must have options`)}return a},W=a=>()=>{};let L=[["\0","","","","","","","\x07","\b"," ",`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./ObjectRecordGroupByDateGranularity-CtpRADP1-Duv5iOeZ.js");require("lodash.camelcase");const M=a=>{if(!a.universalIdentifier)throw new Error("App must have a universalIdentifier");return a};var D=(a=>(a.CASCADE="CASCADE",a.RESTRICT="RESTRICT",a.SET_NULL="SET_NULL",a.NO_ACTION="NO_ACTION",a))(D||{}),H=(a=>(a.MANY_TO_ONE="MANY_TO_ONE",a.ONE_TO_MANY="ONE_TO_MANY",a))(H||{});const G=a=>()=>{},F=a=>()=>{},N=a=>{if(!a.universalIdentifier)throw new Error("Function must have a universalIdentifier");if(typeof a.handler!="function")throw new Error("Function must have a handler");for(const i of a.triggers??[]){if(!i.universalIdentifier)throw new Error("Each trigger must have a universalIdentifier");if(!i.type)throw new Error("Each trigger must have a type");switch(i.type){case"route":if(!i.path)throw new Error("Route trigger must have a path");if(!i.httpMethod)throw new Error("Route trigger must have an httpMethod");break;case"cron":if(!i.pattern)throw new Error("Cron trigger must have a pattern");break;case"databaseEvent":if(!i.eventName)throw new Error("Database event trigger must have an eventName");break;default:throw new Error(`Unknown trigger type: ${i.type}`)}}return a},P=a=>{if(!a.universalIdentifier)throw new Error("Object must have a universalIdentifier");if(!a.nameSingular)throw new Error("Object must have a nameSingular");if(!a.namePlural)throw new Error("Object must have a namePlural");if(!a.labelSingular)throw new Error("Object must have a labelSingular");if(!a.labelPlural)throw new Error("Object must have a labelPlural");for(const i of a.fields??[]){if(!i.universalIdentifier)throw new Error(`Field "${i.label}" must have a universalIdentifier`);if(!i.type)throw new Error(`Field "${i.label}" must have a type`);if(!i.name)throw new Error("Field must have a name");if(!i.label)throw new Error("Field must have a label");if((i.type===g.s.SELECT||i.type===g.s.MULTI_SELECT)&&(!i.options||i.options.length===0))throw new Error(`Field "${i.label}" is a SELECT/MULTI_SELECT type and must have options`)}return a},W=a=>()=>{};let L=[["\0","","","","","","","\x07","\b"," ",`
2
2
  `,"\v","\f","\r","","","","","","","","","","","","","","\x1B","","","",""," ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,," ","!","C/","PS","$?","Y=","|","SS",'"',"(c)","a","<<","!",,"(r)","-","deg","+-","2","3","'","u","P","*",",","1","o",">>","1/4","1/2","3/4","?","A","A","A","A","A","A","AE","C","E","E","E","E","I","I","I","I","D","N","O","O","O","O","O","x","O","U","U","U","U","U","Th","ss","a","a","a","a","a","a","ae","c","e","e","e","e","i","i","i","i","d","n","o","o","o","o","o","/","o","u","u","u","u","y","th","y"],["A","a","A","a","A","a","C","c","C","c","C","c","C","c","D","d","D","d","E","e","E","e","E","e","E","e","E","e","G","g","G","g","G","g","G","g","H","h","H","h","I","i","I","i","I","i","I","i","I","i","IJ","ij","J","j","K","k","k","L","l","L","l","L","l","L","l","L","l","N","n","N","n","N","n","'n","NG","ng","O","o","O","o","O","o","OE","oe","R","r","R","r","R","r","S","s","S","s","S","s","S","s","T","t","T","t","T","t","U","u","U","u","U","u","U","u","U","u","U","u","W","w","Y","y","Y","Z","z","Z","z","Z","z","s","b","B","B","b","6","6","O","C","c","D","D","D","d","d","3","@","E","F","f","G","G","hv","I","I","K","k","l","l","W","N","n","O","O","o","OI","oi","P","p","YR","2","2","SH","sh","t","T","t","T","U","u","Y","V","Y","y","Z","z","ZH","ZH","zh","zh","2","5","5","ts","w","|","||","|=","!","DZ","Dz","dz","LJ","Lj","lj","NJ","Nj","nj","A","a","I","i","O","o","U","u","U","u","U","u","U","u","U","u","@","A","a","A","a","AE","ae","G","g","G","g","K","k","O","o","O","o","ZH","zh","j","DZ","D","dz","G","g","HV","W","N","n","A","a","AE","ae","O","o"],["A","a","A","a","E","e","E","e","I","i","I","i","O","o","O","o","R","r","R","r","U","u","U","u","S","s","T","t","Y","y","H","h","N","d","OU","ou","Z","z","A","a","E","e","O","o","O","o","O","o","O","o","Y","y","l","n","t","j","db","qp","A","C","c","L","T","s","z","?","?","B","U","V","E","e","J","j","Q","q","R","r","Y","y","a","a","a","b","o","c","d","d","e","@","@","e","e","e","e","j","g","g","g","g","u","Y","h","h","i","i","I","l","l","l","lZ","W","W","m","n","n","n","o","OE","O","F","R","R","R","R","r","r","R","R","R","s","S","j","S","S","t","t","U","U","v","^","W","Y","Y","z","z","Z","Z","?","?","?","C","@","B","E","G","H","j","k","L","q","?","?","dz","dZ","dz","ts","tS","tC","fN","ls","lz","WW","]]","h","h","k","h","j","r","r","r","r","w","y","'",'"',"`","'","`","`","'","?","?","<",">","^","V","^","V","'","-","/","\\",",","_","\\","/",":",".","`","'","^","V","+","-","V",".","@",",","~",'"',"R","X","G","l","s","x","?",,,,,,,,"V","=",'"'],[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"'",",",,,,,,,,,"?",,,,,,,,"A",";","E","I","I",,"O",,"U","O","I","A","V","G","D","E","Z","I","Th","I","K","L","M","N","X","O","P","R",,"S","T","Y","F","H","Ps","O","I","Y","a","e","i","i","y","a","v","g","d","e","z","i","th","i","k","l","m","n","x","o","p","r","s","s","t","y","f","h","ps","o","i","y","o","y","o",,"b","th","U","U","U","ph","p","&",,,"St","st","W","w","Q","q","Sp","sp","Sh","sh","F","f","Kh","kh","H","h","G","g","CH","ch","Ti","ti","k","r","c","j"],["Jo","Yo","Dj","Gj","Ie","Dz","I","Yi","J","Lj","Nj","Tsh","Kj","I","U","Dzh","A","B","V","G","D","E","Zh","Z","I","Y","K","L","M","N","O","P","R","S","T","U","F","H","C","Ch","Sh","Shch",,"Y",,"E","Yu","Ya","a","b","v","g","d","e","zh","z","i","y","k","l","m","n","o","p","r","s","t","u","f","h","c","ch","sh","shch",,"y",,"e","yu","ya","je","yo","dj","gj","ie","dz","i","yi","j","lj","nj","tsh","kj","i","u","dzh","O","o","E","e","Ie","ie","E","e","Ie","ie","O","o","Io","io","Ks","ks","Ps","ps","F","f","Y","y","Y","y","u","u","O","o","O","o","Ot","ot","Q","q","*1000*",,,,,,"*100.000*","*1.000.000*",,,'"','"',"R'","r'","G'","g'","G'","g'","G'","g'","Zh'","zh'","Z'","z'","K'","k'","K'","k'","K'","k'","K'","k'","N'","n'","Ng","ng","P'","p'","Kh","kh","S'","s'","T'","t'","U","u","U'","u'","Kh'","kh'","Tts","tts","Ch'","ch'","Ch'","ch'","H","h","Ch","ch","Ch'","ch'","`","Zh","zh","K'","k'",,,"N'","n'",,,"Ch","ch",,,,"a","a","A","a","Ae","ae","Ie","ie","@","@","@","@","Zh","zh","Z","z","Dz","dz","I","i","I","i","O","o","O","o","O","o","E","e","U","u","U","u","U","u","Ch","ch",,,"Y","y"],[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"A","B","G","D","E","Z","E","E","T`","Zh","I","L","Kh","Ts","K","H","Dz","Gh","Ch","M","Y","N","Sh","O","Ch`","P","J","Rh","S","V","T","R","Ts`","W","P`","K`","O","F",,,"<","'","/","!",",","?",".",,"a","b","g","d","e","z","e","e","t`","zh","i","l","kh","ts","k","h","dz","gh","ch","m","y","n","sh","o","ch`","p","j","rh","s","v","t","r","ts`","w","p`","k`","o","f","ew",,".","-",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"@","e","a","o","i","e","e","a","a","o",,"u","'",,,,,,,":",,,,,,,,,,,,,,"b","g","d","h","v","z","kh","t","y","k","k","l","m","m","n","n","s","`","p","p","ts","ts","q","r","sh","t",,,,,,"V","oy","i","'",'"'],[,,,,,,,,,,,,",",,,,,,,,,,,,,,,";",,,,"?",,,"a","'","w'",,"y'",,"b","@","t","th","j","H","kh","d","dh","r","z","s","sh","S","D","T","Z","aa","G",,,,,,,"f","q","k","l","m","n","h","w","~","y","an","un","in","a","u","i","W",,,"'","'",,,,,,,,,,,"0","1","2","3","4","5","6","7","8","9","%",".",",","*",,,,"'","'","'",,"'","'w","'u","'y","tt","tth","b","t","T","p","th","bh","'h","H","ny","dy","H","ch","cch","dd","D","D","Dt","dh","ddh","d","D","D","rr","R","R","R","R","R","R","j","R","S","S","S","S","S","T","GH","F","F","F","v","f","ph","Q","Q","kh","k","K","K","ng","K","g","G","N","G","G","G","L","L","L","L","N","N","N","N","N","h","Ch","hy","h","H","@","W","oe","oe","u","yu","yu","W","v","y","Y","Y","W",,,"y","y'",".","ae",,,,,,,,"@","#",,,,,,,,,,,"^",,,,,,,"0","1","2","3","4","5","6","7","8","9","Sh","D","Gh","&","+m"],["//","/",",","!","!","-",",",",",";","?","~","{","}","*",,,"'",,"b","g","g","d","d","h","w","z","H","t","t","y","yh","k","l","m","n","s","s","`","p","p","S","q","r","sh","t",,,,"a","a","a","A","A","A","e","e","e","E","i","i","u","u","u","o",,"`","'",,,"X","Q","@","@","|","+",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"h","sh","n","r","b","L","k","'","v","m","f","dh","th","l","g","ny","s","d","z","t","y","p","j","ch","tt","hh","kh","th","z","sh","s","d","t","z","`","gh","q","w","a","aa","i","ee","u","oo","e","ey","o","oa"],[],[,"N","N","H",,"a","aa","i","ii","u","uu","R","L","eN","e","e","ai","oN","o","o","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","nnn","p","ph","b","bh","m","y","r","rr","l","l","lll","v","sh","ss","s","h",,,"'","'","aa","i","ii","u","uu","R","RR","eN","e","e","ai","oN","o","o","au",,,,"AUM","'","'","`","'",,,,"q","khh","ghh","z","dddh","rh","f","yy","RR","LL","L","LL"," / "," // ","0","1","2","3","4","5","6","7","8","9",".",,,,,,,,,,,,,,,,,"N","N","H",,"a","aa","i","ii","u","uu","R","RR",,,"e","ai",,,"o","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n",,"p","ph","b","bh","m","y","r",,"l",,,,"sh","ss","s","h",,,"'",,"aa","i","ii","u","uu","R","RR",,,"e","ai",,,"o","au",,,,,,,,,,,"+",,,,,"rr","rh",,"yy","RR","LL","L","LL",,,"0","1","2","3","4","5","6","7","8","9","r'","r`","Rs","Rs","1/","2/","3/","4/"," 1 - 1/","/16"],[,,"N",,,"a","aa","i","ii","u","uu",,,,,"ee","ai",,,"oo","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n",,"p","ph","b","bb","m","y","r",,"l","ll",,"v","sh",,"s","h",,,"'",,"aa","i","ii","u","uu",,,,,"ee","ai",,,"oo","au",,,,,,,,,,,,,"khh","ghh","z","rr",,"f",,,,,,,,"0","1","2","3","4","5","6","7","8","9","N","H",,,"G.E.O.",,,,,,,,,,,,,"N","N","H",,"a","aa","i","ii","u","uu","R",,"eN",,"e","ai","oN",,"o","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n",,"p","ph","b","bh","m","ya","r",,"l","ll",,"v","sh","ss","s","h",,,"'","'","aa","i","ii","u","uu","R","RR","eN",,"e","ai","oN",,"o","au",,,,"AUM",,,,,,,,,,,,,,,,"RR",,,,,,"0","1","2","3","4","5","6","7","8","9"],[,"N","N","H",,"a","aa","i","ii","u","uu","R","L",,,"e","ai",,,"o","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n",,"p","ph","b","bh","m","y","r",,"l","ll",,,"sh","ss","s","h",,,"'","'","aa","i","ii","u","uu","R",,,,"e","ai",,,"o","au",,,,,,,,,,"+","+",,,,,"rr","rh",,"yy","RR","LL",,,,,"0","1","2","3","4","5","6","7","8","9",,,,,,,,,,,,,,,,,,,"N","H",,"a","aa","i","ii","u","uu",,,,"e","ee","ai",,"o","oo","au","k",,,,"ng","c",,"j",,"ny","tt",,,,"nn","t",,,,"n","nnn","p",,,,"m","y","r","rr","l","ll","lll","v",,"ss","s","h",,,,,"aa","i","ii","u","uu",,,,"e","ee","ai",,"o","oo","au",,,,,,,,,,,"+",,,,,,,,,,,,,,,"0","1","2","3","4","5","6","7","8","9","+10+","+100+","+1000+"],[,"N","N","H",,"a","aa","i","ii","u","uu","R","L",,"e","ee","ai",,"o","oo","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n",,"p","ph","b","bh","m","y","r","rr","l","ll",,"v","sh","ss","s","h",,,,,"aa","i","ii","u","uu","R","RR",,"e","ee","ai",,"o","oo","au",,,,,,,,,"+","+",,,,,,,,,,"RR","LL",,,,,"0","1","2","3","4","5","6","7","8","9",,,,,,,,,,,,,,,,,,,"N","H",,"a","aa","i","ii","u","uu","R","L",,"e","ee","ai",,"o","oo","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n",,"p","ph","b","bh","m","y","r","rr","l","ll",,"v","sh","ss","s","h",,,,,"aa","i","ii","u","uu","R","RR",,"e","ee","ai",,"o","oo","au",,,,,,,,,"+","+",,,,,,,,"lll",,"RR","LL",,,,,"0","1","2","3","4","5","6","7","8","9"],[,,"N","H",,"a","aa","i","ii","u","uu","R","L",,"e","ee","ai",,"o","oo","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n",,"p","ph","b","bh","m","y","r","rr","l","ll","lll","v","sh","ss","s","h",,,,,"aa","i","ii","u","uu","R",,,"e","ee","ai",,"o","oo","au",,,,,,,,,,,"+",,,,,,,,,"RR","LL",,,,,"0","1","2","3","4","5","6","7","8","9",,,,,,,,,,,,,,,,,,,"N","H",,"a","aa","ae","aae","i","ii","u","uu","R","RR","L","LL","e","ee","ai","o","oo","au",,,,"k","kh","g","gh","ng","nng","c","ch","j","jh","ny","jny","nyj","tt","tth","dd","ddh","nn","nndd","t","th","d","dh","n",,"nd","p","ph","b","bh","m","mb","y","r",,"l",,,"v","sh","ss","s","h","ll","f",,,,,,,,,"aa","ae","aae","i","ii","u",,"uu",,"R","e","ee","ai","o","oo","au","L",,,,,,,,,,,,,,,,,,,"RR","LL"," . "],[,"k","kh","kh","kh","kh","kh","ng","cch","ch","ch","ch","ch","y","d","t","th","th","th","n","d","t","th","th","th","n","b","p","ph","f","ph","f","ph","m","y","r","R","l","L","w","s","s","s","h","l","`","h","~","a","a","aa","am","i","ii","ue","uue","u","uu","'",,,,,"Bh.","e","ae","o","ai","ai","ao","+",,,,,,,"M",," * ","0","1","2","3","4","5","6","7","8","9"," // "," /// ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"k","kh",,"kh",,,"ng","ch",,"s",,,"ny",,,,,,,"d","h","th","th",,"n","b","p","ph","f","ph","f",,"m","y","r",,"l",,"w",,,"s","h",,"`",,"~","a",,"aa","am","i","ii","y","yy","u","uu",,"o","l","ny",,,"e","ei","o","ay","ai",,"+",,,,,,,"M",,,"0","1","2","3","4","5","6","7","8","9",,,"hn","hm"],["AUM",,,,,,,," // "," * ",,"-"," / "," / "," // "," -/ "," +/ "," X/ "," /XX/ "," /X/ ",",",,,,,,,,,,,,"0","1","2","3","4","5","6","7","8","9",".5","1.5","2.5","3.5","4.5","5.5","6.5","7.5","8.5","-.5","+","*","^","_",,"~",,"]","[[","]]",,,"k","kh","g","gh","ng","c","ch","j",,"ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","p","ph","b","bh","m","ts","tsh","dz","dzh","w","zh","z","'","y","r","l","sh","ssh","s","h","a","kss","r",,,,,,,"aa","i","ii","u","uu","R","RR","L","LL","e","ee","o","oo","M","H","i","ii",,,,,,,,,,,,,,,"k","kh","g","gh","ng","c","ch","j",,"ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","p","ph","b","bh","m","ts","tsh","dz","dzh","w","zh","z","'","y","r","l","sh","ss","s","h","a","kss","w","y","r",,"X"," :X: "," /O/ "," /o/ "," \\o\\ "," (O) "],["k","kh","g","gh","ng","c","ch","j","jh","ny","nny","tt","tth","dd","ddh","nn","tt","th","d","dh","n","p","ph","b","bh","m","y","r","l","w","s","h","ll","a",,"i","ii","u","uu","e",,"o","au",,"aa","i","ii","u","uu","e","ai",,,,"N","'",":",,,,,,,,"0","1","2","3","4","5","6","7","8","9"," / "," // ","n*","r*","l*","e*","sh","ss","R","RR","L","LL","R","RR","L","LL",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"A","B","G","D","E","V","Z","T`","I","K","L","M","N","O","P","Zh","R","S","T","U","P`","K`","G'","Q","Sh","Ch`","C`","Z'","C","Ch","X","J","H","E","Y","W","Xh","OE",,,,,,,,,,,"a","b","g","d","e","v","z","t`","i","k","l","m","n","o","p","zh","r","s","t","u","p`","k`","g'","q","sh","ch`","c`","z'","c","ch","x","j","h","e","y","w","xh","oe","f",,,,," // "],["g","gg","n","d","dd","r","m","b","bb","s","ss",,"j","jj","c","k","t","p","h","ng","nn","nd","nb","dg","rn","rr","rh","rN","mb","mN","bg","bn",,"bs","bsg","bst","bsb","bss","bsj","bj","bc","bt","bp","bN","bbN","sg","sn","sd","sr","sm","sb","sbg","sss","s","sj","sc","sk","st","sp","sh",,,,,"Z","g","d","m","b","s","Z",,"j","c","t","p","N","j",,,,,"ck","ch",,,"pb","pN","hh","Q",,,,,,,,"a","ae","ya","yae","eo","e","yeo","ye","o","wa","wae","oe","yo","u","weo","we","wi","yu","eu","yi","i","a-o","a-u","ya-o","ya-yo","eo-o","eo-u","eo-eu","yeo-o","yeo-u","o-eo","o-e","o-ye","o-o","o-u","yo-ya","yo-yae","yo-yeo","yo-o","yo-i","u-a","u-ae","u-eo-eu","u-ye","u-u","yu-a","yu-eo","yu-e","yu-yeo","yu-ye","yu-u","yu-i","eu-u","eu-eu","yi-u","i-a","i-ya","i-o","i-u","i-eu","i-U","U","U-eo","U-u","U-i","UU",,,,,,"g","gg","gs","n","nj","nh","d","l","lg","lm","lb","ls","lt","lp","lh","m","b","bs","s","ss","ng","j","c","k","t","p","h","gl","gsg","ng","nd","ns","nZ","nt","dg","tl","lgs","ln","ld","lth","ll","lmg","lms","lbs","lbh","rNp","lss","lZ","lk","lQ","mg","ml","mb","ms","mss","mZ","mc","mh","mN","bl","bp","ph","pN","sg","sd","sl","sb","Z","g","ss",,"kh","N","Ns","NZ","pb","pN","hn","hl","hm","hb","Q"],["ha","hu","hi","haa","hee","he","ho",,"la","lu","li","laa","lee","le","lo","lwa","hha","hhu","hhi","hhaa","hhee","hhe","hho","hhwa","ma","mu","mi","maa","mee","me","mo","mwa","sza","szu","szi","szaa","szee","sze","szo","szwa","ra","ru","ri","raa","ree","re","ro","rwa","sa","su","si","saa","see","se","so","swa","sha","shu","shi","shaa","shee","she","sho","shwa","qa","qu","qi","qaa","qee","qe","qo",,"qwa",,"qwi","qwaa","qwee","qwe",,,"qha","qhu","qhi","qhaa","qhee","qhe","qho",,"qhwa",,"qhwi","qhwaa","qhwee","qhwe",,,"ba","bu","bi","baa","bee","be","bo","bwa","va","vu","vi","vaa","vee","ve","vo","vwa","ta","tu","ti","taa","tee","te","to","twa","ca","cu","ci","caa","cee","ce","co","cwa","xa","xu","xi","xaa","xee","xe","xo",,"xwa",,"xwi","xwaa","xwee","xwe",,,"na","nu","ni","naa","nee","ne","no","nwa","nya","nyu","nyi","nyaa","nyee","nye","nyo","nywa","'a","'u",,"'aa","'ee","'e","'o","'wa","ka","ku","ki","kaa","kee","ke","ko",,"kwa",,"kwi","kwaa","kwee","kwe",,,"kxa","kxu","kxi","kxaa","kxee","kxe","kxo",,"kxwa",,"kxwi","kxwaa","kxwee","kxwe",,,"wa","wu","wi","waa","wee","we","wo",,"`a","`u","`i","`aa","`ee","`e","`o",,"za","zu","zi","zaa","zee","ze","zo","zwa","zha","zhu","zhi","zhaa","zhee","zhe","zho","zhwa","ya","yu","yi","yaa","yee","ye","yo",,"da","du","di","daa","dee","de","do","dwa","dda","ddu","ddi","ddaa","ddee","dde","ddo","ddwa"],["ja","ju","ji","jaa","jee","je","jo","jwa","ga","gu","gi","gaa","gee","ge","go",,"gwa",,"gwi","gwaa","gwee","gwe",,,"gga","ggu","ggi","ggaa","ggee","gge","ggo",,"tha","thu","thi","thaa","thee","the","tho","thwa","cha","chu","chi","chaa","chee","che","cho","chwa","pha","phu","phi","phaa","phee","phe","pho","phwa","tsa","tsu","tsi","tsaa","tsee","tse","tso","tswa","tza","tzu","tzi","tzaa","tzee","tze","tzo",,"fa","fu","fi","faa","fee","fe","fo","fwa","pa","pu","pi","paa","pee","pe","po","pwa","rya","mya","fya",,,,,,," ",".",",",";",":",":: ","?","//","1","2","3","4","5","6","7","8","9","10+","20+","30+","40+","50+","60+","70+","80+","90+","100+","10,000+",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"a","e","i","o","u","v","ga","ka","ge","gi","go","gu","gv","ha","he","hi","ho","hu","hv","la","le","li","lo","lu","lv","ma","me","mi","mo","mu","na","hna","nah","ne","ni","no","nu","nv","qua","que","qui","quo","quu","quv","sa","s","se","si","so","su","sv","da","ta","de","te","di","ti","do","du","dv","dla","tla","tle","tli","tlo","tlu","tlv","tsa","tse","tsi","tso","tsu","tsv","wa","we","wi","wo","wu","wv","ya","ye","yi","yo","yu","yv"],[,"ai","aai","i","ii","u","uu","oo","ee","i","a","aa","we","we","wi","wi","wii","wii","wo","wo","woo","woo","woo","wa","wa","waa","waa","waa","ai","w","'","t","k","sh","s","n","w","n",,"w","c","?","l","en","in","on","an","pai","paai","pi","pii","pu","puu","poo","hee","hi","pa","paa","pwe","pwe","pwi","pwi","pwii","pwii","pwo","pwo","pwoo","pwoo","pwa","pwa","pwaa","pwaa","pwaa","p","p","h","tai","taai","ti","tii","tu","tuu","too","dee","di","ta","taa","twe","twe","twi","twi","twii","twii","two","two","twoo","twoo","twa","twa","twaa","twaa","twaa","t","tte","tti","tto","tta","kai","kaai","ki","kii","ku","kuu","koo","ka","kaa","kwe","kwe","kwi","kwi","kwii","kwii","kwo","kwo","kwoo","kwoo","kwa","kwa","kwaa","kwaa","kwaa","k","kw","keh","kih","koh","kah","gai","caai","gi","gii","gu","guu","coo","ga","gaa","cwe","cwe","cwi","cwi","cwii","cwii","cwo","cwo","cwoo","cwoo","cwa","cwa","cwaa","cwaa","cwaa","g","th","mai","maai","mi","mii","mu","muu","moo","ma","maa","mwe","mwe","mwi","mwi","mwii","mwii","mwo","mwo","mwoo","mwoo","mwa","mwa","mwaa","mwaa","mwaa","m","m","mh","m","m","nai","naai","ni","nii","nu","nuu","noo","na","naa","nwe","nwe","nwa","nwa","nwaa","nwaa","nwaa","n","ng","nh","lai","laai","li","lii","lu","luu","loo","la","laa","lwe","lwe","lwi","lwi","lwii","lwii","lwo","lwo","lwoo","lwoo","lwa","lwa","lwaa","lwaa","l","l","l","sai","saai","si","sii","su","suu","soo","sa","saa","swe","swe","swi","swi","swii","swii","swo","swo","swoo","swoo"],["swa","swa","swaa","swaa","swaa","s","s","sw","s","sk","skw","sW","spwa","stwa","skwa","scwa","she","shi","shii","sho","shoo","sha","shaa","shwe","shwe","shwi","shwi","shwii","shwii","shwo","shwo","shwoo","shwoo","shwa","shwa","shwaa","shwaa","sh","jai","yaai","ji","jii","ju","juu","yoo","ja","jaa","ywe","ywe","ywi","ywi","ywii","ywii","ywo","ywo","ywoo","ywoo","ywa","ywa","ywaa","ywaa","ywaa","j","y","y","yi","re","rai","le","raai","ri","rii","ru","ruu","lo","ra","raa","la","rwaa","rwaa","r","r","r","vai","faai","vi","vii","vu","vuu","va","vaa","fwaa","fwaa","v","the","the","thi","thi","thii","thii","tho","thoo","tha","thaa","thwaa","thwaa","th","tthe","tthi","ttho","ttha","tth","tye","tyi","tyo","tya","he","hi","hii","ho","hoo","ha","haa","h","h","hk","qaai","qi","qii","qu","quu","qa","qaa","q","tlhe","tlhi","tlho","tlha","re","ri","ro","ra","ngaai","ngi","ngii","ngu","nguu","nga","ngaa","ng","nng","she","shi","sho","sha","the","thi","tho","tha","th","lhi","lhii","lho","lhoo","lha","lhaa","lh","the","thi","thii","tho","thoo","tha","thaa","th","b","e","i","o","a","we","wi","wo","wa","ne","ni","no","na","ke","ki","ko","ka","he","hi","ho","ha","ghu","gho","ghe","ghee","ghi","gha","ru","ro","re","ree","ri","ra","wu","wo","we","wee","wi","wa","hwu","hwo","hwe","hwee","hwi","hwa","thu","tho","the","thee","thi","tha","ttu","tto","tte","ttee","tti","tta","pu","po","pe","pee","pi","pa","p","gu","go","ge","gee","gi","ga","khu","kho","khe","khee","khi","kha","kku","kko","kke","kkee","kki"],["kka","kk","nu","no","ne","nee","ni","na","mu","mo","me","mee","mi","ma","yu","yo","ye","yee","yi","ya","ju","ju","jo","je","jee","ji","ji","ja","jju","jjo","jje","jjee","jji","jja","lu","lo","le","lee","li","la","dlu","dlo","dle","dlee","dli","dla","lhu","lho","lhe","lhee","lhi","lha","tlhu","tlho","tlhe","tlhee","tlhi","tlha","tlu","tlo","tle","tlee","tli","tla","zu","zo","ze","zee","zi","za","z","z","dzu","dzo","dze","dzee","dzi","dza","su","so","se","see","si","sa","shu","sho","she","shee","shi","sha","sh","tsu","tso","tse","tsee","tsi","tsa","chu","cho","che","chee","chi","cha","ttsu","ttso","ttse","ttsee","ttsi","ttsa","X",".","qai","ngai","nngi","nngii","nngo","nngoo","nnga","nngaa",,,,,,,,,," ","b","l","f","s","n","h","d","t","c","q","m","g","ng","z","r","a","o","u","e","i","ch","th","ph","p","x","p","<",">",,,,"f","v","u","yr","y","w","th","th","a","o","ac","ae","o","o","o","oe","on","r","k","c","k","g","ng","g","g","w","h","h","h","h","n","n","n","i","e","j","g","ae","a","eo","p","z","s","s","s","c","z","t","t","d","b","b","p","p","e","m","m","m","l","l","ng","ng","d","o","ear","ior","qu","qu","qu","s","yr","yr","yr","q","x",".",":","+","17","18","19"],[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"k","kh","g","gh","ng","c","ch","j","jh","ny","t","tth","d","ddh","nn","t","th","d","dh","n","p","ph","b","bh","m","y","r","l","v","sh","ss","s","h","l","q","a","aa","i","ii","u","uk","uu","uuv","ry","ryy","ly","lyy","e","ai","oo","oo","au","a","aa","aa","i","ii","y","yy","u","uu","ua","oe","ya","ie","e","ae","ai","oo","au","M","H","a`",,,,"r",,"!",,,,,,"."," // ",":","+","++"," * "," /// ","KR","'",,,,"0","1","2","3","4","5","6","7","8","9"],[" @ "," ... ",",",". ",": "," // ",,"-",",",". ",,,,,,,"0","1","2","3","4","5","6","7","8","9",,,,,,,"a","e","i","o","u","O","U","ee","n","ng","b","p","q","g","m","l","s","sh","t","d","ch","j","y","r","w","f","k","kha","ts","z","h","zr","lh","zh","ch","-","e","i","o","u","O","U","ng","b","p","q","g","m","t","d","ch","j","ts","y","w","k","g","h","jy","ny","dz","e","i","iy","U","u","ng","k","g","h","p","sh","t","d","j","f","g","h","ts","z","r","ch","zh","i","k","r","f","zh",,,,,,,,,,"H","X","W","M"," 3 "," 333 ","a","i","k","ng","c","tt","tth","dd","nn","t","d","p","ph","ss","zh","z","a","t","zh","gh","ng","c","jh","tta","ddh","t","dh","ss","cy","zh","z","u","y","bh","'"],[],[],[],[],[],["A","a","B","b","B","b","B","b","C","c","D","d","D","d","D","d","D","d","D","d","E","e","E","e","E","e","E","e","E","e","F","f","G","g","H","h","H","h","H","h","H","h","H","h","I","i","I","i","K","k","K","k","K","k","L","l","L","l","L","l","L","l","M","m","M","m","M","m","N","n","N","n","N","n","N","n","O","o","O","o","O","o","O","o","P","p","P","p","R","r","R","r","R","r","R","r","S","s","S","s","S","s","S","s","S","s","T","t","T","t","T","t","T","t","U","u","U","u","U","u","U","u","U","u","V","v","V","v","W","w","W","w","W","w","W","w","W","w","X","x","X","x","Y","y","Z","z","Z","z","Z","z","h","t","w","y","a","S",,,,,"A","a","A","a","A","a","A","a","A","a","A","a","A","a","A","a","A","a","A","a","A","a","A","a","E","e","E","e","E","e","E","e","E","e","E","e","E","e","E","e","I","i","I","i","O","o","O","o","O","o","O","o","O","o","O","o","O","o","O","o","O","o","O","o","O","o","O","o","U","u","U","u","U","u","U","u","U","u","U","u","U","u","Y","y","Y","y","Y","y","Y","y"],["a","a","a","a","a","a","a","a","A","A","A","A","A","A","A","A","e","e","e","e","e","e",,,"E","E","E","E","E","E",,,"e","e","e","e","e","e","e","e","E","E","E","E","E","E","E","E","i","i","i","i","i","i","i","i","I","I","I","I","I","I","I","I","o","o","o","o","o","o",,,"O","O","O","O","O","O",,,"u","u","u","u","u","u","u","u",,"U",,"U",,"U",,"U","o","o","o","o","o","o","o","o","O","O","O","O","O","O","O","O","a","a","e","e","e","e","i","i","o","o","u","u","o","o",,,"a","a","a","a","a","a","a","a","A","A","A","A","A","A","A","A","e","e","e","e","e","e","e","e","E","E","E","E","E","E","E","E","o","o","o","o","o","o","o","o","O","O","O","O","O","O","O","O","a","a","a","a","a",,"a","a","A","A","A","A","A","'","i","'","~",'"~',"e","e","e",,"e","e","E","E","E","E","E","'`","''","'~","i","i","i","i",,,"i","i","I","I","I","I",,"`'","`'","`~","u","u","u","u","R","R","u","u","U","U","U","U","R",'"`',`"'`,"`",,,"o","o","o",,"o","o","O","O","O","O","O","'","`"],[" "," "," "," "," "," "," "," "," "," "," "," ",,,,,"-","-","-","-","--","--","||","_","'","'",",","'",'"','"',",,",'"',"+","++","*","*>",".","..","...",".",`
3
3
  `,`
4
4
 
package/dist/index.mjs CHANGED
@@ -13,9 +13,7 @@ const K = (a) => () => {
13
13
  throw new Error("Function must have a universalIdentifier");
14
14
  if (typeof a.handler != "function")
15
15
  throw new Error("Function must have a handler");
16
- if (!a.triggers || a.triggers.length === 0)
17
- throw new Error("Function must have at least one trigger");
18
- for (const i of a.triggers) {
16
+ for (const i of a.triggers ?? []) {
19
17
  if (!i.universalIdentifier)
20
18
  throw new Error("Each trigger must have a universalIdentifier");
21
19
  if (!i.type)
@@ -51,9 +49,7 @@ const K = (a) => () => {
51
49
  throw new Error("Object must have a labelSingular");
52
50
  if (!a.labelPlural)
53
51
  throw new Error("Object must have a labelPlural");
54
- if (!a.fields || a.fields.length === 0)
55
- throw new Error("Object must have at least one field");
56
- for (const i of a.fields) {
52
+ for (const i of a.fields ?? []) {
57
53
  if (!i.universalIdentifier)
58
54
  throw new Error(`Field "${i.label}" must have a universalIdentifier`);
59
55
  if (!i.type)