@auth-craft/client 0.1.2 → 0.2.1
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/README.md +63 -7
- package/dist/core/core.d.ts +10 -4
- package/dist/core/core.d.ts.map +1 -1
- package/dist/core/core.js +4 -3
- package/dist/core/core.js.map +1 -1
- package/dist/core/proxy.d.ts +1 -1
- package/dist/core/proxy.d.ts.map +1 -1
- package/dist/core/proxy.js +1 -1
- package/dist/core/proxy.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/transport/client.d.ts +1 -1
- package/dist/transport/client.d.ts.map +1 -1
- package/dist/transport/client.js +13 -6
- package/dist/transport/client.js.map +1 -1
- package/dist/transport/error-codes.d.ts +18 -18
- package/dist/transport/error-codes.d.ts.map +1 -1
- package/dist/transport/errors.d.ts +1 -1
- package/dist/transport/errors.d.ts.map +1 -1
- package/dist/transport/errors.js +1 -1
- package/dist/transport/errors.js.map +1 -1
- package/dist/transport/helpers.d.ts +1 -1
- package/dist/transport/helpers.d.ts.map +1 -1
- package/dist/transport/index.d.ts +21 -21
- package/dist/transport/index.d.ts.map +1 -1
- package/dist/transport/index.js +16 -16
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/inline-worker.d.ts +45 -0
- package/dist/transport/inline-worker.d.ts.map +1 -0
- package/dist/transport/inline-worker.js +72 -0
- package/dist/transport/inline-worker.js.map +1 -0
- package/dist/transport/messages.d.ts +1 -1
- package/dist/transport/messages.d.ts.map +1 -1
- package/dist/transport/provider/create-provider.d.ts +1 -1
- package/dist/transport/provider/create-provider.d.ts.map +1 -1
- package/dist/transport/provider/create-provider.js +5 -2
- package/dist/transport/provider/create-provider.js.map +1 -1
- package/dist/transport/provider/parser/body.d.ts +1 -1
- package/dist/transport/provider/parser/body.d.ts.map +1 -1
- package/dist/transport/provider/parser/body.js +1 -1
- package/dist/transport/provider/parser/body.js.map +1 -1
- package/dist/transport/provider/parser/cookie.d.ts +1 -1
- package/dist/transport/provider/parser/cookie.d.ts.map +1 -1
- package/dist/transport/provider/parser/cookie.js +1 -1
- package/dist/transport/provider/parser/cookie.js.map +1 -1
- package/dist/transport/provider/presets.d.ts +1 -1
- package/dist/transport/provider/presets.d.ts.map +1 -1
- package/dist/transport/provider/presets.js +6 -6
- package/dist/transport/provider/presets.js.map +1 -1
- package/dist/transport/provider/register-presets.d.ts +1 -1
- package/dist/transport/provider/register-presets.d.ts.map +1 -1
- package/dist/transport/provider/register-presets.js +1 -1
- package/dist/transport/provider/register-presets.js.map +1 -1
- package/dist/transport/provider/storage/indexeddb.d.ts +1 -1
- package/dist/transport/provider/storage/indexeddb.d.ts.map +1 -1
- package/dist/transport/provider/storage/indexeddb.js.map +1 -1
- package/dist/transport/provider/strategy/body.d.ts +1 -1
- package/dist/transport/provider/strategy/body.d.ts.map +1 -1
- package/dist/transport/provider/strategy/body.js.map +1 -1
- package/dist/transport/provider/strategy/cookie.d.ts +1 -1
- package/dist/transport/provider/strategy/cookie.d.ts.map +1 -1
- package/dist/transport/provider/strategy/cookie.js.map +1 -1
- package/dist/transport/result.d.ts +1 -1
- package/dist/transport/result.d.ts.map +1 -1
- package/dist/transport/result.js +1 -1
- package/dist/transport/result.js.map +1 -1
- package/dist/transport/types.d.ts +13 -0
- package/dist/transport/types.d.ts.map +1 -1
- package/dist/transport/utils/formdata.d.ts +1 -1
- package/dist/transport/utils/formdata.d.ts.map +1 -1
- package/dist/transport/utils/formdata.js.map +1 -1
- package/dist/transport/utils/registry.d.ts +1 -1
- package/dist/transport/utils/registry.d.ts.map +1 -1
- package/dist/transport/worker-post.d.ts +29 -39
- package/dist/transport/worker-post.d.ts.map +1 -1
- package/dist/transport/worker-post.js +107 -97
- package/dist/transport/worker-post.js.map +1 -1
- package/dist/transport/worker.d.ts +33 -8
- package/dist/transport/worker.d.ts.map +1 -1
- package/dist/transport/worker.js +32 -19
- package/dist/transport/worker.js.map +1 -1
- package/package.json +5 -5
- package/dist/proxy.d.ts +0 -75
- package/dist/proxy.d.ts.map +0 -1
- package/dist/proxy.js +0 -95
- package/dist/proxy.js.map +0 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* by providing type-safe helpers for common operations.
|
|
6
6
|
*/
|
|
7
7
|
import type { Result } from 'ts-micro-result';
|
|
8
|
-
import type { FetchEnvelope } from './types';
|
|
8
|
+
import type { FetchEnvelope } from './types.js';
|
|
9
9
|
/**
|
|
10
10
|
* Check if result is a network/transport error (not an HTTP response)
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/transport/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/transport/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,IAAI,MAAM,CAAC,aAAa,CAAC,GAAG;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAE7G;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC,GAAG,OAAO,CAEhE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC,GAAG,OAAO,CAEpE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,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2
|
-
export type { ErrorCode, ErrorCodeKey } from './error-codes';
|
|
3
|
-
export { ERROR_CODES } from './error-codes';
|
|
4
|
-
export { AuthErrors, DomainErrors, GeneralErrors, InitErrors, RequestErrors, } from './errors';
|
|
5
|
-
export { getErrorBody, getErrorMessage, getStatus, hasStatus, isClientError, isNetworkError, isServerError, isSuccess, matchResult, parseJson, } from './helpers';
|
|
6
|
-
export type { MainToWorkerMessage, MessageType, WorkerToMainMessage, } from './messages';
|
|
7
|
-
export { MSG } from './messages';
|
|
8
|
-
export type { ProviderConfig } from './provider/create-provider';
|
|
9
|
-
export { createProvider } from './provider/create-provider';
|
|
10
|
-
export { bodyParser } from './provider/parser/body';
|
|
11
|
-
export { cookieParser } from './provider/parser/cookie';
|
|
12
|
-
export { createBodyProvider, createCookieProvider, } from './provider/presets';
|
|
13
|
-
export type { IndexedDBStorageOptions } from './provider/storage/indexeddb';
|
|
14
|
-
export { createIndexedDBStorage } from './provider/storage/indexeddb';
|
|
15
|
-
export { bodyStrategy, createBodyStrategy } from './provider/strategy/body';
|
|
16
|
-
export { cookieStrategy, createCookieStrategy } from './provider/strategy/cookie';
|
|
17
|
-
export { deserializeResult, toResult } from './result';
|
|
18
|
-
export type { AuthResult, AuthStrategy, DebugHooks, DedupeConfig, ExchangeTokenOptions, FetchEnvelope, FetchGuardOptions, FetchGuardRequestInit, NetworkErrorDetail, ProviderPresetConfig, RefreshReason, RefreshTokenStorage, RequestMetrics, RetryConfig, SerializedFile, SerializedFormData, SerializedFormDataEntry, StorageErrorCallback, StorageErrorContext, TokenInfo, TokenParser, TokenProvider, TransportResult, WorkerConfig, } from './types';
|
|
19
|
-
export { base64ToArrayBuffer, isBinaryContentType, } from './utils/binary';
|
|
20
|
-
export { deserializeFormData, isFormData, isSerializedFormData, serializeFormData, } from './utils/formdata';
|
|
21
|
-
export { clearProviders, getProvider, hasProvider, listProviders, registerProvider, unregisterProvider, } from './utils/registry';
|
|
1
|
+
export { createClient, FetchGuardClient } from './client.js';
|
|
2
|
+
export type { ErrorCode, ErrorCodeKey } from './error-codes.js';
|
|
3
|
+
export { ERROR_CODES } from './error-codes.js';
|
|
4
|
+
export { AuthErrors, DomainErrors, GeneralErrors, InitErrors, RequestErrors, } from './errors.js';
|
|
5
|
+
export { getErrorBody, getErrorMessage, getStatus, hasStatus, isClientError, isNetworkError, isServerError, isSuccess, matchResult, parseJson, } from './helpers.js';
|
|
6
|
+
export type { MainToWorkerMessage, MessageType, WorkerToMainMessage, } from './messages.js';
|
|
7
|
+
export { MSG } from './messages.js';
|
|
8
|
+
export type { ProviderConfig } from './provider/create-provider.js';
|
|
9
|
+
export { createProvider } from './provider/create-provider.js';
|
|
10
|
+
export { bodyParser } from './provider/parser/body.js';
|
|
11
|
+
export { cookieParser } from './provider/parser/cookie.js';
|
|
12
|
+
export { createBodyProvider, createCookieProvider, } from './provider/presets.js';
|
|
13
|
+
export type { IndexedDBStorageOptions } from './provider/storage/indexeddb.js';
|
|
14
|
+
export { createIndexedDBStorage } from './provider/storage/indexeddb.js';
|
|
15
|
+
export { bodyStrategy, createBodyStrategy } from './provider/strategy/body.js';
|
|
16
|
+
export { cookieStrategy, createCookieStrategy } from './provider/strategy/cookie.js';
|
|
17
|
+
export { deserializeResult, toResult } from './result.js';
|
|
18
|
+
export type { AuthResult, AuthStrategy, DebugHooks, DedupeConfig, ExchangeTokenOptions, FetchEnvelope, FetchGuardOptions, FetchGuardRequestInit, NetworkErrorDetail, ProviderPresetConfig, RefreshReason, RefreshTokenStorage, RequestMetrics, RetryConfig, SerializedFile, SerializedFormData, SerializedFormDataEntry, StorageErrorCallback, StorageErrorContext, TokenInfo, TokenParser, TokenProvider, TransportResult, WorkerConfig, } from './types.js';
|
|
19
|
+
export { base64ToArrayBuffer, isBinaryContentType, } from './utils/binary.js';
|
|
20
|
+
export { deserializeFormData, isFormData, isSerializedFormData, serializeFormData, } from './utils/formdata.js';
|
|
21
|
+
export { clearProviders, getProvider, hasProvider, listProviders, registerProvider, unregisterProvider, } from './utils/registry.js';
|
|
22
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transport/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transport/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC7D,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EACL,UAAU,EACV,YAAY,EACZ,aAAa,EACb,UAAU,EACV,aAAa,GACd,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,SAAS,EACT,SAAS,EACT,aAAa,EACb,cAAc,EACd,aAAa,EACb,SAAS,EACT,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,mBAAmB,EACnB,WAAW,EACX,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,YAAY,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EACL,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAE/E,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrF,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,aAAa,EACb,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,cAAc,EACd,WAAW,EACX,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC"}
|
package/dist/transport/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
// Main exports
|
|
2
|
-
export { createClient, FetchGuardClient } from './client';
|
|
2
|
+
export { createClient, FetchGuardClient } from './client.js';
|
|
3
3
|
// Error codes for type-safe error matching
|
|
4
|
-
export { ERROR_CODES } from './error-codes';
|
|
4
|
+
export { ERROR_CODES } from './error-codes.js';
|
|
5
5
|
// Organized error definitions
|
|
6
|
-
export { AuthErrors, DomainErrors, GeneralErrors, InitErrors, RequestErrors, } from './errors';
|
|
6
|
+
export { AuthErrors, DomainErrors, GeneralErrors, InitErrors, RequestErrors, } from './errors.js';
|
|
7
7
|
// Helper functions for common Result patterns
|
|
8
|
-
export { getErrorBody, getErrorMessage, getStatus, hasStatus, isClientError, isNetworkError, isServerError, isSuccess, matchResult, parseJson, } from './helpers';
|
|
8
|
+
export { getErrorBody, getErrorMessage, getStatus, hasStatus, isClientError, isNetworkError, isServerError, isSuccess, matchResult, parseJson, } from './helpers.js';
|
|
9
9
|
// Message protocol types (for advanced usage)
|
|
10
|
-
export { MSG } from './messages';
|
|
10
|
+
export { MSG } from './messages.js';
|
|
11
11
|
// Provider factory
|
|
12
|
-
export { createProvider } from './provider/create-provider';
|
|
12
|
+
export { createProvider } from './provider/create-provider.js';
|
|
13
13
|
// Parser modules
|
|
14
|
-
export { bodyParser } from './provider/parser/body';
|
|
15
|
-
export { cookieParser } from './provider/parser/cookie';
|
|
14
|
+
export { bodyParser } from './provider/parser/body.js';
|
|
15
|
+
export { cookieParser } from './provider/parser/cookie.js';
|
|
16
16
|
// Preset providers (recommended)
|
|
17
|
-
export { createBodyProvider, createCookieProvider, } from './provider/presets';
|
|
17
|
+
export { createBodyProvider, createCookieProvider, } from './provider/presets.js';
|
|
18
18
|
// Storage modules
|
|
19
|
-
export { createIndexedDBStorage } from './provider/storage/indexeddb';
|
|
20
|
-
export { bodyStrategy, createBodyStrategy } from './provider/strategy/body';
|
|
19
|
+
export { createIndexedDBStorage } from './provider/storage/indexeddb.js';
|
|
20
|
+
export { bodyStrategy, createBodyStrategy } from './provider/strategy/body.js';
|
|
21
21
|
// Strategy modules
|
|
22
|
-
export { cookieStrategy, createCookieStrategy } from './provider/strategy/cookie';
|
|
22
|
+
export { cookieStrategy, createCookieStrategy } from './provider/strategy/cookie.js';
|
|
23
23
|
// Result parser — deserialize a backend ts-micro-result envelope into Result<T>.
|
|
24
24
|
// Used by callJson() and by the contract-driven typed client.
|
|
25
|
-
export { deserializeResult, toResult } from './result';
|
|
25
|
+
export { deserializeResult, toResult } from './result.js';
|
|
26
26
|
// Binary utilities (for decoding binary responses)
|
|
27
|
-
export { base64ToArrayBuffer, isBinaryContentType, } from './utils/binary';
|
|
27
|
+
export { base64ToArrayBuffer, isBinaryContentType, } from './utils/binary.js';
|
|
28
28
|
// FormData utilities (for advanced usage)
|
|
29
|
-
export { deserializeFormData, isFormData, isSerializedFormData, serializeFormData, } from './utils/formdata';
|
|
29
|
+
export { deserializeFormData, isFormData, isSerializedFormData, serializeFormData, } from './utils/formdata.js';
|
|
30
30
|
// Registry utilities
|
|
31
|
-
export { clearProviders, getProvider, hasProvider, listProviders, registerProvider, unregisterProvider, } from './utils/registry';
|
|
31
|
+
export { clearProviders, getProvider, hasProvider, listProviders, registerProvider, unregisterProvider, } from './utils/registry.js';
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transport/index.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transport/index.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE7D,2CAA2C;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,8BAA8B;AAC9B,OAAO,EACL,UAAU,EACV,YAAY,EACZ,aAAa,EACb,UAAU,EACV,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,8CAA8C;AAC9C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,SAAS,EACT,SAAS,EACT,aAAa,EACb,cAAc,EACd,aAAa,EACb,SAAS,EACT,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AAMtB,8CAA8C;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAGpC,mBAAmB;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,iBAAiB;AACjB,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,iCAAiC;AACjC,OAAO,EACL,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAE/B,kBAAkB;AAClB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,mBAAmB;AACnB,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrF,iFAAiF;AACjF,8DAA8D;AAC9D,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA4B1D,mDAAmD;AACnD,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,0CAA0C;AAC1C,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,qBAAqB;AACrB,OAAO,EACL,cAAc,EACd,WAAW,EACX,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InlineWorker — runs the FetchGuard worker loop on the main thread instead of
|
|
3
|
+
* in a Web Worker, for hosts that cannot or do not want to spawn a worker.
|
|
4
|
+
*
|
|
5
|
+
* It is a drop-in for the parts of the `Worker` interface that `FetchGuardClient`
|
|
6
|
+
* uses (`postMessage`, `onmessage`, `onerror`, `terminate`). The two message
|
|
7
|
+
* directions are wired in-process:
|
|
8
|
+
* - main → loop: `inlineWorker.postMessage(msg)` is delivered to the loop's
|
|
9
|
+
* `scope.onmessage`.
|
|
10
|
+
* - loop → main: the loop calls `scope.postMessage(msg)`, which is delivered
|
|
11
|
+
* to `inlineWorker.onmessage`.
|
|
12
|
+
* Delivery is deferred to a microtask so callers observe the same asynchronous
|
|
13
|
+
* ordering as a real `Worker` (postMessage never resolves synchronously).
|
|
14
|
+
*
|
|
15
|
+
* SECURITY: inline means the loop — and therefore the tokens it holds — lives on
|
|
16
|
+
* the main thread. There is no Worker realm boundary, so page XSS can reach the
|
|
17
|
+
* token. Use only when that trade-off is acceptable (e.g. httpOnly-cookie auth
|
|
18
|
+
* where the refresh token is not in JS anyway). See `runWorkerLoop`'s doc.
|
|
19
|
+
*/
|
|
20
|
+
import type { MainToWorkerMessage, WorkerToMainMessage } from './messages.js';
|
|
21
|
+
/** The subset of the DOM `Worker` interface that `FetchGuardClient` relies on. */
|
|
22
|
+
export interface WorkerLike {
|
|
23
|
+
onmessage: ((event: MessageEvent<WorkerToMainMessage>) => void) | null;
|
|
24
|
+
onerror: ((event: {
|
|
25
|
+
message: string;
|
|
26
|
+
}) => void) | null;
|
|
27
|
+
postMessage(message: MainToWorkerMessage, transfer?: Transferable[]): void;
|
|
28
|
+
terminate(): void;
|
|
29
|
+
}
|
|
30
|
+
export declare class InlineWorker implements WorkerLike {
|
|
31
|
+
onmessage: ((event: MessageEvent<WorkerToMainMessage>) => void) | null;
|
|
32
|
+
onerror: ((event: {
|
|
33
|
+
message: string;
|
|
34
|
+
}) => void) | null;
|
|
35
|
+
/** The loop's host scope: it reads `onmessage` and posts back via `postMessage`. */
|
|
36
|
+
private readonly scope;
|
|
37
|
+
private terminated;
|
|
38
|
+
constructor();
|
|
39
|
+
/** main → loop */
|
|
40
|
+
postMessage(message: MainToWorkerMessage): void;
|
|
41
|
+
terminate(): void;
|
|
42
|
+
/** Defer delivery to a microtask so ordering matches a real Worker channel. */
|
|
43
|
+
private deliver;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=inline-worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-worker.d.ts","sourceRoot":"","sources":["../../src/transport/inline-worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAG9E,kFAAkF;AAClF,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,YAAY,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IACvE,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IACvD,WAAW,CAAC,OAAO,EAAE,mBAAmB,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IAC3E,SAAS,IAAI,IAAI,CAAC;CACnB;AAED,qBAAa,YAAa,YAAW,UAAU;IAC7C,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,YAAY,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;IAC9E,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;IAE9D,oFAAoF;IACpF,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IACxC,OAAO,CAAC,UAAU,CAAS;IAE3B,cAaC;IAED,kBAAkB;IAClB,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAO9C;IAED,SAAS,IAAI,IAAI,CAKhB;IAED,+EAA+E;IAC/E,OAAO,CAAC,OAAO;CAUhB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InlineWorker — runs the FetchGuard worker loop on the main thread instead of
|
|
3
|
+
* in a Web Worker, for hosts that cannot or do not want to spawn a worker.
|
|
4
|
+
*
|
|
5
|
+
* It is a drop-in for the parts of the `Worker` interface that `FetchGuardClient`
|
|
6
|
+
* uses (`postMessage`, `onmessage`, `onerror`, `terminate`). The two message
|
|
7
|
+
* directions are wired in-process:
|
|
8
|
+
* - main → loop: `inlineWorker.postMessage(msg)` is delivered to the loop's
|
|
9
|
+
* `scope.onmessage`.
|
|
10
|
+
* - loop → main: the loop calls `scope.postMessage(msg)`, which is delivered
|
|
11
|
+
* to `inlineWorker.onmessage`.
|
|
12
|
+
* Delivery is deferred to a microtask so callers observe the same asynchronous
|
|
13
|
+
* ordering as a real `Worker` (postMessage never resolves synchronously).
|
|
14
|
+
*
|
|
15
|
+
* SECURITY: inline means the loop — and therefore the tokens it holds — lives on
|
|
16
|
+
* the main thread. There is no Worker realm boundary, so page XSS can reach the
|
|
17
|
+
* token. Use only when that trade-off is acceptable (e.g. httpOnly-cookie auth
|
|
18
|
+
* where the refresh token is not in JS anyway). See `runWorkerLoop`'s doc.
|
|
19
|
+
*/
|
|
20
|
+
import { runWorkerLoop } from './worker.js';
|
|
21
|
+
export class InlineWorker {
|
|
22
|
+
onmessage = null;
|
|
23
|
+
onerror = null;
|
|
24
|
+
/** The loop's host scope: it reads `onmessage` and posts back via `postMessage`. */
|
|
25
|
+
scope;
|
|
26
|
+
terminated = false;
|
|
27
|
+
constructor() {
|
|
28
|
+
// The loop posts results to the host by calling `scope.postMessage`; route
|
|
29
|
+
// those to this InlineWorker's `onmessage`, mirroring a real worker.
|
|
30
|
+
this.scope = {
|
|
31
|
+
onmessage: null,
|
|
32
|
+
postMessage: (message) => {
|
|
33
|
+
if (this.terminated)
|
|
34
|
+
return;
|
|
35
|
+
this.deliver(() => {
|
|
36
|
+
this.onmessage?.({ data: message });
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
runWorkerLoop(this.scope);
|
|
41
|
+
}
|
|
42
|
+
/** main → loop */
|
|
43
|
+
postMessage(message) {
|
|
44
|
+
if (this.terminated)
|
|
45
|
+
return;
|
|
46
|
+
this.deliver(() => {
|
|
47
|
+
// The loop may not have assigned onmessage yet on the very first tick;
|
|
48
|
+
// the microtask defer above ensures it has by delivery time.
|
|
49
|
+
this.scope.onmessage?.({ data: message });
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
terminate() {
|
|
53
|
+
this.terminated = true;
|
|
54
|
+
this.scope.onmessage = null;
|
|
55
|
+
this.onmessage = null;
|
|
56
|
+
this.onerror = null;
|
|
57
|
+
}
|
|
58
|
+
/** Defer delivery to a microtask so ordering matches a real Worker channel. */
|
|
59
|
+
deliver(fn) {
|
|
60
|
+
queueMicrotask(() => {
|
|
61
|
+
if (this.terminated)
|
|
62
|
+
return;
|
|
63
|
+
try {
|
|
64
|
+
fn();
|
|
65
|
+
}
|
|
66
|
+
catch (e) {
|
|
67
|
+
this.onerror?.({ message: e instanceof Error ? e.message : String(e) });
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=inline-worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-worker.js","sourceRoot":"","sources":["../../src/transport/inline-worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,aAAa,EAAwB,MAAM,aAAa,CAAC;AAUlE,MAAM,OAAO,YAAY;IACvB,SAAS,GAAgE,IAAI,CAAC;IAC9E,OAAO,GAAkD,IAAI,CAAC;IAE9D,oFAAoF;IACnE,KAAK,CAAkB;IAChC,UAAU,GAAG,KAAK,CAAC;IAE3B;QACE,2EAA2E;QAC3E,qEAAqE;QACrE,IAAI,CAAC,KAAK,GAAG;YACX,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,CAAC,OAA4B,EAAQ,EAAE;gBAClD,IAAI,IAAI,CAAC,UAAU;oBAAE,OAAO;gBAC5B,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;oBAChB,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAuC,CAAC,CAAC;gBAC3E,CAAC,CAAC,CAAC;YACL,CAAC;SACF,CAAC;QACF,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,kBAAkB;IAClB,WAAW,CAAC,OAA4B;QACtC,IAAI,IAAI,CAAC,UAAU;YAAE,OAAO;QAC5B,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,uEAAuE;YACvE,6DAA6D;YAC7D,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAuC,CAAC,CAAC;QACjF,CAAC,CAAC,CAAC;IACL,CAAC;IAED,SAAS;QACP,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,+EAA+E;IACvE,OAAO,CAAC,EAAc;QAC5B,cAAc,CAAC,GAAG,EAAE;YAClB,IAAI,IAAI,CAAC,UAAU;gBAAE,OAAO;YAC5B,IAAI,CAAC;gBACH,EAAE,EAAE,CAAC;YACP,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ErrorDetail, ResultMeta } from 'ts-micro-result';
|
|
2
|
-
import type { AuthResult, FetchEnvelope, FetchGuardRequestInit, ProviderPresetConfig, RefreshReason, WorkerConfig } from './types';
|
|
2
|
+
import type { AuthResult, FetchEnvelope, FetchGuardRequestInit, ProviderPresetConfig, RefreshReason, WorkerConfig } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* MESSAGE PAYLOADS - SINGLE SOURCE OF TRUTH
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/transport/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,YAAY,EACb,MAAM,
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/transport/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,YAAY,EACb,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE;QAAE,MAAM,EAAE,YAAY,CAAC;QAAC,cAAc,EAAE,oBAAoB,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACtF,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,qBAAqB,CAAA;KAAE,CAAC;IACxD,SAAS,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,EAAE,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACpE,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE;QAAE,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;QAAC,IAAI,CAAC,EAAE,UAAU,C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AAU,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,GAAG,EAmBV,EAAE,QAAQ,EAAE,CAAC,IAAI,WAAW,GAAG,CAAC,GAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Result } from 'ts-micro-result';
|
|
2
|
-
import type { AuthStrategy, RefreshTokenStorage, TokenInfo, TokenParser, TokenProvider } from '../types';
|
|
2
|
+
import type { AuthStrategy, RefreshTokenStorage, TokenInfo, TokenParser, TokenProvider } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Custom auth method type
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-provider.d.ts","sourceRoot":"","sources":["../../../src/transport/provider/create-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,KAAK,EACV,YAAY,EAEZ,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,aAAa,EACd,MAAM,
|
|
1
|
+
{"version":3,"file":"create-provider.d.ts","sourceRoot":"","sources":["../../../src/transport/provider/create-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,KAAK,EACV,YAAY,EAEZ,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,aAAa,EACd,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,KAAK,gBAAgB,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;AAE3E;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,YAAY,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAClD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,aAAa,CAoIpE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { err, ok } from 'ts-micro-result';
|
|
2
|
-
import { AuthErrors, RequestErrors } from '../errors';
|
|
2
|
+
import { AuthErrors, RequestErrors } from '../errors.js';
|
|
3
3
|
/**
|
|
4
4
|
* Factory function to create TokenProvider from modular components
|
|
5
5
|
*
|
|
@@ -55,7 +55,10 @@ export function createProvider(config) {
|
|
|
55
55
|
// body in meta.params (same shape as the HTTP-error branch above) so the
|
|
56
56
|
// proxy's dispatchLogin can deserialize and surface the discriminated
|
|
57
57
|
// login-result instead of an opaque "No access token".
|
|
58
|
-
const body = await response
|
|
58
|
+
const body = await response
|
|
59
|
+
.clone()
|
|
60
|
+
.text()
|
|
61
|
+
.catch(() => '');
|
|
59
62
|
return err(AuthErrors.LoginFailed({ message: 'No access token in response' }), {
|
|
60
63
|
params: { body, status: response.status },
|
|
61
64
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-provider.js","sourceRoot":"","sources":["../../../src/transport/provider/create-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAe,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"create-provider.js","sourceRoot":"","sources":["../../../src/transport/provider/create-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAe,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAiCzD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAAC,MAAsB;IACnD,MAAM,YAAY,GAA+E;QAC/F,KAAK,CAAC,YAAY,CAAC,YAA4B;YAC7C,6DAA6D;YAC7D,IAAI,mBAA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AmC;IACnC,IAAI,MAAM,CAAC,aAAa,EAAE,CAAC;QACzB,OAAO;YACL,GAAG,YAAY;YACf,GAAG,MAAM,CAAC,aAAa;SACP,CAAC;IACrB,CAAC;IAED,OAAO,YAA6B,CAAC;AACvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../src/transport/provider/parser/body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../src/transport/provider/parser/body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,WAUxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../../src/transport/provider/parser/body.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../../src/transport/provider/parser/body.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAgB;IACrC,KAAK,CAAC,KAAK,CAAC,QAAQ;QAClB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;QAC3C,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW;YAC5B,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY;YACpC,SAAS,EAAE,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;YAClD,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;SACrB,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../src/transport/provider/parser/cookie.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../src/transport/provider/parser/cookie.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAS1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.js","sourceRoot":"","sources":["../../../../src/transport/provider/parser/cookie.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"cookie.js","sourceRoot":"","sources":["../../../../src/transport/provider/parser/cookie.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAgB;IACvC,KAAK,CAAC,KAAK,CAAC,QAAQ;QAClB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;QAC3C,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW;YAC5B,SAAS,EAAE,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;YAClD,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;SACrB,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../src/transport/provider/presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../src/transport/provider/presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC,GAAG,aAAa,CAMhB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC,GAAG,aAAa,CAMhB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createProvider } from './create-provider';
|
|
2
|
-
import { bodyParser } from './parser/body';
|
|
3
|
-
import { cookieParser } from './parser/cookie';
|
|
4
|
-
import { createIndexedDBStorage } from './storage/indexeddb';
|
|
5
|
-
import { createBodyStrategy } from './strategy/body';
|
|
6
|
-
import { createCookieStrategy } from './strategy/cookie';
|
|
1
|
+
import { createProvider } from './create-provider.js';
|
|
2
|
+
import { bodyParser } from './parser/body.js';
|
|
3
|
+
import { cookieParser } from './parser/cookie.js';
|
|
4
|
+
import { createIndexedDBStorage } from './storage/indexeddb.js';
|
|
5
|
+
import { createBodyStrategy } from './strategy/body.js';
|
|
6
|
+
import { createCookieStrategy } from './strategy/cookie.js';
|
|
7
7
|
/**
|
|
8
8
|
* Cookie Provider - uses httpOnly cookies
|
|
9
9
|
* Suitable for SSR and cross-domain authentication
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.js","sourceRoot":"","sources":["../../../src/transport/provider/presets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"presets.js","sourceRoot":"","sources":["../../../src/transport/provider/presets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAMpC;IACC,OAAO,cAAc,CAAC;QACpB,cAAc,EAAE,SAAS;QACzB,MAAM,EAAE,YAAY;QACpB,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC;KACvC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAOlC;IACC,OAAO,cAAc,CAAC;QACpB,cAAc,EAAE,sBAAsB,CAAC,cAAc,EAAE,MAAM,CAAC,eAAe,IAAI,cAAc,CAAC;QAChG,MAAM,EAAE,UAAU;QAClB,QAAQ,EAAE,kBAAkB,CAAC,MAAM,CAAC;KACrC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-presets.d.ts","sourceRoot":"","sources":["../../../src/transport/provider/register-presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"register-presets.d.ts","sourceRoot":"","sources":["../../../src/transport/provider/register-presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGvE;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,oBAAoB,EAC5B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACtC,aAAa,CAwBf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-presets.js","sourceRoot":"","sources":["../../../src/transport/provider/register-presets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"register-presets.js","sourceRoot":"","sources":["../../../src/transport/provider/register-presets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAA4B,EAC5B,cAAuC;IAEvC,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,aAAa;YAChB,OAAO,oBAAoB,CAAC;gBAC1B,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,cAAc;aACf,CAAC,CAAC;QAEL,KAAK,WAAW;YACd,OAAO,kBAAkB,CAAC;gBACxB,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,eAAe,EAAE,MAAM,CAAC,eAAe;gBACvC,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,cAAc;aACf,CAAC,CAAC;QAEL;YACE,MAAM,IAAI,KAAK,CAAC,0BAA0B,MAAM,CAAE,MAA6B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7F,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexeddb.d.ts","sourceRoot":"","sources":["../../../../src/transport/provider/storage/indexeddb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"indexeddb.d.ts","sourceRoot":"","sources":["../../../../src/transport/provider/storage/indexeddb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,uBAAuB,GAAG,MAAuB,EAC1D,qBAAqB,CAAC,EAAE,MAAM,GAC7B,mBAAmB,CAmErB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexeddb.js","sourceRoot":"","sources":["../../../../src/transport/provider/storage/indexeddb.ts"],"names":[],"mappings":"AAkBA;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,
|
|
1
|
+
{"version":3,"file":"indexeddb.js","sourceRoot":"","sources":["../../../../src/transport/provider/storage/indexeddb.ts"],"names":[],"mappings":"AAkBA;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAO,GAAqC,cAAc,EAC1D,qBAA8B;IAE9B,8DAA8D;IAC9D,MAAM,MAAM,GACV,OAAO,OAAO,KAAK,QAAQ;QACzB,CAAC,CAAC,E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,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;gBACnG,CAAC;qBAAM,CAAC;oBACN,MAAM,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;gBACxD,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,EAAE,CAAC,KAAc,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;YACtD,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../src/transport/provider/strategy/body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAwB,MAAM,
|
|
1
|
+
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../src/transport/provider/strategy/body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAwB,MAAM,gBAAgB,CAAC;AAEzE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC,GAAG,YAAY,CAqDf;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,cAIvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../../src/transport/provider/strategy/body.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAMlC;IACC,MAAM,WAAW,GAAG;QAClB,GAAG,MAAM,CAAC,cAAc;QACxB,GAAG,MAAM,CAAC,OAAO;QACjB,cAAc,EAAE,kBAAkB;KACnC,CAAC;IAEF,OAAO;QACL,KAAK,CAAC,OAAO,CAAC,YAAY;YACxB,IAAI,CAAC,YAAY,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;YAChD,CAAC;YAED,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE;gBAC9B,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;gBACtC,WAAW,EAAE,SAAS;aACvB,CAAC,CAAC;QACL,CAAC;QAED,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG;YACtB,OAAO,KAAK,CAAC,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE;gBACnC,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;gBAC7B,WAAW,EAAE,SAAS;aACvB,CAAC,CAAC;QACL,CAAC;QAED,KAAK,CAAC,MAAM,CAAC,OAAO;YAClB,OAAO,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE;gBAC7B,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;gBACnD,WAAW,EAAE,SAAS;aACvB,CAAC,CAAC;QACL,CAAC;QAED,KAAK,CAAC,aAAa,CAAC,WAAmB,EAAE,GAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../../src/transport/provider/strategy/body.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,k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AAO,KAAK,CAAC,GAAG,EAAE;gBAChB,MAAM;gBACN,OAAO,EAAE;oBACP,GAAG,WAAW;oBACd,GAAG,OAAO;oBACV,aAAa,EAAE,UAAU,WAAW,EAAE;iBACvC;gBACD,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;gBACnD,WAAW,EAAE,SAAS;aACvB,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;IAC7C,UAAU,EAAE,eAAe;IAC3B,QAAQ,EAAE,aAAa;IACvB,SAAS,EAAE,cAAc;CAC1B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../src/transport/provider/strategy/cookie.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAwB,MAAM,
|
|
1
|
+
{"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../src/transport/provider/strategy/cookie.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAwB,MAAM,gBAAgB,CAAC;AAEzE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC,GAAG,YAAY,CAgDf;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,cAIzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.js","sourceRoot":"","sources":["../../../../src/transport/provider/strategy/cookie.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAMpC;IACC,MAAM,WAAW,GAAG;QAClB,GAAG,MAAM,CAAC,cAAc;QACxB,GAAG,MAAM,CAAC,OAAO;QACjB,cAAc,EAAE,kBAAkB;KACnC,CAAC;IAEF,OAAO;QACL,KAAK,CAAC,OAAO;YACX,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE;gBAC9B,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,WAAW;gBACpB,WAAW,EAAE,SAAS;aACvB,CAAC,CAAC;QACL,CAAC;QAED,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG;YACtB,OAAO,KAAK,CAAC,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE;gBACnC,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;gBAC7B,WAAW,EAAE,SAAS;aACvB,CAAC,CAAC;QACL,CAAC;QAED,KAAK,CAAC,MAAM,CAAC,OAAO;YAClB,OAAO,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE;gBAC7B,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;gBACnD,WAAW,EAAE,SAAS;aACvB,CAAC,CAAC;QACL,CAAC;QAED,KAAK,CAAC,aAAa,CAAC,WAAmB,EAAE,GAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"cookie.js","sourceRoot":"","sources":["../../../../src/transport/provider/strategy/cookie.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAMpC;IACC,MAAM,WAAW,GAAG;QAClB,GAAG,MAAM,CAAC,cA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WAAW,EAAE,SAAS;aACvB,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAC;IACjD,UAAU,EAAE,eAAe;IAC3B,QAAQ,EAAE,aAAa;IACvB,SAAS,EAAE,cAAc;CAC1B,CAAC,CAAC"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* already resolved, after the Worker has done the fetch.
|
|
10
10
|
*/
|
|
11
11
|
import { type Result } from 'ts-micro-result';
|
|
12
|
-
import type { FetchEnvelope } from './types';
|
|
12
|
+
import type { FetchEnvelope } from './types.js';
|
|
13
13
|
/**
|
|
14
14
|
* Deserialize a JSON body that is expected to be a ts-micro-result envelope.
|
|
15
15
|
* Falls back to treating the parsed JSON as raw data when it isn't an envelope.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/transport/result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAA6B,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/transport/result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAA6B,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAiBlE;AA6BD;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAsB5E"}
|
package/dist/transport/result.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* already resolved, after the Worker has done the fetch.
|
|
10
10
|
*/
|
|
11
11
|
import { err, ok } from 'ts-micro-result';
|
|
12
|
-
import { ERROR_CODES } from './error-codes';
|
|
12
|
+
import { ERROR_CODES } from './error-codes.js';
|
|
13
13
|
/**
|
|
14
14
|
* Deserialize a JSON body that is expected to be a ts-micro-result envelope.
|
|
15
15
|
* Falls back to treating the parsed JSON as raw data when it isn't an envelope.
|