@dbos-inc/dbos-sdk 0.8.50-preview.gb70145e277 → 0.8.51-preview
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/packages/communicator-datetime/index.js +1 -1
- package/dist/packages/communicator-datetime/index.js.map +1 -1
- package/dist/packages/dbos-cloud/applications/delete-app.js +4 -4
- 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 +19 -5
- package/dist/packages/dbos-cloud/applications/deploy-app-code.js.map +1 -1
- package/dist/packages/dbos-cloud/applications/get-app-logs.js +4 -4
- package/dist/packages/dbos-cloud/applications/get-app-logs.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 +20 -12
- 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 +5 -6
- 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 +3 -0
- package/dist/packages/dbos-cloud/cloudutils.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/cloudutils.js +10 -2
- package/dist/packages/dbos-cloud/cloudutils.js.map +1 -1
- package/dist/packages/dbos-cloud/register.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/register.js +3 -2
- package/dist/packages/dbos-cloud/register.js.map +1 -1
- package/dist/packages/dbos-cloud/userdb.d.ts +3 -3
- package/dist/packages/dbos-cloud/userdb.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/userdb.js +24 -9
- package/dist/packages/dbos-cloud/userdb.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/packages/communicator-bcrypt/package.json +3 -1
- package/packages/communicator-datetime/dist/index.js +1 -1
- package/packages/communicator-datetime/dist/index.js.map +1 -1
- package/packages/communicator-datetime/package.json +1 -0
- package/packages/communicator-random/package.json +1 -0
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/delete-app.js +4 -4
- 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 +19 -5
- 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.js +4 -4
- 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 +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 +20 -12
- 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 +5 -6
- 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 +3 -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 +10 -2
- package/packages/dbos-cloud/dist/packages/dbos-cloud/cloudutils.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 +3 -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 +3 -3
- package/packages/dbos-cloud/dist/packages/dbos-cloud/userdb.d.ts.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/userdb.js +24 -9
- package/packages/dbos-cloud/dist/packages/dbos-cloud/userdb.js.map +1 -1
@@ -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,
|
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,0BAqCvH;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,0BAsB9D;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,0BAuB1E;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);
|
@@ -30,12 +30,14 @@ async function createUserDb(host, dbName, adminName, adminPassword, sync) {
|
|
30
30
|
}
|
31
31
|
}
|
32
32
|
catch (e) {
|
33
|
+
const errorLabel = `Failed to create database ${dbName}`;
|
33
34
|
if (axios_1.default.isAxiosError(e) && e.response) {
|
34
|
-
|
35
|
+
(0, cloudutils_1.handleAPIErrors)(errorLabel, e);
|
35
36
|
}
|
36
37
|
else {
|
37
|
-
logger.error(
|
38
|
+
logger.error(`${errorLabel}: ${e.message}`);
|
38
39
|
}
|
40
|
+
return 1;
|
39
41
|
}
|
40
42
|
}
|
41
43
|
exports.createUserDb = createUserDb;
|
@@ -53,28 +55,41 @@ async function deleteUserDb(host, dbName) {
|
|
53
55
|
logger.info(`Database deleted: ${dbName}`);
|
54
56
|
}
|
55
57
|
catch (e) {
|
58
|
+
const errorLabel = `Failed to delete database ${dbName}`;
|
56
59
|
if (axios_1.default.isAxiosError(e) && e.response) {
|
57
|
-
|
60
|
+
(0, cloudutils_1.handleAPIErrors)(errorLabel, e);
|
58
61
|
}
|
59
62
|
else {
|
60
|
-
logger.error(
|
63
|
+
logger.error(`${errorLabel}: ${e.message}`);
|
61
64
|
}
|
65
|
+
return 1;
|
62
66
|
}
|
63
67
|
}
|
64
68
|
exports.deleteUserDb = deleteUserDb;
|
65
|
-
async function getUserDb(host, dbName) {
|
69
|
+
async function getUserDb(host, dbName, json) {
|
66
70
|
const logger = (0, cloudutils_1.getLogger)();
|
67
71
|
try {
|
68
72
|
const userDBInfo = await getUserDBInfo(host, dbName);
|
69
|
-
|
73
|
+
if (json) {
|
74
|
+
console.log(JSON.stringify(userDBInfo));
|
75
|
+
}
|
76
|
+
else {
|
77
|
+
logger.info(`Retrieving status of: ${dbName}`);
|
78
|
+
console.log(`DB Name: ${userDBInfo.DBName}`);
|
79
|
+
console.log(`Status: ${userDBInfo.Status}`);
|
80
|
+
console.log(`Host Name: ${userDBInfo.HostName}`);
|
81
|
+
console.log(`Port: ${userDBInfo.Port}`);
|
82
|
+
}
|
70
83
|
}
|
71
84
|
catch (e) {
|
85
|
+
const errorLabel = `Failed to retreive database record ${dbName}`;
|
72
86
|
if (axios_1.default.isAxiosError(e) && e.response) {
|
73
|
-
|
87
|
+
(0, cloudutils_1.handleAPIErrors)(errorLabel, e);
|
74
88
|
}
|
75
89
|
else {
|
76
|
-
logger.error(
|
90
|
+
logger.error(`${errorLabel}: ${e.message}`);
|
77
91
|
}
|
92
|
+
return 1;
|
78
93
|
}
|
79
94
|
}
|
80
95
|
exports.getUserDb = getUserDb;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"userdb.js","sourceRoot":"","sources":["../../../userdb.ts"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"userdb.js","sourceRoot":"","sources":["../../../userdb.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,6CAA+E;AAC/E,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,IAA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