@gadmin2n/schematics 0.0.153 → 0.0.154
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/lib/application/files/gadmin2-game-angle-demo/.git-blame-ignore-revs +5 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/.nvmrc +1 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/CODEBUDDY.md +4 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/Dockerfile.codegen +16 -9
- package/dist/lib/application/files/gadmin2-game-angle-demo/Dockerfile.server +21 -13
- package/dist/lib/application/files/gadmin2-game-angle-demo/Dockerfile.web +11 -11
- package/dist/lib/application/files/gadmin2-game-angle-demo/Jenkinsfile +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/PRODUCT.md +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/compose-ctl.sh +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/docker-compose.yml +4 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/readme.md +22 -22
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/.oxfmtrc.json +13 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/.oxlintrc.json +17 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/package.json +14 -13
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/pnpm-workspace.yaml +23 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/lib/auth.guard.ts +4 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/lib/structured-all-exceptions.filter.ts +2 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/lib/tracing.ts +4 -6
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/agenda/agenda.service.ts +2 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/audit/audit.controller.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/codeRuntime/code-runtime.controller.ts +6 -6
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/game/game.controller.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/httpRequest/http-request-runtime.controller.ts +6 -6
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/httpRequest/http-request-runtime.util.ts +4 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/approval-subject-source.util.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/human-approval.service.ts +4 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/runtime/human-approval-runtime.controller.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/integrationConnection/integration-connection.service.ts +2 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/pageResource/pageResource.controller.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/permTransfer/page-transfer.service.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/resource/resource.controller.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/rolePages/rolePages.controller.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/roleResource/roleResource.controller.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/staffDirectory/staff-directory.service.spec.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.errors.ts +4 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.registry.ts +4 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.types.ts +4 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/user/user.controller.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/user/user.service.ts +2 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/parameter-binding.ts +4 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-data-edge.util.ts +5 -5
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-handle-validator.ts +2 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.service.ts +11 -11
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowConfig/subject-config-validator.service.ts +3 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/workflowNodeInstance.controller.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeType/workflowNodeType.controller.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/start-prod.sh +4 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/.oxfmtrc.json +12 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/.oxlintrc.json +24 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/README.MD +2 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/nginx.conf +0 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/package.json +17 -17
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/pnpm-workspace.yaml +13 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/VanillaJSONEditor/index.jsx +4 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/agentPanel/propPatcher.ts +36 -8
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/dev-shell/style.css +24 -7
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/plugins/devShellPlugin.ts +2 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/audit/components/action-cell.css +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/styles/index.css +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/test/setup.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/vite.config.ts +53 -41
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/vitest.config.ts +8 -2
- package/package.json +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/.eslintrc.js +0 -28
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/.prettierignore +0 -7
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/.prettierrc +0 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/.eslintrc.json +0 -38
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/.prettierignore +0 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/.prettierrc +0 -4
|
@@ -73,12 +73,12 @@ export class HttpRequestRuntimeController {
|
|
|
73
73
|
node?.runtimeKey === 'http_request' && !input.configKey
|
|
74
74
|
? node.config
|
|
75
75
|
: node?.runtimeKey === 'human_approval' &&
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
input.configKey === 'externalRequest'
|
|
77
|
+
? node.config.external?.request
|
|
78
|
+
: node?.runtimeKey === 'human_approval' &&
|
|
79
|
+
input.configKey === 'approverLookupRequest'
|
|
80
|
+
? dynamicSubject?.lookup?.request
|
|
81
|
+
: undefined;
|
|
82
82
|
if (
|
|
83
83
|
!version ||
|
|
84
84
|
version.workflowId !== instance.workflowId ||
|
|
@@ -104,8 +104,8 @@ export function materializeHttpRequest(
|
|
|
104
104
|
config.bodyMode === 'JSON'
|
|
105
105
|
? resolveTemplates(config.body, data)
|
|
106
106
|
: Object.keys(config.bodyBindings ?? {}).length > 0
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
? resolveBindings(config.bodyBindings ?? {}, data)
|
|
108
|
+
: undefined;
|
|
109
109
|
|
|
110
110
|
return {
|
|
111
111
|
url: url.toString().replace(/\/$/, resolvedPath.endsWith('/') ? '/' : ''),
|
|
@@ -188,8 +188,8 @@ function requireReference(data: HttpRequestData, path: string): unknown {
|
|
|
188
188
|
source === 'input'
|
|
189
189
|
? data.input
|
|
190
190
|
: source === 'workflow'
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
? data.workflow
|
|
192
|
+
: data.approval;
|
|
193
193
|
for (const part of parts) {
|
|
194
194
|
if (!current || typeof current !== 'object' || !(part in current))
|
|
195
195
|
throw new Error(`HTTP_TEMPLATE_RESOLUTION_FAILED:${normalized}`);
|
|
@@ -24,7 +24,7 @@ export function materializeApprovalSubjects(
|
|
|
24
24
|
|
|
25
25
|
for (const source of sources) {
|
|
26
26
|
const provider =
|
|
27
|
-
source.source === 'DYNAMIC' ? 'USER' : source.provider ?? 'USER';
|
|
27
|
+
source.source === 'DYNAMIC' ? 'USER' : (source.provider ?? 'USER');
|
|
28
28
|
const refs = normalizeRefs(
|
|
29
29
|
source.source === 'DYNAMIC'
|
|
30
30
|
? normalizeDynamicRefs(dynamicInputs[source.inputKey], source.inputKey)
|
|
@@ -317,7 +317,7 @@ export class HumanApprovalService {
|
|
|
317
317
|
expiresAt:
|
|
318
318
|
request.expiresAt instanceof Date
|
|
319
319
|
? request.expiresAt.toISOString()
|
|
320
|
-
: request.expiresAt ?? null,
|
|
320
|
+
: (request.expiresAt ?? null),
|
|
321
321
|
task: request.task,
|
|
322
322
|
candidates: request.candidates.map((candidate) => ({
|
|
323
323
|
approverId: candidate.principalRef,
|
|
@@ -678,7 +678,7 @@ function attachExternalApproval(
|
|
|
678
678
|
expiresAt:
|
|
679
679
|
request.expiresAt instanceof Date
|
|
680
680
|
? request.expiresAt.toISOString()
|
|
681
|
-
: request.expiresAt ?? null,
|
|
681
|
+
: (request.expiresAt ?? null),
|
|
682
682
|
task: input.task,
|
|
683
683
|
candidates: candidates
|
|
684
684
|
.filter((candidate) => candidate.principalType === 'USER')
|
|
@@ -802,8 +802,8 @@ function attachCompletedResolution<T extends Record<string, any>>(request: T) {
|
|
|
802
802
|
typeof payload.decidedAt === 'string'
|
|
803
803
|
? payload.decidedAt
|
|
804
804
|
: request.completedAt instanceof Date
|
|
805
|
-
|
|
806
|
-
|
|
805
|
+
? request.completedAt.toISOString()
|
|
806
|
+
: new Date().toISOString(),
|
|
807
807
|
},
|
|
808
808
|
};
|
|
809
809
|
}
|
|
@@ -102,7 +102,7 @@ export class HumanApprovalRuntimeController {
|
|
|
102
102
|
expiresAt:
|
|
103
103
|
request.expiresAt instanceof Date
|
|
104
104
|
? request.expiresAt.toISOString()
|
|
105
|
-
: request.expiresAt ?? null,
|
|
105
|
+
: (request.expiresAt ?? null),
|
|
106
106
|
...(externalApproval && {
|
|
107
107
|
externalApproval,
|
|
108
108
|
}),
|
|
@@ -252,8 +252,8 @@ export class IntegrationConnectionService {
|
|
|
252
252
|
authType === 'BASIC'
|
|
253
253
|
? ['username', 'password']
|
|
254
254
|
: authType === 'BEARER'
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
? ['token']
|
|
256
|
+
: ['apiKey'];
|
|
257
257
|
if (
|
|
258
258
|
!allowEmpty &&
|
|
259
259
|
required.some((key) => typeof secrets[key] !== 'string' || !secrets[key])
|
|
@@ -117,7 +117,7 @@ export class PageTransferService {
|
|
|
117
117
|
for (const row of rows) {
|
|
118
118
|
parentCodeById.set(
|
|
119
119
|
row.id,
|
|
120
|
-
row.parentId === null ? null : codeById.get(row.parentId) ?? null,
|
|
120
|
+
row.parentId === null ? null : (codeById.get(row.parentId) ?? null),
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -9,7 +9,10 @@ export type SubjectProviderCapabilityErrorCode =
|
|
|
9
9
|
| 'SUBJECT_PROVIDER_PREVIEW_NOT_SUPPORTED';
|
|
10
10
|
|
|
11
11
|
export class SubjectProviderError extends Error {
|
|
12
|
-
constructor(
|
|
12
|
+
constructor(
|
|
13
|
+
public readonly code: SubjectProviderErrorCode,
|
|
14
|
+
message: string,
|
|
15
|
+
) {
|
|
13
16
|
super(message);
|
|
14
17
|
this.name = 'SubjectProviderError';
|
|
15
18
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
@@ -109,7 +109,7 @@ function cloneAndFreeze<T>(value: T): FrozenValue<T> {
|
|
|
109
109
|
type FrozenValue<T> = T extends SubjectProviderDescriptor
|
|
110
110
|
? FrozenSubjectProviderDescriptor
|
|
111
111
|
: T extends readonly (infer U)[]
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
? readonly FrozenValue<U>[]
|
|
113
|
+
: T extends object
|
|
114
|
+
? { readonly [K in keyof T]: FrozenValue<T[K]> }
|
|
115
|
+
: T;
|
|
@@ -88,10 +88,10 @@ export interface SubjectProvider {
|
|
|
88
88
|
export type DeepReadonly<T> = T extends (...args: any[]) => unknown
|
|
89
89
|
? T
|
|
90
90
|
: T extends readonly (infer U)[]
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
? readonly DeepReadonly<U>[]
|
|
92
|
+
: T extends object
|
|
93
|
+
? { readonly [K in keyof T]: DeepReadonly<T[K]> }
|
|
94
|
+
: T;
|
|
95
95
|
|
|
96
96
|
export type FrozenSubjectProviderDescriptor =
|
|
97
97
|
DeepReadonly<SubjectProviderDescriptor>;
|
package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/user/user.service.ts
CHANGED
|
@@ -224,8 +224,8 @@ function assignedRoles(value: string): string[] {
|
|
|
224
224
|
return Array.isArray(parsed)
|
|
225
225
|
? parsed.map(String).filter((role) => role.trim())
|
|
226
226
|
: value.trim()
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
? [value]
|
|
228
|
+
: [];
|
|
229
229
|
} catch {
|
|
230
230
|
return value.trim() ? [value] : [];
|
|
231
231
|
}
|
|
@@ -62,14 +62,14 @@ export function resolveParameterBinding(
|
|
|
62
62
|
binding.source === 'INPUT'
|
|
63
63
|
? 'input'
|
|
64
64
|
: binding.source === 'WORKFLOW'
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
? 'workflow'
|
|
66
|
+
: 'approval';
|
|
67
67
|
const root =
|
|
68
68
|
binding.source === 'INPUT'
|
|
69
69
|
? input
|
|
70
70
|
: binding.source === 'WORKFLOW'
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
? workflow
|
|
72
|
+
: approval;
|
|
73
73
|
const value = readPath(root, binding.path);
|
|
74
74
|
if (value === undefined)
|
|
75
75
|
throw new Error(
|
|
@@ -396,11 +396,11 @@ function parallelBranches(
|
|
|
396
396
|
(item): item is { id: string; label: string } =>
|
|
397
397
|
Boolean(
|
|
398
398
|
item &&
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
399
|
+
typeof item === 'object' &&
|
|
400
|
+
typeof item.id === 'string' &&
|
|
401
|
+
item.id.length > 0 &&
|
|
402
|
+
typeof item.label === 'string' &&
|
|
403
|
+
item.label.length > 0,
|
|
404
404
|
),
|
|
405
405
|
);
|
|
406
406
|
}
|
|
@@ -94,8 +94,8 @@ export function validateWorkflowHandles(
|
|
|
94
94
|
const handles = runtimeOutput
|
|
95
95
|
? [runtimeOutput]
|
|
96
96
|
: declaredOutputs === null
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
? deriveDynamicOutputs(sourceNode)
|
|
98
|
+
: declaredOutputs;
|
|
99
99
|
|
|
100
100
|
if (!runtimeOutput && declaredOutputs !== null && handles.length === 0) {
|
|
101
101
|
if (edge.sourceHandle != null && edge.sourceHandle !== '') {
|
|
@@ -324,8 +324,8 @@ function validateBusinessEventMatch(
|
|
|
324
324
|
field.type === 'number'
|
|
325
325
|
? 'NUMBER'
|
|
326
326
|
: field.type === 'boolean'
|
|
327
|
-
|
|
328
|
-
|
|
327
|
+
? 'BOOLEAN'
|
|
328
|
+
: 'STRING';
|
|
329
329
|
let values: unknown[] = [right.value];
|
|
330
330
|
if (operator === 'IN') {
|
|
331
331
|
try {
|
|
@@ -563,7 +563,7 @@ export class WorkflowService {
|
|
|
563
563
|
const latest = workflow.versions?.[0]?.dsl;
|
|
564
564
|
return Boolean(
|
|
565
565
|
workflow.dsl &&
|
|
566
|
-
|
|
566
|
+
(!latest || !areWorkflowDslSourcesEqual(workflow.dsl, latest)),
|
|
567
567
|
);
|
|
568
568
|
}
|
|
569
569
|
|
|
@@ -754,7 +754,7 @@ export class WorkflowService {
|
|
|
754
754
|
typeof dsl === 'object' &&
|
|
755
755
|
!Array.isArray(dsl) &&
|
|
756
756
|
Array.isArray((dsl as { nodes?: unknown }).nodes)
|
|
757
|
-
? (dsl as { nodes: Array<{ type?: string }> }).nodes ?? []
|
|
757
|
+
? ((dsl as { nodes: Array<{ type?: string }> }).nodes ?? [])
|
|
758
758
|
: [];
|
|
759
759
|
if (
|
|
760
760
|
nodes.filter((node) => node.type === 'webhook_trigger').length === 1
|
|
@@ -1482,7 +1482,7 @@ export class WorkflowService {
|
|
|
1482
1482
|
const config =
|
|
1483
1483
|
override && typeof override === 'object' && !Array.isArray(override)
|
|
1484
1484
|
? asRecord(override)
|
|
1485
|
-
: instanceConfigs.get(instanceId) ?? asRecord(node.config);
|
|
1485
|
+
: (instanceConfigs.get(instanceId) ?? asRecord(node.config));
|
|
1486
1486
|
return String(config.workflowId ?? '') === String(workflowId);
|
|
1487
1487
|
});
|
|
1488
1488
|
};
|
|
@@ -1591,10 +1591,10 @@ export class WorkflowService {
|
|
|
1591
1591
|
nodeType.outputs === null
|
|
1592
1592
|
? null
|
|
1593
1593
|
: Array.isArray(nodeType.outputs)
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1594
|
+
? nodeType.outputs.filter(
|
|
1595
|
+
(output): output is string => typeof output === 'string',
|
|
1596
|
+
)
|
|
1597
|
+
: [],
|
|
1598
1598
|
]),
|
|
1599
1599
|
) as NodeOutputsMap;
|
|
1600
1600
|
const handleErrors = validateWorkflowHandles(
|
|
@@ -2315,8 +2315,8 @@ export class WorkflowService {
|
|
|
2315
2315
|
typeof result.message === 'string'
|
|
2316
2316
|
? result.message
|
|
2317
2317
|
: typeof result.error === 'string'
|
|
2318
|
-
|
|
2319
|
-
|
|
2318
|
+
? result.error
|
|
2319
|
+
: 'Workflow execution failed',
|
|
2320
2320
|
},
|
|
2321
2321
|
}),
|
|
2322
2322
|
};
|
|
@@ -139,7 +139,9 @@ export class SubjectConfigValidatorService {
|
|
|
139
139
|
|
|
140
140
|
const source = entry.source ?? 'STATIC';
|
|
141
141
|
const provider =
|
|
142
|
-
source === 'DYNAMIC'
|
|
142
|
+
source === 'DYNAMIC'
|
|
143
|
+
? 'USER'
|
|
144
|
+
: (validProvider(entry.provider) ?? 'USER');
|
|
143
145
|
const rawRefs = entry.refs;
|
|
144
146
|
if (source === 'DYNAMIC') {
|
|
145
147
|
const inputKey = validNonBlankString(entry.inputKey);
|
|
@@ -171,7 +171,7 @@ export class WorkflowNodeInstanceController {
|
|
|
171
171
|
@ACAttrFilter() acAttrFilter,
|
|
172
172
|
@Req() request: AuthenticatedActorRequest,
|
|
173
173
|
) {
|
|
174
|
-
/*
|
|
174
|
+
/*
|
|
175
175
|
const origin = (await this.workflowNodeInstanceService.findUnique(id, {
|
|
176
176
|
id: true,
|
|
177
177
|
// 这里需要根据实际情况填写
|
|
@@ -73,7 +73,7 @@ if [ "$DEPLOY_PREFIX_MATCH" -eq 1 ]; then
|
|
|
73
73
|
echo "更新后的 DATABASE_URL: ${DATABASE_URL}"
|
|
74
74
|
export DATABASE_URL="${DATABASE_URL}"
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
pnpm migrate:deploy || { echo "同步表结构失败"; exit 1; }
|
|
77
77
|
|
|
78
78
|
# 设置迁移脚本的源和目标 schema
|
|
79
79
|
# 源 schema 为 public(生产数据),目标 schema 为分支 schema
|
|
@@ -84,7 +84,7 @@ if [ "$DEPLOY_PREFIX_MATCH" -eq 1 ]; then
|
|
|
84
84
|
|
|
85
85
|
# 临时环境每次启动都做一次 seed(幂等:upsert / skipDuplicates 风格,重复跑无害)
|
|
86
86
|
echo "临时环境执行 seed ..."
|
|
87
|
-
|
|
87
|
+
pnpm seed || { echo "seed 失败"; exit 1; }
|
|
88
88
|
else
|
|
89
89
|
echo "非临时环境,仅在权限表缺失或为空时同步表结构和数据"
|
|
90
90
|
# 如果DATABASE_URL中已经包含了schema=xxx,则不添加,如果DATABASE_URL中没有schema=,则添加schema=public,如果DATABASE_URL中已经包含了schema=但没有具体值,则添加public
|
|
@@ -136,8 +136,8 @@ else
|
|
|
136
136
|
|
|
137
137
|
if [ "$NEEDS_INIT" != "no" ]; then
|
|
138
138
|
echo "权限表缺失或无数据(NEEDS_INIT=${NEEDS_INIT}),执行 migrate:deploy + seed ..."
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
pnpm migrate:deploy || { echo "同步表结构失败"; exit 1; }
|
|
140
|
+
pnpm seed || { echo "seed 失败"; exit 1; }
|
|
141
141
|
else
|
|
142
142
|
echo "权限数据已就绪,跳过 migrate:deploy 与 seed"
|
|
143
143
|
fi
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": ["typescript", "react", "react-hooks"],
|
|
4
|
+
"categories": {
|
|
5
|
+
"correctness": "warn"
|
|
6
|
+
},
|
|
7
|
+
"rules": {
|
|
8
|
+
"react/react-in-jsx-scope": "off",
|
|
9
|
+
"react/display-name": "off",
|
|
10
|
+
"typescript/no-explicit-any": "off",
|
|
11
|
+
"typescript/no-empty-object-type": "off",
|
|
12
|
+
"typescript/no-unsafe-function-type": "off",
|
|
13
|
+
"typescript/no-wrapper-object-types": "warn",
|
|
14
|
+
"typescript/no-unnecessary-type-constraint": "warn",
|
|
15
|
+
"typescript/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
|
|
16
|
+
"typescript/no-unused-expressions": "warn",
|
|
17
|
+
"react/no-unescaped-entities": "warn",
|
|
18
|
+
"react/jsx-key": "warn",
|
|
19
|
+
"react-hooks/rules-of-hooks": "warn",
|
|
20
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
21
|
+
"no-prototype-builtins": "warn"
|
|
22
|
+
},
|
|
23
|
+
"ignorePatterns": ["dist/**", "node_modules/**", "src/generated/**"]
|
|
24
|
+
}
|
|
@@ -20,13 +20,13 @@ Refine offers lots of out-of-the box functionality for rapid development, withou
|
|
|
20
20
|
### Running the development server.
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
$
|
|
23
|
+
$ pnpm dev
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
### Building for production.
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
$
|
|
29
|
+
$ pnpm build
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Learn More
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"ajv": "^8.16.0",
|
|
26
26
|
"ajv-formats": "^2.1.1",
|
|
27
27
|
"antd": "^5.24.6",
|
|
28
|
+
"axios": "^1.14.0",
|
|
28
29
|
"class-validator": "^0.14.0",
|
|
29
30
|
"dayjs": "^1.11.19",
|
|
30
31
|
"echarts": "^5.6.0",
|
|
@@ -43,13 +44,14 @@
|
|
|
43
44
|
"react-dom": "^18.2.0",
|
|
44
45
|
"react-grid-layout": "^2.2.3",
|
|
45
46
|
"react-i18next": "^15.4.1",
|
|
47
|
+
"react-resizable": "^3.1.3",
|
|
46
48
|
"react-router-dom": "^7.9.4",
|
|
47
49
|
"reflect-metadata": "^0.1.13",
|
|
48
50
|
"sucrase": "^3.35.1",
|
|
49
51
|
"vanilla-jsoneditor": "^0.23.7"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
52
|
-
"@testing-library/jest-dom": "^
|
|
54
|
+
"@testing-library/jest-dom": "^6.10.0",
|
|
53
55
|
"@testing-library/react": "^13.1.1",
|
|
54
56
|
"@testing-library/user-event": "^14.1.1",
|
|
55
57
|
"@types/jest": "^29.2.4",
|
|
@@ -59,28 +61,23 @@
|
|
|
59
61
|
"@types/lodash.foreach": "^4.5.7",
|
|
60
62
|
"@types/lodash.groupby": "^4.6.7",
|
|
61
63
|
"@types/lodash.memoize": "^4.1.7",
|
|
62
|
-
"@types/node": "^
|
|
64
|
+
"@types/node": "^22.20.3",
|
|
63
65
|
"@types/react": "^18.0.15",
|
|
64
66
|
"@types/react-dom": "^18.0.6",
|
|
65
67
|
"@types/react-grid-layout": "^1.3.6",
|
|
66
|
-
"@
|
|
67
|
-
"@typescript-eslint/parser": "^8.59.0",
|
|
68
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
68
|
+
"@vitejs/plugin-react": "^5.2.0",
|
|
69
69
|
"autoprefixer": "^10.4.24",
|
|
70
70
|
"dotenv": "^17.4.2",
|
|
71
|
-
"eslint": "^8",
|
|
72
|
-
"eslint-plugin-react": "^7.37.5",
|
|
73
|
-
"eslint-plugin-react-hooks": "^4",
|
|
74
71
|
"husky": "^8.0.0",
|
|
75
72
|
"jsdom": "^26.1.0",
|
|
76
73
|
"lint-staged": "^13.0.0",
|
|
74
|
+
"oxfmt": "^0.68.0",
|
|
75
|
+
"oxlint": "^1.83.0",
|
|
77
76
|
"postcss": "^8.5.6",
|
|
78
77
|
"postcss-nesting": "^14.0.0",
|
|
79
|
-
"prettier": "^3.8.3",
|
|
80
78
|
"typescript": "^5.4.2",
|
|
81
|
-
"vite": "^
|
|
82
|
-
"
|
|
83
|
-
"vitest": "^3.2.4",
|
|
79
|
+
"vite": "^8.2.2",
|
|
80
|
+
"vitest": "^5.0.1",
|
|
84
81
|
"xlsx": "^0.18.5"
|
|
85
82
|
},
|
|
86
83
|
"scripts": {
|
|
@@ -89,15 +86,18 @@
|
|
|
89
86
|
"preview": "vite preview",
|
|
90
87
|
"test": "vitest run",
|
|
91
88
|
"typecheck": "tsc --noEmit",
|
|
92
|
-
"format": "
|
|
93
|
-
"
|
|
89
|
+
"format": "oxfmt src",
|
|
90
|
+
"format:check": "oxfmt src --check",
|
|
91
|
+
"lint": "oxlint src",
|
|
92
|
+
"lint:fix": "oxlint src --fix",
|
|
94
93
|
"prepare": "cd .. && husky install || true"
|
|
95
94
|
},
|
|
96
95
|
"lint-staged": {
|
|
97
|
-
"**/*.{ts,tsx,js,jsx}": "
|
|
96
|
+
"**/*.{ts,tsx,js,jsx}": "oxfmt"
|
|
98
97
|
},
|
|
99
98
|
"type": "module",
|
|
100
|
-
"
|
|
101
|
-
|
|
99
|
+
"packageManager": "pnpm@11.23.0",
|
|
100
|
+
"engines": {
|
|
101
|
+
"node": ">=22.13"
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# pnpm 11 起,原先放在 package.json "pnpm" 字段的设置迁移至此文件。
|
|
2
|
+
# 本项目非 monorepo,此文件仅用于承载 pnpm 设置。
|
|
3
|
+
|
|
4
|
+
# yarn resolutions 的等价物:锁定 rc-util 版本
|
|
5
|
+
overrides:
|
|
6
|
+
rc-util: ^5.44.4
|
|
7
|
+
|
|
8
|
+
# 依赖的构建脚本默认被禁止执行(供应链安全考虑),需在此逐个放行。
|
|
9
|
+
allowBuilds:
|
|
10
|
+
# 必须放行:postinstall 负责下载对应平台的原生二进制,缺失则 vite 无法构建
|
|
11
|
+
# monaco-editor 依赖的文件监听原生模块,postinstall 负责定位/编译原生 binding
|
|
12
|
+
'@parcel/watcher': true
|
|
13
|
+
esbuild: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { JSONEditor } from
|
|
2
|
-
import { useEffect, useRef } from
|
|
3
|
-
import
|
|
1
|
+
import { JSONEditor } from 'vanilla-jsoneditor';
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import './index.css';
|
|
4
4
|
|
|
5
5
|
export default function SvelteJSONEditor(props) {
|
|
6
6
|
const refContainer = useRef(null);
|
|
@@ -32,7 +32,7 @@ export default function SvelteJSONEditor(props) {
|
|
|
32
32
|
...props,
|
|
33
33
|
content: {
|
|
34
34
|
json: undefined,
|
|
35
|
-
text: props.value ||
|
|
35
|
+
text: props.value || '',
|
|
36
36
|
},
|
|
37
37
|
onChange: (content) => {
|
|
38
38
|
if (content.text !== undefined) {
|