@prosopo/env 3.1.0 → 3.1.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @prosopo/env
2
2
 
3
+ ## 3.1.2
4
+ ### Patch Changes
5
+
6
+ - Updated dependencies [625fef8]
7
+ - @prosopo/types-database@3.0.11
8
+ - @prosopo/database@3.0.11
9
+ - @prosopo/types-env@2.7.15
10
+
11
+ ## 3.1.1
12
+ ### Patch Changes
13
+
14
+ - 3573f0b: fix npm scripts bundle command
15
+ - 3573f0b: build using vite, typecheck using tsc
16
+ - efd8102: Add tests for unwrap error helper
17
+ - 3573f0b: standardise all vite based npm scripts for bundling
18
+ - Updated dependencies [52dbf21]
19
+ - Updated dependencies [93d5e50]
20
+ - Updated dependencies [3573f0b]
21
+ - Updated dependencies [3573f0b]
22
+ - Updated dependencies [efd8102]
23
+ - Updated dependencies [93d5e50]
24
+ - Updated dependencies [63519d7]
25
+ - Updated dependencies [f29fc7e]
26
+ - Updated dependencies [3573f0b]
27
+ - Updated dependencies [2d0dd8a]
28
+ - @prosopo/util@3.0.3
29
+ - @prosopo/types-env@2.7.14
30
+ - @prosopo/types@3.0.4
31
+ - @prosopo/types-database@3.0.10
32
+ - @prosopo/database@3.0.10
33
+ - @prosopo/common@3.1.0
34
+ - @prosopo/config@3.1.1
35
+
3
36
  ## 3.1.0
4
37
  ### Minor Changes
5
38
 
package/dist/env.js CHANGED
@@ -1,126 +1,129 @@
1
- import { ProsopoEnvError, getLogger, parseLogLevel, } from "@prosopo/common";
1
+ import { getLogger, parseLogLevel, ProsopoEnvError } from "@prosopo/common";
2
2
  import { ProviderDatabase } from "@prosopo/database";
3
3
  import { Keyring } from "@prosopo/keyring";
4
4
  import { randomAsHex } from "@prosopo/util-crypto";
