@nocobase/server 1.2.13-alpha → 1.3.0-alpha.20240710084543
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 +14 -14
- package/lib/acl/available-action.d.ts +0 -13
- package/lib/acl/available-action.js +0 -71
- package/lib/acl/index.d.ts +0 -10
- package/lib/acl/index.js +0 -46
- package/lib/app-command.d.ts +0 -20
- package/lib/app-command.js +0 -82
- package/lib/app-supervisor.d.ts +0 -69
- package/lib/app-supervisor.js +0 -302
- package/lib/application.d.ts +0 -345
- package/lib/application.js +0 -876
- package/lib/cache/index.d.ts +0 -11
- package/lib/cache/index.js +0 -44
- package/lib/commands/console.d.ts +0 -11
- package/lib/commands/console.js +0 -48
- package/lib/commands/create-migration.d.ts +0 -11
- package/lib/commands/create-migration.js +0 -79
- package/lib/commands/db-auth.d.ts +0 -11
- package/lib/commands/db-auth.js +0 -38
- package/lib/commands/db-clean.d.ts +0 -11
- package/lib/commands/db-clean.js +0 -41
- package/lib/commands/db-sync.d.ts +0 -11
- package/lib/commands/db-sync.js +0 -50
- package/lib/commands/destroy.d.ts +0 -11
- package/lib/commands/destroy.js +0 -40
- package/lib/commands/index.d.ts +0 -10
- package/lib/commands/index.js +0 -82
- package/lib/commands/install.d.ts +0 -11
- package/lib/commands/install.js +0 -43
- package/lib/commands/migrator.d.ts +0 -11
- package/lib/commands/migrator.js +0 -41
- package/lib/commands/pm.d.ts +0 -11
- package/lib/commands/pm.js +0 -98
- package/lib/commands/refresh.d.ts +0 -11
- package/lib/commands/refresh.js +0 -41
- package/lib/commands/restart.d.ts +0 -11
- package/lib/commands/restart.js +0 -45
- package/lib/commands/start.d.ts +0 -11
- package/lib/commands/start.js +0 -85
- package/lib/commands/stop.d.ts +0 -11
- package/lib/commands/stop.js +0 -44
- package/lib/commands/upgrade.d.ts +0 -14
- package/lib/commands/upgrade.js +0 -39
- package/lib/cron/cron-job-manager.d.ts +0 -22
- package/lib/cron/cron-job-manager.js +0 -82
- package/lib/errors/application-not-install.d.ts +0 -12
- package/lib/errors/application-not-install.js +0 -45
- package/lib/errors/handler.d.ts +0 -11
- package/lib/errors/handler.js +0 -50
- package/lib/errors/plugin-command-error.d.ts +0 -10
- package/lib/errors/plugin-command-error.js +0 -40
- package/lib/errors/plugin-not-exist.d.ts +0 -10
- package/lib/errors/plugin-not-exist.js +0 -40
- package/lib/gateway/errors.d.ts +0 -30
- package/lib/gateway/errors.js +0 -154
- package/lib/gateway/index.d.ts +0 -79
- package/lib/gateway/index.js +0 -393
- package/lib/gateway/ipc-socket-client.d.ts +0 -27
- package/lib/gateway/ipc-socket-client.js +0 -110
- package/lib/gateway/ipc-socket-server.d.ts +0 -21
- package/lib/gateway/ipc-socket-server.js +0 -150
- package/lib/gateway/ws-server.d.ts +0 -36
- package/lib/gateway/ws-server.js +0 -196
- package/lib/helper.d.ts +0 -18
- package/lib/helper.js +0 -193
- package/lib/helpers/application-version.d.ts +0 -18
- package/lib/helpers/application-version.js +0 -88
- package/lib/index.d.ts +0 -17
- package/lib/index.js +0 -64
- package/lib/locale/index.d.ts +0 -9
- package/lib/locale/index.js +0 -30
- package/lib/locale/locale.d.ts +0 -38
- package/lib/locale/locale.js +0 -174
- package/lib/locale/resource.d.ts +0 -9
- package/lib/locale/resource.js +0 -87
- package/lib/main-data-source.d.ts +0 -12
- package/lib/main-data-source.js +0 -57
- package/lib/middlewares/data-template.d.ts +0 -10
- package/lib/middlewares/data-template.js +0 -146
- package/lib/middlewares/data-wrapping.d.ts +0 -11
- package/lib/middlewares/data-wrapping.js +0 -100
- package/lib/middlewares/i18n.d.ts +0 -9
- package/lib/middlewares/i18n.js +0 -53
- package/lib/middlewares/index.d.ts +0 -10
- package/lib/middlewares/index.js +0 -39
- package/lib/middlewares/parse-variables.d.ts +0 -9
- package/lib/middlewares/parse-variables.js +0 -95
- package/lib/middlewares/validate-filter-params.d.ts +0 -9
- package/lib/middlewares/validate-filter-params.js +0 -42
- package/lib/migration.d.ts +0 -20
- package/lib/migration.js +0 -54
- package/lib/migrations/20230912193824-package-name-unique.d.ts +0 -14
- package/lib/migrations/20230912193824-package-name-unique.js +0 -59
- package/lib/migrations/20230912294620-update-pkg.d.ts +0 -14
- package/lib/migrations/20230912294620-update-pkg.js +0 -65
- package/lib/migrations/20240106082756-update-plugins.d.ts +0 -14
- package/lib/migrations/20240106082756-update-plugins.js +0 -51
- package/lib/migrations/20240428235620-rename-plugins.d.ts +0 -14
- package/lib/migrations/20240428235620-rename-plugins.js +0 -49
- package/lib/plugin-manager/clientStaticUtils.d.ts +0 -31
- package/lib/plugin-manager/clientStaticUtils.js +0 -129
- package/lib/plugin-manager/constants.d.ts +0 -15
- package/lib/plugin-manager/constants.js +0 -135
- package/lib/plugin-manager/deps.d.ts +0 -10
- package/lib/plugin-manager/deps.js +0 -83
- package/lib/plugin-manager/index.d.ts +0 -10
- package/lib/plugin-manager/index.js +0 -32
- package/lib/plugin-manager/middleware.d.ts +0 -10
- package/lib/plugin-manager/middleware.js +0 -45
- package/lib/plugin-manager/options/collection.d.ts +0 -10
- package/lib/plugin-manager/options/collection.js +0 -47
- package/lib/plugin-manager/options/resource.d.ts +0 -23
- package/lib/plugin-manager/options/resource.js +0 -186
- package/lib/plugin-manager/plugin-manager-repository.d.ts +0 -36
- package/lib/plugin-manager/plugin-manager-repository.js +0 -158
- package/lib/plugin-manager/plugin-manager.d.ts +0 -206
- package/lib/plugin-manager/plugin-manager.js +0 -1100
- package/lib/plugin-manager/types.d.ts +0 -23
- package/lib/plugin-manager/types.js +0 -24
- package/lib/plugin-manager/utils.d.ts +0 -115
- package/lib/plugin-manager/utils.js +0 -568
- package/lib/plugin.d.ts +0 -99
- package/lib/plugin.js +0 -228
- package/lib/swagger/index.json +0 -1569
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
/// <reference types="node" />
|
|
10
|
-
import { CleanOptions, Collection, SyncOptions } from '@nocobase/database';
|
|
11
|
-
import net from 'net';
|
|
12
|
-
import Application from '../application';
|
|
13
|
-
import { Plugin } from '../plugin';
|
|
14
|
-
import { PluginManagerRepository } from './plugin-manager-repository';
|
|
15
|
-
import { PluginData } from './types';
|
|
16
|
-
export declare const sleep: (timeout?: number) => Promise<unknown>;
|
|
17
|
-
export interface PluginManagerOptions {
|
|
18
|
-
app: Application;
|
|
19
|
-
plugins?: any[];
|
|
20
|
-
}
|
|
21
|
-
export interface InstallOptions {
|
|
22
|
-
cliArgs?: any[];
|
|
23
|
-
clean?: CleanOptions | boolean;
|
|
24
|
-
force?: boolean;
|
|
25
|
-
sync?: SyncOptions;
|
|
26
|
-
}
|
|
27
|
-
export declare class AddPresetError extends Error {
|
|
28
|
-
}
|
|
29
|
-
export declare class PluginManager {
|
|
30
|
-
options: PluginManagerOptions;
|
|
31
|
-
/**
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
app: Application;
|
|
35
|
-
/**
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
collection: Collection;
|
|
39
|
-
/**
|
|
40
|
-
* @internal
|
|
41
|
-
*/
|
|
42
|
-
pluginInstances: Map<typeof Plugin, Plugin<any>>;
|
|
43
|
-
/**
|
|
44
|
-
* @internal
|
|
45
|
-
*/
|
|
46
|
-
pluginAliases: Map<string, Plugin<any>>;
|
|
47
|
-
/**
|
|
48
|
-
* @internal
|
|
49
|
-
*/
|
|
50
|
-
server: net.Server;
|
|
51
|
-
/**
|
|
52
|
-
* @internal
|
|
53
|
-
*/
|
|
54
|
-
constructor(options: PluginManagerOptions);
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
_repository: PluginManagerRepository;
|
|
59
|
-
get repository(): PluginManagerRepository;
|
|
60
|
-
/**
|
|
61
|
-
* @internal
|
|
62
|
-
*/
|
|
63
|
-
static getPackageJson(packageName: string): Promise<any>;
|
|
64
|
-
/**
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
static getPackageName(name: string): Promise<string>;
|
|
68
|
-
/**
|
|
69
|
-
* @internal
|
|
70
|
-
*/
|
|
71
|
-
static getPluginPkgPrefix(): string[];
|
|
72
|
-
/**
|
|
73
|
-
* @internal
|
|
74
|
-
*/
|
|
75
|
-
static findPackage(name: string): Promise<string>;
|
|
76
|
-
/**
|
|
77
|
-
* @internal
|
|
78
|
-
*/
|
|
79
|
-
static clearCache(packageName: string): void;
|
|
80
|
-
/**
|
|
81
|
-
* @internal
|
|
82
|
-
*/
|
|
83
|
-
static resolvePlugin(pluginName: string | typeof Plugin, isUpgrade?: boolean, isPkg?: boolean): Promise<any>;
|
|
84
|
-
static parsedNames: {};
|
|
85
|
-
static parseName(nameOrPkg: string): Promise<any>;
|
|
86
|
-
addPreset(plugin: string | typeof Plugin, options?: any): void;
|
|
87
|
-
getPlugins(): Map<typeof Plugin, Plugin<any>>;
|
|
88
|
-
getAliases(): IterableIterator<string>;
|
|
89
|
-
get(name: string | typeof Plugin): Plugin<any>;
|
|
90
|
-
has(name: string | typeof Plugin): boolean;
|
|
91
|
-
del(name: string | typeof Plugin): void;
|
|
92
|
-
create(pluginName: string, options?: {
|
|
93
|
-
forceRecreate?: boolean;
|
|
94
|
-
}): Promise<void>;
|
|
95
|
-
add(plugin?: string | typeof Plugin, options?: any, insert?: boolean, isUpgrade?: boolean): Promise<void>;
|
|
96
|
-
/**
|
|
97
|
-
* @internal
|
|
98
|
-
*/
|
|
99
|
-
initPlugins(): Promise<void>;
|
|
100
|
-
/**
|
|
101
|
-
* @internal
|
|
102
|
-
*/
|
|
103
|
-
loadCommands(): Promise<void>;
|
|
104
|
-
load(options?: any): Promise<void>;
|
|
105
|
-
install(options?: InstallOptions): Promise<void>;
|
|
106
|
-
enable(nameOrPkg: string | string[]): Promise<void>;
|
|
107
|
-
disable(name: string | string[]): Promise<void>;
|
|
108
|
-
remove(name: string | string[], options?: {
|
|
109
|
-
removeDir?: boolean;
|
|
110
|
-
force?: boolean;
|
|
111
|
-
}): Promise<void>;
|
|
112
|
-
/**
|
|
113
|
-
* @internal
|
|
114
|
-
*/
|
|
115
|
-
addViaCLI(urlOrName: string | string[], options?: PluginData, emitStartedEvent?: boolean): Promise<void>;
|
|
116
|
-
/**
|
|
117
|
-
* @internal
|
|
118
|
-
*/
|
|
119
|
-
addByNpm(options: {
|
|
120
|
-
packageName: string;
|
|
121
|
-
name?: string;
|
|
122
|
-
registry: string;
|
|
123
|
-
authToken?: string;
|
|
124
|
-
}, throwError?: boolean): Promise<void>;
|
|
125
|
-
/**
|
|
126
|
-
* @internal
|
|
127
|
-
*/
|
|
128
|
-
addByFile(options: {
|
|
129
|
-
file: string;
|
|
130
|
-
registry?: string;
|
|
131
|
-
authToken?: string;
|
|
132
|
-
type?: string;
|
|
133
|
-
name?: string;
|
|
134
|
-
}, throwError?: boolean): Promise<void>;
|
|
135
|
-
/**
|
|
136
|
-
* @internal
|
|
137
|
-
*/
|
|
138
|
-
addByCompressedFileUrl(options: {
|
|
139
|
-
compressedFileUrl: string;
|
|
140
|
-
registry?: string;
|
|
141
|
-
authToken?: string;
|
|
142
|
-
type?: string;
|
|
143
|
-
name?: string;
|
|
144
|
-
}, throwError?: boolean): Promise<void>;
|
|
145
|
-
update(nameOrPkg: string | string[], options: PluginData, emitStartedEvent?: boolean): Promise<void>;
|
|
146
|
-
/**
|
|
147
|
-
* @internal
|
|
148
|
-
*/
|
|
149
|
-
upgradeByNpm(values: PluginData): Promise<void>;
|
|
150
|
-
/**
|
|
151
|
-
* @internal
|
|
152
|
-
*/
|
|
153
|
-
upgradeByCompressedFileUrl(options: PluginData): Promise<void>;
|
|
154
|
-
/**
|
|
155
|
-
* @internal
|
|
156
|
-
*/
|
|
157
|
-
getNameByPackageName(packageName: string): string;
|
|
158
|
-
list(options?: any): Promise<any[]>;
|
|
159
|
-
/**
|
|
160
|
-
* @internal
|
|
161
|
-
*/
|
|
162
|
-
getNpmVersionList(name: string): Promise<string[]>;
|
|
163
|
-
/**
|
|
164
|
-
* @internal
|
|
165
|
-
*/
|
|
166
|
-
loadPresetMigrations(): Promise<{
|
|
167
|
-
beforeLoad: {
|
|
168
|
-
up: () => Promise<void>;
|
|
169
|
-
};
|
|
170
|
-
afterSync: {
|
|
171
|
-
up: () => Promise<void>;
|
|
172
|
-
};
|
|
173
|
-
afterLoad: {
|
|
174
|
-
up: () => Promise<void>;
|
|
175
|
-
};
|
|
176
|
-
}>;
|
|
177
|
-
/**
|
|
178
|
-
* @internal
|
|
179
|
-
*/
|
|
180
|
-
loadOtherMigrations(): Promise<{
|
|
181
|
-
beforeLoad: {
|
|
182
|
-
up: () => Promise<void>;
|
|
183
|
-
};
|
|
184
|
-
afterSync: {
|
|
185
|
-
up: () => Promise<void>;
|
|
186
|
-
};
|
|
187
|
-
afterLoad: {
|
|
188
|
-
up: () => Promise<void>;
|
|
189
|
-
};
|
|
190
|
-
}>;
|
|
191
|
-
/**
|
|
192
|
-
* @internal
|
|
193
|
-
*/
|
|
194
|
-
loadPresetPlugins(): Promise<void>;
|
|
195
|
-
upgrade(): Promise<void>;
|
|
196
|
-
/**
|
|
197
|
-
* @internal
|
|
198
|
-
*/
|
|
199
|
-
initOtherPlugins(): Promise<void>;
|
|
200
|
-
/**
|
|
201
|
-
* @internal
|
|
202
|
-
*/
|
|
203
|
-
initPresetPlugins(): Promise<void>;
|
|
204
|
-
private sort;
|
|
205
|
-
}
|
|
206
|
-
export default PluginManager;
|