oipage 1.6.0-beta.0 → 1.6.0-beta.1

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/CHANGELOG CHANGED
@@ -118,6 +118,9 @@ v1.5.0:
118
118
  v1.6.0:
119
119
  date:
120
120
  changes:
121
+ - 修复bug
122
+ 1、修复logform在run下无法正常使用问题
123
+ (关联issue: https://github.com/oi-contrib/OIPage/issues/4 )
121
124
  - 优化改造
122
125
  1、命令行帮助打印更可读
123
126
  - 新增功能
package/bin/run CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  process.title = 'OIPage';
6
6
 
7
- const { exec } = require('child_process');
7
+ const { spawn } = require('child_process');
8
8
  const { join } = require("path");
9
9
  const { existsSync, lstatSync } = require("fs");
10
10
  const { mergeOption } = require("vislite");
@@ -84,26 +84,19 @@ else if (process.argv[2] === "run") {
84
84
 
85
85
  for (let index = 0; index < tasks.length; index++) {
86
86
 
87
- const child = exec(tasks[index] + (runArgs[index] ? (" " + runArgs[index]) : ""));
87
+ // 补充动态参数的支持
88
+ // npm run bug:issue5 ":-p 9090"
89
+ // 2025年12月1日 于南京
90
+ let task = (tasks[index] + (runArgs[index] ? (" " + runArgs[index]) : "")).split(" ");
91
+ let command = task.shift();
88
92
 
89
- // 监听子线程的stdout
90
- child.stdout.on('data', (data) => {
91
- process.stdout.write(`${data}`);
92
- });
93
-
94
- // 监听子线程的stderr
95
- child.stderr.on('data', (data) => {
96
- process.stdout.write(`${data}`);
97
- });
98
-
99
- // 子线程结束处理
100
- child.on('close', (code) => {
101
- console.log(`子线程${index + 1}结束,退出码 ${code}`);
102
- });
93
+ // 修复exec无法正常使用logform问题
94
+ // npm run bug:issue4
95
+ // 2025年12月2日 于南京
96
+ spawn(command, task, {
103
97
 
104
- // 子线程出错处理
105
- child.on('error', (error) => {
106
- console.error(`子线程${index + 1}错误: ${error.message}`);
98
+ // https://nodejs.org/api/child_process.html#child_process_options_stdio
99
+ stdio: 'inherit'
107
100
  });
108
101
  }
109
102
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * animation of OIPage v1.6.0-beta.0
2
+ * animation of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * cmdlog of OIPage v1.6.0-beta.0
2
+ * cmdlog of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * disk of OIPage v1.6.0-beta.0
2
+ * disk of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * format of OIPage v1.6.0-beta.0
2
+ * format of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * json of OIPage v1.6.0-beta.0
2
+ * json of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
  const {reader} = require("../reader/index.js");
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * logform of OIPage v1.6.0-beta.0
2
+ * logform of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
  const {linelog} = require("../cmdlog/index.js");
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * reader of OIPage v1.6.0-beta.0
2
+ * reader of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * throttle of OIPage v1.6.0-beta.0
2
+ * throttle of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "oipage",
3
- "version": "1.6.0-beta.0",
3
+ "version": "1.6.0-beta.1",
4
4
  "description": "前端网页或应用快速开发助手,包括开发服务器、辅助命令、实用API等",
5
5
  "sideEffects": false,
6
6
  "scripts": {
7
7
  "dev": "node ./build/index.js watch",
8
8
  "build": "node ./build/index.js",
9
- "serve": "node ./bin/run serve --config ./oipage.config.js"
9
+ "serve": "node ./bin/run serve --config ./oipage.config.js",
10
+ "bug:issue5": "node ./bin/run run \"node ./bin/run serve\"",
11
+ "bug:issue4": "node ./bin/run run \"node ./test/logform/index.spec.js\""
10
12
  },
11
13
  "bin": {
12
14
  "oipage-cli": "bin/run"
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * XMLHttpRequest of OIPage v1.6.0-beta.0
2
+ * XMLHttpRequest of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * animation of OIPage v1.6.0-beta.0
2
+ * animation of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * format of OIPage v1.6.0-beta.0
2
+ * format of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
package/web/json/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * json of OIPage v1.6.0-beta.0
2
+ * json of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
  import {reader} from "../reader/index.js";
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * onReady of OIPage v1.6.0-beta.0
2
+ * onReady of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * performChunk of OIPage v1.6.0-beta.0
2
+ * performChunk of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * reader of OIPage v1.6.0-beta.0
2
+ * reader of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * style of OIPage v1.6.0-beta.0
2
+ * style of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * throttle of OIPage v1.6.0-beta.0
2
+ * throttle of OIPage v1.6.0-beta.1
3
3
  * git+https://github.com/oi-contrib/OIPage.git
4
4
  */
5
5