5
- export class Environment {
6
- constructor(config, pair, authAccount) {
7
- this.ready = false;
8
- this.config = config;
9
- this.defaultEnvironment = this.config.defaultEnvironment;
10
- this.pair = pair;
11
- this.authAccount = authAccount;
12
- this.logger = getLogger(parseLogLevel(this.config.logLevel), "ProsopoEnvironment");
13
- this.keyring = new Keyring({
14
- type: "sr25519",
15
- });
16
- if (this.pair)
17
- this.keyring.addPair(this.pair);
18
- this.envId = randomAsHex(32).slice(0, 32);
19
- this.logger.info(() => ({
20
- msg: "Environment initialized",
21
- data: {
22
- envId: this.envId,
23
- defaultEnvironment: this.defaultEnvironment,
24
- logLevel: this.config.logLevel,
25
- },
26
- }));
5
+ class Environment {
6
+ constructor(config, pair, authAccount) {
7
+ this.ready = false;
8
+ this.config = config;
9
+ this.defaultEnvironment = this.config.defaultEnvironment;
10
+ this.pair = pair;
11
+ this.authAccount = authAccount;
12
+ this.logger = getLogger(
13
+ parseLogLevel(this.config.logLevel),
14
+ "ProsopoEnvironment"
15
+ );
16
+ this.keyring = new Keyring({
17
+ type: "sr25519"
18
+ });
19
+ if (this.pair) this.keyring.addPair(this.pair);
20
+ this.envId = randomAsHex(32).slice(0, 32);
21
+ this.logger.info(() => ({
22
+ msg: "Environment initialized",
23
+ data: {
24
+ envId: this.envId,
25
+ defaultEnvironment: this.defaultEnvironment,
26
+ logLevel: this.config.logLevel
27
+ }
28
+ }));
29
+ }
30
+ async getSigner() {
31
+ if (!this.pair) {
32
+ throw new ProsopoEnvError("CONTRACT.SIGNER_UNDEFINED", {
33
+ context: { failedFuncName: this.getSigner.name }
34
+ });
27
35
  }
28
- async getSigner() {
29
- if (!this.pair) {
30
- throw new ProsopoEnvError("CONTRACT.SIGNER_UNDEFINED", {
31
- context: { failedFuncName: this.getSigner.name },
32
- });
33
- }
34
- try {
35
- this.pair = this.keyring.addPair(this.pair);
36
- }
37
- catch (error) {
38
- throw new ProsopoEnvError("CONTRACT.SIGNER_UNDEFINED", {
39
- context: { failedFuncName: this.getSigner.name, error },
40
- });
41
- }
42
- return this.pair;
36
+ try {
37
+ this.pair = this.keyring.addPair(this.pair);
38
+ } catch (error) {
39
+ throw new ProsopoEnvError("CONTRACT.SIGNER_UNDEFINED", {
40
+ context: { failedFuncName: this.getSigner.name, error }
41
+ });
43
42
  }
44
- getDb() {
45
- if (this.db === undefined) {
46
- throw new ProsopoEnvError(new Error("db not setup! Please call isReady() first"));
47
- }
48
- return this.db;
43
+ return this.pair;
44
+ }
45
+ getDb() {
46
+ if (this.db === void 0) {
47
+ throw new ProsopoEnvError(
48
+ new Error("db not setup! Please call isReady() first")
49
+ );
49
50
  }
50
- getAssetsResolver() {
51
- if (this.assetsResolver === undefined) {
52
- throw new ProsopoEnvError(new Error("assetsResolver not setup! Please call isReady() first"));
53
- }
54
- return this.assetsResolver;
51
+ return this.db;
52
+ }
53
+ getAssetsResolver() {
54
+ if (this.assetsResolver === void 0) {
55
+ throw new ProsopoEnvError(
56
+ new Error("assetsResolver not setup! Please call isReady() first")
57
+ );
55
58
  }
56
- getPair() {
57
- if (this.pair === undefined) {
58
- throw new ProsopoEnvError(new Error("pair not setup! Please call isReady() first"));
59
- }
60
- return this.pair;
59
+ return this.assetsResolver;
60
+ }
61
+ getPair() {
62
+ if (this.pair === void 0) {
63
+ throw new ProsopoEnvError(
64
+ new Error("pair not setup! Please call isReady() first")
65
+ );
61
66
  }
62
- async isReady() {
63
- if (this.ready) {
64
- this.logger.debug(() => ({ msg: "Environment is already ready" }));
65
- return;
66
- }
67
- try {
68
- if (this.pair && this.config.account.password && this.pair.isLocked) {
69
- this.pair.unlock(this.config.account.password);
70
- }
71
- await this.getSigner();
72
- if (!this.db) {
73
- await this.importDatabase();
74
- }
75
- if (this.db && !this.db.connected) {
76
- this.logger.warn(() => ({
77
- msg: `Database connection is not ready (state: ${this.db?.connection?.readyState}), reconnecting...`,
78
- }));
79
- await this.db.connect();
80
- this.logger.info(() => ({ msg: "Connected to db" }));
81
- }
82
- this.ready = true;
83
- }
84
- catch (err) {
85
- throw new ProsopoEnvError("GENERAL.ENVIRONMENT_NOT_READY", {
86
- context: { error: err },
87
- logger: this.logger,
88
- });
89
- }
67
+ return this.pair;
68
+ }
69
+ async isReady() {
70
+ if (this.ready) {
71
+ this.logger.debug(() => ({ msg: "Environment is already ready" }));
72
+ return;
90
73
  }
91
- async importDatabase() {
92
- try {
93
- if (this.config.database) {
94
- const dbConfig = this.config.database[this.defaultEnvironment];
95
- if (dbConfig) {
96
- this.db = new ProviderDatabase({
97
- mongo: {
98
- url: dbConfig.endpoint,
99
- dbname: dbConfig.dbname,
100
- authSource: dbConfig.authSource,
101
- },
102
- redis: {
103
- url: this.config.redisConnection.url,
104
- password: this.config.redisConnection.password,
105
- },
106
- logger: this.logger,
107
- });
108
- await this.db.connect();
109
- }
110
- }
74
+ try {
75
+ if (this.pair && this.config.account.password && this.pair.isLocked) {
76
+ this.pair.unlock(this.config.account.password);
77
+ }
78
+ await this.getSigner();
79
+ if (!this.db) {
80
+ await this.importDatabase();
81
+ }
82
+ if (this.db && !this.db.connected) {
83
+ this.logger.warn(() => ({
84
+ msg: `Database connection is not ready (state: ${this.db?.connection?.readyState}), reconnecting...`
85
+ }));
86
+ await this.db.connect();
87
+ this.logger.info(() => ({ msg: "Connected to db" }));
88
+ }
89
+ this.ready = true;
90
+ } catch (err) {
91
+ throw new ProsopoEnvError("GENERAL.ENVIRONMENT_NOT_READY", {
92
+ context: { error: err },
93
+ logger: this.logger
94
+ });
95
+ }
96
+ }
97
+ async importDatabase() {
98
+ try {
99
+ if (this.config.database) {
100
+ const dbConfig = this.config.database[this.defaultEnvironment];
101
+ if (dbConfig) {
102
+ this.db = new ProviderDatabase({
103
+ mongo: {
104
+ url: dbConfig.endpoint,
105
+ dbname: dbConfig.dbname,
106
+ authSource: dbConfig.authSource
107
+ },
108
+ redis: {
109
+ url: this.config.redisConnection.url,
110
+ password: this.config.redisConnection.password
111
+ },
112
+ logger: this.logger
113
+ });
114
+ await this.db.connect();
111
115
  }
112
- catch (error) {
113
- throw new ProsopoEnvError("DATABASE.DATABASE_IMPORT_FAILED", {
114
- context: {
115
- error,
116
- environment: this.config.database
117
- ? this.config.database[this.defaultEnvironment]
118
- ? this.config.database[this.defaultEnvironment]?.type
119
- : undefined
120
- : undefined,
121
- },
122
- });
116
+ }
117
+ } catch (error) {
118
+ throw new ProsopoEnvError("DATABASE.DATABASE_IMPORT_FAILED", {
119
+ context: {
120
+ error,
121
+ environment: this.config.database ? this.config.database[this.defaultEnvironment] ? this.config.database[this.defaultEnvironment]?.type : void 0 : void 0
123
122
  }
123
+ });
124
124
  }
125
+ }
125
126
  }
126
- //# sourceMappingURL=env.js.map
127
+ export {
128
+ Environment
129
+ };
package/dist/index.js CHANGED
@@ -1,3 +1,6 @@
1
- export * from "./env.js";
2
- export * from "./provider.js";
3
- //# sourceMappingURL=index.js.map
1
+ import { Environment } from "./env.js";
2
+ import { ProviderEnvironment } from "./provider.js";
3
+ export {
4
+ Environment,
5
+ ProviderEnvironment
6
+ };
package/dist/provider.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { ScheduledTaskStatus } from "@prosopo/types";
2
2
  import { Environment } from "./env.js";
3
- export class ProviderEnvironment extends Environment {
4
- cleanup() {
5
- this.getDb()
6
- .cleanupScheduledTaskStatus(ScheduledTaskStatus.Running)
7
- .catch((err) => {
8
- this.logger.error(() => ({
9
- msg: "Failed to cleanup running scheduled tasks",
10
- err,
11
- data: { failedFuncName: this.cleanup.name },
12
- }));
13
- });
14
- }
3
+ class ProviderEnvironment extends Environment {
4
+ cleanup() {
5
+ this.getDb().cleanupScheduledTaskStatus(ScheduledTaskStatus.Running).catch((err) => {
6
+ this.logger.error(() => ({
7
+ msg: "Failed to cleanup running scheduled tasks",
8
+ err,
9
+ data: { failedFuncName: this.cleanup.name }
10
+ }));
11
+ });
12
+ }
15
13
  }
16
- //# sourceMappingURL=provider.js.map
14
+ export {
15
+ ProviderEnvironment
16
+ };
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@prosopo/env",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "description": "Path env prosopo environment",
5
5
  "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
6
7
  "type": "module",
7
8
  "engines": {
8
9
  "node": "20",
@@ -10,24 +11,28 @@
10
11
  },
11
12
  "exports": {
12
13
  ".": {
14
+ "types": "./dist/index.d.ts",
13
15
  "import": "./dist/index.js",
14
16
  "require": "./dist/cjs/index.cjs"
15
17
  }
16
18
  },
17
19
  "scripts": {
18
- "test": "echo \"No test specified\"",
19
- "clean": "tsc --build --clean",
20
- "build": "tsc --build --verbose",
21
- "build:cjs": "npx vite --config vite.cjs.config.ts build"
20
+ "clean": "del-cli --verbose dist tsconfig.tsbuildinfo",
21
+ "build": "NODE_ENV=${NODE_ENV:-production}; vite build --config vite.esm.config.ts --mode $NODE_ENV",
22
+ "build:tsc": "tsc --build --verbose",
23
+ "build:cjs": "NODE_ENV=${NODE_ENV:-production}; vite build --config vite.cjs.config.ts --mode $NODE_ENV",
24
+ "typecheck": "tsc --build --declaration --emitDeclarationOnly",
25
+ "test": "echo no tests"
22
26
  },
23
27
  "dependencies": {
24
28
  "@polkadot/util": "12.6.2",
25
- "@prosopo/common": "3.0.2",
26
- "@prosopo/database": "3.0.9",
27
- "@prosopo/types": "3.0.3",
28
- "@prosopo/types-database": "3.0.9",
29
- "@prosopo/types-env": "2.7.13",
30
- "@prosopo/util": "3.0.2",
29
+ "@prosopo/common": "3.1.0",
30
+ "@prosopo/database": "3.0.11",
31
+ "@prosopo/types": "3.0.4",
32
+ "@prosopo/types-database": "3.0.11",
33
+ "@prosopo/types-env": "2.7.15",
34
+ "@prosopo/util": "3.0.3",
35
+ "@prosopo/config": "3.1.1",
31
36
  "@typegoose/auto-increment": "4.13.0",
32
37
  "axios": "1.10.0",
33
38
  "esbuild": "0.25.6",
@@ -36,7 +41,6 @@
36
41
  "webpack-dev-server": "5.2.2"
37
42
  },
38
43
  "devDependencies": {
39
- "@prosopo/config": "3.1.0",
40
44
  "@vitest/coverage-v8": "3.0.9",
41
45
  "concurrently": "9.0.1",
42
46
  "del-cli": "6.0.0",
@@ -15,5 +15,8 @@ import path from "node:path";
15
15
  import { ViteCommonJSConfig } from "@prosopo/config";
16
16
 
17
17
  export default function () {
18
- return ViteCommonJSConfig("env", path.resolve("./tsconfig.cjs.json"));
18
+ return ViteCommonJSConfig(
19
+ path.basename("."),
20
+ path.resolve("./tsconfig.json"),
21
+ );
19
22
  }
@@ -0,0 +1,20 @@
1
+ // Copyright 2021-2025 Prosopo (UK) Ltd.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ import path from "node:path";
16
+ import { ViteEsmConfig } from "@prosopo/config";
17
+
18
+ export default function () {
19
+ return ViteEsmConfig(path.basename("."), path.resolve("./tsconfig.json"));
20
+ }
@@ -0,0 +1,32 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ // Copyright 2021-2025 Prosopo (UK) Ltd.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 (the "License");
6
+ // you may not use this file except in compliance with the License.
7
+ // You may obtain a copy of the License at
8
+ //
9
+ // http://www.apache.org/licenses/LICENSE-2.0
10
+ //
11
+ // Unless required by applicable law or agreed to in writing, software
12
+ // distributed under the License is distributed on an "AS IS" BASIS,
13
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ // See the License for the specific language governing permissions and
15
+ // limitations under the License.
16
+ import { ViteTestConfig } from "@prosopo/config";
17
+ import dotenv from "dotenv";
18
+ process.env.NODE_ENV = "test";
19
+ // if .env.test exists at this level, use it, otherwise use the one at the root
20
+ const envFile = `.env.${process.env.NODE_ENV || "development"}`;
21
+ let envPath = envFile;
22
+ if (fs.existsSync(envFile)) {
23
+ envPath = path.resolve(envFile);
24
+ } else if (fs.existsSync(`../../${envFile}`)) {
25
+ envPath = path.resolve(`../../${envFile}`);
26
+ } else {
27
+ throw new Error(`No ${envFile} file found`);
28
+ }
29
+
30
+ dotenv.config({ path: envPath });
31
+
32
+ export default ViteTestConfig();
package/dist/env.d.ts DELETED
@@ -1,27 +0,0 @@
1
- import { type Logger } from "@prosopo/common";
2
- import { ProviderDatabase } from "@prosopo/database";
3
- import { Keyring } from "@prosopo/keyring";
4
- import type { KeyringPair } from "@prosopo/types";
5
- import type { AssetsResolver, EnvironmentTypes } from "@prosopo/types";
6
- import type { ProsopoConfigOutput } from "@prosopo/types";
7
- import type { ProsopoEnvironment } from "@prosopo/types-env";
8
- export declare class Environment implements ProsopoEnvironment {
9
- config: ProsopoConfigOutput;
10
- db: ProviderDatabase | undefined;
11
- defaultEnvironment: EnvironmentTypes;
12
- logger: Logger;
13
- assetsResolver: AssetsResolver | undefined;
14
- keyring: Keyring;
15
- pair: KeyringPair | undefined;
16
- authAccount: KeyringPair | undefined;
17
- envId: string | undefined;
18
- ready: boolean;
19
- constructor(config: ProsopoConfigOutput, pair?: KeyringPair, authAccount?: KeyringPair);
20
- getSigner(): Promise<KeyringPair>;
21
- getDb(): ProviderDatabase;
22
- getAssetsResolver(): AssetsResolver;
23
- getPair(): KeyringPair;
24
- isReady(): Promise<void>;
25
- importDatabase(): Promise<void>;
26
- }
27
- //# sourceMappingURL=env.d.ts.map
package/dist/env.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAcA,OAAO,EACN,KAAK,MAAM,EAIX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK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AC;oBACd,IAAI,CAAC,EAAE,GAAG,IAAI,gBAAgB,CAAC;wBAC9B,KAAK,EAAE;4BACN,GAAG,EAAE,QAAQ,CAAC,QAAQ;4BACtB,MAAM,EAAE,QAAQ,CAAC,MAAM;4BACvB,UAAU,EAAE,QAAQ,CAAC,UAAU;yBAC/B;wBACD,KAAK,EAAE;4BACN,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG;4BACpC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,QAAQ;yBAC9C;wBACD,MAAM,EAAE,IAAI,CAAC,MAAM;qBACnB,CAAC,CAAC;oBACH,MAAM,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;gBACzB,CAAC;YACF,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,eAAe,CAAC,iCAAiC,EAAE;gBAC5D,OAAO,EAAE;oBACR,KAAK;oBACL,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;wBAChC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC;4BAC9C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,IAAI;4BACrD,CAAC,CAAC,SAAS;wBACZ,CAAC,CAAC,SAAS;iBACZ;aACD,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;CACD"}
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from "./env.js";
2
- export * from "./provider.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
@@ -1,7 +0,0 @@
1
- import { type ProsopoConfigOutput } from "@prosopo/types";
2
- import { Environment } from "./env.js";
3
- export declare class ProviderEnvironment extends Environment {
4
- config: ProsopoConfigOutput;
5
- cleanup(): void;
6
- }
7
- //# sourceMappingURL=provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,mBAAmB,EAAuB,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,qBAAa,mBAAoB,SAAQ,WAAW;IAC3C,MAAM,EAAE,mBAAmB,CAAC;IAEpC,OAAO,IAAI,IAAI;CAWf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAcA,OAAO,EAA4B,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,OAAO,mBAAoB,SAAQ,WAAW;IAGnD,OAAO;QACN,IAAI,CAAC,KAAK,EAAE;aACV,0BAA0B,CAAC,mBAAmB,CAAC,OAAO,CAAC;aACvD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACd,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;gBACxB,GAAG,EAAE,2CAA2C;gBAChD,GAAG;gBACH,IAAI,EAAE,EAAE,cAAc,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;aAC3C,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACD"}