@devup-api/rsbuild-plugin 0.1.8 → 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 +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var{defineProperty:
|
|
1
|
+
var{defineProperty:L,getOwnPropertyNames:X,getOwnPropertyDescriptor:Y}=Object,_=Object.prototype.hasOwnProperty;var N=new WeakMap,$=(x)=>{var k=N.get(x),R;if(k)return k;if(k=L({},"__esModule",{value:!0}),x&&typeof x==="object"||typeof x==="function")X(x).map((G)=>!_.call(k,G)&&L(k,G,{get:()=>x[G],enumerable:!(R=Y(x,G))||R.enumerable}));return N.set(x,k),k};var b=(x,k)=>{for(var R in k)L(x,R,{get:k[R],enumerable:!0,configurable:!0,set:(G)=>k[R]=()=>G})};var P={};b(P,{devupApiRsbuildPlugin:()=>Q,default:()=>Q});module.exports=$(P);var E=require("node:path"),B=require("@devup-api/generator"),q=require("@devup-api/utils");function Q(x){return{name:"devup-api",async setup(k){let R=await q.createTmpDirAsync(x?.tempDir),G=q.normalizeOpenapiFiles(x?.openapiFiles),J=await q.readOpenapiAsync(G);await q.writeInterfaceAsync(E.join(R,"api.d.ts"),B.generateInterface(J,x)),await q.writeInterfaceAsync(E.join(R,"zod-schemas.js"),B.generateZodSchemas(J,x)),await q.writeInterfaceAsync(E.join(R,"zod.d.ts"),B.generateZodTypeDeclarations(J,x)),await q.writeInterfaceAsync(E.join(R,"crud-configs.jsx"),B.generateCrudConfigCode(J)),await q.writeInterfaceAsync(E.join(R,"ui.d.ts"),B.generateCrudConfigTypes(J));let K=B.createUrlMap(J,x),V=E.resolve(R,"zod-schemas.js"),W=E.resolve(R,"crud-configs.jsx");k.modifyRsbuildConfig((H)=>{if(H.source??={},H.resolve??={},H.source.define??={},H.resolve.alias??={},K&&Object.keys(K).length>0)H.source.define["process.env.DEVUP_API_URL_MAP"]=JSON.stringify(JSON.stringify(K));return H.resolve.alias["@devup-api/zod"]=V,H.resolve.alias["@devup-api/ui/crud"]=W,H})}}}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{join as
|
|
1
|
+
import{join as B,resolve as H}from"node:path";import{createUrlMap as Q,generateCrudConfigCode as V,generateCrudConfigTypes as W,generateInterface as X,generateZodSchemas as Y,generateZodTypeDeclarations as _}from"@devup-api/generator";import{createTmpDirAsync as $,normalizeOpenapiFiles as b,readOpenapiAsync as P,writeInterfaceAsync as E}from"@devup-api/utils";function U(k){return{name:"devup-api",async setup(J){let R=await $(k?.tempDir),K=b(k?.openapiFiles),q=await P(K);await E(B(R,"api.d.ts"),X(q,k)),await E(B(R,"zod-schemas.js"),Y(q,k)),await E(B(R,"zod.d.ts"),_(q,k)),await E(B(R,"crud-configs.jsx"),V(q)),await E(B(R,"ui.d.ts"),W(q));let G=Q(q,k),L=H(R,"zod-schemas.js"),N=H(R,"crud-configs.jsx");J.modifyRsbuildConfig((x)=>{if(x.source??={},x.resolve??={},x.source.define??={},x.resolve.alias??={},G&&Object.keys(G).length>0)x.source.define["process.env.DEVUP_API_URL_MAP"]=JSON.stringify(JSON.stringify(G));return x.resolve.alias["@devup-api/zod"]=L,x.resolve.alias["@devup-api/ui/crud"]=N,x})}}}export{U as devupApiRsbuildPlugin,U as default};
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAetD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,wBAAgB,qBAAqB,CACnC,OAAO,CAAC,EAAE,eAAe,GACxB,aAAa,CAqEf"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devup-api/rsbuild-plugin",
|
|
3
|
-
"version": "0.1.
|
|
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": "^0.1.
|
|
24
|
-
"@devup-api/core": "^0.1.
|
|
25
|
-
"@devup-api/generator": "^0.1.
|
|
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
|
"@rsbuild/core": "*",
|