@nostrify/policies 0.36.27 → 0.36.29

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
- > @nostrify/policies@0.36.27 build /home/alex/Projects/nostrify/packages/policies
2
+ > @nostrify/policies@0.36.29 build /home/alex/Projects/nostrify/packages/policies
3
3
  > npx tsc -p tsconfig.json && node ../../esbuild.config.js --package ./
4
4
 
5
5
  npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm.
@@ -28,5 +28,5 @@ Building with esbuild...
28
28
  dist/ReadOnlyPolicy.js 187b
29
29
  ...and 1 more output file...
30
30
 
31
- ⚡ Done in 26ms
31
+ ⚡ Done in 23ms
32
32
  Done!
@@ -1,18 +1,30 @@
1
1
 
2
- > @nostrify/policies@0.36.23 test /home/alex/Projects/nostrify/packages/policies
2
+ > @nostrify/policies@0.36.27 test /home/alex/Projects/nostrify/packages/policies
3
3
  > node --test --test-concurrency=1 "**/*.test.ts"
4
4
 
5
- ✔ AntiDuplicationPolicy (73.600597ms)
6
- ✔ AntiDuplicationPolicy with deobfuscate (15.198854ms)
7
- AnyPolicy.test.ts (8.002077ms)
8
- AuthorPolicy.test.ts
9
- DomainPolicy.test.ts
10
- FiltersPolicy.test.ts
11
- HashtagPolicy.test.ts
12
- HellthreadPolicy.test.ts
13
- InvertPolicy.test.ts
14
- KeywordPolicy.test.ts
15
- NoOpPolicy.test.ts
5
+ ✔ AntiDuplicationPolicy (407.966148ms)
6
+ ✔ AntiDuplicationPolicy with deobfuscate (120.147029ms)
7
+ accepts when all policies accept (71.23073ms)
8
+ accepts when some policies reject (8.350419ms)
9
+ rejects when all policies reject (8.140654ms)
10
+ AuthorPolicy (67.385544ms)
11
+ DomainPolicy allows events from authors with a valid nip05 (78.568459ms)
12
+ DomainPolicy rejects events from authors without a kind 0 (9.029601ms)
13
+ DomainPolicy rejects events from authors with a missing nip05 (19.632541ms)
14
+ DomainPolicy rejects events from authors with a malformed nip05 (13.687462ms)
15
+ DomainPolicy rejects events from authors with an invalid nip05 (15.719357ms)
16
+ ✔ DomainPolicy rejects events from authors with a blacklisted nip05 domain (11.845996ms)
17
+ ✔ DomainPolicy rejects events from authors who aren't on a whitelisted domain (14.213575ms)
18
+ ✔ DomainPolicy allows events from authors who are on a whitelisted domain (12.526111ms)
19
+ ✔ DomainPolicy rejects events from authors with a subdomain of a blacklisted domain (13.981537ms)
20
+ ✔ DomainPolicy rejects events from authors with a deeply nested subdomain of a blacklisted domain (14.409494ms)
21
+ ✔ DomainPolicy allows events from authors with similar but not subdomain of blacklisted domain (14.891885ms)
22
+ ✔ FiltersPolicy (49.842736ms)
23
+ ✔ HashtagPolicy (63.603386ms)
24
+ ✔ HellthreadPolicy (64.53257ms)
25
+ ✔ InvertPolicy (62.370249ms)
26
+ ✔ KeywordPolicy (70.194696ms)
27
+ ✖ NoOpPolicy.test.ts (8.362592ms)
16
28
  ✖ OpenAIPolicy.test.ts
17
29
  ✖ PipePolicy.test.ts
18
30
  ✖ PowPolicy.test.ts
@@ -23,51 +35,19 @@
23
35
  ✖ SizePolicy.test.ts
24
36
  ✖ WhitelistPolicy.test.ts
25
37
  ✖ WoTPolicy.test.ts
26
- ℹ tests 21
38
+ ℹ tests 33
27
39
  ℹ suites 0
28
- ℹ pass 2
40
+ ℹ pass 22
29
41
  ℹ fail 0
30
- ℹ cancelled 19
42
+ ℹ cancelled 11
31
43
  ℹ skipped 0
32
44
  ℹ todo 0
33
- ℹ duration_ms 403.555054
45
+ ℹ duration_ms 4463.302097
34
46
 
35
47
  ✖ failing tests:
36
48
 
37
- test at AnyPolicy.test.ts:1:1
38
- ✖ AnyPolicy.test.ts (8.002077ms)
39
- 'Promise resolution is still pending but the event loop has already resolved'
40
-
41
- test at AuthorPolicy.test.ts:1:1
42
- ✖ AuthorPolicy.test.ts
43
- 'Promise resolution is still pending but the event loop has already resolved'
44
-
45
- test at DomainPolicy.test.ts:1:1
46
- ✖ DomainPolicy.test.ts
47
- 'Promise resolution is still pending but the event loop has already resolved'
48
-
49
- test at FiltersPolicy.test.ts:1:1
50
- ✖ FiltersPolicy.test.ts
51
- 'Promise resolution is still pending but the event loop has already resolved'
52
-
53
- test at HashtagPolicy.test.ts:1:1
54
- ✖ HashtagPolicy.test.ts
55
- 'Promise resolution is still pending but the event loop has already resolved'
56
-
57
- test at HellthreadPolicy.test.ts:1:1
58
- ✖ HellthreadPolicy.test.ts
59
- 'Promise resolution is still pending but the event loop has already resolved'
60
-
61
- test at InvertPolicy.test.ts:1:1
62
- ✖ InvertPolicy.test.ts
63
- 'Promise resolution is still pending but the event loop has already resolved'
64
-
65
- test at KeywordPolicy.test.ts:1:1
66
- ✖ KeywordPolicy.test.ts
67
- 'Promise resolution is still pending but the event loop has already resolved'
68
-
69
49
  test at NoOpPolicy.test.ts:1:1
70
- ✖ NoOpPolicy.test.ts
50
+ ✖ NoOpPolicy.test.ts (8.362592ms)
71
51
  'Promise resolution is still pending but the event loop has already resolved'
72
52
 
73
53
  test at OpenAIPolicy.test.ts:1:1
@@ -1,5 +1,5 @@
1
1
 
2
- > @nostrify/policies@0.36.27 typecheck /home/alex/Projects/nostrify/packages/policies
2
+ > @nostrify/policies@0.36.29 typecheck /home/alex/Projects/nostrify/packages/policies
3
3
  > npx tsc --noEmit
4
4
 
5
5
  npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.36.29
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @nostrify/nostrify@0.52.2
9
+
10
+ ## 0.36.28
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [e55aa19]
15
+ - @nostrify/nostrify@0.52.1
16
+
3
17
  ## 0.36.27
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nostrify/policies",
3
- "version": "0.36.27",
3
+ "version": "0.36.29",
4
4
  "exports": {
5
5
  ".": "./dist/mod.js"
6
6
  },
@@ -10,8 +10,8 @@
10
10
  "@deno/kv": "^0.10.0",
11
11
  "@types/node": "^24.1.0",
12
12
  "nostr-tools": "^2.13.0",
13
- "@nostrify/types": "0.37.0",
14
- "@nostrify/nostrify": "0.52.0"
13
+ "@nostrify/nostrify": "0.52.2",
14
+ "@nostrify/types": "0.37.0"
15
15
  },
16
16
  "publishConfig": {
17
17
  "access": "public"