@prosopo/env 3.0.8 → 3.1.1

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,41 @@
1
1
  # @prosopo/env
2
2
 
3
+ ## 3.1.1
4
+ ### Patch Changes
5
+
6
+ - 3573f0b: fix npm scripts bundle command
7
+ - 3573f0b: build using vite, typecheck using tsc
8
+ - efd8102: Add tests for unwrap error helper
9
+ - 3573f0b: standardise all vite based npm scripts for bundling
10
+ - Updated dependencies [52dbf21]
11
+ - Updated dependencies [93d5e50]
12
+ - Updated dependencies [3573f0b]
13
+ - Updated dependencies [3573f0b]
14
+ - Updated dependencies [efd8102]
15
+ - Updated dependencies [93d5e50]
16
+ - Updated dependencies [63519d7]
17
+ - Updated dependencies [f29fc7e]
18
+ - Updated dependencies [3573f0b]
19
+ - Updated dependencies [2d0dd8a]
20
+ - @prosopo/util@3.0.3
21
+ - @prosopo/types-env@2.7.14
22
+ - @prosopo/types@3.0.4
23
+ - @prosopo/types-database@3.0.10
24
+ - @prosopo/database@3.0.10
25
+ - @prosopo/common@3.1.0
26
+ - @prosopo/config@3.1.1
27
+
28
+ ## 3.1.0
29
+ ### Minor Changes
30
+
31
+ - b7c3258: Add tests for UAPs
32
+
33
+ ### Patch Changes
34
+
35
+ - @prosopo/database@3.0.9
36
+ - @prosopo/types-database@3.0.9
37
+ - @prosopo/types-env@2.7.13
38
+
3
39
  ## 3.0.8
4
40
  ### Patch Changes
5
41
 
package/dist/cjs/env.cjs CHANGED
@@ -3,8 +3,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const common = require("@prosopo/common");
4
4
  const database = require("@prosopo/database");
5
5
  const keyring = require("@prosopo/keyring");
6
+ const utilCrypto = require("@prosopo/util-crypto");
6
7
  class Environment {
7
8
  constructor(config, pair, authAccount) {
9
+ this.ready = false;
8
10
  this.config = config;
9
11
  this.defaultEnvironment = this.config.defaultEnvironment;
10
12
  this.pair = pair;
@@ -17,6 +19,15 @@ class Environment {
17
19
  type: "sr25519"
18
20
  });
19
21
  if (this.pair) this.keyring.addPair(this.pair);
22
+ this.envId = utilCrypto.randomAsHex(32).slice(0, 32);
23
+ this.logger.info(() => ({
24
+ msg: "Environment initialized",
25
+ data: {
26
+ envId: this.envId,
27
+ defaultEnvironment: this.defaultEnvironment,
28
+ logLevel: this.config.logLevel
29
+ }
30
+ }));
20
31
  }
