@dbos-inc/dbos-sdk 0.7.25-preview → 0.7.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/dist/src/cloud-cli/cli.js +19 -7
  2. package/dist/src/cloud-cli/cli.js.map +1 -1
  3. package/dist/src/cloud-cli/userdb.d.ts +2 -0
  4. package/dist/src/cloud-cli/userdb.d.ts.map +1 -1
  5. package/dist/src/cloud-cli/userdb.js +78 -5
  6. package/dist/src/cloud-cli/userdb.js.map +1 -1
  7. package/dist/src/communicator.d.ts +2 -1
  8. package/dist/src/communicator.d.ts.map +1 -1
  9. package/dist/src/communicator.js.map +1 -1
  10. package/dist/src/context.d.ts +2 -2
  11. package/dist/src/context.d.ts.map +1 -1
  12. package/dist/src/context.js +7 -7
  13. package/dist/src/context.js.map +1 -1
  14. package/dist/src/dbos-executor.d.ts +1 -0
  15. package/dist/src/dbos-executor.d.ts.map +1 -1
  16. package/dist/src/dbos-executor.js +40 -24
  17. package/dist/src/dbos-executor.js.map +1 -1
  18. package/dist/src/dbos-runtime/config.d.ts +3 -0
  19. package/dist/src/dbos-runtime/config.d.ts.map +1 -1
  20. package/dist/src/dbos-runtime/config.js.map +1 -1
  21. package/dist/src/dbos-runtime/runtime.d.ts +1 -1
  22. package/dist/src/dbos-runtime/runtime.d.ts.map +1 -1
  23. package/dist/src/dbos-runtime/runtime.js +9 -9
  24. package/dist/src/dbos-runtime/runtime.js.map +1 -1
  25. package/dist/src/debugger/debug_workflow.d.ts +8 -8
  26. package/dist/src/debugger/debug_workflow.d.ts.map +1 -1
  27. package/dist/src/debugger/debug_workflow.js +106 -35
  28. package/dist/src/debugger/debug_workflow.js.map +1 -1
  29. package/dist/src/httpServer/handler.d.ts +1 -1
  30. package/dist/src/httpServer/handler.d.ts.map +1 -1
  31. package/dist/src/httpServer/handler.js +14 -14
  32. package/dist/src/httpServer/handler.js.map +1 -1
  33. package/dist/src/httpServer/server.d.ts +3 -3
  34. package/dist/src/httpServer/server.d.ts.map +1 -1
  35. package/dist/src/httpServer/server.js +17 -17
  36. package/dist/src/httpServer/server.js.map +1 -1
  37. package/dist/src/system_database.d.ts +2 -0
  38. package/dist/src/system_database.d.ts.map +1 -1
  39. package/dist/src/system_database.js +9 -2
  40. package/dist/src/system_database.js.map +1 -1
  41. package/dist/src/testing/testing_runtime.d.ts.map +1 -1
  42. package/dist/src/testing/testing_runtime.js +7 -1
  43. package/dist/src/testing/testing_runtime.js.map +1 -1
  44. package/dist/src/workflow.d.ts +14 -1
  45. package/dist/src/workflow.d.ts.map +1 -1
  46. package/dist/src/workflow.js +90 -53
  47. package/dist/src/workflow.js.map +1 -1
  48. package/examples/hello/README.md +1 -1
  49. package/examples/hello/dbos-config.yaml +3 -0
  50. package/package.json +1 -1
@@ -115,36 +115,48 @@ applicationCommands
115
115
  //////////////////////////////
116
116
  /* USER DATABASE MANAGEMENT */
117
117
  //////////////////////////////
118
- const userdb = program
118
+ const userdbCommands = program
119
119
  .command('userdb')
120
120
  .description('Manage your databases')
121
121
  .option('-h, --host <string>', 'Specify the host', DEFAULT_HOST)
122
122
  .option('-p, --port <string>', 'Specify the port', DEFAULT_PORT);
123
- userdb
123
+ userdbCommands
124
124
  .command('create')
125
125
  .argument('<string>', 'database name')
126
126
  .option('-a, --admin <string>', 'Specify the admin user', 'postgres')
127
127
  .option('-W, --password <string>', 'Specify the admin password', 'postgres')
