@hirohsu/user-web-feedback 2.6.0 → 2.6.10
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/dist/cli.cjs +68 -9
- package/dist/index.cjs +68 -9
- package/package.json +20 -19
package/dist/cli.cjs
CHANGED
|
@@ -90439,7 +90439,7 @@ var helmet = Object.assign(
|
|
|
90439
90439
|
var import_compression = __toESM(require_compression(), 1);
|
|
90440
90440
|
var import_path6 = __toESM(require("path"), 1);
|
|
90441
90441
|
var import_fs7 = __toESM(require("fs"), 1);
|
|
90442
|
-
var
|
|
90442
|
+
var import_url2 = require("url");
|
|
90443
90443
|
init_logger();
|
|
90444
90444
|
|
|
90445
90445
|
// src/utils/port-manager.ts
|
|
@@ -91996,21 +91996,80 @@ var projectManager = ProjectManager.getInstance();
|
|
|
91996
91996
|
init_cjs_shims();
|
|
91997
91997
|
var import_fs4 = require("fs");
|
|
91998
91998
|
var import_path4 = require("path");
|
|
91999
|
+
var import_url = require("url");
|
|
92000
|
+
var import_meta = {};
|
|
92001
|
+
function getDirname() {
|
|
92002
|
+
try {
|
|
92003
|
+
if (typeof import_meta !== "undefined" && importMetaUrl) {
|
|
92004
|
+
return (0, import_path4.dirname)((0, import_url.fileURLToPath)(importMetaUrl));
|
|
92005
|
+
}
|
|
92006
|
+
} catch {
|
|
92007
|
+
}
|
|
92008
|
+
if (typeof __dirname !== "undefined") {
|
|
92009
|
+
return __dirname;
|
|
92010
|
+
}
|
|
92011
|
+
return process.cwd();
|
|
92012
|
+
}
|
|
92013
|
+
function findPackageJson(startPath) {
|
|
92014
|
+
let currentPath = startPath;
|
|
92015
|
+
const root = process.platform === "win32" ? currentPath.split("\\")[0] + "\\" : "/";
|
|
92016
|
+
while (currentPath !== root) {
|
|
92017
|
+
const pkgPath = (0, import_path4.join)(currentPath, "package.json");
|
|
92018
|
+
if ((0, import_fs4.existsSync)(pkgPath)) {
|
|
92019
|
+
return pkgPath;
|
|
92020
|
+
}
|
|
92021
|
+
const parentPath = (0, import_path4.dirname)(currentPath);
|
|
92022
|
+
if (parentPath === currentPath) {
|
|
92023
|
+
break;
|
|
92024
|
+
}
|
|
92025
|
+
currentPath = parentPath;
|
|
92026
|
+
}
|
|
92027
|
+
return null;
|
|
92028
|
+
}
|
|
91999
92029
|
function getPackageVersion() {
|
|
92000
92030
|
try {
|
|
92001
|
-
const
|
|
92002
|
-
|
|
92003
|
-
|
|
92004
|
-
];
|
|
92005
|
-
for (const pkgPath of possiblePaths) {
|
|
92031
|
+
const currentDir = getDirname();
|
|
92032
|
+
const pkgPath1 = findPackageJson(currentDir);
|
|
92033
|
+
if (pkgPath1) {
|
|
92006
92034
|
try {
|
|
92007
|
-
const pkgContent = (0, import_fs4.readFileSync)(
|
|
92035
|
+
const pkgContent = (0, import_fs4.readFileSync)(pkgPath1, "utf-8");
|
|
92008
92036
|
const pkg = JSON.parse(pkgContent);
|
|
92009
92037
|
if (pkg.version) {
|
|
92010
92038
|
return pkg.version;
|
|
92011
92039
|
}
|
|
92012
92040
|
} catch {
|
|
92013
|
-
|
|
92041
|
+
}
|
|
92042
|
+
}
|
|
92043
|
+
const cwd = process.cwd();
|
|
92044
|
+
if (cwd !== currentDir) {
|
|
92045
|
+
const pkgPath2 = findPackageJson(cwd);
|
|
92046
|
+
if (pkgPath2) {
|
|
92047
|
+
try {
|
|
92048
|
+
const pkgContent = (0, import_fs4.readFileSync)(pkgPath2, "utf-8");
|
|
92049
|
+
const pkg = JSON.parse(pkgContent);
|
|
92050
|
+
if (pkg.version) {
|
|
92051
|
+
return pkg.version;
|
|
92052
|
+
}
|
|
92053
|
+
} catch {
|
|
92054
|
+
}
|
|
92055
|
+
}
|
|
92056
|
+
}
|
|
92057
|
+
const possiblePaths = [
|
|
92058
|
+
(0, import_path4.join)(currentDir, "..", "..", "package.json"),
|
|
92059
|
+
(0, import_path4.join)(currentDir, "..", "package.json"),
|
|
92060
|
+
(0, import_path4.join)(process.cwd(), "package.json")
|
|
92061
|
+
];
|
|
92062
|
+
for (const pkgPath of possiblePaths) {
|
|
92063
|
+
if ((0, import_fs4.existsSync)(pkgPath)) {
|
|
92064
|
+
try {
|
|
92065
|
+
const pkgContent = (0, import_fs4.readFileSync)(pkgPath, "utf-8");
|
|
92066
|
+
const pkg = JSON.parse(pkgContent);
|
|
92067
|
+
if (pkg.version) {
|
|
92068
|
+
return pkg.version;
|
|
92069
|
+
}
|
|
92070
|
+
} catch {
|
|
92071
|
+
continue;
|
|
92072
|
+
}
|
|
92014
92073
|
}
|
|
92015
92074
|
}
|
|
92016
92075
|
return "0.0.0";
|
|
@@ -92435,7 +92494,7 @@ var WebServer = class {
|
|
|
92435
92494
|
* 支援多種執行環境:開發模式、打包模式、npx 執行模式
|
|
92436
92495
|
*/
|
|
92437
92496
|
getStaticAssetsPath() {
|
|
92438
|
-
const __filename2 = (0,
|
|
92497
|
+
const __filename2 = (0, import_url2.fileURLToPath)(importMetaUrl);
|
|
92439
92498
|
const __dirname3 = import_path6.default.dirname(__filename2);
|
|
92440
92499
|
const candidates = [];
|
|
92441
92500
|
candidates.push(import_path6.default.resolve(__dirname3, "static"));
|
package/dist/index.cjs
CHANGED
|
@@ -87562,7 +87562,7 @@ var helmet = Object.assign(
|
|
|
87562
87562
|
var import_compression = __toESM(require_compression(), 1);
|
|
87563
87563
|
var import_path6 = __toESM(require("path"), 1);
|
|
87564
87564
|
var import_fs7 = __toESM(require("fs"), 1);
|
|
87565
|
-
var
|
|
87565
|
+
var import_url2 = require("url");
|
|
87566
87566
|
init_logger();
|
|
87567
87567
|
|
|
87568
87568
|
// src/utils/port-manager.ts
|
|
@@ -89119,21 +89119,80 @@ var projectManager = ProjectManager.getInstance();
|
|
|
89119
89119
|
init_cjs_shims();
|
|
89120
89120
|
var import_fs4 = require("fs");
|
|
89121
89121
|
var import_path4 = require("path");
|
|
89122
|
+
var import_url = require("url");
|
|
89123
|
+
var import_meta = {};
|
|
89124
|
+
function getDirname() {
|
|
89125
|
+
try {
|
|
89126
|
+
if (typeof import_meta !== "undefined" && importMetaUrl) {
|
|
89127
|
+
return (0, import_path4.dirname)((0, import_url.fileURLToPath)(importMetaUrl));
|
|
89128
|
+
}
|
|
89129
|
+
} catch {
|
|
89130
|
+
}
|
|
89131
|
+
if (typeof __dirname !== "undefined") {
|
|
89132
|
+
return __dirname;
|
|
89133
|
+
}
|
|
89134
|
+
return process.cwd();
|
|
89135
|
+
}
|
|
89136
|
+
function findPackageJson(startPath) {
|
|
89137
|
+
let currentPath = startPath;
|
|
89138
|
+
const root = process.platform === "win32" ? currentPath.split("\\")[0] + "\\" : "/";
|
|
89139
|
+
while (currentPath !== root) {
|
|
89140
|
+
const pkgPath = (0, import_path4.join)(currentPath, "package.json");
|
|
89141
|
+
if ((0, import_fs4.existsSync)(pkgPath)) {
|
|
89142
|
+
return pkgPath;
|
|
89143
|
+
}
|
|
89144
|
+
const parentPath = (0, import_path4.dirname)(currentPath);
|
|
89145
|
+
if (parentPath === currentPath) {
|
|
89146
|
+
break;
|
|
89147
|
+
}
|
|
89148
|
+
currentPath = parentPath;
|
|
89149
|
+
}
|
|
89150
|
+
return null;
|
|
89151
|
+
}
|
|
89122
89152
|
function getPackageVersion() {
|
|
89123
89153
|
try {
|
|
89124
|
-
const
|
|
89125
|
-
|
|
89126
|
-
|
|
89127
|
-
];
|
|
89128
|
-
for (const pkgPath of possiblePaths) {
|
|
89154
|
+
const currentDir = getDirname();
|
|
89155
|
+
const pkgPath1 = findPackageJson(currentDir);
|
|
89156
|
+
if (pkgPath1) {
|
|
89129
89157
|
try {
|
|
89130
|
-
const pkgContent = (0, import_fs4.readFileSync)(
|
|
89158
|
+
const pkgContent = (0, import_fs4.readFileSync)(pkgPath1, "utf-8");
|
|
89131
89159
|
const pkg = JSON.parse(pkgContent);
|
|
89132
89160
|
if (pkg.version) {
|
|
89133
89161
|
return pkg.version;
|
|
89134
89162
|
}
|
|
89135
89163
|
} catch {
|
|
89136
|
-
|
|
89164
|
+
}
|
|
89165
|
+
}
|
|
89166
|
+
const cwd = process.cwd();
|
|
89167
|
+
if (cwd !== currentDir) {
|
|
89168
|
+
const pkgPath2 = findPackageJson(cwd);
|
|
89169
|
+
if (pkgPath2) {
|
|
89170
|
+
try {
|
|
89171
|
+
const pkgContent = (0, import_fs4.readFileSync)(pkgPath2, "utf-8");
|
|
89172
|
+
const pkg = JSON.parse(pkgContent);
|
|
89173
|
+
if (pkg.version) {
|
|
89174
|
+
return pkg.version;
|
|
89175
|
+
}
|
|
89176
|
+
} catch {
|
|
89177
|
+
}
|
|
89178
|
+
}
|
|
89179
|
+
}
|
|
89180
|
+
const possiblePaths = [
|
|
89181
|
+
(0, import_path4.join)(currentDir, "..", "..", "package.json"),
|
|
89182
|
+
(0, import_path4.join)(currentDir, "..", "package.json"),
|
|
89183
|
+
(0, import_path4.join)(process.cwd(), "package.json")
|
|
89184
|
+
];
|
|
89185
|
+
for (const pkgPath of possiblePaths) {
|
|
89186
|
+
if ((0, import_fs4.existsSync)(pkgPath)) {
|
|
89187
|
+
try {
|
|
89188
|
+
const pkgContent = (0, import_fs4.readFileSync)(pkgPath, "utf-8");
|
|
89189
|
+
const pkg = JSON.parse(pkgContent);
|
|
89190
|
+
if (pkg.version) {
|
|
89191
|
+
return pkg.version;
|
|
89192
|
+
}
|
|
89193
|
+
} catch {
|
|
89194
|
+
continue;
|
|
89195
|
+
}
|
|
89137
89196
|
}
|
|
89138
89197
|
}
|
|
89139
89198
|
return "0.0.0";
|
|
@@ -89558,7 +89617,7 @@ var WebServer = class {
|
|
|
89558
89617
|
* 支援多種執行環境:開發模式、打包模式、npx 執行模式
|
|
89559
89618
|
*/
|
|
89560
89619
|
getStaticAssetsPath() {
|
|
89561
|
-
const __filename2 = (0,
|
|
89620
|
+
const __filename2 = (0, import_url2.fileURLToPath)(importMetaUrl);
|
|
89562
89621
|
const __dirname3 = import_path6.default.dirname(__filename2);
|
|
89563
89622
|
const candidates = [];
|
|
89564
89623
|
candidates.push(import_path6.default.resolve(__dirname3, "static"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hirohsu/user-web-feedback",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.10",
|
|
4
4
|
"description": "基於Node.js的MCP回饋收集器 - 支持AI工作彙報和用戶回饋收集",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"bin": {
|
|
@@ -24,11 +24,25 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
27
|
-
"url": "git+https://github.com/
|
|
27
|
+
"url": "git+https://github.com/HyperHeroX/user-feedback-web.git"
|
|
28
28
|
},
|
|
29
|
-
"homepage": "https://github.com/
|
|
29
|
+
"homepage": "https://github.com/HyperHeroX/user-feedback-web#readme",
|
|
30
30
|
"bugs": {
|
|
31
|
-
"url": "https://github.com/
|
|
31
|
+
"url": "https://github.com/HyperHeroX/user-feedback-web/issues"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsup",
|
|
35
|
+
"dev": "tsx watch --clear-screen=false src/cli.ts",
|
|
36
|
+
"start": "node dist/cli.js",
|
|
37
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
38
|
+
"test:integration": "node --experimental-vm-modules node_modules/jest/bin/jest.js src/__tests__/integration.test.ts --testPathIgnorePatterns=[] --forceExit",
|
|
39
|
+
"test:all": "npm run test && npm run test:integration",
|
|
40
|
+
"test:watch": "jest --watch",
|
|
41
|
+
"lint": "eslint src/ --ext .ts",
|
|
42
|
+
"lint:fix": "eslint src/ --ext .ts --fix",
|
|
43
|
+
"clean": "node -e \"const fs=require('fs'); if(fs.existsSync('dist')){fs.rmSync('dist', {recursive: true, force: true})}\"",
|
|
44
|
+
"prepare-release": "node scripts/prepare-release.cjs",
|
|
45
|
+
"prepublishOnly": "npm run clean && npm run build && node scripts/remove-sourcemaps.cjs"
|
|
32
46
|
},
|
|
33
47
|
"dependencies": {
|
|
34
48
|
"better-sqlite3": "^12.4.1"
|
|
@@ -74,18 +88,5 @@
|
|
|
74
88
|
"dist",
|
|
75
89
|
"README.md",
|
|
76
90
|
"LICENSE"
|
|
77
|
-
]
|
|
78
|
-
|
|
79
|
-
"build": "tsup",
|
|
80
|
-
"dev": "tsx watch --clear-screen=false src/cli.ts",
|
|
81
|
-
"start": "node dist/cli.js",
|
|
82
|
-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
83
|
-
"test:integration": "node --experimental-vm-modules node_modules/jest/bin/jest.js src/__tests__/integration.test.ts --testPathIgnorePatterns=[] --forceExit",
|
|
84
|
-
"test:all": "npm run test && npm run test:integration",
|
|
85
|
-
"test:watch": "jest --watch",
|
|
86
|
-
"lint": "eslint src/ --ext .ts",
|
|
87
|
-
"lint:fix": "eslint src/ --ext .ts --fix",
|
|
88
|
-
"clean": "node -e \"const fs=require('fs'); if(fs.existsSync('dist')){fs.rmSync('dist', {recursive: true, force: true})}\"",
|
|
89
|
-
"prepare-release": "node scripts/prepare-release.cjs"
|
|
90
|
-
}
|
|
91
|
-
}
|
|
91
|
+
]
|
|
92
|
+
}
|