openxiangda-cli 2.0.0-alpha.68 → 2.0.0-alpha.69
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 +4 -4
- package/template/AGENTS.md +12 -7
- package/template/README.md +7 -7
- package/template/apps/server/package.json +1 -1
- package/template/apps/web/package.json +1 -1
- package/template/apps/web/scripts/check.mjs +18 -13
- package/template/apps/web/src/components/resource/GeneratedResourceCrud.tsx +339 -163
- package/template/apps/web/src/components/resource/ResourceBatchActions.tsx +319 -0
- package/template/apps/web/src/components/resource/resource-import.ts +205 -0
- package/template/apps/web/src/platform-client.ts +188 -40
- package/template/apps/web/src/styles.css +37 -8
- package/template/apps/web/test/contracts.test.ts +16 -6
- package/template/apps/web/test/resource-import.test.ts +142 -0
- package/template/openxiangda.config.ts +2 -1
- package/template/package.json +4 -3
- package/template/scripts/verify-template-budget.mjs +5 -0
package/template/package.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"node": ">=22.12"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
+
"openxiangda": "openxiangda",
|
|
10
11
|
"prepare": "pnpm workspace:build",
|
|
11
12
|
"workspace:build": "pnpm --filter @app/contracts build",
|
|
12
13
|
"predev": "pnpm workspace:build",
|
|
@@ -21,9 +22,9 @@
|
|
|
21
22
|
"build": "pnpm --recursive build"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
|
-
"openxiangda-cli": "2.0.0-alpha.
|
|
25
|
-
"openxiangda-contracts": "2.0.0-alpha.
|
|
26
|
-
"openxiangda-devkit-core": "2.0.0-alpha.
|
|
25
|
+
"openxiangda-cli": "2.0.0-alpha.69",
|
|
26
|
+
"openxiangda-contracts": "2.0.0-alpha.32",
|
|
27
|
+
"openxiangda-devkit-core": "2.0.0-alpha.42",
|
|
27
28
|
"typescript": "5.9.3"
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -31,6 +31,11 @@ const productionFiles = files.filter(file => {
|
|
|
31
31
|
);
|
|
32
32
|
});
|
|
33
33
|
const source = productionFiles.map(file => readFileSync(file, 'utf8')).join('\n');
|
|
34
|
+
const agents = readFileSync(resolve(root, 'AGENTS.md'), 'utf8');
|
|
35
|
+
if (!agents.includes('pnpm openxiangda')) throw new Error('TEMPLATE_AGENT_PINNED_CLI_MISSING');
|
|
36
|
+
if (agents.includes('RoleSession') && !agents.includes('Do not select RoleSession')) {
|
|
37
|
+
throw new Error('TEMPLATE_AGENT_ROLE_SESSION_PATH_ACTIVE');
|
|
38
|
+
}
|
|
34
39
|
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']) {
|
|
35
40
|
if (source.includes(marker)) throw new Error(`TEMPLATE_FORBIDDEN_MARKER:${marker}`);
|
|
36
41
|
}
|