@gopowerteam/request-generate 0.2.2 → 0.3.0
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/bin/download.mts +2 -2
- package/bin/generate.mts +1 -1
- package/bin/index.mts +2 -2
- package/dist/chunk-C0xms8kb.cjs +34 -0
- package/dist/index.cjs +1105 -0
- package/dist/index.d.cts +739 -0
- package/dist/index.d.mts +739 -0
- package/dist/index.mjs +937 -1040
- package/dist/templates/{partials → templates/partials}/export-service-namespace.hbs +1 -1
- package/dist/vite-plugin/index.cjs +238 -0
- package/dist/vite-plugin/index.d.cts +13 -0
- package/dist/vite-plugin/index.d.mts +14 -0
- package/dist/vite-plugin/index.mjs +118 -116
- package/package.json +29 -29
- package/dist/chunk-WF3XBEPN.mjs +0 -18
- package/dist/chunk-XXPGZHWZ.js +0 -10
- package/dist/index.d.ts +0 -165
- package/dist/index.js +0 -1203
- package/dist/vite-plugin/index.d.ts +0 -13
- package/dist/vite-plugin/index.js +0 -231
- /package/dist/templates/{export-model.hbs → templates/export-model.hbs} +0 -0
- /package/dist/templates/{export-service.hbs → templates/export-service.hbs} +0 -0
- /package/dist/templates/{partials → templates/partials}/export-description.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-header.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-model-field.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-model-import.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-model-type.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-operation-params-body.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-operation-params-path.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-operation-params-query.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-operation-response.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-schema-type.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-service-class.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-service-import.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-service-namespace-type.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/export-service-operation.hbs +0 -0
- /package/dist/templates/{partials → templates/partials}/is-required.hbs +0 -0
package/bin/download.mts
CHANGED
|
@@ -32,7 +32,7 @@ const configFilePaths = [
|
|
|
32
32
|
* 加载配置文件
|
|
33
33
|
* @param {*} filePath
|
|
34
34
|
*/
|
|
35
|
-
async function loadConfigFile(filePath) {
|
|
35
|
+
async function loadConfigFile(filePath: string) {
|
|
36
36
|
if (filePath) {
|
|
37
37
|
configFilePaths.unshift(filePath)
|
|
38
38
|
}
|
|
@@ -62,7 +62,7 @@ if (RequestGenerate) {
|
|
|
62
62
|
console.log('接口文件更新完成')
|
|
63
63
|
process.exit(0)
|
|
64
64
|
})
|
|
65
|
-
.catch((error) => {
|
|
65
|
+
.catch((error: Error) => {
|
|
66
66
|
console.error(error)
|
|
67
67
|
process.exit(1)
|
|
68
68
|
})
|
package/bin/generate.mts
CHANGED
package/bin/index.mts
CHANGED
|
@@ -33,7 +33,7 @@ const configFilePaths = [
|
|
|
33
33
|
* @param {*} filePath
|
|
34
34
|
* @returns Promise
|
|
35
35
|
*/
|
|
36
|
-
async function loadConfigFile(filePath) {
|
|
36
|
+
async function loadConfigFile(filePath: string) {
|
|
37
37
|
if (filePath) {
|
|
38
38
|
configFilePaths.unshift(filePath)
|
|
39
39
|
}
|
|
@@ -64,7 +64,7 @@ if (RequestGenerate) {
|
|
|
64
64
|
.then(() => {
|
|
65
65
|
process.exit(0)
|
|
66
66
|
})
|
|
67
|
-
.catch((error) => {
|
|
67
|
+
.catch((error: Error) => {
|
|
68
68
|
console.error(error)
|
|
69
69
|
process.exit(1)
|
|
70
70
|
})
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
Object.defineProperty(exports, '__toESM', {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () {
|
|
32
|
+
return __toESM;
|
|
33
|
+
}
|
|
34
|
+
});
|