@dbos-inc/dbos-sdk 0.8.45-preview → 0.8.46-preview
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/packages/dbos-cloud/applications/delete-app.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/applications/delete-app.js +1 -2
- package/dist/packages/dbos-cloud/applications/delete-app.js.map +1 -1
- package/dist/packages/dbos-cloud/applications/deploy-app-code.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/applications/deploy-app-code.js +5 -7
- package/dist/packages/dbos-cloud/applications/deploy-app-code.js.map +1 -1
- package/dist/packages/dbos-cloud/applications/get-app-logs.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/applications/get-app-logs.js +1 -2
- package/dist/packages/dbos-cloud/applications/get-app-logs.js.map +1 -1
- package/dist/packages/dbos-cloud/applications/list-apps.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/applications/list-apps.js +1 -2
- package/dist/packages/dbos-cloud/applications/list-apps.js.map +1 -1
- package/dist/packages/dbos-cloud/applications/register-app.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/applications/register-app.js +1 -2
- package/dist/packages/dbos-cloud/applications/register-app.js.map +1 -1
- package/dist/packages/dbos-cloud/applications/update-app.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/applications/update-app.js +1 -2
- package/dist/packages/dbos-cloud/applications/update-app.js.map +1 -1
- package/dist/packages/dbos-cloud/cloudutils.d.ts +7 -0
- package/dist/packages/dbos-cloud/cloudutils.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/cloudutils.js +44 -3
- package/dist/packages/dbos-cloud/cloudutils.js.map +1 -1
- package/dist/packages/dbos-cloud/login.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/login.js +3 -4
- package/dist/packages/dbos-cloud/login.js.map +1 -1
- package/dist/packages/dbos-cloud/register.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/register.js +1 -2
- package/dist/packages/dbos-cloud/register.js.map +1 -1
- package/dist/packages/dbos-cloud/userdb.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/userdb.js +3 -4
- package/dist/packages/dbos-cloud/userdb.js.map +1 -1
- package/dist/src/context.d.ts +1 -0
- package/dist/src/context.d.ts.map +1 -1
- package/dist/src/httpServer/server.d.ts +2 -1
- package/dist/src/httpServer/server.d.ts.map +1 -1
- package/dist/src/testing/testing_runtime.d.ts +2 -1
- package/dist/src/testing/testing_runtime.d.ts.map +1 -1
- package/dist/src/utils.d.ts +0 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +3 -12
- package/dist/src/utils.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/delete-app.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/delete-app.js +1 -2
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/delete-app.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/deploy-app-code.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/deploy-app-code.js +5 -7
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/deploy-app-code.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/get-app-logs.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/get-app-logs.js +1 -2
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/get-app-logs.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/list-apps.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/list-apps.js +1 -2
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/list-apps.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/register-app.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/register-app.js +1 -2
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/register-app.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/update-app.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/update-app.js +1 -2
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/update-app.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/cloudutils.d.ts +7 -0
- package/packages/dbos-cloud/dist/packages/dbos-cloud/cloudutils.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/cloudutils.js +44 -3
- package/packages/dbos-cloud/dist/packages/dbos-cloud/cloudutils.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/login.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/login.js +3 -4
- package/packages/dbos-cloud/dist/packages/dbos-cloud/login.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/register.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/register.js +1 -2
- package/packages/dbos-cloud/dist/packages/dbos-cloud/register.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/userdb.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/userdb.js +3 -4
- package/packages/dbos-cloud/dist/packages/dbos-cloud/userdb.js.map +1 -1
- package/packages/dbos-cloud/dist/src/utils.d.ts +0 -1
- package/packages/dbos-cloud/dist/src/utils.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/src/utils.js +3 -12
- package/packages/dbos-cloud/dist/src/utils.js.map +1 -1
- package/packages/dbos-cloud/package.json +1 -1
- package/packages/dbos-openapi/package.json +1 -1
- package/packages/dbos-cloud/dist/schemas/system_db_schema.d.ts +0 -34
- package/packages/dbos-cloud/dist/schemas/system_db_schema.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/schemas/system_db_schema.js +0 -77
- package/packages/dbos-cloud/dist/schemas/system_db_schema.js.map +0 -1
- package/packages/dbos-cloud/dist/schemas/user_db_schema.d.ts +0 -11
- package/packages/dbos-cloud/dist/schemas/user_db_schema.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/schemas/user_db_schema.js +0 -16
- package/packages/dbos-cloud/dist/schemas/user_db_schema.js.map +0 -1
- package/packages/dbos-cloud/dist/src/communicator.d.ts +0 -25
- package/packages/dbos-cloud/dist/src/communicator.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/communicator.js +0 -26
- package/packages/dbos-cloud/dist/src/communicator.js.map +0 -1
- package/packages/dbos-cloud/dist/src/context.d.ts +0 -64
- package/packages/dbos-cloud/dist/src/context.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/context.js +0 -96
- package/packages/dbos-cloud/dist/src/context.js.map +0 -1
- package/packages/dbos-cloud/dist/src/data_validation.d.ts +0 -3
- package/packages/dbos-cloud/dist/src/data_validation.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/data_validation.js +0 -168
- package/packages/dbos-cloud/dist/src/data_validation.js.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-executor.d.ts +0 -102
- package/packages/dbos-cloud/dist/src/dbos-executor.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-executor.js +0 -631
- package/packages/dbos-cloud/dist/src/dbos-executor.js.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/applicationVersion.d.ts +0 -3
- package/packages/dbos-cloud/dist/src/dbos-runtime/applicationVersion.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/applicationVersion.js +0 -13
- package/packages/dbos-cloud/dist/src/dbos-runtime/applicationVersion.js.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/cli.d.ts +0 -8
- package/packages/dbos-cloud/dist/src/dbos-runtime/cli.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/cli.js +0 -61
- package/packages/dbos-cloud/dist/src/dbos-runtime/cli.js.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/config.d.ts +0 -29
- package/packages/dbos-cloud/dist/src/dbos-runtime/config.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/config.js +0 -111
- package/packages/dbos-cloud/dist/src/dbos-runtime/config.js.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/debug.d.ts +0 -4
- package/packages/dbos-cloud/dist/src/dbos-runtime/debug.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/debug.js +0 -21
- package/packages/dbos-cloud/dist/src/dbos-runtime/debug.js.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/init.d.ts +0 -7
- package/packages/dbos-cloud/dist/src/dbos-runtime/init.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/init.js +0 -51
- package/packages/dbos-cloud/dist/src/dbos-runtime/init.js.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/migrate.d.ts +0 -3
- package/packages/dbos-cloud/dist/src/dbos-runtime/migrate.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/migrate.js +0 -175
- package/packages/dbos-cloud/dist/src/dbos-runtime/migrate.js.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/runtime.d.ts +0 -28
- package/packages/dbos-cloud/dist/src/dbos-runtime/runtime.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/dbos-runtime/runtime.js +0 -95
- package/packages/dbos-cloud/dist/src/dbos-runtime/runtime.js.map +0 -1
- package/packages/dbos-cloud/dist/src/debugger/debug_workflow.d.ts +0 -38
- package/packages/dbos-cloud/dist/src/debugger/debug_workflow.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/debugger/debug_workflow.js +0 -211
- package/packages/dbos-cloud/dist/src/debugger/debug_workflow.js.map +0 -1
- package/packages/dbos-cloud/dist/src/decorators.d.ts +0 -118
- package/packages/dbos-cloud/dist/src/decorators.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/decorators.js +0 -467
- package/packages/dbos-cloud/dist/src/decorators.js.map +0 -1
- package/packages/dbos-cloud/dist/src/error.d.ts +0 -47
- package/packages/dbos-cloud/dist/src/error.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/error.js +0 -171
- package/packages/dbos-cloud/dist/src/error.js.map +0 -1
- package/packages/dbos-cloud/dist/src/httpServer/handler.d.ts +0 -54
- package/packages/dbos-cloud/dist/src/httpServer/handler.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/httpServer/handler.js +0 -175
- package/packages/dbos-cloud/dist/src/httpServer/handler.js.map +0 -1
- package/packages/dbos-cloud/dist/src/httpServer/handlerTypes.d.ts +0 -11
- package/packages/dbos-cloud/dist/src/httpServer/handlerTypes.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/httpServer/handlerTypes.js +0 -19
- package/packages/dbos-cloud/dist/src/httpServer/handlerTypes.js.map +0 -1
- package/packages/dbos-cloud/dist/src/httpServer/middleware.d.ts +0 -56
- package/packages/dbos-cloud/dist/src/httpServer/middleware.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/httpServer/middleware.js +0 -57
- package/packages/dbos-cloud/dist/src/httpServer/middleware.js.map +0 -1
- package/packages/dbos-cloud/dist/src/httpServer/server.d.ts +0 -45
- package/packages/dbos-cloud/dist/src/httpServer/server.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/httpServer/server.js +0 -253
- package/packages/dbos-cloud/dist/src/httpServer/server.js.map +0 -1
- package/packages/dbos-cloud/dist/src/system_database.d.ts +0 -91
- package/packages/dbos-cloud/dist/src/system_database.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/system_database.js +0 -462
- package/packages/dbos-cloud/dist/src/system_database.js.map +0 -1
- package/packages/dbos-cloud/dist/src/telemetry/collector.d.ts +0 -16
- package/packages/dbos-cloud/dist/src/telemetry/collector.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/telemetry/collector.js +0 -65
- package/packages/dbos-cloud/dist/src/telemetry/collector.js.map +0 -1
- package/packages/dbos-cloud/dist/src/telemetry/exporters.d.ts +0 -15
- package/packages/dbos-cloud/dist/src/telemetry/exporters.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/telemetry/exporters.js +0 -59
- package/packages/dbos-cloud/dist/src/telemetry/exporters.js.map +0 -1
- package/packages/dbos-cloud/dist/src/telemetry/index.d.ts +0 -11
- package/packages/dbos-cloud/dist/src/telemetry/index.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/telemetry/index.js +0 -19
- package/packages/dbos-cloud/dist/src/telemetry/index.js.map +0 -1
- package/packages/dbos-cloud/dist/src/telemetry/logs.d.ts +0 -47
- package/packages/dbos-cloud/dist/src/telemetry/logs.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/telemetry/logs.js +0 -195
- package/packages/dbos-cloud/dist/src/telemetry/logs.js.map +0 -1
- package/packages/dbos-cloud/dist/src/telemetry/traces.d.ts +0 -14
- package/packages/dbos-cloud/dist/src/telemetry/traces.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/telemetry/traces.js +0 -52
- package/packages/dbos-cloud/dist/src/telemetry/traces.js.map +0 -1
- package/packages/dbos-cloud/dist/src/transaction.d.ts +0 -29
- package/packages/dbos-cloud/dist/src/transaction.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/transaction.js +0 -27
- package/packages/dbos-cloud/dist/src/transaction.js.map +0 -1
- package/packages/dbos-cloud/dist/src/user_database.d.ts +0 -132
- package/packages/dbos-cloud/dist/src/user_database.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/user_database.js +0 -332
- package/packages/dbos-cloud/dist/src/user_database.js.map +0 -1
- package/packages/dbos-cloud/dist/src/workflow.d.ts +0 -195
- package/packages/dbos-cloud/dist/src/workflow.d.ts.map +0 -1
- package/packages/dbos-cloud/dist/src/workflow.js +0 -498
- package/packages/dbos-cloud/dist/src/workflow.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"delete-app.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/delete-app.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"delete-app.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/delete-app.ts"],"names":[],"mappings":"AAIA,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA8B7D"}
|
@@ -5,11 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.deleteApp = void 0;
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
|
-
const logs_1 = require("../../../src/telemetry/logs");
|
9
8
|
const cloudutils_1 = require("../cloudutils");
|
10
9
|
const node_path_1 = __importDefault(require("node:path"));
|
11
10
|
async function deleteApp(host) {
|
12
|
-
const logger =
|
11
|
+
const logger = (0, cloudutils_1.getLogger)();
|
13
12
|
const userCredentials = (0, cloudutils_1.getCloudCredentials)();
|
14
13
|
const bearerToken = "Bearer " + userCredentials.token;
|
15
14
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"delete-app.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/delete-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
1
|
+
{"version":3,"file":"delete-app.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/delete-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8CAA+D;AAC/D,0DAA6B;AAEtB,KAAK,UAAU,SAAS,CAAC,IAAY;IAC1C,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAA;IAC1B,MAAM,eAAe,GAAG,IAAA,gCAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,8DAA8D;IAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,mBAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAqB,CAAC;IAC1F,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC;IACjC,MAAM,CAAC,IAAI,CAAC,8CAA8C,OAAO,EAAE,CAAC,CAAA;IACpE,MAAM,CAAC,IAAI,CAAC,yBAAyB,OAAO,EAAE,CAAC,CAAA;IAE/C,IAAI,CAAC;QACH,MAAM,eAAK,CAAC,MAAM,CAAC,WAAW,IAAI,IAAI,eAAe,CAAC,QAAQ,gBAAgB,OAAO,EAAE,EAAE;YACvF,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;IACX,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,OAAO,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;AACH,CAAC;AA9BD,8BA8BC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deploy-app-code.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/deploy-app-code.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"deploy-app-code.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/deploy-app-code.ts"],"names":[],"mappings":"AAcA,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CA2FlF"}
|
@@ -7,20 +7,18 @@ exports.deployAppCode = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
8
|
const child_process_1 = require("child_process");
|
9
9
|
const fs_1 = require("fs");
|
10
|
-
const logs_1 = require("../../../src/telemetry/logs");
|
11
10
|
const cloudutils_1 = require("../cloudutils");
|
12
|
-
const utils_1 = require("../../../src/utils");
|
13
11
|
const path_1 = __importDefault(require("path"));
|
14
12
|
const deployDirectoryName = "dbos_deploy";
|
15
13
|
async function deployAppCode(host, docker) {
|
16
|
-
const logger =
|
14
|
+
const logger = (0, cloudutils_1.getLogger)();
|
17
15
|
const userCredentials = (0, cloudutils_1.getCloudCredentials)();
|
18
16
|
const bearerToken = "Bearer " + userCredentials.token;
|
19
17
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
20
18
|
const packageJson = require(path_1.default.join(process.cwd(), 'package.json'));
|
21
19
|
const appName = packageJson.name;
|
22
20
|
logger.info(`Loaded application name from package.json: ${appName}`);
|
23
|
-
(0,
|
21
|
+
(0, cloudutils_1.createDirectory)(deployDirectoryName);
|
24
22
|
// Verify that package-lock.json exists
|
25
23
|
if (!(0, fs_1.existsSync)(path_1.default.join(process.cwd(), 'package-lock.json'))) {
|
26
24
|
logger.error("package-lock.json not found. Please run 'npm install' before deploying.");
|
@@ -39,7 +37,7 @@ async function deployAppCode(host, docker) {
|
|
39
37
|
(0, child_process_1.execSync)(`zip -ry ${deployDirectoryName}/${appName}.zip ./* -x ${deployDirectoryName}/* > /dev/null`);
|
40
38
|
}
|
41
39
|
try {
|
42
|
-
const zipData = (0,
|
40
|
+
const zipData = (0, cloudutils_1.readFileSync)(`${deployDirectoryName}/${appName}.zip`, "base64");
|
43
41
|
// Submit the deploy request
|
44
42
|
logger.info(`Submitting deploy request for ${appName}`);
|
45
43
|
const response = await axios_1.default.post(`https://${host}/${userCredentials.userName}/application/${appName}`, {
|
@@ -75,7 +73,7 @@ async function deployAppCode(host, docker) {
|
|
75
73
|
applicationAvailable = true;
|
76
74
|
}
|
77
75
|
}
|
78
|
-
await (0,
|
76
|
+
await (0, cloudutils_1.sleep)(1000);
|
79
77
|
}
|
80
78
|
logger.info(`Application ${appName} successfuly deployed`);
|
81
79
|
logger.info(`Access your application at https://${host}/${userCredentials.userName}/application/${appName}`);
|
@@ -94,7 +92,7 @@ async function deployAppCode(host, docker) {
|
|
94
92
|
}
|
95
93
|
exports.deployAppCode = deployAppCode;
|
96
94
|
async function buildAppInDocker(appName) {
|
97
|
-
const logger =
|
95
|
+
const logger = (0, cloudutils_1.getLogger)();
|
98
96
|
// Verify Docker is running
|
99
97
|
try {
|
100
98
|
(0, child_process_1.execSync)(`docker > /dev/null 2>&1`);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deploy-app-code.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/deploy-app-code.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,iDAAyC;AACzC,2BAA+C;AAC/C,
|
1
|
+
{"version":3,"file":"deploy-app-code.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/deploy-app-code.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,iDAAyC;AACzC,2BAA+C;AAC/C,8CAAiH;AACjH,gDAAwB;AAGxB,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAOnC,KAAK,UAAU,aAAa,CAAC,IAAY,EAAE,MAAe;IAC/D,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAA;IAC1B,MAAM,eAAe,GAAG,IAAA,gCAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,8DAA8D;IAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAqB,CAAC;IAC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EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,CAAC,CAAC,CAAA;QAC/E,oBAAoB;QACpB,IAAA,wBAAQ,EAAC,wBAAwB,aAAa,IAAI,OAAO,EAAE,CAAC,CAAC;QAC7D,oEAAoE;QACpE,IAAA,wBAAQ,EAAC,aAAa,aAAa,SAAS,OAAO,QAAQ,mBAAmB,IAAI,OAAO,MAAM,CAAC,CAAC;QACjG,gCAAgC;QAChC,IAAA,wBAAQ,EAAC,eAAe,aAAa,EAAE,CAAC,CAAC;QACzC,IAAA,wBAAQ,EAAC,aAAa,aAAa,EAAE,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,CAAC,KAAK,CAAC,+BAA+B,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAChF,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-app-logs.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/get-app-logs.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"get-app-logs.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/get-app-logs.ts"],"names":[],"mappings":"AAIA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA8B9D"}
|
@@ -5,11 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.getAppLogs = void 0;
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
|
-
const logs_1 = require("../../../src/telemetry/logs");
|
9
8
|
const cloudutils_1 = require("../cloudutils");
|
10
9
|
const node_path_1 = __importDefault(require("node:path"));
|
11
10
|
async function getAppLogs(host) {
|
12
|
-
const logger =
|
11
|
+
const logger = (0, cloudutils_1.getLogger)();
|
13
12
|
const userCredentials = (0, cloudutils_1.getCloudCredentials)();
|
14
13
|
const bearerToken = "Bearer " + userCredentials.token;
|
15
14
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-app-logs.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/get-app-logs.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
1
|
+
{"version":3,"file":"get-app-logs.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/get-app-logs.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8CAA+D;AAC/D,0DAA6B;AAEtB,KAAK,UAAU,UAAU,CAAC,IAAY;IAC3C,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAC;IAC3B,MAAM,eAAe,GAAG,IAAA,gCAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,8DAA8D;IAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,mBAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAqB,CAAC;IAC1F,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC;IACjC,MAAM,CAAC,IAAI,CAAC,oCAAoC,OAAO,EAAE,CAAC,CAAA;IAE1D,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,eAAe,CAAC,QAAQ,qBAAqB,OAAO,EAAE,EAAE;YACrG,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;IACX,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,0CAA0C,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YACvF,OAAO,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,0CAA0C,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3F,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;AACH,CAAC;AA9BD,gCA8BC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list-apps.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/list-apps.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"list-apps.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/list-apps.ts"],"names":[],"mappings":"AAIA,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmC5D"}
|
@@ -5,10 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.listApps = void 0;
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
|
-
const logs_1 = require("../../../src/telemetry/logs");
|
9
8
|
const cloudutils_1 = require("../cloudutils");
|
10
9
|
async function listApps(host) {
|
11
|
-
const logger =
|
10
|
+
const logger = (0, cloudutils_1.getLogger)();
|
12
11
|
const userCredentials = (0, cloudutils_1.getCloudCredentials)();
|
13
12
|
const bearerToken = "Bearer " + userCredentials.token;
|
14
13
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list-apps.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/list-apps.ts"],"names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CAAC,aAAa,CAAC,CAAC,CAAC;QAC3C,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YACjE,OAAO,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,gCAAiC,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACrE,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;AACH,CAAC;AAnCD,4BAmCC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/register-app.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/register-app.ts"],"names":[],"mappings":"AAIA,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAuCjG"}
|
@@ -5,11 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.registerApp = void 0;
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
|
-
const logs_1 = require("../../../src/telemetry/logs");
|
9
8
|
const cloudutils_1 = require("../cloudutils");
|
10
9
|
const node_path_1 = __importDefault(require("node:path"));
|
11
10
|
async function registerApp(dbname, host, machines) {
|
12
|
-
const logger =
|
11
|
+
const logger = (0, cloudutils_1.getLogger)();
|
13
12
|
const userCredentials = (0, cloudutils_1.getCloudCredentials)();
|
14
13
|
const bearerToken = "Bearer " + userCredentials.token;
|
15
14
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register-app.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/register-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
1
|
+
{"version":3,"file":"register-app.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/register-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8CAA+D;AAC/D,0DAA6B;AAEtB,KAAK,UAAU,WAAW,CAAC,MAAc,EAAE,IAAY,EAAE,QAAgB;IAC9E,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAC;IAC3B,MAAM,eAAe,GAAG,IAAA,gCAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,8DAA8D;IAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,mBAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAqB,CAAC;IAC1F,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC;IACjC,MAAM,CAAC,IAAI,CAAC,8CAA8C,OAAO,EAAE,CAAC,CAAA;IACpE,MAAM,CAAC,IAAI,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAA;IAElD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAC9B,WAAW,IAAI,IAAI,eAAe,CAAC,QAAQ,cAAc,EACzD;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,MAAM;YAChB,OAAO,EAAE,QAAQ;SAClB,EACD;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAc,CAAC;QACrC,MAAM,CAAC,IAAI,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAC;QACnD,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,QAAQ,IAAI,EAAE,CAAC,CAAC;QACtC,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,kCAAkC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC/E,OAAO,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,kCAAkC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACnF,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;AACH,CAAC;AAvCD,kCAuCC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"update-app.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/update-app.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"update-app.d.ts","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/update-app.ts"],"names":[],"mappings":"AAKA,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAwC/E"}
|
@@ -5,11 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.updateApp = void 0;
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
|
-
const logs_1 = require("../../../src/telemetry/logs");
|
9
8
|
const cloudutils_1 = require("../cloudutils");
|
10
9
|
const node_path_1 = __importDefault(require("node:path"));
|
11
10
|
async function updateApp(host, machines) {
|
12
|
-
const logger =
|
11
|
+
const logger = (0, cloudutils_1.getLogger)();
|
13
12
|
const userCredentials = (0, cloudutils_1.getCloudCredentials)();
|
14
13
|
const bearerToken = "Bearer " + userCredentials.token;
|
15
14
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"update-app.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/update-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
1
|
+
{"version":3,"file":"update-app.js","sourceRoot":"","sources":["../../../../packages/dbos-cloud/applications/update-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8CAA+D;AAE/D,0DAA6B;AAEtB,KAAK,UAAU,SAAS,CAAC,IAAY,EAAE,QAAgB;IAC5D,MAAM,MAAM,GAAI,IAAA,sBAAS,GAAE,CAAC;IAC5B,MAAM,eAAe,GAAG,IAAA,gCAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,8DAA8D;IAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,mBAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAqB,CAAC;IAC1F,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC;IACjC,MAAM,CAAC,IAAI,CAAC,8CAA8C,OAAO,EAAE,CAAC,CAAA;IACpE,MAAM,CAAC,IAAI,CAAC,yBAAyB,OAAO,EAAE,CAAC,CAAA;IAE/C,IAAI,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,wBAAwB,OAAO,OAAO,QAAQ,WAAW,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,eAAK,CAAC,KAAK,CAC9B,WAAW,IAAI,IAAI,eAAe,CAAC,QAAQ,gBAAgB,OAAO,EAAE,EACpE;YACE,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,QAAQ;SAClB,EACD;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,WAAW,GAAgB,MAAM,CAAC,IAAmB,CAAC;QAC5D,MAAM,CAAC,IAAI,CAAC,yBAAyB,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;QACzD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,SAAS,EAAE,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAC9I,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,OAAO,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACL,CAAW,CAAC,OAAO,GAAG,gCAAgC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC;YAC1F,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAChB,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;AACH,CAAC;AAxCD,8BAwCC"}
|
@@ -1,5 +1,12 @@
|
|
1
|
+
/// <reference types="node" />
|
1
2
|
import { DBOSCloudCredentials } from "./login";
|
3
|
+
import { Logger } from "winston";
|
4
|
+
export declare function getLogger(): Logger;
|
2
5
|
export declare function getCloudCredentials(): DBOSCloudCredentials;
|
3
6
|
export declare function credentialsExist(): boolean;
|
4
7
|
export declare function runCommand(command: string, args?: string[]): Promise<number>;
|
8
|
+
export declare function readFileSync(path: string, encoding?: BufferEncoding): string | Buffer;
|
9
|
+
export declare const sleep: (ms: number) => Promise<unknown>;
|
10
|
+
export type ValuesOf<T> = T[keyof T];
|
11
|
+
export declare function createDirectory(path: string): string | undefined;
|
5
12
|
//# sourceMappingURL=cloudutils.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cloudutils.d.ts","sourceRoot":"","sources":["../../../packages/dbos-cloud/cloudutils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAe,MAAM,SAAS,CAAC;
|
1
|
+
{"version":3,"file":"cloudutils.d.ts","sourceRoot":"","sources":["../../../packages/dbos-cloud/cloudutils.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAe,MAAM,SAAS,CAAC;AAI5D,OAAO,EAAoC,MAAM,EAAE,MAAM,SAAS,CAAC;AAEnE,wBAAgB,SAAS,IAAI,MAAM,CASlC;AAqBD,wBAAgB,mBAAmB,IAAI,oBAAoB,CAW1D;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAGD,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,EAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBhF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,cAAuB,GAAG,MAAM,GAAG,MAAM,CAa7F;AAED,eAAO,MAAM,KAAK,OAAQ,MAAM,qBAA0C,CAAC;AAE3E,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAGrC,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEhE"}
|
@@ -3,13 +3,33 @@ 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.runCommand = exports.credentialsExist = exports.getCloudCredentials = void 0;
|
6
|
+
exports.createDirectory = exports.sleep = exports.readFileSync = exports.runCommand = exports.credentialsExist = exports.getCloudCredentials = exports.getLogger = void 0;
|
7
7
|
const login_1 = require("./login");
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
9
9
|
const child_process_1 = require("child_process");
|
10
|
-
const
|
10
|
+
const winston_1 = require("winston");
|
11
|
+
function getLogger() {
|
12
|
+
const winstonTransports = [];
|
13
|
+
winstonTransports.push(new winston_1.transports.Console({
|
14
|
+
format: consoleFormat,
|
15
|
+
level: "info",
|
16
|
+
}));
|
17
|
+
return (0, winston_1.createLogger)({ transports: winstonTransports });
|
18
|
+
}
|
19
|
+
exports.getLogger = getLogger;
|
20
|
+
const consoleFormat = winston_1.format.combine(winston_1.format.errors({ stack: true }), winston_1.format.timestamp(), winston_1.format.colorize(), winston_1.format.printf((info) => {
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
22
|
+
const { timestamp, level, message, stack } = info;
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment
|
24
|
+
const ts = timestamp.slice(0, 19).replace("T", " ");
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment
|
26
|
+
const formattedStack = stack?.split("\n").slice(1).join("\n");
|
27
|
+
const messageString = typeof message === "string" ? message : JSON.stringify(message);
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
29
|
+
return `${ts} [${level}]: ${messageString} ${stack ? "\n" + formattedStack : ""}`;
|
30
|
+
}));
|
11
31
|
function getCloudCredentials() {
|
12
|
-
const logger =
|
32
|
+
const logger = getLogger();
|
13
33
|
if (!credentialsExist()) {
|
14
34
|
logger.error("Error: not logged in");
|
15
35
|
process.exit(1);
|
@@ -44,4 +64,25 @@ function runCommand(command, args = []) {
|
|
44
64
|
});
|
45
65
|
}
|
46
66
|
exports.runCommand = runCommand;
|
67
|
+
function readFileSync(path, encoding = "utf8") {
|
68
|
+
// First, check the file
|
69
|
+
fs_1.default.stat(path, (error, stats) => {
|
70
|
+
if (error) {
|
71
|
+
throw new Error(`checking on ${path}. ${error.code}: ${error.errno}`);
|
72
|
+
}
|
73
|
+
else if (!stats.isFile()) {
|
74
|
+
throw new Error(`config file ${path} is not a file`);
|
75
|
+
}
|
76
|
+
});
|
77
|
+
// Then, read its content
|
78
|
+
const fileContent = fs_1.default.readFileSync(path, { encoding });
|
79
|
+
return fileContent;
|
80
|
+
}
|
81
|
+
exports.readFileSync = readFileSync;
|
82
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
83
|
+
exports.sleep = sleep;
|
84
|
+
function createDirectory(path) {
|
85
|
+
return fs_1.default.mkdirSync(path, { recursive: true });
|
86
|
+
}
|
87
|
+
exports.createDirectory = createDirectory;
|
47
88
|
//# sourceMappingURL=cloudutils.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cloudutils.js","sourceRoot":"","sources":["../../../packages/dbos-cloud/cloudutils.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA4D;
|
1
|
+
{"version":3,"file":"cloudutils.js","sourceRoot":"","sources":["../../../packages/dbos-cloud/cloudutils.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA4D;AAE5D,4CAAoB;AACpB,iDAAoD;AACpD,qCAAmE;AAEnE,SAAgB,SAAS;IACvB,MAAM,iBAAiB,GAAsB,EAAE,CAAC;IAChD,iBAAiB,CAAC,IAAI,CACpB,IAAI,oBAAU,CAAC,OAAO,CAAC;QACrB,MAAM,EAAE,aAAa;QACrB,KAAK,EAAG,MAAM;KACf,CAAC,CACH,CAAC;IACF,OAAO,IAAA,sBAAY,EAAC,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC,CAAC;AACzD,CAAC;AATD,8BASC;AAED,MAAM,aAAa,GAAG,gBAAM,CAAC,OAAO,CAClC,gBAAM,CAAC,MAAM,CAAC,EAAE,KAA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,IAAI,KAAK,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;QACxE,CAAC;aAAM,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,eAAe,IAAI,gBAAgB,CAAC,CAAC;QACvD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,yBAAyB;IACzB,MAAM,WAAW,GAAW,YAAE,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAE,CAAC;IACjE,OAAO,WAAW,CAAC;AACrB,CAAC;AAbD,oCAaC;AAEM,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAA9D,QAAA,KAAK,SAAyD;AAK3E,SAAgB,eAAe,CAAC,IAAY;IAC1C,OAAO,YAAE,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AACjD,CAAC;AAFD,0CAEC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../packages/dbos-cloud/login.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../packages/dbos-cloud/login.ts"],"names":[],"mappings":"AAOA,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"}
|
@@ -4,13 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.login = exports.DBOSCloudIdentifier = exports.DBOSClientID = exports.dbosEnvPath = void 0;
|
7
|
-
const logs_1 = require("../../src/telemetry/logs");
|
8
7
|
const axios_1 = __importDefault(require("axios"));
|
9
|
-
const utils_1 = require("../../src/utils");
|
10
8
|
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
11
9
|
const jwks_rsa_1 = __importDefault(require("jwks-rsa"));
|
12
10
|
const child_process_1 = require("child_process");
|
13
11
|
const fs_1 = __importDefault(require("fs"));
|
12
|
+
const cloudutils_1 = require("./cloudutils");
|
14
13
|
exports.dbosEnvPath = ".dbos";
|
15
14
|
exports.DBOSClientID = 'G38fLmVErczEo9ioCFjVIHea6yd0qMZu';
|
16
15
|
exports.DBOSCloudIdentifier = 'dbos-cloud-api';
|
@@ -39,7 +38,7 @@ async function verifyToken(token) {
|
|
39
38
|
});
|
40
39
|
}
|
41
40
|
async function login(username) {
|
42
|
-
const logger =
|
41
|
+
const logger = (0, cloudutils_1.getLogger)();
|
43
42
|
logger.info(`Logging in!`);
|
44
43
|
const deviceCodeRequest = {
|
45
44
|
method: 'POST',
|
@@ -74,7 +73,7 @@ async function login(username) {
|
|
74
73
|
let elapsedTimeSec = 0;
|
75
74
|
while (elapsedTimeSec < deviceCodeResponse.expires_in) {
|
76
75
|
try {
|
77
|
-
await (0,
|
76
|
+
await (0, cloudutils_1.sleep)(deviceCodeResponse.interval * 1000);
|
78
77
|
elapsedTimeSec += deviceCodeResponse.interval;
|
79
78
|
const response = await axios_1.default.request(tokenRequest);
|
80
79
|
tokenResponse = response.data;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../packages/dbos-cloud/login.ts"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../packages/dbos-cloud/login.ts"],"names":[],"mappings":";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C;IACvB,OAAO,cAAc,GAAG,kBAAkB,CAAC,UAAU,EAAE,CAAC;QACtD,IAAI,CAAC;YACH,MAAM,IAAA,kBAAK,EAAC,kBAAkB,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;YAC/C,cAAc,IAAI,kBAAkB,CAAC,QAAQ,CAAC;YAC9C,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACnD,aAAa,GAAG,QAAQ,CAAC,IAAqB,CAAC;YAC/C,MAAM;QACR,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IACD,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,WAAW,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAC9C,MAAM,WAAW,GAAyB;QACxC,KAAK,EAAE,aAAa,CAAC,YAAY;QACjC,QAAQ,EAAE,QAAQ;KACnB,CAAC;IACF,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;AA5DD,sBA4DC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../packages/dbos-cloud/register.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../packages/dbos-cloud/register.ts"],"names":[],"mappings":"AAGA,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA8BlF"}
|
@@ -5,13 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.registerUser = void 0;
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
|
-
const logs_1 = require("../../src/telemetry/logs");
|
9
8
|
const cloudutils_1 = require("./cloudutils");
|
10
9
|
async function registerUser(username, host) {
|
11
10
|
const userCredentials = (0, cloudutils_1.getCloudCredentials)();
|
12
11
|
const bearerToken = "Bearer " + userCredentials.token;
|
13
12
|
const userName = userCredentials.userName;
|
14
|
-
const logger =
|
13
|
+
const logger = (0, cloudutils_1.getLogger)();
|
15
14
|
try {
|
16
15
|
// First, register the user.
|
17
16
|
const register = await axios_1.default.put(`https://${host}/user`, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../packages/dbos-cloud/register.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../packages/dbos-cloud/register.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,6CAA8D;AAEvD,KAAK,UAAU,YAAY,CAAC,QAAgB,EAAE,IAAY;IAC/D,MAAM,eAAe,GAAG,IAAA,gCAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IACtD,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAC;IAC3B,IAAI,CAAC;QACH,4BAA4B;QAC5B,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAC9B,WAAW,IAAI,OAAO,EACtB;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;IAChE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,2BAA2B,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QAC1E,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,2BAA2B,QAAQ,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/E,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AA9BD,oCA8BC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"userdb.d.ts","sourceRoot":"","sources":["../../../packages/dbos-cloud/userdb.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"userdb.d.ts","sourceRoot":"","sources":["../../../packages/dbos-cloud/userdb.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,iBAmCvH;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAoB9D;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAa3D;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAYzF"}
|
@@ -5,11 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.getUserDBInfo = exports.getUserDb = exports.deleteUserDb = exports.createUserDb = void 0;
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
|
-
const logs_1 = require("../../src/telemetry/logs");
|
9
8
|
const cloudutils_1 = require("./cloudutils");
|
10
9
|
const utils_1 = require("../../src/utils");
|
11
10
|
async function createUserDb(host, dbName, adminName, adminPassword, sync) {
|
12
|
-
const logger =
|
11
|
+
const logger = (0, cloudutils_1.getLogger)();
|
13
12
|
const userCredentials = (0, cloudutils_1.getCloudCredentials)();
|
14
13
|
const bearerToken = "Bearer " + userCredentials.token;
|
15
14
|
try {
|
@@ -41,7 +40,7 @@ async function createUserDb(host, dbName, adminName, adminPassword, sync) {
|
|
41
40
|
}
|
42
41
|
exports.createUserDb = createUserDb;
|
43
42
|
async function deleteUserDb(host, dbName) {
|
44
|
-
const logger =
|
43
|
+
const logger = (0, cloudutils_1.getLogger)();
|
45
44
|
const userCredentials = (0, cloudutils_1.getCloudCredentials)();
|
46
45
|
const bearerToken = "Bearer " + userCredentials.token;
|
47
46
|
try {
|
@@ -64,7 +63,7 @@ async function deleteUserDb(host, dbName) {
|
|
64
63
|
}
|
65
64
|
exports.deleteUserDb = deleteUserDb;
|
66
65
|
async function getUserDb(host, dbName) {
|
67
|
-
const logger =
|
66
|
+
const logger = (0, cloudutils_1.getLogger)();
|
68
67
|
try {
|
69
68
|
const userDBInfo = await getUserDBInfo(host, dbName);
|
70
69
|
logger.info(userDBInfo);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"userdb.js","sourceRoot":"","sources":["../../../packages/dbos-cloud/userdb.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
1
|
+
{"version":3,"file":"userdb.js","sourceRoot":"","sources":["../../../packages/dbos-cloud/userdb.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,6CAA8D;AAC9D,2CAAwC;AASjC,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,MAAc,EAAE,SAAiB,EAAE,aAAqB,EAAE,IAAa;IACtH,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAC;IAC3B,MAAM,eAAe,GAAG,IAAA,gCAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,IAAI,CAAC;QACH,MAAM,eAAK,CAAC,IAAI,CACd,WAAW,IAAI,IAAI,eAAe,CAAC,QAAQ,mBAAmB,EAC9D,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,EACpE;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QAEF,MAAM,CAAC,IAAI,CAAC,2CAA2C,MAAM,EAAE,CAAC,CAAC;QAEjE,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,MAAM,GAAG,EAAE,CAAC;YAChB,OAAO,MAAM,IAAI,WAAW,EAAE,CAAC;gBAC7B,MAAM,IAAA,aAAK,EAAC,KAAK,CAAC,CAAC;gBACnB,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;gBACrD,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBACxB,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;YAC7B,CAAC;QACH,CAAC;IAC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H,CAAC;AApBD,oCAoBC;AAEM,KAAK,UAAU,SAAS,CAAC,IAAY,EAAE,MAAc;IAC1D,MAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAC;IAE3B,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACrD,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC1B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,MAAM,CAAC,KAAK,CAAC,0BAA0B,MAAM,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QACxE,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,0BAA0B,MAAM,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;AACH,CAAC;AAbD,8BAaC;AAEM,KAAK,UAAU,aAAa,CAAC,IAAY,EAAE,MAAc;IAC9D,MAAM,eAAe,GAAG,IAAA,gCAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,eAAe,CAAC,QAAQ,0BAA0B,MAAM,EAAE,EAAE;QACzG,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,WAAW;SAC3B;KACF,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC,IAAsB,CAAC;AACpC,CAAC;AAZD,sCAYC"}
|
package/dist/src/context.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
/// <reference types="node" />
|
3
|
+
/// <reference types="node/http" />
|
3
4
|
/// <reference types="@koa/bodyparser/dist/body-parser" />
|
4
5
|
import { Span } from "@opentelemetry/sdk-trace-base";
|
5
6
|
import { GlobalLogger as Logger, Logger as DBOSLogger } from "./telemetry/logs";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":"
|
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,CAAC;IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAA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AM;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"}
|
@@ -1,6 +1,7 @@
|
|
1
|
-
/// <reference types="@koa/bodyparser/dist/body-parser" />
|
2
1
|
/// <reference types="koa__router" />
|
3
2
|
/// <reference types="node" />
|
3
|
+
/// <reference types="node/http" />
|
4
|
+
/// <reference types="@koa/bodyparser/dist/body-parser" />
|
4
5
|
import Koa from 'koa';
|
5
6
|
import Router from '@koa/router';
|
6
7
|
import { DBOSExecutor } from "../dbos-executor";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/httpServer/server.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/httpServer/server.ts"],"names":[],"mappings":";;;;AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,MAAM,MAAM,aAAa,CAAC;AAiBjC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAK3D,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,eAAO,MAAM,mBAAmB,4BAA4B,CAAA;AAC5D,eAAO,MAAM,SAAS,kBAAkB,CAAA;AAExC,qBAAa,cAAc;IAUb,QAAQ,CAAC,QAAQ,EAAE,YAAY;IAT3C,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;IAClB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;;;OAIG;gBACkB,QAAQ,EAAE,YAAY,EAAE,MAAM,GAAE;QAAE,GAAG,CAAC,EAAE,GAAG,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAO;IAwBxF;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM;IAOnB;;OAEG;IACD,MAAM,CAAC,sBAAsB,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAWtE;;;OAGG;IACH,MAAM,CAAC,wBAAwB,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAmBtE;;OAEG;IACH,MAAM,CAAC,0BAA0B,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;CA8KzE"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/// <reference types="node" />
|
2
|
-
/// <reference types="@koa/bodyparser/dist/body-parser" />
|
3
2
|
/// <reference types="node" />
|
3
|
+
/// <reference types="node/http" />
|
4
|
+
/// <reference types="@koa/bodyparser/dist/body-parser" />
|
4
5
|
import { IncomingMessage } from "http";
|
5
6
|
import { HTTPRequest } from "../context";
|
6
7
|
import { InvokeFuncs } from "../httpServer/handler";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"testing_runtime.d.ts","sourceRoot":"","sources":["../../../src/testing/testing_runtime.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"testing_runtime.d.ts","sourceRoot":"","sources":["../../../src/testing/testing_runtime.ts"],"names":[],"mappings":";;;;AACA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAmB,MAAM,YAAY,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EA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AM,EAAE,MAAM,CAAC,EAAE,oBAAoB,GAAG,WAAW,CAAC,CAAC,CAAC;IA8BzG;;OAEG;IACH,mBAAmB;IAOb,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;IAI7H,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,gBAAgB,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC;IAItD,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAK3D,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAIvC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B;;OAEG;IACH,WAAW,IAAI,YAAY;CAM5B"}
|
package/dist/src/utils.d.ts
CHANGED
@@ -2,6 +2,5 @@
|
|
2
2
|
export declare function readFileSync(path: string, encoding?: BufferEncoding): string | Buffer;
|
3
3
|
export declare const sleep: (ms: number) => Promise<unknown>;
|
4
4
|
export type ValuesOf<T> = T[keyof T];
|
5
|
-
export declare function createDirectory(path: string): string | undefined;
|
6
5
|
export declare function findPackageRoot(start: string | string[]): string;
|
7
6
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/src/utils.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";AASA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,cAAuB,GAAG,MAAM,GAAG,MAAM,CAa7F;AAED,eAAO,MAAM,KAAK,OAAQ,MAAM,qBAA0C,CAAC;AAE3E,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAGrC,wBAAgB,eAAe,CAAC,
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";AASA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,cAAuB,GAAG,MAAM,GAAG,MAAM,CAa7F;AAED,eAAO,MAAM,KAAK,OAAQ,MAAM,qBAA0C,CAAC;AAE3E,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAGrC,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAoBhE"}
|
package/dist/src/utils.js
CHANGED
@@ -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.findPackageRoot = exports.
|
6
|
+
exports.findPackageRoot = exports.sleep = exports.readFileSync = void 0;
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
8
8
|
const path_1 = __importDefault(require("path"));
|
9
9
|
/*
|
@@ -29,10 +29,6 @@ function readFileSync(path, encoding = "utf8") {
|
|
29
29
|
exports.readFileSync = readFileSync;
|
30
30
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
31
31
|
exports.sleep = sleep;
|
32
|
-
function createDirectory(path) {
|
33
|
-
return fs_1.default.mkdirSync(path, { recursive: true });
|
34
|
-
}
|
35
|
-
exports.createDirectory = createDirectory;
|
36
32
|
// Adapated and translated from from: https://github.com/junosuarez/find-root
|
37
33
|
function findPackageRoot(start) {
|
38
34
|
if (typeof start === 'string') {
|
@@ -46,13 +42,8 @@ function findPackageRoot(start) {
|
|
46
42
|
}
|
47
43
|
start.pop();
|
48
44
|
const dir = start.join(path_1.default.sep);
|
49
|
-
|
50
|
-
|
51
|
-
return dir;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
catch (e) {
|
55
|
-
// Error handling can be implemented here if necessary
|
45
|
+
if (fs_1.default.existsSync(path_1.default.join(dir, 'package.json'))) {
|
46
|
+
return dir;
|
56
47
|
}
|
57
48
|
return findPackageRoot(start);
|
58
49
|
}
|