ztxkutils 2.10.66-8 → 2.10.66-9

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 (36) hide show
  1. package/dist/zti18n-cli/bin/index.d.ts +2 -0
  2. package/dist/zti18n-cli/index.d.ts +1 -0
  3. package/dist/zti18n-cli/src/command/collect.d.ts +2 -0
  4. package/dist/zti18n-cli/src/command/convert.d.ts +2 -0
  5. package/dist/zti18n-cli/src/command/convert2.d.ts +2 -0
  6. package/dist/zti18n-cli/src/command/initFileConf.d.ts +2 -0
  7. package/dist/zti18n-cli/src/command/publish.d.ts +2 -0
  8. package/dist/zti18n-cli/src/conf/BaseConf.d.ts +8 -0
  9. package/dist/zti18n-cli/src/conf/FileConf.d.ts +6 -0
  10. package/dist/zti18n-cli/src/index.d.ts +1 -0
  11. package/dist/zti18n-cli/src/translate/google.d.ts +2 -0
  12. package/dist/zti18n-cli/src/utils/isChinese.d.ts +2 -0
  13. package/dist/zti18n-cli/src/utils/log.d.ts +4 -0
  14. package/dist/zti18n-cli/src/utils/mergeOptions.d.ts +24 -0
  15. package/dist/zti18n-cli/src/utils/reactOptions.d.ts +21 -0
  16. package/dist/zti18n-cli/src/utils/vueOptions.d.ts +17 -0
  17. package/dist/zti18n-core/index.d.ts +2 -0
  18. package/dist/zti18n-core/src/index.d.ts +8 -0
  19. package/dist/zti18n-core/src/plugin/reactIntlToReactIntlUniversal.d.ts +19 -0
  20. package/dist/zti18n-core/src/plugin/reactIntlUniversalToDi18n.d.ts +9 -0
  21. package/dist/zti18n-core/src/transform/defaultPkMap.d.ts +75 -0
  22. package/dist/zti18n-core/src/transform/transformHtml.d.ts +5 -0
  23. package/dist/zti18n-core/src/transform/transformJs.d.ts +5 -0
  24. package/dist/zti18n-core/src/transform/transformPug.d.ts +5 -0
  25. package/dist/zti18n-core/src/transform/transformReactIntlToReactIntlUniversal.d.ts +2 -0
  26. package/dist/zti18n-core/src/transform/transformReactIntlUniveralToDi18n.d.ts +2 -0
  27. package/dist/zti18n-core/src/transform/transformToDi18n.d.ts +5 -0
  28. package/dist/zti18n-core/src/transform/transformTs.d.ts +5 -0
  29. package/dist/zti18n-core/src/transform/transformVue.d.ts +5 -0
  30. package/dist/zti18n-core/src/transform/transformZeroToDi18n.d.ts +2 -0
  31. package/dist/zti18n-core/src/translate/google.d.ts +2 -0
  32. package/dist/zti18n-core/src/utils/constants.d.ts +3 -0
  33. package/dist/zti18n-core/src/utils/getIgnoreLines.d.ts +2 -0
  34. package/dist/zti18n-core/src/utils/isChinese.d.ts +2 -0
  35. package/dist/zti18n-core/src/utils/log.d.ts +4 -0
  36. package/package.json +35 -2
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ declare function _exports(programOption: any, publish?: boolean): Promise<any[]>;
2
+ export = _exports;
@@ -0,0 +1,2 @@
1
+ declare function _exports(programOption: any): void;
2
+ export = _exports;
@@ -0,0 +1,2 @@
1
+ declare function _exports(programOption: any): {};
2
+ export = _exports;
@@ -0,0 +1,2 @@
1
+ declare function _exports(isVue: any): Promise<void>;
2
+ export = _exports;
@@ -0,0 +1,2 @@
1
+ declare function _exports(programOption: any, env?: string): Promise<void>;
2
+ export = _exports;
@@ -0,0 +1,8 @@
1
+ export = BaseConf;
2
+ declare class BaseConf {
3
+ createService(): Promise<boolean>;
4
+ createConf(): void;
5
+ updateConf(): void;
6
+ getConf(): void;
7
+ publishConf(): Promise<boolean>;
8
+ }
@@ -0,0 +1,6 @@
1
+ export = FileConf;
2
+ declare class FileConf extends BaseConf {
3
+ constructor(folder: any);
4
+ localesDir: any;
5
+ }
6
+ import BaseConf = require("./BaseConf");
@@ -0,0 +1 @@
1
+ export = program;
@@ -0,0 +1,2 @@
1
+ declare function _exports(text: any, targetLang: any): any;
2
+ export = _exports;
@@ -0,0 +1,2 @@
1
+ declare function _exports(text: any): boolean;
2
+ export = _exports;
@@ -0,0 +1,4 @@
1
+ export function info(msg: any): void;
2
+ export function warning(msg: any): void;
3
+ export function success(msg: any): void;
4
+ export function error(msg: any): void;
@@ -0,0 +1,24 @@
1
+ declare function _exports(programOption: any, programParameter: any): {
2
+ entry: string[];
3
+ exclude: undefined[];
4
+ output: string[];
5
+ disableAutoTranslate: boolean;
6
+ extractOnly: boolean;
7
+ translator: null;
8
+ ignoreComponents: undefined[];
9
+ ignoreMethods: undefined[];
10
+ primaryLocale: string;
11
+ supportedLocales: string[];
12
+ importCode: string;
13
+ i18nObject: string;
14
+ i18nMethod: string;
15
+ prettier: {
16
+ singleQuote: boolean;
17
+ trailingComma: string;
18
+ endOfLine: string;
19
+ };
20
+ localeConf: {
21
+ type: string;
22
+ };
23
+ };
24
+ export = _exports;
@@ -0,0 +1,21 @@
1
+ export const entry: string[];
2
+ export const exclude: any[];
3
+ export const output: string[];
4
+ export const disableAutoTranslate: boolean;
5
+ export const extractOnly: boolean;
6
+ export const translator: any;
7
+ export const ignoreComponents: any[];
8
+ export const ignoreMethods: any[];
9
+ export const primaryLocale: string;
10
+ export const supportedLocales: string[];
11
+ export const importCode: string;
12
+ export const i18nObject: string;
13
+ export const i18nMethod: string;
14
+ export namespace prettier {
15
+ const singleQuote: boolean;
16
+ const trailingComma: string;
17
+ const endOfLine: string;
18
+ }
19
+ export namespace localeConf {
20
+ const type: string;
21
+ }
@@ -0,0 +1,17 @@
1
+ export const entry: string[];
2
+ export const exclude: any[];
3
+ export const output: string[];
4
+ export const disableAutoTranslate: boolean;
5
+ export const extractOnly: boolean;
6
+ export const translator: any;
7
+ export const ignoreComponents: any[];
8
+ export const ignoreMethods: any[];
9
+ export const primaryLocale: string;
10
+ export const supportedLocales: string[];
11
+ export const importCode: string;
12
+ export const i18nObject: string;
13
+ export const i18nMethod: string;
14
+ export const prettier: any;
15
+ export namespace localeConf {
16
+ const type: string;
17
+ }
@@ -0,0 +1,2 @@
1
+ declare const _exports: typeof import("./src");
2
+ export = _exports;
@@ -0,0 +1,8 @@
1
+ export var transformReactIntlToReactIntlUniversal: (option: any) => void;
2
+ export var transformReactIntlUniveralToDi18n: (option: any) => {};
3
+ export var transformZeroToDi18n: (codeFileInfo: any, allTranslatedWord: any, updatedTranslatedWord: any, keysInUse: any[], option: any) => void;
4
+ export var transformToDi18n: (source: any, sourceType: any, localeInfo: any, options: any) => {
5
+ source: any;
6
+ hasTouch: boolean;
7
+ };
8
+ export var googleTranslate: (text: any, targetLang: any) => any;
@@ -0,0 +1,19 @@
1
+ export = getPlugin;
2
+ /**
3
+ * 获取代码转换的插件
4
+ * @param {object} zhData 中文文案资源
5
+ * @param {object} outObj 传出的参数对象
6
+ */
7
+ declare function getPlugin(zhData: object, outObj: object): ({ types: t }: {
8
+ types: any;
9
+ }) => {
10
+ visitor: {
11
+ ImportDeclaration(path: any): void;
12
+ Decorator(path: any): void;
13
+ BinaryExpression(path: any): void;
14
+ ObjectPattern(path: any): void;
15
+ JSXElement(path: any): void;
16
+ StringLiteral(path: any): void;
17
+ CallExpression(path: any): void;
18
+ };
19
+ };
@@ -0,0 +1,9 @@
1
+ export = getPlugin;
2
+ /**
3
+ * 获取代码转换的插件
4
+ */
5
+ declare function getPlugin(outObj: any, allConverted: any, intlAlias?: string): () => {
6
+ visitor: {
7
+ CallExpression(path: any): void;
8
+ };
9
+ };
@@ -0,0 +1,75 @@
1
+ export const Switch: string;
2
+ export const Circle: string;
3
+ export const Affix: string;
4
+ export const Alert: string;
5
+ export const AnchorLink: string;
6
+ export const Anchor: string;
7
+ export const AutoComplete: string;
8
+ export const Avatar: string;
9
+ export const BackTop: string;
10
+ export const Badge: string;
11
+ export const BreadcrumbItem: string;
12
+ export const Breadcrumb: string;
13
+ export const ButtonGroup: string;
14
+ export const Button: string;
15
+ export const Card: string;
16
+ export const CarouselItem: string;
17
+ export const Carousel: string;
18
+ export const Cascader: string;
19
+ export const CellGroup: string;
20
+ export const Cell: string;
21
+ export const CheckboxGroup: string;
22
+ export const Checkbox: string;
23
+ export const Col: string;
24
+ export const Collapse: string;
25
+ export const ColorPicker: string;
26
+ export const Content: string;
27
+ export const DatePicker: string;
28
+ export const Divider: string;
29
+ export const Drawer: string;
30
+ export const DropdownItem: string;
31
+ export const DropdownMenu: string;
32
+ export const Dropdown: string;
33
+ export const Footer: string;
34
+ export const FormItem: string;
35
+ export const Form: string;
36
+ export const Header: string;
37
+ export const Icon: string;
38
+ export const InputNumber: string;
39
+ export const Input: string;
40
+ export const Layout: string;
41
+ export const Menu: string;
42
+ export const MenuGroup: string;
43
+ export const MenuItem: string;
44
+ export const Sider: string;
45
+ export const Submenu: string;
46
+ export const Modal: string;
47
+ export const OptionGroup: string;
48
+ export const Option: string;
49
+ export const Page: string;
50
+ export const Panel: string;
51
+ export const Poptip: string;
52
+ export const Progress: string;
53
+ export const RadioGroup: string;
54
+ export const Radio: string;
55
+ export const Rate: string;
56
+ export const Row: string;
57
+ export const Scroll: string;
58
+ export const Select: string;
59
+ export const Slider: string;
60
+ export const Spin: string;
61
+ export const Split: string;
62
+ export const Step: string;
63
+ export const Steps: string;
64
+ export const Table: string;
65
+ export const Tabs: string;
66
+ export const TabPane: string;
67
+ export const Tag: string;
68
+ export const TimelineItem: string;
69
+ export const Timeline: string;
70
+ export const TimePicker: string;
71
+ export const Time: string;
72
+ export const Tooltip: string;
73
+ export const Transfer: string;
74
+ export const Tree: string;
75
+ export const Upload: string;
@@ -0,0 +1,5 @@
1
+ declare function _exports(source: any, localeInfo?: {}, options?: {}): {
2
+ source: any;
3
+ hasTouch: boolean;
4
+ };
5
+ export = _exports;
@@ -0,0 +1,5 @@
1
+ declare function _exports(source: any, localeInfo?: {}, options?: {}): {
2
+ source: any;
3
+ hasTouch: boolean;
4
+ };
5
+ export = _exports;
@@ -0,0 +1,5 @@
1
+ declare function _exports(source: any, localeInfo?: {}, options?: {}): {
2
+ source: any;
3
+ hasTouch: boolean;
4
+ };
5
+ export = _exports;
@@ -0,0 +1,2 @@
1
+ declare function _exports(option: object): void;
2
+ export = _exports;
@@ -0,0 +1,2 @@
1
+ declare function _exports(option: any): {};
2
+ export = _exports;
@@ -0,0 +1,5 @@
1
+ declare function _exports(source: any, sourceType: any, localeInfo: any, options: any): {
2
+ source: any;
3
+ hasTouch: boolean;
4
+ };
5
+ export = _exports;
@@ -0,0 +1,5 @@
1
+ declare function _exports(code: any, localeInfo?: {}, options?: {}): {
2
+ source: any;
3
+ hasTouch: boolean;
4
+ };
5
+ export = _exports;
@@ -0,0 +1,5 @@
1
+ declare function _exports(source: any, localeInfo?: {}, options?: {}): {
2
+ source: string;
3
+ hasTouch: boolean;
4
+ };
5
+ export = _exports;
@@ -0,0 +1,2 @@
1
+ declare function _exports(codeFileInfo: object, allTranslatedWord: object, updatedTranslatedWord: object, keysInUse: any[], option: object): void;
2
+ export = _exports;
@@ -0,0 +1,2 @@
1
+ declare function _exports(text: any, targetLang: any): any;
2
+ export = _exports;
@@ -0,0 +1,3 @@
1
+ export var REACT_JS: string;
2
+ export var REACT_TS: string;
3
+ export var VUE: string;
@@ -0,0 +1,2 @@
1
+ declare function _exports(tpl: any): number[];
2
+ export = _exports;
@@ -0,0 +1,2 @@
1
+ declare function _exports(text: any): boolean;
2
+ export = _exports;
@@ -0,0 +1,4 @@
1
+ export function info(msg: any): void;
2
+ export function warning(msg: any): void;
3
+ export function success(msg: any): void;
4
+ export function error(msg: any): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkutils",
3
- "version": "2.10.66-8",
3
+ "version": "2.10.66-9",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -15,6 +15,9 @@
15
15
  "keywords": [],
