@devup-api/next-plugin 0.1.3 → 0.1.4

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:G,getOwnPropertyNames:Q,getOwnPropertyDescriptor:R}=Object,S=Object.prototype.hasOwnProperty;var H=new WeakMap,V=(x)=>{var q=H.get(x),z;if(q)return q;if(q=G({},"__esModule",{value:!0}),x&&typeof x==="object"||typeof x==="function")Q(x).map((y)=>!S.call(q,y)&&G(q,y,{get:()=>x[y],enumerable:!(z=R(x,y))||z.enumerable}));return H.set(x,q),q};var X=(x,q)=>{for(var z in q)G(x,z,{get:q[z],enumerable:!0,configurable:!0,set:(y)=>q[z]=()=>y})};var Y={};X(Y,{devupApi:()=>L,default:()=>L});module.exports=V(Y);var J=require("node:path"),F=require("@devup-api/generator"),A=require("@devup-api/utils"),K=require("@devup-api/webpack-plugin");function L(x,q={}){if(process.env.TURBOPACK==="1"||process.env.TURBOPACK==="auto"){let B=A.createTmpDir(q?.tempDir),E=A.readOpenapi(q?.openapiFile);A.writeInterface(J.join(B,"api.d.ts"),F.generateInterface(E,q));let N=F.createUrlMap(E,q);return x.env??={},Object.assign(x.env,{DEVUP_API_URL_MAP:JSON.stringify(N)}),x}let y=x.webpack;return x.webpack=(B,E)=>{if(B.plugins.push(new K.devupApiWebpackPlugin(q)),typeof y==="function")return y(B,E);return B},x}
1
+ var{defineProperty:K,getOwnPropertyNames:V,getOwnPropertyDescriptor:X}=Object,Y=Object.prototype.hasOwnProperty;var N=new WeakMap,Z=(x)=>{var q=N.get(x),B;if(q)return q;if(q=K({},"__esModule",{value:!0}),x&&typeof x==="object"||typeof x==="function")V(x).map((y)=>!Y.call(q,y)&&K(q,y,{get:()=>x[y],enumerable:!(B=X(x,y))||B.enumerable}));return N.set(x,q),q};var $=(x,q)=>{for(var B in q)K(x,B,{get:q[B],enumerable:!0,configurable:!0,set:(y)=>q[B]=()=>y})};var j={};$(j,{devupApi:()=>S,default:()=>S});module.exports=Z(j);var Q=require("node:path"),G=require("@devup-api/generator"),A=require("@devup-api/utils"),R=require("@devup-api/webpack-plugin");function S(x,q={}){if(process.env.TURBOPACK==="1"||process.env.TURBOPACK==="auto"){let E=A.createTmpDir(q?.tempDir),H=A.normalizeOpenapiFiles(q?.openapiFiles),L=A.readOpenapis(H);A.writeInterface(Q.join(E,"api.d.ts"),G.generateInterface(L,q));let J=G.createUrlMap(L,q);if(x.env??={},J&&Object.keys(J).length>0)Object.assign(x.env,{DEVUP_API_URL_MAP:JSON.stringify(J)});return x}let y=x.webpack;return x.webpack=(E,H)=>{if(E.plugins.push(new R.devupApiWebpackPlugin(q)),typeof y==="function")return y(E,H);return E},x}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{join as E}from"node:path";import{createUrlMap as F,generateInterface as G}from"@devup-api/generator";import{createTmpDir as H,readOpenapi as J,writeInterface as K}from"@devup-api/utils";import{devupApiWebpackPlugin as L}from"@devup-api/webpack-plugin";function N(x,q={}){if(process.env.TURBOPACK==="1"||process.env.TURBOPACK==="auto"){let y=H(q?.tempDir),z=J(q?.openapiFile);K(E(y,"api.d.ts"),G(z,q));let B=F(z,q);return x.env??={},Object.assign(x.env,{DEVUP_API_URL_MAP:JSON.stringify(B)}),x}let A=x.webpack;return x.webpack=(y,z)=>{if(y.plugins.push(new L(q)),typeof A==="function")return A(y,z);return y},x}export{N as devupApi,N as default};
1
+ import{join as H}from"node:path";import{createUrlMap as J,generateInterface as K}from"@devup-api/generator";import{createTmpDir as L,normalizeOpenapiFiles as N,readOpenapis as Q,writeInterface as R}from"@devup-api/utils";import{devupApiWebpackPlugin as S}from"@devup-api/webpack-plugin";function V(x,q={}){if(process.env.TURBOPACK==="1"||process.env.TURBOPACK==="auto"){let y=L(q?.tempDir),A=N(q?.openapiFiles),G=Q(A);R(H(y,"api.d.ts"),K(G,q));let B=J(G,q);if(x.env??={},B&&Object.keys(B).length>0)Object.assign(x.env,{DEVUP_API_URL_MAP:JSON.stringify(B)});return x}let E=x.webpack;return x.webpack=(y,A)=>{if(y.plugins.push(new S(q)),typeof E==="function")return E(y,A);return y},x}export{V as devupApi,V 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;AAItD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAEtC,wBAAgB,QAAQ,CACtB,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE,eAAoB,GAC5B,UAAU,CA2BZ"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAStD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAEtC,wBAAgB,QAAQ,CACtB,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE,eAAoB,GAC5B,UAAU,CA8BZ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devup-api/next-plugin",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -20,10 +20,10 @@
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",
26
- "@devup-api/webpack-plugin": "0.1.3"
23
+ "@devup-api/utils": "0.1.4",
24
+ "@devup-api/core": "0.1.4",
25
+ "@devup-api/generator": "0.1.4",
26
+ "@devup-api/webpack-plugin": "0.1.4"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "next": "*",