ozmoz 0.1.0 → 0.1.2

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 +1 -1
  2. package/package.json +10 -3
package/dist/cli.cjs CHANGED
@@ -130,7 +130,7 @@ FLEETBO_DEV_TOKEN=${i}
130
130
  `),m(`
131
131
  [ozmoZ] Developer token received and stored successfully!`),!process.env.FLEETBO_START&&!["AGENTS.md","CLAUDE.md","GEMINI.md"].some(f=>l.existsSync(c.join(e,f)))&&(m(`
132
132
  Next step to connect your AI agents:`),m(` npx ozmoz mcp (Configure Claude Code, Cursor, Windsurf, Devin, Codex CLI, Gemini CLI)
133
- `)),typeof n.closeAllConnections=="function"&&n.closeAllConnections(),n.close(()=>o()),setTimeout(()=>o(),300)}});n.listen(0,"127.0.0.1",()=>{let t=`https://fleetbo.io/cli-auth?port=${n.address().port}`;m(`
133
+ `)),typeof n.closeAllConnections=="function"&&n.closeAllConnections(),n.close(()=>o()),setTimeout(()=>o(),300)}});n.listen(0,"127.0.0.1",()=>{let t=`https://ozmoz.io/cli-auth?port=${n.address().port}`;m(`
134
134
  [ozmoZ] Waiting for authentication...`),m(`If your browser does not open automatically, visit: ${t}`),Ue(t);let r=Number(process.env.FLEETBO_LOGIN_TIMEOUT_MS)||12e4;setTimeout(()=>{try{typeof n.closeAllConnections=="function"&&n.closeAllConnections()}catch{}n.close(),s(new Error(`Login timed out after ${Math.round(r/1e3)}s: browser approval not received. Run "npx ozmoz login" once more and approve in the browser.`))},r).unref()}),n.on("error",a=>s(a))})}function Me(e,o){return new Promise((s,n)=>{let a=JSON.stringify({enterpriseID:e,schema:o}),t={hostname:"fleetbo-gatekeeper.fleetbo.workers.dev",path:"/sync-schema",method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(a)}},r=ne.request(t,i=>{let d="";i.on("data",u=>{d+=u}),i.on("end",()=>{i.statusCode>=200&&i.statusCode<300?s(JSON.parse(d)):n(new Error(`Edge sync failed with HTTP ${i.statusCode}`))})});r.on("error",i=>n(i)),r.write(a),r.end()})}function V(e){let o=c.join(e,".env");if(!l.existsSync(o))return{};let s=l.readFileSync(o,"utf8"),n={};return s.split(`
135
135
  `).forEach(a=>{let[t,...r]=a.split("=");t&&r.length>0&&(n[t.trim()]=r.join("=").trim())}),n}function Q(e,o){return new Promise((s,n)=>{let a=JSON.stringify({projectId:e,moduleName:o}),t={hostname:"getmodulecache-jqycakhlxa-uc.a.run.app",path:"/",method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(a)}},r=ne.request(t,i=>{let d="";i.on("data",u=>{d+=u}),i.on("end",()=>{if(i.statusCode>=200&&i.statusCode<300)try{let u=JSON.parse(d);if(u.success&&u.found&&u.module){let p=u.module.code||u.module.mockCode;s(typeof p=="string"?JSON.parse(p):p)}else s(null)}catch{n(new Error(`Invalid JSON response for ${o}.`))}else n(new Error(`Server error ${i.statusCode} while fetching ${o}`))})});r.on("error",i=>n(i)),r.write(a),r.end()})}var _=process.argv.slice(2),j=_[0],$e=["id","_id","userId","author","dateCreated","createdAt","_schema_version"],le=e=>$e.includes(e)||/^_/.test(e)||/^(created|updated|modified|deleted)(At|By)$/i.test(e);function W(e){return!e||typeof e!="object"?null:e.fields&&typeof e.fields=="object"?e.fields:e.schema&&typeof e.schema=="object"?e.schema:null}function We(e){let o=[];if(!e||typeof e!="object"||!e.collections)return{schema:e,changed:!1,notes:o};let s=JSON.parse(JSON.stringify(e));return Object.entries(s.collections).forEach(([n,a])=>{let t=W(a);t&&Object.keys(t).forEach(r=>{le(r)&&t[r]&&typeof t[r]=="object"&&t[r].required===!0&&(t[r].required=!1,o.push(n+"."+r))})}),{schema:s,changed:o.length>0,notes:o}}function Be(e){let o=String(typeof e=="string"?e:e&&e.type||"").toLowerCase(),s=e&&(e.enum||e.values||e.options);return Array.isArray(s)&&s.length?JSON.stringify(s[0]):o==="number"||o==="integer"||o==="float"?"0":o==="boolean"||o==="toggle"?"false":o==="date"||o==="datetime"||o==="timestamp"?"new Date().toISOString()":o==="reference"?"'<id du document li\xE9>'":o==="media"?"null /* image/fichier : oz.addWithMedia */":o==="array"?"[]":"'\u2026'"}function Ge(e){let s=Object.entries(e&&e.collections||{}),n=`## \u{1F4E5} CE QUE LE CODE DOIT ENVOYER (MOD\xC8LES D'\xC9CRITURE)
136
136
 
package/package.json CHANGED
@@ -1,9 +1,16 @@
1
1
  {
2
2
  "name": "ozmoz",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "SDK and CLI for the oz.* data API and the <oz-*> web components.",
5
5
  "license": "UNLICENSED",
6
- "keywords": ["ozmoz", "sdk", "cli", "mcp", "ai-agents", "web-components"],
6
+ "keywords": [
7
+ "ozmoz",
8
+ "sdk",
9
+ "cli",
10
+ "mcp",
11
+ "ai-agents",
12
+ "web-components"
13
+ ],
7
14
  "main": "dist/index.js",
8
15
  "type": "module",
9
16
  "exports": {
@@ -36,4 +43,4 @@
36
43
  "typescript": "^7.0.2",
37
44
  "zod": "^4.6.5"
38
45
  }
39
- }
46
+ }