@gopowerteam/request-generate 0.1.17 → 0.1.19

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.d.ts CHANGED
@@ -32,6 +32,8 @@ type GenerateOptions = {
32
32
  }
33
33
  // 多应用列表
34
34
  applications?: Record<string, string>
35
+ // 追加service
36
+ appendService?: boolean
35
37
  }
36
38
 
37
39
  /**
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ function generateServiceOptions(options) {
53
53
 
54
54
  // src/utils/get-camel-name.ts
55
55
  function getCamelName(value) {
56
- return value.replace(/^[^a-zA-Z]+/g, "").replace(/[^\w-]+/g, "_").replace(/^\S/, (s) => s.toUpperCase()).replace(/_[a-zA-Z]/g, (s) => s.toUpperCase()).replace(/_/g, "").trim();
56
+ return value.replace(/^[^a-zA-Z]+/g, "").replace(/[^\w_]+/g, "_").replace(/[^\w-]+/g, "_").replace(/^\S/, (s) => s.toUpperCase()).replace(/_[a-zA-Z]/g, (s) => s.toUpperCase()).replace(/_/g, "").trim();
57
57
  }
58
58
 
59
59
  // src/entities/model.ts
@@ -923,7 +923,7 @@ function writeServices(client, options) {
923
923
  fs4.mkdirSync(output, { recursive: true });
924
924
  client.services.forEach((service) => {
925
925
  const filename = `${service.name}Service.ts`;
926
- service.application = options.application;
926
+ service.application = Generate.options.appendService === false ? "" : options.application;
927
927
  writeService(service, path4.join(output, filename));
928
928
  });
929
929
  }
package/dist/index.mjs CHANGED
@@ -54,7 +54,7 @@ function generateServiceOptions(options) {
54
54
 
55
55
  // src/utils/get-camel-name.ts
56
56
  function getCamelName(value) {
57
- return value.replace(/^[^a-zA-Z]+/g, "").replace(/[^\w-]+/g, "_").replace(/^\S/, (s) => s.toUpperCase()).replace(/_[a-zA-Z]/g, (s) => s.toUpperCase()).replace(/_/g, "").trim();
57
+ return value.replace(/^[^a-zA-Z]+/g, "").replace(/[^\w_]+/g, "_").replace(/[^\w-]+/g, "_").replace(/^\S/, (s) => s.toUpperCase()).replace(/_[a-zA-Z]/g, (s) => s.toUpperCase()).replace(/_/g, "").trim();
58
58
  }
59
59
 
60
60
  // src/entities/model.ts
@@ -924,7 +924,7 @@ function writeServices(client, options) {
924
924
  fs4.mkdirSync(output, { recursive: true });
925
925
  client.services.forEach((service) => {
926
926
  const filename = `${service.name}Service.ts`;
927
- service.application = options.application;
927
+ service.application = Generate.options.appendService === false ? "" : options.application;
928
928
  writeService(service, path4.join(output, filename));
929
929
  });
930
930
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gopowerteam/request-generate",
3
3
  "private": false,
4
- "version": "0.1.17",
4
+ "version": "0.1.19",
5
5
  "type": "commonjs",
6
6
  "files": [
7
7
  "dist",