@prosopo/types-env 2.10.22 → 2.10.23

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @prosopo/types-env@2.10.22 build:cjs
2
+ > @prosopo/types-env@2.10.23 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -47,4 +47,4 @@ dist/cjs/env.cjs 0.00 kB │ gzip: 0.02 kB
47
47
  dist/cjs/ipinfo.cjs 0.00 kB │ gzip: 0.02 kB
48
48
  dist/cjs/provider.cjs 0.00 kB │ gzip: 0.02 kB
49
49
 
50
- ✓ built in 57ms
50
+ ✓ built in 60ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/types-env@2.10.22 build:tsc
2
+ > @prosopo/types-env@2.10.23 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 5:53:35 PM - Projects in this build:
5
+ 7:05:21 AM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../util/tsconfig.json
8
8
  * ../logger/tsconfig.json
@@ -18,33 +18,33 @@
18
18
  * ../keyring/tsconfig.json
19
19
  * tsconfig.json
20
20
 
21
- 5:53:35 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
21
+ 7:05:21 AM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/vite-plugin-copy.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
22
22
 
23
- 5:53:35 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
23
+ 7:05:21 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
24
24
 
25
- 5:53:35 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
25
+ 7:05:21 AM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
26
26
 
27
- 5:53:35 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
27
+ 7:05:22 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
28
28
 
29
- 5:53:35 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
29
+ 7:05:22 AM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
30
30
 
31
- 5:53:35 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
31
+ 7:05:22 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
32
32
 
33
- 5:53:35 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/error.ts' is older than output '../common/tsconfig.tsbuildinfo'
33
+ 7:05:22 AM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
34
34
 
35
- 5:53:35 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
35
+ 7:05:22 AM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/index.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
36
36
 
37
- 5:53:35 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/redisClient.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
37
+ 7:05:22 AM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
38
38
 
39
- 5:53:35 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
39
+ 7:05:22 AM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/api.test-d.ts' is older than output '../api/tsconfig.tsbuildinfo'
40
40
 
41
- 5:53:35 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/ruleRecord.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
41
+ 7:05:22 AM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/transformRule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
42
42
 
43
- 5:53:36 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/types/captcha.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
43
+ 7:05:22 AM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/types.test-d.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
44
44
 
45
- 5:53:36 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/keyring/keyring.test.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
45
+ 7:05:22 AM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
46
46
 
47
- 5:53:36 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
47
+ 7:05:22 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
48
48
 
49
- 5:53:36 PM - Building project '/home/runner/work/captcha/captcha/packages/types-env/tsconfig.json'...
49
+ 7:05:22 AM - Building project '/home/runner/work/captcha/captcha/packages/types-env/tsconfig.json'...
50
50
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/types-env@2.10.22 build
2
+ > @prosopo/types-env@2.10.23 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/types-env@2.10.22 build:cross-env
6
+ > @prosopo/types-env@2.10.23 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -52,4 +52,4 @@ dist/provider.js 0.01 kB │ gzip: 0.03 kB
52
52
  dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
53
53
  dist/index.js 0.05 kB │ gzip: 0.07 kB
54
54
 
55
- ✓ built in 58ms
55
+ ✓ built in 72ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @prosopo/types-env
2
2
 
3
+ ## 2.10.23
4
+ ### Patch Changes
5
+
6
+ - 4c8114d: Add type tests for the environment interfaces, and a unit test asserting the
7
+ package stays free of runtime exports. No behaviour changes: the package declares
8
+ types only.
9
+ - Updated dependencies [16dbab0]
10
+ - Updated dependencies [063e69d]
11
+ - @prosopo/types@5.0.3
12
+ - @prosopo/types-database@5.0.3
13
+ - @prosopo/keyring@2.9.66
14
+ - @prosopo/logger@2.0.6
15
+
3
16
  ## 2.10.22
4
17
  ### Patch Changes
