@devup-api/vite-plugin 0.1.3 → 0.1.5

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:C,getOwnPropertyNames:H,getOwnPropertyDescriptor:K}=Object,L=Object.prototype.hasOwnProperty;var E=new WeakMap,P=(x)=>{var b=E.get(x),k;if(b)return b;if(b=C({},"__esModule",{value:!0}),x&&typeof x==="object"||typeof x==="function")H(x).map((q)=>!L.call(b,q)&&C(b,q,{get:()=>x[q],enumerable:!(k=K(x,q))||k.enumerable}));return E.set(x,b),b};var Q=(x,b)=>{for(var k in b)C(x,k,{get:b[k],enumerable:!0,configurable:!0,set:(q)=>b[k]=()=>q})};var R={};Q(R,{devupApi:()=>G,default:()=>G});module.exports=P(R);var F=require("node:path"),B=require("@devup-api/generator"),z=require("@devup-api/utils");function G(x){return{name:"devup-api",async configResolved(){let b=await z.createTmpDirAsync(x?.tempDir),k=await z.readOpenapiAsync(x?.openapiFile);await z.writeInterfaceAsync(F.join(b,"api.d.ts"),B.generateInterface(k,x))},async config(){let b=await z.readOpenapiAsync(x?.openapiFile),k=B.createUrlMap(b,x),q={};if(k)q["process.env.DEVUP_API_URL_MAP"]=JSON.stringify(JSON.stringify(k));return{define:q}}}}
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}}}}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{join as B}from"node:path";import{createUrlMap as C,generateInterface as E}from"@devup-api/generator";import{createTmpDirAsync as F,readOpenapiAsync as z,writeInterfaceAsync as G}from"@devup-api/utils";function H(x){return{name:"devup-api",async configResolved(){let k=await F(x?.tempDir),b=await z(x?.openapiFile);await G(B(k,"api.d.ts"),E(b,x))},async config(){let k=await z(x?.openapiFile),b=C(k,x),q={};if(b)q["process.env.DEVUP_API_URL_MAP"]=JSON.stringify(JSON.stringify(b));return{define:q}}}}export{H as devupApi,H as default};
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 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAOtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAElC,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,MAAM,CA2B1D"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devup-api/vite-plugin",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -20,9 +20,9 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@devup-api/utils": "0.1.3",
24
- "@devup-api/core": "0.1.3",
25
- "@devup-api/generator": "0.1.3"
23
+ "@devup-api/utils": "0.1.5",
24
+ "@devup-api/core": "0.1.5",
25
+ "@devup-api/generator": "0.1.5"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "vite": "*",