@webpieces/http-routing 0.3.309 → 0.3.310
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 +3 -3
- package/src/AuthConfig.d.ts +11 -16
- package/src/AuthConfig.js +9 -20
- package/src/AuthConfig.js.map +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +2 -3
- package/src/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webpieces/http-routing",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.310",
|
|
4
4
|
"description": "Decorator-based routing with auto-wiring for WebPieces",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@inversifyjs/binding-decorators": "1.1.5",
|
|
25
|
-
"@webpieces/core-context": "0.3.
|
|
26
|
-
"@webpieces/core-util": "0.3.
|
|
25
|
+
"@webpieces/core-context": "0.3.310",
|
|
26
|
+
"@webpieces/core-util": "0.3.310",
|
|
27
27
|
"inversify": "7.10.4",
|
|
28
28
|
"minimatch": "10.0.1"
|
|
29
29
|
}
|
package/src/AuthConfig.d.ts
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/**
|
|
3
|
-
* ContextValue - one (ContextKey, value) pair the JWT parse plugin wants stamped into the
|
|
4
|
-
* RequestContext (e.g. USER_ID, ORG_ID). Data-only structure (a class, per the guidelines).
|
|
5
|
-
*/
|
|
6
|
-
export declare class ContextValue {
|
|
7
|
-
readonly key: ContextKey;
|
|
8
|
-
readonly value: unknown;
|
|
9
|
-
constructor(key: ContextKey, value: unknown);
|
|
10
|
-
}
|
|
1
|
+
import { ContextTuple, JwtRequirement } from '@webpieces/core-util';
|
|
11
2
|
/**
|
|
12
3
|
* SharedSecrets - the accepted values for ONE `@AuthSharedSecret(name)`. BOTH secret1 AND secret2
|
|
13
4
|
* are accepted — this is what makes zero-downtime ROTATION possible:
|
|
@@ -32,9 +23,9 @@ export declare class SharedSecrets {
|
|
|
32
23
|
export declare class AuthValues {
|
|
33
24
|
readonly userId: string;
|
|
34
25
|
readonly roles: string[];
|
|
35
|
-
readonly entries:
|
|
26
|
+
readonly entries: ContextTuple[];
|
|
36
27
|
readonly claims: Record<string, unknown>;
|
|
37
|
-
constructor(userId: string, roles?: string[], entries?:
|
|
28
|
+
constructor(userId: string, roles?: string[], entries?: ContextTuple[], claims?: Record<string, unknown>);
|
|
38
29
|
}
|
|
39
30
|
/**
|
|
40
31
|
* AuthConfig - the ONE app-provided auth binding the framework {@link AuthFilter} injects to enforce
|
|
@@ -45,14 +36,18 @@ export declare class AuthValues {
|
|
|
45
36
|
* Prod fills it from env; a test binds `{ NAME: 'some-test-key' }` and can then
|
|
46
37
|
* exercise the shared-secret path (and a negative test with a wrong key).
|
|
47
38
|
* - `parseJwt` — PLUGIN: decode/verify a user JWT into {@link AuthValues} (userId, roles,
|
|
48
|
-
* context entries).
|
|
39
|
+
* context entries). The app owns the VERIFICATION — it picks the JWT library
|
|
40
|
+
* and strategy (a static HS256 secret, RS256 + JWKS with key rotation, or a
|
|
41
|
+
* provider SDK like Firebase/Auth0/Cognito). Minting a JWT is a controller
|
|
42
|
+
* concern (login), not here.
|
|
49
43
|
* - `verifyOidc` — PLUGIN: verify a Google OIDC service-to-service token against the endpoint's
|
|
50
44
|
* caller allow-list. Fully generic — the company base wires it to
|
|
51
45
|
* @webpieces/gcp-identity once, so apps never customize OIDC.
|
|
52
46
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
47
|
+
* The framework owns the SEAM + policy (AuthMode dispatch, {@link authorizeJwt} roles, 401/403
|
|
48
|
+
* translation), NOT the crypto — so http-routing needs NO jsonwebtoken / gcp-identity and never
|
|
49
|
+
* locks apps to one JWT library. AuthFilter injects this `@optional`: a public-only server binds
|
|
50
|
+
* none; a non-public route with no AuthConfig (or no value/plugin for its mode) fails fast.
|
|
56
51
|
*/
|
|
57
52
|
export declare abstract class AuthConfig {
|
|
58
53
|
/**
|
package/src/AuthConfig.js
CHANGED
|
@@ -1,22 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AuthConfig = exports.AuthValues = exports.SharedSecrets =
|
|
3
|
+
exports.AuthConfig = exports.AuthValues = exports.SharedSecrets = void 0;
|
|
4
4
|
const core_util_1 = require("@webpieces/core-util");
|
|
5
|
-
/**
|
|
6
|
-
* ContextValue - one (ContextKey, value) pair the JWT parse plugin wants stamped into the
|
|
7
|
-
* RequestContext (e.g. USER_ID, ORG_ID). Data-only structure (a class, per the guidelines).
|
|
8
|
-
*/
|
|
9
|
-
class ContextValue {
|
|
10
|
-
key;
|
|
11
|
-
value;
|
|
12
|
-
constructor(key,
|
|
13
|
-
// webpieces-disable no-any-unknown -- context values are arbitrary app-defined data
|
|
14
|
-
value) {
|
|
15
|
-
this.key = key;
|
|
16
|
-
this.value = value;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.ContextValue = ContextValue;
|
|
20
5
|
/**
|
|
21
6
|
* SharedSecrets - the accepted values for ONE `@AuthSharedSecret(name)`. BOTH secret1 AND secret2
|
|
22
7
|
* are accepted — this is what makes zero-downtime ROTATION possible:
|
|
@@ -66,14 +51,18 @@ exports.AuthValues = AuthValues;
|
|
|
66
51
|
* Prod fills it from env; a test binds `{ NAME: 'some-test-key' }` and can then
|
|
67
52
|
* exercise the shared-secret path (and a negative test with a wrong key).
|
|
68
53
|
* - `parseJwt` — PLUGIN: decode/verify a user JWT into {@link AuthValues} (userId, roles,
|
|
69
|
-
* context entries).
|
|
54
|
+
* context entries). The app owns the VERIFICATION — it picks the JWT library
|
|
55
|
+
* and strategy (a static HS256 secret, RS256 + JWKS with key rotation, or a
|
|
56
|
+
* provider SDK like Firebase/Auth0/Cognito). Minting a JWT is a controller
|
|
57
|
+
* concern (login), not here.
|
|
70
58
|
* - `verifyOidc` — PLUGIN: verify a Google OIDC service-to-service token against the endpoint's
|
|
71
59
|
* caller allow-list. Fully generic — the company base wires it to
|
|
72
60
|
* @webpieces/gcp-identity once, so apps never customize OIDC.
|
|
73
61
|
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
62
|
+
* The framework owns the SEAM + policy (AuthMode dispatch, {@link authorizeJwt} roles, 401/403
|
|
63
|
+
* translation), NOT the crypto — so http-routing needs NO jsonwebtoken / gcp-identity and never
|
|
64
|
+
* locks apps to one JWT library. AuthFilter injects this `@optional`: a public-only server binds
|
|
65
|
+
* none; a non-public route with no AuthConfig (or no value/plugin for its mode) fails fast.
|
|
77
66
|
*/
|
|
78
67
|
class AuthConfig {
|
|
79
68
|
/**
|
package/src/AuthConfig.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthConfig.js","sourceRoot":"","sources":["../../../../../packages/http/http-routing/src/AuthConfig.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"AuthConfig.js","sourceRoot":"","sources":["../../../../../packages/http/http-routing/src/AuthConfig.ts"],"names":[],"mappings":";;;AAAA,oDAAwF;AAExF;;;;;;;;;GASG;AACH,MAAa,aAAa;IAEF;IACA;IAFpB,YACoB,OAAe,EACf,OAAe;QADf,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAQ;IAChC,CAAC;CACP;AALD,sCAKC;AAED;;;;;GAKG;AACH,MAAa,UAAU;IAEC;IACA;IACA;IAEA;IALpB,YACoB,MAAc,EACd,QAAkB,EAAE,EACpB,UAA0B,EAAE;IAC5C,wGAAwG;IACxF,SAAkC,EAAE;QAJpC,WAAM,GAAN,MAAM,CAAQ;QACd,UAAK,GAAL,KAAK,CAAe;QACpB,YAAO,GAAP,OAAO,CAAqB;QAE5B,WAAM,GAAN,MAAM,CAA8B;IACrD,CAAC;CACP;AARD,gCAQC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAsB,UAAU;IAc5B;;;;;;OAMG;IACH,YAAY,CAAC,MAAkB,EAAE,WAA2B;QACxD,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE,CAAC;QACtC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACjF,MAAM,IAAI,8BAAkB,CAAC,mCAAmC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACxF,CAAC;IACL,CAAC;CACJ;AA3BD,gCA2BC","sourcesContent":["import { ContextTuple, JwtRequirement, HttpForbiddenError } from '@webpieces/core-util';\n\n/**\n * SharedSecrets - the accepted values for ONE `@AuthSharedSecret(name)`. BOTH secret1 AND secret2\n * are accepted — this is what makes zero-downtime ROTATION possible:\n *\n * to rotate: shift secret2 → secret1, and put the NEW secret in secret2. Callers cut over from\n * the old value to the new during the window; once every caller sends the new one, the stale\n * value falls out on the next shift. At all times EITHER key works, so no request is dropped.\n *\n * Data-only structure (a class, per the guidelines). Leave secret2 empty for a single secret.\n */\nexport class SharedSecrets {\n constructor(\n public readonly secret1: string,\n public readonly secret2: string,\n ) {}\n}\n\n/**\n * AuthValues - what {@link AuthConfig.parseJwt} returns: the authenticated user's id + roles (used\n * by the framework to stamp a principal and enforce @AuthJwt(...roles)) plus any extra context\n * entries the app wants set (orgId, tenant, ...). The framework sets `entries` into RequestContext\n * via {@link RequestContext.putHeader}. Data-only structure (a class, per the guidelines).\n */\nexport class AuthValues {\n constructor(\n public readonly userId: string,\n public readonly roles: string[] = [],\n public readonly entries: ContextTuple[] = [],\n // webpieces-disable no-any-unknown -- raw JWT claims for app-defined authorization (inOrg, tenant, ...)\n public readonly claims: Record<string, unknown> = {},\n ) {}\n}\n\n/**\n * AuthConfig - the ONE app-provided auth binding the framework {@link AuthFilter} injects to enforce\n * each endpoint's AuthMode. It is a single abstract class (injected by type, per no-symbol-di-tokens)\n * bound in the APP container and rebindable in tests. Each mechanism has its RIGHT shape:\n *\n * - `sharedSecrets` — STATE: the expected secret VALUE per name (from `@AuthSharedSecret(name)`).\n * Prod fills it from env; a test binds `{ NAME: 'some-test-key' }` and can then\n * exercise the shared-secret path (and a negative test with a wrong key).\n * - `parseJwt` — PLUGIN: decode/verify a user JWT into {@link AuthValues} (userId, roles,\n * context entries). The app owns the VERIFICATION — it picks the JWT library\n * and strategy (a static HS256 secret, RS256 + JWKS with key rotation, or a\n * provider SDK like Firebase/Auth0/Cognito). Minting a JWT is a controller\n * concern (login), not here.\n * - `verifyOidc` — PLUGIN: verify a Google OIDC service-to-service token against the endpoint's\n * caller allow-list. Fully generic — the company base wires it to\n * @webpieces/gcp-identity once, so apps never customize OIDC.\n *\n * The framework owns the SEAM + policy (AuthMode dispatch, {@link authorizeJwt} roles, 401/403\n * translation), NOT the crypto — so http-routing needs NO jsonwebtoken / gcp-identity and never\n * locks apps to one JWT library. AuthFilter injects this `@optional`: a public-only server binds\n * none; a non-public route with no AuthConfig (or no value/plugin for its mode) fails fast.\n */\nexport abstract class AuthConfig {\n /**\n * Accepted shared-secret values keyed by the `@AuthSharedSecret(name)` name. STATE. Each entry\n * is a {@link SharedSecrets} (secret1 + secret2, either accepted) so secrets can be ROTATED\n * with zero dropped requests.\n */\n abstract readonly sharedSecrets: Record<string, SharedSecrets>;\n\n /** Parse a user JWT (kind:'jwt') — AUTHENTICATION only. Return who the user is, or throw. */\n abstract parseJwt(token: string): AuthValues;\n\n /** Verify a Google OIDC token from an allowed caller (kind:'oidc'); throw on failure. */\n abstract verifyOidc(token: string, callers: string[]): Promise<void>;\n\n /**\n * AUTHORIZATION: check the authenticated user against the endpoint's {@link JwtRequirement}.\n * DEFAULT enforces `roles` (any-of; empty = any authenticated user). OVERRIDE to enforce\n * app-defined requirements carried by `@Auth({...})` — e.g.\n * `if (requirement['inOrg'] && !values.claims['orgId']) throw new HttpForbiddenError(...)`.\n * Throw HttpForbiddenError to deny; return to allow. This is the pluggable seam.\n */\n authorizeJwt(values: AuthValues, requirement: JwtRequirement): void {\n const roles = requirement.roles ?? [];\n if (roles.length > 0 && !roles.some((role: string) => values.roles.includes(role))) {\n throw new HttpForbiddenError(`Endpoint requires one of roles: ${roles.join(', ')}`);\n }\n }\n}\n"]}
|
package/src/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { RouteHandler } from './RouteHandler';
|
|
|
13
13
|
export { FilterMatcher, HttpFilter } from './FilterMatcher';
|
|
14
14
|
export { ApiFactory } from './ApiFactory';
|
|
15
15
|
export { ApiClient, ApiClientProxy } from './ApiClient';
|
|
16
|
-
export { AuthConfig, AuthValues,
|
|
16
|
+
export { AuthConfig, AuthValues, SharedSecrets } from './AuthConfig';
|
|
17
17
|
export { fillContext } from './fillContext';
|
|
18
18
|
export { WebpiecesRouter, WebpiecesRouterFactory, WebpiecesRouterOptions } from './WebpiecesRouter';
|
|
19
19
|
export { setupRuntime, RuntimeSetupOptions } from './setupRuntime';
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.WEBPIECES_CONFIG_TOKEN = exports.WebpiecesConfig = exports.RequestContextReader = exports.RuntimeSetupOptions = exports.setupRuntime = exports.WebpiecesRouterFactory =
|
|
3
|
+
exports.WebpiecesRouter = exports.fillContext = exports.SharedSecrets = exports.AuthValues = exports.AuthConfig = exports.ApiClient = exports.FilterMatcher = exports.RouteHandler = exports.MethodMeta = exports.FilterChain = exports.WpResponse = exports.Filter = exports.HttpRequest = exports.FilterDefinition = exports.RouteDefinition = exports.ApiRoutingFactory = exports.buildFrameworkModule = exports.provideFrameworkSingletonAs = exports.provideFrameworkSingleton = exports.provideTransient = exports.provideSingletonAs = exports.provideSingleton = exports.ROUTING_METADATA_KEYS = exports.SourceFile = exports.isDocumentDesign = exports.DocumentDesign = exports.METADATA_KEYS = exports.RouteMetadata = exports.AuthMeta = exports.getQueueName = exports.assertPubSubConventions = exports.assertApiKind = exports.getApiKind = exports.assertEveryEndpointHasAuthMode = exports.getAuthMode = exports.getAuthMeta = exports.isApiPath = exports.getEndpoints = exports.getApiPath = exports.Queue = exports.PubSub = exports.Rpc = exports.AuthSharedSecret = exports.AuthOidc = exports.AuthJwt = exports.Public = exports.AuthenticationConfig = exports.Authentication = exports.Endpoint = exports.ApiPath = void 0;
|
|
4
|
+
exports.WEBPIECES_CONFIG_TOKEN = exports.WebpiecesConfig = exports.RequestContextReader = exports.RuntimeSetupOptions = exports.setupRuntime = exports.WebpiecesRouterFactory = void 0;
|
|
5
5
|
// Re-export API decorators from core-util for convenience
|
|
6
6
|
var core_util_1 = require("@webpieces/core-util");
|
|
7
7
|
Object.defineProperty(exports, "ApiPath", { enumerable: true, get: function () { return core_util_1.ApiPath; } });
|
|
@@ -77,7 +77,6 @@ Object.defineProperty(exports, "ApiClient", { enumerable: true, get: function ()
|
|
|
77
77
|
var AuthConfig_1 = require("./AuthConfig");
|
|
78
78
|
Object.defineProperty(exports, "AuthConfig", { enumerable: true, get: function () { return AuthConfig_1.AuthConfig; } });
|
|
79
79
|
Object.defineProperty(exports, "AuthValues", { enumerable: true, get: function () { return AuthConfig_1.AuthValues; } });
|
|
80
|
-
Object.defineProperty(exports, "ContextValue", { enumerable: true, get: function () { return AuthConfig_1.ContextValue; } });
|
|
81
80
|
Object.defineProperty(exports, "SharedSecrets", { enumerable: true, get: function () { return AuthConfig_1.SharedSecrets; } });
|
|
82
81
|
// Above-boundary context setup shared by every transport adapter.
|
|
83
82
|
var fillContext_1 = require("./fillContext");
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/http/http-routing/src/index.ts"],"names":[],"mappings":";;;;AAAA,0DAA0D;AAC1D,kDA8B8B;AA7B1B,oGAAA,OAAO,OAAA;AACP,qGAAA,QAAQ,OAAA;AACR,2GAAA,cAAc,OAAA;AACd,iHAAA,oBAAoB,OAAA;AACpB,mGAAA,MAAM,OAAA;AACN,oGAAA,OAAO,OAAA;AACP,qGAAA,QAAQ,OAAA;AACR,6GAAA,gBAAgB,OAAA;AAChB,gGAAA,GAAG,OAAA;AACH,mGAAA,MAAM,OAAA;AACN,kGAAA,KAAK,OAAA;AACL,uGAAA,UAAU,OAAA;AACV,yGAAA,YAAY,OAAA;AACZ,sGAAA,SAAS,OAAA;AACT,wGAAA,WAAW,OAAA;AACX,wGAAA,WAAW,OAAA;AACX,2HAAA,8BAA8B,OAAA;AAC9B,uGAAA,UAAU,OAAA;AACV,0GAAA,aAAa,OAAA;AACb,oHAAA,uBAAuB,OAAA;AACvB,yGAAA,YAAY,OAAA;AACZ,qGAAA,QAAQ,OAAA;AACR,0GAAA,aAAa,OAAA;AACb,0GAAA,aAAa,OAAA;AAEb,2EAA2E;AAC3E,oCAAoC;AACpC,2GAAA,cAAc,OAAA;AACd,6GAAA,gBAAgB,OAAA;AAIpB,+CAA+C;AAC/C,2CAGsB;AAFlB,wGAAA,UAAU,OAAA;AACV,mHAAA,qBAAqB,OAAA;AAGzB,iFAAiF;AACjF,wDAAiG;AAAxF,gHAAA,gBAAgB,OAAA;AAAE,kHAAA,kBAAkB,OAAA;AAAE,gHAAA,gBAAgB,OAAA;AAC/D,gGAAgG;AAChG,wDAIiC;AAH7B,yHAAA,yBAAyB,OAAA;AACzB,2HAAA,2BAA2B,OAAA;AAC3B,oHAAA,oBAAoB,OAAA;AAGxB,yDAAmE;AAA1D,sHAAA,iBAAiB,OAAA;AAE1B,qBAAqB;AACrB,2CAKsB;AAFlB,6GAAA,eAAe,OAAA;AACf,8GAAA,gBAAgB,OAAA;AAGpB,sFAAsF;AACtF,+FAA+F;AAC/F,wDAAsD;AAA7C,2GAAA,WAAW,OAAA;AAEpB,qFAAqF;AACrF,mCAAuD;AAA9C,gGAAA,MAAM,OAAA;AAAE,oGAAA,UAAU,OAAA;AAC3B,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAErB,oFAAoF;AACpF,sFAAsF;AAEtF,kBAAkB;AAClB,iDAA4D;AAAnD,8GAAA,aAAa,OAAA;AAItB,yCAAwD;AAA/C,sGAAA,SAAS,OAAA;AAElB,uFAAuF;AACvF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/http/http-routing/src/index.ts"],"names":[],"mappings":";;;;AAAA,0DAA0D;AAC1D,kDA8B8B;AA7B1B,oGAAA,OAAO,OAAA;AACP,qGAAA,QAAQ,OAAA;AACR,2GAAA,cAAc,OAAA;AACd,iHAAA,oBAAoB,OAAA;AACpB,mGAAA,MAAM,OAAA;AACN,oGAAA,OAAO,OAAA;AACP,qGAAA,QAAQ,OAAA;AACR,6GAAA,gBAAgB,OAAA;AAChB,gGAAA,GAAG,OAAA;AACH,mGAAA,MAAM,OAAA;AACN,kGAAA,KAAK,OAAA;AACL,uGAAA,UAAU,OAAA;AACV,yGAAA,YAAY,OAAA;AACZ,sGAAA,SAAS,OAAA;AACT,wGAAA,WAAW,OAAA;AACX,wGAAA,WAAW,OAAA;AACX,2HAAA,8BAA8B,OAAA;AAC9B,uGAAA,UAAU,OAAA;AACV,0GAAA,aAAa,OAAA;AACb,oHAAA,uBAAuB,OAAA;AACvB,yGAAA,YAAY,OAAA;AACZ,qGAAA,QAAQ,OAAA;AACR,0GAAA,aAAa,OAAA;AACb,0GAAA,aAAa,OAAA;AAEb,2EAA2E;AAC3E,oCAAoC;AACpC,2GAAA,cAAc,OAAA;AACd,6GAAA,gBAAgB,OAAA;AAIpB,+CAA+C;AAC/C,2CAGsB;AAFlB,wGAAA,UAAU,OAAA;AACV,mHAAA,qBAAqB,OAAA;AAGzB,iFAAiF;AACjF,wDAAiG;AAAxF,gHAAA,gBAAgB,OAAA;AAAE,kHAAA,kBAAkB,OAAA;AAAE,gHAAA,gBAAgB,OAAA;AAC/D,gGAAgG;AAChG,wDAIiC;AAH7B,yHAAA,yBAAyB,OAAA;AACzB,2HAAA,2BAA2B,OAAA;AAC3B,oHAAA,oBAAoB,OAAA;AAGxB,yDAAmE;AAA1D,sHAAA,iBAAiB,OAAA;AAE1B,qBAAqB;AACrB,2CAKsB;AAFlB,6GAAA,eAAe,OAAA;AACf,8GAAA,gBAAgB,OAAA;AAGpB,sFAAsF;AACtF,+FAA+F;AAC/F,wDAAsD;AAA7C,2GAAA,WAAW,OAAA;AAEpB,qFAAqF;AACrF,mCAAuD;AAA9C,gGAAA,MAAM,OAAA;AAAE,oGAAA,UAAU,OAAA;AAC3B,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAErB,oFAAoF;AACpF,sFAAsF;AAEtF,kBAAkB;AAClB,iDAA4D;AAAnD,8GAAA,aAAa,OAAA;AAItB,yCAAwD;AAA/C,sGAAA,SAAS,OAAA;AAElB,uFAAuF;AACvF,2CAAqE;AAA5D,wGAAA,UAAU,OAAA;AAAE,wGAAA,UAAU,OAAA;AAAE,2GAAA,aAAa,OAAA;AAE9C,kEAAkE;AAClE,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AAEpB,0FAA0F;AAC1F,qDAAoG;AAA3F,kHAAA,eAAe,OAAA;AAAE,yHAAA,sBAAsB,OAAA;AAEhD,8FAA8F;AAC9F,kGAAkG;AAClG,+CAAmE;AAA1D,4GAAA,YAAY,OAAA;AAAE,mHAAA,mBAAmB,OAAA;AAE1C,oFAAoF;AACpF,wDAA+D;AAAtD,oHAAA,oBAAoB,OAAA;AAE7B,uBAAuB;AACvB,qDAA4E;AAAnE,kHAAA,eAAe,OAAA;AAAE,yHAAA,sBAAsB,OAAA","sourcesContent":["// Re-export API decorators from core-util for convenience\nexport {\n ApiPath,\n Endpoint,\n Authentication,\n AuthenticationConfig,\n Public,\n AuthJwt,\n AuthOidc,\n AuthSharedSecret,\n Rpc,\n PubSub,\n Queue,\n getApiPath,\n getEndpoints,\n isApiPath,\n getAuthMeta,\n getAuthMode,\n assertEveryEndpointHasAuthMode,\n getApiKind,\n assertApiKind,\n assertPubSubConventions,\n getQueueName,\n AuthMeta,\n RouteMetadata,\n METADATA_KEYS,\n ValidateImplementation,\n // @DocumentDesign moved to core-util (design-root marker, browser + Node);\n // re-exported here for back-compat.\n DocumentDesign,\n isDocumentDesign,\n} from '@webpieces/core-util';\nexport type { AuthMode, ApiKind } from '@webpieces/core-util';\n\n// Server-side routing decorators and utilities\nexport {\n SourceFile,\n ROUTING_METADATA_KEYS,\n} from './decorators';\n\n// DI provider decorators moved to core-context; re-exported here for back-compat\nexport { provideSingleton, provideSingletonAs, provideTransient } from '@webpieces/core-context';\n// Framework-only DI registry (packages/** framework classes use these; see frameworkProvide.ts)\nexport {\n provideFrameworkSingleton,\n provideFrameworkSingletonAs,\n buildFrameworkModule,\n} from '@webpieces/core-context';\n\nexport { ApiRoutingFactory, ClassType } from './ApiRoutingFactory';\n\n// Core routing types\nexport {\n Routes,\n RouteBuilder,\n RouteDefinition,\n FilterDefinition,\n} from './WebAppMeta';\n\n// The transport-neutral request type (defined in core-context; this is http-routing's\n// public request — a transport adapter builds one and the chain reads it from RequestContext).\nexport { HttpRequest } from '@webpieces/core-context';\n\n// Filter-chain primitives (absorbed from the former @webpieces/http-filters package)\nexport { Filter, WpResponse, Service } from './Filter';\nexport { FilterChain } from './FilterChain';\nexport { MethodMeta } from './MethodMeta';\nexport { RouteHandler } from './RouteHandler';\n\n// RouteBuilderImpl (the route table + chain composer) is now INTERNAL — it is never\n// handed to upper layers. The express layer consumes ApiFactory.apiClients() instead.\n\n// Filter matching\nexport { FilterMatcher, HttpFilter } from './FilterMatcher';\n\n// The public API-surface abstraction: declare routes/filters, get them back as ApiClient[].\nexport { ApiFactory } from './ApiFactory';\nexport { ApiClient, ApiClientProxy } from './ApiClient';\n\n// Auth: the app-provided, container-bound AuthConfig the framework AuthFilter injects.\nexport { AuthConfig, AuthValues, SharedSecrets } from './AuthConfig';\n\n// Above-boundary context setup shared by every transport adapter.\nexport { fillContext } from './fillContext';\n\n// Node-only router (the express-free heart: container + filter chain + in-process client)\nexport { WebpiecesRouter, WebpiecesRouterFactory, WebpiecesRouterOptions } from './WebpiecesRouter';\n\n// The ONE transport-free startup sequence (headers → logging → router → routes) → ApiFactory.\n// Reusable by any company/app and any framework adapter; a company wraps it with its own headers.\nexport { setupRuntime, RuntimeSetupOptions } from './setupRuntime';\n\n// Context readers (Node.js only) moved to core-context; re-exported for back-compat\nexport { RequestContextReader } from '@webpieces/core-context';\n\n// Server configuration\nexport { WebpiecesConfig, WEBPIECES_CONFIG_TOKEN } from './WebpiecesConfig';\n"]}
|