fleetbo-svro 1.0.7 → 1.0.9
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 +111 -130
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
#!/usr/bin/env node
|
|
3
|
+
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)+`
|
|
4
|
+
`),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 */
|
|
4
5
|
/* prettier-ignore */
|
|
5
6
|
// @ts-nocheck
|
|
6
7
|
// Generated by fleetbo-svro setup
|
|
7
8
|
export {}
|
|
9
|
+
|
|
10
|
+
type FleetboTextProps = { value?: any; fallback?: string; class?: string; className?: string; children?: any; [key: string]: any };
|
|
11
|
+
type FleetboNumberProps = { value?: any; 'invalid-fallback'?: string; currency?: string; class?: string; className?: string; [key: string]: any };
|
|
12
|
+
type FleetboToggleProps = { value?: any; 'label-true'?: string; 'label-false'?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
|
|
13
|
+
type FleetboDateProps = { value?: any; locale?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
|
|
14
|
+
type FleetboEnumProps = { value?: any; allowed?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
|
|
15
|
+
type FleetboMediaProps = { value?: any; alt?: string; fallback?: string; class?: string; className?: string; [key: string]: any };
|
|
16
|
+
type FleetboRefProps = { table: any; id?: string; field?: string; 'orphan-fallback'?: string; 'loading-fallback'?: string; 'malformed-fallback'?: string; class?: string; className?: string; [key: string]: any };
|
|
17
|
+
|
|
8
18
|
declare global {
|
|
9
19
|
type FleetboTables = string;
|
|
10
20
|
const Fleetbo: typeof import('fleetbo-svro')['Fleetbo'];
|
|
@@ -12,62 +22,43 @@ declare global {
|
|
|
12
22
|
|
|
13
23
|
namespace JSX {
|
|
14
24
|
interface IntrinsicElements {
|
|
15
|
-
'fleetbo-text':
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'fleetbo-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
'fleetbo-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
'fleetbo-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
className?: string;
|
|
49
|
-
};
|
|
50
|
-
'fleetbo-media': {
|
|
51
|
-
value?: any;
|
|
52
|
-
alt?: string;
|
|
53
|
-
fallback?: string;
|
|
54
|
-
class?: string;
|
|
55
|
-
className?: string;
|
|
56
|
-
};
|
|
57
|
-
'fleetbo-reference': {
|
|
58
|
-
table: FleetboTables;
|
|
59
|
-
id?: string;
|
|
60
|
-
field?: string;
|
|
61
|
-
'orphan-fallback'?: string;
|
|
62
|
-
'loading-fallback'?: string;
|
|
63
|
-
'malformed-fallback'?: string;
|
|
64
|
-
class?: string;
|
|
65
|
-
className?: string;
|
|
66
|
-
};
|
|
25
|
+
'fleetbo-text': FleetboTextProps;
|
|
26
|
+
'fleetbo-number': FleetboNumberProps;
|
|
27
|
+
'fleetbo-toggle': FleetboToggleProps;
|
|
28
|
+
'fleetbo-date': FleetboDateProps;
|
|
29
|
+
'fleetbo-enum': FleetboEnumProps;
|
|
30
|
+
'fleetbo-media': FleetboMediaProps;
|
|
31
|
+
'fleetbo-reference': FleetboRefProps;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
namespace React.JSX {
|
|
36
|
+
interface IntrinsicElements {
|
|
37
|
+
'fleetbo-text': FleetboTextProps;
|
|
38
|
+
'fleetbo-number': FleetboNumberProps;
|
|
39
|
+
'fleetbo-toggle': FleetboToggleProps;
|
|
40
|
+
'fleetbo-date': FleetboDateProps;
|
|
41
|
+
'fleetbo-enum': FleetboEnumProps;
|
|
42
|
+
'fleetbo-media': FleetboMediaProps;
|
|
43
|
+
'fleetbo-reference': FleetboRefProps;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare module 'react' {
|
|
49
|
+
namespace JSX {
|
|
50
|
+
interface IntrinsicElements {
|
|
51
|
+
'fleetbo-text': FleetboTextProps;
|
|
52
|
+
'fleetbo-number': FleetboNumberProps;
|
|
53
|
+
'fleetbo-toggle': FleetboToggleProps;
|
|
54
|
+
'fleetbo-date': FleetboDateProps;
|
|
55
|
+
'fleetbo-enum': FleetboEnumProps;
|
|
56
|
+
'fleetbo-media': FleetboMediaProps;
|
|
57
|
+
'fleetbo-reference': FleetboRefProps;
|
|
67
58
|
}
|
|
68
59
|
}
|
|
69
60
|
}
|
|
70
|
-
`;try{c.writeFileSync(o,r),
|
|
61
|
+
`;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
|
|
71
62
|
|
|
72
63
|
export type FleetboTables = string;
|
|
73
64
|
|
|
@@ -241,13 +232,13 @@ declare global {
|
|
|
241
232
|
FleetboUI: typeof FleetboUI;
|
|
242
233
|
}
|
|
243
234
|
}
|
|
244
|
-
`),
|
|
245
|
-
VITE_FLEETBO_DB_KEY=${
|
|
246
|
-
VITE_FLEETBO_ENTERPRISE_ID=${
|
|
247
|
-
VITE_FLEETBO_KEY_APP=${
|
|
235
|
+
`),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=`
|
|
236
|
+
VITE_FLEETBO_DB_KEY=${a.fleetboDBKey}
|
|
237
|
+
VITE_FLEETBO_ENTERPRISE_ID=${a.enterpriseId}
|
|
238
|
+
VITE_FLEETBO_KEY_APP=${l}
|
|
248
239
|
${e?`VITE_FLEETBO_TESTER_EMAIL=${e}
|
|
249
|
-
`:""}`;c.appendFileSync(o,s),
|
|
250
|
-
`),
|
|
240
|
+
`:""}`;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)+`
|
|
241
|
+
`),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=`{
|
|
251
242
|
name: 'fleetbo-schema-sync-middleware',
|
|
252
243
|
configureServer(server) {
|
|
253
244
|
server.middlewares.use('/__fleetbo_sync_schema', (req, res) => {
|
|
@@ -290,24 +281,24 @@ ${e?`VITE_FLEETBO_TESTER_EMAIL=${e}
|
|
|
290
281
|
watch: {
|
|
291
282
|
ignored: ['**/svro.schema.json', '**/src/auto-imports.d.ts']
|
|
292
283
|
}
|
|
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: [{ '${
|
|
284
|
+
},`))),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=`
|
|
294
285
|
AutoImport({
|
|
295
|
-
imports: [{ '${
|
|
286
|
+
imports: [{ '${b}': ['Fleetbo', 'FleetboUI'] }],
|
|
296
287
|
dts: 'src/auto-imports.d.ts'
|
|
297
|
-
}),`;if(e=e.slice(0,
|
|
298
|
-
`;if(
|
|
299
|
-
`+
|
|
300
|
-
`+
|
|
301
|
-
`),
|
|
302
|
-
`).forEach(
|
|
303
|
-
[Fleetbo] Initializing and configuring Fleetbo...`),await Y(t,
|
|
288
|
+
}),`;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';
|
|
289
|
+
`;if(T){let p=T.index+T[0].length;e=e.slice(0,p)+`
|
|
290
|
+
`+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)+`
|
|
291
|
+
`+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)+`
|
|
292
|
+
`),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(`
|
|
293
|
+
`).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(`
|
|
294
|
+
[Fleetbo] Initializing and configuring Fleetbo...`),await Y(t,I),K(t,n),u(`
|
|
304
295
|
[Fleetbo] Configuration completed successfully!
|
|
305
|
-
`),
|
|
306
|
-
Next step:`),
|
|
307
|
-
`);else if(
|
|
308
|
-
`),
|
|
296
|
+
`),u(`
|
|
297
|
+
Next step:`),u(` npx fleetbo-svro sync (Sync cloud schema & generate IDE types)
|
|
298
|
+
`);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)+`
|
|
299
|
+
`),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
|
|
309
300
|
|
|
310
|
-
export type FleetboTables = ${
|
|
301
|
+
export type FleetboTables = ${T};
|
|
311
302
|
|
|
312
303
|
declare global {
|
|
313
304
|
interface ImportMetaEnv {
|
|
@@ -479,71 +470,61 @@ declare global {
|
|
|
479
470
|
FleetboUI: typeof FleetboUI;
|
|
480
471
|
}
|
|
481
472
|
}
|
|
482
|
-
`;if(
|
|
473
|
+
`;if(m.writeFileSync(b,v),m.existsSync(y.dirname(e))){let p=`/* eslint-disable */
|
|
483
474
|
/* prettier-ignore */
|
|
484
475
|
// @ts-nocheck
|
|
485
476
|
// Generated by fleetbo-svro \u2014 Updated via fleetbo sync
|
|
486
477
|
export {}
|
|
478
|
+
|
|
479
|
+
type FleetboTextProps = { value?: any; fallback?: string; class?: string; className?: string; children?: any; [key: string]: any };
|
|
480
|
+
type FleetboNumberProps = { value?: any; 'invalid-fallback'?: string; currency?: string; class?: string; className?: string; [key: string]: any };
|
|
481
|
+
type FleetboToggleProps = { value?: any; 'label-true'?: string; 'label-false'?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
|
|
482
|
+
type FleetboDateProps = { value?: any; locale?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
|
|
483
|
+
type FleetboEnumProps = { value?: any; allowed?: string; 'invalid-fallback'?: string; class?: string; className?: string; [key: string]: any };
|
|
484
|
+
type FleetboMediaProps = { value?: any; alt?: string; fallback?: string; class?: string; className?: string; [key: string]: any };
|
|
485
|
+
type FleetboRefProps = { table: any; id?: string; field?: string; 'orphan-fallback'?: string; 'loading-fallback'?: string; 'malformed-fallback'?: string; class?: string; className?: string; [key: string]: any };
|
|
486
|
+
|
|
487
487
|
declare global {
|
|
488
|
-
type FleetboTables = ${
|
|
488
|
+
type FleetboTables = ${T};
|
|
489
489
|
const Fleetbo: typeof import('fleetbo-svro')['Fleetbo'];
|
|
490
490
|
const FleetboUI: typeof import('fleetbo-svro')['FleetboUI'];
|
|
491
491
|
|
|
492
492
|
namespace JSX {
|
|
493
493
|
interface IntrinsicElements {
|
|
494
|
-
'fleetbo-text':
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
'fleetbo-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
'fleetbo-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
'fleetbo-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
className?: string;
|
|
528
|
-
};
|
|
529
|
-
'fleetbo-media': {
|
|
530
|
-
value?: any;
|
|
531
|
-
alt?: string;
|
|
532
|
-
fallback?: string;
|
|
533
|
-
class?: string;
|
|
534
|
-
className?: string;
|
|
535
|
-
};
|
|
536
|
-
'fleetbo-reference': {
|
|
537
|
-
table: FleetboTables;
|
|
538
|
-
id?: string;
|
|
539
|
-
field?: string;
|
|
540
|
-
'orphan-fallback'?: string;
|
|
541
|
-
'loading-fallback'?: string;
|
|
542
|
-
'malformed-fallback'?: string;
|
|
543
|
-
class?: string;
|
|
544
|
-
className?: string;
|
|
545
|
-
};
|
|
494
|
+
'fleetbo-text': FleetboTextProps;
|
|
495
|
+
'fleetbo-number': FleetboNumberProps;
|
|
496
|
+
'fleetbo-toggle': FleetboToggleProps;
|
|
497
|
+
'fleetbo-date': FleetboDateProps;
|
|
498
|
+
'fleetbo-enum': FleetboEnumProps;
|
|
499
|
+
'fleetbo-media': FleetboMediaProps;
|
|
500
|
+
'fleetbo-reference': FleetboRefProps;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
namespace React.JSX {
|
|
505
|
+
interface IntrinsicElements {
|
|
506
|
+
'fleetbo-text': FleetboTextProps;
|
|
507
|
+
'fleetbo-number': FleetboNumberProps;
|
|
508
|
+
'fleetbo-toggle': FleetboToggleProps;
|
|
509
|
+
'fleetbo-date': FleetboDateProps;
|
|
510
|
+
'fleetbo-enum': FleetboEnumProps;
|
|
511
|
+
'fleetbo-media': FleetboMediaProps;
|
|
512
|
+
'fleetbo-reference': FleetboRefProps;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
declare module 'react' {
|
|
518
|
+
namespace JSX {
|
|
519
|
+
interface IntrinsicElements {
|
|
520
|
+
'fleetbo-text': FleetboTextProps;
|
|
521
|
+
'fleetbo-number': FleetboNumberProps;
|
|
522
|
+
'fleetbo-toggle': FleetboToggleProps;
|
|
523
|
+
'fleetbo-date': FleetboDateProps;
|
|
524
|
+
'fleetbo-enum': FleetboEnumProps;
|
|
525
|
+
'fleetbo-media': FleetboMediaProps;
|
|
526
|
+
'fleetbo-reference': FleetboRefProps;
|
|
546
527
|
}
|
|
547
528
|
}
|
|
548
529
|
}
|
|
549
|
-
`;
|
|
530
|
+
`;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)});
|