@dbos-inc/dbos-sdk 0.8.32-preview → 0.8.34-preview
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/cloud-cli/cli.js +2 -2
- package/dist/src/cloud-cli/cli.js.map +1 -1
- package/dist/src/cloud-cli/userdb.d.ts +1 -1
- package/dist/src/cloud-cli/userdb.d.ts.map +1 -1
- package/dist/src/cloud-cli/userdb.js +59 -2
- package/dist/src/cloud-cli/userdb.js.map +1 -1
- package/dist/src/system_database.d.ts +3 -0
- package/dist/src/system_database.d.ts.map +1 -1
- package/dist/src/telemetry/logs.js +5 -1
- package/dist/src/telemetry/logs.js.map +1 -1
- package/dist/src/telemetry/traces.d.ts +2 -0
- package/dist/src/telemetry/traces.d.ts.map +1 -1
- package/dist/src/telemetry/traces.js +8 -0
- package/dist/src/telemetry/traces.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/cloud-cli/applications/configure.d.ts +0 -2
- package/dist/src/cloud-cli/applications/configure.d.ts.map +0 -1
- package/dist/src/cloud-cli/applications/configure.js +0 -64
- package/dist/src/cloud-cli/applications/configure.js.map +0 -1
- package/dist/src/dbos-runtime/TypeParser.d.ts +0 -33
- package/dist/src/dbos-runtime/TypeParser.d.ts.map +0 -1
- package/dist/src/dbos-runtime/TypeParser.js +0 -104
- package/dist/src/dbos-runtime/TypeParser.js.map +0 -1
- package/dist/src/dbos-runtime/openApi.d.ts +0 -35
- package/dist/src/dbos-runtime/openApi.d.ts.map +0 -1
- package/dist/src/dbos-runtime/openApi.js +0 -595
- package/dist/src/dbos-runtime/openApi.js.map +0 -1
- package/dist/src/dbos-runtime/tsDiagUtil.d.ts +0 -16
- package/dist/src/dbos-runtime/tsDiagUtil.d.ts.map +0 -1
- package/dist/src/dbos-runtime/tsDiagUtil.js +0 -72
- package/dist/src/dbos-runtime/tsDiagUtil.js.map +0 -1
- package/dist/src/provenance/provenance_daemon.d.ts +0 -34
- package/dist/src/provenance/provenance_daemon.d.ts.map +0 -1
- package/dist/src/provenance/provenance_daemon.js +0 -86
- package/dist/src/provenance/provenance_daemon.js.map +0 -1
- package/dist/src/telemetry/signals.d.ts +0 -20
- package/dist/src/telemetry/signals.d.ts.map +0 -1
- package/dist/src/telemetry/signals.js +0 -11
- package/dist/src/telemetry/signals.js.map +0 -1
@@ -130,8 +130,8 @@ userdbCommands
|
|
130
130
|
}));
|
131
131
|
userdbCommands
|
132
132
|
.command('migrate')
|
133
|
-
.action((() => {
|
134
|
-
const exitCode = (0, userdb_1.migrate)();
|
133
|
+
.action((async () => {
|
134
|
+
const exitCode = await (0, userdb_1.migrate)();
|
135
135
|
process.exit(exitCode);
|
136
136
|
}));
|
137
137
|
userdbCommands
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/cloud-cli/cli.ts"],"names":[],"mappings":";;;AAEA,kDAOyB;AACzB,yCAAoC;AACpC,mCAAgC;AAChC,yCAA0C;AAC1C,qCAA6F;AAC7F,mCAA2C;AAE3C,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,2EAA2E;AAEzH,8DAA8D;AAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAwB,CAAC;AAC5E,OAAO;IACL,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAE/B,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AAErB,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,sBAAsB,CAAC;KACnC,cAAc,CAAC,yBAAyB,EAAE,UAAU,CAAC;KACrD,MAAM,CAAC,KAAK,EAAE,OAA6B,EAAE,EAAE;IAC9C,MAAM,QAAQ,GAAG,MAAM,IAAA,aAAK,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC;AAEL,OAA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IAAI,EAAE;IAClB,MAAM,QAAQ,GAAG,MAAM,IAAA,gBAAO,GAAE,CAAC;IACjC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC,CAAA;AAEL,cAAc;KACX,OAAO,CAAC,mBAAmB,CAAC;KAC5B,MAAM,CAAC,CAAC,GAAG,EAAE;IACZ,MAAM,QAAQ,GAAG,IAAA,0BAAiB,GAAE,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC,CAAA;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,oDAAoD;AACpD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|
@@ -7,7 +7,7 @@ export interface UserDBInstance {
|
|
7
7
|
export declare function createUserDb(host: string, dbName: string, adminName: string, adminPassword: string, sync: boolean): Promise<void>;
|
8
8
|
export declare function deleteUserDb(host: string, dbName: string): Promise<void>;
|
9
9
|
export declare function getUserDb(host: string, dbName: string): Promise<void>;
|
10
|
-
export declare function migrate(): number
|
10
|
+
export declare function migrate(): Promise<number>;
|
11
11
|
export declare function rollbackMigration(): number;
|
12
12
|
export declare function getUserDBInfo(host: string, dbName: string): Promise<UserDBInstance>;
|
13
13
|
//# sourceMappingURL=userdb.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"userdb.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"userdb.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,iBAmCvH;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAoB9D;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAa3D;AAED,wBAAsB,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAiF/C;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CA4B1C;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAYzF"}
|
@@ -11,6 +11,9 @@ const utils_2 = require("../utils");
|
|
11
11
|
const config_1 = require("../dbos-runtime/config");
|
12
12
|
const child_process_1 = require("child_process");
|
13
13
|
const user_database_1 = require("../user_database");
|
14
|
+
const pg_1 = require("pg");
|
15
|
+
const system_db_schema_1 = require("../../schemas/system_db_schema");
|
16
|
+
const user_db_schema_1 = require("../../schemas/user_db_schema");
|
14
17
|
async function createUserDb(host, dbName, adminName, adminPassword, sync) {
|
15
18
|
const logger = new logs_1.GlobalLogger();
|
16
19
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
@@ -82,7 +85,7 @@ async function getUserDb(host, dbName) {
|
|
82
85
|
}
|
83
86
|
}
|
84
87
|
exports.getUserDb = getUserDb;
|
85
|
-
function migrate() {
|
88
|
+
async function migrate() {
|
86
89
|
const logger = new logs_1.GlobalLogger();
|
87
90
|
// Read the configuration YAML file
|
88
91
|
const configFile = (0, config_1.loadConfigFile)(config_1.dbosConfigFilePath);
|
@@ -105,7 +108,17 @@ function migrate() {
|
|
105
108
|
}
|
106
109
|
catch (e) {
|
107
110
|
if (e instanceof Error) {
|
108
|
-
|
111
|
+
if (e.message.includes(`database "${userDBName}" already exists`)) {
|
112
|
+
logger.info(`Database ${userDBName} already exists`);
|
113
|
+
}
|
114
|
+
else {
|
115
|
+
logger.error(`Error creating database: ${e.message}`);
|
116
|
+
return 1;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
else {
|
120
|
+
logger.error(e);
|
121
|
+
return 1;
|
109
122
|
}
|
110
123
|
}
|
111
124
|
const dbType = configFile.database.user_dbclient || user_database_1.UserDatabaseName.KNEX;
|
@@ -141,6 +154,19 @@ function migrate() {
|
|
141
154
|
}
|
142
155
|
return 1;
|
143
156
|
}
|
157
|
+
logger.info("Creating DBOS tables and system database.");
|
158
|
+
try {
|
159
|
+
await createDBOSTables(configFile);
|
160
|
+
}
|
161
|
+
catch (e) {
|
162
|
+
if (e instanceof Error) {
|
163
|
+
logger.error(`Error creating DBOS system database: ${e.message}`);
|
164
|
+
}
|
165
|
+
else {
|
166
|
+
logger.error(e);
|
167
|
+
}
|
168
|
+
return 1;
|
169
|
+
}
|
144
170
|
return 0;
|
145
171
|
}
|
146
172
|
exports.migrate = migrate;
|
@@ -183,4 +209,35 @@ async function getUserDBInfo(host, dbName) {
|
|
183
209
|
return res.data;
|
184
210
|
}
|
185
211
|
exports.getUserDBInfo = getUserDBInfo;
|
212
|
+
// Create DBOS system DB and tables.
|
213
|
+
// TODO: replace this with knex to manage schema.
|
214
|
+
async function createDBOSTables(configFile) {
|
215
|
+
const userPoolConfig = {
|
216
|
+
host: configFile.database.hostname,
|
217
|
+
port: configFile.database.port,
|
218
|
+
user: configFile.database.username,
|
219
|
+
password: configFile.database.password,
|
220
|
+
connectionTimeoutMillis: configFile.database.connectionTimeoutMillis || 3000,
|
221
|
+
database: configFile.database.user_database,
|
222
|
+
};
|
223
|
+
if (configFile.database.ssl_ca) {
|
224
|
+
userPoolConfig.ssl = { ca: [(0, utils_2.readFileSync)(configFile.database.ssl_ca)], rejectUnauthorized: true };
|
225
|
+
}
|
226
|
+
const systemPoolConfig = { ...userPoolConfig };
|
227
|
+
systemPoolConfig.database = "dbos_systemdb"; // We enforce it to be the dbos_systemdb.
|
228
|
+
const pgUserClient = new pg_1.Client(userPoolConfig);
|
229
|
+
await pgUserClient.connect();
|
230
|
+
// Create DBOS table/schema in user DB.
|
231
|
+
await pgUserClient.query(user_db_schema_1.createUserDBSchema);
|
232
|
+
await pgUserClient.query(user_db_schema_1.userDBSchema);
|
233
|
+
// Create the DBOS system database.
|
234
|
+
const dbExists = await pgUserClient.query(`SELECT EXISTS (SELECT FROM pg_database WHERE datname = '${systemPoolConfig.database}')`);
|
235
|
+
if (!dbExists.rows[0].exists) {
|
236
|
+
await pgUserClient.query(`CREATE DATABASE ${systemPoolConfig.database}`);
|
237
|
+
}
|
238
|
+
// Load the DBOS system schema.
|
239
|
+
const pgSystemClient = new pg_1.Client(systemPoolConfig);
|
240
|
+
await pgSystemClient.connect();
|
241
|
+
await pgSystemClient.query(system_db_schema_1.systemDBSchema);
|
242
|
+
}
|
186
243
|
//# sourceMappingURL=userdb.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"userdb.js","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAiD;AACjD,mCAA8C;AAC9C,
|
1
|
+
{"version":3,"file":"userdb.js","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAiD;AACjD,mCAA8C;AAC9C,oCAA+C;AAC/C,mDAAwF;AACxF,iDAAyC;AACzC,oDAAoD;AACpD,2BAAwC;AAExC,qEAAgE;AAChE,iEAAgF;AASzE,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,MAAc,EAAE,SAAiB,EAAE,aAAqB,EAAE,IAAa;IACtH,MAAM,MAAM,GA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,CAAiB,2DAA2D,gBAAgB,CAAC,QAAQ,IAAI,CAAC,CAAC;IACpJ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QAC7B,MAAM,YAAY,CAAC,KAAK,CAAC,mBAAmB,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,+BAA+B;IAC/B,MAAM,cAAc,GAAG,IAAI,WAAM,CAAC,gBAAgB,CAAC,CAAC;IACpD,MAAM,cAAc,CAAC,OAAO,EAAE,CAAC;IAC/B,MAAM,cAAc,CAAC,KAAK,CAAC,iCAAc,CAAC,CAAC;AAC7C,CAAC"}
|
@@ -37,6 +37,9 @@ export interface WorkflowStatusInternal {
|
|
37
37
|
request: HTTPRequest;
|
38
38
|
executorID: string;
|
39
39
|
}
|
40
|
+
export interface ExistenceCheck {
|
41
|
+
exists: boolean;
|
42
|
+
}
|
40
43
|
export declare class PostgresSystemDatabase implements SystemDatabase {
|
41
44
|
readonly pgPoolConfig: PoolConfig;
|
42
45
|
readonly systemDatabaseName: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"system_database.d.ts","sourceRoot":"","sources":["../../src/system_database.ts"],"names":[],"mappings":"AAGA,OAAO,EAA0B,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAiB,IAAI,EAAE,UAAU,EAAgB,UAAU,EAAU,MAAM,IAAI,CAAC;AAEvF,OAAO,EAAgB,cAAc,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC7B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB,mBAAmB,CAAC,CAAC,EAAE,YAAY,EA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MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAiD5J,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IA6BjH,iBAAiB,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAkB5D;;;OAGG;IACG,sBAAsB;CAiB7B"}
|
@@ -141,12 +141,16 @@ class OTLPLogQueueTransport extends TransportStream {
|
|
141
141
|
telemetryCollector;
|
142
142
|
name = "OTLPLogQueueTransport";
|
143
143
|
otelLogger;
|
144
|
+
applicationID;
|
145
|
+
executorID;
|
144
146
|
constructor(telemetryCollector) {
|
145
147
|
super();
|
146
148
|
this.telemetryCollector = telemetryCollector;
|
147
149
|
// not sure if we need a more explicit name here
|
148
150
|
const loggerProvider = new sdk_logs_1.LoggerProvider();
|
149
151
|
this.otelLogger = loggerProvider.getLogger("default");
|
152
|
+
this.applicationID = process.env.APPID || "APP_ID_NOT_DEFINED";
|
153
|
+
this.executorID = process.env.VMID || "VM_ID_NOT_DEFINED";
|
150
154
|
const logRecordProcessor = {
|
151
155
|
forceFlush: async () => {
|
152
156
|
// no-op
|
@@ -181,7 +185,7 @@ class OTLPLogQueueTransport extends TransportStream {
|
|
181
185
|
timestamp: new Date().getTime(), // So far I don't see a major difference between this and observedTimestamp
|
182
186
|
observedTimestamp: new Date().getTime(),
|
183
187
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
184
|
-
attributes: { ...span?.attributes, traceId: span?.spanContext()?.traceId, spanId: span?.spanContext()?.spanId, stack },
|
188
|
+
attributes: { ...span?.attributes, traceId: span?.spanContext()?.traceId, spanId: span?.spanContext()?.spanId, stack, applicationID: this.applicationID, executorID: this.executorID },
|
185
189
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
186
190
|
// context: span?.spanContext() || undefined,
|
187
191
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../../src/telemetry/logs.ts"],"names":[],"mappings":";;;AAAA,qCAAqF;AACrF,qDAAsD;AACtD,2EAA2E;AAE3E,sDAA8F;AAC9F,sDAAoE;AA8BpE,MAAa,YAAY;IAKJ;IAJF,MAAM,CAAiB;IAC/B,kBAAkB,CAAU;IAErC,YACmB,kBAAuC,EACxD,MAAqB;QADJ,uBAAkB,GAAlB,kBAAkB,CAAqB;QAGxD,MAAM,iBAAiB,GAAsB,EAAE,CAAC;QAChD,iBAAiB,CAAC,IAAI,CACpB,IAAI,oBAAU,CAAC,OAAO,CAAC;YACrB,MAAM,EAAE,aAAa;YACrB,KAAK,EAAE,MAAM,EAAE,QAAQ,IAAI,MAAM;YACjC,MAAM,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK;SAChC,CAAC,CACH,CAAC;QACF,kFAAkF;QAClF,IAAI,IAAI,CAAC,kBAAkB,EAAE,QAAQ,EAAE,CAAC;YACtC,iBAAiB,CAAC,IAAI,CAAC,IAAI,qBAAqB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC7E,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,IAAA,sBAAY,EAAC,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAC9D,IAAI,CAAC,kBAAkB,GAAG,MAAM,EAAE,kBAAkB,IAAI,KAAK,CAAC;IAChE,CAAC;IAED,wHAAwH;IACxH,8DAA8D;IAC9D,IAAI,CAAC,QAAa,EAAE,QAA6B;QAC/C,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACjC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,QA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,yBAAc,CAAC,KAAK;SAC5B,CAAC;QAEF,4DAA4D;QAC5D,8DAA8D;QAC9D,oFAAoF;QACpF,oHAAoH;QACpH,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YACnB,cAAc,EAAE,qBAAqB,CAAC,KAAe,CAAC;YACtD,YAAY,EAAE,KAAe;YAC7B,IAAI,EAAE,OAAiB;YACvB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,2EAA2E;YAC5G,iBAAiB,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE;YACvC,kJAAkJ;YAClJ,UAAU,EAAE,EAAE,GAAG,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAmB;YACvM,kJAAkJ;YAClJ,6CAA6C;SAC9C,CAAC,CAAC;QAEH,QAAQ,EAAE,CAAC;IACb,CAAC;CACF"}
|
@@ -4,6 +4,8 @@ import { TelemetryCollector } from "./collector";
|
|
4
4
|
export declare class Tracer {
|
5
5
|
private readonly telemetryCollector;
|
6
6
|
private readonly tracer;
|
7
|
+
readonly applicationID: string;
|
8
|
+
readonly executorID: string;
|
7
9
|
constructor(telemetryCollector: TelemetryCollector);
|
8
10
|
startSpanWithContext(spanContext: SpanContext, name: string, attributes?: Attributes): Span;
|
9
11
|
startSpan(name: string, attributes?: Attributes, parentSpan?: Span): Span;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"traces.d.ts","sourceRoot":"","sources":["../../../src/telemetry/traces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAExF,OAAsB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,qBAAa,MAAM;
|
1
|
+
{"version":3,"file":"traces.d.ts","sourceRoot":"","sources":["../../../src/telemetry/traces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAExF,OAAsB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,qBAAa,MAAM;IAIL,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAH/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAC7C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBACC,kBAAkB,EAAE,kBAAkB;IAWnE,oBAAoB,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI;IAM3F,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI;IAUzE,OAAO,CAAC,IAAI,EAAE,IAAI;CAQnB"}
|
@@ -11,6 +11,8 @@ const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
|
|
11
11
|
class Tracer {
|
12
12
|
telemetryCollector;
|
13
13
|
tracer;
|
14
|
+
applicationID;
|
15
|
+
executorID;
|
14
16
|
constructor(telemetryCollector) {
|
15
17
|
this.telemetryCollector = telemetryCollector;
|
16
18
|
this.tracer = new sdk_trace_base_1.BasicTracerProvider({
|
@@ -19,6 +21,8 @@ class Tracer {
|
|
19
21
|
}),
|
20
22
|
});
|
21
23
|
this.tracer.register();
|
24
|
+
this.applicationID = process.env.APPID || "APP_ID_NOT_DEFINED";
|
25
|
+
this.executorID = process.env.VMID || "VM_ID_NOT_DEFINED";
|
22
26
|
}
|
23
27
|
startSpanWithContext(spanContext, name, attributes) {
|
24
28
|
const tracer = api_1.default.trace.getTracer("dbos-tracer");
|
@@ -37,6 +41,10 @@ class Tracer {
|
|
37
41
|
}
|
38
42
|
endSpan(span) {
|
39
43
|
span.end(Date.now());
|
44
|
+
span.attributes.applicationID = this.applicationID;
|
45
|
+
if (!("executorID" in span.attributes)) {
|
46
|
+
span.attributes.executorID = this.executorID;
|
47
|
+
}
|
40
48
|
this.telemetryCollector.push(span);
|
41
49
|
}
|
42
50
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"traces.js","sourceRoot":"","sources":["../../../src/telemetry/traces.ts"],"names":[],"mappings":";;;;;;AAAA,kEAAwF;AACxF,wDAAoD;AACpD,6DAA4E;AAC5E,8EAAiF;AAGjF,MAAa,MAAM;
|
1
|
+
{"version":3,"file":"traces.js","sourceRoot":"","sources":["../../../src/telemetry/traces.ts"],"names":[],"mappings":";;;;;;AAAA,kEAAwF;AACxF,wDAAoD;AACpD,6DAA4E;AAC5E,8EAAiF;AAGjF,MAAa,MAAM;IAIY;IAHZ,MAAM,CAAsB;IACpC,aAAa,CAAS;IACtB,UAAU,CAAS;IAC5B,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;QACjE,IAAI,CAAC,MAAM,GAAG,IAAI,oCAAmB,CAAC;YACpC,QAAQ,EAAE,IAAI,oBAAQ,CAAC;gBACrB,CAAC,iDAA0B,CAAC,YAAY,CAAC,EAAE,MAAM;aAClD,CAAC;SACH,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,oBAAoB,CAAC;QAC/D,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,mBAAmB,CAAC;IAC5D,CAAC;IAED,oBAAoB,CAAC,WAAwB,EAAE,IA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,CAAC;QACD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAoB,CAAC,CAAC;IACrD,CAAC;CACF;AAvCD,wBAuCC"}
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/configure.ts"],"names":[],"mappings":"AAOA,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsD9F"}
|
@@ -1,64 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.configureApp = void 0;
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
8
|
-
const fs_1 = __importDefault(require("fs"));
|
9
|
-
const yaml_1 = __importDefault(require("yaml"));
|
10
|
-
const logs_1 = require("../../telemetry/logs");
|
11
|
-
const config_1 = require("../../dbos-runtime/config");
|
12
|
-
const userdb_1 = require("../userdb");
|
13
|
-
async function configureApp(host, port, dbName) {
|
14
|
-
const logger = new logs_1.GlobalLogger();
|
15
|
-
let userDBInfo;
|
16
|
-
try {
|
17
|
-
userDBInfo = await (0, userdb_1.getUserDBInfo)(host, port, dbName);
|
18
|
-
}
|
19
|
-
catch (e) {
|
20
|
-
logger.error(`error getting DB Info: ${e.message}`);
|
21
|
-
return 1;
|
22
|
-
}
|
23
|
-
const userdbHostname = userDBInfo.HostName;
|
24
|
-
const userdbPort = userDBInfo.Port;
|
25
|
-
if (userdbHostname == "" || userdbPort == 0) {
|
26
|
-
logger.error(`HostName: ${userdbHostname} Port: ${userdbPort} not available.`);
|
27
|
-
return 1;
|
28
|
-
}
|
29
|
-
// Parse the config file
|
30
|
-
const configFile = (0, config_1.loadConfigFile)(config_1.dbosConfigFilePath);
|
31
|
-
if (!configFile) {
|
32
|
-
logger.error(`failed to parse ${config_1.dbosConfigFilePath}`);
|
33
|
-
return 1;
|
34
|
-
}
|
35
|
-
const certificateURL = "https://truststore.pki.rds.amazonaws.com/us-east-1/us-east-1-bundle.pem";
|
36
|
-
const certificateFile = "us-east-1-bundle.pem";
|
37
|
-
try {
|
38
|
-
const certificate = await axios_1.default.get(certificateURL, {
|
39
|
-
responseType: 'arraybuffer'
|
40
|
-
});
|
41
|
-
fs_1.default.writeFileSync(certificateFile, certificate.data);
|
42
|
-
}
|
43
|
-
catch (e) {
|
44
|
-
logger.error("Error downloading RDS certificate bundle. Try downloading it manually from AWS.");
|
45
|
-
logger.error(e.message);
|
46
|
-
return 1;
|
47
|
-
}
|
48
|
-
// Update database hostname and port
|
49
|
-
configFile.database.hostname = userdbHostname;
|
50
|
-
configFile.database.port = userdbPort;
|
51
|
-
configFile.database.ssl_ca = certificateFile;
|
52
|
-
// Save the updated config file
|
53
|
-
try {
|
54
|
-
fs_1.default.writeFileSync(`${config_1.dbosConfigFilePath}`, yaml_1.default.stringify(configFile));
|
55
|
-
}
|
56
|
-
catch (e) {
|
57
|
-
logger.error(`failed to write ${config_1.dbosConfigFilePath}: ${e.message}`);
|
58
|
-
return 1;
|
59
|
-
}
|
60
|
-
logger.info(`Successfully configured user database at ${userdbHostname}:${userdbPort}.`);
|
61
|
-
return 0;
|
62
|
-
}
|
63
|
-
exports.configureApp = configureApp;
|
64
|
-
//# sourceMappingURL=configure.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/configure.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAoB;AACpB,gDAAwB;AACxB,+CAAoD;AACpD,sDAA2F;AAC3F,sCAA0D;AAEnD,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,IAAY,EAAE,MAAc;IACzE,MAAM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AQ,CAAC,QAAQ,GAAG,cAAc,CAAA;IAC7C,UAAU,CAAC,QAAQ,CAAC,IAAI,GAAG,UAAU,CAAA;IACrC,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,eAAe,CAAA;IAE5C,+BAA+B;IAC/B,IAAI;QACF,YAAE,CAAC,aAAa,CAAC,GAAG,2BAAkB,EAAE,EAAE,cAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;KACvE;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,CAAC,KAAK,CAAC,mBAAmB,2BAAkB,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/E,OAAO,CAAC,CAAC;KACV;IAED,MAAM,CAAC,IAAI,CAAC,4CAA4C,cAAc,IAAI,UAAU,GAAG,CAAC,CAAA;IACxF,OAAO,CAAC,CAAA;AACZ,CAAC;AAtDD,oCAsDC"}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import ts from 'typescript';
|
2
|
-
export interface ClassInfo {
|
3
|
-
readonly node: ts.ClassDeclaration;
|
4
|
-
readonly name?: string;
|
5
|
-
readonly decorators: readonly DecoratorInfo[];
|
6
|
-
readonly methods: readonly MethodInfo[];
|
7
|
-
}
|
8
|
-
export interface MethodInfo {
|
9
|
-
readonly node: ts.MethodDeclaration;
|
10
|
-
readonly name: string;
|
11
|
-
readonly decorators: readonly DecoratorInfo[];
|
12
|
-
readonly parameters: readonly ParameterInfo[];
|
13
|
-
}
|
14
|
-
export interface ParameterInfo {
|
15
|
-
readonly node: ts.ParameterDeclaration;
|
16
|
-
readonly name: string;
|
17
|
-
readonly decorators: readonly DecoratorInfo[];
|
18
|
-
readonly required: boolean;
|
19
|
-
}
|
20
|
-
export interface DecoratorInfo {
|
21
|
-
node: ts.Decorator;
|
22
|
-
identifier: ts.Identifier;
|
23
|
-
args: readonly ts.Expression[];
|
24
|
-
name?: string;
|
25
|
-
module?: string;
|
26
|
-
}
|
27
|
-
export declare class TypeParser {
|
28
|
-
#private;
|
29
|
-
get diags(): readonly ts.Diagnostic[];
|
30
|
-
constructor(program: ts.Program);
|
31
|
-
parse(): readonly ClassInfo[] | undefined;
|
32
|
-
}
|
33
|
-
//# sourceMappingURL=TypeParser.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"TypeParser.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/TypeParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;IAC9C,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAoB,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC;IACnB,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC;IAC1B,IAAI,EAAE,SAAS,EAAE,CAAC,UAAU,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAOD,qBAAa,UAAU;;IAIrB,IAAI,KAAK,6BAAgC;gBAE7B,OAAO,EAAE,EAAE,CAAC,OAAO;IAK/B,KAAK,IAAI,SAAS,SAAS,EAAE,GAAG,SAAS;CA2F1C"}
|
@@ -1,104 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.TypeParser = void 0;
|
7
|
-
const typescript_1 = __importDefault(require("typescript"));
|
8
|
-
const tsDiagUtil_1 = require("./tsDiagUtil");
|
9
|
-
function isStaticMethod(node) {
|
10
|
-
const mods = node.modifiers ?? [];
|
11
|
-
return mods.some(m => m.kind === typescript_1.default.SyntaxKind.StaticKeyword);
|
12
|
-
}
|
13
|
-
class TypeParser {
|
14
|
-
#program;
|
15
|
-
#checker;
|
16
|
-
#diags = new tsDiagUtil_1.DiagnosticsCollector();
|
17
|
-
get diags() { return this.#diags.diags; }
|
18
|
-
constructor(program) {
|
19
|
-
this.#program = program;
|
20
|
-
this.#checker = program.getTypeChecker();
|
21
|
-
}
|
22
|
-
parse() {
|
23
|
-
const classes = new Array();
|
24
|
-
for (const file of this.#program.getSourceFiles()) {
|
25
|
-
if (file.isDeclarationFile)
|
26
|
-
continue;
|
27
|
-
for (const stmt of file.statements) {
|
28
|
-
if (typescript_1.default.isClassDeclaration(stmt)) {
|
29
|
-
const staticMethods = stmt.members
|
30
|
-
.filter(typescript_1.default.isMethodDeclaration)
|
31
|
-
// Only static methods are supported now, so filter out instance methods by default
|
32
|
-
.filter(isStaticMethod)
|
33
|
-
.map(m => this.#getMethod(m));
|
34
|
-
classes.push({
|
35
|
-
node: stmt,
|
36
|
-
// a class may not have a name if it's the default export
|
37
|
-
name: stmt.name?.getText(),
|
38
|
-
decorators: this.#getDecorators(stmt),
|
39
|
-
methods: staticMethods,
|
40
|
-
});
|
41
|
-
}
|
42
|
-
}
|
43
|
-
}
|
44
|
-
if (classes.length === 0) {
|
45
|
-
this.#diags.warn(`no classes found in ${JSON.stringify(this.#program.getRootFileNames())}`);
|
46
|
-
}
|
47
|
-
return (0, tsDiagUtil_1.diagResult)(classes, this.diags);
|
48
|
-
}
|
49
|
-
#getMethod(node) {
|
50
|
-
const name = node.name.getText();
|
51
|
-
const decorators = this.#getDecorators(node);
|
52
|
-
const parameters = node.parameters.map(p => this.#getParameter(p));
|
53
|
-
return { node, name, decorators, parameters };
|
54
|
-
}
|
55
|
-
#getParameter(node) {
|
56
|
-
const decorators = this.#getDecorators(node);
|
57
|
-
const name = node.name.getText();
|
58
|
-
const required = !node.questionToken && !node.initializer;
|
59
|
-
return { node, name, decorators, required };
|
60
|
-
}
|
61
|
-
#getDecoratorIdentifier(node) {
|
62
|
-
if (typescript_1.default.isCallExpression(node.expression)) {
|
63
|
-
if (typescript_1.default.isIdentifier(node.expression.expression)) {
|
64
|
-
return { identifier: node.expression.expression, args: node.expression.arguments };
|
65
|
-
}
|
66
|
-
this.#diags.raise(`Unexpected decorator CallExpression.expression type: ${typescript_1.default.SyntaxKind[node.expression.expression.kind]}`, node);
|
67
|
-
}
|
68
|
-
if (typescript_1.default.isIdentifier(node.expression)) {
|
69
|
-
return { identifier: node.expression, args: [] };
|
70
|
-
}
|
71
|
-
this.#diags.raise(`Unexpected decorator expression type: ${typescript_1.default.SyntaxKind[node.expression.kind]}`, node);
|
72
|
-
}
|
73
|
-
#getDecorators(node) {
|
74
|
-
return (typescript_1.default.getDecorators(node) ?? [])
|
75
|
-
.map(node => {
|
76
|
-
const decoratorIdentifier = this.#getDecoratorIdentifier(node);
|
77
|
-
if (!decoratorIdentifier)
|
78
|
-
return undefined;
|
79
|
-
const { identifier, args } = decoratorIdentifier;
|
80
|
-
const { name, module } = getImportSpecifier(identifier, this.#checker) ?? {};
|
81
|
-
return { node, identifier, name, module, args };
|
82
|
-
})
|
83
|
-
.filter((d) => !!d);
|
84
|
-
function getImportSpecifier(node, checker) {
|
85
|
-
const symbol = checker.getSymbolAtLocation(node);
|
86
|
-
const decls = symbol?.getDeclarations() ?? [];
|
87
|
-
for (const decl of decls) {
|
88
|
-
if (typescript_1.default.isImportSpecifier(decl)) {
|
89
|
-
// decl.name is the name for this type used in the local module.
|
90
|
-
// If the type name was overridden in the local module, the original type name is stored in decl.propertyName.
|
91
|
-
// Otherwise, decl.propertyName is undefined.
|
92
|
-
const name = (decl.propertyName ?? decl.name).getText();
|
93
|
-
// comment in TS AST declaration indicates moduleSpecifier *must* be a string literal
|
94
|
-
// "If [ImportDeclaration.moduleSpecifier] is not a StringLiteral it will be a grammar error."
|
95
|
-
const module = decl.parent.parent.parent.moduleSpecifier;
|
96
|
-
return { name, module: module.text };
|
97
|
-
}
|
98
|
-
}
|
99
|
-
return undefined;
|
100
|
-
}
|
101
|
-
}
|
102
|
-
}
|
103
|
-
exports.TypeParser = TypeParser;
|
104
|
-
//# sourceMappingURL=TypeParser.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"TypeParser.js","sourceRoot":"","sources":["../../../src/dbos-runtime/TypeParser.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,6CAAgE;AA+BhE,SAAS,cAAc,CAAC,IAA0B;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC;IAClC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,oBAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAChE,CAAC;AAED,MAAa,UAAU;IACZ,QAAQ,CAAa;IACrB,QAAQ,CAAiB;IACzB,MAAM,GAAG,IAAI,iCAAoB,EAAE,CAAC;IAC7C,IAAI,KAAK,KAAK,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAEzC,YA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AO,EAAE,CAAC;oBAExD,qFAAqF;oBACrF,iGAAiG;oBACjG,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,eAAmC,CAAC;oBAE7E,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;iBACtC;aACF;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;CACF;AAtGD,gCAsGC"}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import ts from 'typescript';
|
2
|
-
import { DecoratorInfo, MethodInfo, ClassInfo, ParameterInfo } from './TypeParser';
|
3
|
-
import { APITypes, ArgSources } from '../httpServer/handler';
|
4
|
-
import { Schema } from 'ts-json-schema-generator';
|
5
|
-
import { OpenAPIV3 as OpenApi3 } from 'openapi-types';
|
6
|
-
interface HttpEndpointInfo {
|
7
|
-
verb: APITypes;
|
8
|
-
path: string;
|
9
|
-
}
|
10
|
-
export declare class OpenApiGenerator {
|
11
|
-
#private;
|
12
|
-
readonly program: ts.Program;
|
13
|
-
get diags(): readonly ts.Diagnostic[];
|
14
|
-
constructor(program: ts.Program);
|
15
|
-
generate(classes: readonly ClassInfo[], title: string, version: string): OpenApi3.Document | undefined;
|
16
|
-
generatePath(method: MethodInfo, { verb, path }: HttpEndpointInfo, defaultRoles: readonly string[], securityScheme: string | undefined): [string, OpenApi3.PathItemObject] | undefined;
|
17
|
-
getMethodReturnType(node: ts.MethodDeclaration): ts.Type | undefined;
|
18
|
-
generateResponse(method: MethodInfo): [string, OpenApi3.ResponseObject] | undefined;
|
19
|
-
generateParameters(sourcedParams: [ParameterInfo, ArgSources][]): OpenApi3.ParameterObject[];
|
20
|
-
generateParameter(parameter: ParameterInfo, argSource: ArgSources): OpenApi3.ParameterObject | undefined;
|
21
|
-
getLocation(parameter: ParameterInfo, argSource: ArgSources): "query" | "path" | undefined;
|
22
|
-
generateRequestBody(sourcedParams: [ParameterInfo, ArgSources][]): OpenApi3.RequestBodyObject | undefined;
|
23
|
-
generateSchema(node?: ts.Node): OpenApi3.SchemaObject | OpenApi3.ReferenceObject | undefined;
|
24
|
-
getDBOSDecorator(decorated: MethodInfo | ParameterInfo | ClassInfo, name: string): DecoratorInfo | undefined;
|
25
|
-
getHttpInfo(method: MethodInfo): HttpEndpointInfo | undefined;
|
26
|
-
getParamSource(parameter: ParameterInfo, verb: APITypes): ArgSources.BODY | ArgSources.QUERY | ArgSources.URL | undefined;
|
27
|
-
getParamName(parameter: ParameterInfo): string | undefined;
|
28
|
-
mapSchema(schema: Schema): OpenApi3.SchemaObject | OpenApi3.ReferenceObject | undefined;
|
29
|
-
parseStringLiteralArray(node: ts.Expression | undefined): string[] | undefined;
|
30
|
-
parseSecurityScheme(arg?: ts.Expression): SecurityScheme | undefined;
|
31
|
-
}
|
32
|
-
type SecurityScheme = Exclude<OpenApi3.SecuritySchemeObject, OpenApi3.OAuth2SecurityScheme>;
|
33
|
-
export declare function generateOpenApi(entrypoint: string): Promise<OpenApi3.Document | undefined>;
|
34
|
-
export {};
|
35
|
-
//# sourceMappingURL=openApi.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"openApi.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/openApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,UAAU,EAAc,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAmG,MAAM,EAAuD,MAAM,0BAA0B,CAAC;AACxM,OAAO,EAAE,SAAS,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAOtD,UAAU,gBAAgB;IAAG,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;CAAE;AAqD5D,qBAAa,gBAAgB;;IAQf,QAAQ,CAA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