@devup-api/vite-plugin 0.1.7 → 0.1.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/index.cjs CHANGED
@@ -1 +1 @@
1
- var{defineProperty:E,getOwnPropertyNames:P,getOwnPropertyDescriptor:Q}=Object,R=Object.prototype.hasOwnProperty;var H=new WeakMap,V=(x)=>{var b=H.get(x),q;if(b)return b;if(b=E({},"__esModule",{value:!0}),x&&typeof x==="object"||typeof x==="function")P(x).map((k)=>!R.call(b,k)&&E(b,k,{get:()=>x[k],enumerable:!(q=Q(x,k))||q.enumerable}));return H.set(x,b),b};var W=(x,b)=>{for(var q in b)E(x,q,{get:b[q],enumerable:!0,configurable:!0,set:(k)=>b[q]=()=>k})};var X={};W(X,{devupApi:()=>L,default:()=>L});module.exports=V(X);var K=require("node:path"),C=require("@devup-api/generator"),B=require("@devup-api/utils");function L(x){return{name:"devup-api",async configResolved(){let b=await B.createTmpDirAsync(x?.tempDir),q=B.normalizeOpenapiFiles(x?.openapiFiles),k=await B.readOpenapiAsync(q);await B.writeInterfaceAsync(K.join(b,"api.d.ts"),C.generateInterface(k,x))},async config(){let b=B.normalizeOpenapiFiles(x?.openapiFiles),q=await B.readOpenapiAsync(b),k=C.createUrlMap(q,x),G={};if(k&&Object.keys(k).length>0)G["process.env.DEVUP_API_URL_MAP"]=JSON.stringify(JSON.stringify(k));return{define:G}}}}
1
+ var{defineProperty:W,getOwnPropertyNames:j,getOwnPropertyDescriptor:w}=Object,z=Object.prototype.hasOwnProperty;var Y=new WeakMap,Z=(x)=>{var b=Y.get(x),G;if(b)return b;if(b=W({},"__esModule",{value:!0}),x&&typeof x==="object"||typeof x==="function")j(x).map((H)=>!z.call(b,H)&&W(b,H,{get:()=>x[H],enumerable:!(G=w(x,H))||G.enumerable}));return Y.set(x,b),b};var l=(x,b)=>{for(var G in b)W(x,G,{get:b[G],enumerable:!0,configurable:!0,set:(H)=>b[G]=()=>H})};var y={};l(y,{devupApi:()=>F,default:()=>F});module.exports=Z(y);var Q=require("node:path"),q=require("@devup-api/generator"),K=require("@devup-api/utils"),N="@devup-api/zod",$=`\x00${N}`,v="@devup-api/ui/crud",J=`\x00${v}`;function F(x){let b=null,G=null,H=null,P=async()=>{if(!b){let k=K.normalizeOpenapiFiles(x?.openapiFiles);b=await K.readOpenapiAsync(k)}return b};return{name:"devup-api",resolveId(k){if(k===N)return $;if(k===v)return J;return null},async load(k){if(k===$){if(!G){let B=await P();G=q.generateZodSchemas(B,x)}return G}if(k===J){if(!H){let B=await P();H=q.generateCrudConfigCode(B)}return H}return null},async configResolved(){let k=await K.createTmpDirAsync(x?.tempDir),B=await P();await K.writeInterfaceAsync(Q.join(k,"api.d.ts"),q.generateInterface(B,x)),await K.writeInterfaceAsync(Q.join(k,"zod.d.ts"),q.generateZodTypeDeclarations(B,x)),await K.writeInterfaceAsync(Q.join(k,"ui.d.ts"),q.generateCrudConfigTypes(B))},async config(){let k=await P(),B=q.createUrlMap(k,x),X={};if(B&&Object.keys(B).length>0)X["process.env.DEVUP_API_URL_MAP"]=JSON.stringify(JSON.stringify(B));return{define:X}}}}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{join as G}from"node:path";import{createUrlMap as H,generateInterface as K}from"@devup-api/generator";import{createTmpDirAsync as L,normalizeOpenapiFiles as C,readOpenapiAsync as E,writeInterfaceAsync as P}from"@devup-api/utils";function Q(x){return{name:"devup-api",async configResolved(){let k=await L(x?.tempDir),q=C(x?.openapiFiles),b=await E(q);await P(G(k,"api.d.ts"),K(b,x))},async config(){let k=C(x?.openapiFiles),q=await E(k),b=H(q,x),B={};if(b&&Object.keys(b).length>0)B["process.env.DEVUP_API_URL_MAP"]=JSON.stringify(JSON.stringify(b));return{define:B}}}}export{Q as devupApi,Q as default};
1
+ import{join as K}from"node:path";import{createUrlMap as J,generateCrudConfigCode as N,generateCrudConfigTypes as v,generateInterface as F,generateZodSchemas as j,generateZodTypeDeclarations as w}from"@devup-api/generator";import{createTmpDirAsync as z,normalizeOpenapiFiles as Z,readOpenapiAsync as l,writeInterfaceAsync as P}from"@devup-api/utils";var Y="@devup-api/zod",W=`\x00${Y}`,$="@devup-api/ui/crud",X=`\x00${$}`;function y(k){let B=null,G=null,H=null,q=async()=>{if(!B){let x=Z(k?.openapiFiles);B=await l(x)}return B};return{name:"devup-api",resolveId(x){if(x===Y)return W;if(x===$)return X;return null},async load(x){if(x===W){if(!G){let b=await q();G=j(b,k)}return G}if(x===X){if(!H){let b=await q();H=N(b)}return H}return null},async configResolved(){let x=await z(k?.tempDir),b=await q();await P(K(x,"api.d.ts"),F(b,k)),await P(K(x,"zod.d.ts"),w(b,k)),await P(K(x,"ui.d.ts"),v(b))},async config(){let x=await q(),b=J(x,k),Q={};if(b&&Object.keys(b).length>0)Q["process.env.DEVUP_API_URL_MAP"]=JSON.stringify(JSON.stringify(b));return{define:Q}}}}export{y as devupApi,y as default};
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAQtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAElC,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,MAAM,CA6B1D"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAgBtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAQlC,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,MAAM,CAwF1D"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@devup-api/vite-plugin",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
+ "types": "./dist/index.d.ts",
8
9
  "import": "./dist/index.js",
9
- "require": "./dist/index.cjs",
10
- "types": "./dist/index.d.ts"
10
+ "require": "./dist/index.cjs"
11
11
  }
12
12
  },
13
13
  "files": [
@@ -20,9 +20,9 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@devup-api/utils": "^workspace:*",
24
- "@devup-api/core": "^workspace:*",
25
- "@devup-api/generator": "^workspace:*"
23
+ "@devup-api/utils": "^0.1.7",
24
+ "@devup-api/core": "^0.1.11",
25
+ "@devup-api/generator": "^0.1.13"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "vite": "*",
@@ -30,6 +30,7 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^25.0",
33
+ "openapi-types": "^12.1",
33
34
  "typescript": "^5.9"
34
35
  }
35
36
  }