@dbos-inc/dbos-sdk 3.6.5-preview → 3.6.7-preview
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/src/adminserver.d.ts +26 -40
- package/dist/src/adminserver.d.ts.map +1 -1
- package/dist/src/adminserver.js +381 -276
- package/dist/src/adminserver.js.map +1 -1
- package/dist/src/cli/cli.d.ts.map +1 -1
- package/dist/src/cli/cli.js +41 -13
- package/dist/src/cli/cli.js.map +1 -1
- package/dist/src/config.d.ts +0 -5
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +1 -3
- package/dist/src/config.js.map +1 -1
- package/dist/src/context.d.ts +0 -1
- package/dist/src/context.d.ts.map +1 -1
- package/dist/src/dbos-executor.d.ts +0 -1
- package/dist/src/dbos-executor.d.ts.map +1 -1
- package/dist/src/dbos-executor.js.map +1 -1
- package/dist/src/dbos.d.ts +0 -4
- package/dist/src/dbos.d.ts.map +1 -1
- package/dist/src/dbos.js +0 -9
- package/dist/src/dbos.js.map +1 -1
- package/dist/src/system_database.d.ts +0 -2
- package/dist/src/system_database.d.ts.map +1 -1
- package/dist/src/system_database.js +147 -121
- package/dist/src/system_database.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -15
@@ -1,6 +1,6 @@
|
|
1
|
-
/// <reference types="
|
2
|
-
|
3
|
-
import
|
1
|
+
/// <reference types="node" />
|
2
|
+
/// <reference types="node" />
|
3
|
+
import * as http from 'http';
|
4
4
|
import { DBOSExecutor } from './dbos-executor';
|
5
5
|
import { GlobalLogger } from './telemetry/logs';
|
6
6
|
import { QueueParameters } from './wfqueue';
|
@@ -13,95 +13,81 @@ export declare const HealthUrl = "/dbos-healthz";
|
|
13
13
|
export declare const PerfUrl = "/dbos-perf";
|
14
14
|
export declare const DeactivateUrl = "/deactivate";
|
15
15
|
export declare const WorkflowQueuesMetadataUrl = "/dbos-workflow-queues-metadata";
|
16
|
+
interface Route {
|
17
|
+
method: string;
|
18
|
+
path: string;
|
19
|
+
handler: (req: http.IncomingMessage, res: http.ServerResponse, params?: Record<string, string>) => Promise<void>;
|
20
|
+
}
|
16
21
|
export declare class DBOSAdminServer {
|
17
|
-
|
18
|
-
readonly adminApp: Koa;
|
19
|
-
readonly logger: GlobalLogger;
|
20
|
-
static nRegisteredEndpoints: number;
|
21
|
-
static instance?: DBOSAdminServer;
|
22
|
-
/**
|
23
|
-
* Create a Koa app.
|
24
|
-
* @param dbosExec User pass in an DBOS workflow executor instance.
|
25
|
-
* TODO: maybe call dbosExec.init() somewhere in this class?
|
26
|
-
*/
|
27
|
-
constructor(dbosExec: DBOSExecutor);
|
28
|
-
static setupAdminApp(dbosExec: DBOSExecutor): Koa;
|
22
|
+
static setupAdminApp(dbosExec: DBOSExecutor): http.Server;
|
29
23
|
static checkPortAvailabilityIPv4Ipv6(port: number, logger: GlobalLogger): Promise<void>;
|
30
24
|
static checkPortAvailability(port: number, host: string): Promise<void>;
|
31
25
|
/**
|
32
26
|
* Health check endpoint.
|
33
27
|
*/
|
34
|
-
static registerHealthEndpoint(dbosExec: DBOSExecutor,
|
28
|
+
static registerHealthEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
35
29
|
/**
|
36
30
|
* Register workflow queue metadata endpoint.
|
37
31
|
*/
|
38
|
-
static registerQueueMetadataEndpoint(dbosExec: DBOSExecutor,
|
32
|
+
static registerQueueMetadataEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
39
33
|
/**
|
40
34
|
* Register workflow recovery endpoint.
|
41
35
|
* Receives a list of executor IDs and returns a list of workflowUUIDs.
|
42
36
|
*/
|
43
|
-
static registerRecoveryEndpoint(dbosExec: DBOSExecutor,
|
37
|
+
static registerRecoveryEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
44
38
|
/**
|
45
39
|
* Register performance endpoint.
|
46
40
|
* Returns information on VM performance since last call.
|
47
41
|
*/
|
48
|
-
static
|
42
|
+
static lastELU: import("perf_hooks").EventLoopUtilization;
|
43
|
+
static registerPerfEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
49
44
|
/**
|
50
45
|
* Register Deactivate endpoint.
|
51
46
|
* Deactivate consumers so that they don't start new workflows.
|
52
|
-
*
|
53
47
|
*/
|
54
48
|
static isDeactivated: boolean;
|
55
|
-
static registerDeactivateEndpoint(dbosExec: DBOSExecutor,
|
56
|
-
static registerGarbageCollectEndpoint(dbosExec: DBOSExecutor,
|
57
|
-
static registerGlobalTimeoutEndpoint(dbosExec: DBOSExecutor,
|
49
|
+
static registerDeactivateEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
50
|
+
static registerGarbageCollectEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
51
|
+
static registerGlobalTimeoutEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
58
52
|
/**
|
59
|
-
*
|
60
53
|
* Register Cancel Workflow endpoint.
|
61
54
|
* Cancels a workflow by setting its status to CANCELLED.
|
62
55
|
*/
|
63
|
-
static registerCancelWorkflowEndpoint(dbosExec: DBOSExecutor,
|
56
|
+
static registerCancelWorkflowEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
64
57
|
/**
|
65
|
-
*
|
66
58
|
* Register Resume Workflow endpoint.
|
67
59
|
* Resume a workflow.
|
68
60
|
*/
|
69
|
-
static registerResumeWorkflowEndpoint(dbosExec: DBOSExecutor,
|
61
|
+
static registerResumeWorkflowEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
70
62
|
/**
|
71
|
-
*
|
72
63
|
* Register Restart Workflow endpoint.
|
73
64
|
* Restart a workflow.
|
74
65
|
*/
|
75
|
-
static registerRestartWorkflowEndpoint(dbosExec: DBOSExecutor,
|
66
|
+
static registerRestartWorkflowEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
76
67
|
/**
|
77
|
-
*
|
78
68
|
* Register Fork Workflow endpoint.
|
79
|
-
*
|
80
69
|
*/
|
81
|
-
static registerForkWorkflowEndpoint(dbosExec: DBOSExecutor,
|
70
|
+
static registerForkWorkflowEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
82
71
|
/**
|
83
|
-
*
|
84
72
|
* Register List Workflow Steps endpoint.
|
85
73
|
* List steps for a given workflow.
|
86
74
|
*/
|
87
|
-
static registerListWorkflowStepsEndpoint(dbosExec: DBOSExecutor,
|
75
|
+
static registerListWorkflowStepsEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
88
76
|
/**
|
89
|
-
*
|
90
77
|
* Register List Workflows endpoint.
|
91
78
|
* List workflows with optional filtering via request body.
|
92
79
|
*/
|
93
|
-
static registerListWorkflowsEndpoint(dbosExec: DBOSExecutor,
|
80
|
+
static registerListWorkflowsEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
94
81
|
/**
|
95
|
-
*
|
96
82
|
* Register List Queued Workflows endpoint.
|
97
83
|
* List queued workflows with optional filtering via request body.
|
98
84
|
*/
|
99
|
-
static registerListQueuedWorkflowsEndpoint(dbosExec: DBOSExecutor,
|
85
|
+
static registerListQueuedWorkflowsEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
100
86
|
/**
|
101
|
-
*
|
102
87
|
* Register Get Workflow endpoint.
|
103
88
|
* Get detailed information about a specific workflow by ID.
|
104
89
|
*/
|
105
|
-
static registerGetWorkflowEndpoint(dbosExec: DBOSExecutor,
|
90
|
+
static registerGetWorkflowEndpoint(dbosExec: DBOSExecutor, routes: Route[]): void;
|
106
91
|
}
|
92
|
+
export {};
|
107
93
|
//# sourceMappingURL=adminserver.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"adminserver.d.ts","sourceRoot":"","sources":["../../src/adminserver.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"adminserver.d.ts","sourceRoot":"","sources":["../../src/adminserver.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAI7B,OAAO,E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