fleetbo-svro 1.0.12 → 1.0.14

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 +283 -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,s)=>()=>{try{return s||t((s={exports:{}}).exports,s),s.exports}catch(o){throw s=0,o}};var N=U((oe,R)=>{var c=require("fs"),d=require("path"),j=require("https"),{execSync:D}=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 u(t){console.error(` ${L}${t}${S}`)}function A(t){let s={};return t.forEach(o=>{if(o.startsWith("--")){let[r,l]=o.slice(2).split("=");r&&l&&(s[r]=l)}}),s}function E(t,s){try{let o=JSON.parse(c.readFileSync(t,"utf8"));return!!(o.dependencies&&o.dependencies[s]||o.devDependencies&&o.devDependencies[s])}catch{return!1}}function M(t,s){if(!E(s,"fleetbo-svro")){g("\u2192 Installing fleetbo-svro into the project...");try{D("npm install fleetbo-svro",{cwd:t,stdio:"inherit"}),g("fleetbo-svro installed successfully!")}catch{u("\u26A0\uFE0F Automatic installation failed. Please run 'npm install fleetbo-svro' manually.")}}}function J(t){let s=d.join(t,"svro.schema.json");if(c.existsSync(s))return;let o=new Date().toISOString(),r={createdAt:o,patchedAt:o,schemaVersion:1,collections:{}};c.writeFileSync(s,JSON.stringify(r,null,2)+`
3
- `),g("\u2192 Created svro.schema.json at project root.")}function $(t){let s=d.join(t,"src");if(!c.existsSync(s))return;let o=d.join(s,"auto-imports.d.ts");if(c.existsSync(o))return;let r=`/* eslint-disable */
2
+ var R=(t,o)=>()=>{try{return o||t((o={exports:{}}).exports,o),o.exports}catch(r){throw o=0,r}};var j=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 o={};return t.forEach(r=>{if(r.startsWith("--")){let[s,l]=r.slice(2).split("=");s&&l&&(o[s]=l)}}),o}function E(t,o){try{let r=JSON.parse(b.readFileSync(t,"utf8"));return!!(r.dependencies&&r.dependencies[o]||r.devDependencies&&r.devDependencies[o])}catch{return!1}}function N(t,o){if(!E(o,"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 o=p.join(t,"svro.schema.json");if(b.existsSync(o))return;let r=new Date().toISOString(),s={createdAt:r,patchedAt:r,schemaVersion:1,collections:{}};b.writeFileSync(o,JSON.stringify(s,null,2)+`
3
+ `),f("\u2192 Created svro.schema.json at project root.")}function B(t){let o=p.join(t,"src");if(!b.existsSync(o))return;let r=p.join(o,"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,197 +62,61 @@ 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){u(`\u26A0\uFE0F Unable to create src/auto-imports.d.ts: ${l.message}`)}}function B(t){let s=["tsconfig.json","jsconfig.json"];for(let o of s){let r=d.join(t,o);if(c.existsSync(r)){let l=new Date;c.utimesSync(r,l,l);break}}}function W(t){let s=d.join(t,"index.d.ts");if(c.existsSync(s))return;c.writeFileSync(s,`// 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 H(t){return new Promise((s,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=j.request(l,e=>{let a="";e.on("data",n=>{a+=n}),e.on("end",()=>{if(e.statusCode>=200&&e.statusCode<300)try{s(JSON.parse(a))}catch{o(new Error("Invalid response received from Fleetbo server."))}else try{let n=JSON.parse(a);o(new Error(n.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 q(t,s=[]){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(s),l=r.keyApp,b=r.token||r.bootstrapToken,e=r.email||"";(!l||!b)&&(u("\u26A0\uFE0F Missing required parameters."),u("\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 H(b)}catch(i){u(`\u26A0\uFE0F Token exchange failed: ${i.message}`),u("\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)&&(u("\u26A0\uFE0F Incomplete response from Fleetbo server."),process.exit(1));let n=`
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 o=p.join(t,"index.d.ts");b.existsSync(o)||f("\u2192 Verified index.d.ts presence.")}function q(t){let o=["tsconfig.json","jsconfig.json"];for(let r of o){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((o,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",n=>{i+=n}),e.on("end",()=>{if(e.statusCode>=200&&e.statusCode<300)try{o(JSON.parse(i))}catch{r(new Error("Invalid response received from Fleetbo server."))}else try{let n=JSON.parse(i);r(new Error(n.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,o=[]){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(o),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 n=`
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,n),g(".env file updated successfully with Fleetbo keys!")}function x(t){let s=d.join(t,"svro.d.ts");if(c.existsSync(s))try{c.unlinkSync(s),g("\u2192 Removed legacy svro.d.ts from project root.")}catch{}}function k(t,s){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{u(`\u26A0\uFE0F Unable to read ${d.basename(l)} (Invalid JSON).`);return}e.compilerOptions=e.compilerOptions||{};let a=!1,n=E(s,"react"),i=E(s,"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)),n&&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,s){if(process.env.FLEETBO_SKIP_AUTOIMPORT_SETUP)return;let r=["vite.config.ts","vite.config.js","vite.config.mjs"].map(n=>d.join(t,n)).find(n=>c.existsSync(n));if(!r)return;let l;try{l=c.readFileSync(r,"utf8")}catch{return}let b="fleetbo-svro",e=l,a=`{
118
+ `:""}`;b.appendFileSync(r,n),f(".env file updated successfully with Fleetbo keys!")}function I(t){let o=p.join(t,"svro.d.ts");if(b.existsSync(o))try{b.unlinkSync(o),f("\u2192 Removed legacy svro.d.ts from project root.")}catch{}}function O(t,o){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,n=E(o,"react"),a=E(o,"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)),n&&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,o){if(process.env.FLEETBO_SKIP_AUTOIMPORT_SETUP)return;let s=["vite.config.ts","vite.config.js","vite.config.mjs"].map(n=>p.join(t,n)).find(n=>b.existsSync(n));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',
242
121
  transformIndexHtml() {
243
122
  return [
@@ -290,24 +169,24 @@ ${e?`VITE_FLEETBO_TESTER_EMAIL=${e}
290
169
  watch: {
291
170
  ignored: ['**/svro.schema.json', '**/src/auto-imports.d.ts']
292
171
  }
293
- },`))),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 n=e.match(/plugins\s*:\s*\[/);if(n){let i=n.index+n[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 n=e.match(/plugins\s*:\s*\[/);if(n){let a=n.index+n[0].length,P=`
294
173
  AutoImport({
295
- imports: [{ '${b}': ['Fleetbo', 'FleetboUI'] }],
174
+ imports: [{ '${c}': ['Fleetbo'] }],
296
175
  dts: 'src/auto-imports.d.ts'
297
- }),`;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';
298
- `;if(T){let p=T.index+T[0].length;e=e.slice(0,p)+`
299
- `+v+e.slice(p)}else e=v+e}}}if(e.includes("fleetbo-schema-sync-middleware")||e.includes("__fleetbo_sync_schema")){let n=/\{\s*name:\s*['"]fleetbo-schema-sync-middleware['"][\s\S]*?\},/g;!e.includes("transformIndexHtml")&&n.test(e)&&(e=e.replace(n,a),g("\u2192 Updated Fleetbo Vite plugin with universal runtime injection."))}else{let n=e.match(/plugins\s*:\s*\[/);if(n){let i=n.index+n[0].length;e=e.slice(0,i)+`
300
- `+a+e.slice(i)}}if(e!==l)try{c.writeFileSync(r,e),g(`\u2192 Updated ${d.basename(r)} with Watcher and AutoImport configuration.`)}catch(n){u(`\u26A0\uFE0F Failed to write to ${d.basename(r)}: ${n.message}`)}try{let n=JSON.parse(c.readFileSync(s,"utf8"));n.devDependencies=n.devDependencies||{},n.devDependencies["unplugin-auto-import"]||(n.devDependencies["unplugin-auto-import"]="^0.18.0",c.writeFileSync(s,JSON.stringify(n,null,2)+`
301
- `),g("\u2192 Added unplugin-auto-import to devDependencies."))}catch(n){u(`\u26A0\uFE0F Failed to update ${d.basename(s)}: ${n.message}`)}}function V(t,s,o={}){let{skipSelfInstall:r=!1}=o,l=d.join(__dirname,"..");r||M(t,s),J(t),W(l),$(t),x(t),k(t,s),O(t,s)}R.exports={touchTsConfig:B,log:g,logError:u,handleAuthAndEnv:q,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,attemptViteAutoImportPatch:G}=N(),z="\x1B[34m",Q="\x1B[31m",_="\x1B[0m";function f(t){console.log(`${z}${t}${_}`)}function F(t){console.error(`${Q}${t}${_}`)}function Z(t,s){return new Promise((o,r)=>{let l=JSON.stringify({enterpriseID:t,schema:s}),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 n="";a.on("data",i=>{n+=i}),a.on("end",()=>{a.statusCode>=200&&a.statusCode<300?o(JSON.parse(n)):r(new Error(`Edge sync failed with HTTP ${a.statusCode}`))})});e.on("error",a=>r(a)),e.write(l),e.end()})}function ee(t){let s=y.join(t,".env");if(!m.existsSync(s))return{};let o=m.readFileSync(s,"utf8"),r={};return o.split(`
302
- `).forEach(l=>{let[b,...e]=l.split("=");b&&e.length>0&&(r[b.trim()]=e.join("=").trim())}),r}function te(t){return new Promise((s,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",n=>{a+=n}),e.on("end",()=>{if(e.statusCode>=200&&e.statusCode<300)try{let n=JSON.parse(a);if(n.success&&n.found&&n.module){let i=n.module.code||n.module.mockCode;s(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 se(){let t=process.cwd(),s=y.join(t,"package.json");if(P==="init"||P==="doctor")f(`
303
- [Fleetbo] Initializing and configuring Fleetbo...`),await Y(t,I),K(t,s),f(`
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("transformIndexHtml")){if(e.includes("fleetbo-schema-sync-middleware")){let a=e.indexOf("{");e=e.replace(/\{[^{}]*name:\s*['"]fleetbo-schema-sync-middleware['"][\s\S]*?configureServer[\s\S]*?\}\s*\},?/g,"")}let n=e.match(/plugins\s*:\s*\[/);if(n){let a=n.index+n[0].length;e=e.slice(0,a)+`
179
+ `+i+e.slice(a),f("\u2192 Updated Fleetbo Vite plugin with universal runtime injection.")}}if(e!==l)try{b.writeFileSync(s,e),f(`\u2192 Updated ${p.basename(s)} with Watcher and AutoImport configuration.`)}catch(n){d(`\u26A0\uFE0F Failed to write to ${p.basename(s)}: ${n.message}`)}try{let n=JSON.parse(b.readFileSync(o,"utf8"));n.devDependencies=n.devDependencies||{},n.devDependencies["unplugin-auto-import"]||(n.devDependencies["unplugin-auto-import"]="^0.18.0",b.writeFileSync(o,JSON.stringify(n,null,2)+`
180
+ `),f("\u2192 Added unplugin-auto-import to devDependencies."))}catch(n){d(`\u26A0\uFE0F Failed to update ${p.basename(o)}: ${n.message}`)}}function W(t,o,r={}){let{skipSelfInstall:s=!1}=r,l=p.join(__dirname,"..");s||N(t,o),U(t),M(l),B(t),I(t),O(t,o),w(t,o)}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"),C=require("https"),{runFullSetup:X,handleAuthAndEnv:K,touchTsConfig:G,attemptViteAutoImportPatch:Y}=j(),z="\x1B[34m",Q="\x1B[31m",_="\x1B[0m";function m(t){console.log(`${z}${t}${_}`)}function y(t){console.error(`${Q}${t}${_}`)}function Z(t,o){return new Promise((r,s)=>{let l=JSON.stringify({enterpriseID:t,schema:o}),c={hostname:"fleetbo-gatekeeper.fleetbo.workers.dev",path:"/sync-schema",method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(l)}},e=C.request(c,i=>{let n="";i.on("data",a=>{n+=a}),i.on("end",()=>{i.statusCode>=200&&i.statusCode<300?r(JSON.parse(n)):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 o=F.join(t,".env");if(!g.existsSync(o))return{};let r=g.readFileSync(o,"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((o,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=C.request(l,e=>{let i="";e.on("data",n=>{i+=n}),e.on("end",()=>{if(e.statusCode>=200&&e.statusCode<300)try{let n=JSON.parse(i);if(n.success&&n.found&&n.module){let a=n.module.code||n.module.mockCode;o(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(),o=F.join(t,"package.json");if(S==="init"||S==="doctor")m(`
182
+ [Fleetbo] Initializing and configuring Fleetbo...`),await K(t,T),X(t,o),m(`
304
183
  [Fleetbo] Configuration completed successfully!
305
- `),f(`
306
- Next step:`),f(` npx fleetbo-svro sync (Sync cloud schema & generate IDE types)
307
- `);else if(P==="sync"){let o=I.includes("--dry-run");f(`[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"),n=ee(t).VITE_FLEETBO_ENTERPRISE_ID;if(n)try{f("\u2192 Fetching latest svro.schema.json from Fleetbo OS...");let i=await te(n);m.writeFileSync(r,JSON.stringify(i,null,2)+`
308
- `),f("\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(n)try{await Z(n,i),f("\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"),n=ee(t).VITE_FLEETBO_ENTERPRISE_ID;if(n)try{m("\u2192 Fetching latest svro.schema.json from Fleetbo OS...");let a=await te(n);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(n)try{await Z(n,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
309
188
 
310
- export type FleetboTables = ${T};
189
+ export type FleetboTables = ${h};
311
190
 
312
191
  declare global {
313
192
  interface ImportMetaEnv {
@@ -346,16 +225,6 @@ export interface FleetboAuthResult {
346
225
  error?: string;
347
226
  }
348
227
 
349
- export declare const FleetboUI: {
350
- Text: string;
351
- Number: string;
352
- Toggle: string;
353
- Date: string;
354
- Enum: string;
355
- Media: string;
356
- Reference: string;
357
- };
358
-
359
228
  export interface FleetboAclResult {
360
229
  success: boolean;
361
230
  error?: string;
@@ -370,7 +239,7 @@ export interface FleetboJoinOptions {
370
239
  }
371
240
  }
372
241
 
373
- export declare const Fleetbo: typeof FleetboUI & {
242
+ export declare const Fleetbo: {
374
243
  call: {
375
244
  [key: string]: <T = any>(payload?: Record<string, any>) => Promise<FleetboCallResult<T>>;
376
245
  };
@@ -403,62 +272,33 @@ export declare const Fleetbo: typeof FleetboUI & {
403
272
  };
404
273
  };
405
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
+
406
297
  declare global {
407
- namespace JSX {
408
- interface IntrinsicElements {
409
- 'fleetbo-text': {
410
- value?: any;
411
- fallback?: string;
412
- class?: string;
413
- className?: string;
414
- };
415
- 'fleetbo-number': {
416
- value?: any;
417
- 'invalid-fallback'?: string;
418
- currency?: string;
419
- class?: string;
420
- className?: string;
421
- };
422
- 'fleetbo-toggle': {
423
- value?: any;
424
- 'label-true'?: string;
425
- 'label-false'?: string;
426
- 'invalid-fallback'?: string;
427
- class?: string;
428
- className?: string;
429
- };
430
- 'fleetbo-date': {
431
- value?: any;
432
- locale?: string;
433
- 'invalid-fallback'?: string;
434
- class?: string;
435
- className?: string;
436
- };
437
- 'fleetbo-enum': {
438
- value?: any;
439
- allowed?: string;
440
- 'invalid-fallback'?: string;
441
- class?: string;
442
- className?: string;
443
- };
444
- 'fleetbo-media': {
445
- value?: any;
446
- alt?: string;
447
- fallback?: string;
448
- class?: string;
449
- className?: string;
450
- };
451
- 'fleetbo-reference': {
452
- table: FleetboTables;
453
- id?: string;
454
- field?: string;
455
- 'orphan-fallback'?: string;
456
- 'loading-fallback'?: string;
457
- 'malformed-fallback'?: string;
458
- class?: string;
459
- className?: string;
460
- };
461
- }
298
+ const Fleetbo: typeof import('./index').Fleetbo;
299
+
300
+ interface Window {
301
+ Fleetbo: typeof Fleetbo;
462
302
  }
463
303
 
464
304
  interface HTMLElementTagNameMap {
@@ -471,54 +311,139 @@ declare global {
471
311
  'fleetbo-reference': HTMLElement;
472
312
  }
473
313
 
474
- const Fleetbo: typeof import('./index').Fleetbo;
475
- 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
+ }
476
325
 
477
- interface Window {
478
- Fleetbo: typeof Fleetbo;
479
- 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;
364
+ }
365
+ }
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
+ }
480
378
  }
481
379
  }
482
- `;if(m.writeFileSync(b,v),m.existsSync(y.dirname(e))){let p=`/* eslint-disable */
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 */
483
393
  /* prettier-ignore */
484
394
  // @ts-nocheck
485
395
  // Generated by fleetbo-svro \u2014 Updated via fleetbo sync
486
396
  export {}
487
397
 
488
- type FleetboTextProps = { value?: any; fallback?: string; class?: string; className?: string; children?: any; [key: string]: any };
489
- type FleetboNumberProps = { value?: any; 'invalid-fallback'?: string; currency?: string; class?: string; className?: string; [key: string]: any };
490
- type FleetboToggleProps = { value?: any; 'label-true'?: string; 'label-false'?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
491
- type FleetboDateProps = { value?: any; locale?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
492
- type FleetboEnumProps = { value?: any; allowed?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
493
- type FleetboMediaProps = { value?: any; alt?: string; fallback?: string; class?: string; className?: string; [key: string]: any };
494
- 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
+ };
495
419
 
496
420
  declare global {
497
- type FleetboTables = ${T};
421
+ type FleetboTables = ${h};
498
422
  const Fleetbo: typeof import('fleetbo-svro')['Fleetbo'];
499
- const FleetboUI: typeof import('fleetbo-svro')['FleetboUI'];
500
423
 
501
424
  namespace JSX {
502
425
  interface IntrinsicElements {
503
- 'fleetbo-text': FleetboTextProps;
504
- 'fleetbo-number': FleetboNumberProps;
505
- 'fleetbo-toggle': FleetboToggleProps;
506
- 'fleetbo-date': FleetboDateProps;
507
- 'fleetbo-enum': FleetboEnumProps;
508
- 'fleetbo-media': FleetboMediaProps;
509
- '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;
510
433
  }
511
434
  }
512
435
 
513
- namespace React.JSX {
514
- interface IntrinsicElements {
515
- 'fleetbo-text': FleetboTextProps;
516
- 'fleetbo-number': FleetboNumberProps;
517
- 'fleetbo-toggle': FleetboToggleProps;
518
- 'fleetbo-date': FleetboDateProps;
519
- 'fleetbo-enum': FleetboEnumProps;
520
- 'fleetbo-media': FleetboMediaProps;
521
- '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
+ }
522
447
  }
523
448
  }
524
449
  }
@@ -526,14 +451,52 @@ declare global {
526
451
  declare module 'react' {
527
452
  namespace JSX {
528
453
  interface IntrinsicElements {
529
- 'fleetbo-text': FleetboTextProps;
530
- 'fleetbo-number': FleetboNumberProps;
531
- 'fleetbo-toggle': FleetboToggleProps;
532
- 'fleetbo-date': FleetboDateProps;
533
- 'fleetbo-enum': FleetboEnumProps;
534
- 'fleetbo-media': FleetboMediaProps;
535
- '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;
536
461
  }
537
462
  }
538
463
  }
539
- `;m.writeFileSync(e,p)}X(t),G(t,s),f(`[Fleetbo] Schema synced successfully (${h.length} collection(s)).`),o&&f("\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)}se().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,o),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.12",
3
+ "version": "1.0.14",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",