@dbos-inc/dbos-sdk 0.7.35 → 0.8.12-preview
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/cloud-cli/applications/configure.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/configure.js +12 -2
- package/dist/src/cloud-cli/applications/configure.js.map +1 -1
- package/dist/src/cloud-cli/applications/delete-app.js +1 -1
- package/dist/src/cloud-cli/applications/delete-app.js.map +1 -1
- package/dist/src/cloud-cli/applications/deploy-app-code.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/deploy-app-code.js +10 -2
- package/dist/src/cloud-cli/applications/deploy-app-code.js.map +1 -1
- package/dist/src/cloud-cli/applications/get-app-logs.js +1 -1
- package/dist/src/cloud-cli/applications/get-app-logs.js.map +1 -1
- package/dist/src/cloud-cli/applications/list-apps.js +1 -1
- package/dist/src/cloud-cli/applications/list-apps.js.map +1 -1
- package/dist/src/cloud-cli/applications/register-app.js +1 -1
- package/dist/src/cloud-cli/applications/register-app.js.map +1 -1
- package/dist/src/cloud-cli/applications/update-app.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/update-app.js +3 -2
- package/dist/src/cloud-cli/applications/update-app.js.map +1 -1
- package/dist/src/cloud-cli/login.d.ts.map +1 -1
- package/dist/src/cloud-cli/login.js +3 -2
- package/dist/src/cloud-cli/login.js.map +1 -1
- package/dist/src/cloud-cli/register.js +1 -1
- package/dist/src/cloud-cli/register.js.map +1 -1
- package/dist/src/cloud-cli/userdb.d.ts.map +1 -1
- package/dist/src/cloud-cli/userdb.js +32 -11
- package/dist/src/cloud-cli/userdb.js.map +1 -1
- package/dist/src/communicator.d.ts +1 -1
- package/dist/src/communicator.d.ts.map +1 -1
- package/dist/src/context.d.ts +1 -1
- package/dist/src/context.d.ts.map +1 -1
- package/dist/src/context.js +1 -1
- package/dist/src/context.js.map +1 -1
- package/dist/src/dbos-executor.d.ts +18 -7
- package/dist/src/dbos-executor.d.ts.map +1 -1
- package/dist/src/dbos-executor.js +155 -52
- package/dist/src/dbos-executor.js.map +1 -1
- package/dist/src/dbos-runtime/cli.d.ts +0 -1
- package/dist/src/dbos-runtime/cli.d.ts.map +1 -1
- package/dist/src/dbos-runtime/cli.js +14 -2
- package/dist/src/dbos-runtime/cli.js.map +1 -1
- package/dist/src/dbos-runtime/config.d.ts.map +1 -1
- package/dist/src/dbos-runtime/config.js +0 -1
- package/dist/src/dbos-runtime/config.js.map +1 -1
- package/dist/src/dbos-runtime/debug.d.ts +4 -0
- package/dist/src/dbos-runtime/debug.d.ts.map +1 -0
- package/dist/src/dbos-runtime/debug.js +23 -0
- package/dist/src/dbos-runtime/debug.js.map +1 -0
- package/dist/src/dbos-runtime/runtime.d.ts +1 -1
- package/dist/src/dbos-runtime/runtime.d.ts.map +1 -1
- package/dist/src/dbos-runtime/runtime.js +13 -14
- package/dist/src/dbos-runtime/runtime.js.map +1 -1
- package/dist/src/debugger/debug_workflow.js +6 -6
- package/dist/src/debugger/debug_workflow.js.map +1 -1
- package/dist/src/httpServer/server.d.ts +1 -1
- package/dist/src/httpServer/server.d.ts.map +1 -1
- package/dist/src/{dbos-runtime → staticAnalysis}/TypeParser.d.ts +4 -0
- package/dist/src/staticAnalysis/TypeParser.d.ts.map +1 -0
- package/dist/src/{dbos-runtime → staticAnalysis}/TypeParser.js +34 -1
- package/dist/src/staticAnalysis/TypeParser.js.map +1 -0
- package/dist/src/{dbos-runtime → staticAnalysis}/openApi.d.ts.map +1 -1
- package/dist/src/{dbos-runtime → staticAnalysis}/openApi.js +1 -31
- package/dist/src/staticAnalysis/openApi.js.map +1 -0
- package/dist/src/staticAnalysis/tsDiagUtil.d.ts.map +1 -0
- package/dist/src/staticAnalysis/tsDiagUtil.js.map +1 -0
- package/dist/src/system_database.d.ts +20 -9
- package/dist/src/system_database.d.ts.map +1 -1
- package/dist/src/system_database.js +36 -41
- package/dist/src/system_database.js.map +1 -1
- package/dist/src/telemetry/collector.d.ts +5 -5
- package/dist/src/telemetry/collector.d.ts.map +1 -1
- package/dist/src/telemetry/collector.js +5 -17
- package/dist/src/telemetry/collector.js.map +1 -1
- package/dist/src/telemetry/exporters.d.ts +11 -24
- package/dist/src/telemetry/exporters.d.ts.map +1 -1
- package/dist/src/telemetry/exporters.js +42 -129
- package/dist/src/telemetry/exporters.js.map +1 -1
- package/dist/src/telemetry/index.d.ts +6 -2
- package/dist/src/telemetry/index.d.ts.map +1 -1
- package/dist/src/telemetry/index.js +16 -0
- package/dist/src/telemetry/index.js.map +1 -1
- package/dist/src/telemetry/logs.d.ts +35 -11
- package/dist/src/telemetry/logs.d.ts.map +1 -1
- package/dist/src/telemetry/logs.js +158 -53
- package/dist/src/telemetry/logs.js.map +1 -1
- package/dist/src/telemetry/traces.d.ts +1 -6
- package/dist/src/telemetry/traces.d.ts.map +1 -1
- package/dist/src/telemetry/traces.js +2 -34
- package/dist/src/telemetry/traces.js.map +1 -1
- package/dist/src/testing/testing_runtime.d.ts +1 -1
- package/dist/src/testing/testing_runtime.js +1 -1
- package/dist/src/transaction.d.ts +1 -1
- package/dist/src/transaction.d.ts.map +1 -1
- package/dist/src/workflow.d.ts +2 -0
- package/dist/src/workflow.d.ts.map +1 -1
- package/dist/src/workflow.js +18 -13
- package/dist/src/workflow.js.map +1 -1
- package/package.json +3 -2
- package/dist/src/dbos-runtime/TypeParser.d.ts.map +0 -1
- package/dist/src/dbos-runtime/TypeParser.js.map +0 -1
- package/dist/src/dbos-runtime/openApi.js.map +0 -1
- package/dist/src/dbos-runtime/tsDiagUtil.d.ts.map +0 -1
- package/dist/src/dbos-runtime/tsDiagUtil.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
- /package/dist/src/{dbos-runtime → staticAnalysis}/openApi.d.ts +0 -0
- /package/dist/src/{dbos-runtime → staticAnalysis}/tsDiagUtil.d.ts +0 -0
- /package/dist/src/{dbos-runtime → staticAnalysis}/tsDiagUtil.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/configure.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/configure.ts"],"names":[],"mappings":"AAQA,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBA4D5E"}
|
@@ -10,8 +10,9 @@ const yaml_1 = __importDefault(require("yaml"));
|
|
10
10
|
const logs_1 = require("../../telemetry/logs");
|
11
11
|
const utils_1 = require("../utils");
|
12
12
|
const config_1 = require("../../dbos-runtime/config");
|
13
|
+
const child_process_1 = require("child_process");
|
13
14
|
async function configureApp(host, port, dbName) {
|
14
|
-
const logger =
|
15
|
+
const logger = new logs_1.GlobalLogger();
|
15
16
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
16
17
|
const bearerToken = "Bearer " + userCredentials.token;
|
17
18
|
// call cloud and get hostname and port
|
@@ -40,9 +41,18 @@ async function configureApp(host, port, dbName) {
|
|
40
41
|
logger.error(`failed to parse ${config_1.dbosConfigFilePath}`);
|
41
42
|
return;
|
42
43
|
}
|
44
|
+
try {
|
45
|
+
// Should we just download and keep the file in the dir instead of downloading everytime ??
|
46
|
+
(0, child_process_1.execSync)("wget https://truststore.pki.rds.amazonaws.com/us-east-1/us-east-1-bundle.pem -O us-east-1-bundle.pem");
|
47
|
+
}
|
48
|
+
catch (e) {
|
49
|
+
logger.error(e.message);
|
50
|
+
logger.error("Error downloading RDS certificate bundle. Try downloading it manually from AWS.");
|
51
|
+
}
|
43
52
|
// update hostname and port
|
44
53
|
configFile.database.hostname = userdbHostname;
|
45
54
|
configFile.database.port = userdbPort;
|
55
|
+
configFile.database.ssl_ca = "us-east-1-bundle.pem";
|
46
56
|
// save the file
|
47
57
|
try {
|
48
58
|
fs_1.default.writeFileSync(`${config_1.dbosConfigFilePath}`, yaml_1.default.stringify(configFile));
|
@@ -51,7 +61,7 @@ async function configureApp(host, port, dbName) {
|
|
51
61
|
logger.error(`failed to write ${config_1.dbosConfigFilePath}: ${e.message}`);
|
52
62
|
return;
|
53
63
|
}
|
54
|
-
logger.info(
|
64
|
+
logger.info(`Successfully configured user database at ${userdbHostname}:${userdbPort}.`);
|
55
65
|
}
|
56
66
|
exports.configureApp = configureApp;
|
57
67
|
//# sourceMappingURL=configure.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/configure.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAoB;AACpB,gDAAwB;AACxB,+
|
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,oCAA+C;AAC/C,sDAA2F;AAC3F,iDAAyC;AAElC,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,IAAY,EAAE,MAAc;IACzE,MAAM,MAAM,GAAG,IAAI,mBAAY,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,uCAAuC;IACvC,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,0BAA0B,MAAM,EAAE,EAChH;QACE,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,WAAW;SAC3B;KACF,CAAC,CAAC;IAEH,sEAAsE;IACtE,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,EAAE;QACrB,MAAM,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACpE,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,CAAC;AA5DD,oCA4DC"}
|
@@ -8,7 +8,7 @@ const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const logs_1 = require("../../telemetry/logs");
|
9
9
|
const utils_1 = require("../utils");
|
10
10
|
async function deleteApp(appName, host, port) {
|
11
|
-
const logger =
|
11
|
+
const logger = new logs_1.GlobalLogger();
|
12
12
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
13
13
|
const bearerToken = "Bearer " + userCredentials.token;
|
14
14
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"delete-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/delete-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+
|
1
|
+
{"version":3,"file":"delete-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/delete-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAoD;AACpD,oCAA+C;AAExC,KAAK,UAAU,SAAS,CAAC,OAAe,EAAE,IAAY,EAAE,IAAY;IACzE,MAAM,MAAM,GAAG,IAAI,mBAAY,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,IAAI;QACF,MAAM,eAAK,CAAC,MAAM,CAAC,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,gBAAgB,OAAO,EAAE,EAAE;YAC9F,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,qCAAqC,OAAO,EAAE,CAAC,CAAC;QAC5D,OAAO,CAAC,CAAC;KACV;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,OAAO,CAAC,CAAC;SACV;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AAxBD,8BAwBC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deploy-app-code.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/deploy-app-code.ts"],"names":[],"mappings":"AAWA,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,
|
1
|
+
{"version":3,"file":"deploy-app-code.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/deploy-app-code.ts"],"names":[],"mappings":"AAWA,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA+DhG"}
|
@@ -14,7 +14,7 @@ const utils_2 = require("../../utils");
|
|
14
14
|
const config_1 = require("../../dbos-runtime/config");
|
15
15
|
const deployDirectoryName = "dbos_deploy";
|
16
16
|
async function deployAppCode(appName, host, port) {
|
17
|
-
const logger =
|
17
|
+
const logger = new logs_1.GlobalLogger();
|
18
18
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
19
19
|
const bearerToken = "Bearer " + userCredentials.token;
|
20
20
|
try {
|
@@ -27,6 +27,14 @@ async function deployAppCode(appName, host, port) {
|
|
27
27
|
// Parse version from config file. If missing, use current epoch
|
28
28
|
const version = configFile.version ?? Date.now().toString();
|
29
29
|
configFile.version = version;
|
30
|
+
// Inject OTel export configuration
|
31
|
+
if (!configFile.telemetry) {
|
32
|
+
configFile.telemetry = {};
|
33
|
+
}
|
34
|
+
configFile.telemetry.OTLPExporter = {
|
35
|
+
logsEndpoint: "http://otel-collector:4318/v1/logs",
|
36
|
+
tracesEndpoint: "http://otel-collector:4318/v1/traces",
|
37
|
+
};
|
30
38
|
try {
|
31
39
|
fs_1.default.writeFileSync(`${deployDirectoryName}/${config_1.dbosConfigFilePath}`, yaml_1.default.stringify(configFile));
|
32
40
|
}
|
@@ -34,7 +42,7 @@ async function deployAppCode(appName, host, port) {
|
|
34
42
|
logger.error(`failed to write ${config_1.dbosConfigFilePath}: ${e.message}`);
|
35
43
|
return 1;
|
36
44
|
}
|
37
|
-
(0, child_process_1.execSync)(`npm prune --
|
45
|
+
(0, child_process_1.execSync)(`npm prune --omit=dev node_modules/* `);
|
38
46
|
(0, child_process_1.execSync)(`zip -ry ${deployDirectoryName}/${appName}.zip ./* -x ${deployDirectoryName}/* ${config_1.dbosConfigFilePath} > /dev/null`);
|
39
47
|
(0, child_process_1.execSync)(`zip -j ${deployDirectoryName}/${appName}.zip ${deployDirectoryName}/${config_1.dbosConfigFilePath} > /dev/null`);
|
40
48
|
const zipData = (0, utils_2.readFileSync)(`${deployDirectoryName}/${appName}.zip`, "base64");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deploy-app-code.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/deploy-app-code.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,gDAAwB;AACxB,iDAAyC;AACzC,4CAAoB;AACpB,+
|
1
|
+
{"version":3,"file":"deploy-app-code.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/deploy-app-code.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,gDAAwB;AACxB,iDAAyC;AACzC,4CAAoB;AACpB,+CAAoD;AACpD,oCAA+C;AAC/C,uCAA4D;AAC5D,sDAA2F;AAE3F,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAEnC,KAAK,UAAU,aAAa,CAAC,OAAe,EAAE,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BAAQ,EAAC,UAAU,mBAAmB,IAAI,OAAO,QAAQ,mBAAmB,IAAI,2BAAkB,cAAc,CAAC,CAAC;QAElH,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,GAAG,mBAAmB,IAAI,OAAO,MAAM,EAAE,QAAQ,CAAC,CAAC;QAChF,MAAM,eAAK,CAAC,IAAI,CACd,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,gBAAgB,OAAO,EAAE,EAC3E;YACE,mBAAmB,EAAE,OAAO;YAC5B,mBAAmB,EAAE,OAAO;SAC7B,EACD;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,yBAAyB,OAAO,iBAAiB,OAAO,EAAE,CAAC,CAAC;QACxE,OAAO,CAAC,CAAC;KACV;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,OAAO,CAAC,CAAC;SACV;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AA/DD,sCA+DC"}
|
@@ -8,7 +8,7 @@ const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const logs_1 = require("../../telemetry/logs");
|
9
9
|
const utils_1 = require("../utils");
|
10
10
|
async function getAppLogs(appName, host, port) {
|
11
|
-
const logger =
|
11
|
+
const logger = new logs_1.GlobalLogger();
|
12
12
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
13
13
|
const bearerToken = "Bearer " + userCredentials.token;
|
14
14
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-app-logs.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/get-app-logs.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+
|
1
|
+
{"version":3,"file":"get-app-logs.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/get-app-logs.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAoD;AACpD,oCAA+C;AAExC,KAAK,UAAU,UAAU,CAAC,OAAe,EAAE,IAAY,EAAE,IAAY;IAC1E,MAAM,MAAM,GAAG,IAAI,mBAAY,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,IAAI;QACF,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,qBAAqB,OAAO,EAAE,EAAE;YAC5G,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,+CAA+C,OAAO,EAAE,CAAC,CAAC;QACtE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACrB,OAAO,CAAC,CAAC;KACV;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,0CAA0C,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YACvF,OAAO,CAAC,CAAC;SACV;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,0CAA0C,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3F,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AAzBD,gCAyBC"}
|
@@ -8,7 +8,7 @@ const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const logs_1 = require("../../telemetry/logs");
|
9
9
|
const utils_1 = require("../utils");
|
10
10
|
async function listApps(host, port) {
|
11
|
-
const logger =
|
11
|
+
const logger = new logs_1.GlobalLogger();
|
12
12
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
13
13
|
const bearerToken = "Bearer " + userCredentials.token;
|
14
14
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list-apps.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/list-apps.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+
|
1
|
+
{"version":3,"file":"list-apps.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/list-apps.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAoD;AACpD,oCAA+C;AAGxC,KAAK,UAAU,QAAQ,CAAC,IAAY,EAAE,IAAY;IACvD,MAAM,MAAM,GAAG,IAAI,mBAAY,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,IAAI;QACF,MAAM,IAAI,GAAG,MAAM,eAAK,CAAC,GAAG,CAC1B,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,cAAc,EAChE;YACE,OAAO,EAAE;gBACP,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,IAAI,GAAkB,IAAI,CAAC,IAAqB,CAAC;QACvD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACrB,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;YACpC,OAAO,CAAC,CAAC;SACV;QACD,MAAM,aAAa,GAAkB,EAAE,CAAA;QACvC,KAAK,MAAM,WAAW,IAAI,IAAI,EAAE;YAC9B,+GAA+G;YAC/G,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;SACpI;QACD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;QAC3C,OAAO,CAAC,CAAC;KACV;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YACjE,OAAO,CAAC,CAAC;SACV;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,gCAAiC,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACrE,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AAnCD,4BAmCC"}
|
@@ -8,7 +8,7 @@ const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const logs_1 = require("../../telemetry/logs");
|
9
9
|
const utils_1 = require("../utils");
|
10
10
|
async function registerApp(appName, host, port, machines) {
|
11
|
-
const logger =
|
11
|
+
const logger = new logs_1.GlobalLogger();
|
12
12
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
13
13
|
const bearerToken = "Bearer " + userCredentials.token;
|
14
14
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/register-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+
|
1
|
+
{"version":3,"file":"register-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/register-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0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/update-app.ts"],"names":[],"mappings":"AAKA,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,
|
1
|
+
{"version":3,"file":"update-app.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/update-app.ts"],"names":[],"mappings":"AAKA,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkC9G"}
|
@@ -8,7 +8,7 @@ const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const logs_1 = require("../../telemetry/logs");
|
9
9
|
const utils_1 = require("../utils");
|
10
10
|
async function updateApp(appName, host, port, machines) {
|
11
|
-
const logger =
|
11
|
+
const logger = new logs_1.GlobalLogger();
|
12
12
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
13
13
|
const bearerToken = "Bearer " + userCredentials.token;
|
14
14
|
try {
|
@@ -33,7 +33,8 @@ async function updateApp(appName, host, port, machines) {
|
|
33
33
|
return 1;
|
34
34
|
}
|
35
35
|
else {
|
36
|
-
|
36
|
+
e.message = `failed to update application ${appName}: ${e.message}`;
|
37
|
+
logger.error(e);
|
37
38
|
return 1;
|
38
39
|
}
|
39
40
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"update-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/update-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+
|
1
|
+
{"version":3,"file":"update-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/update-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAoD;AACpD,oCAA+C;AAGxC,KAAK,UAAU,SAAS,CAAC,OAAe,EAAE,IAAY,EAAE,IAAY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,EAAE,CAAC;YAC1F,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAChB,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AAlCD,8BAkCC"}
|
@@ -1 +1 @@
|
|
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,
|
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,CA4D7D"}
|
@@ -39,7 +39,7 @@ async function verifyToken(token) {
|
|
39
39
|
});
|
40
40
|
}
|
41
41
|
async function login(username) {
|
42
|
-
const logger =
|
42
|
+
const logger = new logs_1.GlobalLogger();
|
43
43
|
logger.info(`Logging in!`);
|
44
44
|
const deviceCodeRequest = {
|
45
45
|
method: 'POST',
|
@@ -53,7 +53,8 @@ async function login(username) {
|
|
53
53
|
deviceCodeResponse = response.data;
|
54
54
|
}
|
55
55
|
catch (e) {
|
56
|
-
|
56
|
+
e.message = `failed to log in: ${e.message}`;
|
57
|
+
logger.error(e);
|
57
58
|
}
|
58
59
|
if (!deviceCodeResponse) {
|
59
60
|
return 1;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/cloud-cli/login.ts"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/cloud-cli/login.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAiD;AACjD,kDAA0B;AAC1B,oCAAiC;AACjC,gEAA+C;AAC/C,wDAAkC;AAClC,iDAAyC;AACzC,4CAAoB;AAEP,QAAA,WAAW,GAAG,OAAO,CAAC;AACtB,QAAA,YAAY,GAAG,kCAAkC,CAAA;AACjD,QAAA,mBAAmB,GAAG,gBAAgB,CAAA;AAsBnD,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC;IACxB,OAAO,EAAE,qDAAqD;CAC/D,CAAC,CAAC;AAEH,KAAK,UAAU,aAAa,CAAC,GAAW;IACtC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC5C,OAAO,GAAG,CAAC,YAAY,EAAE,CAAC;AAC5B,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,KAAa;IACtC,MAAM,OAAO,GAAG,sBAAG,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAEtD,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE;QAClE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;KAClC;IAED,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAE3D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,sBAAG,CAAC,MAAM,CAAC,KAAK,EAAE,U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|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
12
12
|
const bearerToken = "Bearer " + userCredentials.token;
|
13
13
|
const userName = userCredentials.userName;
|
14
|
-
const logger =
|
14
|
+
const logger = new logs_1.GlobalLogger();
|
15
15
|
try {
|
16
16
|
// First, register the user.
|
17
17
|
const register = await axios_1.default.put(`http://${host}:${port}/user`, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/cloud-cli/register.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/cloud-cli/register.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAiD;AACjD,mCAA8C;AAEvC,KAAK,UAAU,YAAY,CAAC,QAAgB,EAAE,IAAY,EAAE,IAAY;IAC7E,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IACtD,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAI,mBAAY,EAAE,CAAC;IAClC,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;gBAClC,aAAa,EAAE,WAAW;aAC3B;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;YACL,MAAM,CAAC,KAAK,CAAC,2BAA2B,QAAQ,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;SAC9E;QACD,OAAO,CAAC,CAAC;KACV;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AA9BD,oCA8BC"}
|
@@ -1 +1 @@
|
|
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,
|
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,CAoEhC;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CA4B1C"}
|
@@ -11,7 +11,7 @@ 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
|
async function createUserDb(host, port, dbName, adminName, adminPassword, sync) {
|
14
|
-
const logger =
|
14
|
+
const logger = new logs_1.GlobalLogger();
|
15
15
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
16
16
|
const bearerToken = "Bearer " + userCredentials.token;
|
17
17
|
try {
|
@@ -61,7 +61,7 @@ async function createUserDb(host, port, dbName, adminName, adminPassword, sync)
|
|
61
61
|
}
|
62
62
|
exports.createUserDb = createUserDb;
|
63
63
|
async function deleteUserDb(host, port, dbName, sync) {
|
64
|
-
const logger =
|
64
|
+
const logger = new logs_1.GlobalLogger();
|
65
65
|
const userCredentials = (0, utils_1.getCloudCredentials)();
|
66
66
|
const bearerToken = "Bearer " + userCredentials.token;
|
67
67
|
try {
|
@@ -113,7 +113,7 @@ async function deleteUserDb(host, port, dbName, sync) {
|
|
113
113
|
}
|
114
114
|
exports.deleteUserDb = deleteUserDb;
|
115
115
|
async function getUserDb(host, port, dbName) {
|
116
|
-
const logger =
|
116
|
+
const logger = new logs_1.GlobalLogger();
|
117
117
|
try {
|
118
118
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
119
119
|
const res = await getDb(host, port, dbName);
|
@@ -130,7 +130,7 @@ async function getUserDb(host, port, dbName) {
|
|
130
130
|
}
|
131
131
|
exports.getUserDb = getUserDb;
|
132
132
|
function migrate() {
|
133
|
-
const logger =
|
133
|
+
const logger = new logs_1.GlobalLogger();
|
134
134
|
// read the yaml file
|
135
135
|
const configFile = (0, config_1.loadConfigFile)(config_1.dbosConfigFilePath);
|
136
136
|
if (!configFile) {
|
@@ -144,18 +144,20 @@ function migrate() {
|
|
144
144
|
const userdbname = configFile.database.user_database;
|
145
145
|
if (create_db) {
|
146
146
|
logger.info(`Creating database ${userdbname}`);
|
147
|
-
const cmd = `createdb -h ${configFile.database.hostname} -p ${configFile.database.port} ${userdbname} -U ${configFile.database.username} -
|
147
|
+
const cmd = `PGPASSWORD=${configFile.database.password} createdb -h ${configFile.database.hostname} -p ${configFile.database.port} ${userdbname} -U ${configFile.database.username} -ew ${userdbname}`;
|
148
148
|
logger.info(cmd);
|
149
149
|
try {
|
150
|
-
(0, child_process_1.execSync)(cmd);
|
150
|
+
const createDBCommandOutput = (0, child_process_1.execSync)(cmd).toString();
|
151
|
+
logger.info(createDBCommandOutput);
|
151
152
|
}
|
152
153
|
catch (e) {
|
153
|
-
|
154
|
-
|
154
|
+
if (e instanceof Error && !e.message.includes(`database "${userdbname}" already exists`)) {
|
155
|
+
logger.error(`Error creating database: ${e.message}`);
|
156
|
+
}
|
155
157
|
}
|
156
158
|
}
|
157
159
|
let dbType = configFile.database.user_dbclient;
|
158
|
-
if (dbType
|
160
|
+
if (dbType === undefined) {
|
159
161
|
dbType = "knex";
|
160
162
|
}
|
161
163
|
const migratecommands = configFile.database.migrate;
|
@@ -163,18 +165,37 @@ function migrate() {
|
|
163
165
|
migratecommands?.forEach((cmd) => {
|
164
166
|
const command = "npx " + dbType + " " + cmd;
|
165
167
|
logger.info("Executing " + command);
|
166
|
-
(0, child_process_1.execSync)(command);
|
168
|
+
const migrateCommandOutput = (0, child_process_1.execSync)(command).toString();
|
169
|
+
logger.info(migrateCommandOutput);
|
167
170
|
});
|
168
171
|
}
|
169
172
|
catch (e) {
|
170
173
|
logger.error("Error running migration. Check database and if necessary, run npx dbos-cloud userdb rollback.");
|
174
|
+
if (e instanceof Error) {
|
175
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
|
176
|
+
const stderr = e.stderr;
|
177
|
+
if (stderr && Buffer.isBuffer(stderr) && stderr.length > 0) {
|
178
|
+
logger.error(`Standard Error: ${stderr.toString().trim()}`);
|
179
|
+
}
|
180
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
|
181
|
+
const stdout = e.stdout;
|
182
|
+
if (stdout && Buffer.isBuffer(stdout) && stdout.length > 0) {
|
183
|
+
logger.error(`Standard Output: ${stdout.toString().trim()}`);
|
184
|
+
}
|
185
|
+
if (e.message) {
|
186
|
+
logger.error(e.message);
|
187
|
+
}
|
188
|
+
}
|
189
|
+
else {
|
190
|
+
logger.error(e);
|
191
|
+
}
|
171
192
|
return 1;
|
172
193
|
}
|
173
194
|
return 0;
|
174
195
|
}
|
175
196
|
exports.migrate = migrate;
|
176
197
|
function rollbackmigration() {
|
177
|
-
const logger =
|
198
|
+
const logger = new logs_1.GlobalLogger();
|
178
199
|
// read the yaml file
|
179
200
|
const configFile = (0, config_1.loadConfigFile)(config_1.dbosConfigFilePath);
|
180
201
|
if (!configFile) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"userdb.js","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
1
|
+
{"version":3,"file":"userdb.js","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAiD;AACjD,mCAA8C;AAC9C,oCAAiC;AACjC,mDAAwF;AACxF,iDAAyC;AAElC,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,IAAY,EAAE,MAAc,EAAE,SAAiB,EAAE,aAAqB,EAAE,IAAa;IACpI,MAAM,MAAM,GAAG,IAAI,mBAAY,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CA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C;QACpB,CAAC,CAAC,CAAC;KACJ;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAC/C,OAAO,CAAC,CAAC;KACV;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AA5BD,8CA4BC;AAED,mGAAmG;AACnG,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"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Span } from "@opentelemetry/sdk-trace-base";
|
2
|
-
import {
|
2
|
+
import { GlobalLogger as Logger } from "./telemetry/logs";
|
3
3
|
import { WorkflowContextImpl } from "./workflow";
|
4
4
|
import { DBOSContext, DBOSContextImpl } from "./context";
|
5
5
|
import { WorkflowContextDebug } from "./debugger/debug_workflow";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"communicator.d.ts","sourceRoot":"","sources":["../../src/communicator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,
|
1
|
+
{"version":3,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AQ,EAAE,MAAM;CAYtK"}
|
package/dist/src/context.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
/// <reference types="node" />
|
3
3
|
import { Span } from "@opentelemetry/sdk-trace-base";
|
4
|
-
import {
|
4
|
+
import { GlobalLogger as Logger, Logger as DBOSLogger } from "./telemetry/logs";
|
5
5
|
import { IncomingHttpHeaders } from "http";
|
6
6
|
import { ParsedUrlQuery } from "querystring";
|
7
7
|
import { DBOSExecutor } from "./dbos-executor";
|
@@ -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,
|
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,YAAY,IAAI,MAAM,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,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xC,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC;CAmB9C;AAGD;;GAEG;AACH,qBAAa,WAAW;IASV,QAAQ,CAAC,QAAQ,EAAE,YAAY;IAP3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAGxB,OAAO,CAAC,YAAY,CAAe;IAEnC,OAAO,CAAC,WAAW,CAAM;gBAEJ,QAAQ,EAAE,YAAY;IAO3C,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAIjC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAK/D,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IACxC,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC;CAmB9C"}
|
package/dist/src/context.js
CHANGED
@@ -16,7 +16,6 @@ class DBOSContextImpl {
|
|
16
16
|
constructor(operationName, span, logger, parentCtx) {
|
17
17
|
this.operationName = operationName;
|
18
18
|
this.span = span;
|
19
|
-
this.logger = new logs_1.Logger(logger, this);
|
20
19
|
if (parentCtx) {
|
21
20
|
this.request = parentCtx.request;
|
22
21
|
this.authenticatedUser = parentCtx.authenticatedUser;
|
@@ -24,6 +23,7 @@ class DBOSContextImpl {
|
|
24
23
|
this.assumedRole = parentCtx.assumedRole;
|
25
24
|
this.workflowUUID = parentCtx.workflowUUID;
|
26
25
|
}
|
26
|
+
this.logger = new logs_1.Logger(logger, this);
|
27
27
|
}
|
28
28
|
/*** Application configuration ***/
|
29
29
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/dist/src/context.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":";;;AACA,
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":";;;AACA,2CAAgF;AAChF,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,CAAa,CAAM,qDAAqD;IAEvF,YAAqB,aAAqB,EAAW,IAAU,EAAE,MAAc,EAAE,SAA2B;QAAvF,kBAAa,GAAb,aAAa,CAAQ;QAAW,SAAI,GAAJ,IAAI,CAAM;QAC7D,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;YACjC,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC,iBAAiB,CAAC;YACrD,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC,kBAAkB,CAAC;YACvD,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC;YACzC,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC;SAC5C;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,aAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED,mCAAmC;IACnC,8DAA8D;IAC9D,iBAAiB,CAAO;IAGxB,SAAS,CAAI,GAAW,EAAE,YAAgB;QACxC,0GAA0G;QAC1G,IAAI,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,IAAA,YAAG,EAAC,IAAI,CAAC,iBAAiB,EAAE,GAAG,CAAC,EAAE;YAChE,IAAI,YAAY,EAAE;gBA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;YACpD,IAAI,YAAY,EAAE;gBAChB,OAAO,YAAY,CAAC;aACrB;YACD,OAAO,SAAS,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"}
|
@@ -4,7 +4,7 @@ import { Transaction, TransactionConfig } from './transaction';
|
|
4
4
|
import { CommunicatorConfig, Communicator } from './communicator';
|
5
5
|
import { TelemetryCollector } from './telemetry/collector';
|
6
6
|
import { Tracer } from './telemetry/traces';
|
7
|
-
import {
|
7
|
+
import { GlobalLogger as Logger } from './telemetry/logs';
|
8
8
|
import { TelemetryConfig } from './telemetry';
|
9
9
|
import { PoolConfig } from 'pg';
|
10
10
|
import { SystemDatabase } from './system_database';
|
@@ -13,6 +13,7 @@ import { MethodRegistrationBase } from './decorators';
|
|
13
13
|
export interface DBOSNull {
|
14
14
|
}
|
15
15
|
export declare const dbosNull: DBOSNull;
|
16
|
+
export declare const DBOSExecutorIDHeader = "dbos-executor-id";
|
16
17
|
export interface DBOSConfig {
|
17
18
|
readonly poolConfig: PoolConfig;
|
18
19
|
readonly userDbclient?: UserDatabaseName;
|
@@ -23,20 +24,28 @@ export interface DBOSConfig {
|
|
23
24
|
readonly dbClientMetadata?: any;
|
24
25
|
readonly debugProxy?: string;
|
25
26
|
}
|
26
|
-
interface WorkflowInfo
|
27
|
-
workflow: Workflow<
|
27
|
+
interface WorkflowInfo {
|
28
|
+
workflow: Workflow<any, any>;
|
28
29
|
config: WorkflowConfig;
|
29
30
|
}
|
31
|
+
interface TransactionInfo {
|
32
|
+
transaction: Transaction<any, any>;
|
33
|
+
config: TransactionConfig;
|
34
|
+
}
|
35
|
+
interface CommunicatorInfo {
|
36
|
+
communicator: Communicator<any, any>;
|
37
|
+
config: CommunicatorConfig;
|
38
|
+
}
|
30
39
|
export declare class DBOSExecutor {
|
31
40
|
#private;
|
32
41
|
readonly config: DBOSConfig;
|
33
42
|
initialized: boolean;
|
34
43
|
userDatabase: UserDatabase;
|
35
44
|
readonly systemDatabase: SystemDatabase;
|
36
|
-
readonly tempWorkflowName = "temp_workflow";
|
37
|
-
readonly workflowInfoMap: Map<string, WorkflowInfo
|
38
|
-
readonly
|
39
|
-
readonly
|
45
|
+
static readonly tempWorkflowName = "temp_workflow";
|
46
|
+
readonly workflowInfoMap: Map<string, WorkflowInfo>;
|
47
|
+
readonly transactionInfoMap: Map<string, TransactionInfo>;
|
48
|
+
readonly communicatorInfoMap: Map<string, CommunicatorInfo>;
|
40
49
|
readonly registeredOperations: Array<MethodRegistrationBase>;
|
41
50
|
readonly pendingWorkflowMap: Map<string, Promise<unknown>>;
|
42
51
|
readonly pendingAsyncWrites: Map<string, Promise<unknown>>;
|
@@ -45,6 +54,7 @@ export declare class DBOSExecutor {
|
|
45
54
|
readonly flushBufferID: NodeJS.Timeout;
|
46
55
|
static readonly defaultNotificationTimeoutSec = 60;
|
47
56
|
readonly debugMode: boolean;
|
57
|
+
static systemDBSchemaName: string;
|
48
58
|
readonly logger: Logger;
|
49
59
|
readonly tracer: Tracer;
|
50
60
|
entities: Function[];
|
@@ -74,6 +84,7 @@ export declare class DBOSExecutor {
|
|
74
84
|
* It runs to completion all pending workflows that were executing when the previous executor failed.
|
75
85
|
*/
|
76
86
|
recoverPendingWorkflows(executorIDs?: string[]): Promise<WorkflowHandle<any>[]>;
|
87
|
+
executeWorkflowUUID(workflowUUID: string): Promise<WorkflowHandle<unknown>>;
|
77
88
|
/**
|
78
89
|
* Periodically flush the workflow output buffer to the system database.
|
79
90
|
*/
|
@@ -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,
|
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,EAKf,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAkB,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,cAAc,EAAkD,MAAM,mBAAmB,CAAC;AAEnG,OAAO,EAGL,YAAY,EAEZ,gBAAgB,EAGjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAA6E,MAAM,cAAc,CAAC;AAQjI,MAAM,WAAW,QAAQ;CAAI;AAC7B,eAAO,MAAM,QAAQ,EAAE,QAAa,CAAC;AACrC,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AAGvD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,eAAe,CAAC;IACrC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ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