fleetbo-svro 1.0.11 → 1.0.13

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.
Files changed (2) hide show
  1. package/dist/cli.cjs +293 -320
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -1,45 +1,60 @@
1
1
  #!/usr/bin/env node
2
- var U=(t,n)=>()=>{try{return n||t((n={exports:{}}).exports,n),n.exports}catch(o){throw n=0,o}};var N=U((ne,R)=>{var c=require("fs"),d=require("path"),D=require("https"),{execSync:j}=require("child_process"),C="\x1B[38;2;231;233;237m",L="\x1B[31m",S="\x1B[0m";function g(t){console.log(` ${C}${t}${S}`)}function f(t){console.error(` ${L}${t}${S}`)}function A(t){let n={};return t.forEach(o=>{if(o.startsWith("--")){let[r,l]=o.slice(2).split("=");r&&l&&(n[r]=l)}}),n}function E(t,n){try{let o=JSON.parse(c.readFileSync(t,"utf8"));return!!(o.dependencies&&o.dependencies[n]||o.devDependencies&&o.devDependencies[n])}catch{return!1}}function M(t,n){if(!E(n,"fleetbo-svro")){g("\u2192 Installing fleetbo-svro into the project...");try{j("npm install fleetbo-svro",{cwd:t,stdio:"inherit"}),g("fleetbo-svro installed successfully!")}catch{f("\u26A0\uFE0F Automatic installation failed. Please run 'npm install fleetbo-svro' manually.")}}}function J(t){let n=d.join(t,"svro.schema.json");if(c.existsSync(n))return;let o=new Date().toISOString(),r={createdAt:o,patchedAt:o,schemaVersion:1,collections:{}};c.writeFileSync(n,JSON.stringify(r,null,2)+`
3
- `),g("\u2192 Created svro.schema.json at project root.")}function $(t){let n=d.join(t,"src");if(!c.existsSync(n))return;let o=d.join(n,"auto-imports.d.ts");if(c.existsSync(o))return;let r=`/* eslint-disable */
2
+ var R=(t,n)=>()=>{try{return n||t((n={exports:{}}).exports,n),n.exports}catch(r){throw n=0,r}};var _=R((re,k)=>{var b=require("fs"),p=require("path"),J=require("https"),{execSync:L}=require("child_process"),$="\x1B[38;2;231;233;237m",D="\x1B[31m",x="\x1B[0m";function f(t){console.log(` ${$}${t}${x}`)}function d(t){console.error(` ${D}${t}${x}`)}function A(t){let n={};return t.forEach(r=>{if(r.startsWith("--")){let[s,l]=r.slice(2).split("=");s&&l&&(n[s]=l)}}),n}function E(t,n){try{let r=JSON.parse(b.readFileSync(t,"utf8"));return!!(r.dependencies&&r.dependencies[n]||r.devDependencies&&r.devDependencies[n])}catch{return!1}}function N(t,n){if(!E(n,"fleetbo-svro")){f("\u2192 Installing fleetbo-svro into the project...");try{L("npm install fleetbo-svro",{cwd:t,stdio:"inherit"}),f("fleetbo-svro installed successfully!")}catch{d("\u26A0\uFE0F Automatic installation failed. Please run 'npm install fleetbo-svro' manually.")}}}function U(t){let n=p.join(t,"svro.schema.json");if(b.existsSync(n))return;let r=new Date().toISOString(),s={createdAt:r,patchedAt:r,schemaVersion:1,collections:{}};b.writeFileSync(n,JSON.stringify(s,null,2)+`
3
+ `),f("\u2192 Created svro.schema.json at project root.")}function B(t){let n=p.join(t,"src");if(!b.existsSync(n))return;let r=p.join(n,"auto-imports.d.ts");if(b.existsSync(r))return;let s=`/* eslint-disable */
4
4
  /* prettier-ignore */
5
5
  // @ts-nocheck
6
6
  // Generated by fleetbo-svro setup
7
7
  export {}
8
8
 
9
- type FleetboTextProps = { value?: any; fallback?: string; class?: string; className?: string; children?: any; [key: string]: any };
10
- type FleetboNumberProps = { value?: any; 'invalid-fallback'?: string; currency?: string; class?: string; className?: string; [key: string]: any };
11
- type FleetboToggleProps = { value?: any; 'label-true'?: string; 'label-false'?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
12
- type FleetboDateProps = { value?: any; locale?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
13
- type FleetboEnumProps = { value?: any; allowed?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
14
- type FleetboMediaProps = { value?: any; alt?: string; fallback?: string; class?: string; className?: string; [key: string]: any };
15
- type FleetboRefProps = { table: any; id?: string; field?: string; 'orphan-fallback'?: string; 'loading-fallback'?: string; 'malformed-fallback'?: string; class?: string; className?: string; [key: string]: any };
9
+ type FleetboProp = {
10
+ value?: any;
11
+ fallback?: string;
12
+ 'invalid-fallback'?: string;
13
+ currency?: string;
14
+ locale?: string;
15
+ allowed?: string;
16
+ alt?: string;
17
+ table?: any;
18
+ id?: string;
19
+ field?: string;
20
+ 'label-true'?: string;
21
+ 'label-false'?: string;
22
+ 'orphan-fallback'?: string;
23
+ 'loading-fallback'?: string;
24
+ 'malformed-fallback'?: string;
25
+ class?: string;
26
+ className?: string;
27
+ children?: any;
28
+ [key: string]: any;
29
+ };
16
30
 
17
31
  declare global {
18
32
  type FleetboTables = string;
19
33
  const Fleetbo: typeof import('fleetbo-svro')['Fleetbo'];
20
- const FleetboUI: typeof import('fleetbo-svro')['FleetboUI'];
21
34
 
22
35
  namespace JSX {
23
36
  interface IntrinsicElements {
24
- 'fleetbo-text': FleetboTextProps;
25
- 'fleetbo-number': FleetboNumberProps;
26
- 'fleetbo-toggle': FleetboToggleProps;
27
- 'fleetbo-date': FleetboDateProps;
28
- 'fleetbo-enum': FleetboEnumProps;
29
- 'fleetbo-media': FleetboMediaProps;
30
- 'fleetbo-reference': FleetboRefProps;
37
+ 'fleetbo-text': FleetboProp;
38
+ 'fleetbo-number': FleetboProp;
39
+ 'fleetbo-toggle': FleetboProp;
40
+ 'fleetbo-date': FleetboProp;
41
+ 'fleetbo-enum': FleetboProp;
42
+ 'fleetbo-media': FleetboProp;
43
+ 'fleetbo-reference': FleetboProp;
31
44
  }
32
45
  }
33
46
 
34
- namespace React.JSX {
35
- interface IntrinsicElements {
36
- 'fleetbo-text': FleetboTextProps;
37
- 'fleetbo-number': FleetboNumberProps;
38
- 'fleetbo-toggle': FleetboToggleProps;
39
- 'fleetbo-date': FleetboDateProps;
40
- 'fleetbo-enum': FleetboEnumProps;
41
- 'fleetbo-media': FleetboMediaProps;
42
- 'fleetbo-reference': FleetboRefProps;
47
+ namespace React {
48
+ namespace JSX {
49
+ interface IntrinsicElements {
50
+ 'fleetbo-text': FleetboProp;
51
+ 'fleetbo-number': FleetboProp;
52
+ 'fleetbo-toggle': FleetboProp;
53
+ 'fleetbo-date': FleetboProp;
54
+ 'fleetbo-enum': FleetboProp;
55
+ 'fleetbo-media': FleetboProp;
56
+ 'fleetbo-reference': FleetboProp;
57
+ }
43
58
  }
44
59
  }
45
60
  }
@@ -47,198 +62,72 @@ declare global {
47
62
  declare module 'react' {
48
63
  namespace JSX {
49
64
  interface IntrinsicElements {
50
- 'fleetbo-text': FleetboTextProps;
51
- 'fleetbo-number': FleetboNumberProps;
52
- 'fleetbo-toggle': FleetboToggleProps;
53
- 'fleetbo-date': FleetboDateProps;
54
- 'fleetbo-enum': FleetboEnumProps;
55
- 'fleetbo-media': FleetboMediaProps;
56
- 'fleetbo-reference': FleetboRefProps;
65
+ 'fleetbo-text': FleetboProp;
66
+ 'fleetbo-number': FleetboProp;
67
+ 'fleetbo-toggle': FleetboProp;
68
+ 'fleetbo-date': FleetboProp;
69
+ 'fleetbo-enum': FleetboProp;
70
+ 'fleetbo-media': FleetboProp;
71
+ 'fleetbo-reference': FleetboProp;
57
72
  }
58
73
  }
59
74
  }
60
- `;try{c.writeFileSync(o,r),g("\u2192 Created src/auto-imports.d.ts stub for instant IDE auto-completion.")}catch(l){f(`\u26A0\uFE0F Unable to create src/auto-imports.d.ts: ${l.message}`)}}function B(t){let n=["tsconfig.json","jsconfig.json"];for(let o of n){let r=d.join(t,o);if(c.existsSync(r)){let l=new Date;c.utimesSync(r,l,l);break}}}function W(t){let n=d.join(t,"index.d.ts");if(c.existsSync(n))return;c.writeFileSync(n,`// File generated/synchronized by fleetbo-svro \u2014 do not edit manually
61
-
62
- export type FleetboTables = string;
63
-
64
- declare global {
65
- interface ImportMetaEnv {
66
- readonly VITE_FLEETBO_DB_KEY?: string;
67
- readonly VITE_FLEETBO_ENTERPRISE_ID?: string;
68
- readonly [key: string]: any;
69
- }
70
-
71
- interface ImportMeta {
72
- readonly env: ImportMetaEnv;
73
- }
74
- }
75
-
76
- export interface FleetboWriteResult {
77
- success: boolean;
78
- documentId?: string;
79
- mediaUrl?: string;
80
- error?: string;
81
- }
82
-
83
- export interface FleetboCallResult<T = any> {
84
- success: boolean;
85
- data?: T;
86
- error?: string;
87
- }
88
-
89
- export interface FleetboAuthUser {
90
- uid: string;
91
- email?: string | null;
92
- isAnonymous: boolean;
93
- }
94
-
95
- export interface FleetboAuthResult {
96
- success: boolean;
97
- user?: FleetboAuthUser | null;
98
- error?: string;
99
- }
100
-
101
- export declare const FleetboUI: {
102
- Text: string;
103
- Number: string;
104
- Toggle: string;
105
- Date: string;
106
- Enum: string;
107
- Media: string;
108
- Reference: string;
109
- };
110
-
111
- export interface FleetboAclResult {
112
- success: boolean;
113
- error?: string;
114
- }
115
75
 
116
- export interface FleetboJoinOptions {
117
- innerJoin: {
118
- collection: FleetboTables;
119
- on: [string, string, string];
120
- as?: string;
121
- select?: string[];
76
+ declare module '@vue/runtime-core' {
77
+ export interface GlobalComponents {
78
+ 'fleetbo-text': FleetboProp;
79
+ 'fleetbo-number': FleetboProp;
80
+ 'fleetbo-toggle': FleetboProp;
81
+ 'fleetbo-date': FleetboProp;
82
+ 'fleetbo-enum': FleetboProp;
83
+ 'fleetbo-media': FleetboProp;
84
+ 'fleetbo-reference': FleetboProp;
122
85
  }
123
86
  }
124
87
 
125
- export declare const Fleetbo: typeof FleetboUI & {
126
- call: {
127
- [key: string]: <T = any>(payload?: Record<string, any>) => Promise<FleetboCallResult<T>>;
128
- };
129
- add(table: FleetboTables, data: Record<string, any>): Promise<FleetboWriteResult>;
130
- addWithId(table: FleetboTables, data: Record<string, any>, customId: string): Promise<FleetboWriteResult>;
131
- addWithUserId(table: FleetboTables, data: Record<string, any>): Promise<FleetboWriteResult>;
132
- addWithMedia(table: FleetboTables, data: Record<string, any>, fileBase64?: string, fileName?: string): Promise<FleetboWriteResult>;
133
-
134
- getDocsG<T = any>(table: FleetboTables): Promise<T[]>;
135
- getDocsU<T = any>(table: FleetboTables): Promise<T[]>;
136
- getDoc<T = any>(table: FleetboTables, docId: string): Promise<T | null>;
137
- getAuthUser(): Promise<any>;
138
-
139
- delete(table: FleetboTables, docId: string): Promise<FleetboWriteResult>;
140
- update(table: FleetboTables, docId: string, data: Record<string, any>): Promise<FleetboWriteResult>;
141
-
142
- join<T = any>(table: FleetboTables, options: FleetboJoinOptions): Promise<T[]>;
143
-
144
- sendotpsvro(email: string): Promise<FleetboWriteResult>;
145
- verifyotpsvro(email: string, code: string): Promise<FleetboAuthResult>;
146
-
147
- isAuthenticated(forceRefresh?: boolean): Promise<boolean>;
148
- logout(): Promise<{ success: boolean; error?: string }>;
149
- getUser(): Promise<FleetboAuthUser | null>;
150
-
151
- acl: {
152
- grant(targetUserId: string, action: string, resourceTable: FleetboTables, resourceId?: string): Promise<FleetboAclResult>;
153
- revoke(targetUserId: string, action: string, resourceTable: FleetboTables, resourceId?: string): Promise<FleetboAclResult>;
154
- can(action: string, resourceTable: FleetboTables, resourceId?: string): Promise<boolean>;
155
- };
156
- };
157
-
158
- declare global {
88
+ declare module 'preact' {
159
89
  namespace JSX {
160
90
  interface IntrinsicElements {
161
- 'fleetbo-text': {
162
- value?: any;
163
- fallback?: string;
164
- class?: string;
165
- className?: string;
166
- };
167
- 'fleetbo-number': {
168
- value?: any;
169
- 'invalid-fallback'?: string;
170
- currency?: string;
171
- class?: string;
172
- className?: string;
173
- };
174
- 'fleetbo-toggle': {
175
- value?: any;
176
- 'label-true'?: string;
177
- 'label-false'?: string;
178
- 'invalid-fallback'?: string;
179
- class?: string;
180
- className?: string;
181
- };
182
- 'fleetbo-date': {
183
- value?: any;
184
- locale?: string;
185
- 'invalid-fallback'?: string;
186
- class?: string;
187
- className?: string;
188
- };
189
- 'fleetbo-enum': {
190
- value?: any;
191
- allowed?: string;
192
- 'invalid-fallback'?: string;
193
- class?: string;
194
- className?: string;
195
- };
196
- 'fleetbo-media': {
197
- value?: any;
198
- alt?: string;
199
- fallback?: string;
200
- class?: string;
201
- className?: string;
202
- };
203
- 'fleetbo-reference': {
204
- table: FleetboTables;
205
- id?: string;
206
- field?: string;
207
- 'orphan-fallback'?: string;
208
- 'loading-fallback'?: string;
209
- 'malformed-fallback'?: string;
210
- class?: string;
211
- className?: string;
212
- };
91
+ 'fleetbo-text': FleetboProp;
92
+ 'fleetbo-number': FleetboProp;
93
+ 'fleetbo-toggle': FleetboProp;
94
+ 'fleetbo-date': FleetboProp;
95
+ 'fleetbo-enum': FleetboProp;
96
+ 'fleetbo-media': FleetboProp;
97
+ 'fleetbo-reference': FleetboProp;
213
98
  }
214
99
  }
100
+ }
215
101
 
216
- interface HTMLElementTagNameMap {
217
- 'fleetbo-text': HTMLElement;
218
- 'fleetbo-number': HTMLElement;
219
- 'fleetbo-toggle': HTMLElement;
220
- 'fleetbo-date': HTMLElement;
221
- 'fleetbo-enum': HTMLElement;
222
- 'fleetbo-media': HTMLElement;
223
- 'fleetbo-reference': HTMLElement;
224
- }
225
-
226
- const Fleetbo: typeof import('./index').Fleetbo;
227
- const FleetboUI: typeof import('./index').FleetboUI;
228
-
229
- interface Window {
230
- Fleetbo: typeof Fleetbo;
231
- FleetboUI: typeof FleetboUI;
102
+ declare module 'svelte/elements' {
103
+ export interface SvelteHTMLElements {
104
+ 'fleetbo-text': FleetboProp;
105
+ 'fleetbo-number': FleetboProp;
106
+ 'fleetbo-toggle': FleetboProp;
107
+ 'fleetbo-date': FleetboProp;
108
+ 'fleetbo-enum': FleetboProp;
109
+ 'fleetbo-media': FleetboProp;
110
+ 'fleetbo-reference': FleetboProp;
232
111
  }
233
112
  }
234
- `),g("\u2192 Initialized index.d.ts.")}function q(t){return new Promise((n,o)=>{let r=JSON.stringify({token:t}),l={hostname:"bootstrapproject-jqycakhlxa-uc.a.run.app",path:"/",method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(r)}},b=D.request(l,e=>{let a="";e.on("data",s=>{a+=s}),e.on("end",()=>{if(e.statusCode>=200&&e.statusCode<300)try{n(JSON.parse(a))}catch{o(new Error("Invalid response received from Fleetbo server."))}else try{let s=JSON.parse(a);o(new Error(s.error||`Server error ${e.statusCode}`))}catch{o(new Error(`Server error ${e.statusCode}`))}})});b.on("error",e=>o(e)),b.write(r),b.end()})}async function H(t,n=[]){let o=d.join(t,".env");if(c.existsSync(o)&&c.readFileSync(o,"utf8").includes("VITE_FLEETBO_DB_KEY")){g("\u2192 Fleetbo environment variables already present in .env \u2014 skipping step.");return}let r=A(n),l=r.keyApp,b=r.token||r.bootstrapToken,e=r.email||"";(!l||!b)&&(f("\u26A0\uFE0F Missing required parameters."),f("\u{1F449} Usage: npx fleetbo-svro init --keyApp=YOUR_KEY --token=YOUR_TOKEN"),process.exit(1)),g("\u2192 Exchanging bootstrap token for project keys...");let a;try{a=await q(b)}catch(i){f(`\u26A0\uFE0F Token exchange failed: ${i.message}`),f("\u{1F449} The token may have expired (15 min limit) or was already used. Please regenerate one from the Fleetbo dashboard."),process.exit(1)}(!a.enterpriseId||!a.fleetboDBKey)&&(f("\u26A0\uFE0F Incomplete response from Fleetbo server."),process.exit(1));let s=`
235
- VITE_FLEETBO_DB_KEY=${a.fleetboDBKey}
236
- VITE_FLEETBO_ENTERPRISE_ID=${a.enterpriseId}
113
+ `;try{b.writeFileSync(r,s),f("\u2192 Created src/auto-imports.d.ts stub for instant IDE auto-completion.")}catch(l){d(`\u26A0\uFE0F Unable to create src/auto-imports.d.ts: ${l.message}`)}}function M(t){let n=p.join(t,"index.d.ts");b.existsSync(n)||f("\u2192 Verified index.d.ts presence.")}function q(t){let n=["tsconfig.json","jsconfig.json"];for(let r of n){let s=p.join(t,r);if(b.existsSync(s)){let l=new Date;b.utimesSync(s,l,l);break}}}function H(t){return new Promise((n,r)=>{let s=JSON.stringify({token:t}),l={hostname:"bootstrapproject-jqycakhlxa-uc.a.run.app",path:"/",method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(s)}},c=J.request(l,e=>{let i="";e.on("data",o=>{i+=o}),e.on("end",()=>{if(e.statusCode>=200&&e.statusCode<300)try{n(JSON.parse(i))}catch{r(new Error("Invalid response received from Fleetbo server."))}else try{let o=JSON.parse(i);r(new Error(o.error||`Server error ${e.statusCode}`))}catch{r(new Error(`Server error ${e.statusCode}`))}})});c.on("error",e=>r(e)),c.write(s),c.end()})}async function V(t,n=[]){let r=p.join(t,".env");if(b.existsSync(r)&&b.readFileSync(r,"utf8").includes("VITE_FLEETBO_DB_KEY")){f("\u2192 Fleetbo environment variables already present in .env \u2014 skipping step.");return}let s=A(n),l=s.keyApp,c=s.token||s.bootstrapToken,e=s.email||"";(!l||!c)&&(d("\u26A0\uFE0F Missing required parameters."),d("\u{1F449} Usage: npx fleetbo-svro init --keyApp=YOUR_KEY --token=YOUR_TOKEN"),process.exit(1)),f("\u2192 Exchanging bootstrap token for project keys...");let i;try{i=await H(c)}catch(a){d(`\u26A0\uFE0F Token exchange failed: ${a.message}`),d("\u{1F449} The token may have expired (15 min limit) or was already used. Please regenerate one from the Fleetbo dashboard."),process.exit(1)}(!i.enterpriseId||!i.fleetboDBKey)&&(d("\u26A0\uFE0F Incomplete response from Fleetbo server."),process.exit(1));let o=`
114
+ VITE_FLEETBO_DB_KEY=${i.fleetboDBKey}
115
+ VITE_FLEETBO_ENTERPRISE_ID=${i.enterpriseId}
237
116
  VITE_FLEETBO_KEY_APP=${l}
238
117
  ${e?`VITE_FLEETBO_TESTER_EMAIL=${e}
239
- `:""}`;c.appendFileSync(o,s),g(".env file updated successfully with Fleetbo keys!")}function x(t){let n=d.join(t,"svro.d.ts");if(c.existsSync(n))try{c.unlinkSync(n),g("\u2192 Removed legacy svro.d.ts from project root.")}catch{}}function k(t,n){if(process.env.FLEETBO_SKIP_TYPECHECK_SETUP)return;let o=d.join(t,"tsconfig.json"),r=d.join(t,"jsconfig.json"),l=c.existsSync(o)?o:r,b=!c.existsSync(l),e={};if(!b)try{e=JSON.parse(c.readFileSync(l,"utf8"))}catch{f(`\u26A0\uFE0F Unable to read ${d.basename(l)} (Invalid JSON).`);return}e.compilerOptions=e.compilerOptions||{};let a=!1,s=E(n,"react"),i=E(n,"vite");b?(e.compilerOptions.checkJs=!0,e.compilerOptions.allowJs=!0,e.compilerOptions.target=e.compilerOptions.target||"ES2020",e.compilerOptions.module=e.compilerOptions.module||"ESNext",e.compilerOptions.moduleResolution=e.compilerOptions.moduleResolution||"bundler",e.include=e.include||["src"],a=!0):(e.compilerOptions.checkJs===void 0&&(e.compilerOptions.checkJs=!0,a=!0),e.compilerOptions.allowJs===void 0&&(e.compilerOptions.allowJs=!0,a=!0)),s&&e.compilerOptions.jsx===void 0&&(e.compilerOptions.jsx="react-jsx",a=!0),i&&e.compilerOptions.types===void 0&&(e.compilerOptions.types=["vite/client"],a=!0),a&&(c.writeFileSync(l,JSON.stringify(e,null,2)+`
240
- `),g(`\u2192 Updated ${d.basename(l)}.`))}function O(t,n){if(process.env.FLEETBO_SKIP_AUTOIMPORT_SETUP)return;let r=["vite.config.ts","vite.config.js","vite.config.mjs"].map(s=>d.join(t,s)).find(s=>c.existsSync(s));if(!r)return;let l;try{l=c.readFileSync(r,"utf8")}catch{return}let b="fleetbo-svro",e=l,a=`{
118
+ `:""}`;b.appendFileSync(r,o),f(".env file updated successfully with Fleetbo keys!")}function I(t){let n=p.join(t,"svro.d.ts");if(b.existsSync(n))try{b.unlinkSync(n),f("\u2192 Removed legacy svro.d.ts from project root.")}catch{}}function O(t,n){if(process.env.FLEETBO_SKIP_TYPECHECK_SETUP)return;let r=p.join(t,"tsconfig.json"),s=p.join(t,"jsconfig.json"),l=b.existsSync(r)?r:s,c=!b.existsSync(l),e={};if(!c)try{e=JSON.parse(b.readFileSync(l,"utf8"))}catch{d(`\u26A0\uFE0F Unable to read ${p.basename(l)} (Invalid JSON).`);return}e.compilerOptions=e.compilerOptions||{};let i=!1,o=E(n,"react"),a=E(n,"vite");c?(e.compilerOptions.checkJs=!0,e.compilerOptions.allowJs=!0,e.compilerOptions.target=e.compilerOptions.target||"ES2020",e.compilerOptions.module=e.compilerOptions.module||"ESNext",e.compilerOptions.moduleResolution=e.compilerOptions.moduleResolution||"bundler",e.include=e.include||["src"],i=!0):(e.compilerOptions.checkJs===void 0&&(e.compilerOptions.checkJs=!0,i=!0),e.compilerOptions.allowJs===void 0&&(e.compilerOptions.allowJs=!0,i=!0)),o&&e.compilerOptions.jsx===void 0&&(e.compilerOptions.jsx="react-jsx",i=!0),a&&e.compilerOptions.types===void 0&&(e.compilerOptions.types=["vite/client"],i=!0),i&&(b.writeFileSync(l,JSON.stringify(e,null,2)+`
119
+ `),f(`\u2192 Updated ${p.basename(l)}.`))}function w(t,n){if(process.env.FLEETBO_SKIP_AUTOIMPORT_SETUP)return;let s=["vite.config.ts","vite.config.js","vite.config.mjs"].map(o=>p.join(t,o)).find(o=>b.existsSync(o));if(!s)return;let l;try{l=b.readFileSync(s,"utf8")}catch{return}let c="fleetbo-svro",e=l,i=`{
241
120
  name: 'fleetbo-schema-sync-middleware',
121
+ transformIndexHtml() {
122
+ return [
123
+ {
124
+ tag: 'script',
125
+ attrs: { type: 'module' },
126
+ children: "import 'fleetbo-svro';",
127
+ injectTo: 'head-prepend'
128
+ }
129
+ ];
130
+ },
242
131
  configureServer(server) {
243
132
  server.middlewares.use('/__fleetbo_sync_schema', (req, res) => {
244
133
  if (req.method === 'POST') {
@@ -280,24 +169,24 @@ ${e?`VITE_FLEETBO_TESTER_EMAIL=${e}
280
169
  watch: {
281
170
  ignored: ['**/svro.schema.json', '**/src/auto-imports.d.ts']
282
171
  }
283
- },`))),e.includes("unplugin-auto-import"))e.includes("fleetbo-svro")&&!e.includes("FleetboUI")&&(e=e.replace(/imports\s*:\s*\[\s*\{\s*['"]fleetbo-svro(?:|\/vue)['"]\s*:\s*\[[^\]]*\]\s*\}\s*\]/g,`imports: [{ '${b}': ['Fleetbo', 'FleetboUI'] }]`));else{let s=e.match(/plugins\s*:\s*\[/);if(s){let i=s.index+s[0].length,h=`
172
+ },`))),e.includes("unplugin-auto-import"))e.includes("fleetbo-svro")&&!e.includes("FleetboUI")&&(e=e.replace(/imports\s*:\s*\[\s*\{\s*['"]fleetbo-svro(?:|\/vue)['"]\s*:\s*\[[^\]]*\]\s*\}\s*\]/g,`imports: [{ '${c}': ['Fleetbo'] }]`));else{let o=e.match(/plugins\s*:\s*\[/);if(o){let a=o.index+o[0].length,P=`
284
173
  AutoImport({
285
- imports: [{ '${b}': ['Fleetbo', 'FleetboUI'] }],
174
+ imports: [{ '${c}': ['Fleetbo'] }],
286
175
  dts: 'src/auto-imports.d.ts'
287
- }),`;if(e=e.slice(0,i)+h+e.slice(i),!e.includes("import AutoImport")){let T=[...e.matchAll(/^import .+;?$/gm)].pop(),v=`import AutoImport from 'unplugin-auto-import/vite';
288
- `;if(T){let p=T.index+T[0].length;e=e.slice(0,p)+`
289
- `+v+e.slice(p)}else e=v+e}}}if(e.includes("__fleetbo_sync_schema")){if(e.includes("require('fs')")||e.includes('require("fs")')){let s=/\{\s*name:\s*['"]fleetbo-schema-sync-middleware['"][\s\S]*?\},/g;s.test(e)&&(e=e.replace(s,a),g("\u2192 Updated legacy Fleetbo middleware to modern ESM version."))}}else{let s=e.match(/plugins\s*:\s*\[/);if(s){let i=s.index+s[0].length;e=e.slice(0,i)+`
290
- `+a+e.slice(i)}}if(e!==l)try{c.writeFileSync(r,e),g(`\u2192 Updated ${d.basename(r)} with Watcher and AutoImport configuration.`)}catch(s){f(`\u26A0\uFE0F Failed to write to ${d.basename(r)}: ${s.message}`)}try{let s=JSON.parse(c.readFileSync(n,"utf8"));s.devDependencies=s.devDependencies||{},s.devDependencies["unplugin-auto-import"]||(s.devDependencies["unplugin-auto-import"]="^0.18.0",c.writeFileSync(n,JSON.stringify(s,null,2)+`
291
- `),g("\u2192 Added unplugin-auto-import to devDependencies."))}catch(s){f(`\u26A0\uFE0F Failed to update ${d.basename(n)}: ${s.message}`)}}function V(t,n,o={}){let{skipSelfInstall:r=!1}=o,l=d.join(__dirname,"..");r||M(t,n),J(t),W(l),$(t),x(t),k(t,n),O(t,n)}R.exports={touchTsConfig:B,log:g,logError:f,handleAuthAndEnv:H,detectDependency:E,cleanupLegacyRootDts:x,patchJsOrTsConfig:k,attemptViteAutoImportPatch:O,runFullSetup:V}});var m=require("fs"),y=require("path"),w=require("https"),{runFullSetup:K,handleAuthAndEnv:Y,touchTsConfig:X}=N(),G="\x1B[34m",z="\x1B[31m",_="\x1B[0m";function u(t){console.log(`${G}${t}${_}`)}function F(t){console.error(`${z}${t}${_}`)}function Q(t,n){return new Promise((o,r)=>{let l=JSON.stringify({enterpriseID:t,schema:n}),b={hostname:"fleetbo-gatekeeper.fleetbo.workers.dev",path:"/sync-schema",method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(l)}},e=w.request(b,a=>{let s="";a.on("data",i=>{s+=i}),a.on("end",()=>{a.statusCode>=200&&a.statusCode<300?o(JSON.parse(s)):r(new Error(`Edge sync failed with HTTP ${a.statusCode}`))})});e.on("error",a=>r(a)),e.write(l),e.end()})}function Z(t){let n=y.join(t,".env");if(!m.existsSync(n))return{};let o=m.readFileSync(n,"utf8"),r={};return o.split(`
292
- `).forEach(l=>{let[b,...e]=l.split("=");b&&e.length>0&&(r[b.trim()]=e.join("=").trim())}),r}function ee(t){return new Promise((n,o)=>{let r=JSON.stringify({projectId:t,moduleName:"svro.schema.json"}),l={hostname:"getmodulecache-jqycakhlxa-uc.a.run.app",path:"/",method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(r)}},b=w.request(l,e=>{let a="";e.on("data",s=>{a+=s}),e.on("end",()=>{if(e.statusCode>=200&&e.statusCode<300)try{let s=JSON.parse(a);if(s.success&&s.found&&s.module){let i=s.module.code||s.module.mockCode;n(typeof i=="string"?JSON.parse(i):i)}else o(new Error("Schema not found in Fleetbo Cloud."))}catch{o(new Error("Invalid JSON response received from Fleetbo server."))}else o(new Error(`Server error ${e.statusCode}`))})});b.on("error",e=>o(e)),b.write(r),b.end()})}var I=process.argv.slice(2),P=I[0];async function te(){let t=process.cwd(),n=y.join(t,"package.json");if(P==="init"||P==="doctor")u(`
293
- [Fleetbo] Initializing and configuring Fleetbo...`),await Y(t,I),K(t,n),u(`
176
+ }),`;if(e=e.slice(0,a)+P+e.slice(a),!e.includes("import AutoImport")){let h=[...e.matchAll(/^import .+;?$/gm)].pop(),v=`import AutoImport from 'unplugin-auto-import/vite';
177
+ `;if(h){let u=h.index+h[0].length;e=e.slice(0,u)+`
178
+ `+v+e.slice(u)}else e=v+e}}}if(e.includes("fleetbo-schema-sync-middleware")||e.includes("__fleetbo_sync_schema")){let o=/\{\s*name:\s*['"]fleetbo-schema-sync-middleware['"][\s\S]*?\},/g;!e.includes("transformIndexHtml")&&o.test(e)&&(e=e.replace(o,i),f("\u2192 Updated Fleetbo Vite plugin with universal runtime injection."))}else{let o=e.match(/plugins\s*:\s*\[/);if(o){let a=o.index+o[0].length;e=e.slice(0,a)+`
179
+ `+i+e.slice(a)}}if(e!==l)try{b.writeFileSync(s,e),f(`\u2192 Updated ${p.basename(s)} with Watcher and AutoImport configuration.`)}catch(o){d(`\u26A0\uFE0F Failed to write to ${p.basename(s)}: ${o.message}`)}try{let o=JSON.parse(b.readFileSync(n,"utf8"));o.devDependencies=o.devDependencies||{},o.devDependencies["unplugin-auto-import"]||(o.devDependencies["unplugin-auto-import"]="^0.18.0",b.writeFileSync(n,JSON.stringify(o,null,2)+`
180
+ `),f("\u2192 Added unplugin-auto-import to devDependencies."))}catch(o){d(`\u26A0\uFE0F Failed to update ${p.basename(n)}: ${o.message}`)}}function W(t,n,r={}){let{skipSelfInstall:s=!1}=r,l=p.join(__dirname,"..");s||N(t,n),U(t),M(l),B(t),I(t),O(t,n),w(t,n)}k.exports={touchTsConfig:q,log:f,logError:d,handleAuthAndEnv:V,detectDependency:E,cleanupLegacyRootDts:I,patchJsOrTsConfig:O,attemptViteAutoImportPatch:w,runFullSetup:W}});var g=require("fs"),F=require("path"),j=require("https"),{runFullSetup:X,handleAuthAndEnv:K,touchTsConfig:G,attemptViteAutoImportPatch:Y}=_(),z="\x1B[34m",Q="\x1B[31m",C="\x1B[0m";function m(t){console.log(`${z}${t}${C}`)}function y(t){console.error(`${Q}${t}${C}`)}function Z(t,n){return new Promise((r,s)=>{let l=JSON.stringify({enterpriseID:t,schema:n}),c={hostname:"fleetbo-gatekeeper.fleetbo.workers.dev",path:"/sync-schema",method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(l)}},e=j.request(c,i=>{let o="";i.on("data",a=>{o+=a}),i.on("end",()=>{i.statusCode>=200&&i.statusCode<300?r(JSON.parse(o)):s(new Error(`Edge sync failed with HTTP ${i.statusCode}`))})});e.on("error",i=>s(i)),e.write(l),e.end()})}function ee(t){let n=F.join(t,".env");if(!g.existsSync(n))return{};let r=g.readFileSync(n,"utf8"),s={};return r.split(`
181
+ `).forEach(l=>{let[c,...e]=l.split("=");c&&e.length>0&&(s[c.trim()]=e.join("=").trim())}),s}function te(t){return new Promise((n,r)=>{let s=JSON.stringify({projectId:t,moduleName:"svro.schema.json"}),l={hostname:"getmodulecache-jqycakhlxa-uc.a.run.app",path:"/",method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(s)}},c=j.request(l,e=>{let i="";e.on("data",o=>{i+=o}),e.on("end",()=>{if(e.statusCode>=200&&e.statusCode<300)try{let o=JSON.parse(i);if(o.success&&o.found&&o.module){let a=o.module.code||o.module.mockCode;n(typeof a=="string"?JSON.parse(a):a)}else r(new Error("Schema not found in Fleetbo Cloud."))}catch{r(new Error("Invalid JSON response received from Fleetbo server."))}else r(new Error(`Server error ${e.statusCode}`))})});c.on("error",e=>r(e)),c.write(s),c.end()})}var T=process.argv.slice(2),S=T[0];async function oe(){let t=process.cwd(),n=F.join(t,"package.json");if(S==="init"||S==="doctor")m(`
182
+ [Fleetbo] Initializing and configuring Fleetbo...`),await K(t,T),X(t,n),m(`
294
183
  [Fleetbo] Configuration completed successfully!
295
- `),u(`
296
- Next step:`),u(` npx fleetbo-svro sync (Sync cloud schema & generate IDE types)
297
- `);else if(P==="sync"){let o=I.includes("--dry-run");u(`[Fleetbo] Syncing schema...${o?" (dry-run)":""}`);let r=y.join(t,"svro.schema.json"),l=y.join(__dirname,".."),b=y.join(l,"index.d.ts"),e=y.join(t,"src","auto-imports.d.ts"),s=Z(t).VITE_FLEETBO_ENTERPRISE_ID;if(s)try{u("\u2192 Fetching latest svro.schema.json from Fleetbo OS...");let i=await ee(s);m.writeFileSync(r,JSON.stringify(i,null,2)+`
298
- `),u("\u2192 Local svro.schema.json updated from FLeetbo OS.")}catch(i){F(`\u26A0\uFE0F Cloud fetch bypassed: ${i.message}. Using local file fallback.`)}else F("\u26A0\uFE0F VITE_FLEETBO_ENTERPRISE_ID missing in .env. Skipping cloud fetch.");m.existsSync(r)||(F("Error: svro.schema.json not found."),process.exit(1));try{let i=JSON.parse(m.readFileSync(r,"utf8")),h=Object.keys(i.collections||{});if(s)try{await Q(s,i),u("\u2192 Schema successfully sealed at Fleetbo Global Edge (O(1)).")}catch(p){F(`\u26A0\uFE0F Fleetbo Edge Shield sync warning: ${p.message}`)}let T=h.length>0?h.map(p=>`'${p}'`).join(" | "):"string",v=`// Generated by fleetbo-svro \u2014 Updated via fleetbo sql sync
184
+ `),m(`
185
+ Next step:`),m(` npx fleetbo-svro sync (Sync cloud schema & generate IDE types)
186
+ `);else if(S==="sync"){let r=T.includes("--dry-run");m(`[Fleetbo] Syncing schema...${r?" (dry-run)":""}`);let s=F.join(t,"svro.schema.json"),l=F.join(__dirname,".."),c=F.join(l,"index.d.ts"),e=F.join(t,"src","auto-imports.d.ts"),o=ee(t).VITE_FLEETBO_ENTERPRISE_ID;if(o)try{m("\u2192 Fetching latest svro.schema.json from Fleetbo OS...");let a=await te(o);g.writeFileSync(s,JSON.stringify(a,null,2)+`
187
+ `),m("\u2192 Local svro.schema.json updated from FLeetbo OS.")}catch(a){y(`\u26A0\uFE0F Cloud fetch bypassed: ${a.message}. Using local file fallback.`)}else y("\u26A0\uFE0F VITE_FLEETBO_ENTERPRISE_ID missing in .env. Skipping cloud fetch.");g.existsSync(s)||(y("Error: svro.schema.json not found."),process.exit(1));try{let a=JSON.parse(g.readFileSync(s,"utf8")),P=Object.keys(a.collections||{});if(o)try{await Z(o,a),m("\u2192 Schema successfully sealed at Fleetbo Global Edge (O(1)).")}catch(u){y(`\u26A0\uFE0F Fleetbo Edge Shield sync warning: ${u.message}`)}let h=P.length>0?P.map(u=>`'${u}'`).join(" | "):"string",v=`// Generated by fleetbo-svro \u2014 Updated via fleetbo sync
299
188
 
300
- export type FleetboTables = ${T};
189
+ export type FleetboTables = ${h};
301
190
 
302
191
  declare global {
303
192
  interface ImportMetaEnv {
@@ -336,16 +225,6 @@ export interface FleetboAuthResult {
336
225
  error?: string;
337
226
  }
338
227
 
339
- export declare const FleetboUI: {
340
- Text: string;
341
- Number: string;
342
- Toggle: string;
343
- Date: string;
344
- Enum: string;
345
- Media: string;
346
- Reference: string;
347
- };
348
-
349
228
  export interface FleetboAclResult {
350
229
  success: boolean;
351
230
  error?: string;
@@ -360,7 +239,7 @@ export interface FleetboJoinOptions {
360
239
  }
361
240
  }
362
241
 
363
- export declare const Fleetbo: typeof FleetboUI & {
242
+ export declare const Fleetbo: {
364
243
  call: {
365
244
  [key: string]: <T = any>(payload?: Record<string, any>) => Promise<FleetboCallResult<T>>;
366
245
  };
@@ -393,62 +272,33 @@ export declare const Fleetbo: typeof FleetboUI & {
393
272
  };
394
273
  };
395
274
 
275
+ export type FleetboProp = {
276
+ value?: any;
277
+ fallback?: string;
278
+ 'invalid-fallback'?: string;
279
+ currency?: string;
280
+ locale?: string;
281
+ allowed?: string;
282
+ alt?: string;
283
+ table?: FleetboTables | string;
284
+ id?: string;
285
+ field?: string;
286
+ 'label-true'?: string;
287
+ 'label-false'?: string;
288
+ 'orphan-fallback'?: string;
289
+ 'loading-fallback'?: string;
290
+ 'malformed-fallback'?: string;
291
+ class?: string;
292
+ className?: string;
293
+ children?: any;
294
+ [key: string]: any;
295
+ };
296
+
396
297
  declare global {
397
- namespace JSX {
398
- interface IntrinsicElements {
399
- 'fleetbo-text': {
400
- value?: any;
401
- fallback?: string;
402
- class?: string;
403
- className?: string;
404
- };
405
- 'fleetbo-number': {
406
- value?: any;
407
- 'invalid-fallback'?: string;
408
- currency?: string;
409
- class?: string;
410
- className?: string;
411
- };
412
- 'fleetbo-toggle': {
413
- value?: any;
414
- 'label-true'?: string;
415
- 'label-false'?: string;
416
- 'invalid-fallback'?: string;
417
- class?: string;
418
- className?: string;
419
- };
420
- 'fleetbo-date': {
421
- value?: any;
422
- locale?: string;
423
- 'invalid-fallback'?: string;
424
- class?: string;
425
- className?: string;
426
- };
427
- 'fleetbo-enum': {
428
- value?: any;
429
- allowed?: string;
430
- 'invalid-fallback'?: string;
431
- class?: string;
432
- className?: string;
433
- };
434
- 'fleetbo-media': {
435
- value?: any;
436
- alt?: string;
437
- fallback?: string;
438
- class?: string;
439
- className?: string;
440
- };
441
- 'fleetbo-reference': {
442
- table: FleetboTables;
443
- id?: string;
444
- field?: string;
445
- 'orphan-fallback'?: string;
446
- 'loading-fallback'?: string;
447
- 'malformed-fallback'?: string;
448
- class?: string;
449
- className?: string;
450
- };
451
- }
298
+ const Fleetbo: typeof import('./index').Fleetbo;
299
+
300
+ interface Window {
301
+ Fleetbo: typeof Fleetbo;
452
302
  }
453
303
 
454
304
  interface HTMLElementTagNameMap {
@@ -461,54 +311,139 @@ declare global {
461
311
  'fleetbo-reference': HTMLElement;
462
312
  }
463
313
 
464
- const Fleetbo: typeof import('./index').Fleetbo;
465
- const FleetboUI: typeof import('./index').FleetboUI;
314
+ namespace JSX {
315
+ interface IntrinsicElements {
316
+ 'fleetbo-text': FleetboProp;
317
+ 'fleetbo-number': FleetboProp;
318
+ 'fleetbo-toggle': FleetboProp;
319
+ 'fleetbo-date': FleetboProp;
320
+ 'fleetbo-enum': FleetboProp;
321
+ 'fleetbo-media': FleetboProp;
322
+ 'fleetbo-reference': FleetboProp;
323
+ }
324
+ }
466
325
 
467
- interface Window {
468
- Fleetbo: typeof Fleetbo;
469
- FleetboUI: typeof FleetboUI;
326
+ namespace React {
327
+ namespace JSX {
328
+ interface IntrinsicElements {
329
+ 'fleetbo-text': FleetboProp;
330
+ 'fleetbo-number': FleetboProp;
331
+ 'fleetbo-toggle': FleetboProp;
332
+ 'fleetbo-date': FleetboProp;
333
+ 'fleetbo-enum': FleetboProp;
334
+ 'fleetbo-media': FleetboProp;
335
+ 'fleetbo-reference': FleetboProp;
336
+ }
337
+ }
338
+ }
339
+ }
340
+
341
+ declare module 'react' {
342
+ namespace JSX {
343
+ interface IntrinsicElements {
344
+ 'fleetbo-text': FleetboProp;
345
+ 'fleetbo-number': FleetboProp;
346
+ 'fleetbo-toggle': FleetboProp;
347
+ 'fleetbo-date': FleetboProp;
348
+ 'fleetbo-enum': FleetboProp;
349
+ 'fleetbo-media': FleetboProp;
350
+ 'fleetbo-reference': FleetboProp;
351
+ }
352
+ }
353
+ }
354
+
355
+ declare module '@vue/runtime-core' {
356
+ export interface GlobalComponents {
357
+ 'fleetbo-text': FleetboProp;
358
+ 'fleetbo-number': FleetboProp;
359
+ 'fleetbo-toggle': FleetboProp;
360
+ 'fleetbo-date': FleetboProp;
361
+ 'fleetbo-enum': FleetboProp;
362
+ 'fleetbo-media': FleetboProp;
363
+ 'fleetbo-reference': FleetboProp;
470
364
  }
471
365
  }
472
- `;if(m.writeFileSync(b,v),m.existsSync(y.dirname(e))){let p=`/* eslint-disable */
366
+
367
+ declare module 'preact' {
368
+ namespace JSX {
369
+ interface IntrinsicElements {
370
+ 'fleetbo-text': FleetboProp;
371
+ 'fleetbo-number': FleetboProp;
372
+ 'fleetbo-toggle': FleetboProp;
373
+ 'fleetbo-date': FleetboProp;
374
+ 'fleetbo-enum': FleetboProp;
375
+ 'fleetbo-media': FleetboProp;
376
+ 'fleetbo-reference': FleetboProp;
377
+ }
378
+ }
379
+ }
380
+
381
+ declare module 'svelte/elements' {
382
+ export interface SvelteHTMLElements {
383
+ 'fleetbo-text': FleetboProp;
384
+ 'fleetbo-number': FleetboProp;
385
+ 'fleetbo-toggle': FleetboProp;
386
+ 'fleetbo-date': FleetboProp;
387
+ 'fleetbo-enum': FleetboProp;
388
+ 'fleetbo-media': FleetboProp;
389
+ 'fleetbo-reference': FleetboProp;
390
+ }
391
+ }
392
+ `;if(g.writeFileSync(c,v),g.existsSync(F.dirname(e))){let u=`/* eslint-disable */
473
393
  /* prettier-ignore */
474
394
  // @ts-nocheck
475
395
  // Generated by fleetbo-svro \u2014 Updated via fleetbo sync
476
396
  export {}
477
397
 
478
- type FleetboTextProps = { value?: any; fallback?: string; class?: string; className?: string; children?: any; [key: string]: any };
479
- type FleetboNumberProps = { value?: any; 'invalid-fallback'?: string; currency?: string; class?: string; className?: string; [key: string]: any };
480
- type FleetboToggleProps = { value?: any; 'label-true'?: string; 'label-false'?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
481
- type FleetboDateProps = { value?: any; locale?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
482
- type FleetboEnumProps = { value?: any; allowed?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
483
- type FleetboMediaProps = { value?: any; alt?: string; fallback?: string; class?: string; className?: string; [key: string]: any };
484
- type FleetboRefProps = { table: any; id?: string; field?: string; 'orphan-fallback'?: string; 'loading-fallback'?: string; 'malformed-fallback'?: string; class?: string; className?: string; [key: string]: any };
398
+ type FleetboProp = {
399
+ value?: any;
400
+ fallback?: string;
401
+ 'invalid-fallback'?: string;
402
+ currency?: string;
403
+ locale?: string;
404
+ allowed?: string;
405
+ alt?: string;
406
+ table?: any;
407
+ id?: string;
408
+ field?: string;
409
+ 'label-true'?: string;
410
+ 'label-false'?: string;
411
+ 'orphan-fallback'?: string;
412
+ 'loading-fallback'?: string;
413
+ 'malformed-fallback'?: string;
414
+ class?: string;
415
+ className?: string;
416
+ children?: any;
417
+ [key: string]: any;
418
+ };
485
419
 
486
420
  declare global {
487
- type FleetboTables = ${T};
421
+ type FleetboTables = ${h};
488
422
  const Fleetbo: typeof import('fleetbo-svro')['Fleetbo'];
489
- const FleetboUI: typeof import('fleetbo-svro')['FleetboUI'];
490
423
 
491
424
  namespace JSX {
492
425
  interface IntrinsicElements {
493
- 'fleetbo-text': FleetboTextProps;
494
- 'fleetbo-number': FleetboNumberProps;
495
- 'fleetbo-toggle': FleetboToggleProps;
496
- 'fleetbo-date': FleetboDateProps;
497
- 'fleetbo-enum': FleetboEnumProps;
498
- 'fleetbo-media': FleetboMediaProps;
499
- 'fleetbo-reference': FleetboRefProps;
426
+ 'fleetbo-text': FleetboProp;
427
+ 'fleetbo-number': FleetboProp;
428
+ 'fleetbo-toggle': FleetboProp;
429
+ 'fleetbo-date': FleetboProp;
430
+ 'fleetbo-enum': FleetboProp;
431
+ 'fleetbo-media': FleetboProp;
432
+ 'fleetbo-reference': FleetboProp;
500
433
  }
501
434
  }
502
435
 
503
- namespace React.JSX {
504
- interface IntrinsicElements {
505
- 'fleetbo-text': FleetboTextProps;
506
- 'fleetbo-number': FleetboNumberProps;
507
- 'fleetbo-toggle': FleetboToggleProps;
508
- 'fleetbo-date': FleetboDateProps;
509
- 'fleetbo-enum': FleetboEnumProps;
510
- 'fleetbo-media': FleetboMediaProps;
511
- 'fleetbo-reference': FleetboRefProps;
436
+ namespace React {
437
+ namespace JSX {
438
+ interface IntrinsicElements {
439
+ 'fleetbo-text': FleetboProp;
440
+ 'fleetbo-number': FleetboProp;
441
+ 'fleetbo-toggle': FleetboProp;
442
+ 'fleetbo-date': FleetboProp;
443
+ 'fleetbo-enum': FleetboProp;
444
+ 'fleetbo-media': FleetboProp;
445
+ 'fleetbo-reference': FleetboProp;
446
+ }
512
447
  }
513
448
  }
514
449
  }
@@ -516,14 +451,52 @@ declare global {
516
451
  declare module 'react' {
517
452
  namespace JSX {
518
453
  interface IntrinsicElements {
519
- 'fleetbo-text': FleetboTextProps;
520
- 'fleetbo-number': FleetboNumberProps;
521
- 'fleetbo-toggle': FleetboToggleProps;
522
- 'fleetbo-date': FleetboDateProps;
523
- 'fleetbo-enum': FleetboEnumProps;
524
- 'fleetbo-media': FleetboMediaProps;
525
- 'fleetbo-reference': FleetboRefProps;
454
+ 'fleetbo-text': FleetboProp;
455
+ 'fleetbo-number': FleetboProp;
456
+ 'fleetbo-toggle': FleetboProp;
457
+ 'fleetbo-date': FleetboProp;
458
+ 'fleetbo-enum': FleetboProp;
459
+ 'fleetbo-media': FleetboProp;
460
+ 'fleetbo-reference': FleetboProp;
526
461
  }
527
462
  }
528
463
  }
529
- `;m.writeFileSync(e,p)}X(t),u(`[Fleetbo] Schema synced successfully (${h.length} collection(s)).`),o&&u("\u2192 [Dry-run] Schema is valid.")}catch(i){F(`Error during synchronization: ${i.message}`),process.exit(1)}}else F('Unknown command. Usage: "npx fleetbo-svro init" or "npx fleetbo-svro sync"'),process.exit(1)}te().catch(t=>{F(`Fleetbo CLI Error: ${t.message}`),process.exit(1)});
464
+
465
+ declare module '@vue/runtime-core' {
466
+ export interface GlobalComponents {
467
+ 'fleetbo-text': FleetboProp;
468
+ 'fleetbo-number': FleetboProp;
469
+ 'fleetbo-toggle': FleetboProp;
470
+ 'fleetbo-date': FleetboProp;
471
+ 'fleetbo-enum': FleetboProp;
472
+ 'fleetbo-media': FleetboProp;
473
+ 'fleetbo-reference': FleetboProp;
474
+ }
475
+ }
476
+
477
+ declare module 'preact' {
478
+ namespace JSX {
479
+ interface IntrinsicElements {
480
+ 'fleetbo-text': FleetboProp;
481
+ 'fleetbo-number': FleetboProp;
482
+ 'fleetbo-toggle': FleetboProp;
483
+ 'fleetbo-date': FleetboProp;
484
+ 'fleetbo-enum': FleetboProp;
485
+ 'fleetbo-media': FleetboProp;
486
+ 'fleetbo-reference': FleetboProp;
487
+ }
488
+ }
489
+ }
490
+
491
+ declare module 'svelte/elements' {
492
+ export interface SvelteHTMLElements {
493
+ 'fleetbo-text': FleetboProp;
494
+ 'fleetbo-number': FleetboProp;
495
+ 'fleetbo-toggle': FleetboProp;
496
+ 'fleetbo-date': FleetboProp;
497
+ 'fleetbo-enum': FleetboProp;
498
+ 'fleetbo-media': FleetboProp;
499
+ 'fleetbo-reference': FleetboProp;
500
+ }
501
+ }
502
+ `;g.writeFileSync(e,u)}G(t),Y(t,n),m(`[Fleetbo] Schema synced successfully (${P.length} collection(s)).`),r&&m("\u2192 [Dry-run] Schema is valid.")}catch(a){y(`Error during synchronization: ${a.message}`),process.exit(1)}}else y('Unknown command. Usage: "npx fleetbo-svro init" or "npx fleetbo-svro sync"'),process.exit(1)}oe().catch(t=>{y(`Fleetbo CLI Error: ${t.message}`),process.exit(1)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-svro",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",