neo-cmp-cli 1.8.7 → 1.8.8

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 (124) hide show
  1. package/bin/index.js +2 -2
  2. package/dist/_virtual/_commonjsHelpers.js +12 -0
  3. package/dist/_virtual/array-set.js +7 -0
  4. package/dist/_virtual/base64-vlq.js +7 -0
  5. package/dist/_virtual/base64.js +7 -0
  6. package/dist/_virtual/binary-search.js +7 -0
  7. package/dist/_virtual/mapping-list.js +7 -0
  8. package/dist/_virtual/quick-sort.js +7 -0
  9. package/dist/_virtual/source-map-consumer.js +7 -0
  10. package/dist/_virtual/source-map-generator.js +7 -0
  11. package/dist/_virtual/source-map-support.js +7 -0
  12. package/dist/_virtual/source-map.js +7 -0
  13. package/dist/_virtual/source-node.js +7 -0
  14. package/dist/_virtual/typescript.js +7 -0
  15. package/dist/_virtual/util.js +7 -0
  16. package/dist/config/auth.config.js +43 -0
  17. package/dist/config/default.config.js +192 -0
  18. package/dist/config/index.js +26 -0
  19. package/dist/main.js +9 -0
  20. package/dist/main2.js +259 -0
  21. package/dist/module/inspect.js +63 -0
  22. package/dist/module/neoInit.js +75 -0
  23. package/dist/module/neoInitByCopy.js +83 -0
  24. package/dist/neo/neoLogin.js +590 -0
  25. package/dist/neo/neoRequire.js +123 -0
  26. package/dist/neo/neoService.js +898 -0
  27. package/dist/node_modules/buffer-from/index.js +86 -0
  28. package/dist/node_modules/source-map/lib/array-set.js +138 -0
  29. package/dist/node_modules/source-map/lib/base64-vlq.js +157 -0
  30. package/dist/node_modules/source-map/lib/base64.js +83 -0
  31. package/dist/node_modules/source-map/lib/binary-search.js +129 -0
  32. package/dist/node_modules/source-map/lib/mapping-list.js +96 -0
  33. package/dist/node_modules/source-map/lib/quick-sort.js +130 -0
  34. package/dist/node_modules/source-map/lib/source-map-consumer.js +1166 -0
  35. package/dist/node_modules/source-map/lib/source-map-generator.js +445 -0
  36. package/dist/node_modules/source-map/lib/source-node.js +431 -0
  37. package/dist/node_modules/source-map/lib/util.js +506 -0
  38. package/dist/node_modules/source-map/source-map.js +27 -0
  39. package/dist/node_modules/source-map-support/source-map-support.js +646 -0
  40. package/dist/node_modules/typescript/lib/typescript.js +174130 -0
  41. package/dist/oss/publish2oss.js +331 -0
  42. package/dist/plugins/AddNeoRequirePlugin.js +195 -0
  43. package/dist/utils/autoEntryRootDir.js +103 -0
  44. package/dist/utils/cmpUtils/createCmpByTemplate.js +82 -0
  45. package/dist/utils/cmpUtils/createCmpByZip.js +433 -0
  46. package/dist/utils/cmpUtils/createCommonModulesCode.js +139 -0
  47. package/dist/utils/cmpUtils/deleteCmp.js +81 -0
  48. package/dist/utils/cmpUtils/getCmpModelRegisterCode.js +47 -0
  49. package/dist/utils/cmpUtils/getCmpPreviewCode.js +60 -0
  50. package/dist/utils/cmpUtils/getCmpRegisterCode.js +47 -0
  51. package/dist/utils/cmpUtils/getCmpTypeByDir.js +59 -0
  52. package/dist/utils/cmpUtils/hasCmpTypeByDir.js +27 -0
  53. package/dist/utils/cmpUtils/previewCmp.js +75 -0
  54. package/dist/utils/cmpUtils/pullCmp.js +126 -0
  55. package/dist/utils/cmpUtils/pushCmp.js +254 -0
  56. package/dist/utils/common.js +125 -0
  57. package/dist/utils/configureNeoBuild.js +129 -0
  58. package/dist/utils/generateEntries.js +80 -0
  59. package/dist/utils/neoConfigInit.js +30 -0
  60. package/dist/utils/neoParams.js +26 -0
  61. package/dist/utils/pathUtils.js +40 -0
  62. package/dist/utils/projectNameValidator.js +90 -0
  63. package/dist/utils/projectUtils/createCmpProjectByTemplate.js +81 -0
  64. package/dist/utils/projectUtils/createCmpProjectZip.js +141 -0
  65. package/dist/utils/projectUtils/getEntries.js +99 -0
  66. package/dist/utils/projectUtils/getEntriesWithAutoRegister.js +129 -0
  67. package/dist/utils/projectUtils/hasNeoProject.js +34 -0
  68. package/dist/utils/projectUtils/openProject.js +117 -0
  69. package/dist/utils/projectUtils/updatePublishLog.js +47 -0
  70. package/dist/utils/replaceInFilesByMap.js +71 -0
  71. package/dist/utils/replaceInPackage.js +151 -0
  72. package/dist/utils/resetPackageVersion.js +132 -0
  73. package/package.json +6 -8
  74. package/test/demo.js +0 -2
  75. package/src/config/auth.config.js +0 -27
  76. package/src/config/default.config.js +0 -176
  77. package/src/config/index.js +0 -9
  78. package/src/initData/defaultTemplate.html +0 -13
  79. package/src/initData/neo.config.js +0 -138
  80. package/src/main.js +0 -221
  81. package/src/module/inspect.js +0 -41
  82. package/src/module/neoInit.js +0 -55
  83. package/src/module/neoInitByCopy.js +0 -61
  84. package/src/neo/NeoUMDContent.js +0 -30
  85. package/src/neo/neoLogin.js +0 -565
  86. package/src/neo/neoRequire.js +0 -125
  87. package/src/neo/neoService.js +0 -874
  88. package/src/neo/webpack.mf.js +0 -60
  89. package/src/neo/wrapperContent.js +0 -16
  90. package/src/oss/publish2oss.js +0 -348
  91. package/src/plugins/AddNeoRequirePlugin-v1.js +0 -47
  92. package/src/plugins/AddNeoRequirePlugin.js +0 -179
  93. package/src/plugins/README.md +0 -109
  94. package/src/utils/autoEntryRootDir.js +0 -85
  95. package/src/utils/cmpUtils/createCmpByTemplate.js +0 -60
  96. package/src/utils/cmpUtils/createCmpByZip.js +0 -408
  97. package/src/utils/cmpUtils/createCommonModulesCode.js +0 -121
  98. package/src/utils/cmpUtils/deleteCmp.js +0 -63
  99. package/src/utils/cmpUtils/getCmpModelRegisterCode.js +0 -31
  100. package/src/utils/cmpUtils/getCmpPreviewCode.js +0 -43
  101. package/src/utils/cmpUtils/getCmpRegisterCode.js +0 -31
  102. package/src/utils/cmpUtils/getCmpTypeByDir.js +0 -41
  103. package/src/utils/cmpUtils/hasCmpTypeByDir.js +0 -11
  104. package/src/utils/cmpUtils/previewCmp.js +0 -55
  105. package/src/utils/cmpUtils/pullCmp.js +0 -104
  106. package/src/utils/cmpUtils/pushCmp.js +0 -230
  107. package/src/utils/common.js +0 -107
  108. package/src/utils/configureNeoBuild.js +0 -109
  109. package/src/utils/generateEntries.js +0 -63
  110. package/src/utils/neoConfigInit.js +0 -13
  111. package/src/utils/neoParams.js +0 -12
  112. package/src/utils/pathUtils.js +0 -23
  113. package/src/utils/projectNameValidator.js +0 -76
  114. package/src/utils/projectUtils/createCmpProjectByTemplate.js +0 -59
  115. package/src/utils/projectUtils/createCmpProjectZip.js +0 -120
  116. package/src/utils/projectUtils/getEntries.js +0 -80
  117. package/src/utils/projectUtils/getEntriesWithAutoRegister.js +0 -108
  118. package/src/utils/projectUtils/hasNeoProject.js +0 -17
  119. package/src/utils/projectUtils/openProject.js +0 -96
  120. package/src/utils/projectUtils/updatePublishLog.js +0 -30
  121. package/src/utils/replaceInFiles.js +0 -47
  122. package/src/utils/replaceInFilesByMap.js +0 -54
  123. package/src/utils/replaceInPackage.js +0 -134
  124. package/src/utils/resetPackageVersion.js +0 -115
