@webpieces/http-routing 0.4.439 → 0.4.441

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webpieces/http-routing",
3
- "version": "0.4.439",
3
+ "version": "0.4.441",
4
4
  "description": "Decorator-based routing with auto-wiring for WebPieces",
5
5
  "type": "commonjs",
6
6
  "main": "./src/index.js",
@@ -22,9 +22,9 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@inversifyjs/binding-decorators": "1.1.5",
25
- "@webpieces/core-context": "0.4.439",
26
- "@webpieces/core-util": "0.4.439",
27
- "@webpieces/gcp-identity": "0.4.439",
25
+ "@webpieces/core-context": "0.4.441",
26
+ "@webpieces/core-util": "0.4.441",
27
+ "@webpieces/gcp-identity": "0.4.441",
28
28
  "inversify": "7.10.4",
29
29
  "jsonwebtoken": "9.0.2",
30
30
  "minimatch": "10.0.1"
@@ -1,5 +1,5 @@
1
1
  import { ContainerModule } from 'inversify';
2
- import { ContextKey } from '@webpieces/core-util';
2
+ import { AnyContextKey } from '@webpieces/core-util';
3
3
  import { WebpiecesRouter } from './WebpiecesRouter';
4
4
  /**
5
5
  * RouteModule - a reusable, named group of routes + filters, configured onto the
@@ -38,7 +38,7 @@ export interface RouteModule {
38
38
  * static create(): MyAppModules { return new MyAppModules(); }
39
39
  * getBindingModules(): ContainerModule[] { return [InversifyModule]; }
40
40
  * getRoutingModules(): RouteModule[] { return [new AppRoutes()]; }
41
- * getHeaders(): ContextKey[] { return AppHeaders.getAllHeaders(); }
41
+ * getHeaders(): AnyContextKey[] { return AppHeaders.getAllHeaders(); }
42
42
  * }
43
43
  *
44
44
  * // server.ts
@@ -55,5 +55,5 @@ export interface AppModules {
55
55
  getRoutingModules(): RouteModule[];
56
56
  /** This company's own context keys(usually all keys across all servers),
57
57
  * registered into the global HeaderRegistry at startup. */
