@gct-paas/core 0.1.4-dev.3 → 0.1.4-dev.4

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 (122) hide show
  1. package/dist/index.min.cjs +1 -1
  2. package/dist/index.system.min.js +1 -1
  3. package/es/controller/form/form.controller.mjs +1 -2
  4. package/es/controller/gct-form/gct-form.controller.mjs +1 -2
  5. package/es/global/gct/gct.d.ts +1 -1
  6. package/es/interface/controller/form/form.controller.mjs +1 -1
  7. package/es/interface/hooks/i-designer-hooks.mjs +1 -1
  8. package/es/interface/i-modal/i-modal.mjs +1 -1
  9. package/es/modules/api-service/api-manage.mjs +1 -1
  10. package/es/modules/api-service/api-service.interface.d.ts +2 -2
  11. package/es/modules/api-service/api-service.interface.mjs +2 -2
  12. package/es/modules/api-service/api-service.mjs +1 -1
  13. package/es/modules/api-service/index.mjs +2 -4
  14. package/es/modules/env-manager/env-manager.d.ts +1 -1
  15. package/es/modules/env-manager/env-manager.interface.d.ts +1 -1
  16. package/es/modules/platform-config/useBasicSetting.d.ts +2 -2
  17. package/es/modules/platform-config/useDeploySetting.d.ts +1 -1
  18. package/es/modules/platform-config/useLoginSetting.d.ts +1 -1
  19. package/es/modules/platform-config/useOrgSetting.d.ts +1 -1
  20. package/es/modules/platform-config/useSecuritySetting.d.ts +1 -1
  21. package/es/modules/platform-config/useThemeSetting.d.ts +1 -1
  22. package/es/modules/platform-config/useWatermarkSetting.d.ts +1 -1
  23. package/es/register/designer-register/designer-register.mjs +1 -2
  24. package/es/register/render-register/render-register.mjs +1 -2
  25. package/es/store/global-store.mjs +1 -1
  26. package/es/types/index.d.ts +2 -2
  27. package/es/utils/plugin-pkg-util/plugin-pkg-util.mjs +1 -1
  28. package/es/utils/plugin-static-resource/plugin-static-resource.mjs +1 -1
  29. package/es/utils/tools/tools.mjs +1 -2
  30. package/package.json +6 -8
  31. package/es/_virtual/_commonjs-dynamic-modules.mjs +0 -5
  32. package/es/_virtual/_commonjsHelpers.mjs +0 -44
  33. package/es/_virtual/aes.mjs +0 -3
  34. package/es/_virtual/blowfish.mjs +0 -3
  35. package/es/_virtual/cipher-core.mjs +0 -3
  36. package/es/_virtual/core.mjs +0 -3
  37. package/es/_virtual/enc-base64.mjs +0 -3
  38. package/es/_virtual/enc-base64url.mjs +0 -3
  39. package/es/_virtual/enc-utf16.mjs +0 -3
  40. package/es/_virtual/evpkdf.mjs +0 -3
  41. package/es/_virtual/format-hex.mjs +0 -3
  42. package/es/_virtual/hmac.mjs +0 -3
  43. package/es/_virtual/index.mjs +0 -7
  44. package/es/_virtual/index2.mjs +0 -7
  45. package/es/_virtual/index3.mjs +0 -3
  46. package/es/_virtual/lib-typedarrays.mjs +0 -3
  47. package/es/_virtual/md5.mjs +0 -3
  48. package/es/_virtual/mode-cfb.mjs +0 -3
  49. package/es/_virtual/mode-ctr-gladman.mjs +0 -3
  50. package/es/_virtual/mode-ctr.mjs +0 -3
  51. package/es/_virtual/mode-ecb.mjs +0 -3
  52. package/es/_virtual/mode-ofb.mjs +0 -3
  53. package/es/_virtual/pad-ansix923.mjs +0 -3
  54. package/es/_virtual/pad-iso10126.mjs +0 -3
  55. package/es/_virtual/pad-iso97971.mjs +0 -3
  56. package/es/_virtual/pad-nopadding.mjs +0 -3
  57. package/es/_virtual/pad-zeropadding.mjs +0 -3
  58. package/es/_virtual/pbkdf2.mjs +0 -3
  59. package/es/_virtual/rabbit-legacy.mjs +0 -3
  60. package/es/_virtual/rabbit.mjs +0 -3
  61. package/es/_virtual/rc4.mjs +0 -3
  62. package/es/_virtual/ripemd160.mjs +0 -3
  63. package/es/_virtual/sha1.mjs +0 -3
  64. package/es/_virtual/sha224.mjs +0 -3
  65. package/es/_virtual/sha256.mjs +0 -3
  66. package/es/_virtual/sha3.mjs +0 -3
  67. package/es/_virtual/sha384.mjs +0 -3
  68. package/es/_virtual/sha512.mjs +0 -3
  69. package/es/_virtual/tripledes.mjs +0 -3
  70. package/es/_virtual/x64-core.mjs +0 -3
  71. package/es/node_modules/.pnpm/@gct-paas_api-apaas@0.0.2-dev.4/node_modules/@gct-paas/api-apaas/es/index.mjs +0 -3
  72. package/es/node_modules/.pnpm/@gct-paas_api-apaas@0.0.2-dev.4/node_modules/@gct-paas/api-apaas/es/service/api-config.mjs +0 -8213
  73. package/es/node_modules/.pnpm/@gct-paas_api-platform@0.0.2-dev.4/node_modules/@gct-paas/api-platform/es/index.mjs +0 -3
  74. package/es/node_modules/.pnpm/@gct-paas_api-platform@0.0.2-dev.4/node_modules/@gct-paas/api-platform/es/service/api-config.mjs +0 -7156
  75. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.mjs +0 -255
  76. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.mjs +0 -492
  77. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.mjs +0 -913
  78. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.mjs +0 -824
  79. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.mjs +0 -153
  80. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.mjs +0 -165
  81. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.mjs +0 -166
  82. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.mjs +0 -153
  83. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.mjs +0 -84
  84. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.mjs +0 -160
  85. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.mjs +0 -69
  86. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.mjs +0 -93
  87. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.mjs +0 -285
  88. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.mjs +0 -98
  89. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.mjs +0 -134
  90. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.mjs +0 -76
  91. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.mjs +0 -58
  92. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.mjs +0 -72
  93. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.mjs +0 -67
  94. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.mjs +0 -62
  95. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.mjs +0 -58
  96. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.mjs +0 -48
  97. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.mjs +0 -65
  98. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.mjs +0 -164
  99. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.mjs +0 -211
  100. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.mjs +0 -213
  101. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.mjs +0 -160
  102. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.mjs +0 -284
  103. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.mjs +0 -167
  104. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.mjs +0 -98
  105. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.mjs +0 -216
  106. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.mjs +0 -344
  107. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.mjs +0 -102
  108. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.mjs +0 -344
  109. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.mjs +0 -800
  110. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.mjs +0 -321
  111. package/es/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.mjs +0 -541
  112. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/hook/async-series-hook/async-series-hook.mjs +0 -73
  113. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/hook/index.mjs +0 -2
  114. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/hook/sync-series-hook/sync-series-hook.mjs +0 -100
  115. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/index.mjs +0 -2
  116. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/array/array.mjs +0 -47
  117. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/index.mjs +0 -5
  118. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/object/object.mjs +0 -24
  119. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/qx-event/qx-event.mjs +0 -94
  120. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/qx-event-emitter/qx-event-emitter.mjs +0 -146
  121. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/type-util/type-util.mjs +0 -149
  122. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/util/util.mjs +0 -227
