ztxkutils 2.10.66-30 → 2.10.66-32

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 (56) hide show
  1. package/dist/print.js +17 -8
  2. package/package.json +1 -1
  3. package/zti18n-cli/bin/index.js +3 -3
  4. package/zti18n-cli/index.js +23 -23
  5. package/zti18n-cli/src/command/collect.js +353 -353
  6. package/zti18n-cli/src/command/convert.js +17 -17
  7. package/zti18n-cli/src/command/convert2.js +35 -35
  8. package/zti18n-cli/src/command/initFileConf.js +133 -133
  9. package/zti18n-cli/src/command/publish.js +24 -24
  10. package/zti18n-cli/src/conf/BaseConf.js +21 -21
  11. package/zti18n-cli/src/conf/FileConf.js +116 -116
  12. package/zti18n-cli/src/index.js +75 -75
  13. package/zti18n-cli/src/translate/google.js +87 -87
  14. package/zti18n-cli/src/utils/isChinese.js +3 -3
  15. package/zti18n-cli/src/utils/log.js +8 -8
  16. package/zti18n-cli/src/utils/mergeOptions.js +45 -45
  17. package/zti18n-cli/src/utils/reactOptions.js +73 -73
  18. package/zti18n-cli/src/utils/vueOptions.js +69 -69
  19. package/zti18n-core/index.js +1 -1
  20. package/zti18n-core/src/index.js +5 -5
  21. package/zti18n-core/src/plugin/reactIntlToReactIntlUniversal.js +224 -224
  22. package/zti18n-core/src/plugin/reactIntlUniversalToDi18n.js +64 -64
  23. package/zti18n-core/src/transform/defaultPkMap.js +79 -79
  24. package/zti18n-core/src/transform/transformHtml.js +271 -271
  25. package/zti18n-core/src/transform/transformJs.js +489 -489
  26. package/zti18n-core/src/transform/transformPug.js +272 -272
  27. package/zti18n-core/src/transform/transformReactIntlToReactIntlUniversal.js +96 -96
  28. package/zti18n-core/src/transform/transformReactIntlUniveralToDi18n.js +90 -90
  29. package/zti18n-core/src/transform/transformToDi18n.js +22 -22
  30. package/zti18n-core/src/transform/transformTs.js +41 -41
  31. package/zti18n-core/src/transform/transformVue.js +126 -126
  32. package/zti18n-core/src/transform/transformZeroToDi18n.js +105 -105
  33. package/zti18n-core/src/translate/google.js +6 -6
  34. package/zti18n-core/src/utils/constants.js +3 -3
  35. package/zti18n-core/src/utils/getIgnoreLines.js +14 -14
  36. package/zti18n-core/src/utils/isChinese.js +3 -3
  37. package/zti18n-core/src/utils/log.js +8 -8
  38. package/dist/dataModel-1fbaff40.js +0 -24
  39. package/dist/dataModel-6c68c88f.js +0 -26
  40. package/dist/dataModel-914b6226.js +0 -26
  41. package/dist/dataModel-b3629ef3.js +0 -26
  42. package/dist/reqUrl-22b880a4.js +0 -82
  43. package/dist/request-1e442d5d.js +0 -2982
  44. package/dist/request-4c29d6de.js +0 -2977
  45. package/dist/request-80d1ac80.js +0 -2992
  46. package/dist/request-986d7090.js +0 -2923
  47. package/dist/request-c0970aae.js +0 -2917
  48. package/dist/request-d1972b41.js +0 -2992
  49. package/dist/request-d8d72b87.js +0 -2982
  50. package/dist/request-f600ad7a.js +0 -2992
  51. package/dist/tools-16a7fb45.js +0 -2446
  52. package/dist/validate-18e52490.js +0 -249
  53. package/dist/validate-21164759.js +0 -260
  54. package/dist/validate-21b58a69.js +0 -260
  55. package/dist/validate-2de5a28f.js +0 -260
  56. package/dist/validate-ab47ebe9.js +0 -260
