yakuza0 2.23.6-beta.0 → 2.23.6-beta.2

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/cli/index.js CHANGED
@@ -410,7 +410,7 @@ var run = exports.run = function () {
410
410
  } catch (e) {}
411
411
  projectName = process.env.CLN_IMAGE_NAME || projectName;
412
412
  imageReleaseName = projectName + ':' + CLNVERSION;
413
- imageReleaseNameSave = projectName + '_' + CLNVERSION;
413
+ imageReleaseNameSave = (projectName + '_' + CLNVERSION).replace(/\//g, "_");
414
414
  BI = process.env.CLN_IMAGE_BI || (isInner ? 'registry-image.rdc.nfjbill.ren/cln-server:0.7.0' : 'nfjbill/cln-server:0.7.0');
415
415
  preLoad = (process.env.CLN_IMAGE_LOAD || '').split(',');
416
416
  // let BI = process.env.CLN_IMAGE_BI
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yakuza0",
3
- "version": "2.23.6-beta.0",
3
+ "version": "2.23.6-beta.2",
4
4
  "description": "yakuza0 with nuxt",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,12 +1,8 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
3
  var fs = require('fs');
7
4
  var path = require('path');
8
-
9
- exports.default = function (targetDir) {
5
+ var mid = function mid(targetDir) {
10
6
  // const targetDir = '/Users/ningfujun/work/repo/web/CLN_BASE_TEST/.ykServer2'; // 替换为你的目标目录路径
11
7
  var regex = /\['(.*?)'\]/g; // 用于匹配字符串的正则表达式
12
8
 
@@ -15,8 +11,8 @@ exports.default = function (targetDir) {
15
11
  files.forEach(function (file) {
16
12
  if (file.isDirectory()) {
17
13
  var app = path.join(targetDir, file.name);
18
- var mid = path.join(app, '.nuxt/middleware.js');
19
- var content = fs.readFileSync(mid, 'utf-8');
14
+ var _mid = path.join(app, '.nuxt/middleware.js');
15
+ var content = fs.readFileSync(_mid, 'utf-8');
20
16
  // let match;
21
17
  var match = regex.exec(content);
22
18
  if (match) {
@@ -27,7 +23,10 @@ exports.default = function (targetDir) {
27
23
  traverseDirectorySync(app, new RegExp(trimmedPath, 'g'));
28
24
  }
29
25
  }
30
- replaceInFileSync(mid, /\\\\/g, "/");
26
+ if (/'\.\.\\\\middleware\\\\/g.exec(content)) {
27
+ console.log(111);
28
+ replaceInFileSync(_mid, /\\\\/g, "/");
29
+ }
31
30
  }
32
31
  });
33
32
 
@@ -63,11 +62,11 @@ exports.default = function (targetDir) {
63
62
  // console.error(`处理文件 ${filePath} 时出错: ${err}`);
64
63
  }
65
64
  }
66
- function isWindowsPath(str) {
67
- var windowsPathRegex = /^[a-zA-Z]:\\(?:[^<>:"/\\|?*\x00-\x1F]*\\)*[^<>:"/\\|?*\x00-\x1F]*$/;
65
+ function isWindowsPath(path) {
66
+ var windowsPathPattern = /^([a-zA-Z]:[\\/]|\\)?(?:[^\\\/:*?"<>|\r\n]+[\\/])*(?:[^\\\/:*?"<>|\r\n]*)$/;
68
67
 
69
- return windowsPathRegex.test(str);
68
+ return windowsPathPattern.test(path);
70
69
  }
71
70
  };
72
71
 
73
- module.exports = exports['default'];
72
+ module.exports = mid;