openxiangda-cli 2.0.0-alpha.16 → 2.0.0-alpha.162
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/README.md +51 -15
- package/bin/run.js +79 -1
- package/dist/base.d.ts +59 -5
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +213 -10
- package/dist/base.js.map +1 -1
- package/dist/commands/accept.d.ts +28 -0
- package/dist/commands/accept.d.ts.map +1 -0
- package/dist/commands/accept.js +21 -0
- package/dist/commands/accept.js.map +1 -0
- package/dist/commands/cancel.d.ts +19 -1
- package/dist/commands/cancel.d.ts.map +1 -1
- package/dist/commands/cancel.js +1 -1
- package/dist/commands/cancel.js.map +1 -1
- package/dist/commands/check.d.ts +22 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +17 -4
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/create.d.ts +39 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +457 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/deploy.d.ts +26 -8
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +31 -17
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.d.ts +23 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +28 -4
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/login.d.ts +29 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/{auth/login.js → login.js} +27 -9
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logs.d.ts +22 -2
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +9 -5
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/retry.d.ts +19 -1
- package/dist/commands/retry.d.ts.map +1 -1
- package/dist/commands/retry.js +5 -2
- package/dist/commands/retry.js.map +1 -1
- package/dist/commands/rollback.d.ts +23 -4
- package/dist/commands/rollback.d.ts.map +1 -1
- package/dist/commands/rollback.js +18 -5
- package/dist/commands/rollback.js.map +1 -1
- package/dist/commands/skill.d.ts +31 -0
- package/dist/commands/skill.d.ts.map +1 -0
- package/dist/commands/skill.js +43 -0
- package/dist/commands/skill.js.map +1 -0
- package/dist/commands/spec.d.ts +39 -0
- package/dist/commands/spec.d.ts.map +1 -0
- package/dist/commands/spec.js +117 -0
- package/dist/commands/spec.js.map +1 -0
- package/dist/commands/start.d.ts +28 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +18 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts +19 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +1 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/stop.d.ts +28 -0
- package/dist/commands/stop.d.ts.map +1 -0
- package/dist/commands/stop.js +18 -0
- package/dist/commands/stop.js.map +1 -0
- package/dist/create-workspace.d.ts +67 -0
- package/dist/create-workspace.d.ts.map +1 -0
- package/dist/create-workspace.js +631 -0
- package/dist/create-workspace.js.map +1 -0
- package/dist/studio-events.d.ts +9 -0
- package/dist/studio-events.d.ts.map +1 -0
- package/dist/studio-events.js +30 -0
- package/dist/studio-events.js.map +1 -0
- package/dist/toolchain-capsule.d.ts +4 -0
- package/dist/toolchain-capsule.d.ts.map +1 -0
- package/dist/toolchain-capsule.js +116 -0
- package/dist/toolchain-capsule.js.map +1 -0
- package/package.json +16 -9
- package/template/.dockerignore +23 -0
- package/template/.env.example +3 -0
- package/template/AGENTS.md +47 -0
- package/template/README.md +65 -0
- package/template/_gitignore +14 -0
- package/template/apps/server/Dockerfile +20 -0
- package/template/apps/server/package.json +27 -0
- package/template/apps/server/src/app.module.ts +23 -0
- package/template/apps/server/src/main.ts +5 -0
- package/template/apps/server/test/smoke.test.ts +17 -0
- package/template/apps/server/tsconfig.json +9 -0
- package/template/apps/web/data-api-live.e2e.html +15 -0
- package/template/apps/web/e2e/client-fixture.ts +5 -0
- package/template/apps/web/e2e/data-api-live-fixture.tsx +162 -0
- package/template/apps/web/e2e/data-api-live.spec.ts +144 -0
- package/template/apps/web/e2e/field-protocol-fixture.tsx +350 -0
- package/template/apps/web/e2e/field-protocol.spec.ts +195 -0
- package/template/apps/web/e2e/resource-experience-fixture.tsx +446 -0
- package/template/apps/web/e2e/resources.spec.ts +638 -0
- package/template/apps/web/e2e/theme-contract-fixture.css +15 -0
- package/template/apps/web/e2e/workflow-experience-fixture.tsx +247 -0
- package/template/apps/web/e2e/workflow.spec.ts +1066 -0
- package/template/apps/web/field-protocol.e2e.html +15 -0
- package/template/apps/web/index.html +12 -0
- package/template/apps/web/package.json +34 -0
- package/template/apps/web/playwright.config.ts +47 -0
- package/template/apps/web/resource-experience.e2e.html +15 -0
- package/template/apps/web/scripts/check.mjs +43 -0
- package/template/apps/web/scripts/verify-build.mjs +6 -0
- package/template/apps/web/src/main.tsx +65 -0
- package/template/apps/web/src/user-end/tailwind.css +17 -0
- package/template/apps/web/test/contracts.test.ts +161 -0
- package/template/apps/web/test/loopback.test.ts +68 -0
- package/template/apps/web/tsconfig.json +12 -0
- package/template/apps/web/vite.config.ts +41 -0
- package/template/apps/web/workflow-experience.e2e.html +15 -0
- package/template/appspec/app.md +36 -0
- package/template/openxiangda.config.ts +77 -0
- package/template/package.json +29 -0
- package/template/packages/contracts/package.json +23 -0
- package/template/packages/contracts/src/generated.ts +265 -0
- package/template/packages/contracts/src/index.ts +1 -0
- package/template/packages/contracts/tsconfig.json +9 -0
- package/template/pnpm-workspace.yaml +7 -0
- package/template/scripts/verify-template-budget.mjs +49 -0
- package/template/tsconfig.base.json +13 -0
- package/dist/commands/app/create.d.ts +0 -15
- package/dist/commands/app/create.d.ts.map +0 -1
- package/dist/commands/app/create.js +0 -42
- package/dist/commands/app/create.js.map +0 -1
- package/dist/commands/app/info.d.ts +0 -9
- package/dist/commands/app/info.d.ts.map +0 -1
- package/dist/commands/app/info.js +0 -10
- package/dist/commands/app/info.js.map +0 -1
- package/dist/commands/app/link.d.ts +0 -10
- package/dist/commands/app/link.d.ts.map +0 -1
- package/dist/commands/app/link.js +0 -16
- package/dist/commands/app/link.js.map +0 -1
- package/dist/commands/app/provision.d.ts +0 -9
- package/dist/commands/app/provision.d.ts.map +0 -1
- package/dist/commands/app/provision.js +0 -10
- package/dist/commands/app/provision.js.map +0 -1
- package/dist/commands/auth/login.d.ts +0 -11
- package/dist/commands/auth/login.d.ts.map +0 -1
- package/dist/commands/auth/login.js.map +0 -1
- package/dist/commands/auth/logout.d.ts +0 -6
- package/dist/commands/auth/logout.d.ts.map +0 -1
- package/dist/commands/auth/logout.js +0 -30
- package/dist/commands/auth/logout.js.map +0 -1
- package/dist/commands/auth/status.d.ts +0 -6
- package/dist/commands/auth/status.d.ts.map +0 -1
- package/dist/commands/auth/status.js +0 -60
- package/dist/commands/auth/status.js.map +0 -1
- package/dist/commands/build.d.ts +0 -11
- package/dist/commands/build.d.ts.map +0 -1
- package/dist/commands/build.js +0 -23
- package/dist/commands/build.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -9
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -7
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/event/delivery/list.d.ts +0 -10
- package/dist/commands/event/delivery/list.d.ts.map +0 -1
- package/dist/commands/event/delivery/list.js +0 -14
- package/dist/commands/event/delivery/list.js.map +0 -1
- package/dist/commands/event/delivery/replay.d.ts +0 -13
- package/dist/commands/event/delivery/replay.d.ts.map +0 -1
- package/dist/commands/event/delivery/replay.js +0 -16
- package/dist/commands/event/delivery/replay.js.map +0 -1
- package/dist/commands/event/subscription/list.d.ts +0 -9
- package/dist/commands/event/subscription/list.d.ts.map +0 -1
- package/dist/commands/event/subscription/list.js +0 -10
- package/dist/commands/event/subscription/list.js.map +0 -1
- package/dist/commands/event/subscription/rotate-secret.d.ts +0 -15
- package/dist/commands/event/subscription/rotate-secret.d.ts.map +0 -1
- package/dist/commands/event/subscription/rotate-secret.js +0 -33
- package/dist/commands/event/subscription/rotate-secret.js.map +0 -1
- package/dist/commands/event/subscription/status.d.ts +0 -14
- package/dist/commands/event/subscription/status.d.ts.map +0 -1
- package/dist/commands/event/subscription/status.js +0 -19
- package/dist/commands/event/subscription/status.js.map +0 -1
- package/dist/commands/event/timer/list.d.ts +0 -9
- package/dist/commands/event/timer/list.d.ts.map +0 -1
- package/dist/commands/event/timer/list.js +0 -10
- package/dist/commands/event/timer/list.js.map +0 -1
- package/dist/commands/event/timer/status.d.ts +0 -14
- package/dist/commands/event/timer/status.d.ts.map +0 -1
- package/dist/commands/event/timer/status.js +0 -19
- package/dist/commands/event/timer/status.js.map +0 -1
- package/dist/commands/generate.d.ts +0 -10
- package/dist/commands/generate.d.ts.map +0 -1
- package/dist/commands/generate.js +0 -8
- package/dist/commands/generate.js.map +0 -1
- package/dist/commands/oauth/audit/list.d.ts +0 -12
- package/dist/commands/oauth/audit/list.d.ts.map +0 -1
- package/dist/commands/oauth/audit/list.js +0 -20
- package/dist/commands/oauth/audit/list.js.map +0 -1
- package/dist/commands/oauth/client/create.d.ts +0 -13
- package/dist/commands/oauth/client/create.d.ts.map +0 -1
- package/dist/commands/oauth/client/create.js +0 -34
- package/dist/commands/oauth/client/create.js.map +0 -1
- package/dist/commands/oauth/client/list.d.ts +0 -9
- package/dist/commands/oauth/client/list.d.ts.map +0 -1
- package/dist/commands/oauth/client/list.js +0 -10
- package/dist/commands/oauth/client/list.js.map +0 -1
- package/dist/commands/oauth/client/revoke.d.ts +0 -12
- package/dist/commands/oauth/client/revoke.d.ts.map +0 -1
- package/dist/commands/oauth/client/revoke.js +0 -12
- package/dist/commands/oauth/client/revoke.js.map +0 -1
- package/dist/commands/oauth/client/rotate.d.ts +0 -13
- package/dist/commands/oauth/client/rotate.d.ts.map +0 -1
- package/dist/commands/oauth/client/rotate.js +0 -20
- package/dist/commands/oauth/client/rotate.js.map +0 -1
- package/dist/commands/oauth/client/update.d.ts +0 -15
- package/dist/commands/oauth/client/update.d.ts.map +0 -1
- package/dist/commands/oauth/client/update.js +0 -23
- package/dist/commands/oauth/client/update.js.map +0 -1
- package/dist/commands/oauth/runtime/rotate.d.ts +0 -12
- package/dist/commands/oauth/runtime/rotate.d.ts.map +0 -1
- package/dist/commands/oauth/runtime/rotate.js +0 -31
- package/dist/commands/oauth/runtime/rotate.js.map +0 -1
- package/dist/commands/oauth/runtime/status.d.ts +0 -10
- package/dist/commands/oauth/runtime/status.d.ts.map +0 -1
- package/dist/commands/oauth/runtime/status.js +0 -17
- package/dist/commands/oauth/runtime/status.js.map +0 -1
- package/dist/commands/promote.d.ts +0 -13
- package/dist/commands/promote.d.ts.map +0 -1
- package/dist/commands/promote.js +0 -9
- package/dist/commands/promote.js.map +0 -1
- package/dist/commands/secret/audit/list.d.ts +0 -14
- package/dist/commands/secret/audit/list.d.ts.map +0 -1
- package/dist/commands/secret/audit/list.js +0 -16
- package/dist/commands/secret/audit/list.js.map +0 -1
- package/dist/commands/secret/create.d.ts +0 -18
- package/dist/commands/secret/create.d.ts.map +0 -1
- package/dist/commands/secret/create.js +0 -33
- package/dist/commands/secret/create.js.map +0 -1
- package/dist/commands/secret/delete.d.ts +0 -15
- package/dist/commands/secret/delete.d.ts.map +0 -1
- package/dist/commands/secret/delete.js +0 -20
- package/dist/commands/secret/delete.js.map +0 -1
- package/dist/commands/secret/list.d.ts +0 -10
- package/dist/commands/secret/list.d.ts.map +0 -1
- package/dist/commands/secret/list.js +0 -14
- package/dist/commands/secret/list.js.map +0 -1
- package/dist/commands/secret/rotate.d.ts +0 -18
- package/dist/commands/secret/rotate.d.ts.map +0 -1
- package/dist/commands/secret/rotate.js +0 -30
- package/dist/commands/secret/rotate.js.map +0 -1
- package/dist/commands/secret/update.d.ts +0 -17
- package/dist/commands/secret/update.d.ts.map +0 -1
- package/dist/commands/secret/update.js +0 -37
- package/dist/commands/secret/update.js.map +0 -1
- package/dist/commands/skill/install.d.ts +0 -11
- package/dist/commands/skill/install.d.ts.map +0 -1
- package/dist/commands/skill/install.js +0 -52
- package/dist/commands/skill/install.js.map +0 -1
- package/dist/commands/skill/validate.d.ts +0 -9
- package/dist/commands/skill/validate.d.ts.map +0 -1
- package/dist/commands/skill/validate.js +0 -32
- package/dist/commands/skill/validate.js.map +0 -1
- package/dist/commands/test.d.ts +0 -9
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/commands/test.js +0 -7
- package/dist/commands/test.js.map +0 -1
- package/dist/commands/workflow/provider/list.d.ts +0 -10
- package/dist/commands/workflow/provider/list.d.ts.map +0 -1
- package/dist/commands/workflow/provider/list.js +0 -14
- package/dist/commands/workflow/provider/list.js.map +0 -1
- package/dist/commands/workflow/provider/rotate.d.ts +0 -15
- package/dist/commands/workflow/provider/rotate.d.ts.map +0 -1
- package/dist/commands/workflow/provider/rotate.js +0 -24
- package/dist/commands/workflow/provider/rotate.js.map +0 -1
- package/dist/secret-value.d.ts +0 -5
- package/dist/secret-value.d.ts.map +0 -1
- package/dist/secret-value.js +0 -15
- package/dist/secret-value.js.map +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "openxiangda-application",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"packageManager": "pnpm@10.15.1",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22.12"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"openxiangda": "openxiangda",
|
|
12
|
+
"prepare": "pnpm workspace:build",
|
|
13
|
+
"workspace:build": "pnpm --filter @app/contracts build",
|
|
14
|
+
"predev": "pnpm workspace:build",
|
|
15
|
+
"dev": "pnpm --parallel --filter './apps/*' dev",
|
|
16
|
+
"dev:web": "pnpm --filter @app/web dev",
|
|
17
|
+
"dev:server": "pnpm --filter @app/server dev",
|
|
18
|
+
"precheck": "pnpm workspace:build",
|
|
19
|
+
"check": "pnpm --recursive check && node scripts/verify-template-budget.mjs",
|
|
20
|
+
"pretest": "pnpm workspace:build",
|
|
21
|
+
"test": "pnpm --recursive test",
|
|
22
|
+
"test:e2e": "pnpm --filter @app/web test:e2e",
|
|
23
|
+
"build": "pnpm --recursive build"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"openxiangda": "2.0.0-alpha.85",
|
|
27
|
+
"typescript": "5.9.3"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@app/contracts",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"openxiangda-source": "./src/index.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"check": "tsc -p tsconfig.json --noEmit",
|
|
17
|
+
"test": "node -e \"process.stdout.write('generated contracts checked by TypeScript\\n')\"",
|
|
18
|
+
"build": "tsc -p tsconfig.json"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"typescript": "5.9.3"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
// Generated by OpenXiangda 2.0 Native compiler. Do not edit by hand.
|
|
2
|
+
export const compilerContractVersion = "native-4" as const;
|
|
3
|
+
export const appCode = "openxiangda-application" as const;
|
|
4
|
+
export const appName = "OpenXiangda 应用" as const;
|
|
5
|
+
export const appPerspectives = [] as const;
|
|
6
|
+
export const resourceCodes = [] as const;
|
|
7
|
+
export const resourceSurfaces = {} as const;
|
|
8
|
+
export const resourceDefinitions = {} as const;
|
|
9
|
+
export const capabilities = [
|
|
10
|
+
"app:openxiangda-application:directory:read",
|
|
11
|
+
"app:role:assign",
|
|
12
|
+
"app:role:define",
|
|
13
|
+
"app:role:grant-capability",
|
|
14
|
+
"app:role:read",
|
|
15
|
+
"app:scope-grant:manage",
|
|
16
|
+
"app:super-admin:manage"
|
|
17
|
+
] as const;
|
|
18
|
+
export const appOperations = {} as const;
|
|
19
|
+
export const appRoutes = {
|
|
20
|
+
applicationHome: {
|
|
21
|
+
"code": "application-home",
|
|
22
|
+
"path": "/home",
|
|
23
|
+
"label": "应用首页",
|
|
24
|
+
"surface": "user",
|
|
25
|
+
"tabPersistence": "session",
|
|
26
|
+
"keepAlive": "none"
|
|
27
|
+
},
|
|
28
|
+
applicationHomeMobile: {
|
|
29
|
+
"code": "application-home-mobile",
|
|
30
|
+
"path": "/m/home",
|
|
31
|
+
"label": "移动首页",
|
|
32
|
+
"surface": "user",
|
|
33
|
+
"tabPersistence": "session",
|
|
34
|
+
"keepAlive": "none"
|
|
35
|
+
}
|
|
36
|
+
} as const;
|
|
37
|
+
export const authenticationMethods = [
|
|
38
|
+
{
|
|
39
|
+
"code": "password",
|
|
40
|
+
"type": "password",
|
|
41
|
+
"label": "账号密码登录",
|
|
42
|
+
"presentation": "primary",
|
|
43
|
+
"required": true
|
|
44
|
+
}
|
|
45
|
+
] as const;
|
|
46
|
+
export const authenticationSurfaces = {
|
|
47
|
+
applicationLogin: {
|
|
48
|
+
"device": "desktop",
|
|
49
|
+
"routeCode": "application-login",
|
|
50
|
+
"path": "/login",
|
|
51
|
+
"defaultRouteCode": "application-home"
|
|
52
|
+
},
|
|
53
|
+
applicationLoginMobile: {
|
|
54
|
+
"device": "mobile",
|
|
55
|
+
"routeCode": "application-login-mobile",
|
|
56
|
+
"path": "/m/login",
|
|
57
|
+
"defaultRouteCode": "application-home-mobile"
|
|
58
|
+
}
|
|
59
|
+
} as const;
|
|
60
|
+
export const applicationAuthentication = {
|
|
61
|
+
"accountMode": "existing-platform-users-only",
|
|
62
|
+
"registration": {
|
|
63
|
+
"mode": "reject"
|
|
64
|
+
},
|
|
65
|
+
"methods": [
|
|
66
|
+
{
|
|
67
|
+
"code": "password",
|
|
68
|
+
"type": "password",
|
|
69
|
+
"label": "账号密码登录",
|
|
70
|
+
"presentation": "primary",
|
|
71
|
+
"required": true
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"surfaces": {
|
|
75
|
+
"desktop": {
|
|
76
|
+
"routeCode": "application-login",
|
|
77
|
+
"path": "/login",
|
|
78
|
+
"defaultRouteCode": "application-home"
|
|
79
|
+
},
|
|
80
|
+
"mobile": {
|
|
81
|
+
"routeCode": "application-login-mobile",
|
|
82
|
+
"path": "/m/login",
|
|
83
|
+
"defaultRouteCode": "application-home-mobile"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
} as const;
|
|
87
|
+
export const anonymousPublicAccess = undefined;
|
|
88
|
+
export const platformAuthManifest = {
|
|
89
|
+
"schemaVersion": "openxiangda.platform-auth-manifest/v2",
|
|
90
|
+
"appCode": "openxiangda-application",
|
|
91
|
+
"protectedUserRouteCount": 2,
|
|
92
|
+
"methods": [
|
|
93
|
+
{
|
|
94
|
+
"code": "password",
|
|
95
|
+
"type": "password",
|
|
96
|
+
"label": "账号密码登录",
|
|
97
|
+
"presentation": "primary",
|
|
98
|
+
"required": true
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"surfaces": [
|
|
102
|
+
{
|
|
103
|
+
"device": "desktop",
|
|
104
|
+
"routeCode": "application-login",
|
|
105
|
+
"path": "/login",
|
|
106
|
+
"defaultRouteCode": "application-home"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"device": "mobile",
|
|
110
|
+
"routeCode": "application-login-mobile",
|
|
111
|
+
"path": "/m/login",
|
|
112
|
+
"defaultRouteCode": "application-home-mobile"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
} as const;
|
|
116
|
+
export const adminAccess = undefined;
|
|
117
|
+
export const routeManifest = {
|
|
118
|
+
"schemaVersion": "openxiangda.application-route-manifest/v3",
|
|
119
|
+
"appCode": "openxiangda-application",
|
|
120
|
+
"devicePolicy": {
|
|
121
|
+
"kind": "viewport-family",
|
|
122
|
+
"mobileMaxWidthPx": 900,
|
|
123
|
+
"desktopMinWidthPx": 901
|
|
124
|
+
},
|
|
125
|
+
"rootEntry": {
|
|
126
|
+
"code": "application-home",
|
|
127
|
+
"desktop": "/home",
|
|
128
|
+
"mobile": "/m/home"
|
|
129
|
+
},
|
|
130
|
+
"authentication": {
|
|
131
|
+
"desktop": {
|
|
132
|
+
"routeCode": "application-login",
|
|
133
|
+
"path": "/login"
|
|
134
|
+
},
|
|
135
|
+
"mobile": {
|
|
136
|
+
"routeCode": "application-login-mobile",
|
|
137
|
+
"path": "/m/login"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"routes": [],
|
|
141
|
+
"digest": "2c01252ac4415de49a2fe58bf21df94a77f8c235d739ec7a6af583fc695ba0cf"
|
|
142
|
+
} as const;
|
|
143
|
+
export const adminPages = [] as const;
|
|
144
|
+
export const adminNavigation = [] as const;
|
|
145
|
+
export const eventTypes = [] as const;
|
|
146
|
+
export const eventSubscriptionCodes = [] as const;
|
|
147
|
+
export const eventHandlerManifest = {
|
|
148
|
+
"schemaVersion": "openxiangda.event-handler-manifest/v2",
|
|
149
|
+
"appCode": "openxiangda-application",
|
|
150
|
+
"handlers": []
|
|
151
|
+
} as const;
|
|
152
|
+
export const eventHandlers = {} as const;
|
|
153
|
+
export const eventSchemas = [] as const;
|
|
154
|
+
export const workflowCodes = [] as const;
|
|
155
|
+
export const workflowDefinitions = [] as const;
|
|
156
|
+
export const notificationTemplateCodes = {
|
|
157
|
+
applicationInformational: "application.informational.standard",
|
|
158
|
+
} as const;
|
|
159
|
+
|
|
160
|
+
export type ResourceCode = (typeof resourceCodes)[number];
|
|
161
|
+
export type Capability = (typeof capabilities)[number];
|
|
162
|
+
export type AppOperation = (typeof appOperations)[keyof typeof appOperations];
|
|
163
|
+
export type AppRoute = (typeof appRoutes)[keyof typeof appRoutes];
|
|
164
|
+
export type AppRouteCode = AppRoute["code"];
|
|
165
|
+
export type ApplicationAuthenticationMethod = (typeof authenticationMethods)[number];
|
|
166
|
+
export type ApplicationAuthenticationSurface = (typeof authenticationSurfaces)[keyof typeof authenticationSurfaces];
|
|
167
|
+
export type ApplicationAuthenticationSurfaceCode = ApplicationAuthenticationSurface["routeCode"];
|
|
168
|
+
export type AnonymousPublicAccess = typeof anonymousPublicAccess;
|
|
169
|
+
export type AdminAccess = typeof adminAccess;
|
|
170
|
+
export type RouteManifest = typeof routeManifest;
|
|
171
|
+
export type AdminPage = (typeof adminPages)[number];
|
|
172
|
+
export type AdminNavigationGroup = (typeof adminNavigation)[number];
|
|
173
|
+
export type AppPerspective = (typeof appPerspectives)[number];
|
|
174
|
+
export type EventType = (typeof eventTypes)[number];
|
|
175
|
+
export type EventSubscriptionCode = (typeof eventSubscriptionCodes)[number];
|
|
176
|
+
export type EventTypesForSubscription<TCode extends EventSubscriptionCode> = never;
|
|
177
|
+
export type WorkflowCode = (typeof workflowCodes)[number];
|
|
178
|
+
export type NotificationTemplateCode = (typeof notificationTemplateCodes)[keyof typeof notificationTemplateCodes];
|
|
179
|
+
|
|
180
|
+
export interface OpenXiangdaCloudEvent<TType extends EventType = EventType, TData extends Record<string, unknown> = Record<string, unknown>> {
|
|
181
|
+
specversion: "1.0";
|
|
182
|
+
id: string;
|
|
183
|
+
source: string;
|
|
184
|
+
type: TType;
|
|
185
|
+
subject?: string;
|
|
186
|
+
time: string;
|
|
187
|
+
datacontenttype: "application/json";
|
|
188
|
+
dataschema?: string;
|
|
189
|
+
data: TData;
|
|
190
|
+
tenantid: string;
|
|
191
|
+
appcode: typeof appCode;
|
|
192
|
+
environment: string;
|
|
193
|
+
traceid?: string;
|
|
194
|
+
schemaversion: string;
|
|
195
|
+
}
|
|
196
|
+
export type EventHandlerInput<TCode extends EventSubscriptionCode> = OpenXiangdaCloudEvent<EventTypesForSubscription<TCode>>;
|
|
197
|
+
|
|
198
|
+
export interface LabeledValue {
|
|
199
|
+
label: string;
|
|
200
|
+
value: string;
|
|
201
|
+
description?: string;
|
|
202
|
+
color?: string;
|
|
203
|
+
}
|
|
204
|
+
export interface ResourceReferenceValue extends LabeledValue {
|
|
205
|
+
resourceCode: string;
|
|
206
|
+
snapshot?: Record<string, unknown>;
|
|
207
|
+
}
|
|
208
|
+
export interface DepartmentReferenceValue extends LabeledValue {
|
|
209
|
+
fullPath?: string;
|
|
210
|
+
path?: LabeledValue[];
|
|
211
|
+
parent?: LabeledValue;
|
|
212
|
+
}
|
|
213
|
+
export interface UserReferenceValue extends LabeledValue {
|
|
214
|
+
avatarUrl?: string;
|
|
215
|
+
employeeNo?: string;
|
|
216
|
+
title?: string;
|
|
217
|
+
mobile?: string;
|
|
218
|
+
email?: string;
|
|
219
|
+
departments?: DepartmentReferenceValue[];
|
|
220
|
+
}
|
|
221
|
+
export interface DateRangeValue { start: string; end: string; }
|
|
222
|
+
export type CascadePathValue = LabeledValue[];
|
|
223
|
+
export interface DataFileRef {
|
|
224
|
+
schemaVersion: 'openxiangda.data-file-ref/v2';
|
|
225
|
+
id: string;
|
|
226
|
+
name: string;
|
|
227
|
+
size: number;
|
|
228
|
+
contentType: string;
|
|
229
|
+
}
|
|
230
|
+
export interface DataImageRef extends DataFileRef {
|
|
231
|
+
width: number;
|
|
232
|
+
height: number;
|
|
233
|
+
thumbnailUrl: string;
|
|
234
|
+
previewUrl: string;
|
|
235
|
+
}
|
|
236
|
+
export interface StableSignatureValue {
|
|
237
|
+
file: Omit<DataFileRef, 'schemaVersion'>;
|
|
238
|
+
signer?: UserReferenceValue;
|
|
239
|
+
signedAt: string;
|
|
240
|
+
points?: Array<{ x: number; y: number; t: number }>;
|
|
241
|
+
hash: string;
|
|
242
|
+
}
|
|
243
|
+
export interface StableAddressValue {
|
|
244
|
+
country?: LabeledValue;
|
|
245
|
+
province?: LabeledValue;
|
|
246
|
+
city?: LabeledValue;
|
|
247
|
+
district?: LabeledValue;
|
|
248
|
+
street?: LabeledValue;
|
|
249
|
+
detail?: string;
|
|
250
|
+
fullAddress?: string;
|
|
251
|
+
}
|
|
252
|
+
export interface StableLocationSnapshot {
|
|
253
|
+
address?: string;
|
|
254
|
+
name?: string;
|
|
255
|
+
province?: string;
|
|
256
|
+
city?: string;
|
|
257
|
+
district?: string;
|
|
258
|
+
accuracy?: number;
|
|
259
|
+
capturedAt?: string;
|
|
260
|
+
}
|
|
261
|
+
export type StableLocationValue = StableLocationSnapshot & {
|
|
262
|
+
source: 'browser' | 'dingTalk';
|
|
263
|
+
longitude: number;
|
|
264
|
+
latitude: number;
|
|
265
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './generated.js';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { readFileSync, readdirSync, statSync } from 'node:fs';
|
|
2
|
+
import { join, relative, resolve } from 'node:path';
|
|
3
|
+
|
|
4
|
+
const root = resolve(import.meta.dirname, '..');
|
|
5
|
+
const generated = /(?:^|\/)(?:node_modules|dist|coverage|playwright-report|test-results|\.openxiangda|\.turbo|\.turbopack|\.umi|\.umi-production)(?:\/|$)/;
|
|
6
|
+
const sourceExtensions = /\.(?:[cm]?[jt]sx?|css|html|json|md|ya?ml)$/;
|
|
7
|
+
const files = [];
|
|
8
|
+
function visit(directory) {
|
|
9
|
+
for (const entry of readdirSync(directory, { withFileTypes: true })) {
|
|
10
|
+
const path = join(directory, entry.name);
|
|
11
|
+
const name = relative(root, path).replaceAll('\\', '/');
|
|
12
|
+
if (
|
|
13
|
+
generated.test(name) ||
|
|
14
|
+
name === 'pnpm-lock.yaml' ||
|
|
15
|
+
name === 'packages/contracts/src/generated.ts'
|
|
16
|
+
) continue;
|
|
17
|
+
if (entry.isDirectory()) visit(path);
|
|
18
|
+
else if (entry.isFile() && sourceExtensions.test(name)) files.push(path);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
visit(root);
|
|
22
|
+
const bytes = files.reduce((total, file) => total + statSync(file).size, 0);
|
|
23
|
+
if (files.length > 50) throw new Error(`TEMPLATE_SOURCE_FILE_BUDGET_EXCEEDED:${files.length}>50`);
|
|
24
|
+
if (bytes > 500_000) throw new Error(`TEMPLATE_SOURCE_BYTE_BUDGET_EXCEEDED:${bytes}>500000`);
|
|
25
|
+
const productionFiles = files.filter(file => {
|
|
26
|
+
const name = relative(root, file).replaceAll('\\', '/');
|
|
27
|
+
return (
|
|
28
|
+
name === 'package.json' ||
|
|
29
|
+
name === 'openxiangda.config.ts' ||
|
|
30
|
+
name.startsWith('platform/') ||
|
|
31
|
+
(name.startsWith('apps/') &&
|
|
32
|
+
!name.includes('/test/') &&
|
|
33
|
+
!name.includes('/e2e/') &&
|
|
34
|
+
!name.includes('/scripts/'))
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
const source = productionFiles.map(file => readFileSync(file, 'utf8')).join('\n');
|
|
38
|
+
const agents = readFileSync(resolve(root, 'AGENTS.md'), 'utf8');
|
|
39
|
+
if (!agents.includes('pnpm openxiangda')) throw new Error('TEMPLATE_AGENT_PINNED_CLI_MISSING');
|
|
40
|
+
if (
|
|
41
|
+
!agents.includes("union of that user's application roles") ||
|
|
42
|
+
!agents.includes('Perspective projects only read visibility')
|
|
43
|
+
) {
|
|
44
|
+
throw new Error('TEMPLATE_AGENT_ROLE_UNION_BOUNDARY_MISSING');
|
|
45
|
+
}
|
|
46
|
+
for (const marker of ['@umijs/', 'openxiangda-' + 'admin', 'openxiangda-' + 'user', 'instrument_query', 'instrument_save', 'function.invoke', 'departmentScopeKey', 'instrumentScopeKey', 'adminUserIds', 'college-' + 'am', 'user-' + 'wang', 'dept-' + 'am-test']) {
|
|
47
|
+
if (source.includes(marker)) throw new Error(`TEMPLATE_FORBIDDEN_MARKER:${marker}`);
|
|
48
|
+
}
|
|
49
|
+
process.stdout.write(`Verified compact template: ${files.length} source files, ${bytes} bytes.\n`);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"noUncheckedIndexedAccess": true,
|
|
8
|
+
"exactOptionalPropertyTypes": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"experimentalDecorators": true,
|
|
11
|
+
"emitDecoratorMetadata": true
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { OpenXiangdaCommand } from "../../base.js";
|
|
2
|
-
export default class AppCreate extends OpenXiangdaCommand {
|
|
3
|
-
static summary: string;
|
|
4
|
-
static args: {
|
|
5
|
-
directory: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
-
};
|
|
7
|
-
static flags: {
|
|
8
|
-
"app-code": import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
-
name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
install: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
-
"local-sdk": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
-
};
|
|
13
|
-
run(): Promise<import("openxiangda-contracts").DevkitResult<unknown>>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/app/create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,kBAAkB;IACvD,MAAM,CAAC,OAAO,SAA+B;IAC7C,MAAM,CAAC,IAAI;;MAAkD;IAC7D,MAAM,CAAC,KAAK;;;;;MAOV;IAEI,GAAG;CA0BV"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from "@oclif/core";
|
|
2
|
-
import { createWorkspace } from "create-openxiangda";
|
|
3
|
-
import { OpenXiangdaCommand } from "../../base.js";
|
|
4
|
-
export default class AppCreate extends OpenXiangdaCommand {
|
|
5
|
-
static summary = "从官方模板创建 React + NestJS 应用";
|
|
6
|
-
static args = { directory: Args.string({ required: true }) };
|
|
7
|
-
static flags = {
|
|
8
|
-
"app-code": Flags.string({ required: true, summary: "稳定应用代码" }),
|
|
9
|
-
name: Flags.string({ required: true, summary: "应用名称" }),
|
|
10
|
-
install: Flags.boolean({ summary: "创建后安装依赖" }),
|
|
11
|
-
"local-sdk": Flags.string({
|
|
12
|
-
summary: "使用本地 OpenXiangda 2.0 源码包,不经过 npm 发布",
|
|
13
|
-
}),
|
|
14
|
-
};
|
|
15
|
-
async run() {
|
|
16
|
-
const { args, flags } = await this.parse(AppCreate);
|
|
17
|
-
const data = await createWorkspace({
|
|
18
|
-
directory: args.directory,
|
|
19
|
-
appCode: flags["app-code"],
|
|
20
|
-
name: flags.name,
|
|
21
|
-
install: flags.install,
|
|
22
|
-
...(flags["local-sdk"]
|
|
23
|
-
? { localSdkRoot: flags["local-sdk"] }
|
|
24
|
-
: {}),
|
|
25
|
-
});
|
|
26
|
-
return this.present({
|
|
27
|
-
ok: true,
|
|
28
|
-
operation: "app.create",
|
|
29
|
-
workspace: { appCode: data.appCode, name: data.name, root: data.root },
|
|
30
|
-
data,
|
|
31
|
-
diagnostics: [],
|
|
32
|
-
nextActions: [
|
|
33
|
-
{
|
|
34
|
-
code: "check",
|
|
35
|
-
label: "检查应用",
|
|
36
|
-
command: `cd ${data.root} && openxiangda check`,
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=create.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,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YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE;gBACtC,CAAC,CAAC,EAAE,CAAC;SACR,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,EAAE,EAAE,IAAI;YACR,SAAS,EAAE,YAAY;YACvB,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;YACtE,IAAI;YACJ,WAAW,EAAE,EAAE;YACf,WAAW,EAAE;gBACX;oBACE,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,MAAM;oBACb,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,uBAAuB;iBAChD;aACF;SACF,CAAC,CAAC;IACL,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OpenXiangdaCommand } from '../../base.js';
|
|
2
|
-
export default class AppInfo extends OpenXiangdaCommand {
|
|
3
|
-
static summary: string;
|
|
4
|
-
static flags: {
|
|
5
|
-
cwd: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
-
};
|
|
7
|
-
run(): Promise<import("openxiangda-contracts").DevkitResult<unknown>>;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=info.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/commands/app/info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,eAAe,CAAC;AAEnE,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,kBAAkB;IACrD,MAAM,CAAC,OAAO,SAAqB;IACnC,MAAM,CAAC,KAAK;;MAAkB;IACxB,GAAG;CAIV"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { OpenXiangdaCommand, workspaceFlags } from '../../base.js';
|
|
2
|
-
export default class AppInfo extends OpenXiangdaCommand {
|
|
3
|
-
static summary = '读取 2.0 应用工作区上下文';
|
|
4
|
-
static flags = workspaceFlags;
|
|
5
|
-
async run() {
|
|
6
|
-
const { flags } = await this.parse(AppInfo);
|
|
7
|
-
return this.present(await this.services.workspaceContext(flags.cwd));
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=info.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/commands/app/info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEnE,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,kBAAkB;IACrD,MAAM,CAAC,OAAO,GAAG,iBAAiB,CAAC;IACnC,MAAM,CAAC,KAAK,GAAG,cAAc,CAAC;IAC9B,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACvE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { OpenXiangdaCommand } from '../../base.js';
|
|
2
|
-
export default class AppLink extends OpenXiangdaCommand {
|
|
3
|
-
static summary: string;
|
|
4
|
-
static flags: {
|
|
5
|
-
'base-url': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
-
cwd: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
-
};
|
|
8
|
-
run(): Promise<import("openxiangda-contracts").DevkitResult<unknown>>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=link.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/commands/app/link.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,eAAe,CAAC;AAEnE,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,kBAAkB;IACrD,MAAM,CAAC,OAAO,SAAiB;IAC/B,MAAM,CAAC,KAAK;;;MAGV;IAEI,GAAG;CAQV"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Flags } from '@oclif/core';
|
|
2
|
-
import { OpenXiangdaCommand, workspaceFlags } from '../../base.js';
|
|
3
|
-
export default class AppLink extends OpenXiangdaCommand {
|
|
4
|
-
static summary = '绑定 2.0 平台地址';
|
|
5
|
-
static flags = {
|
|
6
|
-
...workspaceFlags,
|
|
7
|
-
'base-url': Flags.string({ required: true }),
|
|
8
|
-
};
|
|
9
|
-
async run() {
|
|
10
|
-
const { flags } = await this.parse(AppLink);
|
|
11
|
-
return this.present(await this.services.linkApplication(flags.cwd, {
|
|
12
|
-
baseUrl: flags['base-url'],
|
|
13
|
-
}));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/commands/app/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEnE,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,kBAAkB;IACrD,MAAM,CAAC,OAAO,GAAG,aAAa,CAAC;IAC/B,MAAM,CAAC,KAAK,GAAG;QACb,GAAG,cAAc;QACjB,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KAC7C,CAAC;IAEF,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,IAAI,CAAC,OAAO,CACjB,MAAM,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,EAAE;YAC7C,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC;SAC3B,CAAC,CACH,CAAC;IACJ,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OpenXiangdaCommand } from "../../base.js";
|
|
2
|
-
export default class AppProvision extends OpenXiangdaCommand {
|
|
3
|
-
static summary: string;
|
|
4
|
-
static flags: {
|
|
5
|
-
cwd: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
-
};
|
|
7
|
-
run(): Promise<import("openxiangda-contracts").DevkitResult<unknown>>;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=provision.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provision.d.ts","sourceRoot":"","sources":["../../../src/commands/app/provision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,eAAe,CAAC;AAEnE,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,kBAAkB;IAC1D,MAAM,CAAC,OAAO,SAAsB;IACpC,MAAM,CAAC,KAAK;;MAAkB;IAExB,GAAG;CAIV"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { OpenXiangdaCommand, workspaceFlags } from "../../base.js";
|
|
2
|
-
export default class AppProvision extends OpenXiangdaCommand {
|
|
3
|
-
static summary = "在平台幂等创建 2.0 应用身份";
|
|
4
|
-
static flags = workspaceFlags;
|
|
5
|
-
async run() {
|
|
6
|
-
const { flags } = await this.parse(AppProvision);
|
|
7
|
-
return this.present(await this.services.provisionApplication(flags.cwd));
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=provision.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provision.js","sourceRoot":"","sources":["../../../src/commands/app/provision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEnE,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,kBAAkB;IAC1D,MAAM,CAAC,OAAO,GAAG,kBAAkB,CAAC;IACpC,MAAM,CAAC,KAAK,GAAG,cAAc,CAAC;IAE9B,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3E,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { OpenXiangdaCommand } from "../../base.js";
|
|
2
|
-
export default class AuthLogin extends OpenXiangdaCommand {
|
|
3
|
-
static summary: string;
|
|
4
|
-
static flags: {
|
|
5
|
-
"base-url": import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
-
"no-open": import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
-
};
|
|
8
|
-
run(): Promise<import("openxiangda-contracts").DevkitResult<unknown>>;
|
|
9
|
-
private openBrowser;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=login.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/commands/auth/login.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,kBAAkB;IACvD,MAAM,CAAC,OAAO,SAAiC;IAC/C,MAAM,CAAC,KAAK;;;MASV;IAEI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C,GAAG;CAyBV"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { clearSession, OpenXiangdaDeveloperSession, } from "openxiangda-devkit-core";
|
|
2
|
-
import { OpenXiangdaCommand } from "../../base.js";
|
|
3
|
-
export default class AuthLogout extends OpenXiangdaCommand {
|
|
4
|
-
static summary = "撤销平台会话并删除本地 OpenXiangda 2.0 登录信息";
|
|
5
|
-
async run() {
|
|
6
|
-
const session = await OpenXiangdaDeveloperSession.load();
|
|
7
|
-
const data = session
|
|
8
|
-
? await session.logout()
|
|
9
|
-
: (await clearSession(), { loggedOut: true, serverRevoked: false });
|
|
10
|
-
return this.present({
|
|
11
|
-
ok: data.serverRevoked || !session,
|
|
12
|
-
operation: "auth.logout",
|
|
13
|
-
workspace: { appCode: "global", root: process.cwd() },
|
|
14
|
-
data,
|
|
15
|
-
diagnostics: session && !data.serverRevoked
|
|
16
|
-
? [
|
|
17
|
-
{
|
|
18
|
-
schemaVersion: "openxiangda.diagnostic/v2",
|
|
19
|
-
code: "OPENXIANGDA_SERVER_LOGOUT_UNCONFIRMED",
|
|
20
|
-
severity: "warning",
|
|
21
|
-
message: "本地会话已删除,但平台端撤销未确认",
|
|
22
|
-
retryable: true,
|
|
23
|
-
},
|
|
24
|
-
]
|
|
25
|
-
: [],
|
|
26
|
-
nextActions: [],
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=logout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../src/commands/auth/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,2BAA2B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,kBAAkB;IACxD,MAAM,CAAC,OAAO,GAAG,kCAAkC,CAAC;IAEpD,KAAK,CAAC,GAAG;QACP,MAAM,OAAO,GAAG,MAAM,2BAA2B,CAAC,IAAI,EAAE,CAAC;QACzD,MAAM,IAAI,GAAG,OAAO;YAClB,CAAC,CAAC,MAAM,OAAO,CAAC,MAAM,EAAE;YACxB,CAAC,CAAC,CAAC,MAAM,YAAY,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,EAAE,EAAE,IAAI,CAAC,aAAa,IAAI,CAAC,OAAO;YAClC,SAAS,EAAE,aAAa;YACxB,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE;YACrD,IAAI;YACJ,WAAW,EACT,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa;gBAC5B,CAAC,CAAC;oBACE;wBACE,aAAa,EAAE,2BAA2B;wBAC1C,IAAI,EAAE,uCAAuC;wBAC7C,QAAQ,EAAE,SAAS;wBACnB,OAAO,EAAE,mBAAmB;wBAC5B,SAAS,EAAE,IAAI;qBAChB;iBACF;gBACH,CAAC,CAAC,EAAE;YACR,WAAW,EAAE,EAAE;SAChB,CAAC,CAAC;IACL,CAAC"}
|