@@ -1,541 +0,0 @@
1
- import '../../../../../_virtual/_commonjsHelpers.mjs';
2
-
3
- var pathBrowserify;
4
- var hasRequiredPathBrowserify;
5
-
6
- function requirePathBrowserify () {
7
- if (hasRequiredPathBrowserify) return pathBrowserify;
8
- hasRequiredPathBrowserify = 1;
9
- // 'path' module extracted from Node.js v8.11.1 (only the posix part)
10
- // transplited with Babel
11
-
12
- // Copyright Joyent, Inc. and other Node contributors.
13
- //
14
- // Permission is hereby granted, free of charge, to any person obtaining a
15
- // copy of this software and associated documentation files (the
16
- // "Software"), to deal in the Software without restriction, including
17
- // without limitation the rights to use, copy, modify, merge, publish,
18
- // distribute, sublicense, and/or sell copies of the Software, and to permit
19
- // persons to whom the Software is furnished to do so, subject to the
20
- // following conditions:
21
- //
22
- // The above copyright notice and this permission notice shall be included
23
- // in all copies or substantial portions of the Software.
24
- //
25
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
26
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
28
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
29
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
30
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
31
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
32
-
33
- 'use strict';
34
-
35
- function assertPath(path) {
36
- if (typeof path !== 'string') {
37
- throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));
38
- }
39
- }
40
-
41
- // Resolves . and .. elements in a path with directory names
42
- function normalizeStringPosix(path, allowAboveRoot) {
43
- var res = '';
44
- var lastSegmentLength = 0;
45
- var lastSlash = -1;
46
- var dots = 0;
47
- var code;
48
- for (var i = 0; i <= path.length; ++i) {
49
- if (i < path.length)
50
- code = path.charCodeAt(i);
51
- else if (code === 47 /*/*/)
52
- break;
53
- else
54
- code = 47 /*/*/;
55
- if (code === 47 /*/*/) {
56
- if (lastSlash === i - 1 || dots === 1) {
57
- // NOOP
58
- } else if (lastSlash !== i - 1 && dots === 2) {
59
- if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {
60
- if (res.length > 2) {
61
- var lastSlashIndex = res.lastIndexOf('/');
62
- if (lastSlashIndex !== res.length - 1) {
63
- if (lastSlashIndex === -1) {
64
- res = '';
65
- lastSegmentLength = 0;
66
- } else {
67
- res = res.slice(0, lastSlashIndex);
68
- lastSegmentLength = res.length - 1 - res.lastIndexOf('/');
69
- }
70
- lastSlash = i;
71
- dots = 0;
72
- continue;
73
- }
74
- } else if (res.length === 2 || res.length === 1) {
75
- res = '';
76
- lastSegmentLength = 0;
77
- lastSlash = i;
78
- dots = 0;
79
- continue;
80
- }
81
- }
82
- if (allowAboveRoot) {
83
- if (res.length > 0)
84
- res += '/..';
85
- else
86
- res = '..';
87
- lastSegmentLength = 2;
88
- }
89
- } else {
90
- if (res.length > 0)
91
- res += '/' + path.slice(lastSlash + 1, i);
92
- else
93
- res = path.slice(lastSlash + 1, i);
94
- lastSegmentLength = i - lastSlash - 1;
95
- }
96
- lastSlash = i;
97
- dots = 0;
98
- } else if (code === 46 /*.*/ && dots !== -1) {
99
- ++dots;
100
- } else {
101
- dots = -1;
102
- }
103
- }
104
- return res;
105
- }
106
-
107
- function _format(sep, pathObject) {
108
- var dir = pathObject.dir || pathObject.root;
109
- var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');
110
- if (!dir) {
111
- return base;
112
- }
113
- if (dir === pathObject.root) {
114
- return dir + base;
115
- }
116
- return dir + sep + base;
117
- }
118
-
119
- var posix = {
120
- // path.resolve([from ...], to)
121
- resolve: function resolve() {
122
- var resolvedPath = '';
123
- var resolvedAbsolute = false;
124
- var cwd;
125
-
126
- for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
127
- var path;
128
- if (i >= 0)
129
- path = arguments[i];
130
- else {
131
- if (cwd === undefined)
132
- cwd = process.cwd();
133
- path = cwd;
134
- }
135
-
136
- assertPath(path);
137
-
138
- // Skip empty entries
139
- if (path.length === 0) {
140
- continue;
141
- }
142
-
143
- resolvedPath = path + '/' + resolvedPath;
144
- resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;
145
- }
146
-
147
- // At this point the path should be resolved to a full absolute path, but
148
- // handle relative paths to be safe (might happen when process.cwd() fails)
149
-
150
- // Normalize the path
151
- resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
152
-
153
- if (resolvedAbsolute) {
154
- if (resolvedPath.length > 0)
155
- return '/' + resolvedPath;
156
- else
157
- return '/';
158
- } else if (resolvedPath.length > 0) {
159
- return resolvedPath;
160
- } else {
161
- return '.';
162
- }
163
- },
164
-
165
- normalize: function normalize(path) {
166
- assertPath(path);
167
-
168
- if (path.length === 0) return '.';
169
-
170
- var isAbsolute = path.charCodeAt(0) === 47 /*/*/;
171
- var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;
172
-
173
- // Normalize the path
174
- path = normalizeStringPosix(path, !isAbsolute);
175
-
176
- if (path.length === 0 && !isAbsolute) path = '.';
177
- if (path.length > 0 && trailingSeparator) path += '/';
178
-
179
- if (isAbsolute) return '/' + path;
180
- return path;
181
- },
182
-
183
- isAbsolute: function isAbsolute(path) {
184
- assertPath(path);
185
- return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;
186
- },
187
-
188
- join: function join() {
189
- if (arguments.length === 0)
190
- return '.';
191
- var joined;
192
- for (var i = 0; i < arguments.length; ++i) {
193
- var arg = arguments[i];
194
- assertPath(arg);
195
- if (arg.length > 0) {
196
- if (joined === undefined)
197
- joined = arg;
198
- else
199
- joined += '/' + arg;
200
- }
201
- }
202
- if (joined === undefined)
203
- return '.';
204
- return posix.normalize(joined);
205
- },
206
-
207
- relative: function relative(from, to) {
208
- assertPath(from);
209
- assertPath(to);
210
-
211
- if (from === to) return '';
212
-
213
- from = posix.resolve(from);
214
- to = posix.resolve(to);
215
-
216
- if (from === to) return '';
217
-
218
- // Trim any leading backslashes
219
- var fromStart = 1;
220
- for (; fromStart < from.length; ++fromStart) {
221
- if (from.charCodeAt(fromStart) !== 47 /*/*/)
222
- break;
223
- }
224
- var fromEnd = from.length;
225
- var fromLen = fromEnd - fromStart;
226
-
227
- // Trim any leading backslashes
228
- var toStart = 1;
229
- for (; toStart < to.length; ++toStart) {
230
- if (to.charCodeAt(toStart) !== 47 /*/*/)
231
- break;
232
- }
233
- var toEnd = to.length;
234
- var toLen = toEnd - toStart;
235
-
236
- // Compare paths to find the longest common path from root
237
- var length = fromLen < toLen ? fromLen : toLen;
238
- var lastCommonSep = -1;
239
- var i = 0;
240
- for (; i <= length; ++i) {
241
- if (i === length) {
242
- if (toLen > length) {
243
- if (to.charCodeAt(toStart + i) === 47 /*/*/) {
244
- // We get here if `from` is the exact base path for `to`.
245
- // For example: from='/foo/bar'; to='/foo/bar/baz'
246
- return to.slice(toStart + i + 1);
247
- } else if (i === 0) {
248
- // We get here if `from` is the root
249
- // For example: from='/'; to='/foo'
250
- return to.slice(toStart + i);
251
- }
252
- } else if (fromLen > length) {
253
- if (from.charCodeAt(fromStart + i) === 47 /*/*/) {
254
- // We get here if `to` is the exact base path for `from`.
255
- // For example: from='/foo/bar/baz'; to='/foo/bar'
256
- lastCommonSep = i;
257
- } else if (i === 0) {
258
- // We get here if `to` is the root.
259
- // For example: from='/foo'; to='/'
260
- lastCommonSep = 0;
261
- }
262
- }
263
- break;
264
- }
265
- var fromCode = from.charCodeAt(fromStart + i);
266
- var toCode = to.charCodeAt(toStart + i);
267
- if (fromCode !== toCode)
268
- break;
269
- else if (fromCode === 47 /*/*/)
270
- lastCommonSep = i;
271
- }
272
-
273
- var out = '';
274
- // Generate the relative path based on the path difference between `to`
275
- // and `from`
276
- for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
277
- if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {
278
- if (out.length === 0)
279
- out += '..';
280
- else
281
- out += '/..';
282
- }
283
- }
284
-
285
- // Lastly, append the rest of the destination (`to`) path that comes after
286
- // the common path parts
287
- if (out.length > 0)
288
- return out + to.slice(toStart + lastCommonSep);
289
- else {
290
- toStart += lastCommonSep;
291
- if (to.charCodeAt(toStart) === 47 /*/*/)
292
- ++toStart;
293
- return to.slice(toStart);
294
- }
295
- },
296
-
297
- _makeLong: function _makeLong(path) {
298
- return path;
299
- },
300
-
301
- dirname: function dirname(path) {
302
- assertPath(path);
303
- if (path.length === 0) return '.';
304
- var code = path.charCodeAt(0);
305
- var hasRoot = code === 47 /*/*/;
306
- var end = -1;
307
- var matchedSlash = true;
308
- for (var i = path.length - 1; i >= 1; --i) {
309
- code = path.charCodeAt(i);
310
- if (code === 47 /*/*/) {
311
- if (!matchedSlash) {
312
- end = i;
313
- break;
314
- }
315
- } else {
316
- // We saw the first non-path separator
317
- matchedSlash = false;
318
- }
319
- }
320
-
321
- if (end === -1) return hasRoot ? '/' : '.';
322
- if (hasRoot && end === 1) return '//';
323
- return path.slice(0, end);
324
- },
325
-
326
- basename: function basename(path, ext) {
327
- if (ext !== undefined && typeof ext !== 'string') throw new TypeError('"ext" argument must be a string');
328
- assertPath(path);
329
-
330
- var start = 0;
331
- var end = -1;
332
- var matchedSlash = true;
333
- var i;
334
-
335
- if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
336
- if (ext.length === path.length && ext === path) return '';
337
- var extIdx = ext.length - 1;
338
- var firstNonSlashEnd = -1;
339
- for (i = path.length - 1; i >= 0; --i) {
340
- var code = path.charCodeAt(i);
341
- if (code === 47 /*/*/) {
342
- // If we reached a path separator that was not part of a set of path
343
- // separators at the end of the string, stop now
344
- if (!matchedSlash) {
345
- start = i + 1;
346
- break;
347
- }
348
- } else {
349
- if (firstNonSlashEnd === -1) {
350
- // We saw the first non-path separator, remember this index in case
351
- // we need it if the extension ends up not matching
352
- matchedSlash = false;
353
- firstNonSlashEnd = i + 1;
354
- }
355
- if (extIdx >= 0) {
356
- // Try to match the explicit extension
357
- if (code === ext.charCodeAt(extIdx)) {
358
- if (--extIdx === -1) {
359
- // We matched the extension, so mark this as the end of our path
360
- // component
361
- end = i;
362
- }
363
- } else {
364
- // Extension does not match, so our result is the entire path
365
- // component
366
- extIdx = -1;
367
- end = firstNonSlashEnd;
368
- }
369
- }
370
- }
371
- }
372
-
373
- if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;
374
- return path.slice(start, end);
375
- } else {
376
- for (i = path.length - 1; i >= 0; --i) {
377
- if (path.charCodeAt(i) === 47 /*/*/) {
378
- // If we reached a path separator that was not part of a set of path
379
- // separators at the end of the string, stop now
380
- if (!matchedSlash) {
381
- start = i + 1;
382
- break;
383
- }
384
- } else if (end === -1) {
385
- // We saw the first non-path separator, mark this as the end of our
386
- // path component
387
- matchedSlash = false;
388
- end = i + 1;
389
- }
390
- }
391
-
392
- if (end === -1) return '';
393
- return path.slice(start, end);
394
- }
395
- },
396
-
397
- extname: function extname(path) {
398
- assertPath(path);
399
- var startDot = -1;
400
- var startPart = 0;
401
- var end = -1;
402
- var matchedSlash = true;
403
- // Track the state of characters (if any) we see before our first dot and
404
- // after any path separator we find
405
- var preDotState = 0;
406
- for (var i = path.length - 1; i >= 0; --i) {
407
- var code = path.charCodeAt(i);
408
- if (code === 47 /*/*/) {
409
- // If we reached a path separator that was not part of a set of path
410
- // separators at the end of the string, stop now
411
- if (!matchedSlash) {
412
- startPart = i + 1;
413
- break;
414
- }
415
- continue;
416
- }
417
- if (end === -1) {
418
- // We saw the first non-path separator, mark this as the end of our
419
- // extension
420
- matchedSlash = false;
421
- end = i + 1;
422
- }
423
- if (code === 46 /*.*/) {
424
- // If this is our first dot, mark it as the start of our extension
425
- if (startDot === -1)
426
- startDot = i;
427
- else if (preDotState !== 1)
428
- preDotState = 1;
429
- } else if (startDot !== -1) {
430
- // We saw a non-dot and non-path separator before our dot, so we should
431
- // have a good chance at having a non-empty extension
432
- preDotState = -1;
433
- }
434
- }
435
-
436
- if (startDot === -1 || end === -1 ||
437
- // We saw a non-dot character immediately before the dot
438
- preDotState === 0 ||
439
- // The (right-most) trimmed path component is exactly '..'
440
- preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
441
- return '';
442
- }
443
- return path.slice(startDot, end);
444
- },
445
-
446
- format: function format(pathObject) {
447
- if (pathObject === null || typeof pathObject !== 'object') {
448
- throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
449
- }
450
- return _format('/', pathObject);
451
- },
452
-
453
- parse: function parse(path) {
454
- assertPath(path);
455
-
456
- var ret = { root: '', dir: '', base: '', ext: '', name: '' };
457
- if (path.length === 0) return ret;
458
- var code = path.charCodeAt(0);
459
- var isAbsolute = code === 47 /*/*/;
460
- var start;
461
- if (isAbsolute) {
462
- ret.root = '/';
463
- start = 1;
464
- } else {
465
- start = 0;
466
- }
467
- var startDot = -1;
468
- var startPart = 0;
469
- var end = -1;
470
- var matchedSlash = true;
471
- var i = path.length - 1;
472
-
473
- // Track the state of characters (if any) we see before our first dot and
474
- // after any path separator we find
475
- var preDotState = 0;
476
-
477
- // Get non-dir info
478
- for (; i >= start; --i) {
479
- code = path.charCodeAt(i);
480
- if (code === 47 /*/*/) {
481
- // If we reached a path separator that was not part of a set of path
482
- // separators at the end of the string, stop now
483
- if (!matchedSlash) {
484
- startPart = i + 1;
485
- break;
486
- }
487
- continue;
488
- }
489
- if (end === -1) {
490
- // We saw the first non-path separator, mark this as the end of our
491
- // extension
492
- matchedSlash = false;
493
- end = i + 1;
494
- }
495
- if (code === 46 /*.*/) {
496
- // If this is our first dot, mark it as the start of our extension
497
- if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;
498
- } else if (startDot !== -1) {
499
- // We saw a non-dot and non-path separator before our dot, so we should
500
- // have a good chance at having a non-empty extension
501
- preDotState = -1;
502
- }
503
- }
504
-
505
- if (startDot === -1 || end === -1 ||
506
- // We saw a non-dot character immediately before the dot
507
- preDotState === 0 ||
508
- // The (right-most) trimmed path component is exactly '..'
509
- preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
510
- if (end !== -1) {
511
- if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);
512
- }
513
- } else {
514
- if (startPart === 0 && isAbsolute) {
515
- ret.name = path.slice(1, startDot);
516
- ret.base = path.slice(1, end);
517
- } else {
518
- ret.name = path.slice(startPart, startDot);
519
- ret.base = path.slice(startPart, end);
520
- }
521
- ret.ext = path.slice(startDot, end);
522
- }
523
-
524
- if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';
525
-
526
- return ret;
527
- },
528
-
529
- sep: '/',
530
- delimiter: ':',
531
- win32: null,
532
- posix: null
533
- };
534
-
535
- posix.posix = posix;
536
-
537
- pathBrowserify = posix;
538
- return pathBrowserify;
539
- }
540
-
541
- export { requirePathBrowserify as __require };
@@ -1,73 +0,0 @@
1
- import '../../utils/index.mjs';
2
- import { SyncSeriesHook } from '../sync-series-hook/sync-series-hook.mjs';
3
- import { isPromise, isFunc, isAsync } from '../../utils/type-util/type-util.mjs';
4
-
5
- /**
6
- * 串联钩子,按照注册顺序执行
7
- *
8
- * @export
9
- * @class AsyncSeriesHook
10
- * @template T 输入值类型
11
- * @template C 上下文声明对象
12
- */
13
- class AsyncSeriesHook extends SyncSeriesHook {
14
- /**
15
- * 触发钩子,当某个钩子返回「null」时,中断后续执行。
16
- *
17
- * @param {C} context
18
- * @param {...AsArray<T>} args
19
- * @return {*} {Promise<C>}
20
- * @memberof AsyncSeriesHook
21
- */
22
- async call(context, ...args) {
23
- const _context = context || Object.create({});
24
- let obj;
25
- for (let i = 0; i < this.items.length; i++) {
26
- const item = this.items[i];
27
- if (item.fn) {
28
- if (item.mode === 'promise') {
29
- obj = item.fn(_context, ...args);
30
- if (isPromise(obj)) {
31
- // eslint-disable-next-line no-await-in-loop
32
- obj = await obj;
33
- }
34
- }
35
- else {
36
- obj = item.fn(_context, ...args);
37
- }
38
- }
39
- if (obj === null) {
40
- console.warn(`因${item.fn ? item.fn.name : null}方法返回值为「null」,钩子中断执行。`, item);
41
- break;
42
- }
43
- }
44
- return _context;
45
- }
46
- /**
47
- * 注册异步钩子
48
- *
49
- * @param {((...args: AsArray<T>) => Promise<void>)} fn 回调
50
- * @memberof AsyncSeriesHook
51
- */
52
- tapPromise(fn) {
53
- if (fn && (isFunc(fn) || isAsync(fn))) {
54
- const opt = {
55
- mode: 'promise',
56
- };
57
- opt.fn = fn;
58
- this.items.push(opt);
59
- }
60
- }
61
- /**
62
- * 删除异步钩子注册
63
- *
64
- * @author chitanda
65
- * @date 2021-04-30 14:04:42
66
- * @param {(context: C, ...args: AsArray<T>) => Promise<void>} callBack
67
- */
68
- removeTapPromise(callBack) {
69
- this.removeTap(callBack);
70
- }
71
- }
72
-
73
- export { AsyncSeriesHook };
@@ -1,2 +0,0 @@
1
- export { SyncSeriesHook } from './sync-series-hook/sync-series-hook.mjs';
2
- export { AsyncSeriesHook } from './async-series-hook/async-series-hook.mjs';