openxiangda-cli 2.0.0-alpha.111 → 2.0.0-alpha.114

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.111",
3
+ "version": "2.0.0-alpha.114",
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.53",
25
- "openxiangda-devkit-core": "2.0.0-alpha.70",
26
- "openxiangda-mcp": "2.0.0-alpha.70",
27
- "openxiangda-skill-kit": "2.0.0-alpha.88"
24
+ "openxiangda-contracts": "2.0.0-alpha.55",
25
+ "openxiangda-devkit-core": "2.0.0-alpha.72",
26
+ "openxiangda-mcp": "2.0.0-alpha.72",
27
+ "openxiangda-skill-kit": "2.0.0-alpha.90"
28
28
  },
29
29
  "devDependencies": {
30
30
  "tsx": "4.23.12",
@@ -8,7 +8,7 @@
8
8
  - Never write resource-level `schemaVersion`, `appCode`, `schema`, `surface`, `capabilities`, `fieldPolicies` or `platform/data` modules. The compiler derives the strict DataResource, CRUD capabilities, Surface and AI Schema. The application manifest still starts with its one top-level `schemaVersion: 3`.
9
9
  - Ordinary list/get/create/update/delete, filters, export and batch operations use the platform Native Data API. Do not create Function CRUD or NestJS wrappers.
10
10
  - Add NestJS only for a named business action that needs a cross-resource transaction, an invariant or an external side effect.
11
- - Every interactive business action binds `@OpenXiangdaOperation(operation)` and injects `OpenXiangdaBusinessDataApiService` or `OpenXiangdaStandardOperations`. The platform checks the action capability once at App API ingress; the trusted backend then has full Data access only to its exact application/environment while audit retains the initiating user. Do not author `authorizationJSON` or reapply the user's resource, row and field permissions inside the action.
11
+ - Every interactive business action binds `@OpenXiangdaOperation(operation)` and injects `OpenXiangdaBusinessDataApiService`, `OpenXiangdaBusinessNotificationService`, or `OpenXiangdaStandardOperations`. The platform checks the action capability once at App API ingress; the trusted backend then has full Data/managed business-notification access only to its exact application/environment while audit retains the initiating user and action. Do not author `authorizationJSON`, forward user tokens, grant ordinary users `app:notification2:send`, or reapply the user's resource, row and field permissions inside the action.
12
12
  - A NestJS backend declares only `enabled`, `isolation: 'shared' | 'dedicated'` and `resourceProfile: 'light' | 'standard'`. Never put raw Kubernetes resources, replicas, ports or environment maps in application metadata; the platform owns capacity and scaling.
13
13
  - Use the current logged-in user and the union of that user's application roles. An optional declared Perspective projects only read visibility (pages, rows and fields); create/update/delete, workflows and custom actions continue to authorize against the complete union. Standard Data API calls inherit `X-OpenXiangda-Perspective` automatically. Use `@CurrentPerspective()` only when custom Nest code reads outside the standard Data API, and apply an equivalent read projection explicitly. Business code must not persist a platform Token or authorization result and must not implement a second identity path.
14
14
  - Fields inherit the resource read/create/update capabilities. Use field `access` only to tighten them; arrays are all-of and `false` is explicit deny. There is no `write` fallback.
@@ -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.24",
18
+ "openxiangda": "2.0.0-alpha.27",
19
19
  "reflect-metadata": "0.2.2",
20
20
  "rxjs": "7.8.2"
21
21
  },
@@ -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.24",
17
+ "openxiangda": "2.0.0-alpha.27",
18
18
  "react": "19.2.8",
19
19
  "react-dom": "19.2.8",
20
20
  "react-router-dom": "7.8.2"
@@ -6,7 +6,10 @@ const baseURL =
6
6
 