58
- getHeaders(): ContextKey[];
58
+ getHeaders(): AnyContextKey[];
59
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AppModules.js","sourceRoot":"","sources":["../../../../../packages/http/http-routing/src/AppModules.ts"],"names":[],"mappings":"","sourcesContent":["import { ContainerModule } from 'inversify';\nimport { ContextKey } from '@webpieces/core-util';\nimport { WebpiecesRouter } from './WebpiecesRouter';\n\n/**\n * RouteModule - a reusable, named group of routes + filters, configured onto the\n * {@link WebpiecesRouter}. This is the TypeScript analog of a Java WebPieces \"RouteModule\":\n * instead of one anonymous `(router) => { ... }` block, each cohesive group of routes/filters\n * lives in its own named class, and an app composes several of them.\n *\n * A RouteModule holds business logic (it configures the router), so it is an interface — the\n * same category as {@link Routes} / {@link Filter}, NOT a data-only class (per the webpieces\n * guidelines).\n *\n * ```ts\n * export class AuthRoutes implements RouteModule {\n * configure(router: WebpiecesRouter): void {\n * router.addFilter(new FilterDefinition(1800, MyFilter, '*')); // your own filters only\n * router.addRoutes(AuthApi, AuthController);\n * }\n * }\n * ```\n */\nexport interface RouteModule {\n /** Declare this group's routes + filters via {@link WebpiecesRouter.addRoutes} / addFilter. */\n configure(router: WebpiecesRouter): void;\n}\n\n/**\n * AppModules - an app's COMPLETE server-surface declaration in one object: its DI binding modules,\n * its route groups, and its own context-key headers. It replaces the old split of a\n * `ContainerModule[]` + a `ContextKey[]` + an inline `(router) => void` callback threaded through\n * the bootstrap in separate arguments.\n *\n * Apps implement this on a class with a static `create()` factory, so the real server AND its\n * tests build the SAME object (tests then tweak it / pass a test override module):\n *\n * ```ts\n * export class MyAppModules implements AppModules {\n * static create(): MyAppModules { return new MyAppModules(); }\n * getBindingModules(): ContainerModule[] { return [InversifyModule]; }\n * getRoutingModules(): RouteModule[] { return [new AppRoutes()]; }\n * getHeaders(): ContextKey[] { return AppHeaders.getAllHeaders(); }\n * }\n *\n * // server.ts\n * await bootstrapServer(new BootstrapOptions(8200, 'my-svr'), MyAppModules.create());\n * ```\n *\n * AppModules is a provider interface (it hands back the app's pieces), the same category as the\n * former WebAppMeta — hence an interface, not a data-only class.\n */\nexport interface AppModules {\n /** App-specific DI ContainerModules (beyond the standard company/framework set). */\n getBindingModules(): ContainerModule[];\n /** The route groups to configure onto the router, in order. */\n getRoutingModules(): RouteModule[];\n /** This company's own context keys(usually all keys across all servers),\n * registered into the global HeaderRegistry at startup. */\n getHeaders(): ContextKey[];\n}\n"]}
1
+ {"version":3,"file":"AppModules.js","sourceRoot":"","sources":["../../../../../packages/http/http-routing/src/AppModules.ts"],"names":[],"mappings":"","sourcesContent":["import { ContainerModule } from 'inversify';\nimport { ContextKey, AnyContextKey } from '@webpieces/core-util';\nimport { WebpiecesRouter } from './WebpiecesRouter';\n\n/**\n * RouteModule - a reusable, named group of routes + filters, configured onto the\n * {@link WebpiecesRouter}. This is the TypeScript analog of a Java WebPieces \"RouteModule\":\n * instead of one anonymous `(router) => { ... }` block, each cohesive group of routes/filters\n * lives in its own named class, and an app composes several of them.\n *\n * A RouteModule holds business logic (it configures the router), so it is an interface — the\n * same category as {@link Routes} / {@link Filter}, NOT a data-only class (per the webpieces\n * guidelines).\n *\n * ```ts\n * export class AuthRoutes implements RouteModule {\n * configure(router: WebpiecesRouter): void {\n * router.addFilter(new FilterDefinition(1800, MyFilter, '*')); // your own filters only\n * router.addRoutes(AuthApi, AuthController);\n * }\n * }\n * ```\n */\nexport interface RouteModule {\n /** Declare this group's routes + filters via {@link WebpiecesRouter.addRoutes} / addFilter. */\n configure(router: WebpiecesRouter): void;\n}\n\n/**\n * AppModules - an app's COMPLETE server-surface declaration in one object: its DI binding modules,\n * its route groups, and its own context-key headers. It replaces the old split of a\n * `ContainerModule[]` + a `ContextKey[]` + an inline `(router) => void` callback threaded through\n * the bootstrap in separate arguments.\n *\n * Apps implement this on a class with a static `create()` factory, so the real server AND its\n * tests build the SAME object (tests then tweak it / pass a test override module):\n *\n * ```ts\n * export class MyAppModules implements AppModules {\n * static create(): MyAppModules { return new MyAppModules(); }\n * getBindingModules(): ContainerModule[] { return [InversifyModule]; }\n * getRoutingModules(): RouteModule[] { return [new AppRoutes()]; }\n * getHeaders(): AnyContextKey[] { return AppHeaders.getAllHeaders(); }\n * }\n *\n * // server.ts\n * await bootstrapServer(new BootstrapOptions(8200, 'my-svr'), MyAppModules.create());\n * ```\n *\n * AppModules is a provider interface (it hands back the app's pieces), the same category as the\n * former WebAppMeta — hence an interface, not a data-only class.\n */\nexport interface AppModules {\n /** App-specific DI ContainerModules (beyond the standard company/framework set). */\n getBindingModules(): ContainerModule[];\n /** The route groups to configure onto the router, in order. */\n getRoutingModules(): RouteModule[];\n /** This company's own context keys(usually all keys across all servers),\n * registered into the global HeaderRegistry at startup. */\n getHeaders(): AnyContextKey[];\n}\n"]}