@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@auth-craft/client",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Contract-driven typed frontend client for Auth Craft. Methods are generated from @auth-craft/api-contract; tokens are isolated in a Web Worker. Import the root for all groups, or @auth-craft/client/core for a scope-agnostic core you wire per scope.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"ts-micro-result": "^3.3.0",
|
|
29
|
-
"valibot": "^1.4.
|
|
30
|
-
"@auth-craft/api-contract": "^0.1.
|
|
29
|
+
"valibot": "^1.4.2",
|
|
30
|
+
"@auth-craft/api-contract": "^0.1.3"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"typescript": "^
|
|
34
|
-
"vitest": "^4.1.
|
|
33
|
+
"typescript": "^7.0.2",
|
|
34
|
+
"vitest": "^4.1.10"
|
|
35
35
|
},
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"publishConfig": {
|
package/dist/proxy.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contract-driven typed proxy.
|
|
3
|
-
*
|
|
4
|
-
* Given a transport (the absorbed FetchGuard client) and a map of contract
|
|
5
|
-
* endpoints, this builds a typed method per endpoint. The `kind` discriminator
|
|
6
|
-
* decides how each one is dispatched:
|
|
7
|
-
*
|
|
8
|
-
* data → transport.callJson(method, url, body) (auto-bound, typed Result<T>)
|
|
9
|
-
* login → transport.login(body, url) (Worker session bootstrap)
|
|
10
|
-
* logout → transport.logout(body)
|
|
11
|
-
* exchange → transport.exchangeToken(url, { payload })
|
|
12
|
-
*
|
|
13
|
-
* Types flow straight from the contract: the input is inferred from the body
|
|
14
|
-
* schema, the output from the response schema (or AuthResult for login/logout).
|
|
15
|
-
* A route change to the contract therefore re-types every call site at build.
|
|
16
|
-
*/
|
|
17
|
-
import type { Endpoint, PathParams } from '@auth-craft/api-contract';
|
|
18
|
-
import { type FetchGuardClient } from '@auth-craft/transport';
|
|
19
|
-
import { type Result } from 'ts-micro-result';
|
|
20
|
-
import type { InferInput, InferOutput } from 'valibot';
|
|
21
|
-
export interface AuthResult {
|
|
22
|
-
authenticated: boolean;
|
|
23
|
-
user?: unknown;
|
|
24
|
-
expiresAt?: number | null;
|
|
25
|
-
}
|
|
26
|
-
/** Whether an endpoint has any `:param` segments. */
|
|
27
|
-
type HasParams<P extends string> = PathParams<P> extends never ? false : true;
|
|
28
|
-
/** The `params` argument, required only when the path has params. */
|
|
29
|
-
type ParamsArg<P extends string> = HasParams<P> extends true ? {
|
|
30
|
-
params: Record<PathParams<P>, string | number>;
|
|
31
|
-
} : {
|
|
32
|
-
params?: undefined;
|
|
33
|
-
};
|
|
34
|
-
/** Body argument, present only when the endpoint declares a body schema. */
|
|
35
|
-
type BodyArg<E> = E extends {
|
|
36
|
-
body: infer S;
|
|
37
|
-
} ? {
|
|
38
|
-
body: InferInput<S extends import('valibot').GenericSchema ? S : never>;
|
|
39
|
-
} : {
|
|
40
|
-
body?: undefined;
|
|
41
|
-
};
|
|
42
|
-
/** Query argument, present only when the endpoint declares a query schema. */
|
|
43
|
-
type QueryArg<E> = E extends {
|
|
44
|
-
query: infer S;
|
|
45
|
-
} ? {
|
|
46
|
-
query?: InferInput<S extends import('valibot').GenericSchema ? S : never>;
|
|
47
|
-
} : {
|
|
48
|
-
query?: undefined;
|
|
49
|
-
};
|
|
50
|
-
/** The single call argument object for a generated method. */
|
|
51
|
-
type CallArg<E extends Endpoint> = ParamsArg<E['path']> & BodyArg<E> & QueryArg<E>;
|
|
52
|
-
/** The resolved return type of a generated method. */
|
|
53
|
-
type CallReturn<E extends Endpoint> = E extends {
|
|
54
|
-
kind: 'data';
|
|
55
|
-
} ? E extends {
|
|
56
|
-
response: infer R;
|
|
57
|
-
} ? Result<InferOutput<R extends import('valibot').GenericSchema ? R : never>> : Result<unknown> : E extends {
|
|
58
|
-
kind: 'login';
|
|
59
|
-
} ? E extends {
|
|
60
|
-
response: infer R;
|
|
61
|
-
} ? Result<InferOutput<R extends import('valibot').GenericSchema ? R : never>> : Result<AuthResult> : Result<AuthResult>;
|
|
62
|
-
/** Does this arg shape need any argument at all? */
|
|
63
|
-
type NeedsArg<E extends Endpoint> = HasParams<E['path']> extends true ? true : E extends {
|
|
64
|
-
body: unknown;
|
|
65
|
-
} ? true : false;
|
|
66
|
-
export type EndpointMethod<E extends Endpoint> = NeedsArg<E> extends true ? (arg: CallArg<E>) => Promise<CallReturn<E>> : (arg?: CallArg<E>) => Promise<CallReturn<E>>;
|
|
67
|
-
export type ContractClient<C extends Record<string, Endpoint>> = {
|
|
68
|
-
[K in keyof C]: EndpointMethod<C[K]>;
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Build a typed client object from a contract group.
|
|
72
|
-
*/
|
|
73
|
-
export declare function buildClient<C extends Record<string, Endpoint>>(transport: FetchGuardClient, contract: C, buildUrl: (path: string) => string): ContractClient<C>;
|
|
74
|
-
export {};
|
|
75
|
-
//# sourceMappingURL=proxy.d.ts.map
|
package/dist/proxy.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../src/proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAEpE,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAChF,OAAO,EAAW,KAAK,MAAM,EAAE,MA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hD,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI;KAC9D,CAAC,IAAI,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACrC,CAAA;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EAC5D,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GACjC,cAAc,CAAC,CAAC,CAAC,CAgCnB"}
|
package/dist/proxy.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contract-driven typed proxy.
|
|
3
|
-
*
|
|
4
|
-
* Given a transport (the absorbed FetchGuard client) and a map of contract
|
|
5
|
-
* endpoints, this builds a typed method per endpoint. The `kind` discriminator
|
|
6
|
-
* decides how each one is dispatched:
|
|
7
|
-
*
|
|
8
|
-
* data → transport.callJson(method, url, body) (auto-bound, typed Result<T>)
|
|
9
|
-
* login → transport.login(body, url) (Worker session bootstrap)
|
|
10
|
-
* logout → transport.logout(body)
|
|
11
|
-
* exchange → transport.exchangeToken(url, { payload })
|
|
12
|
-
*
|
|
13
|
-
* Types flow straight from the contract: the input is inferred from the body
|
|
14
|
-
* schema, the output from the response schema (or AuthResult for login/logout).
|
|
15
|
-
* A route change to the contract therefore re-types every call site at build.
|
|
16
|
-
*/
|
|
17
|
-
import { fillPath } from '@auth-craft/api-contract';
|
|
18
|
-
import { deserializeResult } from '@auth-craft/transport';
|
|
19
|
-
import { err, ok } from 'ts-micro-result';
|
|
20
|
-
/**
|
|
21
|
-
* Build a typed client object from a contract group.
|
|
22
|
-
*/
|
|
23
|
-
export function buildClient(transport, contract, buildUrl) {
|
|
24
|
-
const out = {};
|
|
25
|
-
for (const key of Object.keys(contract)) {
|
|
26
|
-
const ep = contract[key];
|
|
27
|
-
out[key] = async (arg) => {
|
|
28
|
-
const path = fillPath(ep.path, arg?.params);
|
|
29
|
-
const url = buildUrl(path) + buildQueryString(arg?.query);
|
|
30
|
-
const body = arg?.body;
|
|
31
|
-
const requiresAuth = ep.public !== true;
|
|
32
|
-
switch (ep.kind) {
|
|
33
|
-
case 'data':
|
|
34
|
-
return transport.callJson(ep.method, url, body, { requiresAuth });
|
|
35
|
-
case 'login':
|
|
36
|
-
return dispatchLogin(transport, body, url);
|
|
37
|
-
case 'logout':
|
|
38
|
-
return transport.logout(body);
|
|
39
|
-
case 'exchange':
|
|
40
|
-
return transport.exchangeToken(url, {
|
|
41
|
-
...(body !== undefined ? { payload: body } : {})
|
|
42
|
-
});
|
|
43
|
-
default:
|
|
44
|
-
return err({ code: 'UNKNOWN_KIND', message: `Unknown endpoint kind for '${key}'.` });
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
return out;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Dispatch a login-kind endpoint and normalize the outcome.
|
|
52
|
-
*
|
|
53
|
-
* FetchGuard's login() resolves the AuthResult when a session is established. A
|
|
54
|
-
* 2-step login (credential challenge / MFA required) comes back as a non-error
|
|
55
|
-
* HTTP body that FetchGuard surfaces via `meta.params.body`. We deserialize that
|
|
56
|
-
* envelope so the caller gets the discriminated login result (tokens | challenge
|
|
57
|
-
* | mfa) instead of an opaque "not authenticated" — matching the old SDK's
|
|
58
|
-
* behaviour, but in ONE place instead of per method.
|
|
59
|
-
*/
|
|
60
|
-
async function dispatchLogin(transport, body, url) {
|
|
61
|
-
const result = await transport.login(body, url);
|
|
62
|
-
// Session established → return the tokens/auth-state shape.
|
|
63
|
-
if (result.ok && result.data.authenticated) {
|
|
64
|
-
return ok({
|
|
65
|
-
accessToken: '',
|
|
66
|
-
expiresAt: result.data.expiresAt ?? 0
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
// Not authenticated: the backend body may carry a challenge / MFA requirement
|
|
70
|
-
// (a legitimate 2-step step), or a real error. Deserialize and forward it.
|
|
71
|
-
if (!result.ok) {
|
|
72
|
-
const params = result.meta?.params;
|
|
73
|
-
if (params?.body) {
|
|
74
|
-
const parsed = deserializeResult(params.body);
|
|
75
|
-
// Forward whatever the backend said — challenge/mfa (ok) or error (err).
|
|
76
|
-
return parsed;
|
|
77
|
-
}
|
|
78
|
-
return err(result.errors);
|
|
79
|
-
}
|
|
80
|
-
// ok but not authenticated and no body to interpret — surface a generic error.
|
|
81
|
-
return err({ code: 'LOGIN_FAILED', message: 'Authentication did not establish a session' });
|
|
82
|
-
}
|
|
83
|
-
/** Serialize a query object to a `?a=1&b=2` string (skips undefined). */
|
|
84
|
-
function buildQueryString(query) {
|
|
85
|
-
if (!query)
|
|
86
|
-
return '';
|
|
87
|
-
const params = new URLSearchParams();
|
|
88
|
-
for (const [k, v] of Object.entries(query)) {
|
|
89
|
-
if (v !== undefined && v !== null)
|
|
90
|
-
params.set(k, String(v));
|
|
91
|
-
}
|
|
92
|
-
const qs = params.toString();
|
|
93
|
-
return qs ? `?${qs}` : '';
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=proxy.js.map
|
package/dist/proxy.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../src/proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAyB,MAAM,uBAAuB,CAAA;AAChF,OAAO,EAAE,GAAG,EAAE,EAAE,EAAe,MAAM,iBAAiB,CAAA;AA0DtD;;GAEG;AACH,MAAM,UAAU,WAAW,CACzB,SAA2B,EAC3B,QAAW,EACX,QAAkC;IAElC,MAAM,GAAG,GAAG,EAGX,CAAA;IAED,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAA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