@gopowerteam/request-generate 0.3.0 → 0.3.2

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 (21) hide show
  1. package/dist/index.cjs +8 -4
  2. package/dist/index.mjs +8 -10
  3. package/package.json +1 -3
  4. /package/dist/templates/{templates/export-model.hbs → export-model.hbs} +0 -0
  5. /package/dist/templates/{templates/export-service.hbs → export-service.hbs} +0 -0
  6. /package/dist/templates/{templates/partials → partials}/export-description.hbs +0 -0
  7. /package/dist/templates/{templates/partials → partials}/export-header.hbs +0 -0
  8. /package/dist/templates/{templates/partials → partials}/export-model-field.hbs +0 -0
  9. /package/dist/templates/{templates/partials → partials}/export-model-import.hbs +0 -0
  10. /package/dist/templates/{templates/partials → partials}/export-model-type.hbs +0 -0
  11. /package/dist/templates/{templates/partials → partials}/export-operation-params-body.hbs +0 -0
  12. /package/dist/templates/{templates/partials → partials}/export-operation-params-path.hbs +0 -0
  13. /package/dist/templates/{templates/partials → partials}/export-operation-params-query.hbs +0 -0
  14. /package/dist/templates/{templates/partials → partials}/export-operation-response.hbs +0 -0
  15. /package/dist/templates/{templates/partials → partials}/export-schema-type.hbs +0 -0
  16. /package/dist/templates/{templates/partials → partials}/export-service-class.hbs +0 -0
  17. /package/dist/templates/{templates/partials → partials}/export-service-import.hbs +0 -0
  18. /package/dist/templates/{templates/partials → partials}/export-service-namespace-type.hbs +0 -0
  19. /package/dist/templates/{templates/partials → partials}/export-service-namespace.hbs +0 -0
  20. /package/dist/templates/{templates/partials → partials}/export-service-operation.hbs +0 -0
  21. /package/dist/templates/{templates/partials → partials}/is-required.hbs +0 -0
package/dist/index.cjs CHANGED
@@ -16,8 +16,6 @@ let _apidevtools_swagger_parser = require("@apidevtools/swagger-parser");
16
16
  _apidevtools_swagger_parser = require_chunk.__toESM(_apidevtools_swagger_parser);
17
17
  let node_crypto = require("node:crypto");
18
18
  node_crypto = require_chunk.__toESM(node_crypto);
19
- let rimraf = require("rimraf");
20
- rimraf = require_chunk.__toESM(rimraf);
21
19
 
22
20
  //#region src/utils/get-services-options.ts
23
21
  /**
@@ -982,7 +980,10 @@ function writeModel(model, output) {
982
980
  function writeModels(client, options) {
983
981
  if (!options.exportModels || !client.models) return;
984
982
  const output = node_path.join(options.output, "models");
985
- if (node_fs.existsSync(output)) rimraf.default.sync(output);
983
+ if (node_fs.existsSync(output)) node_fs.rmSync(output, {
984
+ recursive: true,
985
+ force: true
986
+ });
986
987
  node_fs.mkdirSync(output, { recursive: true });
987
988
  client.models.forEach((model) => {
988
989
  const filename = `${model.name}.ts`;
@@ -1008,7 +1009,10 @@ function writeService(service, output) {
1008
1009
  function writeServices(client, options) {
1009
1010
  if (!client.services) return;
1010
1011
  const output = node_path.join(options.output, "services");
1011
- if (node_fs.existsSync(output)) rimraf.default.sync(output);
1012
+ if (node_fs.existsSync(output)) node_fs.rmSync(output, {
1013
+ recursive: true,
1014
+ force: true
1015
+ });
1012
1016
  node_fs.mkdirSync(output, { recursive: true });
1013
1017
  client.services.forEach((service) => {
1014
1018
  const filename = `${service.name}Service.ts`;
package/dist/index.mjs CHANGED
@@ -5,11 +5,9 @@ import path from "node:path";
5
5
  import process from "node:process";
6
6
  import chalk from "chalk";
7
7
  import ora from "ora";
8
- import { fileURLToPath } from "node:url";
9
8
  import Handlebars from "handlebars";
10
9
  import swaggerParse from "@apidevtools/swagger-parser";
11
10
  import crypto from "node:crypto";
12
- import rimraf from "rimraf";
13
11
 
14
12
  //#region src/utils/get-services-options.ts
15
13
  /**
@@ -772,12 +770,6 @@ function updateProgress(name, type) {
772
770
  updateProgressText(name, progress);
773
771
  }
774
772
 
775
- //#endregion
776
- //#region ../../node_modules/.pnpm/tsdown@0.21.0-beta.2_syncki_b216f7fc79ac747520059b84eac66a21/node_modules/tsdown/esm-shims.js
777
- const getFilename = () => fileURLToPath(import.meta.url);
778
- const getDirname = () => path.dirname(getFilename());
779
- const __dirname = /* @__PURE__ */ getDirname();
780
-
781
773
  //#endregion
782
774
  //#region src/template-helpers/equal.helper.ts
783
775
  const equalHelper = {
@@ -980,7 +972,10 @@ function writeModel(model, output) {
980
972
  function writeModels(client, options) {
981
973
  if (!options.exportModels || !client.models) return;
982
974
  const output = path$1.join(options.output, "models");
983
- if (fs$1.existsSync(output)) rimraf.sync(output);
975
+ if (fs$1.existsSync(output)) fs$1.rmSync(output, {
976
+ recursive: true,
977
+ force: true
978
+ });
984
979
  fs$1.mkdirSync(output, { recursive: true });
985
980
  client.models.forEach((model) => {
986
981
  const filename = `${model.name}.ts`;
@@ -1006,7 +1001,10 @@ function writeService(service, output) {
1006
1001
  function writeServices(client, options) {
1007
1002
  if (!client.services) return;
1008
1003
  const output = path$1.join(options.output, "services");
1009
- if (fs$1.existsSync(output)) rimraf.sync(output);
1004
+ if (fs$1.existsSync(output)) fs$1.rmSync(output, {
1005
+ recursive: true,
1006
+ force: true
1007
+ });
1010
1008
  fs$1.mkdirSync(output, { recursive: true });
1011
1009
  client.services.forEach((service) => {
1012
1010
  const filename = `${service.name}Service.ts`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gopowerteam/request-generate",
3
3
  "type": "commonjs",
4
- "version": "0.3.0",
4
+ "version": "0.3.2",
5
5
  "private": false,
6
6
  "keywords": [
7
7
  "gopowerteam",
@@ -43,14 +43,12 @@
43
43
  "handlebars": "^4.7.8",
44
44
  "ora": "^9.3.0",
45
45
  "qs": "^6.15.0",
46
- "rimraf": "^6.1.3",
47
46
  "rxjs": "^7.8.2",
48
47
  "tsx": "^4.21.0"
49
48
  },
50
49
  "devDependencies": {
51
50
  "@types/node": "24",
52
51
  "@types/qs": "^6.14.0",
53
- "@types/rimraf": "^3.0.2",
54
52
  "openapi-types": "^12.1.3",
55
53
  "tsdown": "0.21.0-beta.2",
56
54
  "typescript": "^5.9.3",