@@ -0,0 +1,130 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const quickSort = require('../../../_virtual/quick-sort.js');
6
+
7
+ /* -*- Mode: js; js-indent-level: 2; -*- */
8
+
9
+ var hasRequiredQuickSort;
10
+
11
+ function requireQuickSort () {
12
+ if (hasRequiredQuickSort) return quickSort.__exports;
13
+ hasRequiredQuickSort = 1;
14
+ /*
15
+ * Copyright 2011 Mozilla Foundation and contributors
16
+ * Licensed under the New BSD license. See LICENSE or:
17
+ * http://opensource.org/licenses/BSD-3-Clause
18
+ */
19
+
20
+ // It turns out that some (most?) JavaScript engines don't self-host
21
+ // `Array.prototype.sort`. This makes sense because C++ will likely remain
22
+ // faster than JS when doing raw CPU-intensive sorting. However, when using a
23
+ // custom comparator function, calling back and forth between the VM's C++ and
24
+ // JIT'd JS is rather slow *and* loses JIT type information, resulting in
25
+ // worse generated code for the comparator function than would be optimal. In
26
+ // fact, when sorting with a comparator, these costs outweigh the benefits of
27
+ // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
28
+ // a ~3500ms mean speed-up in `bench/bench.html`.
29
+
30
+ /**
31
+ * Swap the elements indexed by `x` and `y` in the array `ary`.
32
+ *
33
+ * @param {Array} ary
34
+ * The array.
35
+ * @param {Number} x
36
+ * The index of the first item.
37
+ * @param {Number} y
38
+ * The index of the second item.
39
+ */
40
+ function swap(ary, x, y) {
41
+ var temp = ary[x];
42
+ ary[x] = ary[y];
43
+ ary[y] = temp;
44
+ }
45
+
46
+ /**
47
+ * Returns a random integer within the range `low .. high` inclusive.
48
+ *
49
+ * @param {Number} low
50
+ * The lower bound on the range.
51
+ * @param {Number} high
52
+ * The upper bound on the range.
53
+ */
54
+ function randomIntInRange(low, high) {
55
+ return Math.round(low + (Math.random() * (high - low)));
56
+ }
57
+
58
+ /**
59
+ * The Quick Sort algorithm.
60
+ *
61
+ * @param {Array} ary
62
+ * An array to sort.
63
+ * @param {function} comparator
64
+ * Function to use to compare two items.
65
+ * @param {Number} p
66
+ * Start index of the array
67
+ * @param {Number} r
68
+ * End index of the array
69
+ */
70
+ function doQuickSort(ary, comparator, p, r) {
71
+ // If our lower bound is less than our upper bound, we (1) partition the
72
+ // array into two pieces and (2) recurse on each half. If it is not, this is
73
+ // the empty array and our base case.
74
+
75
+ if (p < r) {
76
+ // (1) Partitioning.
77
+ //
78
+ // The partitioning chooses a pivot between `p` and `r` and moves all
79
+ // elements that are less than or equal to the pivot to the before it, and
80
+ // all the elements that are greater than it after it. The effect is that
81
+ // once partition is done, the pivot is in the exact place it will be when
82
+ // the array is put in sorted order, and it will not need to be moved
83
+ // again. This runs in O(n) time.
84
+
85
+ // Always choose a random pivot so that an input array which is reverse
86
+ // sorted does not cause O(n^2) running time.
87
+ var pivotIndex = randomIntInRange(p, r);
88
+ var i = p - 1;
89
+
90
+ swap(ary, pivotIndex, r);
91
+ var pivot = ary[r];
92
+
93
+ // Immediately after `j` is incremented in this loop, the following hold
94
+ // true:
95
+ //
96
+ // * Every element in `ary[p .. i]` is less than or equal to the pivot.
97
+ //
98
+ // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
99
+ for (var j = p; j < r; j++) {
100
+ if (comparator(ary[j], pivot) <= 0) {
101
+ i += 1;
102
+ swap(ary, i, j);
103
+ }
104
+ }
105
+
106
+ swap(ary, i + 1, j);
107
+ var q = i + 1;
108
+
109
+ // (2) Recurse on each half.
110
+
111
+ doQuickSort(ary, comparator, p, q - 1);
112
+ doQuickSort(ary, comparator, q + 1, r);
113
+ }
114
+ }
115
+
116
+ /**
117
+ * Sort the given array in-place with the given comparator function.
118
+ *
119
+ * @param {Array} ary
120
+ * An array to sort.
121
+ * @param {function} comparator
122
+ * Function to use to compare two items.
123
+ */
124
+ quickSort.__exports.quickSort = function (ary, comparator) {
125
+ doQuickSort(ary, comparator, 0, ary.length - 1);
126
+ };
127
+ return quickSort.__exports;
128
+ }
129
+
130
+ exports.__require = requireQuickSort;