7
7
  export default defineConfig({
8
8
  testDir: './e2e',
9
- workers: 2,
9
+ // The development server owns one mutable dependency-optimizer generation.
10
+ // Serial browser entrypoints prevent a second HTML graph from invalidating
11
+ // an in-flight transformed module during release acceptance.
12
+ workers: 1,
10
13
  use: { baseURL, trace: 'retain-on-failure' },
11
14
  webServer: process.env.OPENXIANGDA_E2E_BASE_URL
12
15
  ? undefined
@@ -3,6 +3,7 @@ import { readFileSync, readdirSync } from 'node:fs';
3
3
  import test from 'node:test';
4
4
  import { readRuntimeMount, resolveApplicationBasename } from 'openxiangda/core';
5
5
  import {
6
+ notificationTemplateCodes,
6
7
  resourceCodes,
7
8
  resourceDefinitions,
8
9
  } from '../../../packages/contracts/src/generated.js';
@@ -21,6 +22,10 @@ test('clean template contains only application declarations and one React entry'
21
22
  .sort();
22
23
  assert.deepEqual(productionSources, ['main.tsx']);
23
24
  assert.deepEqual(Object.keys(resourceDefinitions).sort(), [...resourceCodes].sort());
25
+ assert.equal(
26
+ notificationTemplateCodes.applicationInformational,
27
+ 'application.informational.standard'
28
+ );
24
29
  assert.match(config, /data:\s*\{\s*resources:/);
25
30
  assert.match(source, /OpenXiangdaApplication/);
26
31
  assert.match(source, /defineAdminContributions\(appRoutes/);
@@ -91,8 +96,12 @@ test('published E2E harnesses do not write evidence into the platform source rep
91
96
  assert.doesNotMatch(workflowSource, /docs\/architecture|evidenceDirectory/);
92
97
  });
93
98
 
94
- test('Vite prewarms every E2E HTML entry before concurrent browser acceptance', () => {
99
+ test('browser acceptance serializes the prewarmed Vite HTML entrypoints', () => {
95
100
  const viteConfig = readFileSync(new URL('../vite.config.ts', import.meta.url), 'utf8');
101
+ const playwrightConfig = readFileSync(
102
+ new URL('../playwright.config.ts', import.meta.url),
103
+ 'utf8'
104
+ );
96
105
  const htmlEntries = readdirSync(new URL('..', import.meta.url))
97
106
  .filter(name => name.endsWith('.e2e.html'))
98
107
  .sort();
@@ -104,6 +113,7 @@ test('Vite prewarms every E2E HTML entry before concurrent browser acceptance',
104
113
  for (const entry of htmlEntries) {
105
114
  assert.ok(viteConfig.includes(`'${entry}'`), `missing optimizeDeps entry ${entry}`);
106
115
  }
116
+ assert.match(playwrightConfig, /workers:\s*1/);
107
117
  });
108
118
 
109
119
  test('the platform package owns Web build verification policy', () => {
@@ -22,7 +22,7 @@
22
22
  "build": "pnpm --recursive build"
23
23
  },
24
24
  "devDependencies": {
25
- "openxiangda": "2.0.0-alpha.24",
25
+ "openxiangda": "2.0.0-alpha.27",
26
26
  "typescript": "5.9.3"
27
27
  }
28
28
  }
@@ -27,6 +27,9 @@ export const eventHandlerManifest = {
27
27
  export const eventHandlers = {} as const;
28
28
  export const eventSchemas = [] as const;
29
29
  export const workflowCodes = [] as const;
30
+ export const notificationTemplateCodes = {
31
+ applicationInformational: "application.informational.standard",
32
+ } as const;
30
33
 
31
34
  export type ResourceCode = (typeof resourceCodes)[number];
32
35
  export type Capability = (typeof capabilities)[number];
@@ -37,6 +40,7 @@ export type EventType = (typeof eventTypes)[number];
37
40
  export type EventSubscriptionCode = (typeof eventSubscriptionCodes)[number];
38
41
  export type EventTypesForSubscription<TCode extends EventSubscriptionCode> = never;
39
42
  export type WorkflowCode = (typeof workflowCodes)[number];
43
+ export type NotificationTemplateCode = (typeof notificationTemplateCodes)[keyof typeof notificationTemplateCodes];
40
44
 
41
45
  export interface OpenXiangdaCloudEvent<TType extends EventType = EventType, TData extends Record<string, unknown> = Record<string, unknown>> {
42
46
  specversion: "1.0";