@moonbase.sh/licensing 3.2.3 → 3.4.0

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/package.json CHANGED
@@ -1,18 +1,33 @@
1
1
  {
2
2
  "name": "@moonbase.sh/licensing",
3
3
  "type": "module",
4
- "version": "3.2.3",
4
+ "version": "3.4.0",
5
5
  "description": "Package to add sotftware licensing using Moonbase.sh to your node.js apps",
6
6
  "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
7
7
  "license": "MIT",
8
8
  "sideEffects": false,
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/index.d.cts",
17
+ "default": "./dist/index.cjs"
18
+ }
19
+ },
20
+ "./package.json": "./package.json",
21
+ "./*": "./*"
22
+ },
9
23
  "main": "./dist/index.js",
10
24
  "module": "./dist/index.js",
11
25
  "types": "./dist/index.d.ts",
12
26
  "files": [
13
27
  "FINGERPRINT_SPEC.md",
14
28
  "dist/**",
15
- "fingerprint-vectors.json"
29
+ "fingerprint-vectors.json",
30
+ "release-access-vectors.json"
16
31
  ],
17
32
  "dependencies": {
18
33
  "cross-fetch": "^3.1.5",
@@ -0,0 +1,150 @@
1
+ {
2
+ "$comment": "Conformance suite for which app versions a license's release access covers, read from the license token's l:rel:until (seconds since epoch), l:rel:major and l:rel:upto claims. The Moonbase backend and every SDK must agree on every case. A token with none of the claims covers every version. A version that can't be read is not checked, so it counts as covered. Reading a version: an optional leading v, two to four numbers (missing ones are 0, a fourth is ignored), and any -pre-release or +build suffix dropped.",
3
+ "version": 1,
4
+ "cases": [
5
+ {
6
+ "description": "no release access claims cover every version",
7
+ "updatesUntil": null,
8
+ "upToMajor": null,
9
+ "upToVersion": null,
10
+ "now": "2027-01-01T00:00:00Z",
11
+ "version": "99.0.0",
12
+ "covered": true
13
+ },
14
+ {
15
+ "description": "a version within the covered major",
16
+ "updatesUntil": null,
17
+ "upToMajor": 2,
18
+ "upToVersion": null,
19
+ "now": "2027-01-01T00:00:00Z",
20
+ "version": "2.9.9",
21
+ "covered": true
22
+ },
23
+ {
24
+ "description": "an older major",
25
+ "updatesUntil": null,
26
+ "upToMajor": 2,
27
+ "upToVersion": null,
28
+ "now": "2027-01-01T00:00:00Z",
29
+ "version": "1.0.0",
30
+ "covered": true
31
+ },
32
+ {
33
+ "description": "the next major is an upgrade",
34
+ "updatesUntil": null,
35
+ "upToMajor": 2,
36
+ "upToVersion": null,
37
+ "now": "2027-01-01T00:00:00Z",
38
+ "version": "3.0.0",
39
+ "covered": false
40
+ },
41
+ {
42
+ "description": "a pre-release of the next major is judged as that major",
43
+ "updatesUntil": null,
44
+ "upToMajor": 2,
45
+ "upToVersion": null,
46
+ "now": "2027-01-01T00:00:00Z",
47
+ "version": "v3.0.0-beta.2",
48
+ "covered": false
49
+ },
50
+ {
51
+ "description": "a four-part assembly version is judged by its first three",
52
+ "updatesUntil": null,
53
+ "upToMajor": 2,
54
+ "upToVersion": null,
55
+ "now": "2027-01-01T00:00:00Z",
56
+ "version": "2.4.1.0",
57
+ "covered": true
58
+ },
59
+ {
60
+ "description": "a two-part version",
61
+ "updatesUntil": null,
62
+ "upToMajor": 2,
63
+ "upToVersion": null,
64
+ "now": "2027-01-01T00:00:00Z",
65
+ "version": "3.1",
66
+ "covered": false
67
+ },
68
+ {
69
+ "description": "a version that can't be read is not checked",
70
+ "updatesUntil": null,
71
+ "upToMajor": 2,
72
+ "upToVersion": null,
73
+ "now": "2027-01-01T00:00:00Z",
74
+ "version": "nightly",
75
+ "covered": true
76
+ },
77
+ {
78
+ "description": "while updates last, every version is covered",
79
+ "updatesUntil": "2027-06-01T00:00:00Z",
80
+ "upToMajor": null,
81
+ "upToVersion": null,
82
+ "now": "2027-01-01T00:00:00Z",
83
+ "version": "9.0.0",
84
+ "covered": true
85
+ },
86
+ {
87
+ "description": "after updates ended, the last version published before is covered",
88
+ "updatesUntil": "2026-06-01T00:00:00Z",
89
+ "upToMajor": null,
90
+ "upToVersion": "2.3.0",
91
+ "now": "2027-01-01T00:00:00Z",
92
+ "version": "2.3.0",
93
+ "covered": true
94
+ },
95
+ {
96
+ "description": "after updates ended, an older version is covered",
97
+ "updatesUntil": "2026-06-01T00:00:00Z",
98
+ "upToMajor": null,
99
+ "upToVersion": "2.3.0",
100
+ "now": "2027-01-01T00:00:00Z",
101
+ "version": "2.2.9",
102
+ "covered": true
103
+ },
104
+ {
105
+ "description": "after updates ended, a newer version is not",
106
+ "updatesUntil": "2026-06-01T00:00:00Z",
107
+ "upToMajor": null,
108
+ "upToVersion": "2.3.0",
109
+ "now": "2027-01-01T00:00:00Z",
110
+ "version": "2.3.1",
111
+ "covered": false
112
+ },
113
+ {
114
+ "description": "after updates ended with nothing published before, every version is covered",
115
+ "updatesUntil": "2026-06-01T00:00:00Z",
116
+ "upToMajor": null,
117
+ "upToVersion": null,
118
+ "now": "2027-01-01T00:00:00Z",
119
+ "version": "5.0.0",
120
+ "covered": true
121
+ },
122
+ {
123
+ "description": "the instant updates end still counts as within them",
124
+ "updatesUntil": "2027-01-01T00:00:00Z",
125
+ "upToMajor": null,
126
+ "upToVersion": "1.0.0",
127
+ "now": "2027-01-01T00:00:00Z",
128
+ "version": "4.0.0",
129
+ "covered": true
130
+ },
131
+ {
132
+ "description": "both limits cover what either covers: the major",
133
+ "updatesUntil": "2026-06-01T00:00:00Z",
134
+ "upToMajor": 3,
135
+ "upToVersion": "2.3.0",
136
+ "now": "2027-01-01T00:00:00Z",
137
+ "version": "3.4.0",
138
+ "covered": true
139
+ },
140
+ {
141
+ "description": "both limits cover what either covers: neither",
142
+ "updatesUntil": "2026-06-01T00:00:00Z",
143
+ "upToMajor": 3,
144
+ "upToVersion": "2.3.0",
145
+ "now": "2027-01-01T00:00:00Z",
146
+ "version": "4.0.0",
147
+ "covered": false
148
+ }
149
+ ]
150
+ }