ztxkutils 2.10.66-14 → 2.10.66-16
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.js +1 -1
- package/dist/{request-ba8abf99.js → request-588c90ec.js} +92 -18
- package/dist/{request-0cc024b1.js → request-dc69f021.js} +68 -13
- package/dist/request.js +1 -1
- package/package.json +1 -1
- package/zti18n-cli/bin/index.js +3 -3
- package/zti18n-cli/index.js +23 -23
- package/zti18n-cli/src/command/collect.js +351 -342
- package/zti18n-cli/src/command/convert.js +17 -17
- package/zti18n-cli/src/command/convert2.js +35 -35
- package/zti18n-cli/src/command/initFileConf.js +133 -133
- package/zti18n-cli/src/command/publish.js +24 -24
- package/zti18n-cli/src/conf/BaseConf.js +21 -21
- package/zti18n-cli/src/conf/FileConf.js +116 -116
- package/zti18n-cli/src/index.js +75 -75
- package/zti18n-cli/src/translate/google.js +6 -6
- package/zti18n-cli/src/utils/isChinese.js +3 -3
- package/zti18n-cli/src/utils/log.js +8 -8
- package/zti18n-cli/src/utils/mergeOptions.js +45 -45
- package/zti18n-cli/src/utils/reactOptions.js +73 -73
- package/zti18n-cli/src/utils/vueOptions.js +69 -69
- package/zti18n-core/index.js +1 -1
- package/zti18n-core/src/index.js +5 -5
- package/zti18n-core/src/plugin/reactIntlToReactIntlUniversal.js +224 -224
- package/zti18n-core/src/plugin/reactIntlUniversalToDi18n.js +64 -64
- package/zti18n-core/src/transform/defaultPkMap.js +79 -79
- package/zti18n-core/src/transform/transformHtml.js +271 -271
- package/zti18n-core/src/transform/transformJs.js +488 -488
- package/zti18n-core/src/transform/transformPug.js +272 -272
- package/zti18n-core/src/transform/transformReactIntlToReactIntlUniversal.js +96 -96
- package/zti18n-core/src/transform/transformReactIntlUniveralToDi18n.js +90 -90
- package/zti18n-core/src/transform/transformToDi18n.js +22 -22
- package/zti18n-core/src/transform/transformTs.js +41 -41
- package/zti18n-core/src/transform/transformVue.js +126 -126
- package/zti18n-core/src/transform/transformZeroToDi18n.js +105 -105
- package/zti18n-core/src/translate/google.js +6 -6
- package/zti18n-core/src/utils/constants.js +3 -3
- package/zti18n-core/src/utils/getIgnoreLines.js +14 -14
- package/zti18n-core/src/utils/isChinese.js +3 -3
- package/zti18n-core/src/utils/log.js +8 -8
- package/dist/authority-e6bde99f.js +0 -423
- package/dist/reqUrl-3792afcd.js +0 -82
- package/dist/reqUrl-787dd9e5.js +0 -82
- package/dist/request-ef290b9a.js +0 -2838
- package/dist/tools-09a4d620.js +0 -2445
- package/dist/tools-0ca888cd.js +0 -2473
- package/dist/validate-6e735536.js +0 -79
- package/dist/zti18n-cli/bin/index.d.ts +0 -2
- package/dist/zti18n-cli/index.d.ts +0 -1
- package/dist/zti18n-cli/src/command/collect.d.ts +0 -2
- package/dist/zti18n-cli/src/command/convert.d.ts +0 -2
- package/dist/zti18n-cli/src/command/convert2.d.ts +0 -2
- package/dist/zti18n-cli/src/command/initFileConf.d.ts +0 -2
- package/dist/zti18n-cli/src/command/publish.d.ts +0 -2
- package/dist/zti18n-cli/src/conf/BaseConf.d.ts +0 -8
- package/dist/zti18n-cli/src/conf/FileConf.d.ts +0 -6
- package/dist/zti18n-cli/src/index.d.ts +0 -1
- package/dist/zti18n-cli/src/translate/google.d.ts +0 -2
- package/dist/zti18n-cli/src/utils/isChinese.d.ts +0 -2
- package/dist/zti18n-cli/src/utils/log.d.ts +0 -4
- package/dist/zti18n-cli/src/utils/mergeOptions.d.ts +0 -24
- package/dist/zti18n-cli/src/utils/reactOptions.d.ts +0 -21
- package/dist/zti18n-cli/src/utils/vueOptions.d.ts +0 -17
- package/dist/zti18n-core/index.d.ts +0 -2
- package/dist/zti18n-core/src/index.d.ts +0 -8
- package/dist/zti18n-core/src/plugin/reactIntlToReactIntlUniversal.d.ts +0 -19
- package/dist/zti18n-core/src/plugin/reactIntlUniversalToDi18n.d.ts +0 -9
- package/dist/zti18n-core/src/transform/defaultPkMap.d.ts +0 -75
- package/dist/zti18n-core/src/transform/transformHtml.d.ts +0 -5
- package/dist/zti18n-core/src/transform/transformJs.d.ts +0 -5
- package/dist/zti18n-core/src/transform/transformPug.d.ts +0 -5
- package/dist/zti18n-core/src/transform/transformReactIntlToReactIntlUniversal.d.ts +0 -2
- package/dist/zti18n-core/src/transform/transformReactIntlUniveralToDi18n.d.ts +0 -2
- package/dist/zti18n-core/src/transform/transformToDi18n.d.ts +0 -5
- package/dist/zti18n-core/src/transform/transformTs.d.ts +0 -5
- package/dist/zti18n-core/src/transform/transformVue.d.ts +0 -5
- package/dist/zti18n-core/src/transform/transformZeroToDi18n.d.ts +0 -2
- package/dist/zti18n-core/src/translate/google.d.ts +0 -2
- package/dist/zti18n-core/src/utils/constants.d.ts +0 -3
- package/dist/zti18n-core/src/utils/getIgnoreLines.d.ts +0 -2
- package/dist/zti18n-core/src/utils/isChinese.d.ts +0 -2
- package/dist/zti18n-core/src/utils/log.d.ts +0 -4
@@ -1,79 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @description 常用正则表达式
|
3
|
-
*/
|
4
|
-
var validate = {
|
5
|
-
/**
|
6
|
-
* @description 长度验证,最小长度字符,0-200个字符
|
7
|
-
*/
|
8
|
-
smallLenValidate: /^(?:\s*)[\s\S]{0,200}(?:\s*)$/,
|
9
|
-
/**
|
10
|
-
* @description 长度验证,中等长度字符,0-400个字符
|
11
|
-
*/
|
12
|
-
middleLenValidate: /^(?:\s*)[\s\S]{0,400}(?:\s*)$/,
|
13
|
-
/**
|
14
|
-
* @description 长度验证,最大长度字符,0-600个字符
|
15
|
-
*/
|
16
|
-
largeLenValidate: /^(?:\s*)[\s\S]{0,600}(?:\s*)$/,
|
17
|
-
/**
|
18
|
-
* @description 长度验证,最大长度字符,0-5000个字符
|
19
|
-
*/
|
20
|
-
maxlargeLenValidate: /^(?:\s*)[\s\S]{0,5000}(?:\s*)$/,
|
21
|
-
/**
|
22
|
-
* @description 电话号码验证
|
23
|
-
*/
|
24
|
-
// phoneValidate: /^1(3\d|4\d|5\d|6\d|7\d|8\d|9\d)\d{8}$/,
|
25
|
-
// 数字 横线 长度 0 - 15位/^([0-9])|(\-)*$/
|
26
|
-
phoneValidate: /^[0-9\-]{0,15}$/,
|
27
|
-
/**
|
28
|
-
* @description 短信验证码 接受11位手机号
|
29
|
-
*/
|
30
|
-
shortPhoneValidate: /^1[0-9]{10}$/,
|
31
|
-
/**
|
32
|
-
* @description 身份证验证
|
33
|
-
* 18位 最后一位可以是X x
|
34
|
-
*/
|
35
|
-
idCardValidate: /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
|
36
|
-
/**
|
37
|
-
* @description 邮箱验证
|
38
|
-
*/
|
39
|
-
emailValidate: /^([\s\S])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,8})$/,
|
40
|
-
/**
|
41
|
-
* @description 密码验证
|
42
|
-
*/
|
43
|
-
passwordValidate: /^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$)^.{8,16}$/,
|
44
|
-
/**
|
45
|
-
* @description 空格验证
|
46
|
-
*/
|
47
|
-
spaceValidate: /^[^\s]*$/g,
|
48
|
-
};
|
49
|
-
var commonMessage = {
|
50
|
-
smallLenMessage: function (type) {
|
51
|
-
if (type === void 0) { type = ''; }
|
52
|
-
return type + "\u8D85\u8FC7\u6700\u5927\u5B57\u7B26\u957F\u5EA6200";
|
53
|
-
},
|
54
|
-
middleLenMessage: function (type) {
|
55
|
-
if (type === void 0) { type = ''; }
|
56
|
-
return type + "\u8D85\u8FC7\u6700\u5927\u5B57\u7B26\u957F\u5EA6400";
|
57
|
-
},
|
58
|
-
largeLenMessage: function (type) {
|
59
|
-
if (type === void 0) { type = ''; }
|
60
|
-
return type + "\u8D85\u8FC7\u6700\u5927\u5B57\u7B26\u957F\u5EA6600";
|
61
|
-
},
|
62
|
-
maxlargeLenValidate: function (type) {
|
63
|
-
if (type === void 0) { type = ''; }
|
64
|
-
return type + "\u8D85\u8FC7\u6700\u5927\u5B57\u7B26\u957F\u5EA65000";
|
65
|
-
},
|
66
|
-
phoneMessage: '请输入正确的手机号',
|
67
|
-
idCardMessage: '请输入正确的身份证',
|
68
|
-
emailMessage: '请输入正确的邮箱',
|
69
|
-
passwordMessage: '密码由8-16位的字母+数字,字母+特殊字符,数字+特殊字符组成',
|
70
|
-
spaceMessage: '请勿输入空格',
|
71
|
-
};
|
72
|
-
|
73
|
-
var validate$1 = /*#__PURE__*/Object.freeze({
|
74
|
-
__proto__: null,
|
75
|
-
validate: validate,
|
76
|
-
commonMessage: commonMessage
|
77
|
-
});
|
78
|
-
|
79
|
-
export { validate as a, commonMessage as c, validate$1 as v };
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export = program;
|
@@ -1,24 +0,0 @@
|
|
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;
|
@@ -1,21 +0,0 @@
|
|
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
|
-
}
|
@@ -1,17 +0,0 @@
|
|
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
|
-
}
|
@@ -1,8 +0,0 @@
|
|
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;
|
@@ -1,19 +0,0 @@
|
|
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
|
-
};
|
@@ -1,75 +0,0 @@
|
|
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;
|