yakuza0 2.23.42 → 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 +2 -2
- package/nuxt/build/replace.js +19 -0
- package/package.json +1 -1
package/nuxt/build/index.js
CHANGED
|
@@ -84,10 +84,10 @@ exports.default = function (config) {
|
|
|
84
84
|
replaceRules = [{
|
|
85
85
|
dir: '.ykServer',
|
|
86
86
|
// test: /package.json/,
|
|
87
|
-
test:
|
|
87
|
+
test: _replace.bundledJavaScriptPattern,
|
|
88
88
|
rules: [{
|
|
89
89
|
search: _replace.emailAddressPattern,
|
|
90
|
-
replace:
|
|
90
|
+
replace: _replace.removeEmailAddress
|
|
91
91
|
}, {
|
|
92
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,
|
|
93
93
|
search: '@indutny.com',
|
package/nuxt/build/replace.js
CHANGED
|
@@ -23,6 +23,25 @@ var fs = require('fs');
|
|
|
23
23
|
// addresses in bundled comments and strings.
|
|
24
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
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
|
+
|
|
26
45
|
function getAllFiles(root) {
|
|
27
46
|
var res = [],
|
|
28
47
|
files = fs.readdirSync(root);
|