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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openxiangda-cli",
3
- "version": "2.0.0-alpha.138",
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.68",
25
- "openxiangda-devkit-core": "2.0.0-alpha.88",
26
- "openxiangda-mcp": "2.0.0-alpha.88",
27
- "openxiangda-skill-kit": "2.0.0-alpha.109"
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",
@@ -15,7 +15,7 @@
15
15
  "@nestjs/common": "11.1.29",
16
16
  "@nestjs/core": "11.1.29",
17
17
  "@nestjs/platform-fastify": "11.1.29",
18
- "openxiangda": "2.0.0-alpha.54",
18
+ "openxiangda": "2.0.0-alpha.57",
19
19
  "reflect-metadata": "0.2.2",
20
20
  "rxjs": "7.8.2"
21
21
  },
@@ -96,8 +96,18 @@ const fields: DataResourceSurface['fields'] = {
96
96
  };
97
97
 
98
98
  const routeManifest = {
99
- schemaVersion: 'openxiangda.application-route-manifest/v2',
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/v2',
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
- 申请金额: '¥28,600',
110
- 采购类型: '办公设备',
111
- 期望到货: '2026-09-05',
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
- // 768px remains mobile; crossing to 769px switches the same manifest pair
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: 768, height: 844 });
733
+ await page.setViewportSize({ width: 900, height: 844 });
725
734
  await expect(page.locator('.oxa-todo-center-mobile')).toBeVisible();
726
- await page.setViewportSize({ width: 769, height: 844 });
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);
@@ -14,7 +14,7 @@
14
14
  "@ant-design/icons": "6.2.3",
15
15
  "@refinedev/core": "5.0.12",
16
16
  "antd": "6.4.3",
17
- "openxiangda": "2.0.0-alpha.54",
17
+ "openxiangda": "2.0.0-alpha.57",
18
18
  "react": "19.2.8",
19
19
  "react-dom": "19.2.8",
20
20
  "react-router-dom": "7.8.2"
@@ -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',
@@ -23,7 +23,7 @@
23
23
  "build": "pnpm --recursive build"
24
24
  },
25
25
  "devDependencies": {
26
- "openxiangda": "2.0.0-alpha.54",
26
+ "openxiangda": "2.0.0-alpha.57",
27
27
  "typescript": "5.9.3"
28
28
  }
29
29
  }
@@ -114,10 +114,30 @@ export const platformAuthManifest = {
114
114
  ]
115
115
  } as const;
116
116
  export const routeManifest = {
117
- "schemaVersion": "openxiangda.application-route-manifest/v2",
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": "88831760f6e672a77babbf039b35a6febca7852092f1579c2721c99596a265c4"
140
+ "digest": "2c01252ac4415de49a2fe58bf21df94a77f8c235d739ec7a6af583fc695ba0cf"
121
141
  } as const;
122
142
  export const adminPages = [] as const;
123
143
  export const adminNavigation = [] as const;