5
18
 
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.unit.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.unit.test.d.ts","sourceRoot":"","sources":["../../src/tests/index.unit.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { describe, expect, test } from "vitest";
2
+ describe("the package entrypoint", () => {
3
+ test("has no runtime exports at all", async () => {
4
+ const module = await import("../index.js");
5
+ expect(Object.keys(module).filter((key) => key !== "default")).toEqual([]);
6
+ });
7
+ test("importing it runs no side effects and does not throw", async () => {
8
+ await expect(import("../index.js")).resolves.toBeDefined();
9
+ });
10
+ });
11
+ //# sourceMappingURL=index.unit.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.unit.test.js","sourceRoot":"","sources":["../../src/tests/index.unit.test.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEhD,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACvC,IAAI,CAAC,+BAA+B,EAAE,KAAK,IAAI,EAAE;QAKhD,MAAM,MAAM,GAA4B,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;QACpE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,sDAAsD,EAAE,KAAK,IAAI,EAAE;QAGvE,MAAM,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;IAC5D,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=typesEnv.test-d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typesEnv.test-d.d.ts","sourceRoot":"","sources":["../../src/tests/typesEnv.test-d.ts"],"names":[],"mappings":""}
@@ -0,0 +1,126 @@
1
+ import { assertType, describe, expectTypeOf, test } from "vitest";
2
+ const stub = () => undefined;
3
+ const members = () => ({
4
+ config: stub(),
5
+ db: stub(),
6
+ defaultEnvironment: stub(),
7
+ logger: stub(),
8
+ assetsResolver: stub(),
9
+ keyring: stub(),
10
+ pair: stub(),
11
+ authAccount: stub(),
12
+ ipInfoService: stub(),
13
+ getDb: () => stub(),
14
+ isReady: async () => undefined,
15
+ importDatabase: async () => undefined,
16
+ });
17
+ const environment = (overrides = {}) => ({
18
+ config: stub(),
19
+ db: stub(),
20
+ defaultEnvironment: stub(),
21
+ logger: stub(),
22
+ assetsResolver: stub(),
23
+ keyring: stub(),
24
+ pair: stub(),
25
+ authAccount: stub(),
26
+ ipInfoService: stub(),
27
+ getDb: () => stub(),
28
+ isReady: async () => undefined,
29
+ importDatabase: async () => undefined,
30
+ ...overrides,
31
+ });
32
+ describe("ProsopoEnvironment", () => {
33
+ test("is satisfied by an object carrying every member", () => {
34
+ assertType(environment());
35
+ });
36
+ test("the optional-valued members must still be present as keys", () => {
37
+ const withoutDb = environment();
38
+ assertType(withoutDb);
39
+ const withoutPair = environment();
40
+ assertType(withoutPair);
41
+ });
42
+ test("undefined is an accepted value for the members that allow it", () => {
43
+ assertType({
44
+ ...members(),
45
+ db: undefined,
46
+ pair: undefined,
47
+ authAccount: undefined,
48
+ assetsResolver: undefined,
49
+ });
50
+ });
51
+ test("the members that must always be there reject undefined", () => {
52
+ assertType({ ...members(), logger: undefined });
53
+ assertType({ ...members(), keyring: undefined });
54
+ assertType({ ...members(), ipInfoService: undefined });
55
+ assertType({ ...members(), config: undefined });
56
+ assertType({ ...members(), getDb: undefined });
57
+ });
58
+ test("getDb narrows away the undefined that reading db directly leaves", () => {
59
+ expectTypeOf().toEqualTypeOf();
60
+ expectTypeOf().returns.toEqualTypeOf();
61
+ expectTypeOf().parameters.toEqualTypeOf();
62
+ });
63
+ test("the lifecycle methods are asynchronous and answer nothing", () => {
64
+ expectTypeOf().toEqualTypeOf();
65
+ expectTypeOf().toEqualTypeOf();
66
+ });
67
+ test("has exactly the members it declares", () => {
68
+ expectTypeOf().toEqualTypeOf();
69
+ });
70
+ });
71
+ describe("ProviderEnvironment", () => {
72
+ test("is a ProsopoEnvironment, so it can be passed anywhere one is wanted", () => {
73
+ assertType(stub());
74
+ });
75
+ test("narrows the config to the full provider config", () => {
76
+ expectTypeOf().toEqualTypeOf();
77
+ expectTypeOf().toExtend();
78
+ });
79
+ test("a basic config is not enough to build one", () => {
80
+ const basic = stub();
81
+ assertType(basic);
82
+ });
83
+ test("the dataset id is optional, because it is only known after import", () => {
84
+ expectTypeOf().toEqualTypeOf();
85
+ const noDataset = stub();
86
+ assertType(noDataset);
87
+ });
88
+ test("adds nothing else to the environment", () => {
89
+ expectTypeOf().toEqualTypeOf();
90
+ });
91
+ });
92
+ describe("IIpInfoService", () => {
93
+ test("is satisfied by a plain implementation", () => {
94
+ assertType({
95
+ initialize: async () => undefined,
96
+ lookup: async (_ip) => stub(),
97
+ isAvailable: () => true,
98
+ });
99
+ });
100
+ test("availability is answered synchronously", () => {
101
+ expectTypeOf().toEqualTypeOf();
102
+ });
103
+ test("a lookup takes an ip as a string and resolves to a response", () => {
104
+ expectTypeOf()
105
+ .parameter(0)
106
+ .toEqualTypeOf();
107
+ expectTypeOf().returns.toEqualTypeOf();
108
+ });
109
+ test("a lookup reports failure by rejecting, not by resolving to null", () => {
110
+ expectTypeOf().not.toBeNullable();
111
+ });
112
+ test("initialize is asynchronous, so a service may load a database", () => {
113
+ expectTypeOf().toEqualTypeOf();
114
+ });
115
+ test("has exactly the three members an implementation must provide", () => {
116
+ expectTypeOf().toEqualTypeOf();
117
+ });
118
+ });
119
+ describe("the package entrypoint", () => {
120
+ test("re-exports every type the package declares", () => {
121
+ expectTypeOf().not.toBeNever();
122
+ expectTypeOf().not.toBeNever();
123
+ expectTypeOf().not.toBeNever();
124
+ });
125
+ });
126
+ //# sourceMappingURL=typesEnv.test-d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typesEnv.test-d.js","sourceRoot":"","sources":["../../src/tests/typesEnv.test-d.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAWlE,MAAM,IAAI,GAAG,GAAS,EAAE,CAAC,SAAc,CAAC;AAQxC,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,CAAC;IACtB,MAAM,EAAE,IAAI,EAA4B;IACxC,EAAE,EAAE,IAAI,EAAiC;IACzC,kBAAkB,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G,EAAE;QAGnD,YAAY,EAAiC,CAAC,aAAa,EAExD,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,6DAA6D,EAAE,GAAG,EAAE;QACxE,YAAY,EAA4B;aACtC,SAAS,CAAC,CAAC,CAAC;aACZ,aAAa,EAAU,CAAC;QAC1B,YAAY,EAA4B,CAAC,OAAO,CAAC,aAAa,EAE3D,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,iEAAiE,EAAE,GAAG,EAAE;QAG5E,YAAY,EAET,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACzE,YAAY,EAAgC,CAAC,aAAa,EAEvD,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACzE,YAAY,EAAwB,CAAC,aAAa,EAE/C,CAAC;IACL,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACvC,IAAI,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACvD,YAAY,EAAsB,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QACnD,YAAY,EAAuB,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QACpD,YAAY,EAAkB,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;IAChD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/types-env",
3
- "version": "2.10.22",
3
+ "version": "2.10.23",
4
4
  "description": "Types for prosopo environment",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,7 +22,10 @@
