fleetbo-svro 1.0.8 → 1.0.10
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 +110 -130
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
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
|
|
3
|
-
`),
|
|
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 */
|
|
4
4
|
/* prettier-ignore */
|
|
5
5
|
// @ts-nocheck
|
|
6
6
|
// Generated by fleetbo-svro setup
|
|
7
7
|
export {}
|
|
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 };
|
|
16
|
+
|
|
8
17
|
declare global {
|
|
9
18
|
type FleetboTables = string;
|
|
10
19
|
const Fleetbo: typeof import('fleetbo-svro')['Fleetbo'];
|
|
@@ -12,62 +21,43 @@ declare global {
|
|
|
12
21
|
|
|
13
22
|
namespace JSX {
|
|
14
23
|
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
|
-
};
|
|
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;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
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;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare module 'react' {
|
|
48
|
+
namespace JSX {
|
|
49
|
+
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;
|
|
67
57
|
}
|
|
68
58
|
}
|
|
69
59
|
}
|
|
70
|
-
`;try{c.writeFileSync(o,r),
|
|
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
|
|
71
61
|
|
|
72
62
|
export type FleetboTables = string;
|
|
73
63
|
|
|
@@ -241,13 +231,13 @@ declare global {
|
|
|
241
231
|
FleetboUI: typeof FleetboUI;
|
|
242
232
|
}
|
|
243
233
|
}
|
|
244
|
-
`),
|
|
245
|
-
VITE_FLEETBO_DB_KEY=${
|
|
246
|
-
VITE_FLEETBO_ENTERPRISE_ID=${
|
|
247
|
-
VITE_FLEETBO_KEY_APP=${
|
|
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}
|
|
237
|
+
VITE_FLEETBO_KEY_APP=${l}
|
|
248
238
|
${e?`VITE_FLEETBO_TESTER_EMAIL=${e}
|
|
249
|
-
`:""}`;c.appendFileSync(o,s),
|
|
250
|
-
`),
|
|
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=`{
|
|
251
241
|
name: 'fleetbo-schema-sync-middleware',
|
|
252
242
|
configureServer(server) {
|
|
253
243
|
server.middlewares.use('/__fleetbo_sync_schema', (req, res) => {
|
|
@@ -290,24 +280,24 @@ ${e?`VITE_FLEETBO_TESTER_EMAIL=${e}
|
|
|
290
280
|
watch: {
|
|
291
281
|
ignored: ['**/svro.schema.json', '**/src/auto-imports.d.ts']
|
|
292
282
|
}
|
|
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: [{ '${
|
|
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=`
|
|
294
284
|
AutoImport({
|
|
295
|
-
imports: [{ '${
|
|
285
|
+
imports: [{ '${b}': ['Fleetbo', 'FleetboUI'] }],
|
|
296
286
|
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,
|
|
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(`
|
|
304
294
|
[Fleetbo] Configuration completed successfully!
|
|
305
|
-
`),
|
|
306
|
-
Next step:`),
|
|
307
|
-
`);else if(
|
|
308
|
-
`),
|
|
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
|
|
309
299
|
|
|
310
|
-
export type FleetboTables = ${
|
|
300
|
+
export type FleetboTables = ${T};
|
|
311
301
|
|
|
312
302
|
declare global {
|
|
313
303
|
interface ImportMetaEnv {
|
|
@@ -479,71 +469,61 @@ declare global {
|
|
|
479
469
|
FleetboUI: typeof FleetboUI;
|
|
480
470
|
}
|
|
481
471
|
}
|
|
482
|
-
`;if(
|
|
472
|
+
`;if(m.writeFileSync(b,v),m.existsSync(y.dirname(e))){let p=`/* eslint-disable */
|
|
483
473
|
/* prettier-ignore */
|
|
484
474
|
// @ts-nocheck
|
|
485
475
|
// Generated by fleetbo-svro \u2014 Updated via fleetbo sync
|
|
486
476
|
export {}
|
|
477
|
+
|
|
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 };
|
|
485
|
+
|
|
487
486
|
declare global {
|
|
488
|
-
type FleetboTables = ${
|
|
487
|
+
type FleetboTables = ${T};
|
|
489
488
|
const Fleetbo: typeof import('fleetbo-svro')['Fleetbo'];
|
|
490
489
|
const FleetboUI: typeof import('fleetbo-svro')['FleetboUI'];
|
|
491
490
|
|
|
492
491
|
namespace JSX {
|
|
493
492
|
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
|
-
};
|
|
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;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
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;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
declare module 'react' {
|
|
517
|
+
namespace JSX {
|
|
518
|
+
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;
|
|
546
526
|
}
|
|
547
527
|
}
|
|
548
528
|
}
|
|
549
|
-
`;
|
|
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)});
|