@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.
Files changed (124) hide show
  1. package/package.json +14 -14
  2. package/lib/acl/available-action.d.ts +0 -13
  3. package/lib/acl/available-action.js +0 -71
  4. package/lib/acl/index.d.ts +0 -10
  5. package/lib/acl/index.js +0 -46
  6. package/lib/app-command.d.ts +0 -20
  7. package/lib/app-command.js +0 -82
  8. package/lib/app-supervisor.d.ts +0 -69
  9. package/lib/app-supervisor.js +0 -302
  10. package/lib/application.d.ts +0 -345
  11. package/lib/application.js +0 -876
  12. package/lib/cache/index.d.ts +0 -11
  13. package/lib/cache/index.js +0 -44
  14. package/lib/commands/console.d.ts +0 -11
  15. package/lib/commands/console.js +0 -48
  16. package/lib/commands/create-migration.d.ts +0 -11
  17. package/lib/commands/create-migration.js +0 -79
  18. package/lib/commands/db-auth.d.ts +0 -11
  19. package/lib/commands/db-auth.js +0 -38
  20. package/lib/commands/db-clean.d.ts +0 -11
  21. package/lib/commands/db-clean.js +0 -41
  22. package/lib/commands/db-sync.d.ts +0 -11
  23. package/lib/commands/db-sync.js +0 -50
  24. package/lib/commands/destroy.d.ts +0 -11
  25. package/lib/commands/destroy.js +0 -40
  26. package/lib/commands/index.d.ts +0 -10
  27. package/lib/commands/index.js +0 -82
  28. package/lib/commands/install.d.ts +0 -11
  29. package/lib/commands/install.js +0 -43
  30. package/lib/commands/migrator.d.ts +0 -11
  31. package/lib/commands/migrator.js +0 -41
  32. package/lib/commands/pm.d.ts +0 -11
  33. package/lib/commands/pm.js +0 -98
  34. package/lib/commands/refresh.d.ts +0 -11
  35. package/lib/commands/refresh.js +0 -41
  36. package/lib/commands/restart.d.ts +0 -11
  37. package/lib/commands/restart.js +0 -45
  38. package/lib/commands/start.d.ts +0 -11
  39. package/lib/commands/start.js +0 -85
  40. package/lib/commands/stop.d.ts +0 -11
  41. package/lib/commands/stop.js +0 -44
  42. package/lib/commands/upgrade.d.ts +0 -14
  43. package/lib/commands/upgrade.js +0 -39
  44. package/lib/cron/cron-job-manager.d.ts +0 -22
  45. package/lib/cron/cron-job-manager.js +0 -82
  46. package/lib/errors/application-not-install.d.ts +0 -12
  47. package/lib/errors/application-not-install.js +0 -45
  48. package/lib/errors/handler.d.ts +0 -11
  49. package/lib/errors/handler.js +0 -50
  50. package/lib/errors/plugin-command-error.d.ts +0 -10
  51. package/lib/errors/plugin-command-error.js +0 -40
  52. package/lib/errors/plugin-not-exist.d.ts +0 -10
  53. package/lib/errors/plugin-not-exist.js +0 -40
  54. package/lib/gateway/errors.d.ts +0 -30
  55. package/lib/gateway/errors.js +0 -154
  56. package/lib/gateway/index.d.ts +0 -79
  57. package/lib/gateway/index.js +0 -393
  58. package/lib/gateway/ipc-socket-client.d.ts +0 -27
  59. package/lib/gateway/ipc-socket-client.js +0 -110
  60. package/lib/gateway/ipc-socket-server.d.ts +0 -21
  61. package/lib/gateway/ipc-socket-server.js +0 -150
  62. package/lib/gateway/ws-server.d.ts +0 -36
  63. package/lib/gateway/ws-server.js +0 -196
  64. package/lib/helper.d.ts +0 -18
  65. package/lib/helper.js +0 -193
  66. package/lib/helpers/application-version.d.ts +0 -18
  67. package/lib/helpers/application-version.js +0 -88
  68. package/lib/index.d.ts +0 -17
  69. package/lib/index.js +0 -64
  70. package/lib/locale/index.d.ts +0 -9
  71. package/lib/locale/index.js +0 -30
  72. package/lib/locale/locale.d.ts +0 -38
  73. package/lib/locale/locale.js +0 -174
  74. package/lib/locale/resource.d.ts +0 -9
  75. package/lib/locale/resource.js +0 -87
  76. package/lib/main-data-source.d.ts +0 -12
  77. package/lib/main-data-source.js +0 -57
  78. package/lib/middlewares/data-template.d.ts +0 -10
  79. package/lib/middlewares/data-template.js +0 -146
  80. package/lib/middlewares/data-wrapping.d.ts +0 -11
  81. package/lib/middlewares/data-wrapping.js +0 -100
  82. package/lib/middlewares/i18n.d.ts +0 -9
  83. package/lib/middlewares/i18n.js +0 -53
  84. package/lib/middlewares/index.d.ts +0 -10
  85. package/lib/middlewares/index.js +0 -39
  86. package/lib/middlewares/parse-variables.d.ts +0 -9
  87. package/lib/middlewares/parse-variables.js +0 -95
  88. package/lib/middlewares/validate-filter-params.d.ts +0 -9
  89. package/lib/middlewares/validate-filter-params.js +0 -42
  90. package/lib/migration.d.ts +0 -20
  91. package/lib/migration.js +0 -54
  92. package/lib/migrations/20230912193824-package-name-unique.d.ts +0 -14
  93. package/lib/migrations/20230912193824-package-name-unique.js +0 -59
  94. package/lib/migrations/20230912294620-update-pkg.d.ts +0 -14
  95. package/lib/migrations/20230912294620-update-pkg.js +0 -65
  96. package/lib/migrations/20240106082756-update-plugins.d.ts +0 -14
  97. package/lib/migrations/20240106082756-update-plugins.js +0 -51
  98. package/lib/migrations/20240428235620-rename-plugins.d.ts +0 -14
  99. package/lib/migrations/20240428235620-rename-plugins.js +0 -49
  100. package/lib/plugin-manager/clientStaticUtils.d.ts +0 -31
  101. package/lib/plugin-manager/clientStaticUtils.js +0 -129
  102. package/lib/plugin-manager/constants.d.ts +0 -15
  103. package/lib/plugin-manager/constants.js +0 -135
  104. package/lib/plugin-manager/deps.d.ts +0 -10
  105. package/lib/plugin-manager/deps.js +0 -83
  106. package/lib/plugin-manager/index.d.ts +0 -10
  107. package/lib/plugin-manager/index.js +0 -32
  108. package/lib/plugin-manager/middleware.d.ts +0 -10
  109. package/lib/plugin-manager/middleware.js +0 -45
  110. package/lib/plugin-manager/options/collection.d.ts +0 -10
  111. package/lib/plugin-manager/options/collection.js +0 -47
  112. package/lib/plugin-manager/options/resource.d.ts +0 -23
  113. package/lib/plugin-manager/options/resource.js +0 -186
  114. package/lib/plugin-manager/plugin-manager-repository.d.ts +0 -36
  115. package/lib/plugin-manager/plugin-manager-repository.js +0 -158
  116. package/lib/plugin-manager/plugin-manager.d.ts +0 -206
  117. package/lib/plugin-manager/plugin-manager.js +0 -1100
  118. package/lib/plugin-manager/types.d.ts +0 -23
  119. package/lib/plugin-manager/types.js +0 -24
  120. package/lib/plugin-manager/utils.d.ts +0 -115
  121. package/lib/plugin-manager/utils.js +0 -568
  122. package/lib/plugin.d.ts +0 -99
  123. package/lib/plugin.js +0 -228
  124. 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;