@peanut-admin/admin 0.1.0-alpha.2
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/LICENSE +202 -0
- package/admin-core/src/access/access.ts +27 -0
- package/admin-core/src/api/client.ts +200 -0
- package/admin-core/src/api/problem.ts +67 -0
- package/admin-core/src/api/refresh.ts +122 -0
- package/admin-core/src/auth/stores.ts +121 -0
- package/admin-core/src/generated/api.d.ts +22106 -0
- package/admin-core/src/governance/audit.ts +56 -0
- package/admin-core/src/governance/catalog.ts +86 -0
- package/admin-core/src/governance/index.ts +26 -0
- package/admin-core/src/governance/menu.ts +63 -0
- package/admin-core/src/governance/roles.ts +144 -0
- package/admin-core/src/governance/types.ts +64 -0
- package/admin-core/src/index.ts +105 -0
- package/admin-core/src/lifecycle/tenant.ts +59 -0
- package/admin-core/src/module/contribution.ts +124 -0
- package/admin-core/src/runtime/config.ts +55 -0
- package/admin-core/src/runtime/errors.ts +81 -0
- package/admin-core/src/runtime/guard.ts +40 -0
- package/admin-core/src/runtime/navigation.ts +105 -0
- package/admin-core/src/runtime/overrides.ts +214 -0
- package/admin-core/src/targets/store.ts +153 -0
- package/admin-shell/src/config.ts +84 -0
- package/admin-shell/src/index.ts +40 -0
- package/admin-shell/src/layout.ts +332 -0
- package/admin-shell/src/overrides.ts +53 -0
- package/admin-shell/src/states.ts +93 -0
- package/admin-shell/src/targets.ts +128 -0
- package/admin-shell/src/theme.ts +15 -0
- package/client-core/src/index.ts +325 -0
- package/client-nuxt/src/index.ts +40 -0
- package/client-uniapp/src/index.ts +50 -0
- package/file-media/src/FileAssetSelector.vue +117 -0
- package/file-media/src/FileMediaPage.vue +158 -0
- package/file-media/src/contracts.ts +220 -0
- package/file-media/src/index.ts +19 -0
- package/file-media/src/runtime.ts +210 -0
- package/import-export/src/ImportExportPage.vue +155 -0
- package/import-export/src/contracts.ts +96 -0
- package/import-export/src/index.ts +3 -0
- package/import-export/src/runtime.ts +128 -0
- package/integration-security/src/IntegrationSecurityPage.vue +402 -0
- package/integration-security/src/contracts.ts +171 -0
- package/integration-security/src/index.ts +3 -0
- package/integration-security/src/runtime.ts +180 -0
- package/notification-sms/src/NotificationInboxPage.vue +266 -0
- package/notification-sms/src/contracts.ts +195 -0
- package/notification-sms/src/index.ts +4 -0
- package/notification-sms/src/runtime.ts +143 -0
- package/ops-console/src/OpsConsolePage.vue +337 -0
- package/ops-console/src/contracts.ts +169 -0
- package/ops-console/src/index.ts +3 -0
- package/ops-console/src/runtime.ts +199 -0
- package/package.json +108 -0
- package/reference-codes/src/ReferenceCodesPage.vue +942 -0
- package/reference-codes/src/contracts.ts +484 -0
- package/reference-codes/src/index.ts +53 -0
- package/reference-codes/src/runtime.ts +855 -0
- package/settings/src/SettingsPage.vue +536 -0
- package/settings/src/contracts.ts +331 -0
- package/settings/src/index.ts +45 -0
- package/settings/src/runtime.ts +545 -0
- package/task-job/src/TaskJobPage.vue +120 -0
- package/task-job/src/contracts.ts +117 -0
- package/task-job/src/index.ts +2 -0
- package/task-job/src/runtime.ts +105 -0
- package/testing/src/index.ts +141 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { inject, reactive } from 'vue'
|
|
2
|
+
import type { InjectionKey } from 'vue'
|
|
3
|
+
import { LOG_SEVERITIES, parseMaintenance, parseOpsStatus, parseOpsTask, parseRuntimeLogs } from './contracts'
|
|
4
|
+
import type { LogSeverity, MaintenanceScheduleInput, MaintenanceWindow, OpsConsoleTransport, OpsStatus, OpsTask, OpsTransportResult, RuntimeLogEntry } from './contracts'
|
|
5
|
+
|
|
6
|
+
export const OPS_CONSOLE_STORE_KEY = 'peanut.ops-console.runtime' as const
|
|
7
|
+
export const OPS_READ_PERMISSION = 'platform.ops.read' as const
|
|
8
|
+
export const OPS_BACKUP_PERMISSION = 'platform.ops.backup.manage' as const
|
|
9
|
+
export const OPS_RESTORE_PERMISSION = 'platform.ops.restore.manage' as const
|
|
10
|
+
export const OPS_MAINTENANCE_PERMISSION = 'platform.ops.maintenance.manage' as const
|
|
11
|
+
export const OPS_LOGS_PERMISSION = 'platform.ops.logs.read' as const
|
|
12
|
+
|
|
13
|
+
export interface OpsProviderOption { readonly key: string; readonly backup: boolean; readonly restoreTargets: readonly string[] }
|
|
14
|
+
export interface OpsConsoleError { readonly code: string; readonly message: string; readonly requestId: string | null; readonly status: number | null }
|
|
15
|
+
export interface OpsConsoleState {
|
|
16
|
+
overview: OpsStatus | null; maintenance: MaintenanceWindow | null; tasks: OpsTask[]; logs: RuntimeLogEntry[]
|
|
17
|
+
logSource: string; logSeverity: LogSeverity; logCursor: string | null; logNextCursor: string | null
|
|
18
|
+
loading: boolean; logsLoading: boolean; mutating: boolean; error: OpsConsoleError | null; logsError: OpsConsoleError | null
|
|
19
|
+
}
|
|
20
|
+
export interface OpsConsoleRuntimeOptions {
|
|
21
|
+
readonly transport: OpsConsoleTransport
|
|
22
|
+
readonly providers: readonly OpsProviderOption[]
|
|
23
|
+
readonly maintenanceReasons: readonly string[]
|
|
24
|
+
readonly logSources: readonly string[]
|
|
25
|
+
readonly canRead: () => boolean
|
|
26
|
+
readonly canBackup: () => boolean
|
|
27
|
+
readonly canRestore: () => boolean
|
|
28
|
+
readonly canMaintain: () => boolean
|
|
29
|
+
readonly canReadLogs: () => boolean
|
|
30
|
+
readonly idempotencyKey?: () => string
|
|
31
|
+
}
|
|
32
|
+
export interface OpsConsoleRuntime {
|
|
33
|
+
readonly state: OpsConsoleState
|
|
34
|
+
readonly providers: readonly OpsProviderOption[]
|
|
35
|
+
readonly maintenanceReasons: readonly string[]
|
|
36
|
+
readonly logSources: readonly string[]
|
|
37
|
+
readonly canBackup: () => boolean
|
|
38
|
+
readonly canRestore: () => boolean
|
|
39
|
+
readonly canMaintain: () => boolean
|
|
40
|
+
readonly canReadLogs: () => boolean
|
|
41
|
+
load: () => Promise<void>
|
|
42
|
+
loadLogs: (reset?: boolean) => Promise<void>
|
|
43
|
+
setLogFilter: (source: string, severity: LogSeverity) => Promise<void>
|
|
44
|
+
submitBackup: (providerKey: string) => Promise<void>
|
|
45
|
+
submitRestore: (providerKey: string, backupReferenceKey: string, targetKey: string) => Promise<void>
|
|
46
|
+
refreshTask: (task: OpsTask) => Promise<void>
|
|
47
|
+
scheduleMaintenance: (input: MaintenanceScheduleInput) => Promise<void>
|
|
48
|
+
closeMaintenance: () => Promise<void>
|
|
49
|
+
dispose: () => void
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const problemMessages: Readonly<Record<string, string>> = {
|
|
53
|
+
OPS_REQUEST_INVALID: 'The operations request was rejected.', OPS_PERMISSION_DENIED: 'You do not have permission for this operation.',
|
|
54
|
+
OPS_PROVIDER_NOT_FOUND: 'The selected provider is unavailable.', OPS_TASK_NOT_FOUND: 'The operation task was not found.',
|
|
55
|
+
OPS_IDEMPOTENCY_CONFLICT: 'This request conflicts with an earlier operation.', OPS_OPERATION_IN_PROGRESS: 'An operation is already in progress.',
|
|
56
|
+
OPS_REVISION_CONFLICT: 'The maintenance window changed. Reload and try again.', OPS_RESTORE_TARGET_INVALID: 'The selected restore target is unavailable.',
|
|
57
|
+
OPS_MAINTENANCE_INVALID: 'The maintenance window is invalid.', OPS_STATUS_UNAVAILABLE: 'Operations status is unavailable.',
|
|
58
|
+
OPS_PROVIDER_UNAVAILABLE: 'The operation provider is unavailable.', OPS_TASK_UNAVAILABLE: 'The operation task service is unavailable.',
|
|
59
|
+
OPS_LOGS_UNAVAILABLE: 'Runtime events are unavailable.', OPS_INTERNAL_ERROR: 'The operation could not be completed.',
|
|
60
|
+
}
|
|
61
|
+
const localError = (code: string, status: number | null = null): OpsConsoleError => ({
|
|
62
|
+
code, message: problemMessages[code] ?? 'The operation could not be completed.', requestId: null, status,
|
|
63
|
+
})
|
|
64
|
+
const failure = (result: OpsTransportResult): OpsConsoleError => {
|
|
65
|
+
const body = typeof result.body === 'object' && result.body !== null && !Array.isArray(result.body) ? result.body as Record<string, unknown> : {}
|
|
66
|
+
const code = typeof body.code === 'string' && Object.hasOwn(problemMessages, body.code) ? body.code : 'OPS_INTERNAL_ERROR'
|
|
67
|
+
const candidate = body.request_id ?? result.headers.get('X-Request-Id')
|
|
68
|
+
return { code, message: problemMessages[code]!, requestId: typeof candidate === 'string' && /^[A-Za-z0-9._-]{1,128}$/.test(candidate) ? candidate : null, status: result.status }
|
|
69
|
+
}
|
|
70
|
+
const responseStatus = (result: OpsTransportResult, expected: readonly number[]): OpsConsoleError | null => expected.includes(result.status) ? null : failure(result)
|
|
71
|
+
const optionKey = /^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*$/
|
|
72
|
+
const backupReference = /^backup_[A-Za-z0-9_-]{8,200}$/
|
|
73
|
+
|
|
74
|
+
export const createOpsConsoleRuntime = (options: OpsConsoleRuntimeOptions): OpsConsoleRuntime => {
|
|
75
|
+
const providers = options.providers.filter(provider => optionKey.test(provider.key)
|
|
76
|
+
&& provider.restoreTargets.every(target => optionKey.test(target) && !/(?:^|[.-])(?:active|current|primary|prod|production)(?:$|[.-])/.test(target)))
|
|
77
|
+
const maintenanceReasons = options.maintenanceReasons.filter(reason => optionKey.test(reason))
|
|
78
|
+
const logSources = options.logSources.filter(source => optionKey.test(source))
|
|
79
|
+
const state = reactive<OpsConsoleState>({
|
|
80
|
+
overview: null, maintenance: null, tasks: [], logs: [], logSource: logSources[0] ?? '', logSeverity: 'warning',
|
|
81
|
+
logCursor: null, logNextCursor: null, loading: false, logsLoading: false, mutating: false, error: null, logsError: null,
|
|
82
|
+
})
|
|
83
|
+
const controllers = new Set<AbortController>(); let generation = 0
|
|
84
|
+
let logGeneration = 0; let logController: AbortController | null = null
|
|
85
|
+
const run = async <T>(operation: (signal: AbortSignal) => Promise<T>): Promise<T> => {
|
|
86
|
+
const controller = new AbortController(); controllers.add(controller)
|
|
87
|
+
try { return await operation(controller.signal) } finally { controllers.delete(controller) }
|
|
88
|
+
}
|
|
89
|
+
const key = (): string => options.idempotencyKey?.() ?? `ops-${crypto.randomUUID()}`
|
|
90
|
+
const invalidateLogs = (): void => {
|
|
91
|
+
logGeneration += 1; logController?.abort(); logController = null; state.logsLoading = false
|
|
92
|
+
state.logs = []; state.logCursor = null; state.logNextCursor = null
|
|
93
|
+
}
|
|
94
|
+
const load = async (): Promise<void> => {
|
|
95
|
+
const current = ++generation; state.loading = true; state.error = null
|
|
96
|
+
if (!options.canRead()) { state.error = localError('OPS_PERMISSION_DENIED', 403); state.loading = false; return }
|
|
97
|
+
try {
|
|
98
|
+
const [statusResult, maintenanceResult] = await Promise.all([
|
|
99
|
+
run(signal => options.transport.overview(signal)), run(signal => options.transport.maintenance(signal)),
|
|
100
|
+
])
|
|
101
|
+
if (current !== generation) return
|
|
102
|
+
const statusFailure = responseStatus(statusResult, [200]); const maintenanceFailure = responseStatus(maintenanceResult, [200])
|
|
103
|
+
if (statusFailure !== null || maintenanceFailure !== null) { state.error = statusFailure ?? maintenanceFailure; return }
|
|
104
|
+
state.overview = parseOpsStatus(statusResult.body); state.maintenance = parseMaintenance(maintenanceResult.body)
|
|
105
|
+
} catch { if (current === generation) state.error = localError('OPS_STATUS_UNAVAILABLE') }
|
|
106
|
+
finally { if (current === generation) state.loading = false }
|
|
107
|
+
}
|
|
108
|
+
const loadLogs = async (reset = true): Promise<void> => {
|
|
109
|
+
if (reset) invalidateLogs()
|
|
110
|
+
else if (state.logsLoading) return
|
|
111
|
+
if (!options.canReadLogs()) { state.logsError = localError('OPS_PERMISSION_DENIED', 403); return }
|
|
112
|
+
if (!logSources.includes(state.logSource)) { state.logsError = localError('OPS_REQUEST_INVALID', 400); return }
|
|
113
|
+
const current = logGeneration; const source = state.logSource; const severity = state.logSeverity
|
|
114
|
+
const cursor = reset ? null : state.logNextCursor
|
|
115
|
+
if (!reset && cursor === null) return
|
|
116
|
+
const controller = new AbortController(); logController = controller
|
|
117
|
+
state.logsLoading = true; state.logsError = null
|
|
118
|
+
try {
|
|
119
|
+
const result = await options.transport.logs(source, severity, cursor, 50, controller.signal)
|
|
120
|
+
if (current !== logGeneration || logController !== controller || source !== state.logSource || severity !== state.logSeverity
|
|
121
|
+
|| (!reset && cursor !== state.logNextCursor)) return
|
|
122
|
+
const error = responseStatus(result, [200]); if (error !== null) { state.logsError = error; return }
|
|
123
|
+
const page = parseRuntimeLogs(result.body)
|
|
124
|
+
if (page.nextCursor !== null && page.nextCursor === cursor) { state.logsError = localError('OPS_LOGS_UNAVAILABLE'); return }
|
|
125
|
+
state.logs = reset ? [...page.items] : [...state.logs, ...page.items]; state.logCursor = cursor; state.logNextCursor = page.nextCursor
|
|
126
|
+
} catch { if (current === logGeneration && logController === controller) state.logsError = localError('OPS_LOGS_UNAVAILABLE') }
|
|
127
|
+
finally {
|
|
128
|
+
if (current === logGeneration && logController === controller) { logController = null; state.logsLoading = false }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const mutateTask = async (permission: () => boolean, operation: (signal: AbortSignal) => Promise<OpsTransportResult>): Promise<void> => {
|
|
132
|
+
if (state.mutating || !permission()) { if (!permission()) state.error = localError('OPS_PERMISSION_DENIED', 403); return }
|
|
133
|
+
const current = generation; state.mutating = true; state.error = null
|
|
134
|
+
try {
|
|
135
|
+
const result = await run(operation); if (current !== generation) return
|
|
136
|
+
const error = responseStatus(result, [200, 201, 202]); if (error !== null) { state.error = error; return }
|
|
137
|
+
const task = parseOpsTask(result.body); state.tasks = [task, ...state.tasks.filter(item => item.taskKey !== task.taskKey)]
|
|
138
|
+
} catch { if (current === generation) state.error = localError('OPS_TASK_UNAVAILABLE') }
|
|
139
|
+
finally { if (current === generation) state.mutating = false }
|
|
140
|
+
}
|
|
141
|
+
const mutateMaintenance = async (operation: (signal: AbortSignal) => Promise<OpsTransportResult>): Promise<void> => {
|
|
142
|
+
if (state.mutating || !options.canMaintain()) { if (!options.canMaintain()) state.error = localError('OPS_PERMISSION_DENIED', 403); return }
|
|
143
|
+
const current = generation; state.mutating = true; state.error = null
|
|
144
|
+
try {
|
|
145
|
+
const result = await run(operation); if (current !== generation) return
|
|
146
|
+
const error = responseStatus(result, [200, 201]); if (error !== null) { state.error = error; return }
|
|
147
|
+
state.maintenance = parseMaintenance(result.body)
|
|
148
|
+
} catch { if (current === generation) state.error = localError('OPS_INTERNAL_ERROR') }
|
|
149
|
+
finally { if (current === generation) state.mutating = false }
|
|
150
|
+
}
|
|
151
|
+
return {
|
|
152
|
+
state, providers, maintenanceReasons, logSources,
|
|
153
|
+
canBackup: options.canBackup, canRestore: options.canRestore, canMaintain: options.canMaintain, canReadLogs: options.canReadLogs,
|
|
154
|
+
load, loadLogs,
|
|
155
|
+
async setLogFilter(source, severity) {
|
|
156
|
+
if (!logSources.includes(source) || !LOG_SEVERITIES.includes(severity)) { state.logsError = localError('OPS_REQUEST_INVALID', 400); return }
|
|
157
|
+
state.logSource = source; state.logSeverity = severity; await loadLogs(true)
|
|
158
|
+
},
|
|
159
|
+
submitBackup(providerKey) {
|
|
160
|
+
const provider = providers.find(item => item.key === providerKey && item.backup)
|
|
161
|
+
if (provider === undefined) { state.error = localError('OPS_PROVIDER_NOT_FOUND', 404); return Promise.resolve() }
|
|
162
|
+
return mutateTask(options.canBackup, signal => options.transport.submitBackup(provider.key, key(), signal))
|
|
163
|
+
},
|
|
164
|
+
submitRestore(providerKey, backupReferenceKey, targetKey) {
|
|
165
|
+
const provider = providers.find(item => item.key === providerKey)
|
|
166
|
+
if (provider === undefined || !provider.restoreTargets.includes(targetKey) || !backupReference.test(backupReferenceKey)) { state.error = localError('OPS_RESTORE_TARGET_INVALID', 422); return Promise.resolve() }
|
|
167
|
+
return mutateTask(options.canRestore, signal => options.transport.submitRestore(provider.key, backupReferenceKey, targetKey, key(), signal))
|
|
168
|
+
},
|
|
169
|
+
async refreshTask(task) {
|
|
170
|
+
if (!options.canRead()) { state.error = localError('OPS_PERMISSION_DENIED', 403); return }
|
|
171
|
+
const current = generation
|
|
172
|
+
try {
|
|
173
|
+
const result = await run(signal => options.transport.task(task.taskKey, signal)); if (current !== generation) return
|
|
174
|
+
const error = responseStatus(result, [200]); if (error !== null) { state.error = error; return }
|
|
175
|
+
const refreshed = parseOpsTask(result.body); state.tasks = state.tasks.map(item => item.taskKey === refreshed.taskKey ? refreshed : item)
|
|
176
|
+
} catch { if (current === generation) state.error = localError('OPS_TASK_UNAVAILABLE') }
|
|
177
|
+
},
|
|
178
|
+
scheduleMaintenance(input) {
|
|
179
|
+
if (!maintenanceReasons.includes(input.reasonKey)) { state.error = localError('OPS_MAINTENANCE_INVALID', 422); return Promise.resolve() }
|
|
180
|
+
const expected = state.maintenance?.revision ?? 0
|
|
181
|
+
return mutateMaintenance(signal => options.transport.scheduleMaintenance(input, expected, key(), signal))
|
|
182
|
+
},
|
|
183
|
+
closeMaintenance() {
|
|
184
|
+
const window = state.maintenance
|
|
185
|
+
if (window === null || window.state === 'closed') { state.error = localError('OPS_MAINTENANCE_INVALID', 422); return Promise.resolve() }
|
|
186
|
+
return mutateMaintenance(signal => options.transport.closeMaintenance(window.maintenanceKey, window.revision, key(), signal))
|
|
187
|
+
},
|
|
188
|
+
dispose() {
|
|
189
|
+
generation += 1; invalidateLogs(); for (const controller of controllers) controller.abort(); controllers.clear()
|
|
190
|
+
state.overview = null; state.maintenance = null; state.tasks = []; state.logs = []; state.logCursor = null; state.logNextCursor = null
|
|
191
|
+
state.loading = false; state.logsLoading = false; state.mutating = false; state.error = null; state.logsError = null
|
|
192
|
+
},
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export const opsConsoleRuntimeKey: InjectionKey<OpsConsoleRuntime> = Symbol(OPS_CONSOLE_STORE_KEY)
|
|
197
|
+
export const useOpsConsoleRuntime = (): OpsConsoleRuntime => {
|
|
198
|
+
const runtime = inject(opsConsoleRuntimeKey); if (runtime === undefined) throw new Error('OPS_CONSOLE_RUNTIME_MISSING'); return runtime
|
|
199
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@peanut-admin/admin",
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
4
|
+
"description": "Reusable Peanut Admin Web services and module contributions",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"*.vue"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
"admin-core/src",
|
|
12
|
+
"admin-shell/src",
|
|
13
|
+
"settings/src",
|
|
14
|
+
"reference-codes/src",
|
|
15
|
+
"file-media/src",
|
|
16
|
+
"task-job/src",
|
|
17
|
+
"notification-sms/src",
|
|
18
|
+
"import-export/src",
|
|
19
|
+
"ops-console/src",
|
|
20
|
+
"integration-security/src",
|
|
21
|
+
"testing/src",
|
|
22
|
+
"client-core/src",
|
|
23
|
+
"client-nuxt/src",
|
|
24
|
+
"client-uniapp/src"
|
|
25
|
+
],
|
|
26
|
+
"exports": {
|
|
27
|
+
"./core": {
|
|
28
|
+
"types": "./admin-core/src/index.ts",
|
|
29
|
+
"import": "./admin-core/src/index.ts"
|
|
30
|
+
},
|
|
31
|
+
"./shell": {
|
|
32
|
+
"types": "./admin-shell/src/index.ts",
|
|
33
|
+
"import": "./admin-shell/src/index.ts"
|
|
34
|
+
},
|
|
35
|
+
"./settings": {
|
|
36
|
+
"types": "./settings/src/index.ts",
|
|
37
|
+
"import": "./settings/src/index.ts"
|
|
38
|
+
},
|
|
39
|
+
"./reference-codes": {
|
|
40
|
+
"types": "./reference-codes/src/index.ts",
|
|
41
|
+
"import": "./reference-codes/src/index.ts"
|
|
42
|
+
},
|
|
43
|
+
"./file-media": {
|
|
44
|
+
"types": "./file-media/src/index.ts",
|
|
45
|
+
"import": "./file-media/src/index.ts"
|
|
46
|
+
},
|
|
47
|
+
"./task-job": {
|
|
48
|
+
"types": "./task-job/src/index.ts",
|
|
49
|
+
"import": "./task-job/src/index.ts"
|
|
50
|
+
},
|
|
51
|
+
"./notification-sms": {
|
|
52
|
+
"types": "./notification-sms/src/index.ts",
|
|
53
|
+
"import": "./notification-sms/src/index.ts"
|
|
54
|
+
},
|
|
55
|
+
"./import-export": {
|
|
56
|
+
"types": "./import-export/src/index.ts",
|
|
57
|
+
"import": "./import-export/src/index.ts"
|
|
58
|
+
},
|
|
59
|
+
"./ops-console": {
|
|
60
|
+
"types": "./ops-console/src/index.ts",
|
|
61
|
+
"import": "./ops-console/src/index.ts"
|
|
62
|
+
},
|
|
63
|
+
"./integration-security": {
|
|
64
|
+
"types": "./integration-security/src/index.ts",
|
|
65
|
+
"import": "./integration-security/src/index.ts"
|
|
66
|
+
},
|
|
67
|
+
"./testing": {
|
|
68
|
+
"development": {
|
|
69
|
+
"types": "./testing/src/index.ts",
|
|
70
|
+
"import": "./testing/src/index.ts"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"./client": {
|
|
74
|
+
"types": "./client-core/src/index.ts",
|
|
75
|
+
"import": "./client-core/src/index.ts"
|
|
76
|
+
},
|
|
77
|
+
"./client/nuxt": {
|
|
78
|
+
"types": "./client-nuxt/src/index.ts",
|
|
79
|
+
"import": "./client-nuxt/src/index.ts"
|
|
80
|
+
},
|
|
81
|
+
"./client/uniapp": {
|
|
82
|
+
"types": "./client-uniapp/src/index.ts",
|
|
83
|
+
"import": "./client-uniapp/src/index.ts"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"dependencies": {
|
|
87
|
+
"element-plus": "2.14.3",
|
|
88
|
+
"openapi-fetch": "0.17.0",
|
|
89
|
+
"pinia": "4.0.2",
|
|
90
|
+
"vue-router": "5.2.0"
|
|
91
|
+
},
|
|
92
|
+
"devDependencies": {
|
|
93
|
+
"@vue/test-utils": "2.4.11",
|
|
94
|
+
"happy-dom": "20.10.6",
|
|
95
|
+
"typescript": "5.9.3",
|
|
96
|
+
"vite": "8.1.4",
|
|
97
|
+
"vitest": "4.1.10",
|
|
98
|
+
"vue": "3.5.39",
|
|
99
|
+
"vue-tsc": "3.3.7"
|
|
100
|
+
},
|
|
101
|
+
"peerDependencies": {
|
|
102
|
+
"vue": "^3.5.39"
|
|
103
|
+
},
|
|
104
|
+
"scripts": {
|
|
105
|
+
"test": "vitest run admin-core/tests admin-shell/tests file-media/tests import-export/tests integration-security/tests notification-sms/tests ops-console/tests reference-codes/tests settings/tests testing/tests client-core/tests client-nuxt/tests client-uniapp/tests",
|
|
106
|
+
"typecheck": "tsc --noEmit -p admin-core/tsconfig.json && tsc --noEmit -p admin-shell/tsconfig.json && vue-tsc --noEmit -p file-media/tsconfig.json && vue-tsc --noEmit -p import-export/tsconfig.json && vue-tsc --noEmit -p integration-security/tsconfig.json && vue-tsc --noEmit -p notification-sms/tsconfig.json && vue-tsc --noEmit -p ops-console/tsconfig.json && vue-tsc --noEmit -p reference-codes/tsconfig.json && vue-tsc --noEmit -p settings/tsconfig.json && vue-tsc --noEmit -p task-job/tsconfig.json && tsc --noEmit -p testing/tsconfig.json && tsc --noEmit -p client-core/tsconfig.json && tsc --noEmit -p client-nuxt/tsconfig.json && tsc --noEmit -p client-uniapp/tsconfig.json"
|
|
107
|
+
}
|
|
108
|
+
}
|