@shipstatic/types 1.1.0 → 2.0.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/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/src/index.ts +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -405,7 +405,7 @@ export declare class ShipError extends Error {
|
|
|
405
405
|
*
|
|
406
406
|
* **Telemetry pattern — `details: { internal: '<tag>' }`.** When the
|
|
407
407
|
* server creates an auth error with an `internal` key in `details`
|
|
408
|
-
* (e.g. `{ internal: '
|
|
408
|
+
* (e.g. `{ internal: 'session_invalid' }`), `toResponse()` strips the
|
|
409
409
|
* entire `details` object before serialization. This keeps the wire
|
|
410
410
|
* response a clean "Authentication failed" while preserving granular
|
|
411
411
|
* server-side telemetry (which strategy/check failed) for logs and tests.
|
|
@@ -552,7 +552,7 @@ export declare const DEPLOY_TOKEN: {
|
|
|
552
552
|
readonly TOTAL_LENGTH: 70;
|
|
553
553
|
};
|
|
554
554
|
export declare const AuthMethod: {
|
|
555
|
-
readonly
|
|
555
|
+
readonly SESSION: "session";
|
|
556
556
|
readonly API_KEY: "apiKey";
|
|
557
557
|
readonly TOKEN: "token";
|
|
558
558
|
readonly WEBHOOK: "webhook";
|
package/dist/index.js
CHANGED
|
@@ -130,7 +130,7 @@ export class ShipError extends Error {
|
|
|
130
130
|
toResponse() {
|
|
131
131
|
// Strip authentication details when they carry an `internal` telemetry
|
|
132
132
|
// tag (see `ShipError.authentication` JSDoc) — these are server-side
|
|
133
|
-
// diagnostics like '
|
|
133
|
+
// diagnostics like 'session_invalid' that must not leak to clients.
|
|
134
134
|
const authDetails = this.details;
|
|
135
135
|
const details = this.type === ErrorType.Authentication && authDetails?.internal
|
|
136
136
|
? undefined
|
|
@@ -255,7 +255,7 @@ export class ShipError extends Error {
|
|
|
255
255
|
*
|
|
256
256
|
* **Telemetry pattern — `details: { internal: '<tag>' }`.** When the
|
|
257
257
|
* server creates an auth error with an `internal` key in `details`
|
|
258
|
-
* (e.g. `{ internal: '
|
|
258
|
+
* (e.g. `{ internal: 'session_invalid' }`), `toResponse()` strips the
|
|
259
259
|
* entire `details` object before serialization. This keeps the wire
|
|
260
260
|
* response a clean "Authentication failed" while preserving granular
|
|
261
261
|
* server-side telemetry (which strategy/check failed) for logs and tests.
|
|
@@ -445,7 +445,7 @@ export const DEPLOY_TOKEN = {
|
|
|
445
445
|
};
|
|
446
446
|
// Authentication Method Constants
|
|
447
447
|
export const AuthMethod = {
|
|
448
|
-
|
|
448
|
+
SESSION: 'session',
|
|
449
449
|
API_KEY: 'apiKey',
|
|
450
450
|
TOKEN: 'token',
|
|
451
451
|
WEBHOOK: 'webhook',
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -445,7 +445,7 @@ export class ShipError extends Error {
|
|
|
445
445
|
toResponse(): ErrorResponse {
|
|
446
446
|
// Strip authentication details when they carry an `internal` telemetry
|
|
447
447
|
// tag (see `ShipError.authentication` JSDoc) — these are server-side
|
|
448
|
-
// diagnostics like '
|
|
448
|
+
// diagnostics like 'session_invalid' that must not leak to clients.
|
|
449
449
|
const authDetails = this.details as { internal?: unknown } | undefined;
|
|
450
450
|
const details = this.type === ErrorType.Authentication && authDetails?.internal
|
|
451
451
|
? undefined
|
|
@@ -585,7 +585,7 @@ export class ShipError extends Error {
|
|
|
585
585
|
*
|
|
586
586
|
* **Telemetry pattern — `details: { internal: '<tag>' }`.** When the
|
|
587
587
|
* server creates an auth error with an `internal` key in `details`
|
|
588
|
-
* (e.g. `{ internal: '
|
|
588
|
+
* (e.g. `{ internal: 'session_invalid' }`), `toResponse()` strips the
|
|
589
589
|
* entire `details` object before serialization. This keeps the wire
|
|
590
590
|
* response a clean "Authentication failed" while preserving granular
|
|
591
591
|
* server-side telemetry (which strategy/check failed) for logs and tests.
|
|
@@ -837,7 +837,7 @@ export const DEPLOY_TOKEN = {
|
|
|
837
837
|
|
|
838
838
|
// Authentication Method Constants
|
|
839
839
|
export const AuthMethod = {
|
|
840
|
-
|
|
840
|
+
SESSION: 'session',
|
|
841
841
|
API_KEY: 'apiKey',
|
|
842
842
|
TOKEN: 'token',
|
|
843
843
|
WEBHOOK: 'webhook',
|