yakuza0 2.23.41 → 2.23.43
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/nuxt/build/index.js +3 -7
- package/nuxt/build/replace.js +25 -0
- package/package.json +1 -1
package/nuxt/build/index.js
CHANGED
|
@@ -40,10 +40,6 @@ var _replace = require('./replace');
|
|
|
40
40
|
|
|
41
41
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
42
42
|
|
|
43
|
-
// Remove e-mail addresses left in bundled dependency banners/comments. The
|
|
44
|
-
// optional backslashes also cover addresses escaped by some bundlers/scanners.
|
|
45
|
-
var emailAddressPattern = /[a-z0-9.!#$%&'*+/=?^_`{|}~-]+\\?@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/ig;
|
|
46
|
-
|
|
47
43
|
var customExtend = function customExtend(_ref) {
|
|
48
44
|
var eslint = _ref.eslint,
|
|
49
45
|
alias = _ref.alias,
|
|
@@ -88,10 +84,10 @@ exports.default = function (config) {
|
|
|
88
84
|
replaceRules = [{
|
|
89
85
|
dir: '.ykServer',
|
|
90
86
|
// test: /package.json/,
|
|
91
|
-
test:
|
|
87
|
+
test: _replace.bundledJavaScriptPattern,
|
|
92
88
|
rules: [{
|
|
93
|
-
search: emailAddressPattern,
|
|
94
|
-
replace:
|
|
89
|
+
search: _replace.emailAddressPattern,
|
|
90
|
+
replace: _replace.removeEmailAddress
|
|
95
91
|
}, {
|
|
96
92
|
// search: /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/ig,
|
|
97
93
|
search: '@indutny.com',
|
package/nuxt/build/replace.js
CHANGED
|
@@ -17,6 +17,31 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
17
|
var path = require('path');
|
|
18
18
|
var fs = require('fs');
|
|
19
19
|
|
|
20
|
+
// Start only at a token boundary: retrying at every character of a large
|
|
21
|
+
// base64/data-URI token without an @ makes the unanchored pattern quadratic.
|
|
22
|
+
// Keep the captured delimiter with '$1'; optional backslashes cover escaped
|
|
23
|
+
// addresses in bundled comments and strings.
|
|
24
|
+
exports.emailAddressPattern = /(^|[^a-z0-9.!#$%&'*+/=?^_`{|}~-])[a-z0-9.!#$%&'*+/=?^_`{|}~-]+\\?@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/ig;
|
|
25
|
+
|
|
26
|
+
// Generated .nuxt sources can still be consumed by another compiler/app.
|
|
27
|
+
// Only clean emitted bundles, never App.js or other build inputs.
|
|
28
|
+
exports.bundledJavaScriptPattern = /[\\/]\.nuxt[\\/]dist[\\/].*\.js$/;
|
|
29
|
+
|
|
30
|
+
exports.removeEmailAddress = function (match, delimiter, offset, source) {
|
|
31
|
+
var start = offset;
|
|
32
|
+
var end = offset + match.length;
|
|
33
|
+
var boundary = /[\s"'`]/;
|
|
34
|
+
while (start > 0 && !boundary.test(source[start - 1])) {
|
|
35
|
+
start -= 1;
|
|
36
|
+
}while (end < source.length && !boundary.test(source[end])) {
|
|
37
|
+
end += 1;
|
|
38
|
+
}var token = source.slice(start, end);
|
|
39
|
+
// pnpm/pxnpm physical paths contain name@version segments which resemble
|
|
40
|
+
// addresses. Preserve these module requests, including Windows/escaped paths.
|
|
41
|
+
if (/(?:node_modules|\.p(?:n|xn)pm)[\\/]/.test(token)) return match;
|
|
42
|
+
return delimiter;
|
|
43
|
+
};
|
|
44
|
+
|
|
20
45
|
function getAllFiles(root) {
|
|
21
46
|
var res = [],
|
|
22
47
|
files = fs.readdirSync(root);
|