openxiangda-cli 2.0.0-alpha.130 → 2.0.0-alpha.133
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/commands/rollback.d.ts +1 -0
- package/dist/commands/rollback.d.ts.map +1 -1
- package/dist/commands/rollback.js +6 -1
- package/dist/commands/rollback.js.map +1 -1
- package/package.json +5 -5
- package/template/apps/server/package.json +1 -1
- package/template/apps/web/e2e/resource-experience-fixture.tsx +9 -0
- package/template/apps/web/e2e/workflow-experience-fixture.tsx +100 -0
- package/template/apps/web/package.json +1 -1
- package/template/apps/web/src/main.tsx +2 -0
- package/template/package.json +1 -1
- package/template/packages/contracts/src/generated.ts +7 -0
|
@@ -4,6 +4,7 @@ export default class Rollback extends OpenXiangdaCommand {
|
|
|
4
4
|
static flags: {
|
|
5
5
|
environment: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
6
|
to: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
'operation-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
8
|
cwd: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
9
|
};
|
|
9
10
|
run(): Promise<import("openxiangda-contracts").DevkitResult<unknown> | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollback.d.ts","sourceRoot":"","sources":["../../src/commands/rollback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,YAAY,CAAC;AAChE,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,kBAAkB;IACtD,MAAM,CAAC,OAAO,SAA2B;IACzC,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"rollback.d.ts","sourceRoot":"","sources":["../../src/commands/rollback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,YAAY,CAAC;AAChE,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,kBAAkB;IACtD,MAAM,CAAC,OAAO,SAA2B;IACzC,MAAM,CAAC,KAAK;;;;;MAOV;IACI,GAAG;;;;;;;;;;;;;;;;CASV"}
|
|
@@ -6,11 +6,16 @@ export default class Rollback extends OpenXiangdaCommand {
|
|
|
6
6
|
...workspaceFlags,
|
|
7
7
|
environment: Flags.string({ options: ['test', 'production'], default: 'test' }),
|
|
8
8
|
to: Flags.string({ required: true, summary: '目标 AppVersion ID' }),
|
|
9
|
+
'operation-id': Flags.string({
|
|
10
|
+
summary: '回滚操作 ID;网络不确定时使用同一值精确重放',
|
|
11
|
+
}),
|
|
9
12
|
};
|
|
10
13
|
async run() {
|
|
11
14
|
const { flags } = await this.parse(Rollback);
|
|
12
15
|
const environment = flags.environment === 'production' ? 'production' : 'preproduction';
|
|
13
|
-
return this.present(await this.services.rollback(flags.cwd, environment, flags.to
|
|
16
|
+
return this.present(await this.services.rollback(flags.cwd, environment, flags.to, {
|
|
17
|
+
...(flags['operation-id'] ? { operationId: flags['operation-id'] } : {}),
|
|
18
|
+
}));
|
|
14
19
|
}
|
|
15
20
|
}
|
|
16
21
|
//# sourceMappingURL=rollback.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollback.js","sourceRoot":"","sources":["../../src/commands/rollback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAChE,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,kBAAkB;IACtD,MAAM,CAAC,OAAO,GAAG,uBAAuB,CAAC;IACzC,MAAM,CAAC,KAAK,GAAG;QACb,GAAG,cAAc;QACjB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,MAAM,EA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AAC,EAAE,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACzE,CAAC,CACH,CAAC;IACJ,CAAC"}
|
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.133",
|
|
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.66",
|
|
25
|
+
"openxiangda-devkit-core": "2.0.0-alpha.86",
|
|
26
|
+
"openxiangda-mcp": "2.0.0-alpha.86",
|
|
27
|
+
"openxiangda-skill-kit": "2.0.0-alpha.107"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"tsx": "4.23.12",
|
|
@@ -95,6 +95,14 @@ const fields: DataResourceSurface['fields'] = {
|
|
|
95
95
|
}),
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
+
const routeManifest = {
|
|
99
|
+
schemaVersion: 'openxiangda.application-route-manifest/v2',
|
|
100
|
+
appCode: 'openxiangda-application',
|
|
101
|
+
routes: [],
|
|
102
|
+
digest:
|
|
103
|
+
'88831760f6e672a77babbf039b35a6febca7852092f1579c2721c99596a265c4',
|
|
104
|
+
} as const;
|
|
105
|
+
|
|
98
106
|
const surface: DataResourceSurface = {
|
|
99
107
|
mutationOwner: 'native',
|
|
100
108
|
generated: {
|
|
@@ -426,6 +434,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
426
434
|
]}
|
|
427
435
|
contributions={applicationContributions}
|
|
428
436
|
resourceDefinitions={resourceDefinitions}
|
|
437
|
+
routeManifest={routeManifest}
|
|
429
438
|
/>
|
|
430
439
|
</React.StrictMode>
|
|
431
440
|
);
|
|
@@ -128,6 +128,105 @@ const adminPages = [
|
|
|
128
128
|
},
|
|
129
129
|
] as const satisfies AdminPagesInput;
|
|
130
130
|
|
|
131
|
+
const routeManifest = {
|
|
132
|
+
schemaVersion: 'openxiangda.application-route-manifest/v2',
|
|
133
|
+
appCode,
|
|
134
|
+
routes: [
|
|
135
|
+
{
|
|
136
|
+
code: 'application:todo-center',
|
|
137
|
+
kind: 'application-todo-center',
|
|
138
|
+
desktop: {
|
|
139
|
+
routeCode: 'application.todo-center.desktop',
|
|
140
|
+
path: '/admin/todos',
|
|
141
|
+
surface: 'admin',
|
|
142
|
+
pathParams: [],
|
|
143
|
+
requiresAuthentication: true,
|
|
144
|
+
},
|
|
145
|
+
mobile: {
|
|
146
|
+
routeCode: 'application.todo-center.mobile',
|
|
147
|
+
path: '/m/todos',
|
|
148
|
+
surface: 'user',
|
|
149
|
+
pathParams: [],
|
|
150
|
+
requiresAuthentication: true,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
code: 'workflow:work-center',
|
|
155
|
+
kind: 'workflow-work-center',
|
|
156
|
+
desktop: {
|
|
157
|
+
routeCode: 'workflow.work.center.desktop',
|
|
158
|
+
path: '/admin/work-center',
|
|
159
|
+
surface: 'admin',
|
|
160
|
+
pathParams: [],
|
|
161
|
+
requiresAuthentication: true,
|
|
162
|
+
},
|
|
163
|
+
mobile: {
|
|
164
|
+
routeCode: 'workflow.work.center.mobile',
|
|
165
|
+
path: '/m/work-center',
|
|
166
|
+
surface: 'user',
|
|
167
|
+
pathParams: [],
|
|
168
|
+
requiresAuthentication: true,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
code: 'workflow:task',
|
|
173
|
+
kind: 'workflow-task',
|
|
174
|
+
desktop: {
|
|
175
|
+
routeCode: 'workflow.task.desktop',
|
|
176
|
+
path: '/admin/tasks/:taskId',
|
|
177
|
+
surface: 'admin',
|
|
178
|
+
pathParams: ['taskId'],
|
|
179
|
+
requiresAuthentication: true,
|
|
180
|
+
},
|
|
181
|
+
mobile: {
|
|
182
|
+
routeCode: 'workflow.task.mobile',
|
|
183
|
+
path: '/m/tasks/:taskId',
|
|
184
|
+
surface: 'user',
|
|
185
|
+
pathParams: ['taskId'],
|
|
186
|
+
requiresAuthentication: true,
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
code: 'workflow:instance',
|
|
191
|
+
kind: 'workflow-instance',
|
|
192
|
+
desktop: {
|
|
193
|
+
routeCode: 'workflow.instance.desktop',
|
|
194
|
+
path: '/admin/workflows/:instanceId',
|
|
195
|
+
surface: 'admin',
|
|
196
|
+
pathParams: ['instanceId'],
|
|
197
|
+
requiresAuthentication: true,
|
|
198
|
+
},
|
|
199
|
+
mobile: {
|
|
200
|
+
routeCode: 'workflow.instance.mobile',
|
|
201
|
+
path: '/m/workflows/:instanceId',
|
|
202
|
+
surface: 'user',
|
|
203
|
+
pathParams: ['instanceId'],
|
|
204
|
+
requiresAuthentication: true,
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
code: 'workflow:purchase-approval:launch',
|
|
209
|
+
kind: 'workflow-launch',
|
|
210
|
+
workflowCode: 'purchase-approval',
|
|
211
|
+
desktop: {
|
|
212
|
+
routeCode: 'workflow.purchase-approval.launch.desktop',
|
|
213
|
+
path: '/admin/workflows/purchase-approval/new',
|
|
214
|
+
surface: 'admin',
|
|
215
|
+
pathParams: [],
|
|
216
|
+
requiresAuthentication: true,
|
|
217
|
+
},
|
|
218
|
+
mobile: {
|
|
219
|
+
routeCode: 'workflow.purchase-approval.launch.mobile',
|
|
220
|
+
path: '/m/workflows/:workflowCode/start',
|
|
221
|
+
surface: 'user',
|
|
222
|
+
pathParams: ['workflowCode'],
|
|
223
|
+
requiresAuthentication: true,
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
],
|
|
227
|
+
digest: '34cc08a02cd187a07d9e2d2f99c1080b5b86f3a4512f9e0f43ff4cb05b7195fa',
|
|
228
|
+
} as const;
|
|
229
|
+
|
|
131
230
|
const adminNavigation = [
|
|
132
231
|
{
|
|
133
232
|
code: 'workflow-center',
|
|
@@ -160,6 +259,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
160
259
|
appName="流程体验验收"
|
|
161
260
|
adminNavigation={adminNavigation}
|
|
162
261
|
adminPages={adminPages}
|
|
262
|
+
routeManifest={routeManifest}
|
|
163
263
|
contributions={applicationContributions}
|
|
164
264
|
resourceDefinitions={resourceDefinitions}
|
|
165
265
|
workflows={workflowDefinitions}
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
appName,
|
|
13
13
|
appPerspectives,
|
|
14
14
|
appRoutes,
|
|
15
|
+
routeManifest,
|
|
15
16
|
authenticationSurfaces,
|
|
16
17
|
adminNavigation,
|
|
17
18
|
adminPages,
|
|
@@ -49,6 +50,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
49
50
|
appName={appName}
|
|
50
51
|
adminNavigation={adminNavigation}
|
|
51
52
|
adminPages={adminPages}
|
|
53
|
+
routeManifest={routeManifest}
|
|
52
54
|
contributions={applicationContributions}
|
|
53
55
|
perspectives={appPerspectives}
|
|
54
56
|
resourceDefinitions={resourceDefinitions}
|
package/template/package.json
CHANGED
|
@@ -112,6 +112,12 @@ export const platformAuthManifest = {
|
|
|
112
112
|
}
|
|
113
113
|
]
|
|
114
114
|
} as const;
|
|
115
|
+
export const routeManifest = {
|
|
116
|
+
"schemaVersion": "openxiangda.application-route-manifest/v2",
|
|
117
|
+
"appCode": "openxiangda-application",
|
|
118
|
+
"routes": [],
|
|
119
|
+
"digest": "88831760f6e672a77babbf039b35a6febca7852092f1579c2721c99596a265c4"
|
|
120
|
+
} as const;
|
|
115
121
|
export const adminPages = [] as const;
|
|
116
122
|
export const adminNavigation = [] as const;
|
|
117
123
|
export const eventTypes = [] as const;
|
|
@@ -137,6 +143,7 @@ export type AppRouteCode = AppRoute["code"];
|
|
|
137
143
|
export type ApplicationAuthenticationMethod = (typeof authenticationMethods)[number];
|
|
138
144
|
export type ApplicationAuthenticationSurface = (typeof authenticationSurfaces)[keyof typeof authenticationSurfaces];
|
|
139
145
|
export type ApplicationAuthenticationSurfaceCode = ApplicationAuthenticationSurface["routeCode"];
|
|
146
|
+
export type RouteManifest = typeof routeManifest;
|
|
140
147
|
export type AdminPage = (typeof adminPages)[number];
|
|
141
148
|
export type AdminNavigationGroup = (typeof adminNavigation)[number];
|
|
142
149
|
export type AppPerspective = (typeof appPerspectives)[number];
|