@gct-paas/cli 0.0.1-dev.9 → 0.0.1

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 (149) hide show
  1. package/dist/actions/gen-api/api-manage.cjs +46 -0
  2. package/dist/actions/gen-api/api-manage.d.ts +36 -0
  3. package/dist/actions/gen-api/gen-api.cjs +157 -0
  4. package/dist/actions/gen-api/gen-api.d.ts +58 -0
  5. package/dist/actions/gen-api/model-manage.cjs +127 -0
  6. package/dist/actions/gen-api/model-manage.d.ts +124 -0
  7. package/dist/actions/index.cjs +12 -0
  8. package/dist/actions/index.d.ts +1 -0
  9. package/dist/commands/gen-api/gen-api.cjs +16 -0
  10. package/dist/commands/gen-api/gen-api.d.ts +44 -0
  11. package/dist/commands/index.cjs +2 -0
  12. package/dist/core/handlebars/constant/index.cjs +8 -0
  13. package/dist/core/handlebars/constant/index.d.ts +2 -0
  14. package/dist/core/handlebars/handlebars-engine.cjs +134 -0
  15. package/dist/core/handlebars/handlebars-engine.d.ts +74 -0
  16. package/dist/core/handlebars/helpers/and/and.cjs +21 -0
  17. package/dist/core/handlebars/helpers/and/and.d.ts +13 -0
  18. package/dist/core/handlebars/helpers/camel-case/camel-case.cjs +20 -0
  19. package/dist/core/handlebars/helpers/camel-case/camel-case.d.ts +13 -0
  20. package/dist/core/handlebars/helpers/concat/concat.cjs +17 -0
  21. package/dist/core/handlebars/helpers/concat/concat.d.ts +13 -0
  22. package/dist/core/handlebars/helpers/eq/eq.cjs +19 -0
  23. package/dist/core/handlebars/helpers/eq/eq.d.ts +14 -0
  24. package/dist/core/handlebars/helpers/format-import/format-import.cjs +41 -0
  25. package/dist/core/handlebars/helpers/format-import/format-import.d.ts +13 -0
  26. package/dist/core/handlebars/helpers/format-import-item/format-import-item.cjs +40 -0
  27. package/dist/core/handlebars/helpers/format-import-item/format-import-item.d.ts +13 -0
  28. package/dist/core/handlebars/helpers/format-js-type/format-js-type.cjs +41 -0
  29. package/dist/core/handlebars/helpers/format-js-type/format-js-type.d.ts +14 -0
  30. package/dist/core/handlebars/helpers/gt/gt.cjs +19 -0
  31. package/dist/core/handlebars/helpers/gt/gt.d.ts +14 -0
  32. package/dist/core/handlebars/helpers/gte/gte.cjs +19 -0
  33. package/dist/core/handlebars/helpers/gte/gte.d.ts +14 -0
  34. package/dist/core/handlebars/helpers/helper-base.cjs +19 -0
  35. package/dist/core/handlebars/helpers/helper-base.d.ts +22 -0
  36. package/dist/core/handlebars/helpers/includes/includes.cjs +18 -0
  37. package/dist/core/handlebars/helpers/includes/includes.d.ts +13 -0
  38. package/dist/core/handlebars/helpers/index.cjs +52 -0
  39. package/dist/core/handlebars/helpers/index.d.ts +6 -0
  40. package/dist/core/handlebars/helpers/json/json.cjs +16 -0
  41. package/dist/core/handlebars/helpers/json/json.d.ts +13 -0
  42. package/dist/core/handlebars/helpers/lower-case/lower-case.cjs +19 -0
  43. package/dist/core/handlebars/helpers/lower-case/lower-case.d.ts +13 -0
  44. package/dist/core/handlebars/helpers/lt/lt.cjs +19 -0
  45. package/dist/core/handlebars/helpers/lt/lt.d.ts +14 -0
  46. package/dist/core/handlebars/helpers/lte/lte.cjs +19 -0
  47. package/dist/core/handlebars/helpers/lte/lte.d.ts +14 -0
  48. package/dist/core/handlebars/helpers/neq/neq.cjs +19 -0
  49. package/dist/core/handlebars/helpers/neq/neq.d.ts +14 -0
  50. package/dist/core/handlebars/helpers/not/not.cjs +21 -0
  51. package/dist/core/handlebars/helpers/not/not.d.ts +14 -0
  52. package/dist/core/handlebars/helpers/not-includes/not-includes.cjs +18 -0
  53. package/dist/core/handlebars/helpers/not-includes/not-includes.d.ts +13 -0
  54. package/dist/core/handlebars/helpers/or/or.cjs +23 -0
  55. package/dist/core/handlebars/helpers/or/or.d.ts +13 -0
  56. package/dist/core/handlebars/helpers/pascal-case/pascal-case.cjs +20 -0
  57. package/dist/core/handlebars/helpers/pascal-case/pascal-case.d.ts +13 -0
  58. package/dist/core/handlebars/helpers/snake-case/snake-case.cjs +20 -0
  59. package/dist/core/handlebars/helpers/snake-case/snake-case.d.ts +13 -0
  60. package/dist/core/handlebars/helpers/spinal-case/spinal-case.cjs +20 -0
  61. package/dist/core/handlebars/helpers/spinal-case/spinal-case.d.ts +13 -0
  62. package/dist/core/handlebars/helpers/upper-case/upper-case.cjs +19 -0
  63. package/dist/core/handlebars/helpers/upper-case/upper-case.d.ts +13 -0
  64. package/dist/core/handlebars/index.cjs +27 -0
  65. package/dist/core/handlebars/index.d.ts +2 -0
  66. package/dist/core/handlebars/utils/helper/helper.cjs +41 -0
  67. package/dist/core/handlebars/utils/helper/helper.d.ts +33 -0
  68. package/dist/core/handlebars/utils/index.cjs +20 -0
  69. package/dist/core/handlebars/utils/index.d.ts +17 -0
  70. package/dist/core/index.cjs +27 -0
  71. package/dist/core/index.d.ts +2 -0
  72. package/dist/core/interface/index.cjs +1 -0
  73. package/dist/core/interface/index.d.ts +1 -0
  74. package/dist/index.cjs +1 -1
  75. package/es/actions/gen-api/api-manage.d.ts +36 -0
  76. package/es/actions/gen-api/api-manage.mjs +38 -0
  77. package/es/actions/gen-api/gen-api.d.ts +58 -0
  78. package/es/actions/gen-api/gen-api.mjs +164 -0
  79. package/es/actions/gen-api/model-manage.d.ts +124 -0
  80. package/es/actions/gen-api/model-manage.mjs +126 -0
  81. package/es/actions/index.d.ts +1 -0
  82. package/es/actions/index.mjs +1 -0
  83. package/es/commands/gen-api/gen-api.d.ts +44 -0
  84. package/es/commands/gen-api/gen-api.mjs +15 -0
  85. package/es/commands/index.mjs +2 -0
  86. package/es/core/handlebars/constant/index.d.ts +2 -0
  87. package/es/core/handlebars/constant/index.mjs +2 -0
  88. package/es/core/handlebars/handlebars-engine.d.ts +74 -0
  89. package/es/core/handlebars/handlebars-engine.mjs +122 -0
  90. package/es/core/handlebars/helpers/and/and.d.ts +13 -0
  91. package/es/core/handlebars/helpers/and/and.mjs +14 -0
  92. package/es/core/handlebars/helpers/camel-case/camel-case.d.ts +13 -0
  93. package/es/core/handlebars/helpers/camel-case/camel-case.mjs +13 -0
  94. package/es/core/handlebars/helpers/concat/concat.d.ts +13 -0
  95. package/es/core/handlebars/helpers/concat/concat.mjs +10 -0
  96. package/es/core/handlebars/helpers/eq/eq.d.ts +14 -0
  97. package/es/core/handlebars/helpers/eq/eq.mjs +12 -0
  98. package/es/core/handlebars/helpers/format-import/format-import.d.ts +13 -0
  99. package/es/core/handlebars/helpers/format-import/format-import.mjs +34 -0
  100. package/es/core/handlebars/helpers/format-import-item/format-import-item.d.ts +13 -0
  101. package/es/core/handlebars/helpers/format-import-item/format-import-item.mjs +33 -0
  102. package/es/core/handlebars/helpers/format-js-type/format-js-type.d.ts +14 -0
  103. package/es/core/handlebars/helpers/format-js-type/format-js-type.mjs +34 -0
  104. package/es/core/handlebars/helpers/gt/gt.d.ts +14 -0
  105. package/es/core/handlebars/helpers/gt/gt.mjs +12 -0
  106. package/es/core/handlebars/helpers/gte/gte.d.ts +14 -0
  107. package/es/core/handlebars/helpers/gte/gte.mjs +12 -0
  108. package/es/core/handlebars/helpers/helper-base.d.ts +22 -0
  109. package/es/core/handlebars/helpers/helper-base.mjs +11 -0
  110. package/es/core/handlebars/helpers/includes/includes.d.ts +13 -0
  111. package/es/core/handlebars/helpers/includes/includes.mjs +11 -0
  112. package/es/core/handlebars/helpers/index.d.ts +6 -0
  113. package/es/core/handlebars/helpers/index.mjs +46 -0
  114. package/es/core/handlebars/helpers/json/json.d.ts +13 -0
  115. package/es/core/handlebars/helpers/json/json.mjs +13 -0
  116. package/es/core/handlebars/helpers/lower-case/lower-case.d.ts +13 -0
  117. package/es/core/handlebars/helpers/lower-case/lower-case.mjs +12 -0
  118. package/es/core/handlebars/helpers/lt/lt.d.ts +14 -0
  119. package/es/core/handlebars/helpers/lt/lt.mjs +12 -0
  120. package/es/core/handlebars/helpers/lte/lte.d.ts +14 -0
  121. package/es/core/handlebars/helpers/lte/lte.mjs +12 -0
  122. package/es/core/handlebars/helpers/neq/neq.d.ts +14 -0
  123. package/es/core/handlebars/helpers/neq/neq.mjs +12 -0
  124. package/es/core/handlebars/helpers/not/not.d.ts +14 -0
  125. package/es/core/handlebars/helpers/not/not.mjs +12 -0
  126. package/es/core/handlebars/helpers/not-includes/not-includes.d.ts +13 -0
  127. package/es/core/handlebars/helpers/not-includes/not-includes.mjs +11 -0
  128. package/es/core/handlebars/helpers/or/or.d.ts +13 -0
  129. package/es/core/handlebars/helpers/or/or.mjs +16 -0
  130. package/es/core/handlebars/helpers/pascal-case/pascal-case.d.ts +13 -0
  131. package/es/core/handlebars/helpers/pascal-case/pascal-case.mjs +13 -0
  132. package/es/core/handlebars/helpers/snake-case/snake-case.d.ts +13 -0
  133. package/es/core/handlebars/helpers/snake-case/snake-case.mjs +13 -0
  134. package/es/core/handlebars/helpers/spinal-case/spinal-case.d.ts +13 -0
  135. package/es/core/handlebars/helpers/spinal-case/spinal-case.mjs +13 -0
  136. package/es/core/handlebars/helpers/upper-case/upper-case.d.ts +13 -0
  137. package/es/core/handlebars/helpers/upper-case/upper-case.mjs +12 -0
  138. package/es/core/handlebars/index.d.ts +2 -0
  139. package/es/core/handlebars/index.mjs +2 -0
  140. package/es/core/handlebars/utils/helper/helper.d.ts +33 -0
  141. package/es/core/handlebars/utils/helper/helper.mjs +54 -0
  142. package/es/core/handlebars/utils/index.d.ts +17 -0
  143. package/es/core/handlebars/utils/index.mjs +7 -0
  144. package/es/core/index.d.ts +2 -0
  145. package/es/core/index.mjs +2 -0
  146. package/es/core/interface/index.d.ts +1 -0
  147. package/es/core/interface/index.mjs +0 -0
  148. package/es/index.mjs +1 -1
  149. package/package.json +10 -7
