Skip to content

Commit f7fd6b3

Browse files
committed
fix: include plugins in npm package
1 parent d820199 commit f7fd6b3

4 files changed

Lines changed: 24 additions & 3 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codexmate",
3-
"version": "0.0.23",
3+
"version": "0.0.24",
44
"description": "Codex/Claude Code/OpenClaw 配置、会话与任务编排 CLI + Web 工具",
55
"main": "cli.js",
66
"bin": {
@@ -9,6 +9,7 @@
99
"files": [
1010
"cli.js",
1111
"cli/",
12+
"plugins/",
1213
"web-ui.html",
1314
"lib/",
1415
"web-ui/",
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import assert from 'assert';
2+
import fs from 'fs';
3+
import path from 'path';
4+
import { fileURLToPath } from 'url';
5+
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = path.dirname(__filename);
8+
const projectRoot = path.resolve(__dirname, '..', '..');
9+
10+
function readJson(filePath) {
11+
return JSON.parse(fs.readFileSync(filePath, 'utf8').replace(/^\uFEFF/, ''));
12+
}
13+
14+
test('npm package includes plugins directory for Web UI runtime imports', () => {
15+
const pkg = readJson(path.join(projectRoot, 'package.json'));
16+
const files = Array.isArray(pkg.files) ? pkg.files : [];
17+
assert.ok(files.includes('plugins/'), 'package.json files must include plugins/');
18+
});
19+

tests/unit/run.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ await import(pathToFileURL(path.join(__dirname, 'claude-proxy-adapter.test.mjs')
4949
await import(pathToFileURL(path.join(__dirname, 'coderabbit-workflows.test.mjs')));
5050
await import(pathToFileURL(path.join(__dirname, 'ci-workflow-contract.test.mjs')));
5151
await import(pathToFileURL(path.join(__dirname, 'lint-contract.test.mjs')));
52+
await import(pathToFileURL(path.join(__dirname, 'npm-package-files.test.mjs')));
5253
await import(pathToFileURL(path.join(__dirname, 'session-tab-switch-performance.test.mjs')));
5354
await import(pathToFileURL(path.join(__dirname, 'session-trash-state.test.mjs')));
5455
await import(pathToFileURL(path.join(__dirname, 'web-ui-restart.test.mjs')));

0 commit comments

Comments
 (0)