@celljs/cloud 4.5.1 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/common/cloud-protocol.d.ts +2 -0
- package/esm/common/cloud-protocol.js +9 -5
- package/esm/common/cloud-protocol.js.map +1 -1
- package/lib/common/cloud-protocol.d.ts +2 -0
- package/lib/common/cloud-protocol.d.ts.map +1 -1
- package/lib/common/cloud-protocol.js +8 -4
- package/lib/common/cloud-protocol.js.map +1 -1
- package/lib/package.spec.js +15 -2
- package/lib/package.spec.js.map +1 -1
- package/package.json +2 -2
- package/src/common/cloud-protocol.ts +8 -5
- package/src/package.spec.ts +14 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConfigProvider } from '@celljs/core';
|
|
1
2
|
import { Account, AccountProvider } from './account-protocol.js';
|
|
2
3
|
import { ClientOptions, ClientOptionsProvider } from './client-protocol.js';
|
|
3
4
|
import { Credentials, CredentialsProvider } from './credentials-protocol.js';
|
|
@@ -15,6 +16,7 @@ export declare abstract class AbstractCloudService<T extends RawCloudService> im
|
|
|
15
16
|
protected readonly credentialsProvider: CredentialsProvider;
|
|
16
17
|
protected readonly accountProvider: AccountProvider;
|
|
17
18
|
protected readonly clientOptionsProvider: ClientOptionsProvider;
|
|
19
|
+
protected readonly configProvider: ConfigProvider;
|
|
18
20
|
protected _rawCloudService: T;
|
|
19
21
|
getRawCloudService(): Promise<T>;
|
|
20
22
|
setRawCloudService(rawCloudService: T): void;
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import { Autowired,
|
|
10
|
+
import { Autowired, ConfigProvider } from '@celljs/core';
|
|
11
11
|
import { AccountProvider } from './account-protocol.js';
|
|
12
12
|
import { ClientOptionsProvider } from './client-protocol.js';
|
|
13
13
|
import { CredentialsProvider } from './credentials-protocol.js';
|
|
@@ -19,13 +19,13 @@ export class AbstractCloudService {
|
|
|
19
19
|
const clientProp = `cloud.${this.name}.client`;
|
|
20
20
|
const regionProp = `cloud.${this.name}.region`;
|
|
21
21
|
const credentialsProp = `cloud.${this.name}.credentials`;
|
|
22
|
-
const account =
|
|
23
|
-
const clientOptions =
|
|
24
|
-
const region =
|
|
22
|
+
const account = this.configProvider.get(accountProp) || await this.accountProvider.provide();
|
|
23
|
+
const clientOptions = this.configProvider.get(clientProp) || await this.clientOptionsProvider.provide() || { internal: true };
|
|
24
|
+
const region = this.configProvider.get(regionProp) || await this.regionProvider.provide();
|
|
25
25
|
if (!region) {
|
|
26
26
|
throw Error(`Please configure region through the properties "cloud.region" or "${regionProp}"`);
|
|
27
27
|
}
|
|
28
|
-
const credentials =
|
|
28
|
+
const credentials = this.configProvider.get(credentialsProp) || await this.credentialsProvider.provide();
|
|
29
29
|
if (!credentials) {
|
|
30
30
|
throw Error(`Please configure credentials through the properties "cloud.credentials" or "${credentialsProp}"`);
|
|
31
31
|
}
|
|
@@ -53,4 +53,8 @@ __decorate([
|
|
|
53
53
|
Autowired(ClientOptionsProvider),
|
|
54
54
|
__metadata("design:type", Object)
|
|
55
55
|
], AbstractCloudService.prototype, "clientOptionsProvider", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
Autowired(ConfigProvider),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], AbstractCloudService.prototype, "configProvider", void 0);
|
|
56
60
|
//# sourceMappingURL=cloud-protocol.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-protocol.js","sourceRoot":"","sources":["../../src/common/cloud-protocol.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"cloud-protocol.js","sourceRoot":"","sources":["../../src/common/cloud-protocol.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAW,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAiB,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAe,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAYnD,MAAM,OAAgB,oBAAoB;IAqBtC,KAAK,CAAC,kBAAkB;QACpB,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACzB,MAAM,WAAW,GAAG,SAAS,IAAI,CAAC,IAAI,UAAU,CAAC;YACjD,MAAM,UAAU,GAAG,SAAS,IAAI,CAAC,IAAI,SAAS,CAAC;YAC/C,MAAM,UAAU,GAAG,SAAS,IAAI,CAAC,IAAI,SAAS,CAAC;YAC/C,MAAM,eAAe,GAAG,SAAS,IAAI,CAAC,IAAI,cAAc,CAAC;YAEzD,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAU,WAAW,CAAC,IAAI,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;YACtG,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAgB,UAAU,CAAC,IAAI,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC7I,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAS,UAAU,CAAC,IAAI,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;YAClG,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,MAAM,KAAK,CAAC,qEAAqE,UAAU,GAAG,CAAC,CAAC;YACpG,CAAC;YACD,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAc,eAAe,CAAC,IAAI,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC;YACtH,IAAI,CAAC,WAAW,EAAE,CAAC;gBACf,MAAM,KAAK,CAAC,+EAA+E,eAAe,GAAG,CAAC,CAAC;YACnH,CAAC;YAED,IAAI,CAAC,gBAAgB,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;QAC5G,CAAC;QACD,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,kBAAkB,CAAC,eAAkB;QACjC,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAC5C,CAAC;CAIJ;AA7CsB;IADlB,SAAS,CAAC,cAAc,CAAC;;4DACwB;AAG/B;IADlB,SAAS,CAAC,mBAAmB,CAAC;;iEAC6B;AAGzC;IADlB,SAAS,CAAC,eAAe,CAAC;;6DACyB;AAGjC;IADlB,SAAS,CAAC,qBAAqB,CAAC;;mEAC+B;AAG7C;IADlB,SAAS,CAAC,cAAc,CAAC;;4DACwB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConfigProvider } from '@celljs/core';
|
|
1
2
|
import { Account, AccountProvider } from './account-protocol';
|
|
2
3
|
import { ClientOptions, ClientOptionsProvider } from './client-protocol';
|
|
3
4
|
import { Credentials, CredentialsProvider } from './credentials-protocol';
|
|
@@ -15,6 +16,7 @@ export declare abstract class AbstractCloudService<T extends RawCloudService> im
|
|
|
15
16
|
protected readonly credentialsProvider: CredentialsProvider;
|
|
16
17
|
protected readonly accountProvider: AccountProvider;
|
|
17
18
|
protected readonly clientOptionsProvider: ClientOptionsProvider;
|
|
19
|
+
protected readonly configProvider: ConfigProvider;
|
|
18
20
|
protected _rawCloudService: T;
|
|
19
21
|
getRawCloudService(): Promise<T>;
|
|
20
22
|
setRawCloudService(rawCloudService: T): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-protocol.d.ts","sourceRoot":"","sources":["../../src/common/cloud-protocol.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloud-protocol.d.ts","sourceRoot":"","sources":["../../src/common/cloud-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,eAAe;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;IACjC,kBAAkB,CAAC,YAAY,EAAE,CAAC,GAAG,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,eAAe;CAE/B;AAED,8BAAsB,oBAAoB,CAAC,CAAC,SAAS,eAAe,CAAE,YAAW,YAAY,CAAC,CAAC,CAAC;IAE5F,IAAI,EAAE,MAAM,CAAC;IAGb,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAGlD,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAG5D,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAGpD,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IAGhE,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAElD,SAAS,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAExB,kBAAkB,IAAI,OAAO,CAAC,CAAC,CAAC,CAqBrC;IAED,kBAAkB,CAAC,eAAe,EAAE,CAAC,GAAG,IAAI,CAE3C;IAED,SAAS,CAAC,QAAQ,CAAC,uBAAuB,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAErJ"}
|
|
@@ -22,13 +22,13 @@ class AbstractCloudService {
|
|
|
22
22
|
const clientProp = `cloud.${this.name}.client`;
|
|
23
23
|
const regionProp = `cloud.${this.name}.region`;
|
|
24
24
|
const credentialsProp = `cloud.${this.name}.credentials`;
|
|
25
|
-
const account =
|
|
26
|
-
const clientOptions =
|
|
27
|
-
const region =
|
|
25
|
+
const account = this.configProvider.get(accountProp) || await this.accountProvider.provide();
|
|
26
|
+
const clientOptions = this.configProvider.get(clientProp) || await this.clientOptionsProvider.provide() || { internal: true };
|
|
27
|
+
const region = this.configProvider.get(regionProp) || await this.regionProvider.provide();
|
|
28
28
|
if (!region) {
|
|
29
29
|
throw Error(`Please configure region through the properties "cloud.region" or "${regionProp}"`);
|
|
30
30
|
}
|
|
31
|
-
const credentials =
|
|
31
|
+
const credentials = this.configProvider.get(credentialsProp) || await this.credentialsProvider.provide();
|
|
32
32
|
if (!credentials) {
|
|
33
33
|
throw Error(`Please configure credentials through the properties "cloud.credentials" or "${credentialsProp}"`);
|
|
34
34
|
}
|
|
@@ -57,4 +57,8 @@ __decorate([
|
|
|
57
57
|
(0, core_1.Autowired)(client_protocol_1.ClientOptionsProvider),
|
|
58
58
|
__metadata("design:type", Object)
|
|
59
59
|
], AbstractCloudService.prototype, "clientOptionsProvider", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, core_1.Autowired)(core_1.ConfigProvider),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], AbstractCloudService.prototype, "configProvider", void 0);
|
|
60
64
|
//# sourceMappingURL=cloud-protocol.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-protocol.js","sourceRoot":"","sources":["../../src/common/cloud-protocol.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"cloud-protocol.js","sourceRoot":"","sources":["../../src/common/cloud-protocol.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAyD;AACzD,yDAA8D;AAC9D,uDAAyE;AACzE,iEAA0E;AAC1E,uDAAmD;AAYnD;IAqBI,KAAK,CAAC,kBAAkB;QACpB,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACzB,MAAM,WAAW,GAAG,SAAS,IAAI,CAAC,IAAI,UAAU,CAAC;YACjD,MAAM,UAAU,GAAG,SAAS,IAAI,CAAC,IAAI,SAAS,CAAC;YAC/C,MAAM,UAAU,GAAG,SAAS,IAAI,CAAC,IAAI,SAAS,CAAC;YAC/C,MAAM,eAAe,GAAG,SAAS,IAAI,CAAC,IAAI,cAAc,CAAC;YAEzD,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAU,WAAW,CAAC,IAAI,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;YACtG,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAgB,UAAU,CAAC,IAAI,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC7I,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAS,UAAU,CAAC,IAAI,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;YAClG,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,MAAM,KAAK,CAAC,qEAAqE,UAAU,GAAG,CAAC,CAAC;YACpG,CAAC;YACD,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAc,eAAe,CAAC,IAAI,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC;YACtH,IAAI,CAAC,WAAW,EAAE,CAAC;gBACf,MAAM,KAAK,CAAC,+EAA+E,eAAe,GAAG,CAAC,CAAC;YACnH,CAAC;YAED,IAAI,CAAC,gBAAgB,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;QAC5G,CAAC;QACD,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,kBAAkB,CAAC,eAAkB;QACjC,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAC5C,CAAC;CAIJ;;AA7CsB;IADlB,IAAA,gBAAS,EAAC,gCAAc,CAAC;;4DACwB;AAG/B;IADlB,IAAA,gBAAS,EAAC,0CAAmB,CAAC;;iEAC6B;AAGzC;IADlB,IAAA,gBAAS,EAAC,kCAAe,CAAC;;6DACyB;AAGjC;IADlB,IAAA,gBAAS,EAAC,uCAAqB,CAAC;;mEAC+B;AAG7C;IADlB,IAAA,gBAAS,EAAC,qBAAc,CAAC;;4DACwB"}
|
package/lib/package.spec.js
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const bun_test_1 = require("bun:test");
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
const core_1 = require("@celljs/core");
|
|
8
|
+
const assembly_test_util_1 = require("@celljs/core/lib/common/test/assembly-test-util");
|
|
9
|
+
const static_module_1 = __importDefault(require("@celljs/core/lib/common/static-module"));
|
|
10
|
+
const static_module_2 = __importDefault(require("@celljs/core/lib/node/static-module"));
|
|
11
|
+
const module_1 = __importDefault(require("./node/module"));
|
|
12
|
+
core_1.currentThis.cellProps = {};
|
|
13
|
+
(0, bun_test_1.describe)('@celljs/cloud', () => {
|
|
14
|
+
(0, bun_test_1.it)('its DI module loads after those of its dependencies and every binding resolves', () => {
|
|
15
|
+
const { changed, errors } = assembly_test_util_1.AssemblyTestUtil.check([static_module_1.default, static_module_2.default], module_1.default);
|
|
16
|
+
(0, bun_test_1.expect)(errors).toEqual([]);
|
|
17
|
+
(0, bun_test_1.expect)(changed).toBeGreaterThan(0);
|
|
18
|
+
});
|
|
6
19
|
});
|
|
7
20
|
//# sourceMappingURL=package.spec.js.map
|
package/lib/package.spec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":";;;;;AAAA,uCAAgD;AAChD,uCAA2C;AAC3C,wFAAmF;AACnF,0FAAuD;AACvD,wFAAqD;AACrD,2DAAiC;AAEjC,kBAAW,CAAC,SAAS,GAAG,EAAE,CAAC;AAE3B,IAAA,mBAAQ,EAAC,eAAe,EAAE,GAAG,EAAE;IAC3B,IAAA,aAAE,EAAC,gFAAgF,EAAE,GAAG,EAAE;QACtF,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,qCAAgB,CAAC,KAAK,CAAC,CAAC,uBAAE,EAAE,uBAAE,CAAC,EAAE,gBAAI,CAAC,CAAC;QACnE,IAAA,iBAAM,EAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3B,IAAA,iBAAM,EAAC,OAAO,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/cloud",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cell-component"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@celljs/core": "4.
|
|
35
|
+
"@celljs/core": "4.6.0"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Autowired,
|
|
1
|
+
import { Autowired, ConfigProvider } from '@celljs/core';
|
|
2
2
|
import { Account, AccountProvider } from './account-protocol';
|
|
3
3
|
import { ClientOptions, ClientOptionsProvider } from './client-protocol';
|
|
4
4
|
import { Credentials, CredentialsProvider } from './credentials-protocol';
|
|
@@ -30,6 +30,9 @@ export abstract class AbstractCloudService<T extends RawCloudService> implements
|
|
|
30
30
|
@Autowired(ClientOptionsProvider)
|
|
31
31
|
protected readonly clientOptionsProvider: ClientOptionsProvider;
|
|
32
32
|
|
|
33
|
+
@Autowired(ConfigProvider)
|
|
34
|
+
protected readonly configProvider: ConfigProvider;
|
|
35
|
+
|
|
33
36
|
protected _rawCloudService: T;
|
|
34
37
|
|
|
35
38
|
async getRawCloudService(): Promise<T> {
|
|
@@ -39,13 +42,13 @@ export abstract class AbstractCloudService<T extends RawCloudService> implements
|
|
|
39
42
|
const regionProp = `cloud.${this.name}.region`;
|
|
40
43
|
const credentialsProp = `cloud.${this.name}.credentials`;
|
|
41
44
|
|
|
42
|
-
const account =
|
|
43
|
-
const clientOptions =
|
|
44
|
-
const region =
|
|
45
|
+
const account = this.configProvider.get<Account>(accountProp) || await this.accountProvider.provide();
|
|
46
|
+
const clientOptions = this.configProvider.get<ClientOptions>(clientProp) || await this.clientOptionsProvider.provide() || { internal: true };
|
|
47
|
+
const region = this.configProvider.get<string>(regionProp) || await this.regionProvider.provide();
|
|
45
48
|
if (!region) {
|
|
46
49
|
throw Error(`Please configure region through the properties "cloud.region" or "${regionProp}"`);
|
|
47
50
|
}
|
|
48
|
-
const credentials =
|
|
51
|
+
const credentials = this.configProvider.get<Credentials>(credentialsProp) || await this.credentialsProvider.provide();
|
|
49
52
|
if (!credentials) {
|
|
50
53
|
throw Error(`Please configure credentials through the properties "cloud.credentials" or "${credentialsProp}"`);
|
|
51
54
|
}
|
package/src/package.spec.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import { describe, it } from 'bun:test';
|
|
2
|
-
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import { currentThis } from '@celljs/core';
|
|
3
|
+
import { AssemblyTestUtil } from '@celljs/core/lib/common/test/assembly-test-util';
|
|
4
|
+
import m0 from '@celljs/core/lib/common/static-module';
|
|
5
|
+
import m1 from '@celljs/core/lib/node/static-module';
|
|
6
|
+
import own0 from './node/module';
|
|
3
7
|
|
|
4
|
-
|
|
8
|
+
currentThis.cellProps = {};
|
|
9
|
+
|
|
10
|
+
describe('@celljs/cloud', () => {
|
|
11
|
+
it('its DI module loads after those of its dependencies and every binding resolves', () => {
|
|
12
|
+
const { changed, errors } = AssemblyTestUtil.check([m0, m1], own0);
|
|
13
|
+
expect(errors).toEqual([]);
|
|
14
|
+
expect(changed).toBeGreaterThan(0);
|
|
15
|
+
});
|
|
5
16
|
});
|