@or-sdk/identifiers 0.26.3 → 0.26.4-beta.3870.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/package.json +5 -7
- package/tsconfig.build.json +9 -0
- package/tsconfig.dev.json +1 -2
- package/tsconfig.esm.json +1 -2
- package/tsconfig.json +2 -3
- package/tsconfig.types.json +1 -2
- package/{vitest.config.mts → vitest.config.mjs} +2 -1
- package/dist/cjs/__tests__/identifiers.spec.js +0 -53
- package/dist/cjs/__tests__/identifiers.spec.js.map +0 -1
- package/dist/esm/__tests__/identifiers.spec.js +0 -52
- package/dist/esm/__tests__/identifiers.spec.js.map +0 -1
- package/dist/types/__tests__/identifiers.spec.d.ts +0 -2
- package/dist/types/__tests__/identifiers.spec.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/identifiers",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.4-beta.3870.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -21,16 +21,14 @@
|
|
|
21
21
|
"test:watch": "vitest --watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@or-sdk/base": "^0.42.
|
|
25
|
-
"@or-sdk/sdk-api": "^0.26.
|
|
24
|
+
"@or-sdk/base": "^0.42.4-beta.3870.0",
|
|
25
|
+
"@or-sdk/sdk-api": "^0.26.28-beta.3870.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"concurrently": "9.0.1",
|
|
29
|
-
"typescript": "5.6.2"
|
|
30
|
-
"vitest": "^3.1.3"
|
|
29
|
+
"typescript": "5.6.2"
|
|
31
30
|
},
|
|
32
31
|
"publishConfig": {
|
|
33
32
|
"access": "public"
|
|
34
|
-
}
|
|
35
|
-
"gitHead": "cd895160bbbafda02a74c09a797cc4d51b0a5b62"
|
|
33
|
+
}
|
|
36
34
|
}
|
package/tsconfig.dev.json
CHANGED
package/tsconfig.esm.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "
|
|
2
|
+
"extends": "./tsconfig.build.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"outDir": "./dist/esm",
|
|
5
5
|
"declarationDir": "./dist/types",
|
|
6
6
|
"module": "ES6",
|
|
7
7
|
"target": "es6",
|
|
8
|
-
"rootDir": "./src",
|
|
9
8
|
"declaration": true,
|
|
10
9
|
"declarationMap": true
|
|
11
10
|
}
|
package/tsconfig.json
CHANGED
package/tsconfig.types.json
CHANGED
|
@@ -4,8 +4,9 @@ export default defineConfig({
|
|
|
4
4
|
test: {
|
|
5
5
|
reporters: ['junit', 'default'],
|
|
6
6
|
outputFile: 'test-results/junit.xml',
|
|
7
|
+
include: ['src/**/*.{test,spec}.ts'],
|
|
8
|
+
exclude: ['dist/**'],
|
|
7
9
|
coverage: {
|
|
8
|
-
all: true,
|
|
9
10
|
reporter: ['text', 'json', 'html', 'cobertura', 'text-summary'],
|
|
10
11
|
clean: true,
|
|
11
12
|
include: [
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var vitest_1 = require("vitest");
|
|
4
|
-
var identifiers_1 = require("../identifiers");
|
|
5
|
-
var identifiers_errors_1 = require("../identifiers.errors");
|
|
6
|
-
(0, vitest_1.describe)('identifiers.Identifiers', function () {
|
|
7
|
-
(0, vitest_1.describe)('Instantiation', function () {
|
|
8
|
-
(0, vitest_1.it)('successfully instantiated', function () {
|
|
9
|
-
var parameters = {
|
|
10
|
-
token: 'token',
|
|
11
|
-
sdkUrl: 'sdkUrl',
|
|
12
|
-
};
|
|
13
|
-
var identifiers = new identifiers_1.Identifiers(parameters);
|
|
14
|
-
vitest_1.assert.isNotNull(identifiers, 'identifiers is not null');
|
|
15
|
-
});
|
|
16
|
-
(0, vitest_1.it)("should throw ".concat(identifiers_errors_1.TokenIsMissedError.name, " if token is missed"), function () {
|
|
17
|
-
var parameters = {
|
|
18
|
-
sdkUrl: 'sdkUrl',
|
|
19
|
-
};
|
|
20
|
-
var identifiers;
|
|
21
|
-
try {
|
|
22
|
-
identifiers = new identifiers_1.Identifiers(parameters);
|
|
23
|
-
(0, vitest_1.expect)(identifiers).toBeNull();
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
var e = error;
|
|
27
|
-
(0, vitest_1.expect)(e.message).toBe(new identifiers_errors_1.TokenIsMissedError().message);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
(0, vitest_1.it)("should NOT throw ".concat(identifiers_errors_1.TokenIsMissedError.name, " if token is wrapped function"), function () {
|
|
31
|
-
var token = function () { return 'token'; };
|
|
32
|
-
var parameters = {
|
|
33
|
-
token: token,
|
|
34
|
-
sdkUrl: 'sdkUrl',
|
|
35
|
-
};
|
|
36
|
-
var identifiers = new identifiers_1.Identifiers(parameters);
|
|
37
|
-
vitest_1.assert.isNotNull(identifiers);
|
|
38
|
-
});
|
|
39
|
-
(0, vitest_1.it)("should throw ".concat(identifiers_errors_1.SdkUrlOrDiscoveryUrlIsMissedError.name, "\n if some of required parameters of configuration is missed"), function () {
|
|
40
|
-
var parameters = {};
|
|
41
|
-
var identifiers;
|
|
42
|
-
try {
|
|
43
|
-
identifiers = new identifiers_1.Identifiers(parameters);
|
|
44
|
-
(0, vitest_1.expect)(identifiers).toBeNull();
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
var e = error;
|
|
48
|
-
(0, vitest_1.expect)(e.message).toBe(new identifiers_errors_1.SdkUrlOrDiscoveryUrlIsMissedError().message);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=identifiers.spec.js.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AE,QAAQ;aACI,CAAC;YAEvB,IAAM,WAAW,GAAG,IAAI,yBAAW,CAAC,UAAU,CAAC,CAAC;YAEhD,eAAM,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAEhC,CAAC,CAAC,CAAC;QAEH,IAAA,WAAE,EACA,uBAAgB,sDAAiC,CAAC,IAAI,uEACK,EAC3D;YACE,IAAM,UAAU,GAAG,EAAuB,CAAC;YAE3C,IAAI,WAAwB,CAAC;YAE7B,IAAI,CAAC;gBACH,WAAW,GAAG,IAAI,yBAAW,CAAC,UAAU,CAAC,CAAC;gBAC1C,IAAA,eAAM,EAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC;YACjC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAM,CAAC,GAAG,KAA0C,CAAC;gBACrD,IAAA,eAAM,EAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CACpB,IAAI,sDAAiC,EAAE,CAAC,OAAO,CAChD,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC;IAEP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { assert, describe, expect, it } from 'vitest';
|
|
2
|
-
import { Identifiers } from '../identifiers';
|
|
3
|
-
import { SdkUrlOrDiscoveryUrlIsMissedError, TokenIsMissedError } from '../identifiers.errors';
|
|
4
|
-
describe('identifiers.Identifiers', () => {
|
|
5
|
-
describe('Instantiation', () => {
|
|
6
|
-
it('successfully instantiated', () => {
|
|
7
|
-
const parameters = {
|
|
8
|
-
token: 'token',
|
|
9
|
-
sdkUrl: 'sdkUrl',
|
|
10
|
-
};
|
|
11
|
-
const identifiers = new Identifiers(parameters);
|
|
12
|
-
assert.isNotNull(identifiers, 'identifiers is not null');
|
|
13
|
-
});
|
|
14
|
-
it(`should throw ${TokenIsMissedError.name} if token is missed`, () => {
|
|
15
|
-
const parameters = {
|
|
16
|
-
sdkUrl: 'sdkUrl',
|
|
17
|
-
};
|
|
18
|
-
let identifiers;
|
|
19
|
-
try {
|
|
20
|
-
identifiers = new Identifiers(parameters);
|
|
21
|
-
expect(identifiers).toBeNull();
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
const e = error;
|
|
25
|
-
expect(e.message).toBe(new TokenIsMissedError().message);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
it(`should NOT throw ${TokenIsMissedError.name} if token is wrapped function`, () => {
|
|
29
|
-
const token = () => 'token';
|
|
30
|
-
const parameters = {
|
|
31
|
-
token,
|
|
32
|
-
sdkUrl: 'sdkUrl',
|
|
33
|
-
};
|
|
34
|
-
const identifiers = new Identifiers(parameters);
|
|
35
|
-
assert.isNotNull(identifiers);
|
|
36
|
-
});
|
|
37
|
-
it(`should throw ${SdkUrlOrDiscoveryUrlIsMissedError.name}
|
|
38
|
-
if some of required parameters of configuration is missed`, () => {
|
|
39
|
-
const parameters = {};
|
|
40
|
-
let identifiers;
|
|
41
|
-
try {
|
|
42
|
-
identifiers = new Identifiers(parameters);
|
|
43
|
-
expect(identifiers).toBeNull();
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
const e = error;
|
|
47
|
-
expect(e.message).toBe(new SdkUrlOrDiscoveryUrlIsMissedError().message);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=identifiers.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"identifiers.spec.js","sourceRoot":"","sources":["../../../src/__tests__/identifiers.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,iCAAiC,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAI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