@prosopo/config 0.2.7 → 0.2.8
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/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +1 -1
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/test.d.ts +24 -35
- package/dist/provider/test.d.ts.map +1 -1
- package/dist/provider/test.js +28 -47
- package/dist/provider/test.js.map +1 -1
- package/package.json +4 -4
package/dist/provider/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as getTestConfig } from './test.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/provider/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as getTestConfig } from './test.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/provider/test.d.ts
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
export default function getTestConfig(): {
|
|
2
2
|
logLevel: "trace" | "debug" | "info" | "warn" | "error" | "fatal";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
defaultEnvironment: "development";
|
|
3
|
+
defaultEnvironment: "production" | "development" | "staging";
|
|
4
|
+
defaultNetwork: "development" | "rococo" | "shiden";
|
|
7
5
|
account: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
accounts: string[];
|
|
6
|
+
address?: string | undefined;
|
|
7
|
+
secret?: string | undefined;
|
|
8
|
+
password?: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
networks: Record<"development" | "rococo" | "shiden", {
|
|
11
|
+
endpoint: string;
|
|
12
|
+
contract: {
|
|
13
|
+
address: string;
|
|
14
|
+
name: string;
|
|
19
15
|
};
|
|
20
|
-
|
|
16
|
+
pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
|
|
17
|
+
ss58Format: number;
|
|
18
|
+
}>;
|
|
21
19
|
captchas: {
|
|
22
20
|
solved: {
|
|
23
21
|
count: number;
|
|
@@ -29,30 +27,21 @@ declare const _default: {
|
|
|
29
27
|
captchaSolutions: {
|
|
30
28
|
requiredNumberOfSolutions: number;
|
|
31
29
|
solutionWinningPercentage: number;
|
|
32
|
-
captchaFilePath: string;
|
|
33
30
|
captchaBlockRecency: number;
|
|
34
31
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
endpoint: string;
|
|
39
|
-
dbname: string;
|
|
40
|
-
authSource: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
assets: {
|
|
44
|
-
absolutePath: string;
|
|
45
|
-
basePath: string;
|
|
32
|
+
batchCommit: {
|
|
33
|
+
interval: number;
|
|
34
|
+
maxBatchExtrinsicPercentage: number;
|
|
46
35
|
};
|
|
47
36
|
server: {
|
|
48
37
|
baseURL: string;
|
|
49
38
|
port: number;
|
|
50
|
-
fileServePaths: string;
|
|
51
|
-
};
|
|
52
|
-
batchCommit: {
|
|
53
|
-
interval: number;
|
|
54
|
-
maxBatchExtrinsicPercentage: number;
|
|
55
39
|
};
|
|
40
|
+
database?: Partial<Record<"production" | "development" | "staging", {
|
|
41
|
+
type: string;
|
|
42
|
+
endpoint: string;
|
|
43
|
+
dbname: string;
|
|
44
|
+
authSource: string;
|
|
45
|
+
}>> | undefined;
|
|
56
46
|
};
|
|
57
|
-
export default _default;
|
|
58
47
|
//# sourceMappingURL=test.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/provider/test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/provider/test.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BpC"}
|
package/dist/provider/test.js
CHANGED
|
@@ -1,53 +1,34 @@
|
|
|
1
|
-
import { DatabaseTypes, EnvironmentTypesSchema } from '@prosopo/types';
|
|
1
|
+
import { DatabaseTypes, EnvironmentTypesSchema, NetworkNamesSchema, NetworkPairTypeSchema, ProsopoConfigSchema, } from '@prosopo/types';
|
|
2
2
|
import { getLogLevel } from '@prosopo/common';
|
|
3
3
|
const logLevel = getLogLevel();
|
|
4
|
-
export default {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
contract: {
|
|
16
|
-
address: process.env.PROTOCOL_CONTRACT_ADDRESS || '',
|
|
17
|
-
name: 'prosopo',
|
|
18
|
-
},
|
|
19
|
-
accounts: ['//Alice', '//Bob', '//Charlie', '//Dave', '//Eve', '//Ferdie'],
|
|
4
|
+
export default function getTestConfig() {
|
|
5
|
+
return ProsopoConfigSchema.parse({
|
|
6
|
+
logLevel,
|
|
7
|
+
defaultEnvironment: EnvironmentTypesSchema.Values.development,
|
|
8
|
+
defaultNetwork: NetworkNamesSchema.Values.development,
|
|
9
|
+
account: {
|
|
10
|
+
password: '',
|
|
11
|
+
address: '',
|
|
12
|
+
},
|
|
13
|
+
database: {
|
|
14
|
+
development: { type: DatabaseTypes.enum.mongoMemory, endpoint: '', dbname: 'prosopo_test', authSource: '' },
|
|
20
15
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
server: {
|
|
17
|
+
baseURL: 'http://localhost',
|
|
18
|
+
port: 9229,
|
|
19
|
+
fileServePaths: '[]',
|
|
25
20
|
},
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
networks: {
|
|
22
|
+
development: {
|
|
23
|
+
endpoint: 'ws://localhost:9944',
|
|
24
|
+
contract: {
|
|
25
|
+
address: process.env.PROTOCOL_CONTRACT_ADDRESS || '',
|
|
26
|
+
name: 'prosopo',
|
|
27
|
+
},
|
|
28
|
+
pairType: NetworkPairTypeSchema.parse('sr25519'),
|
|
29
|
+
ss58Format: 42,
|
|
30
|
+
},
|
|
28
31
|
},
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
requiredNumberOfSolutions: 3,
|
|
32
|
-
solutionWinningPercentage: 80,
|
|
33
|
-
captchaFilePath: './tests/mocks/data/captchas.json',
|
|
34
|
-
captchaBlockRecency: 10,
|
|
35
|
-
},
|
|
36
|
-
database: {
|
|
37
|
-
development: { type: DatabaseTypes.enum.mongoMemory, endpoint: '', dbname: 'prosopo_test', authSource: '' },
|
|
38
|
-
},
|
|
39
|
-
assets: {
|
|
40
|
-
absolutePath: '',
|
|
41
|
-
basePath: '',
|
|
42
|
-
},
|
|
43
|
-
server: {
|
|
44
|
-
baseURL: 'http://localhost',
|
|
45
|
-
port: 9229,
|
|
46
|
-
fileServePaths: '[]',
|
|
47
|
-
},
|
|
48
|
-
batchCommit: {
|
|
49
|
-
interval: 1000000,
|
|
50
|
-
maxBatchExtrinsicPercentage: 59,
|
|
51
|
-
},
|
|
52
|
-
};
|
|
32
|
+
});
|
|
33
|
+
}
|
|
53
34
|
//# sourceMappingURL=test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/provider/test.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/provider/test.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EACb,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,GACtB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;AAC9B,MAAM,CAAC,OAAO,UAAU,aAAa;IACjC,OAAO,mBAAmB,CAAC,KAAK,CAAC;QAC7B,QAAQ;QACR,kBAAkB,EAAE,sBAAsB,CAAC,MAAM,CAAC,WAAW;QAC7D,cAAc,EAAE,kBAAkB,CAAC,MAAM,CAAC,WAAW;QACrD,OAAO,EAAE;YACL,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,EAAE;SACd;QACD,QAAQ,EAAE;YACN,WAAW,EAAE,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,EAAE,EAAE;SAC9G;QACD,MAAM,EAAE;YACJ,OAAO,EAAE,kBAAkB;YAC3B,IAAI,EAAE,IAAI;YACV,cAAc,EAAE,IAAI;SACvB;QACD,QAAQ,EAAE;YACN,WAAW,EAAE;gBACT,QAAQ,EAAE,qBAAqB;gBAC/B,QAAQ,EAAE;oBACN,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,EAAE;oBACpD,IAAI,EAAE,SAAS;iBAClB;gBACD,QAAQ,EAAE,qBAAqB,CAAC,KAAK,CAAC,SAAS,CAAC;gBAChD,UAAU,EAAE,EAAE;aACjB;SACJ;KACJ,CAAC,CAAA;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/config",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Prosopo config library",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"author": "Prosopo Limited",
|
|
18
18
|
"license": "Apache-2.0",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@prosopo/common": "0.2.
|
|
21
|
-
"@prosopo/types": "0.2.
|
|
20
|
+
"@prosopo/common": "0.2.8",
|
|
21
|
+
"@prosopo/types": "0.2.8",
|
|
22
22
|
"glob": "^10.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@polkadot/dev": "^0.76.11",
|
|
26
|
-
"@prosopo/util": "0.2.
|
|
26
|
+
"@prosopo/util": "0.2.8",
|
|
27
27
|
"@rollup/plugin-alias": "^5.0.0",
|
|
28
28
|
"@rollup/plugin-babel": "^6.0.3",
|
|
29
29
|
"@rollup/plugin-commonjs": "^24.1.0",
|