plugin-cluster-manager 1.1.11 → 1.1.15
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/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/dist/client/index.js +1 -1
- package/dist/client-v2/914.c0bce51908fd81d7.js +10 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/externalVersion.js +6 -5
- package/dist/locale/en-US.json +138 -124
- package/dist/locale/vi-VN.json +139 -125
- package/dist/locale/zh-CN.json +140 -125
- package/dist/server/actions/cluster-nodes.js +2 -6
- package/dist/server/actions/doctor.js +1 -5
- package/dist/server/actions/orchestrator.js +37 -0
- package/dist/server/actions/queue-mappings.js +107 -0
- package/dist/server/collections/worker-queue-mappings.js +106 -0
- package/dist/server/orchestrator/PackageManager.js +1 -8
- package/dist/server/orchestrator/docker-adapter.js +49 -27
- package/dist/server/plugin.js +10 -8
- package/dist/server/queue-scanner.js +141 -0
- package/dist/server/utils/node.js +30 -2
- package/package.json +46 -42
- package/src/client/AclCacheManager.tsx +292 -287
- package/src/client/CacheMonitor.tsx +2 -2
- package/src/client/ClusterManagerLayout.tsx +6 -0
- package/src/client/ClusterNodes.tsx +11 -4
- package/src/client/ContainerOrchestrator.tsx +186 -104
- package/src/client/Doctor.tsx +2 -2
- package/src/client/EventQueueMonitor.tsx +2 -2
- package/src/client/LockMonitor.tsx +2 -2
- package/src/client/NginxCacheManager.tsx +2 -2
- package/src/client/PackageInstaller.tsx +2 -2
- package/src/client/PluginOperations.tsx +2 -2
- package/src/client/QueueAssignment.tsx +355 -0
- package/src/client/RedisMonitor.tsx +3 -3
- package/src/client/TaskManager.tsx +194 -187
- package/src/client/WorkflowExecutions.tsx +243 -238
- package/src/client/utils.ts +1 -1
- package/src/client-v2/plugin.tsx +24 -0
- package/src/locale/en-US.json +138 -124
- package/src/locale/vi-VN.json +139 -125
- package/src/locale/zh-CN.json +140 -125
- package/src/server/actions/cluster-nodes.ts +4 -7
- package/src/server/actions/doctor.ts +11 -9
- package/src/server/actions/orchestrator.ts +54 -2
- package/src/server/actions/queue-mappings.ts +94 -0
- package/src/server/adapters/redis-node-registry.ts +126 -131
- package/src/server/collections/worker-queue-mappings.ts +85 -0
- package/src/server/orchestrator/PackageManager.ts +2 -10
- package/src/server/orchestrator/docker-adapter.ts +74 -37
- package/src/server/plugin.ts +15 -12
- package/src/server/queue-scanner.ts +154 -0
- package/src/server/utils/node.ts +48 -0
- package/dist/client/AclCacheManager.d.ts +0 -2
- package/dist/client/CacheMonitor.d.ts +0 -2
- package/dist/client/ClusterManagerLayout.d.ts +0 -2
- package/dist/client/ClusterNodes.d.ts +0 -2
- package/dist/client/ContainerOrchestrator.d.ts +0 -2
- package/dist/client/Doctor.d.ts +0 -2
- package/dist/client/EventQueueMonitor.d.ts +0 -2
- package/dist/client/LockMonitor.d.ts +0 -2
- package/dist/client/NginxCacheManager.d.ts +0 -2
- package/dist/client/PackageInstaller.d.ts +0 -2
- package/dist/client/PluginOperations.d.ts +0 -2
- package/dist/client/RedisMonitor.d.ts +0 -2
- package/dist/client/TaskManager.d.ts +0 -2
- package/dist/client/WorkflowExecutions.d.ts +0 -2
- package/dist/client/index.d.ts +0 -5
- package/dist/client/utils/clientSafeCache.d.ts +0 -3
- package/dist/client/utils/requestDedupInterceptor.d.ts +0 -2
- package/dist/client/utils.d.ts +0 -12
- package/dist/index.d.ts +0 -2
- package/dist/server/actions/acl-cache.d.ts +0 -53
- package/dist/server/actions/cache-monitor.d.ts +0 -33
- package/dist/server/actions/cluster-nodes.d.ts +0 -64
- package/dist/server/actions/doctor.d.ts +0 -82
- package/dist/server/actions/event-queue-monitor.d.ts +0 -13
- package/dist/server/actions/lock-monitor.d.ts +0 -19
- package/dist/server/actions/orchestrator.d.ts +0 -58
- package/dist/server/actions/package-manager.d.ts +0 -6
- package/dist/server/actions/plugin-operations.d.ts +0 -6
- package/dist/server/actions/redis-monitor.d.ts +0 -12
- package/dist/server/actions/tasks.d.ts +0 -7
- package/dist/server/actions/workflow-executions.d.ts +0 -7
- package/dist/server/adapters/redis-lock-adapter.d.ts +0 -15
- package/dist/server/adapters/redis-node-registry.d.ts +0 -12
- package/dist/server/adapters/redis-pubsub-adapter.d.ts +0 -16
- package/dist/server/collections/app.d.ts +0 -8
- package/dist/server/collections/cluster-manager-acl-cache.d.ts +0 -22
- package/dist/server/collections/cluster-manager-cache-mgr.d.ts +0 -22
- package/dist/server/collections/cluster-manager-cluster.d.ts +0 -22
- package/dist/server/collections/cluster-manager-doctor-runs.d.ts +0 -3
- package/dist/server/collections/cluster-manager-doctor.d.ts +0 -18
- package/dist/server/collections/cluster-manager-lock.d.ts +0 -22
- package/dist/server/collections/cluster-manager-plugins.d.ts +0 -18
- package/dist/server/collections/cluster-manager-queue.d.ts +0 -22
- package/dist/server/collections/cluster-manager-redis.d.ts +0 -22
- package/dist/server/collections/cluster-manager-workflow.d.ts +0 -22
- package/dist/server/collections/cluster-manager.d.ts +0 -22
- package/dist/server/collections/orchestrator-settings.d.ts +0 -59
- package/dist/server/collections/orchestrator-stacks.d.ts +0 -102
- package/dist/server/collections/worker-orchestrator.d.ts +0 -22
- package/dist/server/collections/worker-packages-configs.d.ts +0 -3
- package/dist/server/collections/worker-packages.d.ts +0 -22
- package/dist/server/hooks/cacheInvalidationHooks.d.ts +0 -1
- package/dist/server/middlewares/listMetaCacheMiddleware.d.ts +0 -2
- package/dist/server/orchestrator/PackageManager.d.ts +0 -39
- package/dist/server/orchestrator/docker-adapter.d.ts +0 -41
- package/dist/server/orchestrator/index.d.ts +0 -4
- package/dist/server/orchestrator/k8s-adapter.d.ts +0 -50
- package/dist/server/orchestrator/leader-election.d.ts +0 -48
- package/dist/server/orchestrator/types.d.ts +0 -84
- package/dist/server/plugin.d.ts +0 -26
- package/dist/server/utils/node.d.ts +0 -6
- package/dist/server/utils/redis.d.ts +0 -29
- package/dist/server/utils/versionManager.d.ts +0 -10
- package/dist/shared/packages.d.ts +0 -23
- /package/{dist/server/index.d.ts → src/client-v2/index.tsx} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Context } from '@nocobase/actions';
|
|
2
|
-
export declare const workflowActions: {
|
|
3
|
-
list(ctx: Context, next: () => Promise<void>): Promise<void>;
|
|
4
|
-
getJobs(ctx: Context, next: () => Promise<void>): Promise<void>;
|
|
5
|
-
cancel(ctx: Context, next: () => Promise<void>): Promise<void>;
|
|
6
|
-
purge(ctx: Context, next: () => Promise<void>): Promise<void>;
|
|
7
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ILockAdapter, ILock, Releaser } from '@nocobase/lock-manager';
|
|
2
|
-
import { Application } from '@nocobase/server';
|
|
3
|
-
export declare class RedisLockAdapter implements ILockAdapter {
|
|
4
|
-
private options;
|
|
5
|
-
private client;
|
|
6
|
-
constructor(options: {
|
|
7
|
-
url?: string;
|
|
8
|
-
app: Application;
|
|
9
|
-
});
|
|
10
|
-
connect(): Promise<void>;
|
|
11
|
-
close(): Promise<void>;
|
|
12
|
-
acquire(key: string, ttl: number): Promise<Releaser>;
|
|
13
|
-
runExclusive<T>(key: string, fn: () => Promise<T>, ttl: number): Promise<T>;
|
|
14
|
-
tryAcquire(key: string, timeout?: number): Promise<ILock>;
|
|
15
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare class RedisNodeRegistry {
|
|
2
|
-
private app;
|
|
3
|
-
private timer;
|
|
4
|
-
private readonly ttlSecs;
|
|
5
|
-
private readonly intervalMs;
|
|
6
|
-
private readonly keyPrefix;
|
|
7
|
-
constructor(app: any);
|
|
8
|
-
start(): void;
|
|
9
|
-
stop(): void;
|
|
10
|
-
private heartbeat;
|
|
11
|
-
getNodes(): Promise<any[]>;
|
|
12
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IPubSubAdapter, PubSubCallback } from '@nocobase/server';
|
|
2
|
-
export declare class RedisPubSubAdapter implements IPubSubAdapter {
|
|
3
|
-
private url;
|
|
4
|
-
private logger?;
|
|
5
|
-
private publisher;
|
|
6
|
-
private subscriber;
|
|
7
|
-
private connected;
|
|
8
|
-
private subscriptions;
|
|
9
|
-
constructor(url: string, logger?: any);
|
|
10
|
-
isConnected(): boolean;
|
|
11
|
-
connect(): Promise<void>;
|
|
12
|
-
close(): Promise<void>;
|
|
13
|
-
subscribe(channel: string, callback: PubSubCallback): Promise<void>;
|
|
14
|
-
unsubscribe(channel: string, callback: PubSubCallback): Promise<void>;
|
|
15
|
-
publish(channel: string, message: string): Promise<void>;
|
|
16
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DUMMY COLLECTION
|
|
3
|
-
* This collection is created to prevent NocoBase workflow/ACL from throwing the error:
|
|
4
|
-
* '[Workflow pre-action]: collection "clusterManagerAclCache" not found'
|
|
5
|
-
*
|
|
6
|
-
* Since 'clusterManagerAclCache' is registered as a resourcer in plugin.ts, NocoBase
|
|
7
|
-
* implicitly looks for a collection with the same name.
|
|
8
|
-
* We set dumpRules: 'skip' and avoid timestamps to ensure this collection
|
|
9
|
-
* is completely ignored during backups/migrations and doesn't pollute the actual DB.
|
|
10
|
-
*/
|
|
11
|
-
declare const _default: {
|
|
12
|
-
name: string;
|
|
13
|
-
dumpRules: string;
|
|
14
|
-
autoGenId: boolean;
|
|
15
|
-
createdAt: boolean;
|
|
16
|
-
updatedAt: boolean;
|
|
17
|
-
fields: {
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DUMMY COLLECTION
|
|
3
|
-
* This collection is created to prevent NocoBase workflow/ACL from throwing the error:
|
|
4
|
-
* '[Workflow pre-action]: collection "clusterManagerCacheMgr" not found'
|
|
5
|
-
*
|
|
6
|
-
* Since 'clusterManagerCacheMgr' is registered as a resourcer in plugin.ts, NocoBase
|
|
7
|
-
* implicitly looks for a collection with the same name.
|
|
8
|
-
* We set dumpRules: 'skip' and avoid timestamps to ensure this collection
|
|
9
|
-
* is completely ignored during backups/migrations and doesn't pollute the actual DB.
|
|
10
|
-
*/
|
|
11
|
-
declare const _default: {
|
|
12
|
-
name: string;
|
|
13
|
-
dumpRules: string;
|
|
14
|
-
autoGenId: boolean;
|
|
15
|
-
createdAt: boolean;
|
|
16
|
-
updatedAt: boolean;
|
|
17
|
-
fields: {
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DUMMY COLLECTION
|
|
3
|
-
* This collection is created to prevent NocoBase workflow/ACL from throwing the error:
|
|
4
|
-
* '[Workflow pre-action]: collection "clusterManagerCluster" not found'
|
|
5
|
-
*
|
|
6
|
-
* Since 'clusterManagerCluster' is registered as a resourcer in plugin.ts, NocoBase
|
|
7
|
-
* implicitly looks for a collection with the same name.
|
|
8
|
-
* We set dumpRules: 'skip' and avoid timestamps to ensure this collection
|
|
9
|
-
* is completely ignored during backups/migrations and doesn't pollute the actual DB.
|
|
10
|
-
*/
|
|
11
|
-
declare const _default: {
|
|
12
|
-
name: string;
|
|
13
|
-
dumpRules: string;
|
|
14
|
-
autoGenId: boolean;
|
|
15
|
-
createdAt: boolean;
|
|
16
|
-
updatedAt: boolean;
|
|
17
|
-
fields: {
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DUMMY COLLECTION
|
|
3
|
-
* Keeps the `clusterManagerDoctor` resourcer compatible with NocoBase
|
|
4
|
-
* workflow/ACL collection lookups. Diagnostic run data lives in
|
|
5
|
-
* `clusterManagerDoctorRuns`.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
name: string;
|
|
9
|
-
dumpRules: string;
|
|
10
|
-
autoGenId: boolean;
|
|
11
|
-
createdAt: boolean;
|
|
12
|
-
updatedAt: boolean;
|
|
13
|
-
fields: {
|
|
14
|
-
name: string;
|
|
15
|
-
type: string;
|
|
16
|
-
}[];
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DUMMY COLLECTION
|
|
3
|
-
* This collection is created to prevent NocoBase workflow/ACL from throwing the error:
|
|
4
|
-
* '[Workflow pre-action]: collection "clusterManagerLock" not found'
|
|
5
|
-
*
|
|
6
|
-
* Since 'clusterManagerLock' is registered as a resourcer in plugin.ts, NocoBase
|
|
7
|
-
* implicitly looks for a collection with the same name.
|
|
8
|
-
* We set dumpRules: 'skip' and avoid timestamps to ensure this collection
|
|
9
|
-
* is completely ignored during backups/migrations and doesn't pollute the actual DB.
|
|
10
|
-
*/
|
|
11
|
-
declare const _default: {
|
|
12
|
-
name: string;
|
|
13
|
-
dumpRules: string;
|
|
14
|
-
autoGenId: boolean;
|
|
15
|
-
createdAt: boolean;
|
|
16
|
-
updatedAt: boolean;
|
|
17
|
-
fields: {
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DUMMY COLLECTION
|
|
3
|
-
* Keeps the `clusterManagerPlugins` resourcer compatible with NocoBase
|
|
4
|
-
* workflow/ACL collection lookups. The actual plugin records live in
|
|
5
|
-
* the core `applicationPlugins` collection.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
name: string;
|
|
9
|
-
dumpRules: string;
|
|
10
|
-
autoGenId: boolean;
|
|
11
|
-
createdAt: boolean;
|
|
12
|
-
updatedAt: boolean;
|
|
13
|
-
fields: {
|
|
14
|
-
name: string;
|
|
15
|
-
type: string;
|
|
16
|
-
}[];
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DUMMY COLLECTION
|
|
3
|
-
* This collection is created to prevent NocoBase workflow/ACL from throwing the error:
|
|
4
|
-
* '[Workflow pre-action]: collection "clusterManagerQueue" not found'
|
|
5
|
-
*
|
|
6
|
-
* Since 'clusterManagerQueue' is registered as a resourcer in plugin.ts, NocoBase
|
|
7
|
-
* implicitly looks for a collection with the same name.
|
|
8
|
-
* We set dumpRules: 'skip' and avoid timestamps to ensure this collection
|
|
9
|
-
* is completely ignored during backups/migrations and doesn't pollute the actual DB.
|
|
10
|
-
*/
|
|
11
|
-
declare const _default: {
|
|
12
|
-
name: string;
|
|
13
|
-
dumpRules: string;
|
|
14
|
-
autoGenId: boolean;
|
|
15
|
-
createdAt: boolean;
|
|
16
|
-
updatedAt: boolean;
|
|
17
|
-
fields: {
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DUMMY COLLECTION
|
|
3
|
-
* This collection is created to prevent NocoBase workflow/ACL from throwing the error:
|
|
4
|
-
* '[Workflow pre-action]: collection "clusterManagerRedis" not found'
|
|
5
|
-
*
|
|
6
|
-
* Since 'clusterManagerRedis' is registered as a resourcer in plugin.ts, NocoBase
|
|
7
|
-
* implicitly looks for a collection with the same name.
|
|
8
|
-
* We set dumpRules: 'skip' and avoid timestamps to ensure this collection
|
|
9
|
-
* is completely ignored during backups/migrations and doesn't pollute the actual DB.
|
|
10
|
-
*/
|
|
11
|
-
declare const _default: {
|
|
12
|
-
name: string;
|
|
13
|
-
dumpRules: string;
|
|
14
|
-
autoGenId: boolean;
|
|
15
|
-
createdAt: boolean;
|
|
16
|
-
updatedAt: boolean;
|
|
17
|
-
fields: {
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DUMMY COLLECTION
|
|
3
|
-
* This collection is created to prevent NocoBase workflow/ACL from throwing the error:
|
|
4
|
-
* '[Workflow pre-action]: collection "clusterManagerWorkflow" not found'
|
|
5
|
-
*
|
|
6
|
-
* Since 'clusterManagerWorkflow' is registered as a resourcer in plugin.ts, NocoBase
|
|
7
|
-
* implicitly looks for a collection with the same name.
|
|
8
|
-
* We set dumpRules: 'skip' and avoid timestamps to ensure this collection
|
|
9
|
-
* is completely ignored during backups/migrations and doesn't pollute the actual DB.
|
|
10
|
-
*/
|
|
11
|
-
declare const _default: {
|
|
12
|
-
name: string;
|
|
13
|
-
dumpRules: string;
|
|
14
|
-
autoGenId: boolean;
|
|
15
|
-
createdAt: boolean;
|
|
16
|
-
updatedAt: boolean;
|
|
17
|
-
fields: {
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DUMMY COLLECTION
|
|
3
|
-
* This collection is created to prevent NocoBase workflow/ACL from throwing the error:
|
|
4
|
-
* '[Workflow pre-action]: collection "clusterManager" not found'
|
|
5
|
-
*
|
|
6
|
-
* Since 'clusterManager' is registered as a resourcer in plugin.ts, NocoBase
|
|
7
|
-
* implicitly looks for a collection with the same name.
|
|
8
|
-
* We set dumpRules: 'skip' and avoid timestamps to ensure this collection
|
|
9
|
-
* is completely ignored during backups/migrations and doesn't pollute the actual DB.
|
|
10
|
-
*/
|
|
11
|
-
declare const _default: {
|
|
12
|
-
name: string;
|
|
13
|
-
dumpRules: string;
|
|
14
|
-
autoGenId: boolean;
|
|
15
|
-
createdAt: boolean;
|
|
16
|
-
updatedAt: boolean;
|
|
17
|
-
fields: {
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plugin settings stored in DB — configurable via NocoBase admin UI.
|
|
3
|
-
* Replaces env-var-only configuration for orchestrator adapter selection.
|
|
4
|
-
*/
|
|
5
|
-
declare const _default: {
|
|
6
|
-
name: string;
|
|
7
|
-
autoGenId: boolean;
|
|
8
|
-
createdAt: boolean;
|
|
9
|
-
updatedAt: boolean;
|
|
10
|
-
fields: ({
|
|
11
|
-
name: string;
|
|
12
|
-
type: string;
|
|
13
|
-
defaultValue: string;
|
|
14
|
-
interface: string;
|
|
15
|
-
uiSchema: {
|
|
16
|
-
title: string;
|
|
17
|
-
'x-component': string;
|
|
18
|
-
enum: {
|
|
19
|
-
value: string;
|
|
20
|
-
label: string;
|
|
21
|
-
}[];
|
|
22
|
-
description?: undefined;
|
|
23
|
-
};
|
|
24
|
-
} | {
|
|
25
|
-
name: string;
|
|
26
|
-
type: string;
|
|
27
|
-
defaultValue: string;
|
|
28
|
-
interface: string;
|
|
29
|
-
uiSchema: {
|
|
30
|
-
title: string;
|
|
31
|
-
'x-component': string;
|
|
32
|
-
enum?: undefined;
|
|
33
|
-
description?: undefined;
|
|
34
|
-
};
|
|
35
|
-
} | {
|
|
36
|
-
name: string;
|
|
37
|
-
type: string;
|
|
38
|
-
interface: string;
|
|
39
|
-
uiSchema: {
|
|
40
|
-
title: string;
|
|
41
|
-
description: string;
|
|
42
|
-
'x-component': string;
|
|
43
|
-
enum?: undefined;
|
|
44
|
-
};
|
|
45
|
-
defaultValue?: undefined;
|
|
46
|
-
} | {
|
|
47
|
-
name: string;
|
|
48
|
-
type: string;
|
|
49
|
-
defaultValue: string;
|
|
50
|
-
interface: string;
|
|
51
|
-
uiSchema: {
|
|
52
|
-
title: string;
|
|
53
|
-
description: string;
|
|
54
|
-
'x-component': string;
|
|
55
|
-
enum?: undefined;
|
|
56
|
-
};
|
|
57
|
-
})[];
|
|
58
|
-
};
|
|
59
|
-
export default _default;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
name: string;
|
|
3
|
-
autoGenId: boolean;
|
|
4
|
-
createdAt: boolean;
|
|
5
|
-
updatedAt: boolean;
|
|
6
|
-
fields: ({
|
|
7
|
-
name: string;
|
|
8
|
-
type: string;
|
|
9
|
-
unique: boolean;
|
|
10
|
-
interface: string;
|
|
11
|
-
uiSchema: {
|
|
12
|
-
title: string;
|
|
13
|
-
'x-component': string;
|
|
14
|
-
enum?: undefined;
|
|
15
|
-
};
|
|
16
|
-
defaultValue?: undefined;
|
|
17
|
-
} | {
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
defaultValue: string;
|
|
21
|
-
interface: string;
|
|
22
|
-
uiSchema: {
|
|
23
|
-
title: string;
|
|
24
|
-
'x-component': string;
|
|
25
|
-
enum: {
|
|
26
|
-
value: string;
|
|
27
|
-
label: string;
|
|
28
|
-
}[];
|
|
29
|
-
};
|
|
30
|
-
unique?: undefined;
|
|
31
|
-
} | {
|
|
32
|
-
name: string;
|
|
33
|
-
type: string;
|
|
34
|
-
interface: string;
|
|
35
|
-
uiSchema: {
|
|
36
|
-
title: string;
|
|
37
|
-
'x-component': string;
|
|
38
|
-
enum?: undefined;
|
|
39
|
-
};
|
|
40
|
-
unique?: undefined;
|
|
41
|
-
defaultValue?: undefined;
|
|
42
|
-
} | {
|
|
43
|
-
name: string;
|
|
44
|
-
type: string;
|
|
45
|
-
defaultValue: {};
|
|
46
|
-
interface: string;
|
|
47
|
-
uiSchema: {
|
|
48
|
-
title: string;
|
|
49
|
-
'x-component'?: undefined;
|
|
50
|
-
enum?: undefined;
|
|
51
|
-
};
|
|
52
|
-
unique?: undefined;
|
|
53
|
-
} | {
|
|
54
|
-
name: string;
|
|
55
|
-
type: string;
|
|
56
|
-
defaultValue: any[];
|
|
57
|
-
interface: string;
|
|
58
|
-
uiSchema: {
|
|
59
|
-
title: string;
|
|
60
|
-
'x-component'?: undefined;
|
|
61
|
-
enum?: undefined;
|
|
62
|
-
};
|
|
63
|
-
unique?: undefined;
|
|
64
|
-
} | {
|
|
65
|
-
name: string;
|
|
66
|
-
type: string;
|
|
67
|
-
defaultValue: number;
|
|
68
|
-
interface: string;
|
|
69
|
-
uiSchema: {
|
|
70
|
-
title: string;
|
|
71
|
-
'x-component'?: undefined;
|
|
72
|
-
enum?: undefined;
|
|
73
|
-
};
|
|
74
|
-
unique?: undefined;
|
|
75
|
-
} | {
|
|
76
|
-
name: string;
|
|
77
|
-
type: string;
|
|
78
|
-
defaultValue: boolean;
|
|
79
|
-
interface: string;
|
|
80
|
-
uiSchema: {
|
|
81
|
-
title: string;
|
|
82
|
-
'x-component'?: undefined;
|
|
83
|
-
enum?: undefined;
|
|
84
|
-
};
|
|
85
|
-
unique?: undefined;
|
|
86
|
-
} | {
|
|
87
|
-
name: string;
|
|
88
|
-
type: string;
|
|
89
|
-
defaultValue: string;
|
|
90
|
-
unique?: undefined;
|
|
91
|
-
interface?: undefined;
|
|
92
|
-
uiSchema?: undefined;
|
|
93
|
-
} | {
|
|
94
|
-
name: string;
|
|
95
|
-
type: string;
|
|
96
|
-
unique?: undefined;
|
|
97
|
-
interface?: undefined;
|
|
98
|
-
uiSchema?: undefined;
|
|
99
|
-
defaultValue?: undefined;
|
|
100
|
-
})[];
|
|
101
|
-
};
|
|
102
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DUMMY COLLECTION
|
|
3
|
-
* This collection is created to prevent NocoBase workflow/ACL from throwing the error:
|
|
4
|
-
* '[Workflow pre-action]: collection "workerOrchestrator" not found'
|
|
5
|
-
*
|
|
6
|
-
* Since 'workerOrchestrator' is registered as a resourcer in plugin.ts, NocoBase
|
|
7
|
-
* implicitly looks for a collection with the same name.
|
|
8
|
-
* We set dumpRules: 'skip' and avoid timestamps to ensure this collection
|
|
9
|
-
* is completely ignored during backups/migrations and doesn't pollute the actual DB.
|
|
10
|
-
*/
|
|
11
|
-
declare const _default: {
|
|
12
|
-
name: string;
|
|
13
|
-
dumpRules: string;
|
|
14
|
-
autoGenId: boolean;
|
|
15
|
-
createdAt: boolean;
|
|
16
|
-
updatedAt: boolean;
|
|
17
|
-
fields: {
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DUMMY COLLECTION
|
|
3
|
-
* This collection is created to prevent NocoBase workflow/ACL from throwing the error:
|
|
4
|
-
* '[Workflow pre-action]: collection "workerPackages" not found'
|
|
5
|
-
*
|
|
6
|
-
* Since 'workerPackages' is registered as a resourcer in plugin.ts, NocoBase
|
|
7
|
-
* implicitly looks for a collection with the same name.
|
|
8
|
-
* We set dumpRules: 'skip' and avoid timestamps to ensure this collection
|
|
9
|
-
* is completely ignored during backups/migrations and doesn't pollute the actual DB.
|
|
10
|
-
*/
|
|
11
|
-
declare const _default: {
|
|
12
|
-
name: string;
|
|
13
|
-
dumpRules: string;
|
|
14
|
-
autoGenId: boolean;
|
|
15
|
-
createdAt: boolean;
|
|
16
|
-
updatedAt: boolean;
|
|
17
|
-
fields: {
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function registerCacheHooks(app: any): void;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import Application from '@nocobase/server';
|
|
2
|
-
type TargetRole = 'app' | 'worker' | 'sandbox' | 'all';
|
|
3
|
-
interface InstallPayload {
|
|
4
|
-
targetRole: TargetRole;
|
|
5
|
-
packages: {
|
|
6
|
-
apt?: string[];
|
|
7
|
-
npm?: string[];
|
|
8
|
-
python?: string[];
|
|
9
|
-
};
|
|
10
|
-
registryConfig?: {
|
|
11
|
-
aptMirrorUrl?: string;
|
|
12
|
-
npmRegistryUrl?: string;
|
|
13
|
-
pypiIndexUrl?: string;
|
|
14
|
-
pypiTrustedHost?: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export declare class PackageManager {
|
|
18
|
-
private app;
|
|
19
|
-
constructor(app: Application);
|
|
20
|
-
/**
|
|
21
|
-
* Called from REST action when admin clicks "Install Packages".
|
|
22
|
-
* Publishes task to all nodes via PubSub. Nodes will filter by targetRole.
|
|
23
|
-
*/
|
|
24
|
-
dispatchInstall(payload: InstallPayload): Promise<string>;
|
|
25
|
-
executeInstall(payload: InstallPayload): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Run a command without a shell so registry URLs and package names are not re-parsed as shell syntax.
|
|
28
|
-
*/
|
|
29
|
-
private runCommand;
|
|
30
|
-
private getMissingPackages;
|
|
31
|
-
private isPackageInstalled;
|
|
32
|
-
private runStatus;
|
|
33
|
-
private getAptOsInfo;
|
|
34
|
-
private buildAptSources;
|
|
35
|
-
private configureAptMirror;
|
|
36
|
-
private moveIfExists;
|
|
37
|
-
private updateInstallStatus;
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Docker Adapter — MVP implementation
|
|
3
|
-
*
|
|
4
|
-
* Uses dockerode to communicate with the Docker daemon via unix socket.
|
|
5
|
-
* Containers are tagged with label `orchestrator.stack=<stackName>` for identification.
|
|
6
|
-
*
|
|
7
|
-
* Security: Docker socket = root on host. Only admin users should access
|
|
8
|
-
* orchestrator actions (enforced by ACL in plugin.ts).
|
|
9
|
-
*/
|
|
10
|
-
import type { IOrchestratorAdapter, ContainerInfo, ScaleResult, ContainerStats, StackConfig } from './types';
|
|
11
|
-
export declare class DockerAdapter implements IOrchestratorAdapter {
|
|
12
|
-
readonly name = "docker";
|
|
13
|
-
private docker;
|
|
14
|
-
private workerLabels;
|
|
15
|
-
constructor(options?: {
|
|
16
|
-
socketPath?: string;
|
|
17
|
-
host?: string;
|
|
18
|
-
port?: number;
|
|
19
|
-
workerLabelSelector?: string;
|
|
20
|
-
});
|
|
21
|
-
ping(): Promise<boolean>;
|
|
22
|
-
listContainers(stack: StackConfig): Promise<ContainerInfo[]>;
|
|
23
|
-
assertManagedByStack(stack: StackConfig, containerId: string): Promise<void>;
|
|
24
|
-
scale(stack: StackConfig, replicas: number): Promise<ScaleResult>;
|
|
25
|
-
startContainer(containerId: string): Promise<void>;
|
|
26
|
-
stopContainer(containerId: string, timeoutSecs?: number): Promise<void>;
|
|
27
|
-
removeContainer(containerId: string): Promise<void>;
|
|
28
|
-
getStats(containerId: string): Promise<ContainerStats>;
|
|
29
|
-
getLogs(containerId: string, tail?: number): Promise<string>;
|
|
30
|
-
listNetworks(): Promise<{
|
|
31
|
-
id: string;
|
|
32
|
-
name: string;
|
|
33
|
-
}[]>;
|
|
34
|
-
private mapState;
|
|
35
|
-
private buildEnvArray;
|
|
36
|
-
private buildLabelFilters;
|
|
37
|
-
private parseLabelSelector;
|
|
38
|
-
private labelsMatch;
|
|
39
|
-
private parseMemory;
|
|
40
|
-
private demuxDockerLogs;
|
|
41
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kubernetes Adapter
|
|
3
|
-
*
|
|
4
|
-
* Manages worker Deployments/Pods via the K8s API using in-cluster ServiceAccount
|
|
5
|
-
* or kubeconfig. Only manages resources labeled with `orchestrator.stack=<stackName>`.
|
|
6
|
-
*
|
|
7
|
-
* Prerequisites:
|
|
8
|
-
* - ServiceAccount with RBAC: get/list/create/patch/update on Deployments and Deployments/scale
|
|
9
|
-
* - get/list/delete on Pods and get on Pods/log
|
|
10
|
-
* - Or KUBECONFIG env var pointing to a valid kubeconfig file
|
|
11
|
-
*/
|
|
12
|
-
import type { IOrchestratorAdapter, ContainerInfo, ScaleResult, ContainerStats, StackConfig } from './types';
|
|
13
|
-
export declare class K8sAdapter implements IOrchestratorAdapter {
|
|
14
|
-
readonly name = "kubernetes";
|
|
15
|
-
private appsApi;
|
|
16
|
-
private coreApi;
|
|
17
|
-
private kc;
|
|
18
|
-
private namespace;
|
|
19
|
-
private workerLabelSelector;
|
|
20
|
-
private workerLabels;
|
|
21
|
-
constructor(options?: {
|
|
22
|
-
kubeconfig?: string;
|
|
23
|
-
context?: string;
|
|
24
|
-
namespace?: string;
|
|
25
|
-
workerLabelSelector?: string;
|
|
26
|
-
});
|
|
27
|
-
ping(): Promise<boolean>;
|
|
28
|
-
listContainers(stack: StackConfig): Promise<ContainerInfo[]>;
|
|
29
|
-
scale(stack: StackConfig, replicas: number): Promise<ScaleResult>;
|
|
30
|
-
startContainer(containerId: string): Promise<void>;
|
|
31
|
-
stopContainer(containerId: string): Promise<void>;
|
|
32
|
-
removeContainer(containerId: string): Promise<void>;
|
|
33
|
-
getStats(containerId: string): Promise<ContainerStats>;
|
|
34
|
-
getLogs(containerId: string, tail?: number): Promise<string>;
|
|
35
|
-
assertManagedByStack(stack: StackConfig, containerId: string): Promise<void>;
|
|
36
|
-
private parsePodRef;
|
|
37
|
-
private buildDeployment;
|
|
38
|
-
private buildWorkerLabels;
|
|
39
|
-
private buildContainerEnv;
|
|
40
|
-
private buildResources;
|
|
41
|
-
private cleanArray;
|
|
42
|
-
private isEmptyValue;
|
|
43
|
-
private isNotFound;
|
|
44
|
-
private assertDeploymentManagedByStack;
|
|
45
|
-
private joinSelectors;
|
|
46
|
-
private parseLabelSelector;
|
|
47
|
-
private labelsMatch;
|
|
48
|
-
private mapPodPhase;
|
|
49
|
-
private parseK8sMemory;
|
|
50
|
-
}
|