16
16
  "author": "ZTXK",
17
17
  "license": "MIT",
18
+ "bin": {
19
+ "zti18n": "./dist/zti18n-cli/index.js"
20
+ },
18
21
  "devDependencies": {
19
22
  "@rollup/plugin-commonjs": "^19.0.0",
20
23
  "@rollup/plugin-json": "^4.1.0",
@@ -57,7 +60,37 @@
57
60
  "sockjs-client": "^1.5.1",
58
61
  "stompjs": "^2.3.3",
59
62
  "zt-sockjs-client": "^0.0.2",
60
- "zt-stompjs": "^1.1.2"
63
+ "zt-stompjs": "^1.1.2",
64
+ "@babel/core": "^7.18.10",
65
+ "@babel/generator": "^7.18.0",
66
+ "@babel/plugin-proposal-optional-chaining": "^7.18.9",
67
+ "@babel/plugin-syntax-async-generators": "^7.8.4",
68
+ "@babel/plugin-syntax-class-properties": "^7.12.13",
69
+ "@babel/plugin-syntax-decorators": "^7.18.6",
70
+ "@babel/plugin-syntax-do-expressions": "^7.18.6",
71
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
72
+ "@babel/plugin-syntax-flow": "^7.18.6",
73
+ "@babel/plugin-syntax-function-bind": "^7.18.6",
74
+ "@babel/plugin-syntax-function-sent": "^7.18.6",
75
+ "@babel/plugin-syntax-jsx": "^7.18.6",
76
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
77
+ "@babel/preset-typescript": "^7.18.6",
78
+ "@babel/traverse": "^7.18.10",
79
+ "@babel/types": "^7.18.10",
80
+ "@prettier/plugin-pug": "^1.8.1",
81
+ "@typescript-eslint/typescript-estree": "^3.8.0",
82
+ "@vitalets/google-translate-api": "^8.0.0",
83
+ "chalk": "^3.0.0",
84
+ "glob": "^7.1.6",
85
+ "mustache": "^4.0.1",
86
+ "parse5": "^5.1.1",
87
+ "pug-lexer": "^4.1.0",
88
+ "pug-parser": "^5.0.1",
89
+ "pug-source-gen": "0.0.2",
90
+ "babel-template": "^6.26.0",
91
+ "commander": "^2.18.0",
92
+ "di18n-core": "^0.1.29",
93
+ "inquirer": "^6.2.2"
61
94
  },
62
95
  "peerDependencies": {
63
96
  "axios": ">=0.21.1",