package/dist/print.js CHANGED
@@ -396,11 +396,16 @@ function htmlToPdfNoCanvas(_a) {
396
396
  windowWidth: pageWidth,
397
397
  callback: function (res) {
398
398
  // 添加呈现的HTML所需的页面(从第2页开始)
399
- for (var i_1 = 2, j = res.internal.getNumberOfPages(); i_1 <= j; i_1++) {
400
- pdf.addPage(pageFormat, pageOrient);
401
- }
402
- for (var i_2 = 1, j = res.internal.getNumberOfPages(); i_2 <= j; i_2++) {
403
- pdf.setPage(i_2);
399
+ // 注释掉这里导致多出一页空白页
400
+ // for (
401
+ // let i = 2, j = (res as any).internal.getNumberOfPages();
402
+ // i <= j;
403
+ // i++
404
+ // ) {
405
+ // pdf.addPage(pageFormat, pageOrient);
406
+ // }
407
+ for (var i_1 = 1, j = res.internal.getNumberOfPages(); i_1 <= j; i_1++) {
408
+ pdf.setPage(i_1);
404
409
  // 添加水印
405
410
  if (isAddWater) {
406
411
  setPdfWater(pdf, waterBase64, imgWidth, imgHeight);
@@ -498,9 +503,13 @@ function htmlToPdfNoCanvas(_a) {
498
503
  windowWidth: pageWidth_1,
499
504
  callback: function (res) {
500
505
  // 添加呈现的HTML所需的页面(从第2页开始)
501
- for (var i = 2, j = res.internal.getNumberOfPages(); i <= j; i++) {
502
- pdf_3.addPage(pageFormat, pageOrient);
503
- }
506
+ // for (
507
+ // let i = 2, j = (res as any).internal.getNumberOfPages();
508
+ // i <= j;
509
+ // i++
510
+ // ) {
511
+ // pdf.addPage(pageFormat, pageOrient);
512
+ // }
504
513
  for (var i = 1, j = res.internal.getNumberOfPages(); i <= j; i++) {
505
514
  pdf_3.setPage(i);
506
515
  // 添加水印
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkutils",
3
- "version": "2.10.66-30",
3
+ "version": "2.10.66-32",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,3 +1,3 @@
1
- #!/usr/bin/env node
2
-
3
- require('../');
1
+ #!/usr/bin/env node
2
+
3
+ require('../');
@@ -1,23 +1,23 @@
1
- const program = require('./src');
2
- const initFileConf = require('./src/command/initFileConf');
3
-
4
- program
5
- .command('init')
6
- .alias('i')
7
- .description('init locales conf')
8
- .option('--vue', 'init for vue project')
9
- .action(function (options) {
10
- initFileConf(options.vue);
11
- })
12
- .on('--help', function () {
13
- console.log(' Examples:');
14
- console.log();
15
- console.log(' $ zti18n init -c ./config/prod.config.js');
16
- console.log();
17
- });
18
-
19
- program.command('*').action(function (cmd) {
20
- console.log('unknown command "%s"', cmd);
21
- });
22
-
23
- program.parse(process.argv);
1
+ const program = require('./src');
2
+ const initFileConf = require('./src/command/initFileConf');
3
+
4
+ program
5
+ .command('init')
6
+ .alias('i')
7
+ .description('init locales conf')
8
+ .option('--vue', 'init for vue project')
9
+ .action(function (options) {
10
+ initFileConf(options.vue);
11
+ })
12
+ .on('--help', function () {
13
+ console.log(' Examples:');
14
+ console.log();
15
+ console.log(' $ zti18n init -c ./config/prod.config.js');
16
+ console.log();
17
+ });
18
+
19
+ program.command('*').action(function (cmd) {
20
+ console.log('unknown command "%s"', cmd);
21
+ });
22
+
23
+ program.parse(process.argv);