128
128
  .option('-s, --sync', 'make synchronous call', false)
129
129
  .action((async (dbname, options) => {
130
- const { host, port } = applicationCommands.opts();
130
+ const { host, port } = userdbCommands.opts();
131
131
  await (0, userdb_1.createUserDb)(host, port, dbname, options.admin, options.password, options.sync);
132
132
  }));
133
- userdb
133
+ userdbCommands
134
134
  .command('status')
135
135
  .argument('<string>', 'database name')
136
136
  .action((async (dbname) => {
137
- const { host, port } = applicationCommands.opts();
137
+ const { host, port } = userdbCommands.opts();
138
138
  await (0, userdb_1.getUserDb)(host, port, dbname);
139
139
  }));
140
- userdb
140
+ userdbCommands
141
141
  .command('delete')
142
142
  .argument('<string>', 'database name')
143
143
  .option('-s, --sync', 'make synchronous call', false)
144
144
  .action((async (dbname, options) => {
145
- const { host, port } = applicationCommands.opts();
145
+ const { host, port } = userdbCommands.opts();
146
146
  await (0, userdb_1.deleteUserDb)(host, port, dbname, options.sync);
147
147
  }));
148
+ userdbCommands
149
+ .command('migrate')
150
+ .action((() => {
151
+ const exitCode = (0, userdb_1.migrate)();
152
+ process.exit(exitCode);
153
+ }));
154
+ userdbCommands
155
+ .command('rollbackmigration')
156
+ .action((() => {
157
+ const exitCode = (0, userdb_1.rollbackmigration)();
158
+ process.exit(exitCode);
159
+ }));
148
160
  program.parse(process.argv);
149
161
  // If no arguments provided, display help by default
