@dbos-inc/dbos-sdk 0.7.19-preview → 0.7.21-preview

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,7 @@ const commander_1 = require("commander");
6
6
  const login_1 = require("./login");
7
7
  const register_1 = require("./register");
8
8
  const userdb_1 = require("./userdb");
9
+ const utils_1 = require("./utils");
9
10
  const program = new commander_1.Command();
10
11
  const DEFAULT_HOST = "localhost";
11
12
  const DEFAULT_PORT = "8080";
@@ -19,22 +20,26 @@ program.
19
20
  program
20
21
  .command('login')
21
22
  .description('Log in to DBOS cloud')
22
- .requiredOption('-u, --userName <string>', 'User name for login')
23
- .action((options) => {
24
- (0, login_1.login)(options.userName);
23
+ .requiredOption('-u, --username <string>', 'Username')
24
+ .action(async (options) => {
25
+ const exitCode = await (0, login_1.login)(options.username);
26
+ process.exit(exitCode);
25
27
  });
26
28
  program
27
29
  .command('register')
28
30
  .description('Register a user and log in to DBOS cloud')
29
- .requiredOption('-u, --userName <string>', 'User name')
31
+ .requiredOption('-u, --username <string>', 'Username')
30
32
  .option('-h, --host <string>', 'Specify the host', DEFAULT_HOST)
31
33
  .option('-p, --port <string>', 'Specify the port', DEFAULT_PORT)
32
34
  .action(async (options) => {
33
- const success = await (0, register_1.registerUser)(options.userName, options.host, options.port);
34
- // Then, log in as the user.
35
- if (success) {
36
- (0, login_1.login)(options.userName);
35
+ if (!(0, utils_1.credentialsExist)()) {
36
+ const exitCode = await (0, login_1.login)(options.username);
37
+ if (exitCode !== 0) {
38
+ process.exit(exitCode);
39
+ }
37
40
  }
41
+ const exitCode = await (0, register_1.registerUser)(options.username, options.host, options.port);
42
+ process.exit(exitCode);
38
43
  });
39
44
  /////////////////////////////
40
45
  /* APPLICATIONS MANAGEMENT */
@@ -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;AAEjE,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ACH,OAAO,CAAC,QAAQ,CAAC;KACjB,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;KACrC,MAAM,CAAC,YAAY,EAAE,uBAAuB,EAAE,KAAK,CAAC;KACpD,MAAM,CAAC,CAAC,KAAK,EAAE,MAAc,EAAE,OAA0B,EAAE,EAAE;IAC5D,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAmC,mBAAmB,CAAC,IAAI,EAAE,CAAA;IACjF,MAAM,IAAA,qBAAY,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;AACtD,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,7 +1,9 @@
1
1
  export declare const dbosEnvPath = ".dbos";
2
+ export declare const DBOSClientID = "G38fLmVErczEo9ioCFjVIHea6yd0qMZu";
3
+ export declare const DBOSCloudIdentifier = "dbos-cloud-api";
2
4
  export interface DBOSCloudCredentials {
3
5
  token: string;
4
6
  userName: string;
5
7
  }
6
- export declare function login(userName: string): void;
8
+ export declare function login(username: string): Promise<number>;
7
9
  //# sourceMappingURL=login.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/login.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,UAAU,CAAC;AAGnC,MAAM,WAAW,oBAAoB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACjB;AAUD,wBAAgB,KAAK,CAAE,QAAQ,EAAE,MAAM,QA8BtC"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/login.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,YAAY,qCAAqC,CAAA;AAC9D,eAAO,MAAM,mBAAmB,mBAAmB,CAAA;AAEnD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AA8CD,wBAAsB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA2D7D"}
@@ -3,38 +3,99 @@ 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.login = exports.dbosEnvPath = void 0;
7
- const child_process_1 = require("child_process");
8
- const jwt_simple_1 = require("jwt-simple");
6
+ exports.login = exports.DBOSCloudIdentifier = exports.DBOSClientID = exports.dbosEnvPath = void 0;
9
7
  const logs_1 = require("../telemetry/logs");
8
+ const axios_1 = __importDefault(require("axios"));
9
+ const utils_1 = require("../utils");
10
+ const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
11
+ const jwks_rsa_1 = __importDefault(require("jwks-rsa"));
12
+ const child_process_1 = require("child_process");
10
13
  const fs_1 = __importDefault(require("fs"));
11
14
  exports.dbosEnvPath = ".dbos";
12
- const secretKey = "SOME SECRET";
13
- function login(userName) {
15
+ exports.DBOSClientID = 'G38fLmVErczEo9ioCFjVIHea6yd0qMZu';
16
+ exports.DBOSCloudIdentifier = 'dbos-cloud-api';
17
+ const client = (0, jwks_rsa_1.default)({
18
+ jwksUri: 'https://dbos-inc.us.auth0.com/.well-known/jwks.json'
19
+ });
20
+ async function getSigningKey(kid) {
21
+ const key = await client.getSigningKey(kid);
22
+ return key.getPublicKey();
23
+ }
24
+ async function verifyToken(token) {
25
+ const decoded = jsonwebtoken_1.default.decode(token, { complete: true });
26
+ if (!decoded || typeof decoded === 'string' || !decoded.header.kid) {
27
+ throw new Error('Invalid token');
28
+ }
29
+ const signingKey = await getSigningKey(decoded.header.kid);
30
+ return new Promise((resolve, reject) => {
31
+ jsonwebtoken_1.default.verify(token, signingKey, { algorithms: ['RS256'] }, (err, verifiedToken) => {
32
+ if (err) {
33
+ reject(err);
34
+ }
35
+ else {
36
+ resolve(verifiedToken);
37
+ }
38
+ });
39
+ });
40
+ }
41
+ async function login(username) {
14
42
  const logger = (0, logs_1.createGlobalLogger)();
15
- // TODO: in the future, we should integrate with Okta for login.
16
- // Generate a valid JWT token based on the userName and store it in the `./.dbos/credentials` file.
17
- // Then the deploy command can retrieve the token from this file.
18
- logger.info(`Logging in as user: ${userName}`);
19
- const algorithm = "HS256";
20
- const issued = Date.now();
21
- const expires = issued + 1000; // Expires after 1 sec.
22
- const session = {
23
- id: 1,
24
- dateCreated: Date.now(),
25
- username: userName,
26
- issued: issued,
27
- expires: expires
43
+ logger.info(`Logging in!`);
44
+ const deviceCodeRequest = {
45
+ method: 'POST',
46
+ url: 'https://dbos-inc.us.auth0.com/oauth/device/code',
47
+ headers: { 'content-type': 'application/x-www-form-urlencoded' },
48
+ data: { client_id: exports.DBOSClientID, scope: 'sub', audience: exports.DBOSCloudIdentifier }
49
+ };
50
+ let deviceCodeResponse;
51
+ try {
52
+ const response = await axios_1.default.request(deviceCodeRequest);
53
+ deviceCodeResponse = response.data;
54
+ }
55
+ catch (e) {
56
+ logger.error(`failed to log in`, e);
57
+ }
58
+ if (!deviceCodeResponse) {
59
+ return 1;
60
+ }
61
+ console.log(`Login URL: ${deviceCodeResponse.verification_uri_complete}`);
62
+ const tokenRequest = {
63
+ method: 'POST',
64
+ url: 'https://dbos-inc.us.auth0.com/oauth/token',
65
+ headers: { 'content-type': 'application/x-www-form-urlencoded' },
66
+ data: new URLSearchParams({
67
+ grant_type: 'urn:ietf:params:oauth:grant-type:device_code',
68
+ device_code: deviceCodeResponse.device_code,
69
+ client_id: exports.DBOSClientID
70
+ })
28
71
  };
29
- const token = (0, jwt_simple_1.encode)(session, secretKey, algorithm);
72
+ let tokenResponse;
73
+ let elapsedTimeSec = 0;
74
+ while (elapsedTimeSec < deviceCodeResponse.expires_in) {
75
+ try {
76
+ await (0, utils_1.sleep)(deviceCodeResponse.interval * 1000);
77
+ elapsedTimeSec += deviceCodeResponse.interval;
78
+ const response = await axios_1.default.request(tokenRequest);
79
+ tokenResponse = response.data;
80
+ break;
81
+ }
82
+ catch (e) {
83
+ logger.info(`Waiting for login...`);
84
+ }
85
+ }
86
+ if (!tokenResponse) {
87
+ return 1;
88
+ }
89
+ await verifyToken(tokenResponse.access_token);
30
90
  const credentials = {
31
- token,
32
- userName,
91
+ token: tokenResponse.access_token,
92
+ userName: username,
33
93
  };
34
94
  (0, child_process_1.execSync)(`mkdir -p ${exports.dbosEnvPath}`);
35
95
  fs_1.default.writeFileSync(`${exports.dbosEnvPath}/credentials`, JSON.stringify(credentials), "utf-8");
36
- logger.info(`Successfully logged in as user: ${userName}`);
96
+ logger.info(`Successfully logged in as user: ${credentials.userName}`);
37
97
  logger.info(`You can view your credentials in: ./${exports.dbosEnvPath}/credentials`);
98
+ return 0;
38
99
  }
39
100
  exports.login = login;
40
101
  //# sourceMappingURL=login.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/cloud-cli/login.ts"],"names":[],"mappings":";;;;;;AAAA,iDAAyC;AACzC,2CAAgD;AAChD,4CAAuD;AACvD,4CAAoB;AAEP,QAAA,WAAW,GAAG,OAAO,CAAC;AACnC,MAAM,SAAS,GAAG,aAAa,CAAC;AAehC,SAAgB,KAAK,CAAE,QAAgB;IACrC,MAAM,MAAM,GAAG,IAAA,yBAAkB,GAAE,CAAC;IACpC,gEAAgE;IAChE,mGAAmG;IACnG,iEAAiE;IACjE,MAAM,CAAC,IAAI,CAAC,uBAAuB,QAAQ,EAAE,CAAC,CAAC;IAE/C,MAAM,SAAS,GAAe,OAAO,CAAC;IACtC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG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;QACxC,KAAK,EAAE,aAAa,CAAC,YAAY;QACjC,QAAQ,EAAE,QAAQ;KACnB,CAAA;IACD,IAAA,wBAAQ,EAAC,YAAY,mBAAW,EAAE,CAAC,CAAC;IACpC,YAAE,CAAC,aAAa,CAAC,GAAG,mBAAW,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC;IACrF,MAAM,CAAC,IAAI,CAAC,mCAAmC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,MAAM,CAAC,IAAI,CAAC,uCAAuC,mBAAW,cAAc,CAAC,CAAC;IAC9E,OAAO,CAAC,CAAC;AACX,CAAC;AA3DD,sBA2DC"}
@@ -1,2 +1,2 @@
1
- export declare function registerUser(userName: string, host: string, port: string): Promise<boolean>;
1
+ export declare function registerUser(username: string, host: string, port: string): Promise<number>;
2
2
  //# sourceMappingURL=register.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/register.ts"],"names":[],"mappings":"AAGA,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,oBA0B9E"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/register.ts"],"names":[],"mappings":"AAIA,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA8BhG"}
@@ -6,7 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.registerUser = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
8
  const logs_1 = require("../telemetry/logs");
9
- async function registerUser(userName, host, port) {
9
+ const utils_1 = require("./utils");
10
+ async function registerUser(username, host, port) {
11
+ const userCredentials = (0, utils_1.getCloudCredentials)();
12
+ const bearerToken = "Bearer " + userCredentials.token;
13
+ const userName = userCredentials.userName;
10
14
  const logger = (0, logs_1.createGlobalLogger)();
11
15
  try {
12
16
  // First, register the user.
@@ -15,6 +19,7 @@ async function registerUser(userName, host, port) {
15
19
  }, {
16
20
  headers: {
17
21
  "Content-Type": "application/json",
22
+ Authorization: bearerToken,
18
23
  },
19
24
  });
20
25
  const userUUID = register.data;
@@ -27,9 +32,9 @@ async function registerUser(userName, host, port) {
27
32
  else {
28
33
  logger.error(`failed to register user ${userName}: ${e.message}`);
29
34
  }
30
- return false;
35
+ return 1;
31
36
  }
32
- return true;
37
+ return 0;
33
38
  }
34
39
  exports.registerUser = registerUser;
35
40
  //# sourceMappingURL=register.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/cloud-cli/register.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAuD;AAEhD,KAAK,UAAU,YAAY,CAAC,QAAgB,EAAE,IAAY,EAAE,IAAY;IAC7E,MAAM,MAAM,GAAG,IAAA,yBAAkB,GAAE,CAAC;IACpC,IAAI;QACF,4BAA4B;QAC5B,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAC9B,UAAU,IAAI,IAAI,IAAI,OAAO,EAC7B;YACE,IAAI,EAAE,QAAQ;SACf,EACD;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;SACF,CACF,CAAC;QACF,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAc,CAAC;QACzC,MAAM,CAAC,IAAI,CAAC,mBAAmB,QAAQ,WAAW,QAAQ,EAAE,CAAC,CAAC;KAC/D;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,2BAA2B,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;SACzE;aAAM;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AAO,EAAE,CAAC,CAAC;SAC9E;QACD,OAAO,CAAC,CAAC;KACV;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AA9BD,oCA8BC"}
@@ -1,3 +1,4 @@
1
1
  import { DBOSCloudCredentials } from "./login";
2
2
  export declare function getCloudCredentials(): DBOSCloudCredentials;
3
+ export declare function credentialsExist(): boolean;
3
4
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAe,MAAM,SAAS,CAAC;AAG5D,wBAAgB,mBAAmB,IAAI,oBAAoB,CAM1D"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAe,MAAM,SAAS,CAAC;AAG5D,wBAAgB,mBAAmB,IAAI,oBAAoB,CAM1D;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C"}
@@ -3,7 +3,7 @@ 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.getCloudCredentials = void 0;
6
+ exports.credentialsExist = exports.getCloudCredentials = void 0;
7
7
  const login_1 = require("./login");
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  function getCloudCredentials() {
@@ -14,4 +14,8 @@ function getCloudCredentials() {
14
14
  };
15
15
  }
16
16
  exports.getCloudCredentials = getCloudCredentials;
17
+ function credentialsExist() {
18
+ return fs_1.default.existsSync(`./${login_1.dbosEnvPath}/credentials`);
19
+ }
20
+ exports.credentialsExist = credentialsExist;
17
21
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/cloud-cli/utils.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA4D;AAC5D,4CAAoB;AAEpB,SAAgB,mBAAmB;IACjC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,YAAE,CAAC,YAAY,CAAC,KAAK,mBAAW,cAAc,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAyB,CAAC;IAC9H,OAAO;QACL,QAAQ,EAAE,eAAe,CAAC,QAAQ;QAClC,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE,2BAA2B;KAChF,CAAC;AACJ,CAAC;AAND,kDAMC"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/cloud-cli/utils.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA4D;AAC5D,4CAAoB;AAEpB,SAAgB,mBAAmB;IACjC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,YAAE,CAAC,YAAY,CAAC,KAAK,mBAAW,cAAc,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAyB,CAAC;IAC9H,OAAO;QACL,QAAQ,EAAE,eAAe,CAAC,QAAQ;QAClC,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE,2BAA2B;KAChF,CAAC;AACJ,CAAC;AAND,kDAMC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,YAAE,CAAC,UAAU,CAAC,KAAK,mBAAW,cAAc,CAAC,CAAC;AACvD,CAAC;AAFD,4CAEC"}
@@ -38,7 +38,6 @@ export declare class DBOSExecutor {
38
38
  readonly communicatorConfigMap: Map<string, CommunicatorConfig>;
39
39
  readonly topicConfigMap: Map<string, string[]>;
40
40
  readonly registeredOperations: Array<MethodRegistrationBase>;
41
- readonly initialEpochTimeMs: number;
42
41
  readonly pendingWorkflowMap: Map<string, Promise<unknown>>;
43
42
  readonly telemetryCollector: TelemetryCollector;
44
43
  readonly flushBufferIntervalMs: number;
@@ -1 +1 @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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"}
@@ -43,7 +43,6 @@ class DBOSExecutor {
43
43
  communicatorConfigMap = new Map();
44
44
  topicConfigMap = new Map();
45
45
  registeredOperations = [];
46
- initialEpochTimeMs;
47
46
  pendingWorkflowMap = new Map(); // Map from workflowUUID to workflow promise.
48
47
  telemetryCollector;
49
48
  flushBufferIntervalMs = 1000;
@@ -68,7 +67,7 @@ class DBOSExecutor {
68
67
  this.flushBufferID = setInterval(() => {
69
68
  void this.flushWorkflowStatusBuffer();
70
69
  }, this.flushBufferIntervalMs);
71
- this.logger.debug('Started workflow status buffer worker');
70
+ this.logger.debug("Started workflow status buffer worker");
72
71
  // Add Jaeger exporter if tracing is enabled
73
72
  const telemetryExporters = [];
74
73
  if (this.config.telemetry?.traces?.enabled) {
@@ -78,20 +77,19 @@ class DBOSExecutor {
78
77
  this.telemetryCollector = new collector_1.TelemetryCollector(telemetryExporters);
79
78
  this.tracer = new traces_1.Tracer(this.telemetryCollector);
80
79
  this.initialized = false;
81
- this.initialEpochTimeMs = Date.now();
82
80
  }
83
81
  configureDbClient() {
84
82
  const userDbClient = this.config.userDbclient;
85
83
  if (userDbClient === user_database_1.UserDatabaseName.PRISMA) {
86
84
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
87
- const { PrismaClient } = require('@prisma/client');
85
+ const { PrismaClient } = require("@prisma/client");
88
86
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call
89
87
  this.userDatabase = new user_database_1.PrismaUserDatabase(new PrismaClient());
90
88
  this.logger.debug("Loaded Prisma user database");
91
89
  }
92
90
  else if (userDbClient === user_database_1.UserDatabaseName.TYPEORM) {
93
91
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
94
- const DataSourceExports = require('typeorm');
92
+ const DataSourceExports = require("typeorm");
95
93
  try {
96
94
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
97
95
  this.userDatabase = new user_database_1.TypeORMDatabase(new DataSourceExports.DataSource({
@@ -112,7 +110,7 @@ class DBOSExecutor {
112
110
  }
113
111
  else if (userDbClient === user_database_1.UserDatabaseName.KNEX) {
114
112
  const knexConfig = {
115
- client: 'postgres',
113
+ client: "postgres",
116
114
  connection: {
117
115
  host: this.config.poolConfig.host,
118
116
  port: this.config.poolConfig.port,
@@ -1 +1 @@
1
- {"version":3,"file":"dbos-executor.js","sourceRoot":"","sources":["../../src/dbos-executor.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAuD;AACvD,mCAKiB;AACjB,yCAUoB;AAIpB,qDAAuD;AACvD,qDAA2D;AAC3D,+CAA4C;AAC5C,2CAA+E;AAG/E,uDAA2E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B,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;;AA3ZH,oCA4ZC"}
@@ -82,7 +82,8 @@ export declare class WorkflowContextImpl extends DBOSContextImpl implements Work
82
82
  /**
83
83
  * Invoke another workflow as its child workflow and return a workflow handle.
84
84
  * The child workflow is guaranteed to be executed exactly once, even if the workflow is retried with the same UUID.
85
- * We pass in itself as a parent context adn assign the child workflow with a derministic UUID "this.workflowUUID-functionID", which appends a function ID to its own UUID.
85
+ * We pass in itself as a parent context adn assign the child workflow with a deterministic UUID "this.workflowUUID-functionID", which appends a function ID to its own UUID.
86
+ * We also pass in its own workflowUUID and function ID so the invoked handle is deterministic.
86
87
  */
87
88
  childWorkflow<T extends any[], R>(wf: Workflow<T, R>, ...args: T): Promise<WorkflowHandle<R>>;
88
89
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/workflow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAsB,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAkB,WAAW,E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workflow and return a workflow handle.
141
141
  * The child workflow is guaranteed to be executed exactly once, even if the workflow is retried with the same UUID.
142
- * We pass in itself as a parent context adn assign the child workflow with a derministic UUID "this.workflowUUID-functionID", which appends a function ID to its own UUID.
142
+ * We pass in itself as a parent context adn assign the child workflow with a deterministic UUID "this.workflowUUID-functionID", which appends a function ID to its own UUID.
143
+ * We also pass in its own workflowUUID and function ID so the invoked handle is deterministic.
143
144
  */
144
145
  async childWorkflow(wf, ...args) {
145
146
  // Note: cannot use invoke for childWorkflow because of potential recursive types on the workflow itself.
146
147
  const funcId = this.functionIDGetIncrement();
147
148
  const childUUID = this.workflowUUID + "-" + funcId;
148
- return this.#wfe.workflow(wf, { parentCtx: this, workflowUUID: childUUID }, ...args);
149
+ return this.#wfe.internalWorkflow(wf, { parentCtx: this, workflowUUID: childUUID }, this.workflowUUID, funcId, ...args);
149
150
  }
150
151
  /**
151
152
  * Execute a transactional function.
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/workflow.ts"],"names":[],"mappings":";;;AAAA,uDAAuD;AACvD,mDAAmE;AAEnE,+CAAwG;AACxG,iDAA4F;AAC5F,mCAA2F;AAC3F,qDAAmE;AACnE,mCAAgC;AAGhC,4CAAoD;AAEpD,uCAAsE;AACtE,6CAAuD;AA2C1C,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACN,CAAC;AAcX,MAAa,mBAAoB,SAAQ,yBAAe;IAU3C;IATX,UAAU,GAAW,CAAC,CAAC;IACd,IAAI,CAAC;IACL,YAAY,GAAgC,IAAI,GAAG,EAA0B,CAAC;IAC9E,cAAc,CAAU;IAEjC,YACE,GAAiB,EACjB,SAAsC,EACtC,YAAoB,EACX,cAA8B,EACvC,YAAoB;QAEpB,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAC/B,YAAY,EACZ;YACE,YAAY,EAAE,Y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9B,CAAC;CACF;AAfD,sCAeC;AAED;;GAEG;AACH,MAAa,eAAe;IACL;IAAyC;IAA+B;IAA8B;IAA3H,YAAqB,cAA8B,EAAW,YAAoB,EAAW,UAAmB,EAAW,gBAAyB;QAA/H,mBAAc,GAAd,cAAc,CAAgB;QAAW,iBAAY,GAAZ,YAAY,CAAQ;QAAW,eAAU,GAAV,UAAU,CAAS;QAAW,qBAAgB,GAAhB,gBAAgB,CAAS;IAAG,CAAC;IAExJ,eAAe;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,SAAS;QACb,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAChH,CAAC;IAED,KAAK,CAAC,SAAS;QACb,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAI,IAAI,CAAC,YAAY,CAAC,CAAC;IAC3E,CAAC;CACF;AAdD,0CAcC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbos-inc/dbos-sdk",
3
- "version": "0.7.19-preview",
3
+ "version": "0.7.21-preview",
4
4
  "description": "A Typescript framework built on the database",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -57,6 +57,8 @@
57
57
  "commander": "^11.0.0",
58
58
  "fast-glob": "^3.3.1",
59
59
  "form-data": "^4.0.0",
60
+ "jsonwebtoken": "^9.0.2",
61
+ "jwks-rsa": "^3.1.0",
60
62
  "jwt-simple": "^0.5.6",
61
63
  "knex": "^3.0.1",
62
64
  "koa": "^2.14.2",