21
32
  async getSigner() {
22
33
  if (!this.pair) {
@@ -58,6 +69,10 @@ class Environment {
58
69
  return this.pair;
59
70
  }
60
71
  async isReady() {
72
+ if (this.ready) {
73
+ this.logger.debug(() => ({ msg: "Environment is already ready" }));
74
+ return;
75
+ }
61
76
  try {
62
77
  if (this.pair && this.config.account.password && this.pair.isLocked) {
63
78
  this.pair.unlock(this.config.account.password);
@@ -73,6 +88,7 @@ class Environment {
73
88
  await this.db.connect();
74
89
  this.logger.info(() => ({ msg: "Connected to db" }));
75
90
  }
91
+ this.ready = true;
76
92
  } catch (err) {
77
93
  throw new common.ProsopoEnvError("GENERAL.ENVIRONMENT_NOT_READY", {
78
94
  context: { error: err },
package/dist/env.js CHANGED
@@ -1,110 +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
- export class Environment {
5
- constructor(config, pair, authAccount) {
6
- this.config = config;
7
- this.defaultEnvironment = this.config.defaultEnvironment;
8
- this.pair = pair;
9
- this.authAccount = authAccount;
10
- this.logger = getLogger(parseLogLevel(this.config.logLevel), "ProsopoEnvironment");
11
- this.keyring = new Keyring({
12
- type: "sr25519",
13
- });
14
- if (this.pair)
15
- this.keyring.addPair(this.pair);
4
+ import { randomAsHex } from "@prosopo/util-crypto";
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
+ });
16
35
  }
17
- async getSigner() {
18
- if (!this.pair) {
19
- throw new ProsopoEnvError("CONTRACT.SIGNER_UNDEFINED", {
20
- context: { failedFuncName: this.getSigner.name },
21
- });
22
- }
23
- try {
24
- this.pair = this.keyring.addPair(this.pair);
25
- }
26
- catch (error) {
27
- throw new ProsopoEnvError("CONTRACT.SIGNER_UNDEFINED", {
28
- context: { failedFuncName: this.getSigner.name, error },
29
- });
30
- }
31
- 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
+ });
32
42
  }
33
- getDb() {
34
- if (this.db === undefined) {
35
- throw new ProsopoEnvError(new Error("db not setup! Please call isReady() first"));
36
- }
37
- 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
+ );
38
50
  }
39
- getAssetsResolver() {
40
- if (this.assetsResolver === undefined) {
41
- throw new ProsopoEnvError(new Error("assetsResolver not setup! Please call isReady() first"));
42
- }
43
- 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
+ );
44
58
  }
45
- getPair() {
46
- if (this.pair === undefined) {
47
- throw new ProsopoEnvError(new Error("pair not setup! Please call isReady() first"));
48
- }
49
- 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
+ );
50
66
  }
51
- async isReady() {
52
- try {
53
- if (this.pair && this.config.account.password && this.pair.isLocked) {
54
- this.pair.unlock(this.config.account.password);
55
- }
56
- await this.getSigner();
57
- if (!this.db) {
58
- await this.importDatabase();
59
- }
60
- if (this.db && !this.db.connected) {
61
- this.logger.warn(() => ({
62
- msg: `Database connection is not ready (state: ${this.db?.connection?.readyState}), reconnecting...`,
63
- }));
64
- await this.db.connect();
65
- this.logger.info(() => ({ msg: "Connected to db" }));
66
- }
67
- }
68
- catch (err) {
69
- throw new ProsopoEnvError("GENERAL.ENVIRONMENT_NOT_READY", {
70
- context: { error: err },
71
- logger: this.logger,
72
- });
73
- }
67
+ return this.pair;
68
+ }
69
+ async isReady() {
70
+ if (this.ready) {
71
+ this.logger.debug(() => ({ msg: "Environment is already ready" }));
72
+ return;
73
+ }
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
+ });
74
95
  }
75
- async importDatabase() {
76
- try {
77
- if (this.config.database) {
78
- const dbConfig = this.config.database[this.defaultEnvironment];
79
- if (dbConfig) {
80
- this.db = new ProviderDatabase({
81
- mongo: {
82
- url: dbConfig.endpoint,
83
- dbname: dbConfig.dbname,
84
- authSource: dbConfig.authSource,
85
- },
86
- redis: {
87
- url: this.config.redisConnection.url,
88
- password: this.config.redisConnection.password,
89
- },
90
- logger: this.logger,
91
- });
92
- await this.db.connect();
93
- }
94
- }
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();
95
115
  }
96
- catch (error) {
97
- throw new ProsopoEnvError("DATABASE.DATABASE_IMPORT_FAILED", {
98
- context: {
99
- error,
100
- environment: this.config.database
101
- ? this.config.database[this.defaultEnvironment]
102
- ? this.config.database[this.defaultEnvironment]?.type
103
- : undefined
104
- : undefined,
105
- },
106
- });
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
107
122
  }
123
+ });
108
124
  }
125
+ }
109
126
  }
110
- //# 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.0.8",
3
+ "version": "3.1.1",
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.8",
27
- "@prosopo/types": "3.0.3",
28
- "@prosopo/types-database": "3.0.8",
29
- "@prosopo/types-env": "2.7.12",
30
- "@prosopo/util": "3.0.2",
29
+ "@prosopo/common": "3.1.0",
30
+ "@prosopo/database": "3.0.10",
31
+ "@prosopo/types": "3.0.4",
32
+ "@prosopo/types-database": "3.0.10",
33
+ "@prosopo/types-env": "2.7.14",
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,25 +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
- constructor(config: ProsopoConfigOutput, pair?: KeyringPair, authAccount?: KeyringPair);
18
- getSigner(): Promise<KeyringPair>;
19
- getDb(): ProviderDatabase;
20
- getAssetsResolver(): AssetsResolver;
21
- getPair(): KeyringPair;
22
- isReady(): Promise<void>;
23
- importDatabase(): Promise<void>;
24
- }
25
- //# 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,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,qBAAa,WAAY,YAAW,kBAAkB;IACrD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,EAAE,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACjC,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,cAAc,GAAG,SAAS,CAAC;IAC3C,OAAO,EAAE,OAAO,C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,QAAQ,EAAE,CAAC;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"}