150
162
  if (!process.argv.slice(2).length) {
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/cloud-cli/cli.ts"],"names":[],"mappings":";;;AAEA,kDAQyB;AACzB,yCAAoC;AACpC,mCAAgC;AAChC,yCAA0C;AAC1C,qCAAiE;AACjE,mCAA2C;AAE3C,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,MAAM,YAAY,GAAG,WAAW,CAAA;AAChC,MAAM,YAAY,GAAG,MAAM,CAAA;AAE3B,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,CAAA;AACx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AAO,CAAC,IAAI,CAAC,CAAA;AACtD,CAAC,CAAC,CAAC,CAAA;AAEL,cAAc;KACX,OAAO,CAAC,SAAS,CAAC;KAClB,MAAM,CAAC,CAAC,GAAG,EAAE;IACZ,MAAM,QAAQ,GAAG,IAAA,gBAAO,GAAE,CAAC;IAC3B,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;IACjC,OAAO,CAAC,UAAU,EAAE,CAAC;CACtB"}
@@ -1,4 +1,6 @@
1
1
  export declare function createUserDb(host: string, port: string, dbName: string, adminName: string, adminPassword: string, sync: boolean): Promise<void>;
2
2
  export declare function deleteUserDb(host: string, port: string, dbName: string, sync: boolean): Promise<void>;
3
3
  export declare function getUserDb(host: string, port: string, dbName: string): Promise<void>;
4
+ export declare function migrate(): number;
5
+ export declare function rollbackmigration(): number;
4
6
  //# sourceMappingURL=userdb.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"userdb.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":"AAKA,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,iBAuDrI;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,iBAuD3F;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAczE"}
1
+ {"version":3,"file":"userdb.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":"AAOA,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,iBA0DrI;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,iBAsD3F;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAczE;AAED,wBAAgB,OAAO,IAAI,MAAM,CAgDhC;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CA4B1C"}
@@ -3,17 +3,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getUserDb = exports.deleteUserDb = exports.createUserDb = void 0;
6
+ exports.rollbackmigration = exports.migrate = exports.getUserDb = exports.deleteUserDb = exports.createUserDb = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
8
  const logs_1 = require("../telemetry/logs");
9
9
  const utils_1 = require("./utils");
10
10
  const utils_2 = require("../utils");
11
+ const config_1 = require("../dbos-runtime/config");
12
+ const child_process_1 = require("child_process");
11
13
  async function createUserDb(host, port, dbName, adminName, adminPassword, sync) {
12
14
  const logger = (0, logs_1.createGlobalLogger)();
13
15
  const userCredentials = (0, utils_1.getCloudCredentials)();
14
16
  const bearerToken = "Bearer " + userCredentials.token;
15
17
  try {
16
- await axios_1.default.post(`http://${host}:${port}/${userCredentials.userName}/databases/userdb`, { "Name": dbName, "AdminName": adminName, "AdminPassword": adminPassword }, {
18
+ await axios_1.default.post(`http://${host}:${port}/${userCredentials.userName}/databases/userdb`, { Name: dbName, AdminName: adminName, AdminPassword: adminPassword }, {
17
19
  headers: {
18
20
  "Content-Type": "application/json",
19
21
  Authorization: bearerToken,
@@ -40,7 +42,7 @@ async function createUserDb(host, port, dbName, adminName, adminPassword, sync)
40
42
  logger.info("Saving db state to cloud db");
41
43
  await axios_1.default.put(`http://${host}:${port}/${userCredentials.userName}/databases/userdb/info`,
42
44
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
43
- { "Name": dbName, "Status": status, "HostName": dbhostname, "Port": dbport }, {
45
+ { DBName: dbName, Status: status, HostName: dbhostname, Port: dbport }, {
44
46
  headers: {
45
47
  "Content-Type": "application/json",
46
48
  Authorization: bearerToken,
@@ -92,7 +94,7 @@ async function deleteUserDb(host, port, dbName, sync) {
92
94
  }
93
95
  // Update the clouddb info record
94
96
  logger.info("Saving db state to cloud db");
95
- await axios_1.default.put(`http://${host}:${port}/${userCredentials.userName}/databases/userdb/info`, { "Name": dbName, "Status": "deleted", "HostName": "", "Port": 0 }, {
97
+ await axios_1.default.put(`http://${host}:${port}/${userCredentials.userName}/databases/userdb/info`, { Name: dbName, Status: "deleted", HostName: "", Port: 0 }, {
96
98
  headers: {
97
99
  "Content-Type": "application/json",
98
100
  Authorization: bearerToken,
@@ -127,6 +129,77 @@ async function getUserDb(host, port, dbName) {
127
129
  }
128
130
  }
129
131
  exports.getUserDb = getUserDb;
132
+ function migrate() {
133
+ const logger = (0, logs_1.createGlobalLogger)();
134
+ // read the yaml file
135
+ const configFile = (0, config_1.loadConfigFile)(config_1.dbosConfigFilePath);
136
+ if (!configFile) {
137
+ logger.error(`failed to parse ${config_1.dbosConfigFilePath}`);
138
+ return 1;
139
+ }
140
+ let create_db = configFile.database.create_db;
141
+ if (create_db == undefined) {
142
+ create_db = false;
143
+ }
144
+ const userdbname = configFile.database.user_database;
145
+ if (create_db) {
146
+ logger.info(`Creating database ${userdbname}`);
147
+ const cmd = `createdb -h ${configFile.database.hostname} -p ${configFile.database.port} ${userdbname} -U ${configFile.database.username} -w ${configFile.database.password} -e`;
148
+ logger.info(cmd);
149
+ try {
150
+ (0, child_process_1.execSync)(cmd);
151
+ }
152
+ catch (e) {
153
+ logger.error("Database already exists or could not be created.");
154
+ return 1;
155
+ }
156
+ }
157
+ let dbType = configFile.database.user_dbclient;
158
+ if (dbType == undefined) {
159
+ dbType = "knex";
160
+ }
161
+ const migratecommands = configFile.database.migrate;
162
+ try {
163
+ migratecommands?.forEach((cmd) => {
164
+ const command = "npx " + dbType + " " + cmd;
165
+ logger.info("Executing " + command);
166
+ (0, child_process_1.execSync)(command);
167
+ });
168
+ }
169
+ catch (e) {
170
+ logger.error("Error running migration. Check database and if necessary, run npx dbos-cloud userdb rollback.");
171
+ return 1;
172
+ }
173
+ return 0;
174
+ }
175
+ exports.migrate = migrate;
176
+ function rollbackmigration() {
177
+ const logger = (0, logs_1.createGlobalLogger)();
178
+ // read the yaml file
179
+ const configFile = (0, config_1.loadConfigFile)(config_1.dbosConfigFilePath);
180
+ if (!configFile) {
181
+ logger.error(`failed to parse ${config_1.dbosConfigFilePath}`);
182
+ return 1;
183
+ }
184
+ let dbType = configFile.database.user_dbclient;
185
+ if (dbType == undefined) {
186
+ dbType = "knex";
187
+ }
188
+ const rollbackcommands = configFile.database.rollback;
189
+ try {
190
+ rollbackcommands?.forEach((cmd) => {
191
+ const command = "npx " + dbType + " " + cmd;
192
+ logger.info("Executing " + command);
193
+ (0, child_process_1.execSync)(command);
194
+ });
195
+ }
196
+ catch (e) {
197
+ logger.error("Error rolling back migration. ");
198
+ return 1;
199
+ }
200
+ return 0;
201
+ }
202
+ exports.rollbackmigration = rollbackmigration;
130
203
  // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-explicit-any
131
204
  async function getDb(host, port, dbName) {
132
205
  const userCredentials = (0, utils_1.getCloudCredentials)();
@@ -143,7 +216,7 @@ async function getDb(host, port, dbName) {
143
216
  return res.data;
144
217
  }
145
218
  else {
146
- return { "Status": "notfound" };
219
+ return { Status: "notfound" };
147
220
  }
148
221
  }
149
222
  //# sourceMappingURL=userdb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"userdb.js","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAuD;AACvD,mCAA8C;AAC9C,oCAAgC;AAEzB,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,IAAY,EAAE,MAAc,EAAE,SAAiB,EAAE,aAAqB,EAAE,IAAa;IACpI,MAAM,MAAM,GAAG,IAAA,yBAAkB,GAAE,CAAC;IACpC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,IAAI;QACF,MAAM,eAAK,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,mBAAmB,EACtF,EAAC,MAAM,EAAE,MAAM,EAAC,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAC,EACvE;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,2CAA2C,MAAM,EAAE,CAAC,CAAC;QAEjE,IAAG,IAAI,EAAE;YACP,IAAI,MAAM,GAAG,EAAE,CAAA;YACf,IAAI,IAAI,CAAA;YACR,OAAO,MAAM,IAAI,WAAW,EAAE;gBAC5B,MAAM,IAAA,aAAK,EAAC,KAAK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G,KAAK,UAAU,KAAK,CAAC,IAAY,EAAE,IAAY,EAAE,MAAc;IAC7D,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,qBAAqB,MAAM,EAAE,EAAE;QAC3G,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,WAAW;SAC3B;KACF,CAAC,CAAC;IAEH,6GAA6G;IAC7G,IAAI,GAAG,CAAC,MAAM,IAAI,eAAK,CAAC,cAAc,CAAC,EAAE,EAAE;QACzC,+DAA+D;QAC/D,OAAO,GAAG,CAAC,IAAI,CAAC;KACjB;SAAM;QACL,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;KAC/B;AACH,CAAC"}
@@ -2,6 +2,7 @@ import { Span } from "@opentelemetry/sdk-trace-base";
2
2
  import { WinstonLogger as Logger } from "./telemetry/logs";
3
3
  import { WorkflowContextImpl } from "./workflow";
4
4
  import { DBOSContext, DBOSContextImpl } from "./context";
5
+ import { WorkflowContextDebug } from "./debugger/debug_workflow";
5
6
  export type Communicator<T extends any[], R> = (ctxt: CommunicatorContext, ...args: T) => Promise<R>;
6
7
  export interface CommunicatorConfig {
7
8
  retriesAllowed?: boolean;
@@ -19,6 +20,6 @@ export declare class CommunicatorContextImpl extends DBOSContextImpl implements
19
20
  readonly intervalSeconds: number;
20
21
  readonly maxAttempts: number;
21
22
  readonly backoffRate: number;
22
- constructor(workflowContext: WorkflowContextImpl, functionID: number, span: Span, logger: Logger, params: CommunicatorConfig, commName: string);
23
+ constructor(workflowContext: WorkflowContextImpl | WorkflowContextDebug, functionID: number, span: Span, logger: Logger, params: CommunicatorConfig, commName: string);
23
24
  }
24
25
  //# sourceMappingURL=communicator.d.ts.map
@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,EAAE,MAAM;CAYtK"}
@@ -1 +1 @@
1
- {"version":3,"file":"communicator.js","sourceRoot":"","sources":["../../src/communicator.ts"],"names":[],"mappings":";;;AAGA,uCAAyD;AAkBzD,MAAa,uBAAwB,SAAQ,yBAAe;IAEjD,UAAU,CAAS;IACnB,cAAc,CAAU;IACxB,eAAe,CAAS;IACxB,WAAW,CAAS;IACpB,WAAW,CAAS;IAE7B,iCAAiC;IACjC,YAAY,eAAoC,EAAE,UAAkB,EAAE,IAAU,EAAE,MAAc,EAAE,MAA0B,EAAE,QAAgB;QAC5I,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,IAAI,IAAI,CAAC;QACpD,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,CAAC,CAAC;QAC3C,IAAI,eAAe,CAAC,iBAAiB,EAAE;YACrC,mEAAmE;YAClE,IAAI,CAAC,iBAAiB,GAAG,eAAe,CAAC,iBAAiB,CAAC;SAC7D;IACH,CAAC;CACF;AArBD,0DAqBC"}
1
+ {"version":3,"file":"communicator.js","sourceRoot":"","sources":["../../src/communicator.ts"],"names":[],"mappings":";;;AAGA,uCAAyD;AAmBzD,MAAa,uBAAwB,SAAQ,yBAAe;IACjD,UAAU,CAAS;IACnB,cAAc,CAAU;IACxB,eAAe,CAAS;IACxB,WAAW,CAAS;IACpB,WAAW,CAAS;IAE7B,iCAAiC;IACjC,YAAY,eAA2D,EAAE,UAAkB,EAAE,IAAU,EAAE,MAAc,EAAE,MAA0B,EAAE,QAAgB;QACnK,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,IAAI,IAAI,CAAC;QACpD,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,CAAC,CAAC;QAC3C,IAAI,eAAe,CAAC,iBAAiB,EAAE;YACrC,mEAAmE;YACnE,IAAI,CAAC,iBAAiB,GAAG,eAAe,CAAC,iBAAiB,CAAC;SAC5D;IACH,CAAC;CACF;AApBD,0DAoBC"}
@@ -47,11 +47,11 @@ export declare class DBOSContextImpl implements DBOSContext {
47
47
  * TODO : move logger and application, getConfig to a BaseContext which is at the root of all contexts
48
48
  */
49
49
  export declare class InitContext {
50
- readonly wfe: DBOSExecutor;
50
+ readonly dbosExec: DBOSExecutor;
51
51
  readonly logger: Logger;
52
52
  private userDatabase;
53
53
  private application;
54
- constructor(wfe: DBOSExecutor);
54
+ constructor(dbosExec: DBOSExecutor);
55
55
  createUserSchema(): Promise<void>;
56
56
  dropUserSchema(): Promise<void>;
57
57
  queryUserDB<R>(sql: string, ...params: unknown[]): Promise<R[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAA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
@@ -50,18 +50,18 @@ exports.DBOSContextImpl = DBOSContextImpl;
50
50
  * TODO : move logger and application, getConfig to a BaseContext which is at the root of all contexts
51
51
  */
52
52
  class InitContext {
53
- wfe;
53
+ dbosExec;
54
54
  logger;
55
55
  // All private Not exposed
56
56
  userDatabase;
57
57
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
58
58
  application;
59
- constructor(wfe) {
60
- this.wfe = wfe;
61
- this.logger = wfe.logger;
62
- this.userDatabase = wfe.userDatabase;
59
+ constructor(dbosExec) {
60
+ this.dbosExec = dbosExec;
61
+ this.logger = dbosExec.logger;
62
+ this.userDatabase = dbosExec.userDatabase;
63
63
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
64
- this.application = wfe.config.application;
64
+ this.application = dbosExec.config.application;
65
65
  }
66
66
  createUserSchema() {
67
67
  return this.userDatabase.createSchema();
@@ -83,7 +83,7 @@ class InitContext {
83
83
  }
84
84
  // If the key is found and the default value is provided, check whether the value is of the same type.
85
85
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
86
- const value = (0, lodash_1.get)(this.wfe.config.application, key);
86
+ const value = (0, lodash_1.get)(this.dbosExec.config.application, key);
87
87
  if (defaultValue && typeof value !== typeof defaultValue) {
88
88
  throw new error_1.DBOSConfigKeyTypeError(key, typeof defaultValue, typeof value);
89
89
  }
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":";;;AACA,2CAAiF;AACjF,mCAAkC;AAKlC,mCAAiD;AA8BjD,MAAa,eAAe;IAQL;IAAgC;IAPrD,OAAO,GAAgB,EAAE,CAAC,CAAU,6BAA6B;IACjE,iBAAiB,GAAW,EAAE,CAAC,CAAK,uCAAuC;IAC3E,kBAAkB,GAAa,EAAE,CAAC,CAAE,qDAAqD;IACzF,WAAW,GAAW,EAAE,CAAC,CAAW,6EAA6E;IACjH,YAAY,GAAW,EAAE,CAAC,CAAU,4CAA4C;IACvE,MAAM,C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CAAC;SAClB;QAED,sGAAsG;QACtG,mEAAmE;QACnE,MAAM,KAAK,GAAG,IAAA,YAAG,EAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QACzD,IAAI,YAAY,IAAI,OAAO,KAAK,KAAK,OAAO,YAAY,EAAE;YACxD,MAAM,IAAI,8BAAsB,CAAC,GAAG,EAAE,OAAO,YAAY,EAAE,OAAO,KAAK,CAAC,CAAC;SAC1E;QAED,OAAO,KAAU,CAAC;IACpB,CAAC;CACF;AAjDD,kCAiDC"}
@@ -39,6 +39,7 @@ export declare class DBOSExecutor {
39
39
  readonly communicatorConfigMap: Map<string, CommunicatorConfig>;
40
40
  readonly registeredOperations: Array<MethodRegistrationBase>;
41
41
  readonly pendingWorkflowMap: Map<string, Promise<unknown>>;
42
+ readonly pendingAsyncWrites: Map<string, Promise<unknown>>;
42
43
  readonly telemetryCollector: TelemetryCollector;
43
44
  readonly flushBufferIntervalMs: number;
44
45
  readonly flushBufferID: NodeJS.Timeout;
@@ -1 +1 @@
1
- {"version":3,"file":"dbos-executor.d.ts","sourceRoot":"","sources":["../../src/dbos-executor.ts"],"names":[],"mappings":";AAQA,OAAO,EAEL,QAAQ,EACR,cAAc,EAEd,cAAc,EACd,cAAc,EAIf,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAsB,aAAa,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OA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OAAO,CAAC,CAAC,CAAC;IASvG,QAAQ,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IASxG,IAAI,CAAC,CAAC,SAAS,WAAW,CAAC,GAAG,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASnI;;OAEG;IACG,QAAQ,CAAC,CAAC,SAAS,WAAW,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,GAAE,MAAmD,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAIrK;;OAEG;IACH,gBAAgB,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC;IAS5D;;;OAGG;IACG,uBAAuB,CAAC,WAAW,GAAE,MAAM,EAAc,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;IA4ChG;;OAEG;IACG,yBAAyB;IAM/B,qBAAqB;CAatB"}
@@ -7,6 +7,7 @@ exports.DBOSExecutor = exports.dbosNull = void 0;
7
7
  /* eslint-disable @typescript-eslint/no-explicit-any */
8
8
  const error_1 = require("./error");
9
9
  const workflow_1 = require("./workflow");
10
+ const transaction_1 = require("./transaction");
10
11
  const exporters_1 = require("./telemetry/exporters");
11
12
  const collector_1 = require("./telemetry/collector");
12
13
  const traces_1 = require("./telemetry/traces");
@@ -43,7 +44,8 @@ class DBOSExecutor {
43
44
  transactionConfigMap = new Map();
44
45
  communicatorConfigMap = new Map();
45
46
  registeredOperations = [];
46
- pendingWorkflowMap = new Map(); // Map from workflowUUID to workflow promise.
47
+ pendingWorkflowMap = new Map(); // Map from workflowUUID to workflow promise
48
+ pendingAsyncWrites = new Map(); // Map from workflowUUID to asynchronous write promise
47
49
  telemetryCollector;
48
50
  flushBufferIntervalMs = 1000;
49
51
  flushBufferID;
@@ -60,6 +62,16 @@ class DBOSExecutor {
60
62
  this.logger = (0, logs_1.createGlobalLogger)(this.config.telemetry?.logs);
61
63
  if (this.debugMode) {
62
64
  this.logger.info("Running in debug mode!");
65
+ try {
66
+ const url = new URL(this.config.debugProxy);
67
+ this.config.poolConfig.host = url.hostname;
68
+ this.config.poolConfig.port = parseInt(url.port, 10);
69
+ this.logger.info(`Debugging mode proxy: ${this.config.poolConfig.host}:${this.config.poolConfig.port}`);
70
+ }
71
+ catch (err) {
72
+ this.logger.error(err);
73
+ throw err;
74
+ }
63
75
  }
64
76
  if (systemDatabase) {
65
77
  this.logger.debug("Using provided system database"); // XXX print the name or something
@@ -87,19 +99,7 @@ class DBOSExecutor {
87
99
  }
88
100
  configureDbClient() {
89
101
  const userDbClient = this.config.userDbclient;
90
- const userDBConfig = JSON.parse(JSON.stringify(this.config.poolConfig)); // Deep copy
91
- if (this.debugMode) {
92
- try {
93
- const url = new URL(this.config.debugProxy);
94
- userDBConfig.host = url.hostname;
95
- userDBConfig.port = parseInt(url.port, 10);
96
- this.logger.info(`Debugging mode proxy: ${userDBConfig.host}:${userDBConfig.port}`);
97
- }
98
- catch (err) {
99
- this.logger.error(err);
100
- return;
101
- }
102
- }
102
+ const userDBConfig = this.config.poolConfig;
103
103
  if (userDbClient === user_database_1.UserDatabaseName.PRISMA) {
104
104
  // TODO: make Prisma work with debugger proxy.
105
105
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
@@ -204,6 +204,9 @@ class DBOSExecutor {
204
204
  this.logger.error(`failed to initialize workflow executor: ${err.message}`, err, err.stack);
205
205
  throw new error_1.DBOSInitializationError(err.message);
206
206
  }
207
+ else {
208
+ throw err;
209
+ }
207
210
  }
208
211
  this.initialized = true;
209
212
  // Only execute init code if under non-debug mode
@@ -223,6 +226,10 @@ class DBOSExecutor {
223
226
  this.logger.info("Waiting for pending workflows to finish.");
224
227
  await Promise.allSettled(this.pendingWorkflowMap.values());
225
228
  }
229
+ if (this.pendingAsyncWrites.size > 0) {
230
+ this.logger.info("Waiting for pending buffer flushes to finish");
231
+ await Promise.allSettled(this.pendingAsyncWrites.values());
232
+ }
226
233
  clearInterval(this.flushBufferID);
227
234
  await this.flushWorkflowStatusBuffer();
228
235
  await this.systemDatabase.destroy();
@@ -261,26 +268,26 @@ class DBOSExecutor {
261
268
  // If callerUUID and functionID are set, it means the workflow is invoked from within a workflow.
262
269
  async internalWorkflow(wf, params, callerUUID, callerFunctionID, ...args) {
263
270
  const workflowUUID = params.workflowUUID ? params.workflowUUID : this.#generateUUID();
271
+ const presetUUID = params.workflowUUID ? true : false;
264
272
  const wInfo = this.workflowInfoMap.get(wf.name);
265
273
  if (wInfo === undefined) {
266
274
  throw new error_1.DBOSNotRegisteredError(wf.name);
267
275
  }
268
276
  const wConfig = wInfo.config;
269
- const wCtxt = new workflow_1.WorkflowContextImpl(this, params.parentCtx, workflowUUID, wConfig, wf.name);
277
+ const wCtxt = new workflow_1.WorkflowContextImpl(this, params.parentCtx, workflowUUID, wConfig, wf.name, presetUUID);
270
278
  wCtxt.span.setAttributes({ args: JSON.stringify(args) }); // TODO enforce skipLogging & request for hashing
271
- // Synchronously set the workflow's status to PENDING and record workflow inputs. Not needed for temporary workflows.
279
+ // Synchronously set the workflow's status to PENDING and record workflow inputs.
272
280
  if (!wCtxt.isTempWorkflow) {
273
281
  args = await this.systemDatabase.initWorkflowStatus(workflowUUID, wf.name, wCtxt.authenticatedUser, wCtxt.assumedRole, wCtxt.authenticatedRoles, wCtxt.request, args);
274
282
  }
283
+ else {
284
+ // For temporary workflows, instead asynchronously record inputs.
285
+ const setWorkflowInputs = this.systemDatabase.setWorkflowInputs(workflowUUID, args)
286
+ .catch(error => { this.logger.error('Error asynchronously setting workflow inputs', error); })
287
+ .finally(() => { this.pendingAsyncWrites.delete(workflowUUID); });
288
+ this.pendingAsyncWrites.set(workflowUUID, setWorkflowInputs);
289
+ }
275
290
  const runWorkflow = async () => {
276
- // Check if the workflow previously ran.
277
- const previousOutput = await this.systemDatabase.checkWorkflowOutput(workflowUUID);
278
- if (previousOutput !== exports.dbosNull) {
279
- wCtxt.span.setAttribute("cached", true);
280
- wCtxt.span.setStatus({ code: api_1.SpanStatusCode.OK });
281
- this.tracer.endSpan(wCtxt.span);
282
- return previousOutput;
283
- }
284
291
  let result;
285
292
  // Execute the workflow.
286
293
  try {
@@ -309,6 +316,15 @@ class DBOSExecutor {
309
316
  finally {
310
317
  this.tracer.endSpan(wCtxt.span);
311
318
  }
319
+ // Asynchronously flush the result buffer.
320
+ const resultBufferFlush = this.userDatabase.transaction(async (client) => {
321
+ if (wCtxt.resultBuffer.size > 0) {
322
+ await wCtxt.flushResultBuffer(client);
323
+ }
324
+ }, { isolationLevel: transaction_1.IsolationLevel.ReadCommitted })
325
+ .catch(error => { this.logger.error('Error asynchronously flushing result buffer', error); })
326
+ .finally(() => { this.pendingAsyncWrites.delete(workflowUUID); });
327
+ this.pendingAsyncWrites.set(workflowUUID, resultBufferFlush);
312
328
  return result;
313
329
  };
314
330
  const workflowPromise = runWorkflow();
@@ -1 +1 @@
1
- {"version":3,"file":"dbos-executor.js","sourceRoot":"","sources":["../../src/dbos-executor.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAuD;AACvD,mCAMiB;AACjB,yCAUoB;AAIpB,qDAAuD;AACvD,qDAA2D;AAC3D,+CAA4C;AAC5C,2CAA+E;AAG/E,uDAA2E;AAC3E,+BAAoC;AACpC,mDAOyB;AACzB,6CAAiI;AACjI,4CAAoD;AACpD,gDAAkC;AAClC,uCAAyD;AAEzD,8DAAiE;AAGpD,QAAA,QAAQ,GAAa,EAAE,CAAC;AAmBrC,MAAa,YAAY;IAwCF;IAvCrB,WAAW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AAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACpC,EAAE,CAAC,YAAY,GAAG,YAAY,CAAC;QAC/B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,0BAA0B;IAC1B;;OAEG;IACH,KAAK,CAAC,yBAAyB;QAC7B,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,MAAM,IAAI,CAAC,cAAc,CAAC,yBAAyB,EAAE,CAAC;SACvD;IACH,CAAC;IAED,qBAAqB;QACnB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAC9C,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,mBAAmB,EAAE,EAAE;YACxD,MAAM,EAAE,GAAG,mBAAuE,CAAC;YACnF,IAAI,EAAE,CAAC,MAAM,EAAE;gBACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC;gBACtE,MAAM,KAAK,GAAG,EAAE,CAAC,gBAAgB,EAAE,CAAC;gBACpC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;oBACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;iBACtE;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AAzeH,oCA0eC"}
@@ -17,6 +17,9 @@ export interface ConfigFile {
17
17
  ssl_ca?: string;
18
18
  observability_database: string;
19
19
  user_dbclient?: UserDatabaseName;
20
+ create_db: boolean;
21
+ migrate?: string[];
22
+ rollback?: string[];
20
23
  };
21
24
  telemetry?: TelemetryConfig;
22
25
  application: any;