@dbos-inc/dbos-sdk 0.8.49-preview → 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-bcrypt/index.d.ts +8 -0
- package/dist/packages/communicator-bcrypt/index.d.ts.map +1 -0
- package/dist/packages/communicator-bcrypt/index.js +43 -0
- package/dist/packages/communicator-bcrypt/index.js.map +1 -0
- package/dist/packages/communicator-datetime/index.d.ts +7 -0
- package/dist/packages/communicator-datetime/index.d.ts.map +1 -0
- package/dist/packages/communicator-datetime/index.js +35 -0
- package/dist/packages/communicator-datetime/index.js.map +1 -0
- package/dist/packages/communicator-random/index.d.ts +6 -0
- package/dist/packages/communicator-random/index.d.ts.map +1 -0
- package/dist/packages/communicator-random/index.js +26 -0
- package/dist/packages/communicator-random/index.js.map +1 -0
- 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.js +4 -4
- 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.js +4 -4
- package/dist/packages/dbos-cloud/applications/list-apps.js.map +1 -1
- package/dist/packages/dbos-cloud/applications/register-app.js +4 -4
- package/dist/packages/dbos-cloud/applications/register-app.js.map +1 -1
- package/dist/packages/dbos-cloud/cloudutils.d.ts +2 -0
- package/dist/packages/dbos-cloud/cloudutils.d.ts.map +1 -1
- package/dist/packages/dbos-cloud/cloudutils.js +9 -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 +12 -6
- package/dist/packages/dbos-cloud/userdb.js.map +1 -1
- package/dist/src/context.d.ts +0 -1
- package/dist/src/context.d.ts.map +1 -1
- package/dist/src/httpServer/server.d.ts +1 -2
- package/dist/src/httpServer/server.d.ts.map +1 -1
- package/dist/src/testing/testing_runtime.d.ts +1 -2
- package/dist/src/testing/testing_runtime.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/packages/communicator-bcrypt/dist/index.d.ts +8 -0
- package/packages/communicator-bcrypt/dist/index.d.ts.map +1 -0
- package/packages/communicator-bcrypt/dist/index.js +43 -0
- package/packages/communicator-bcrypt/dist/index.js.map +1 -0
- package/packages/communicator-bcrypt/package.json +29 -0
- package/packages/communicator-datetime/dist/index.d.ts +7 -0
- package/packages/communicator-datetime/dist/index.d.ts.map +1 -0
- package/packages/communicator-datetime/dist/index.js +35 -0
- package/packages/communicator-datetime/dist/index.js.map +1 -0
- package/packages/communicator-datetime/package.json +27 -0
- package/packages/communicator-random/dist/index.d.ts +6 -0
- package/packages/communicator-random/dist/index.d.ts.map +1 -0
- package/packages/communicator-random/dist/index.js +26 -0
- package/packages/communicator-random/dist/index.js.map +1 -0
- package/packages/communicator-random/package.json +27 -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.js +4 -4
- 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.js +4 -4
- 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.js +4 -4
- package/packages/dbos-cloud/dist/packages/dbos-cloud/applications/register-app.js.map +1 -1
- package/packages/dbos-cloud/dist/packages/dbos-cloud/cloudutils.d.ts +2 -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 +9 -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 +12 -6
- package/packages/dbos-cloud/dist/packages/dbos-cloud/userdb.js.map +1 -1
- package/packages/dbos-cloud/package.json +3 -2
- package/packages/dbos-openapi/package.json +1 -1
package/package.json
CHANGED
@@ -0,0 +1,8 @@
|
|
1
|
+
import { CommunicatorContext } from '@dbos-inc/dbos-sdk';
|
2
|
+
declare class BcryptCommunicator {
|
3
|
+
static bcryptGenSalt(_ctx: CommunicatorContext, saltRounds?: number): Promise<string>;
|
4
|
+
static bcryptHash(_ctx: CommunicatorContext, txt: string, saltRounds?: number): Promise<string>;
|
5
|
+
static bcryptCompare(txt: string, hashedTxt: string): Promise<boolean>;
|
6
|
+
}
|
7
|
+
export { BcryptCommunicator };
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAKrE,cAAM,kBAAkB;WAGP,aAAa,CAAC,IAAI,EAAE,mBAAmB,EAAE,UAAU,GAAE,MAAW,GAAI,OAAO,CAAC,MAAM,CAAC;WAMnF,UAAU,CAAC,IAAI,EAAE,mBAAmB,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,GAAE,MAAW,GAAI,OAAO,CAAC,MAAM,CAAC;WAI7F,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAI/E;AAED,OACA,EACI,kBAAkB,EACrB,CAAA"}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
exports.BcryptCommunicator = void 0;
|
16
|
+
const dbos_sdk_1 = require("@dbos-inc/dbos-sdk");
|
17
|
+
const bcryptjs_1 = __importDefault(require("bcryptjs"));
|
18
|
+
class BcryptCommunicator {
|
19
|
+
static async bcryptGenSalt(_ctx, saltRounds = 10) {
|
20
|
+
return await bcryptjs_1.default.genSalt(saltRounds);
|
21
|
+
}
|
22
|
+
static async bcryptHash(_ctx, txt, saltRounds = 10) {
|
23
|
+
return await bcryptjs_1.default.hash(txt, saltRounds);
|
24
|
+
}
|
25
|
+
static async bcryptCompare(txt, hashedTxt) {
|
26
|
+
const isMatch = bcryptjs_1.default.compare(txt, hashedTxt);
|
27
|
+
return isMatch;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
exports.BcryptCommunicator = BcryptCommunicator;
|
31
|
+
__decorate([
|
32
|
+
(0, dbos_sdk_1.Communicator)(),
|
33
|
+
__metadata("design:type", Function),
|
34
|
+
__metadata("design:paramtypes", [Object, Number]),
|
35
|
+
__metadata("design:returntype", Promise)
|
36
|
+
], BcryptCommunicator, "bcryptGenSalt", null);
|
37
|
+
__decorate([
|
38
|
+
(0, dbos_sdk_1.Communicator)(),
|
39
|
+
__metadata("design:type", Function),
|
40
|
+
__metadata("design:paramtypes", [Object, String, Number]),
|
41
|
+
__metadata("design:returntype", Promise)
|
42
|
+
], BcryptCommunicator, "bcryptHash", null);
|
43
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iDAAqE;AAErE,wDAAgC;AAGhC,MAAM,kBAAkB;IAGP,AAAb,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,IAAyB,EAAE,aAAqB,EAAE;QAEzE,OAAO,MAAM,kBAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;IAGY,AAAb,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAyB,EAAE,GAAW,EAAE,aAAqB,EAAE;QACnF,OAAO,MAAM,kBAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,GAAW,EAAE,SAAiB;QACrD,MAAM,OAAO,GAAG,kBAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACjD,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAIG,gDAAkB;AAlBL;IADZ,IAAA,uBAAY,GAAE;;;;6CAId;AAGY;IADZ,IAAA,uBAAY,GAAE;;;;0CAGd"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"name": "@dbos-inc/communicator-bcrypt",
|
3
|
+
"version": "0.0.0-placeholder",
|
4
|
+
"description": "Communicator library",
|
5
|
+
"license": "MIT",
|
6
|
+
"repository": {
|
7
|
+
"type": "git",
|
8
|
+
"url": "https://github.com/dbos-inc/dbos-ts",
|
9
|
+
"directory": "packages/communicator-bcrypt"
|
10
|
+
},
|
11
|
+
"homepage": "https://docs.dbos.dev/",
|
12
|
+
"main": "dist/index.js",
|
13
|
+
"types": "dist/index.d.ts",
|
14
|
+
"scripts": {
|
15
|
+
"build": "tsc --project tsconfig.json",
|
16
|
+
"test": "echo 'No tests'",
|
17
|
+
"setversion": "grunt setversion"
|
18
|
+
},
|
19
|
+
"devDependencies": {
|
20
|
+
"@types/bcryptjs": "^2.4.6",
|
21
|
+
"grunt": "^1.6.1",
|
22
|
+
"nerdbank-gitversioning": "^3.6.133",
|
23
|
+
"typescript": "^5.3.3"
|
24
|
+
},
|
25
|
+
"dependencies": {
|
26
|
+
"@dbos-inc/dbos-sdk": "^0.8.41-preview",
|
27
|
+
"bcryptjs": "^2.4.3"
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { CommunicatorContext } from '@dbos-inc/dbos-sdk';
|
2
|
+
declare class CurrentTimeCommunicator {
|
3
|
+
static getCurrentDate(_ctx: CommunicatorContext): Promise<Date>;
|
4
|
+
static getCurrentTime(_ctx: CommunicatorContext): Promise<number>;
|
5
|
+
}
|
6
|
+
export { CurrentTimeCommunicator };
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAErE,cAAM,uBAAuB;IAGzB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,GAAI,OAAO,CAAC,IAAI,CAAC;IAKhE,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,GAAI,OAAO,CAAC,MAAM,CAAC;CAGrE;AAED,OACA,EACI,uBAAuB,EAC1B,CAAA"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.CurrentTimeCommunicator = void 0;
|
13
|
+
const dbos_sdk_1 = require("@dbos-inc/dbos-sdk");
|
14
|
+
class CurrentTimeCommunicator {
|
15
|
+
static getCurrentDate(_ctx) {
|
16
|
+
return Promise.resolve(new Date());
|
17
|
+
}
|
18
|
+
static getCurrentTime(_ctx) {
|
19
|
+
return Promise.resolve(new Date().getTime());
|
20
|
+
}
|
21
|
+
}
|
22
|
+
exports.CurrentTimeCommunicator = CurrentTimeCommunicator;
|
23
|
+
__decorate([
|
24
|
+
(0, dbos_sdk_1.Communicator)(),
|
25
|
+
__metadata("design:type", Function),
|
26
|
+
__metadata("design:paramtypes", [Object]),
|
27
|
+
__metadata("design:returntype", Promise)
|
28
|
+
], CurrentTimeCommunicator, "getCurrentDate", null);
|
29
|
+
__decorate([
|
30
|
+
(0, dbos_sdk_1.Communicator)(),
|
31
|
+
__metadata("design:type", Function),
|
32
|
+
__metadata("design:paramtypes", [Object]),
|
33
|
+
__metadata("design:returntype", Promise)
|
34
|
+
], CurrentTimeCommunicator, "getCurrentTime", null);
|
35
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iDAAqE;AAErE,MAAM,uBAAuB;IAGlB,AAAP,MAAM,CAAC,cAAc,CAAC,IAAyB;QAC3C,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IACvC,CAAC;IAGM,AAAP,MAAM,CAAC,cAAc,CAAC,IAAyB;QAC3C,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IACjD,CAAC;CACJ;AAIG,0DAAuB;AAZhB;IADN,IAAA,uBAAY,GAAE;;;;mDAGd;AAGM;IADN,IAAA,uBAAY,GAAE;;;;mDAGd"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
{
|
2
|
+
"name": "@dbos-inc/communicator-datetime",
|
3
|
+
"version": "0.0.0-placeholder",
|
4
|
+
"description": "Communicator library",
|
5
|
+
"license": "MIT",
|
6
|
+
"repository": {
|
7
|
+
"type": "git",
|
8
|
+
"url": "https://github.com/dbos-inc/dbos-ts",
|
9
|
+
"directory": "packages/communicator-datetime"
|
10
|
+
},
|
11
|
+
"homepage": "https://docs.dbos.dev/",
|
12
|
+
"main": "dist/index.js",
|
13
|
+
"types": "dist/index.d.ts",
|
14
|
+
"scripts": {
|
15
|
+
"build": "tsc --project tsconfig.json",
|
16
|
+
"test": "echo 'No tests'",
|
17
|
+
"setversion": "grunt setversion"
|
18
|
+
},
|
19
|
+
"devDependencies": {
|
20
|
+
"grunt": "^1.6.1",
|
21
|
+
"nerdbank-gitversioning": "^3.6.133",
|
22
|
+
"typescript": "^5.3.3"
|
23
|
+
},
|
24
|
+
"dependencies": {
|
25
|
+
"@dbos-inc/dbos-sdk": "^0.8.41-preview"
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAErE,cAAM,kBAAkB;IAGpB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,mBAAmB,GAAI,OAAO,CAAC,MAAM,CAAC;CAG7D;AAED,OACA,EACI,kBAAkB,EACrB,CAAA"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.RandomCommunicator = void 0;
|
13
|
+
const dbos_sdk_1 = require("@dbos-inc/dbos-sdk");
|
14
|
+
class RandomCommunicator {
|
15
|
+
static random(_ctx) {
|
16
|
+
return Promise.resolve(Math.random());
|
17
|
+
}
|
18
|
+
}
|
19
|
+
exports.RandomCommunicator = RandomCommunicator;
|
20
|
+
__decorate([
|
21
|
+
(0, dbos_sdk_1.Communicator)(),
|
22
|
+
__metadata("design:type", Function),
|
23
|
+
__metadata("design:paramtypes", [Object]),
|
24
|
+
__metadata("design:returntype", Promise)
|
25
|
+
], RandomCommunicator, "random", null);
|
26
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iDAAqE;AAErE,MAAM,kBAAkB;IAGb,AAAP,MAAM,CAAC,MAAM,CAAC,IAAyB;QACnC,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1C,CAAC;CACJ;AAIG,gDAAkB;AAPX;IADN,IAAA,uBAAY,GAAE;;;;sCAGd"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
{
|
2
|
+
"name": "@dbos-inc/communicator-random",
|
3
|
+
"version": "0.0.0-placeholder",
|
4
|
+
"description": "Communicator library",
|
5
|
+
"license": "MIT",
|
6
|
+
"repository": {
|
7
|
+
"type": "git",
|
8
|
+
"url": "https://github.com/dbos-inc/dbos-ts",
|
9
|
+
"directory": "packages/communicator-random"
|
10
|
+
},
|
11
|
+
"homepage": "https://docs.dbos.dev/",
|
12
|
+
"main": "dist/index.js",
|
13
|
+
"types": "dist/index.d.ts",
|
14
|
+
"scripts": {
|
15
|
+
"build": "tsc --project tsconfig.json",
|
16
|
+
"test": "echo 'No tests'",
|
17
|
+
"setversion": "grunt setversion"
|
18
|
+
},
|
19
|
+
"devDependencies": {
|
20
|
+
"grunt": "^1.6.1",
|
21
|
+
"nerdbank-gitversioning": "^3.6.133",
|
22
|
+
"typescript": "^5.3.3"
|
23
|
+
},
|
24
|
+
"dependencies": {
|
25
|
+
"@dbos-inc/dbos-sdk": "^0.8.41-preview"
|
26
|
+
}
|
27
|
+
}
|
@@ -27,14 +27,14 @@ async function deleteApp(host) {
|
|
27
27
|
return 0;
|
28
28
|
}
|
29
29
|
catch (e) {
|
30
|
+
const errorLabel = `Failed to delete application ${appName}`;
|
30
31
|
if (axios_1.default.isAxiosError(e) && e.response) {
|
31
|
-
|
32
|
-
return 1;
|
32
|
+
(0, cloudutils_1.handleAPIErrors)(errorLabel, e);
|
33
33
|
}
|
34
34
|
else {
|
35
|
-
logger.error(
|
36
|
-
return 1;
|
35
|
+
logger.error(`${errorLabel}: ${e.message}`);
|
37
36
|
}
|
37
|
+
return 1;
|
38
38
|
}
|
39
39
|
}
|
40
40
|
exports.deleteApp = deleteApp;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"delete-app.js","sourceRoot":"","sources":["../../../../applications/delete-app.ts"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"delete-app.js","sourceRoot":"","sources":["../../../../applications/delete-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,8CAAgF;AAChF,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,MAAM,UAAU,GAAG,gCAAgC,OAAO,EAAE,CAAC;QAC7D,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAK,CAAgB,CAAC,QAAQ,EAAE,CAAC;YACxD,IAAA,4BAAe,EAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,GAAG,UAAU,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QACzD,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC;AA9BD,8BA8BC"}
|
@@ -87,14 +87,14 @@ async function deployAppCode(host, docker) {
|
|
87
87
|
return 0;
|
88
88
|
}
|
89
89
|
catch (e) {
|
90
|
+
const errorLabel = `Failed to deploy application ${appName}`;
|
90
91
|
if (axios_1.default.isAxiosError(e) && e.response) {
|
91
|
-
|
92
|
-
return 1;
|
92
|
+
(0, cloudutils_1.handleAPIErrors)(errorLabel, e);
|
93
93
|
}
|
94
94
|
else {
|
95
|
-
logger.error(
|
96
|
-
return 1;
|
95
|
+
logger.error(`${errorLabel}: ${e.message}`);
|
97
96
|
}
|
97
|
+
return 1;
|
98
98
|
}
|
99
99
|
}
|
100
100
|
exports.deployAppCode = deployAppCode;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deploy-app-code.js","sourceRoot":"","sources":["../../../../applications/deploy-app-code.ts"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"deploy-app-code.js","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AAI,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"}
|
@@ -27,14 +27,14 @@ async function getAppLogs(host) {
|
|
27
27
|
return 0;
|
28
28
|
}
|
29
29
|
catch (e) {
|
30
|
+
const errorLabel = `Failed to retrieve logs of application ${appName}`;
|
30
31
|
if (axios_1.default.isAxiosError(e) && e.response) {
|
31
|
-
|
32
|
-
return 1;
|
32
|
+
(0, cloudutils_1.handleAPIErrors)(errorLabel, e);
|
33
33
|
}
|
34
34
|
else {
|
35
|
-
logger.error(
|
36
|
-
return 1;
|
35
|
+
logger.error(`${errorLabel}: ${e.message}`);
|
37
36
|
}
|
37
|
+
return 1;
|
38
38
|
}
|
39
39
|
}
|
40
40
|
exports.getAppLogs = getAppLogs;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-app-logs.js","sourceRoot":"","sources":["../../../../applications/get-app-logs.ts"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"get-app-logs.js","sourceRoot":"","sources":["../../../../applications/get-app-logs.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA2C;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CAAC;AACH,CAAC;AA9BD,gCA8BC"}
|
@@ -38,14 +38,14 @@ async function listApps(host, json) {
|
|
38
38
|
return 0;
|
39
39
|
}
|
40
40
|
catch (e) {
|
41
|
+
const errorLabel = 'Failed to list applications';
|
41
42
|
if (axios_1.default.isAxiosError(e) && e.response) {
|
42
|
-
|
43
|
-
return 1;
|
43
|
+
(0, cloudutils_1.handleAPIErrors)(errorLabel, e);
|
44
44
|
}
|
45
45
|
else {
|
46
|
-
logger.error(
|
47
|
-
return 1;
|
46
|
+
logger.error(`${errorLabel}: ${e.message}`);
|
48
47
|
}
|
48
|
+
return 1;
|
49
49
|
}
|
50
50
|
}
|
51
51
|
exports.listApps = listApps;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list-apps.js","sourceRoot":"","sources":["../../../../applications/list-apps.ts"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"list-apps.js","sourceRoot":"","sources":["../../../../applications/list-apps.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,8CAAgF;AAGzE,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,C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
|
catch (e) {
|
35
|
+
const errorLabel = `Failed to register application ${appName}`;
|
35
36
|
if (axios_1.default.isAxiosError(e) && e.response) {
|
36
|
-
|
37
|
-
return 1;
|
37
|
+
(0, cloudutils_1.handleAPIErrors)(errorLabel, e);
|
38
38
|
}
|
39
39
|
else {
|
40
|
-
logger.error(
|
41
|
-
return 1;
|
40
|
+
logger.error(`${errorLabel}: ${e.message}`);
|
42
41
|
}
|
42
|
+
return 1;
|
43
43
|
}
|
44
44
|
}
|
45
45
|
exports.registerApp = registerApp;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register-app.js","sourceRoot":"","sources":["../../../../applications/register-app.ts"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"register-app.js","sourceRoot":"","sources":["../../../../applications/register-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,8CAAgF;AAChF,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,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;SACjB,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,MAAM,UAAU,GAAG,kCAAkC,OAAO,EAAE,CAAC;QAC/D,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAK,CAAgB,CAAC,QAAQ,EAAE,CAAC;YACxD,IAAA,4BAAe,EAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,GAAG,UAAU,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QACzD,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC;AAtCD,kCAsCC"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { DBOSCloudCredentials } from "./login";
|
3
3
|
import { Logger } from "winston";
|
4
|
+
import { AxiosError } from "axios";
|
4
5
|
export declare const dbosConfigFilePath = "dbos-config.yaml";
|
5
6
|
export declare function getLogger(): Logger;
|
6
7
|
export declare function getCloudCredentials(): DBOSCloudCredentials;
|
@@ -10,4 +11,5 @@ export declare function readFileSync(path: string, encoding?: BufferEncoding): s
|
|
10
11
|
export declare const sleep: (ms: number) => Promise<unknown>;
|
11
12
|
export type ValuesOf<T> = T[keyof T];
|
12
13
|
export declare function createDirectory(path: string): string | undefined;
|
14
|
+
export declare function handleAPIErrors(label: string, e: AxiosError): void;
|
13
15
|
//# sourceMappingURL=cloudutils.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cloudutils.d.ts","sourceRoot":"","sources":["../../../cloudutils.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAe,MAAM,SAAS,CAAC;
|
1
|
+
{"version":3,"file":"cloudutils.d.ts","sourceRoot":"","sources":["../../../cloudutils.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAe,MAAM,SAAS,CAAC;AAG5D,OAAO,EAAoC,MAAM,EAAE,MAAM,SAAS,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AAGrD,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;AAQD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,QAI3D"}
|
@@ -3,12 +3,13 @@ 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 = exports.dbosConfigFilePath = void 0;
|
6
|
+
exports.handleAPIErrors = 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
|
-
const fs_1 = __importDefault(require("fs"));
|
9
8
|
const child_process_1 = require("child_process");
|
10
9
|
const winston_1 = require("winston");
|
10
|
+
const fs_1 = __importDefault(require("fs"));
|
11
11
|
exports.dbosConfigFilePath = "dbos-config.yaml";
|
12
|
+
// FIXME: we should have a global instance of the logger created in cli.ts
|
12
13
|
function getLogger() {
|
13
14
|
const winstonTransports = [];
|
14
15
|
winstonTransports.push(new winston_1.transports.Console({
|
@@ -86,4 +87,10 @@ function createDirectory(path) {
|
|
86
87
|
return fs_1.default.mkdirSync(path, { recursive: true });
|
87
88
|
}
|
88
89
|
exports.createDirectory = createDirectory;
|
90
|
+
function handleAPIErrors(label, e) {
|
91
|
+
const logger = getLogger();
|
92
|
+
const resp = e.response?.data;
|
93
|
+
logger.error(`[${resp.requestID}] ${label}: ${resp.message}.`);
|
94
|
+
}
|
95
|
+
exports.handleAPIErrors = handleAPIErrors;
|
89
96
|
//# sourceMappingURL=cloudutils.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cloudutils.js","sourceRoot":"","sources":["../../../cloudutils.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA4D;AAE5D,
|
1
|
+
{"version":3,"file":"cloudutils.js","sourceRoot":"","sources":["../../../cloudutils.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA4D;AAE5D,iDAAoD;AACpD,qCAAmE;AACnE,4CAAoB;AAGP,QAAA,kBAAkB,GAAG,kBAAkB,CAAC;AAErD,0EAA0E;AAC1E,SAAgB,SAAS;IACvB,MAAM,iBAAiB,GAAsB,EAAE,CAAC;IAChD,iBAAiB,CAAC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,GAAG,CAAC,CAAC;AACjE,CAAC;AAJD,0CAIC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../register.ts"],"names":[],"mappings":"AAGA,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../register.ts"],"names":[],"mappings":"AAGA,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA+BlF"}
|
@@ -25,11 +25,12 @@ async function registerUser(username, host) {
|
|
25
25
|
logger.info(`Registered user ${userName}, UUID: ${userUUID}`);
|
26
26
|
}
|
27
27
|
catch (e) {
|
28
|
+
const errorLabel = `Failed to register user ${username}`;
|
28
29
|
if (axios_1.default.isAxiosError(e) && e.response) {
|
29
|
-
|
30
|
+
(0, cloudutils_1.handleAPIErrors)(errorLabel, e);
|
30
31
|
}
|
31
32
|
else {
|
32
|
-
logger.error(
|
33
|
+
logger.error(`${errorLabel}: ${e.message}`);
|
33
34
|
}
|
34
35
|
return 1;
|
35
36
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../register.ts"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../register.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,6CAA+E;AAExE,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,MAAM,UAAU,GAAG,2BAA2B,QAAQ,EAAE,CAAC;QACzD,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAK,CAAgB,CAAC,QAAQ,EAAE,CAAC;YACxD,IAAA,4BAAe,EAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,CAAC,GAAG,UAAU,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QACzD,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AA/BD,oCA+BC"}
|
@@ -4,8 +4,8 @@ export interface UserDBInstance {
|
|
4
4
|
readonly HostName: string;
|
5
5
|
readonly Port: number;
|
6
6
|
}
|
7
|
-
export declare function createUserDb(host: string, dbName: string, adminName: string, adminPassword: string, sync: boolean): Promise<
|
8
|
-
export declare function deleteUserDb(host: string, dbName: string): Promise<
|
9
|
-
export declare function getUserDb(host: string, dbName: string, json: boolean): Promise<
|
7
|
+
export declare function createUserDb(host: string, dbName: string, adminName: string, adminPassword: string, sync: boolean): Promise<1 | undefined>;
|
8
|
+
export declare function deleteUserDb(host: string, dbName: string): Promise<1 | undefined>;
|
9
|
+
export declare function getUserDb(host: string, dbName: string, json: boolean): Promise<1 | undefined>;
|
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,
|
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"}
|
@@ -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,12 +55,14 @@ 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;
|
@@ -78,12 +82,14 @@ async function getUserDb(host, dbName, json) {
|
|
78
82
|
}
|
79
83
|
}
|
80
84
|
catch (e) {
|
85
|
+
const errorLabel = `Failed to retreive database record ${dbName}`;
|
81
86
|
if (axios_1.default.isAxiosError(e) && e.response) {
|
82
|
-
|
87
|
+
(0, cloudutils_1.handleAPIErrors)(errorLabel, e);
|
83
88
|
}
|
84
89
|
else {
|
85
|
-
logger.error(
|
90
|
+
logger.error(`${errorLabel}: ${e.message}`);
|
86
91
|
}
|
92
|
+
return 1;
|
87
93
|
}
|
88
94
|
}
|
89
95
|
exports.getUserDb = getUserDb;
|