@webpieces/http-routing 0.3.376 → 0.3.378
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 +4 -4
- package/src/WebpiecesConfig.d.ts +10 -0
- package/src/WebpiecesConfig.js +10 -1
- package/src/WebpiecesConfig.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.378",
|
|
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.3.
|
|
26
|
-
"@webpieces/core-util": "0.3.
|
|
27
|
-
"@webpieces/gcp-identity": "0.3.
|
|
25
|
+
"@webpieces/core-context": "0.3.378",
|
|
26
|
+
"@webpieces/core-util": "0.3.378",
|
|
27
|
+
"@webpieces/gcp-identity": "0.3.378",
|
|
28
28
|
"inversify": "7.10.4",
|
|
29
29
|
"jsonwebtoken": "9.0.2",
|
|
30
30
|
"minimatch": "10.0.1"
|
package/src/WebpiecesConfig.d.ts
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
* Per CLAUDE.md: Data-only structure = class
|
|
4
4
|
*/
|
|
5
5
|
export declare class WebpiecesConfig {
|
|
6
|
+
/**
|
|
7
|
+
* EXTRA cross-origin origins to allow, beyond the two that are always allowed: the server's OWN
|
|
8
|
+
* origin (same-origin — a browser sends `Origin` on every POST, even same-origin, so this is what
|
|
9
|
+
* lets a server that also serves its own UI answer its own api calls) and `localhost:*` (dev).
|
|
10
|
+
*
|
|
11
|
+
* Only needed when the browser origin differs from the api origin AND is not localhost — e.g. a
|
|
12
|
+
* UI on a CDN/custom domain calling an api on a different host. Exact origin match, e.g.
|
|
13
|
+
* `['https://app.example.com']`.
|
|
14
|
+
*/
|
|
15
|
+
corsOrigins?: string[];
|
|
6
16
|
/**
|
|
7
17
|
* Record EVERY request as a test case (fixture + generated spec), instead
|
|
8
18
|
* of only requests carrying the x-webpieces-recording header.
|
package/src/WebpiecesConfig.js
CHANGED
|
@@ -6,7 +6,16 @@ exports.WEBPIECES_CONFIG_TOKEN = exports.WebpiecesConfig = void 0;
|
|
|
6
6
|
* Per CLAUDE.md: Data-only structure = class
|
|
7
7
|
*/
|
|
8
8
|
class WebpiecesConfig {
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* EXTRA cross-origin origins to allow, beyond the two that are always allowed: the server's OWN
|
|
11
|
+
* origin (same-origin — a browser sends `Origin` on every POST, even same-origin, so this is what
|
|
12
|
+
* lets a server that also serves its own UI answer its own api calls) and `localhost:*` (dev).
|
|
13
|
+
*
|
|
14
|
+
* Only needed when the browser origin differs from the api origin AND is not localhost — e.g. a
|
|
15
|
+
* UI on a CDN/custom domain calling an api on a different host. Exact origin match, e.g.
|
|
16
|
+
* `['https://app.example.com']`.
|
|
17
|
+
*/
|
|
18
|
+
corsOrigins;
|
|
10
19
|
/**
|
|
11
20
|
* Record EVERY request as a test case (fixture + generated spec), instead
|
|
12
21
|
* of only requests carrying the x-webpieces-recording header.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebpiecesConfig.js","sourceRoot":"","sources":["../../../../../packages/http/http-routing/src/WebpiecesConfig.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAa,eAAe;IACxB,
|
|
1
|
+
{"version":3,"file":"WebpiecesConfig.js","sourceRoot":"","sources":["../../../../../packages/http/http-routing/src/WebpiecesConfig.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAa,eAAe;IACxB;;;;;;;;OAQG;IACH,WAAW,CAAY;IAEvB;;;;OAIG;IACH,iBAAiB,CAAW;IAE5B;;;OAGG;IACH,YAAY,CAAU;CACzB;AAxBD,0CAwBC;AAED;;GAEG;AACU,QAAA,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["/**\n * Configuration for WebPieces server.\n * Per CLAUDE.md: Data-only structure = class\n */\nexport class WebpiecesConfig {\n /**\n * EXTRA cross-origin origins to allow, beyond the two that are always allowed: the server's OWN\n * origin (same-origin — a browser sends `Origin` on every POST, even same-origin, so this is what\n * lets a server that also serves its own UI answer its own api calls) and `localhost:*` (dev).\n *\n * Only needed when the browser origin differs from the api origin AND is not localhost — e.g. a\n * UI on a CDN/custom domain calling an api on a different host. Exact origin match, e.g.\n * `['https://app.example.com']`.\n */\n corsOrigins?: string[];\n\n /**\n * Record EVERY request as a test case (fixture + generated spec), instead\n * of only requests carrying the x-webpieces-recording header.\n * Intended for tests/dev - do not leave on in production.\n */\n recordingAlwaysOn?: boolean;\n\n /**\n * Directory where recorded fixtures + generated specs are written.\n * When unset, recordings are only logged.\n */\n recordingDir?: string;\n}\n\n/**\n * DI token for WebpiecesConfig injection.\n */\nexport const WEBPIECES_CONFIG_TOKEN = Symbol.for('WebpiecesConfig');\n"]}
|