openxiangda-cli 2.0.0-alpha.138 → 2.0.0-alpha.140
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 +5 -5
- package/template/apps/server/package.json +1 -1
- package/template/apps/web/e2e/resource-experience-fixture.tsx +11 -1
- package/template/apps/web/e2e/resources.spec.ts +3 -0
- package/template/apps/web/e2e/workflow-experience-fixture.tsx +12 -1
- package/template/apps/web/e2e/workflow.spec.ts +16 -7
- package/template/apps/web/package.json +1 -1
- package/template/openxiangda.config.ts +5 -0
- package/template/package.json +1 -1
- package/template/packages/contracts/src/generated.ts +22 -2
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.140",
|
|
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.70",
|
|
25
|
+
"openxiangda-devkit-core": "2.0.0-alpha.90",
|
|
26
|
+
"openxiangda-mcp": "2.0.0-alpha.90",
|
|
27
|
+
"openxiangda-skill-kit": "2.0.0-alpha.111"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"tsx": "4.23.12",
|
|
@@ -96,8 +96,18 @@ const fields: DataResourceSurface['fields'] = {
|
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
const routeManifest = {
|
|
99
|
-
schemaVersion: 'openxiangda.application-route-manifest/
|
|
99
|
+
schemaVersion: 'openxiangda.application-route-manifest/v3',
|
|
100
100
|
appCode: 'openxiangda-application',
|
|
101
|
+
devicePolicy: {
|
|
102
|
+
kind: 'viewport-family',
|
|
103
|
+
mobileMaxWidthPx: 900,
|
|
104
|
+
desktopMinWidthPx: 901,
|
|
105
|
+
},
|
|
106
|
+
rootEntry: { code: 'application-root', desktop: '/', mobile: '/m/' },
|
|
107
|
+
authentication: {
|
|
108
|
+
desktop: { routeCode: 'application-login', path: '/login' },
|
|
109
|
+
mobile: { routeCode: 'application-login-mobile', path: '/m/login' },
|
|
110
|
+
},
|
|
101
111
|
routes: [],
|
|
102
112
|
digest:
|
|
103
113
|
'88831760f6e672a77babbf039b35a6febca7852092f1579c2721c99596a265c4',
|
|
@@ -244,6 +244,9 @@ test('renders the compiled desktop resource contract and shared workbench', asyn
|
|
|
244
244
|
await mockPlatform(page);
|
|
245
245
|
if (!codes.length) {
|
|
246
246
|
await page.goto(`${runtimeBase}/`);
|
|
247
|
+
await expect(page).toHaveURL(`${runtimeBase}/home`);
|
|
248
|
+
await expect(page.getByText('OpenXiangda 应用', { exact: true })).toBeVisible();
|
|
249
|
+
await page.goto(`${runtimeBase}/admin`);
|
|
247
250
|
await expect(page.getByText('还没有声明数据资源')).toBeVisible();
|
|
248
251
|
} else {
|
|
249
252
|
const code = codes[0];
|
|
@@ -18,6 +18,7 @@ const workflowDefinitions = [
|
|
|
18
18
|
subject: {
|
|
19
19
|
resourceCode: 'purchase-orders',
|
|
20
20
|
factProjection: { amount: 'amount' },
|
|
21
|
+
summaryFields: ['amount'],
|
|
21
22
|
},
|
|
22
23
|
processOperationCode: 'openxiangda.workflow.purchase-approval.submit',
|
|
23
24
|
},
|
|
@@ -129,8 +130,18 @@ const adminPages = [
|
|
|
129
130
|
] as const satisfies AdminPagesInput;
|
|
130
131
|
|
|
131
132
|
const routeManifest = {
|
|
132
|
-
schemaVersion: 'openxiangda.application-route-manifest/
|
|
133
|
+
schemaVersion: 'openxiangda.application-route-manifest/v3',
|
|
133
134
|
appCode,
|
|
135
|
+
devicePolicy: {
|
|
136
|
+
kind: 'viewport-family',
|
|
137
|
+
mobileMaxWidthPx: 900,
|
|
138
|
+
desktopMinWidthPx: 901,
|
|
139
|
+
},
|
|
140
|
+
rootEntry: { code: 'application-root', desktop: '/', mobile: '/m/' },
|
|
141
|
+
authentication: {
|
|
142
|
+
desktop: { routeCode: 'application-login', path: '/login' },
|
|
143
|
+
mobile: { routeCode: 'application-login-mobile', path: '/m/login' },
|
|
144
|
+
},
|
|
134
145
|
routes: [
|
|
135
146
|
{
|
|
136
147
|
code: 'application:todo-center',
|
|
@@ -106,10 +106,18 @@ function surface(completed = false, customDetail = false) {
|
|
|
106
106
|
status: { label: completed ? '已同意' : '待审批', tone: 'warning' },
|
|
107
107
|
layout: 'approval_detail',
|
|
108
108
|
businessData: {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
status: 'fresh',
|
|
110
|
+
resourceCode: 'purchase-orders',
|
|
111
|
+
recordId: 'purchase-1',
|
|
112
|
+
requestedRevision: 8,
|
|
113
|
+
sourceRevision: 8,
|
|
114
|
+
fields: {
|
|
115
|
+
申请金额: '¥28,600',
|
|
116
|
+
采购类型: '办公设备',
|
|
117
|
+
期望到货: '2026-09-05',
|
|
118
|
+
申请人: '张三',
|
|
119
|
+
},
|
|
120
|
+
projectionDigest: 'c'.repeat(64),
|
|
113
121
|
},
|
|
114
122
|
},
|
|
115
123
|
fieldPolicy: { default: 'readonly', fields: {} },
|
|
@@ -229,6 +237,7 @@ function launchSurface() {
|
|
|
229
237
|
subject: {
|
|
230
238
|
resourceCode: 'purchase-orders',
|
|
231
239
|
factProjection: { amount: 'amount' },
|
|
240
|
+
summaryFields: ['amount'],
|
|
232
241
|
},
|
|
233
242
|
inputSchema: { type: 'object', properties: {} },
|
|
234
243
|
head: {
|
|
@@ -719,11 +728,11 @@ test('negotiates direct standard routes after BrowserRouter listener setup', asy
|
|
|
719
728
|
routeNegotiationState: 'deep-link',
|
|
720
729
|
});
|
|
721
730
|
|
|
722
|
-
//
|
|
731
|
+
// 900px remains mobile; crossing to 901px switches the same manifest pair
|
|
723
732
|
// back to desktop without adding a browser-history entry.
|
|
724
|
-
await page.setViewportSize({ width:
|
|
733
|
+
await page.setViewportSize({ width: 900, height: 844 });
|
|
725
734
|
await expect(page.locator('.oxa-todo-center-mobile')).toBeVisible();
|
|
726
|
-
await page.setViewportSize({ width:
|
|
735
|
+
await page.setViewportSize({ width: 901, height: 844 });
|
|
727
736
|
await expect(page.locator('.oxa-todo-center-desktop')).toBeVisible();
|
|
728
737
|
await expect(page).toHaveURL(/\/admin\/todos\?view=pending#unread$/);
|
|
729
738
|
expect(await page.evaluate(() => window.history.length)).toBe(historyLength);
|
|
@@ -6,6 +6,11 @@ export default defineOpenXiangdaApp({
|
|
|
6
6
|
app: { code: 'openxiangda-application', name: 'OpenXiangda 应用' },
|
|
7
7
|
frontend: {
|
|
8
8
|
root: 'apps/web',
|
|
9
|
+
devicePolicy: {
|
|
10
|
+
kind: 'viewport-family',
|
|
11
|
+
mobileMaxWidthPx: 900,
|
|
12
|
+
desktopMinWidthPx: 901,
|
|
13
|
+
},
|
|
9
14
|
routes: [
|
|
10
15
|
{
|
|
11
16
|
code: 'application-home',
|
package/template/package.json
CHANGED
|
@@ -114,10 +114,30 @@ export const platformAuthManifest = {
|
|
|
114
114
|
]
|
|
115
115
|
} as const;
|
|
116
116
|
export const routeManifest = {
|
|
117
|
-
"schemaVersion": "openxiangda.application-route-manifest/
|
|
117
|
+
"schemaVersion": "openxiangda.application-route-manifest/v3",
|
|
118
118
|
"appCode": "openxiangda-application",
|
|
119
|
+
"devicePolicy": {
|
|
120
|
+
"kind": "viewport-family",
|
|
121
|
+
"mobileMaxWidthPx": 900,
|
|
122
|
+
"desktopMinWidthPx": 901
|
|
123
|
+
},
|
|
124
|
+
"rootEntry": {
|
|
125
|
+
"code": "application-home",
|
|
126
|
+
"desktop": "/home",
|
|
127
|
+
"mobile": "/m/home"
|
|
128
|
+
},
|
|
129
|
+
"authentication": {
|
|
130
|
+
"desktop": {
|
|
131
|
+
"routeCode": "application-login",
|
|
132
|
+
"path": "/login"
|
|
133
|
+
},
|
|
134
|
+
"mobile": {
|
|
135
|
+
"routeCode": "application-login-mobile",
|
|
136
|
+
"path": "/m/login"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
119
139
|
"routes": [],
|
|
120
|
-
"digest": "
|
|
140
|
+
"digest": "2c01252ac4415de49a2fe58bf21df94a77f8c235d739ec7a6af583fc695ba0cf"
|
|
121
141
|
} as const;
|
|
122
142
|
export const adminPages = [] as const;
|
|
123
143
|
export const adminNavigation = [] as const;
|