@zimic/interceptor 0.17.0-canary.4 → 0.17.0-canary.5

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
@@ -14,7 +14,7 @@
14
14
  "api",
15
15
  "static"
16
16
  ],
17
- "version": "0.17.0-canary.4",
17
+ "version": "0.17.0-canary.5",
18
18
  "repository": {
19
19
  "type": "git",
20
20
  "url": "https://github.com/zimicjs/zimic.git",
@@ -101,8 +101,8 @@
101
101
  "vitest": "^3.1.1",
102
102
  "@zimic/eslint-config-node": "0.0.0",
103
103
  "@zimic/lint-staged-config": "0.0.0",
104
- "@zimic/utils": "0.0.0",
105
- "@zimic/tsconfig": "0.0.0"
104
+ "@zimic/tsconfig": "0.0.0",
105
+ "@zimic/utils": "0.0.0"
106
106
  },
107
107
  "peerDependencies": {
108
108
  "@zimic/http": "^0.3.0 || ^0.3.0-canary.0",
package/src/cli/cli.ts CHANGED
@@ -150,7 +150,8 @@ async function runCLI() {
150
150
 
151
151
  .command(
152
152
  ['rm <tokenId>', 'remove <tokenId>'],
153
- 'Remove an interceptor token.',
153
+ 'Remove (invalidate) an interceptor token. Existing connections will not be affected, so restarting the ' +
154
+ 'server is recommended to disconnect all interceptors.',
154
155
  (yargs) =>
155
156
  yargs
156
157
  .positional('tokenId', {
@@ -71,7 +71,7 @@ async function startInterceptorServer({
71
71
  [
72
72
  `Attention: this interceptor server is ${color.bold(color.red('unprotected'))}. Do not expose it publicly without authentication.`,
73
73
  '',
74
- 'Learn more: https://github.com/zimicjs/zimic/wiki/cli‐zimic‐interceptor‐server#authentication',
74
+ 'Learn more: https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#authentication',
75
75
  ].join('\n'),
76
76
  );
77
77
  }
@@ -22,12 +22,12 @@ export async function createInterceptorServerToken({
22
22
  '',
23
23
  'Store this token securely. It cannot be retrieved later.',
24
24
  '',
25
- `To enable authentication in your interceptor server, use the ${color.cyan('--tokens-dir')} option as shown ` +
26
- 'below. Only remote interceptors bearing a valid token will be allowed to connect.',
25
+ `To enable authentication in your interceptor server, use the ${color.cyan('--tokens-dir')} option. Only ` +
26
+ 'remote interceptors bearing a valid token will be allowed to connect.',
27
27
  '',
28
28
  `${color.dim('$')} zimic-interceptor server start ${color.cyan('--tokens-dir')} ${color.magenta(tokensDirectory)}`,
29
29
  '',
30
- 'Learn more: https://github.com/zimicjs/zimic/wiki/cli‐zimic‐interceptor‐server#authentication',
30
+ 'Learn more: https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#authentication',
31
31
  ].join('\n'),
32
32
  );
33
33
  }
@@ -164,13 +164,13 @@ export interface RemoteHttpInterceptorOptions extends SharedHttpInterceptorOptio
164
164
  * Options to authenticate the interceptor when connecting to an interceptor server. This is required if the
165
165
  * interceptor server was started with the `--tokens-dir` option.
166
166
  *
167
- * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐interceptor‐server#authentication Interceptor server authentication}
167
+ * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#authentication Interceptor server authentication}
168
168
  */
169
169
  auth?: {
170
170
  /**
171
171
  * The authentication token to use.
172
172
  *
173
- * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐interceptor‐server#authentication Interceptor server authentication}
173
+ * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#authentication Interceptor server authentication}
174
174
  */
175
175
  token: string;
176
176
  };
@@ -371,7 +371,7 @@ export interface RemoteHttpInterceptor<Schema extends HttpSchema> extends HttpIn
371
371
  * Options to authenticate the interceptor when connecting to an interceptor server. This is required if the
372
372
  * interceptor server was started with the `--tokens-dir` option.
373
373
  *
374
- * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐interceptor‐server#authentication Interceptor server authentication}
374
+ * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#authentication Interceptor server authentication}
375
375
  */
376
376
  auth?: RemoteHttpInterceptorOptions['auth'];
377
377
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Error thrown when an interceptor token is invalid.
3
3
  *
4
- * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐interceptor‐server#authentication Interceptor server authentication}
4
+ * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#authentication Interceptor server authentication}
5
5
  */
6
6
  class InvalidInterceptorTokenError extends Error {
7
7
  constructor(tokenId: string) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Error thrown when an interceptor token file is invalid.
3
3
  *
4
- * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐interceptor‐server#authentication Interceptor server authentication}
4
+ * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#authentication Interceptor server authentication}
5
5
  */
6
6
  class InvalidInterceptorTokenFileError extends Error {
7
7
  constructor(tokenFilePath: string, validationErrorMessage: string) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Error thrown when an interceptor token value is invalid.
3
3
  *
4
- * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐interceptor‐server#authentication Interceptor server authentication}
4
+ * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#authentication Interceptor server authentication}
5
5
  */
6
6
  class InvalidInterceptorTokenValueError extends Error {
7
7
  constructor(tokenValue: string) {