@verdaccio/types 12.0.0-next.0 → 12.0.0-next.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,17 @@
1
1
  # Change Log
2
2
 
3
+ ## 12.0.0-next.2
4
+
5
+ ### Minor Changes
6
+
7
+ - f047cc8: refactor: auth with legacy sign support
8
+
9
+ ## 12.0.0-next.1
10
+
11
+ ### Major Changes
12
+
13
+ - e7ebccb61: update major dependencies, remove old nodejs support
14
+
3
15
  ## 12.0.0-next.0
4
16
 
5
17
  ### Major Changes
@@ -205,12 +217,12 @@
205
217
  - 8f43bf17d: feat: node api new structure based on promise
206
218
 
207
219
  ```js
208
- import { runServer } from '@verdaccio/node-api';
220
+ import { runServer } from "@verdaccio/node-api";
209
221
  // or
210
- import { runServer } from 'verdaccio';
222
+ import { runServer } from "verdaccio";
211
223
 
212
224
  const app = await runServer(); // default configuration
213
- const app = await runServer('./config/config.yaml');
225
+ const app = await runServer("./config/config.yaml");
214
226
  const app = await runServer({ configuration });
215
227
  app.listen(4000, (event) => {
216
228
  // do something
@@ -802,14 +814,14 @@
802
814
  - 5c5057fc: feat: node api new structure based on promise
803
815
 
804
816
  ```js
805
- import { runServer } from '@verdaccio/node-api';
817
+ import { runServer } from "@verdaccio/node-api";
806
818
  // or
807
- import { runServer } from 'verdaccio';
819
+ import { runServer } from "verdaccio";
808
820
 
809
821
  const app = await runServer(); // default configuration
810
- const app = await runServer('./config/config.yaml');
822
+ const app = await runServer("./config/config.yaml");
811
823
  const app = await runServer({ configuration });
812
- app.listen(4000, event => {
824
+ app.listen(4000, (event) => {
813
825
  // do something
814
826
  });
815
827
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/types",
3
- "version": "12.0.0-next.0",
3
+ "version": "12.0.0-next.2",
4
4
  "description": "verdaccio types definitions",
5
5
  "keywords": [
6
6
  "private",
@@ -17,7 +17,7 @@
17
17
  "license": "MIT",
18
18
  "homepage": "https://verdaccio.org",
19
19
  "engines": {
20
- "node": ">=12"
20
+ "node": ">=18"
21
21
  },
22
22
  "repository": {
23
23
  "type": "https",
@@ -98,6 +98,7 @@ export type CommonWebConf = {
98
98
  showFooter?: boolean;
99
99
  showThemeSwitch?: boolean;
100
100
  showDownloadTarball?: boolean;
101
+ hideDeprecatedVersions?: boolean;
101
102
  primaryColor: string;
102
103
  showRaw?: boolean;
103
104
  };
@@ -150,18 +151,29 @@ export interface JWTOptions {
150
151
  verify: JWTVerifyOptions;
151
152
  }
152
153
 
154
+ export type Algorithm =
155
+ | 'HS256'
156
+ | 'HS384'
157
+ | 'HS512'
158
+ | 'RS256'
159
+ | 'RS384'
160
+ | 'RS512'
161
+ | 'ES256'
162
+ | 'ES384'
163
+ | 'ES512'
164
+ | 'PS256'
165
+ | 'PS384'
166
+ | 'PS512'
167
+ | 'none';
168
+
153
169
  export interface JWTSignOptions {
154
- algorithm?: string;
155
- expiresIn?: string;
156
- notBefore?: string;
157
- ignoreExpiration?: boolean;
158
- maxAge?: string | number;
159
- clockTimestamp?: number;
170
+ algorithm?: Algorithm | undefined;
171
+ expiresIn?: string | number | undefined;
172
+ notBefore?: string | number | undefined;
160
173
  }
161
174
 
162
175
  export interface JWTVerifyOptions {
163
- algorithm?: string;
164
- expiresIn?: string;
176
+ algorithm?: Algorithm | undefined;
165
177
  notBefore?: string | number;
166
178
  ignoreExpiration?: boolean;
167
179
  maxAge?: string | number;
@@ -284,7 +296,7 @@ export interface Config extends Omit<ConfigYaml, 'packages' | 'security' | 'conf
284
296
  // security object defaults is added by the config file but optional in the yaml file
285
297
  security: Security;
286
298
  // @deprecated (pending adding the replacement)
287
- checkSecretKey(token: string): string;
299
+ checkSecretKey(token: string | void): string;
288
300
  getMatchedPackagesSpec(storage: string): PackageAccess | void;
289
301
  // TODO: verify how to handle this in the future
290
302
  [key: string]: any;
package/src/manifest.ts CHANGED
@@ -3,7 +3,7 @@ export interface PackageAccess {
3
3
  publish?: string[];
4
4
  proxy?: string[];
5
5
  access?: string[];
6
- unpublish: string[];
6
+ unpublish?: string[];
7
7
  }
8
8
 
9
9
  export interface PackageList {