@dbos-inc/dbos-sdk 0.8.46-preview → 0.8.49-preview
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/packages/dbos-cloud/applications/deploy-app-code.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/applications/deploy-app-code.js +15 -1
- package/dist/packages/dbos-cloud/applications/deploy-app-code.js.map +1 -1
- package/dist/packages/dbos-cloud/applications/list-apps.d.ts +1 -1
- package/dist/packages/dbos-cloud/applications/list-apps.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/applications/list-apps.js +16 -8
- package/dist/packages/dbos-cloud/applications/list-apps.js.map +1 -1
- package/dist/packages/dbos-cloud/applications/register-app.d.ts +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/types.d.ts +0 -1
- package/dist/packages/dbos-cloud/applications/types.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/applications/update-app.d.ts +1 -1
- package/dist/packages/dbos-cloud/applications/update-app.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/applications/update-app.js +2 -4
- package/dist/packages/dbos-cloud/applications/update-app.js.map +1 -1
- package/dist/packages/dbos-cloud/cli.js +9 -9
- package/dist/packages/dbos-cloud/cli.js.map +1 -1
- package/dist/packages/dbos-cloud/cloudutils.d.ts +1 -0
- package/dist/packages/dbos-cloud/cloudutils.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/cloudutils.js +2 -1
- package/dist/packages/dbos-cloud/cloudutils.js.map +1 -1
- package/dist/packages/dbos-cloud/userdb.d.ts +1 -1
- package/dist/packages/dbos-cloud/userdb.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/userdb.js +12 -3
- package/dist/packages/dbos-cloud/userdb.js.map +1 -1
- package/dist/src/dbos-executor.d.ts +0 -1
- package/dist/src/dbos-executor.d.ts.map +1 -1
- package/dist/src/dbos-executor.js +4 -8
- package/dist/src/dbos-executor.js.map +1 -1
- package/dist/src/dbos-runtime/cli.js +1 -2
- package/dist/src/dbos-runtime/cli.js.map +1 -1
- package/dist/src/dbos-runtime/runtime.d.ts +7 -9
- package/dist/src/dbos-runtime/runtime.d.ts.map +1 -1
- package/dist/src/dbos-runtime/runtime.js +35 -21
- package/dist/src/dbos-runtime/runtime.js.map +1 -1
- package/dist/src/httpServer/handler.d.ts.map +1 -1
- package/dist/src/httpServer/handler.js +3 -2
- package/dist/src/httpServer/handler.js.map +1 -1
- package/dist/src/httpServer/server.d.ts +8 -6
- package/dist/src/httpServer/server.d.ts.map +1 -1
- package/dist/src/httpServer/server.js +23 -29
- package/dist/src/httpServer/server.js.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/system_database.js +5 -5
- package/dist/src/system_database.js.map +1 -1
- package/dist/src/telemetry/collector.d.ts.map +1 -1
- package/dist/src/telemetry/collector.js +1 -0
- package/dist/src/telemetry/collector.js.map +1 -1
- package/dist/src/telemetry/exporters.d.ts +2 -0
- package/dist/src/telemetry/exporters.d.ts.map +1 -1
- package/dist/src/telemetry/exporters.js +4 -0
- package/dist/src/telemetry/exporters.js.map +1 -1
- package/dist/src/telemetry/logs.d.ts.map +1 -1
- package/dist/src/telemetry/logs.js +15 -33
- package/dist/src/telemetry/logs.js.map +1 -1
- package/dist/src/telemetry/traces.js +2 -2
- package/dist/src/telemetry/traces.js.map +1 -1
- package/dist/src/testing/testing_runtime.d.ts +2 -0
- package/dist/src/testing/testing_runtime.d.ts.map +1 -1
- package/dist/src/testing/testing_runtime.js +6 -0
- package/dist/src/testing/testing_runtime.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/migrations/20240124015239_status_timestamp.js +22 -0
- package/package.json +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 +15 -1
- 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/list-apps.d.ts +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 +16 -8
- 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 +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/types.d.ts +0 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/types.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/update-app.d.ts +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 +2 -4
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/update-app.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/cli.js +9 -9
- package/packages/dbos-cloud/dist/packages/dbos-cloud/cli.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/cloudutils.d.ts +1 -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 +2 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/cloudutils.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/userdb.d.ts +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 +12 -3
- package/packages/dbos-cloud/dist/packages/dbos-cloud/userdb.js.map +1 -1
- package/packages/dbos-cloud/package.json +1 -1
- package/packages/dbos-openapi/package.json +1 -1
@@ -0,0 +1,22 @@
|
|
1
|
+
exports.up = function(knex) {
|
2
|
+
return knex.schema.withSchema('dbos')
|
3
|
+
.table('workflow_status', function(table) {
|
4
|
+
// Add CREATED_AT column with default value as current epoch time in milliseconds
|
5
|
+
table.bigInteger('created_at')
|
6
|
+
.notNullable()
|
7
|
+
.defaultTo(knex.raw('(EXTRACT(EPOCH FROM now())*1000)::bigint'));
|
8
|
+
|
9
|
+
// Add UPDATED_AT column with default value as current epoch time in milliseconds
|
10
|
+
table.bigInteger('updated_at')
|
11
|
+
.notNullable()
|
12
|
+
.defaultTo(knex.raw('(EXTRACT(EPOCH FROM now())*1000)::bigint'));
|
13
|
+
});
|
14
|
+
};
|
15
|
+
|
16
|
+
exports.down = function(knex) {
|
17
|
+
return knex.schema.withSchema('dbos')
|
18
|
+
.table('workflow_status', function(table) {
|
19
|
+
table.dropColumn('created_at');
|
20
|
+
table.dropColumn('updated_at');
|
21
|
+
});
|
22
|
+
};
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deploy-app-code.d.ts","sourceRoot":"","sources":["../../../../applications/deploy-app-code.ts"],"names":[],"mappings":"AAcA,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,
|
1
|
+
{"version":3,"file":"deploy-app-code.d.ts","sourceRoot":"","sources":["../../../../applications/deploy-app-code.ts"],"names":[],"mappings":"AAcA,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAmGlF"}
|
@@ -36,6 +36,9 @@ async function deployAppCode(host, docker) {
|
|
36
36
|
// Zip the current directory and deploy from there. Requires app to have already been built. Only for testing.
|
37
37
|
(0, child_process_1.execSync)(`zip -ry ${deployDirectoryName}/${appName}.zip ./* -x ${deployDirectoryName}/* > /dev/null`);
|
38
38
|
}
|
39
|
+
const interpolatedConfig = readInterpolatedConfig(cloudutils_1.dbosConfigFilePath);
|
40
|
+
(0, fs_1.writeFileSync)(`${deployDirectoryName}/${cloudutils_1.dbosConfigFilePath}`, interpolatedConfig);
|
41
|
+
(0, child_process_1.execSync)(`zip -j ${deployDirectoryName}/${appName}.zip ${deployDirectoryName}/${cloudutils_1.dbosConfigFilePath} > /dev/null`);
|
39
42
|
try {
|
40
43
|
const zipData = (0, cloudutils_1.readFileSync)(`${deployDirectoryName}/${appName}.zip`, "base64");
|
41
44
|
// Submit the deploy request
|
@@ -58,9 +61,13 @@ async function deployAppCode(host, docker) {
|
|
58
61
|
if (count % 5 === 0) {
|
59
62
|
logger.info(`Waiting for ${appName} with version ${deployOutput.ApplicationVersion} to be available`);
|
60
63
|
if (count > 20) {
|
61
|
-
logger.info(`If ${appName} takes too long to become available, check its logs
|
64
|
+
logger.info(`If ${appName} takes too long to become available, check its logs with 'npx dbos-cloud applications logs'`);
|
62
65
|
}
|
63
66
|
}
|
67
|
+
if (count > 180) {
|
68
|
+
logger.error("Application taking too long to become available");
|
69
|
+
return 1;
|
70
|
+
}
|
64
71
|
// Retrieve the application status, check if it is "AVAILABLE"
|
65
72
|
const list = await axios_1.default.get(`https://${host}/${userCredentials.userName}/application`, {
|
66
73
|
headers: {
|
@@ -91,6 +98,13 @@ async function deployAppCode(host, docker) {
|
|
91
98
|
}
|
92
99
|
}
|
93
100
|
exports.deployAppCode = deployAppCode;
|
101
|
+
function readInterpolatedConfig(configFilePath) {
|
102
|
+
const configFileContent = (0, cloudutils_1.readFileSync)(configFilePath);
|
103
|
+
const regex = /\${([^}]+)}/g; // Regex to match ${VAR_NAME} style placeholders
|
104
|
+
return configFileContent.replace(regex, (_, g1) => {
|
105
|
+
return process.env[g1] || ""; // If the env variable is not set, return an empty string.
|
106
|
+
});
|
107
|
+
}
|
94
108
|
async function buildAppInDocker(appName) {
|
95
109
|
const logger = (0, cloudutils_1.getLogger)();
|
96
110
|
// Verify Docker is running
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deploy-app-code.js","sourceRoot":"","sources":["../../../../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":["../../../../applications/deploy-app-code.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,iDAAyC;AACzC,2BAA+C;AAC/C,8CAAqI;AACrI,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;IAC1F,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC;IACjC,MAAM,CAAC,IAAI,CAAC,8CAA8C,OAAO,EAAE,CAAC,CAAA;IAEpE,IAAA,4BAAe,EAAC,mBAAmB,CAAC,CAAC;IAErC,uCAAuC;IACvC,IAAI,CAAC,IAAA,eAAU,EAAC,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC;QAC/D,MAAM,CAAC,KAAK,CAAC,yEAAyE,CAAC,CA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ACrB,MAAM,iBAAiB,GAAG;;;;;;;;;cASd,OAAO,gBAAgB,OAAO,aAAa,mBAAmB;CAC3E,CAAC;IACA,MAAM,mBAAmB,GAAG;;EAE5B,mBAAmB;;CAEpB,CAAC;IACA,IAAI,CAAC;QACH,yCAAyC;QACzC,IAAA,kBAAa,EAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;QACjD,IAAA,kBAAa,EAAC,GAAG,mBAAmB,+BAA+B,EAAE,mBAAmB,CAAC,CAAC;QAC1F,sGAAsG;QACtG,MAAM,IAAA,uBAAU,EAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,IAAI,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,2 +1,2 @@
|
|
1
|
-
export declare function listApps(host: string): Promise<number>;
|
1
|
+
export declare function listApps(host: string, json: boolean): Promise<number>;
|
2
2
|
//# sourceMappingURL=list-apps.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list-apps.d.ts","sourceRoot":"","sources":["../../../../applications/list-apps.ts"],"names":[],"mappings":"AAIA,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,
|
1
|
+
{"version":3,"file":"list-apps.d.ts","sourceRoot":"","sources":["../../../../applications/list-apps.ts"],"names":[],"mappings":"AAIA,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CA0C3E"}
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.listApps = void 0;
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
8
|
const cloudutils_1 = require("../cloudutils");
|
9
|
-
async function listApps(host) {
|
9
|
+
async function listApps(host, json) {
|
10
10
|
const logger = (0, cloudutils_1.getLogger)();
|
11
11
|
const userCredentials = (0, cloudutils_1.getCloudCredentials)();
|
12
12
|
const bearerToken = "Bearer " + userCredentials.token;
|
@@ -16,17 +16,25 @@ async function listApps(host) {
|
|
16
16
|
Authorization: bearerToken,
|
17
17
|
},
|
18
18
|
});
|
19
|
-
const
|
20
|
-
if (
|
19
|
+
const applications = list.data;
|
20
|
+
if (applications.length === 0) {
|
21
21
|
logger.info("No applications found");
|
22
22
|
return 1;
|
23
23
|
}
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
if (json) {
|
25
|
+
console.log(JSON.stringify(applications));
|
26
|
+
}
|
27
|
+
else {
|
28
|
+
logger.info(`Listing applications for ${userCredentials.userName}`);
|
29
|
+
applications.forEach(app => {
|
30
|
+
console.log(`Application Name: ${app.Name}`);
|
31
|
+
console.log(`ID: ${app.ID}`);
|
32
|
+
console.log(`Database Name: ${app.DatabaseName}`);
|
33
|
+
console.log(`Status: ${app.Status}`);
|
34
|
+
console.log(`Version: ${app.Version}`);
|
35
|
+
console.log('-------------------------');
|
36
|
+
});
|
27
37
|
}
|
28
|
-
logger.info(`Listing applications for ${userCredentials.userName}`);
|
29
|
-
console.log(JSON.stringify(formattedData));
|
30
38
|
return 0;
|
31
39
|
}
|
32
40
|
catch (e) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list-apps.js","sourceRoot":"","sources":["../../../../applications/list-apps.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8CAA+D;AAGxD,KAAK,UAAU,QAAQ,CAAC,IAAY;
|
1
|
+
{"version":3,"file":"list-apps.js","sourceRoot":"","sources":["../../../../applications/list-apps.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8CAA+D;AAGxD,KAAK,UAAU,QAAQ,CAAC,IAAY,EAAE,IAAa;IACxD,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,IAAI,GAAG,MAAM,eAAK,CAAC,GAAG,CAC1B,WAAW,IAAI,IAAI,eAAe,CAAC,QAAQ,cAAc,EACzD;YACE,OAAO,EAAE;gBACP,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,YAAY,GAAkB,IAAI,CAAC,IAAqB,CAAC;QAC/D,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;YACrC,OAAO,CAAC,CAAC;QACX,CAAC;QACD,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;QAC5C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,4BAA4B,eAAe,CAAC,QAAQ,EAAE,CAAC,CAAA;YACnE,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,GAAG,CAAC,qBAAqB,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC7C,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC7B,OAAO,CAAC,GAAG,CAAC,kBAAkB,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;gBAClD,OAAO,CAAC,GAAG,CAAC,WAAW,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;gBACrC,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;gBACvC,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAC;QACL,CAAC;QACD,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;AA1CD,4BA0CC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function registerApp(dbname: string, host: string
|
1
|
+
export declare function registerApp(dbname: string, host: string): Promise<number>;
|
2
2
|
//# sourceMappingURL=register-app.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../../../applications/register-app.ts"],"names":[],"mappings":"AAIA,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../../../applications/register-app.ts"],"names":[],"mappings":"AAIA,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsC/E"}
|
@@ -7,7 +7,7 @@ exports.registerApp = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
8
|
const cloudutils_1 = require("../cloudutils");
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
10
|
-
async function registerApp(dbname, host
|
10
|
+
async function registerApp(dbname, host) {
|
11
11
|
const logger = (0, cloudutils_1.getLogger)();
|
12
12
|
const userCredentials = (0, cloudutils_1.getCloudCredentials)();
|
13
13
|
const bearerToken = "Bearer " + userCredentials.token;
|
@@ -20,7 +20,6 @@ async function registerApp(dbname, host, machines) {
|
|
20
20
|
const register = await axios_1.default.put(`https://${host}/${userCredentials.userName}/application`, {
|
21
21
|
name: appName,
|
22
22
|
database: dbname,
|
23
|
-
max_vms: machines,
|
24
23
|
}, {
|
25
24
|
headers: {
|
26
25
|
"Content-Type": "application/json",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register-app.js","sourceRoot":"","sources":["../../../../applications/register-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8CAA+D;AAC/D,0DAA6B;AAEtB,KAAK,UAAU,WAAW,CAAC,MAAc,EAAE,IAAY
|
1
|
+
{"version":3,"file":"register-app.js","sourceRoot":"","sources":["../../../../applications/register-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8CAA+D;AAC/D,0DAA6B;AAEtB,KAAK,UAAU,WAAW,CAAC,MAAc,EAAE,IAAY;IAC5D,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,CAA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,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../applications/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function updateApp(host: string
|
1
|
+
export declare function updateApp(host: string): Promise<number>;
|
2
2
|
//# sourceMappingURL=update-app.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"update-app.d.ts","sourceRoot":"","sources":["../../../../applications/update-app.ts"],"names":[],"mappings":"AAKA,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"update-app.d.ts","sourceRoot":"","sources":["../../../../applications/update-app.ts"],"names":[],"mappings":"AAKA,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsC7D"}
|
@@ -7,7 +7,7 @@ exports.updateApp = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
8
|
const cloudutils_1 = require("../cloudutils");
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
10
|
-
async function updateApp(host
|
10
|
+
async function updateApp(host) {
|
11
11
|
const logger = (0, cloudutils_1.getLogger)();
|
12
12
|
const userCredentials = (0, cloudutils_1.getCloudCredentials)();
|
13
13
|
const bearerToken = "Bearer " + userCredentials.token;
|
@@ -17,10 +17,9 @@ async function updateApp(host, machines) {
|
|
17
17
|
logger.info(`Loaded application name from package.json: ${appName}`);
|
18
18
|
logger.info(`Updating application: ${appName}`);
|
19
19
|
try {
|
20
|
-
logger.info(`Updating application ${appName}
|
20
|
+
logger.info(`Updating application ${appName}`);
|
21
21
|
const update = await axios_1.default.patch(`https://${host}/${userCredentials.userName}/application/${appName}`, {
|
22
22
|
name: appName,
|
23
|
-
max_vms: machines
|
24
23
|
}, {
|
25
24
|
headers: {
|
26
25
|
"Content-Type": "application/json",
|
@@ -29,7 +28,6 @@ async function updateApp(host, machines) {
|
|
29
28
|
});
|
30
29
|
const application = update.data;
|
31
30
|
logger.info(`Successfully updated: ${application.Name}`);
|
32
|
-
console.log(JSON.stringify({ "Name": application.Name, "ID": application.ID, "Version": application.Version, "MaxVMs": application.MaxVMs }));
|
33
31
|
return 0;
|
34
32
|
}
|
35
33
|
catch (e) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"update-app.js","sourceRoot":"","sources":["../../../../applications/update-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8CAA+D;AAE/D,0DAA6B;AAEtB,KAAK,UAAU,SAAS,CAAC,IAAY
|
1
|
+
{"version":3,"file":"update-app.js","sourceRoot":"","sources":["../../../../applications/update-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8CAA+D;AAE/D,0DAA6B;AAEtB,KAAK,UAAU,SAAS,CAAC,IAAY;IAC1C,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,EAAE,CAAC,CAAC;QAC/C,MAAM,MAAM,GAAG,MAAM,eAAK,CAAC,KAAK,CAC9B,WAAW,IAAI,IAAI,eAAe,CAAC,QAAQ,gBAAgB,OAAO,EAAE,EACpE;YACE,IAAI,EAAE,OAAO;SACd,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,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;AAtCD,8BAsCC"}
|
@@ -50,19 +50,17 @@ applicationCommands
|
|
50
50
|
.command('register')
|
51
51
|
.description('Register a new application')
|
52
52
|
.requiredOption('-d, --database <string>', 'Specify the app database name')
|
53
|
-
.option('-m, --machines <string>', 'Number of VMs to deploy', '1')
|
54
53
|
.action(async (options) => {
|
55
54
|
const { host } = applicationCommands.opts();
|
56
|
-
const exitCode = await (0, applications_1.registerApp)(options.database, host
|
55
|
+
const exitCode = await (0, applications_1.registerApp)(options.database, host);
|
57
56
|
process.exit(exitCode);
|
58
57
|
});
|
59
58
|
applicationCommands
|
60
59
|
.command('update')
|
61
60
|
.description('Update an application')
|
62
|
-
.
|
63
|
-
.action(async (options) => {
|
61
|
+
.action(async () => {
|
64
62
|
const { host } = applicationCommands.opts();
|
65
|
-
const exitCode = await (0, applications_1.updateApp)(host
|
63
|
+
const exitCode = await (0, applications_1.updateApp)(host);
|
66
64
|
process.exit(exitCode);
|
67
65
|
});
|
68
66
|
applicationCommands
|
@@ -85,9 +83,10 @@ applicationCommands
|
|
85
83
|
applicationCommands
|
86
84
|
.command('list')
|
87
85
|
.description('List all deployed applications')
|
88
|
-
.
|
86
|
+
.option('--json', 'Emit JSON output')
|
87
|
+
.action(async (options) => {
|
89
88
|
const { host } = applicationCommands.opts();
|
90
|
-
const exitCode = await (0, applications_1.listApps)(host);
|
89
|
+
const exitCode = await (0, applications_1.listApps)(host, options.json);
|
91
90
|
process.exit(exitCode);
|
92
91
|
});
|
93
92
|
applicationCommands
|
@@ -118,9 +117,10 @@ userdbCommands
|
|
118
117
|
userdbCommands
|
119
118
|
.command('status')
|
120
119
|
.argument('<string>', 'database name')
|
121
|
-
.
|
120
|
+
.option('--json', 'Emit JSON output')
|
121
|
+
.action((async (dbname, options) => {
|
122
122
|
const { host } = userdbCommands.opts();
|
123
|
-
await (0, userdb_1.getUserDb)(host, dbname);
|
123
|
+
await (0, userdb_1.getUserDb)(host, dbname, options.json);
|
124
124
|
}));
|
125
125
|
userdbCommands
|
126
126
|
.command('delete')
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../cli.ts"],"names":[],"mappings":";;;AAEA,iDAOwB;AACxB,yCAAoC;AACpC,mCAAgC;AAChC,yCAA0C;AAC1C,qCAAiE;AACjE,6CAAg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AAK,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;AACjF,CAAC,CAAC,CAAC,CAAA;AAEL,cAAc;KACX,OAAO,CAAC,QAAQ,CAAC;KACjB,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;KACrC,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC;KACpC,MAAM,CAAC,CAAC,KAAK,EAAE,MAAc,EAAE,OAAyB,EAAE,EAAE;IAC3D,MAAM,EAAE,IAAI,EAAE,GAAqB,cAAc,CAAC,IAAI,EAAE,CAAA;IACxD,MAAM,IAAA,kBAAS,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;AAC7C,CAAC,CAAC,CAAC,CAAA;AAEL,cAAc;KACX,OAAO,CAAC,QAAQ,CAAC;KACjB,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;KACrC,MAAM,CAAC,CAAC,KAAK,EAAE,MAAc,EAAE,EAAE;IAChC,MAAM,EAAE,IAAI,EAAE,GAAqB,cAAc,CAAC,IAAI,EAAE,CAAA;IACxD,MAAM,IAAA,qBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AAClC,CAAC,CAAC,CAAC,CAAA;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,oDAAoD;AACpD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { DBOSCloudCredentials } from "./login";
|
3
3
|
import { Logger } from "winston";
|
4
|
+
export declare const dbosConfigFilePath = "dbos-config.yaml";
|
4
5
|
export declare function getLogger(): Logger;
|
5
6
|
export declare function getCloudCredentials(): DBOSCloudCredentials;
|
6
7
|
export declare function credentialsExist(): boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cloudutils.d.ts","sourceRoot":"","sources":["../../../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"}
|
1
|
+
{"version":3,"file":"cloudutils.d.ts","sourceRoot":"","sources":["../../../cloudutils.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAe,MAAM,SAAS,CAAC;AAI5D,OAAO,EAAoC,MAAM,EAAE,MAAM,SAAS,CAAC;AAEnE,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AAErD,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,11 +3,12 @@ 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.createDirectory = exports.sleep = exports.readFileSync = exports.runCommand = exports.credentialsExist = exports.getCloudCredentials = exports.getLogger = void 0;
|
6
|
+
exports.createDirectory = exports.sleep = exports.readFileSync = exports.runCommand = exports.credentialsExist = exports.getCloudCredentials = exports.getLogger = exports.dbosConfigFilePath = 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
10
|
const winston_1 = require("winston");
|
11
|
+
exports.dbosConfigFilePath = "dbos-config.yaml";
|
11
12
|
function getLogger() {
|
12
13
|
const winstonTransports = [];
|
13
14
|
winstonTransports.push(new winston_1.transports.Console({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cloudutils.js","sourceRoot":"","sources":["../../../cloudutils.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA4D;AAE5D,4CAAoB;AACpB,iDAAoD;AACpD,qCAAmE;
|
1
|
+
{"version":3,"file":"cloudutils.js","sourceRoot":"","sources":["../../../cloudutils.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA4D;AAE5D,4CAAoB;AACpB,iDAAoD;AACpD,qCAAmE;AAEtD,QAAA,kBAAkB,GAAG,kBAAkB,CAAC;AAErD,SAAg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,KAAK,EAAE,EAAE;YAC1B,MAAM,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC;AAlBD,gCAkBC;AAED,SAAgB,YAAY,CAAC,IAAY,EAAE,WAA2B,MAAM;IAC1E,wBAAwB;IACxB,YAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAmC,EAAE,KAAe,EAAE,EAAE;QACrE,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,eAAe,IAAI,KAAK,KAAK,CAAC,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"}
|
@@ -6,6 +6,6 @@ export interface UserDBInstance {
|
|
6
6
|
}
|
7
7
|
export declare function createUserDb(host: string, dbName: string, adminName: string, adminPassword: string, sync: boolean): Promise<void>;
|
8
8
|
export declare function deleteUserDb(host: string, dbName: string): Promise<void>;
|
9
|
-
export declare function getUserDb(host: string, dbName: string): Promise<void>;
|
9
|
+
export declare function getUserDb(host: string, dbName: string, json: boolean): Promise<void>;
|
10
10
|
export declare function getUserDBInfo(host: string, dbName: string): Promise<UserDBInstance>;
|
11
11
|
//# sourceMappingURL=userdb.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"userdb.d.ts","sourceRoot":"","sources":["../../../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,
|
1
|
+
{"version":3,"file":"userdb.d.ts","sourceRoot":"","sources":["../../../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,EAAE,IAAI,EAAE,OAAO,iBAqB1E;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAYzF"}
|
@@ -21,7 +21,7 @@ async function createUserDb(host, dbName, adminName, adminPassword, sync) {
|
|
21
21
|
logger.info(`Successfully started creating database: ${dbName}`);
|
22
22
|
if (sync) {
|
23
23
|
let status = "";
|
24
|
-
while (status != "available") {
|
24
|
+
while (status != "available" && status != "backing-up") {
|
25
25
|
await (0, utils_1.sleep)(30000);
|
26
26
|
const userDBInfo = await getUserDBInfo(host, dbName);
|
27
27
|
logger.info(userDBInfo);
|
@@ -62,11 +62,20 @@ async function deleteUserDb(host, dbName) {
|
|
62
62
|
}
|
63
63
|
}
|
64
64
|
exports.deleteUserDb = deleteUserDb;
|
65
|
-
async function getUserDb(host, dbName) {
|
65
|
+
async function getUserDb(host, dbName, json) {
|
66
66
|
const logger = (0, cloudutils_1.getLogger)();
|
67
67
|
try {
|
68
68
|
const userDBInfo = await getUserDBInfo(host, dbName);
|
69
|
-
|
69
|
+
if (json) {
|
70
|
+
console.log(JSON.stringify(userDBInfo));
|
71
|
+
}
|
72
|
+
else {
|
73
|
+
logger.info(`Retrieving status of: ${dbName}`);
|
74
|
+
console.log(`DB Name: ${userDBInfo.DBName}`);
|
75
|
+
console.log(`Status: ${userDBInfo.Status}`);
|
76
|
+
console.log(`Host Name: ${userDBInfo.HostName}`);
|
77
|
+
console.log(`Port: ${userDBInfo.Port}`);
|
78
|
+
}
|
70
79
|
}
|
71
80
|
catch (e) {
|
72
81
|
if (axios_1.default.isAxiosError(e) && e.response) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"userdb.js","sourceRoot":"","sources":["../../../userdb.ts"],"names":[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