@@ -0,0 +1,12 @@
1
+ import { HelperBase } from "../helper-base.mjs";
2
+ export class HelperLowerCase extends HelperBase {
3
+ constructor() {
4
+ super("lowerCase");
5
+ }
6
+ onExecute(param) {
7
+ if (!param) {
8
+ return "";
9
+ }
10
+ return param.toLowerCase();
11
+ }
12
+ }
@@ -0,0 +1,14 @@
1
+ import * as Handlebars from 'handlebars';
2
+ import { HelperBase } from '../helper-base';
3
+ /**
4
+ * 小于
5
+ *
6
+ * @description 判断: word < word2, 用法 {{#lt word word2}}xxx{{else}}yyy{{/lt}}、{{lt word word2}} 返回值为 boolean 类型
7
+ * @export
8
+ * @class HelperLt
9
+ * @extends {HelperBase}
10
+ */
11
+ export declare class HelperLt extends HelperBase {
12
+ constructor();
13
+ onExecute(param: unknown, param2: unknown, options: Handlebars.HelperOptions): string | boolean;
14
+ }
@@ -0,0 +1,12 @@
1
+ import { lt } from "lodash-es";
2
+ import { HelperUtil } from "../../utils/index.mjs";
3
+ import { HelperBase } from "../helper-base.mjs";
4
+ export class HelperLt extends HelperBase {
5
+ constructor() {
6
+ super("lt");
7
+ }
8
+ onExecute(param, param2, options) {
9
+ const bol = lt(param, param2);
10
+ return HelperUtil.handleJudgmentExecute(this, bol, options);
11
+ }
12
+ }
@@ -0,0 +1,14 @@
1
+ import * as Handlebars from 'handlebars';
2
+ import { HelperBase } from '../helper-base';
3
+ /**
4
+ * 小于等于
5
+ *
6
+ * @description 判断: word <= word2, 用法 {{#lte word word2}}xxx{{else}}yyy{{/lte}}、{{lte word word2}} 返回值为 boolean 类型
7
+ * @export
8
+ * @class HelperLte
9
+ * @extends {HelperBase}
10
+ */
11
+ export declare class HelperLte extends HelperBase {
12
+ constructor();
13
+ onExecute(param: unknown, param2: unknown, options: Handlebars.HelperOptions): string | boolean;
14
+ }
@@ -0,0 +1,12 @@
1
+ import { lte } from "lodash-es";
2
+ import { HelperUtil } from "../../utils/index.mjs";
3
+ import { HelperBase } from "../helper-base.mjs";
4
+ export class HelperLte extends HelperBase {
5
+ constructor() {
6
+ super("lte");
7
+ }
8
+ onExecute(param, param2, options) {
9
+ const bol = lte(param, param2);
10
+ return HelperUtil.handleJudgmentExecute(this, bol, options);
11
+ }
12
+ }
@@ -0,0 +1,14 @@
1
+ import * as Handlebars from 'handlebars';
2
+ import { HelperBase } from '../helper-base';
3
+ /**
4
+ * 不等于
5
+ *
6
+ * @description 判断: word !== word2, 用法 {{#neq word 'xxx'}}xxx{{else}}yyy{{/neq}}、{{neq word 'xxx'}} 返回值为 boolean 类型
7
+ * @export
8
+ * @class HelperNeq
9
+ * @extends {HelperBase}
10
+ */
11
+ export declare class HelperNeq extends HelperBase {
12
+ constructor();
13
+ onExecute(param: unknown, param2: unknown, options: Handlebars.HelperOptions): string | boolean;
14
+ }
@@ -0,0 +1,12 @@
1
+ import { eq } from "lodash-es";
2
+ import { HelperUtil } from "../../utils/index.mjs";
3
+ import { HelperBase } from "../helper-base.mjs";
4
+ export class HelperNeq extends HelperBase {
5
+ constructor() {
6
+ super("neq");
7
+ }
8
+ onExecute(param, param2, options) {
9
+ const bol = !eq(param, param2);
10
+ return HelperUtil.handleJudgmentExecute(this, bol, options);
11
+ }
12
+ }
@@ -0,0 +1,14 @@
1
+ import * as Handlebars from 'handlebars';
2
+ import { HelperBase } from '../helper-base';
3
+ /**
4
+ * 参数不存在或者为空时返回 true
5
+ *
6
+ * @description 判断: 参数为 null、undefined、空字符串、空数组、空对象时返回 true, 用法: {{#not value}}xxx{{else}}yyy{{/not}}、{{not value}} 返回值为 boolean 类型
7
+ * @export
8
+ * @class HelperNot
9
+ * @extends {HelperBase}
10
+ */
11
+ export declare class HelperNot extends HelperBase {
12
+ constructor();
13
+ onExecute(param: unknown, options: Handlebars.HelperOptions): string | boolean;
14
+ }
@@ -0,0 +1,12 @@
1
+ import * as Handlebars from "handlebars";
2
+ import { HelperUtil } from "../../utils/index.mjs";
3
+ import { HelperBase } from "../helper-base.mjs";
4
+ export class HelperNot extends HelperBase {
5
+ constructor() {
6
+ super("not");
7
+ }
8
+ onExecute(param, options) {
9
+ const bol = Handlebars.Utils.isEmpty(param);
10
+ return HelperUtil.handleJudgmentExecute(this, bol, options);
11
+ }
12
+ }
@@ -0,0 +1,13 @@
1
+ import { HelperBase } from '../helper-base';
2
+ /**
3
+ * 字符串不包含内容
4
+ *
5
+ * @description 判断: !'test'.notIncludes('t'), 用法: {{#notIncludes word word2}}xxx{{else}}yyy{{/notIncludes}}、{{notIncludes word word2}} 返回值为 boolean 类型
6
+ * @export
7
+ * @class HelperNotIncludes
8
+ * @extends {HelperBase}
9
+ */
10
+ export declare class HelperNotIncludes extends HelperBase {
11
+ constructor();
12
+ onExecute(param: string, param2: string, options: Handlebars.HelperOptions): string | boolean;
13
+ }
@@ -0,0 +1,11 @@
1
+ import { HelperUtil } from "../../utils/index.mjs";
2
+ import { HelperBase } from "../helper-base.mjs";
3
+ export class HelperNotIncludes extends HelperBase {
4
+ constructor() {
5
+ super("notIncludes");
6
+ }
7
+ onExecute(param, param2, options) {
8
+ const bol = !param.includes(param2);
9
+ return HelperUtil.handleJudgmentExecute(this, bol, options);
10
+ }
11
+ }
@@ -0,0 +1,13 @@
1
+ import { HelperBase } from '../helper-base';
2
+ /**
3
+ * 或者条件
4
+ *
5
+ * @description 判断: word word2 word3 其中任意一个值在判断中为 true, 用法 {{#or word word2 word3}}xxx{{else}}yyy{{/or}}、{{or word word2 word3}} 返回值为 boolean 类型
6
+ * @export
7
+ * @class HelperOr
8
+ * @extends {HelperBase}
9
+ */
10
+ export declare class HelperOr extends HelperBase {
11
+ constructor();
12
+ onExecute(...args: unknown[] | Handlebars.HelperOptions[]): string;
13
+ }
@@ -0,0 +1,16 @@
1
+ import { HelperBase } from "../helper-base.mjs";
2
+ export class HelperOr extends HelperBase {
3
+ constructor() {
4
+ super("or");
5
+ }
6
+ onExecute(...args) {
7
+ const options = args[args.length - 1];
8
+ args.pop();
9
+ const item = args.find((itemArg) => !!itemArg);
10
+ if (options.fn) {
11
+ const data = options.data?.root || {};
12
+ return item ? options.fn(data) : options.inverse(data);
13
+ }
14
+ return item || "";
15
+ }
16
+ }
@@ -0,0 +1,13 @@
1
+ import { HelperBase } from '../helper-base';
2
+ /**
3
+ * 首字母转大写
4
+ *
5
+ * @description 用法 {{pascalCase word}},效果: myName => MyName
6
+ * @export
7
+ * @class HelperPascalCase
8
+ * @extends {HelperBase}
9
+ */
10
+ export declare class HelperPascalCase extends HelperBase {
11
+ constructor();
12
+ onExecute(param: string): string;
13
+ }
@@ -0,0 +1,13 @@
1
+ import { upperFirst } from "lodash-es";
2
+ import { HelperBase } from "../helper-base.mjs";
3
+ export class HelperPascalCase extends HelperBase {
4
+ constructor() {
5
+ super("pascalCase");
6
+ }
7
+ onExecute(param) {
8
+ if (!param) {
9
+ return "";
10
+ }
11
+ return upperFirst(param);
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ import { HelperBase } from '../helper-base';
2
+ /**
3
+ * 驼峰转蛇形命名法
4
+ *
5
+ * @description 用法 {{snakeCase word}},效果: myName => my_name
6
+ * @export
7
+ * @class HelperSnakeCase
8
+ * @extends {HelperBase}
9
+ */
10
+ export declare class HelperSnakeCase extends HelperBase {
11
+ constructor();
12
+ onExecute(param: string): string;
13
+ }
@@ -0,0 +1,13 @@
1
+ import { snakeCase } from "lodash-es";
2
+ import { HelperBase } from "../helper-base.mjs";
3
+ export class HelperSnakeCase extends HelperBase {
4
+ constructor() {
5
+ super("snakeCase");
6
+ }
7
+ onExecute(param) {
8
+ if (!param) {
9
+ return "";
10
+ }
11
+ return snakeCase(param);
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ import { HelperBase } from '../helper-base';
2
+ /**
3
+ * 驼峰命名法转为横线命名法
4
+ *
5
+ * @description 用法 {{spinalCase word}},效果: myName => my-name
6
+ * @export
7
+ * @class HelperSpinalCase
8
+ * @extends {HelperBase}
9
+ */
10
+ export declare class HelperSpinalCase extends HelperBase {
11
+ constructor();
12
+ onExecute(param: string): string;
13
+ }
@@ -0,0 +1,13 @@
1
+ import { kebabCase } from "lodash-es";
2
+ import { HelperBase } from "../helper-base.mjs";
3
+ export class HelperSpinalCase extends HelperBase {
4
+ constructor() {
5
+ super("spinalCase");
6
+ }
7
+ onExecute(param) {
8
+ if (!param) {
9
+ return "";
10
+ }
11
+ return kebabCase(param);
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ import { HelperBase } from '../helper-base';
2
+ /**
3
+ * 字符串转大写
4
+ *
5
+ * @description 用法 {{upperCase word}},效果: myName => MYNAME
6
+ * @export
7
+ * @class HelperUpCase
8
+ * @extends {HelperBase}
9
+ */
10
+ export declare class HelperUpperCase extends HelperBase {
11
+ constructor();
12
+ onExecute(param: string): string;
13
+ }
@@ -0,0 +1,12 @@
1
+ import { HelperBase } from "../helper-base.mjs";
2
+ export class HelperUpperCase extends HelperBase {
3
+ constructor() {
4
+ super("upperCase");
5
+ }
6
+ onExecute(param) {
7
+ if (!param) {
8
+ return "";
9
+ }
10
+ return param.toUpperCase();
11
+ }
12
+ }
@@ -0,0 +1,2 @@
1
+ export { HandlebarsEngine } from './handlebars-engine';
2
+ export * from './constant';
@@ -0,0 +1,2 @@
1
+ export { HandlebarsEngine } from "./handlebars-engine.mjs";
2
+ export * from "./constant/index.mjs";
@@ -0,0 +1,33 @@
1
+ /**
2
+ * 助手工具类
3
+ *
4
+ * @export
5
+ * @class HelperUtil
6
+ */
7
+ export declare class HelperUtil {
8
+ /**
9
+ * 当前所有助手 tag 名称
10
+ *
11
+ * @protected
12
+ * @type {string[]}
13
+ */
14
+ protected static helperNames: string[];
15
+ /**
16
+ * 判断字符串是否为助手
17
+ *
18
+ * @static
19
+ * @param {string} name
20
+ * @return {*} {boolean}
21
+ */
22
+ static isHelperName(name: string): boolean;
23
+ /**
24
+ * 判断类助手统一结果调用处理
25
+ *
26
+ * @static
27
+ * @param {unknown} context 执行上下文
28
+ * @param {boolean} bol 判断结果
29
+ * @param {Handlebars.HelperOptions} options
30
+ * @return {*} {(string | boolean)}
31
+ */
32
+ static handleJudgmentExecute(context: unknown, bol: boolean, options: Handlebars.HelperOptions): string | boolean;
33
+ }
@@ -0,0 +1,54 @@
1
+ export class HelperUtil {
2
+ /**
3
+ * 当前所有助手 tag 名称
4
+ *
5
+ * @protected
6
+ * @type {string[]}
7
+ */
8
+ static helperNames = [
9
+ "lookup",
10
+ "log",
11
+ "and",
12
+ "camelCase",
13
+ "concat",
14
+ "eq",
15
+ "gt",
16
+ "get",
17
+ "lowerCase",
18
+ "lt",
19
+ "lte",
20
+ "neq",
21
+ "not",
22
+ "or",
23
+ "pascalCase",
24
+ "pluralize",
25
+ "snakeCase",
26
+ "spinalCase",
27
+ "upperCase"
28
+ ];
29
+ /**
30
+ * 判断字符串是否为助手
31
+ *
32
+ * @static
33
+ * @param {string} name
34
+ * @return {*} {boolean}
35
+ */
36
+ static isHelperName(name) {
37
+ return this.helperNames.includes(name);
38
+ }
39
+ /**
40
+ * 判断类助手统一结果调用处理
41
+ *
42
+ * @static
43
+ * @param {unknown} context 执行上下文
44
+ * @param {boolean} bol 判断结果
45
+ * @param {Handlebars.HelperOptions} options
46
+ * @return {*} {(string | boolean)}
47
+ */
48
+ static handleJudgmentExecute(context, bol, options) {
49
+ if (options.fn) {
50
+ return bol ? options.fn(context) : options.inverse(context);
51
+ }
52
+ return bol ? options.hash.yes = true : options.hash.no = false;
53
+ }
54
+ }
@@ -0,0 +1,17 @@
1
+ export { HelperUtil } from './helper/helper';
2
+ /**
3
+ * win 路径 \\ 转 linux 路径 /
4
+ *
5
+ * @export
6
+ * @param {string} path
7
+ * @return {*} {string}
8
+ */
9
+ export declare function winToUnixPath(path: string): string;
10
+ /**
11
+ * linux 路径 / 转 win 路径 \\
12
+ *
13
+ * @export
14
+ * @param {string} path
15
+ * @return {*} {string}
16
+ */
17
+ export declare function unixToWinPath(path: string): string;
@@ -0,0 +1,7 @@
1
+ export { HelperUtil } from "./helper/helper.mjs";
2
+ export function winToUnixPath(path) {
3
+ return path.replace(/\\/g, "/");
4
+ }
5
+ export function unixToWinPath(path) {
6
+ return path.replace(/\//g, "\\");
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from './handlebars';
2
+ export * from './interface';
@@ -0,0 +1,2 @@
1
+ export * from "./handlebars/index.mjs";
2
+ export * from "./interface/index.mjs";
@@ -0,0 +1 @@
1
+ export type IObject = Record<string | symbol, any>;
File without changes
package/es/index.mjs CHANGED
@@ -23,4 +23,4 @@ export async function bootstrap() {
23
23
  program.outputHelp();
24
24
  }
25
25
  }
26
- export * from "./core";
26
+ export * from "./core/index.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/cli",
3
- "version": "0.0.1-dev.9",
3
+ "version": "0.0.1",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
6
  "bin": {
@@ -42,12 +42,15 @@
42
42
  "publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
43
43
  },
44
44
  "dependencies": {
45
- "@inquirer/prompts": "^7.3.1",
45
+ "@inquirer/prompts": "^7.3.2",
46
46
  "commander": "^13.1.0",
47
47
  "consola": "^3.4.0",
48
- "core-js": "^3.40.0",
48
+ "core-js": "^3.41.0",
49
49
  "fast-glob": "^3.3.3",
50
50
  "fs-extra": "^11.3.0",
51
+ "got": "^14.4.6",
52
+ "handlebars": "^4.7.8",
53
+ "handlebars-helpers": "^0.10.0",
51
54
  "lodash-es": "^4.17.21",
52
55
  "ora": "^8.2.0",
53
56
  "picocolors": "^1.1.1",
@@ -56,9 +59,9 @@
56
59
  "devDependencies": {
57
60
  "@types/fs-extra": "^11.0.4",
58
61
  "@types/lodash-es": "^4.17.12",
59
- "@types/node": "^22.13.1",
60
- "typescript": "^5.7.3",
61
- "unbuild": "^3.3.1"
62
+ "@types/node": "^22.13.9",
63
+ "typescript": "^5.8.2",
64
+ "unbuild": "^3.5.0"
62
65
  },
63
- "gitHead": "5b6a55913fb534d713b2726839ac7b365b551c84"
66
+ "gitHead": "9facb3521bdf435120898d743c13610da0250610"
64
67
  }