openxiangda-cli 2.0.0-alpha.147 → 2.0.0-alpha.149
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openxiangda-cli",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.149",
|
|
4
4
|
"description": "Thin application-level CLI for OpenXiangda 2.0.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@oclif/core": "4.13.3",
|
|
24
|
-
"openxiangda-contracts": "2.0.0-alpha.
|
|
25
|
-
"openxiangda-devkit-core": "2.0.0-alpha.
|
|
26
|
-
"openxiangda-mcp": "2.0.0-alpha.
|
|
27
|
-
"openxiangda-skill-kit": "2.0.0-alpha.
|
|
24
|
+
"openxiangda-contracts": "2.0.0-alpha.76",
|
|
25
|
+
"openxiangda-devkit-core": "2.0.0-alpha.96",
|
|
26
|
+
"openxiangda-mcp": "2.0.0-alpha.96",
|
|
27
|
+
"openxiangda-skill-kit": "2.0.0-alpha.118"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"tsx": "4.23.12",
|
|
@@ -111,14 +111,42 @@ function surface(completed = false, customDetail = false) {
|
|
|
111
111
|
recordId: 'purchase-1',
|
|
112
112
|
requestedRevision: 8,
|
|
113
113
|
sourceRevision: 8,
|
|
114
|
-
fields: {
|
|
115
|
-
申请金额: '¥28,600',
|
|
116
|
-
采购类型: '办公设备',
|
|
117
|
-
期望到货: '2026-09-05',
|
|
118
|
-
申请人: '张三',
|
|
119
|
-
},
|
|
114
|
+
fields: { amount: 28600 },
|
|
120
115
|
projectionDigest: 'c'.repeat(64),
|
|
121
116
|
},
|
|
117
|
+
businessDetail: {
|
|
118
|
+
status: 'ready',
|
|
119
|
+
resourceCode: 'purchase-orders',
|
|
120
|
+
resourceName: '采购申请',
|
|
121
|
+
recordId: 'purchase-1',
|
|
122
|
+
requestedRevision: 8,
|
|
123
|
+
sourceRevision: 8,
|
|
124
|
+
surface: {
|
|
125
|
+
mutationOwner: 'workflow',
|
|
126
|
+
fields: {
|
|
127
|
+
amount: {
|
|
128
|
+
label: '申请金额',
|
|
129
|
+
type: 'number.decimal',
|
|
130
|
+
widget: 'money',
|
|
131
|
+
section: '申请信息',
|
|
132
|
+
readCapabilities: [],
|
|
133
|
+
createCapabilities: [],
|
|
134
|
+
updateCapabilities: [],
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
detail: { layout: 'sections', fieldOrder: ['amount'] },
|
|
138
|
+
},
|
|
139
|
+
record: { amount: 28600 },
|
|
140
|
+
subtables: {},
|
|
141
|
+
projectionDigest: 'd'.repeat(64),
|
|
142
|
+
},
|
|
143
|
+
summary: {
|
|
144
|
+
title: '采购申请审批',
|
|
145
|
+
initiatorDisplayName: '张三',
|
|
146
|
+
departmentDisplayName: '理学院',
|
|
147
|
+
submittedAt: '2026-08-25T01:00:00.000Z',
|
|
148
|
+
businessNumber: 'PO-2026-0825',
|
|
149
|
+
},
|
|
122
150
|
},
|
|
123
151
|
fieldPolicy: { default: 'readonly', fields: {} },
|
|
124
152
|
operations: completed
|
|
@@ -128,7 +156,10 @@ function surface(completed = false, customDetail = false) {
|
|
|
128
156
|
key: 'approve',
|
|
129
157
|
kind: 'workflow_command',
|
|
130
158
|
label: '同意',
|
|
159
|
+
group: 'decision',
|
|
160
|
+
audience: 'participant',
|
|
131
161
|
placement: 'primary',
|
|
162
|
+
emphasis: 'primary',
|
|
132
163
|
tone: 'primary',
|
|
133
164
|
visible: true,
|
|
134
165
|
enabled: true,
|
|
@@ -163,7 +194,15 @@ function surface(completed = false, customDetail = false) {
|
|
|
163
194
|
transfer: '转交',
|
|
164
195
|
add_assignee: '加签',
|
|
165
196
|
}[key],
|
|
166
|
-
|
|
197
|
+
group: key === 'reject' ? 'decision' : 'task_collaboration',
|
|
198
|
+
audience: 'participant',
|
|
199
|
+
placement: key === 'reject' ? 'primary' : 'overflow',
|
|
200
|
+
emphasis:
|
|
201
|
+
key === 'reject'
|
|
202
|
+
? 'danger'
|
|
203
|
+
: key === 'return'
|
|
204
|
+
? 'warning'
|
|
205
|
+
: 'neutral',
|
|
167
206
|
tone: key === 'reject' ? 'danger' : 'neutral',
|
|
168
207
|
visible: true,
|
|
169
208
|
enabled: true,
|
|
@@ -748,7 +787,7 @@ test('negotiates direct standard routes after BrowserRouter listener setup', asy
|
|
|
748
787
|
await page.goto(
|
|
749
788
|
workflowFixtureUrl(`/admin/tasks/${taskId}?from=todo#approval`),
|
|
750
789
|
);
|
|
751
|
-
await expect(page.locator('.oxa-workflow-detail-mobile')).toBeVisible();
|
|
790
|
+
await expect(page.locator('.oxa-workflow-detail-mobile-native')).toBeVisible();
|
|
752
791
|
await expect(page).toHaveURL(
|
|
753
792
|
new RegExp(`/m/tasks/${taskId}\\?from=todo#approval$`),
|
|
754
793
|
);
|
|
@@ -756,7 +795,7 @@ test('negotiates direct standard routes after BrowserRouter listener setup', asy
|
|
|
756
795
|
await page.goto(
|
|
757
796
|
workflowFixtureUrl(`/admin/workflows/${instanceId}?from=todo#timeline`),
|
|
758
797
|
);
|
|
759
|
-
await expect(page.locator('.oxa-workflow-detail-mobile')).toBeVisible();
|
|
798
|
+
await expect(page.locator('.oxa-workflow-detail-mobile-native')).toBeVisible();
|
|
760
799
|
await expect(page).toHaveURL(
|
|
761
800
|
new RegExp(`/m/workflows/${instanceId}\\?from=todo#timeline$`),
|
|
762
801
|
);
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import assert from 'node:assert/strict';
|
|
2
2
|
import { spawn } from 'node:child_process';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
3
4
|
import { createServer } from 'node:net';
|
|
4
5
|
import { networkInterfaces } from 'node:os';
|
|
5
|
-
import { resolve } from 'node:path';
|
|
6
|
+
import { dirname, join, resolve } from 'node:path';
|
|
6
7
|
import test from 'node:test';
|
|
7
8
|
|
|
9
|
+
const require = createRequire(import.meta.url);
|
|
10
|
+
|
|
8
11
|
test('Vite is reachable on loopback and not on a LAN interface', async t => {
|
|
9
12
|
const port = await freePort();
|
|
10
13
|
const root = resolve(import.meta.dirname, '..');
|
|
11
|
-
const
|
|
14
|
+
const vitePackagePath = require.resolve('vite/package.json');
|
|
15
|
+
const vitePackage = require(vitePackagePath) as { bin: { vite: string } };
|
|
16
|
+
const viteBin = join(dirname(vitePackagePath), vitePackage.bin.vite);
|
|
17
|
+
const child = spawn(process.execPath, [viteBin, '--port', String(port), '--strictPort'], {
|
|
12
18
|
cwd: root,
|
|
13
19
|
stdio: 'ignore',
|
|
14
20
|
env: {
|