@gopowerteam/request-generate 0.3.1 → 0.3.3

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.
Files changed (25) hide show
  1. package/dist/index.mjs +1 -13
  2. package/package.json +6 -9
  3. package/dist/chunk-C0xms8kb.cjs +0 -34
  4. package/dist/index.cjs +0 -1109
  5. package/dist/index.d.cts +0 -739
  6. package/dist/vite-plugin/index.cjs +0 -238
  7. package/dist/vite-plugin/index.d.cts +0 -13
  8. /package/dist/templates/{templates/export-model.hbs → export-model.hbs} +0 -0
  9. /package/dist/templates/{templates/export-service.hbs → export-service.hbs} +0 -0
  10. /package/dist/templates/{templates/partials → partials}/export-description.hbs +0 -0
  11. /package/dist/templates/{templates/partials → partials}/export-header.hbs +0 -0
  12. /package/dist/templates/{templates/partials → partials}/export-model-field.hbs +0 -0
  13. /package/dist/templates/{templates/partials → partials}/export-model-import.hbs +0 -0
  14. /package/dist/templates/{templates/partials → partials}/export-model-type.hbs +0 -0
  15. /package/dist/templates/{templates/partials → partials}/export-operation-params-body.hbs +0 -0
  16. /package/dist/templates/{templates/partials → partials}/export-operation-params-path.hbs +0 -0
  17. /package/dist/templates/{templates/partials → partials}/export-operation-params-query.hbs +0 -0
  18. /package/dist/templates/{templates/partials → partials}/export-operation-response.hbs +0 -0
  19. /package/dist/templates/{templates/partials → partials}/export-schema-type.hbs +0 -0
  20. /package/dist/templates/{templates/partials → partials}/export-service-class.hbs +0 -0
  21. /package/dist/templates/{templates/partials → partials}/export-service-import.hbs +0 -0
  22. /package/dist/templates/{templates/partials → partials}/export-service-namespace-type.hbs +0 -0
  23. /package/dist/templates/{templates/partials → partials}/export-service-namespace.hbs +0 -0
  24. /package/dist/templates/{templates/partials → partials}/export-service-operation.hbs +0 -0
  25. /package/dist/templates/{templates/partials → partials}/is-required.hbs +0 -0
package/dist/index.mjs CHANGED
@@ -771,12 +771,6 @@ function updateProgress(name, type) {
771
771
  updateProgressText(name, progress);
772
772
  }
773
773
 
774
- //#endregion
775
- //#region ../../node_modules/.pnpm/tsdown@0.21.0-beta.2_syncki_b216f7fc79ac747520059b84eac66a21/node_modules/tsdown/esm-shims.js
776
- const getFilename = () => fileURLToPath(import.meta.url);
777
- const getDirname = () => path.dirname(getFilename());
778
- const __dirname = /* @__PURE__ */ getDirname();
779
-
780
774
  //#endregion
781
775
  //#region src/template-helpers/equal.helper.ts
782
776
  const equalHelper = {
@@ -821,6 +815,7 @@ const toUpperHelper = {
821
815
 
822
816
  //#endregion
823
817
  //#region src/template.ts
818
+ const __dirname = path$1.dirname(fileURLToPath(import.meta.url));
824
819
  function registerHandlebarTemplates() {
825
820
  registerHandlebarPartials();
826
821
  registerHandlebarHelpers();
@@ -852,17 +847,10 @@ function registerHandlebarHelpers() {
852
847
  function registerHandlebarHelper(helper) {
853
848
  Handlebars.registerHelper(helper.name, helper.fn);
854
849
  }
855
- /**
856
- * 注册Handlebar模板
857
- */
858
850
  function registerHandlebarPartial(input) {
859
851
  const template = loadHandlebarTemplate(`partials/${input}`);
860
852
  Handlebars.registerPartial(input, template);
861
853
  }
862
- /**
863
- * 加载模板
864
- * @returns 模板内容
865
- */
866
854
  function loadHandlebarTemplate(input) {
867
855
  const templatePath = path$1.resolve(__dirname, "templates", `${input}.hbs`);
868
856
  return fs$1.readFileSync(templatePath, "utf-8");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gopowerteam/request-generate",
3
- "type": "commonjs",
4
- "version": "0.3.1",
3
+ "type": "module",
4
+ "version": "0.3.3",
5
5
  "private": false,
6
6
  "keywords": [
7
7
  "gopowerteam",
@@ -10,17 +10,14 @@
10
10
  "exports": {
11
11
  ".": {
12
12
  "types": "./dist/index.d.mts",
13
- "import": "./dist/index.mjs",
14
- "require": "./dist/index.cjs"
13
+ "import": "./dist/index.mjs"
15
14
  },
16
15
  "./vite-plugin": {
17
16
  "types": "./dist/vite-plugin/index.d.mts",
18
- "import": "./dist/vite-plugin/index.mjs",
19
- "require": "./dist/vite-plugin/index.cjs"
17
+ "import": "./dist/vite-plugin/index.mjs"
20
18
  }
21
19
  },
22
- "main": "./dist/index.cjs",
23
- "module": "./dist/index.mjs",
20
+ "main": "./dist/index.mjs",
24
21
  "types": "./dist/index.d.mts",
25
22
  "bin": {
26
23
  "request-download": "bin/download.mts",
@@ -54,7 +51,7 @@
54
51
  "typescript": "^5.9.3",
55
52
  "vite": "^7.3.1",
56
53
  "vitest": "^3.0.0",
57
- "@gopowerteam/request": "0.2.0"
54
+ "@gopowerteam/request": "0.2.1"
58
55
  },
59
56
  "scripts": {
60
57
  "dev": "tsdown --watch",
@@ -1,34 +0,0 @@
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
- });