22
22
  "build:cross-env": "vite build --config vite.esm.config.ts",
23
23
  "build:tsc": "tsc --build --verbose",
24
24
  "build:cjs": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV",
25
- "typecheck": "tsc --project tsconfig.types.json"
25
+ "typecheck": "tsc --project tsconfig.types.json",
26
+ "test": "NODE_ENV=${NODE_ENV:-test}; npx vitest run --config ./vite.test.config.ts",
27
+ "test:watch": "NODE_ENV=${NODE_ENV:-test}; npx vitest --config ./vite.test.config.ts",
28
+ "test:coverage": "NODE_ENV=${NODE_ENV:-test}; npx vitest run --coverage --config ./vite.test.config.ts"
26
29
  },
27
30
  "repository": {
28
31
  "type": "git",
@@ -36,10 +39,10 @@
36
39
  },
37
40
  "homepage": "https://github.com/prosopo/captcha#readme",
38
41
  "dependencies": {
39
- "@prosopo/logger": "2.0.5",
40
- "@prosopo/keyring": "2.9.65",
41
- "@prosopo/types": "5.0.2",
42
- "@prosopo/types-database": "5.0.2"
42
+ "@prosopo/logger": "2.0.6",
43
+ "@prosopo/keyring": "2.9.66",
44
+ "@prosopo/types": "5.0.3",
45
+ "@prosopo/types-database": "5.0.3"
43
46
  },
44
47
  "devDependencies": {
45
48
  "@prosopo/config": "3.3.7",
@@ -0,0 +1,20 @@
1
+ // Copyright 2021-2026 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
+ import { ViteTestConfig } from "@prosopo/config";
15
+
16
+ process.env.NODE_ENV = "test";
17
+
18
+ // This package declares types only, so the tests need no environment file: an
19
+ // .env would only add a way for the suite to fail on a machine that lacks one.
20
+ export default ViteTestConfig();