@venizia/ignis-kernel 0.2.0-34 → 0.2.0-36
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/dist/cjs/base/controllers/common/constants.d.ts +5 -15
- package/dist/cjs/base/controllers/common/constants.d.ts.map +1 -1
- package/dist/cjs/base/controllers/common/constants.js +6 -31
- package/dist/cjs/base/controllers/common/constants.js.map +1 -1
- package/dist/cjs/base/controllers/common/index.d.ts +1 -0
- package/dist/cjs/base/controllers/common/index.d.ts.map +1 -1
- package/dist/cjs/base/controllers/common/index.js +2 -0
- package/dist/cjs/base/controllers/common/index.js.map +1 -1
- package/dist/cjs/base/controllers/common/schemas.d.ts +25 -0
- package/dist/cjs/base/controllers/common/schemas.d.ts.map +1 -0
- package/dist/cjs/base/controllers/common/schemas.js +44 -0
- package/dist/cjs/base/controllers/common/schemas.js.map +1 -0
- package/dist/cjs/metadata.d.ts +33 -0
- package/dist/cjs/metadata.d.ts.map +1 -0
- package/dist/cjs/metadata.js +49 -0
- package/dist/cjs/metadata.js.map +1 -0
- package/dist/esm/base/controllers/common/constants.d.ts +5 -15
- package/dist/esm/base/controllers/common/constants.d.ts.map +1 -1
- package/dist/esm/base/controllers/common/constants.js +5 -30
- package/dist/esm/base/controllers/common/constants.js.map +1 -1
- package/dist/esm/base/controllers/common/index.d.ts +1 -0
- package/dist/esm/base/controllers/common/index.d.ts.map +1 -1
- package/dist/esm/base/controllers/common/index.js +2 -0
- package/dist/esm/base/controllers/common/index.js.map +1 -1
- package/dist/esm/base/controllers/common/schemas.d.ts +25 -0
- package/dist/esm/base/controllers/common/schemas.d.ts.map +1 -0
- package/dist/esm/base/controllers/common/schemas.js +41 -0
- package/dist/esm/base/controllers/common/schemas.js.map +1 -0
- package/dist/esm/metadata.d.ts +33 -0
- package/dist/esm/metadata.d.ts.map +1 -0
- package/dist/esm/metadata.js +31 -0
- package/dist/esm/metadata.js.map +1 -0
- package/package.json +11 -5
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { z } from '@hono/zod-openapi';
|
|
2
1
|
import type { TConstValue } from '@venizia/ignis-helpers/common';
|
|
3
2
|
import type { TResponseHeaders } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Constants with NO zod import, deliberately. The container's controller mixin imports
|
|
5
|
+
* `ControllerTransports` from here, so anything this file pulls in reaches every consumer of
|
|
6
|
+
* `Container` - the request schemas live in `schemas.ts` for exactly that reason.
|
|
7
|
+
*/
|
|
4
8
|
/** Transport protocol constants for controllers. */
|
|
5
9
|
export declare class ControllerTransports {
|
|
6
10
|
static readonly REST = "rest";
|
|
@@ -21,20 +25,6 @@ export declare class RestPaths {
|
|
|
21
25
|
static readonly COUNT = "/count";
|
|
22
26
|
static readonly FIND_ONE = "/find-one";
|
|
23
27
|
}
|
|
24
|
-
export declare const trackableHeaders: z.ZodObject<{
|
|
25
|
-
"x-request-id": z.ZodOptional<z.ZodString>;
|
|
26
|
-
"x-request-channel": z.ZodOptional<z.ZodString>;
|
|
27
|
-
"x-device-info": z.ZodOptional<z.ZodString>;
|
|
28
|
-
}, z.core.$strip>;
|
|
29
|
-
export declare const countableHeaders: z.ZodObject<{
|
|
30
|
-
"x-request-count": z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
export declare const defaultRequestHeaders: z.ZodObject<{
|
|
33
|
-
"x-request-id": z.ZodOptional<z.ZodString>;
|
|
34
|
-
"x-request-channel": z.ZodOptional<z.ZodString>;
|
|
35
|
-
"x-device-info": z.ZodOptional<z.ZodString>;
|
|
36
|
-
"x-request-count": z.ZodOptional<z.ZodString>;
|
|
37
|
-
}, z.core.$strip>;
|
|
38
28
|
export declare const commonResponseHeaders: TResponseHeaders;
|
|
39
29
|
export declare const findResponseHeaders: TResponseHeaders;
|
|
40
30
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/constants.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;GAIG;AAEH,oDAAoD;AACpD,qBAAa,oBAAoB;IAC/B,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;CAC/B;AAED,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE5E,iGAAiG;AACjG,qBAAa,eAAe;IAC1B,MAAM,CAAC,QAAQ,CAAC,MAAM,YAAY;IAClC,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAEhC,MAAM,CAAC,QAAQ,CAAC,UAAU,cAA8C;IAExE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGvC;AAED,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC;AAElE,6DAA6D;AAC7D,qBAAa,SAAS;IACpB,MAAM,CAAC,QAAQ,CAAC,IAAI,OAAO;IAC3B,MAAM,CAAC,QAAQ,CAAC,KAAK,YAAY;IACjC,MAAM,CAAC,QAAQ,CAAC,QAAQ,eAAe;CACxC;AAED,eAAO,MAAM,qBAAqB,EAAE,gBAanC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,gBAMjC,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findResponseHeaders = exports.commonResponseHeaders = exports.
|
|
4
|
-
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
3
|
+
exports.findResponseHeaders = exports.commonResponseHeaders = exports.RestPaths = exports.ResponseFormats = exports.ControllerTransports = void 0;
|
|
5
4
|
const common_1 = require("@venizia/ignis-helpers/common");
|
|
5
|
+
/**
|
|
6
|
+
* Constants with NO zod import, deliberately. The container's controller mixin imports
|
|
7
|
+
* `ControllerTransports` from here, so anything this file pulls in reaches every consumer of
|
|
8
|
+
* `Container` - the request schemas live in `schemas.ts` for exactly that reason.
|
|
9
|
+
*/
|
|
6
10
|
/** Transport protocol constants for controllers. */
|
|
7
11
|
class ControllerTransports {
|
|
8
12
|
static { this.REST = 'rest'; }
|
|
@@ -26,35 +30,6 @@ class RestPaths {
|
|
|
26
30
|
static { this.FIND_ONE = '/find-one'; }
|
|
27
31
|
}
|
|
28
32
|
exports.RestPaths = RestPaths;
|
|
29
|
-
exports.trackableHeaders = zod_openapi_1.z.object({
|
|
30
|
-
[common_1.HTTP.Headers.REQUEST_TRACING_ID]: zod_openapi_1.z.string().optional().openapi({
|
|
31
|
-
description: 'Optional request ID',
|
|
32
|
-
}),
|
|
33
|
-
[common_1.HTTP.Headers.REQUEST_CHANNEL]: zod_openapi_1.z
|
|
34
|
-
.string()
|
|
35
|
-
.optional()
|
|
36
|
-
.openapi({
|
|
37
|
-
description: 'Optional request channel',
|
|
38
|
-
examples: ['channel-1', 'web', 'spos'],
|
|
39
|
-
}),
|
|
40
|
-
[common_1.HTTP.Headers.REQUEST_DEVICE_INFO]: zod_openapi_1.z
|
|
41
|
-
.string()
|
|
42
|
-
.optional()
|
|
43
|
-
.openapi({
|
|
44
|
-
description: 'Optional request device info',
|
|
45
|
-
examples: ['dev-1', 'device-abc', 'd-unique-id'],
|
|
46
|
-
}),
|
|
47
|
-
});
|
|
48
|
-
exports.countableHeaders = zod_openapi_1.z.object({
|
|
49
|
-
[common_1.HTTP.Headers.REQUEST_COUNT_DATA]: zod_openapi_1.z
|
|
50
|
-
.string()
|
|
51
|
-
.optional()
|
|
52
|
-
.openapi({
|
|
53
|
-
description: 'Controls response format. When "true" (default): returns {count, data}. When "false": returns data only.',
|
|
54
|
-
examples: ['true', '1', 'false', '0'],
|
|
55
|
-
}),
|
|
56
|
-
});
|
|
57
|
-
exports.defaultRequestHeaders = exports.trackableHeaders.extend(exports.countableHeaders.shape);
|
|
58
33
|
exports.commonResponseHeaders = {
|
|
59
34
|
[common_1.HTTP.Headers.REQUEST_TRACING_ID]: {
|
|
60
35
|
description: 'Echo of the request tracing ID',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/base/controllers/common/constants.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/base/controllers/common/constants.ts"],"names":[],"mappings":";;;AACA,0DAAqD;AAGrD;;;;GAIG;AAEH,oDAAoD;AACpD,MAAa,oBAAoB;aACf,SAAI,GAAG,MAAM,CAAC;aACd,SAAI,GAAG,MAAM,CAAC;;AAFhC,oDAGC;AAID,iGAAiG;AACjG,MAAa,eAAe;aACV,WAAM,GAAG,QAAQ,CAAC;aAClB,UAAK,GAAG,OAAO,CAAC;aAEhB,eAAU,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAExE,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,0CASC;AAID,6DAA6D;AAC7D,MAAa,SAAS;aACJ,SAAI,GAAG,GAAG,CAAC;aACX,UAAK,GAAG,QAAQ,CAAC;aACjB,aAAQ,GAAG,WAAW,CAAC;;AAHzC,8BAIC;AAEY,QAAA,qBAAqB,GAAqB;IACrD,CAAC,aAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE;QACjC,WAAW,EAAE,gCAAgC;QAC7C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC3B;IACD,CAAC,aAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE;QAClC,WAAW,EAAE,+BAA+B;QAC5C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE;KACzD;IACD,CAAC,aAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE;QAC9B,WAAW,EAAE,2BAA2B;QACxC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE;KAC1D;CACF,CAAC;AAEW,QAAA,mBAAmB,GAAqB;IACnD,GAAG,6BAAqB;IACxB,CAAC,aAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;QAC5B,WAAW,EAAE,yDAAyD;QACtE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,EAAE;KAChF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAE5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
@@ -15,5 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./constants"), exports);
|
|
18
|
+
// Carries zod. Kept out of `constants.ts` so importing `Container` does not pull zod into a bundle.
|
|
19
|
+
__exportStar(require("./schemas"), exports);
|
|
18
20
|
__exportStar(require("./types"), exports);
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/base/controllers/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/base/controllers/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,oGAAoG;AACpG,4CAA0B;AAC1B,0CAAwB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from '@hono/zod-openapi';
|
|
2
|
+
/**
|
|
3
|
+
* The zod-backed request schemas, kept apart from `constants.ts` ON PURPOSE.
|
|
4
|
+
*
|
|
5
|
+
* `z.object()` runs at module load, so a file that calls it pulls the whole of zod into any bundle
|
|
6
|
+
* that touches it. `constants.ts` carries `ControllerTransports`, which the container's controller
|
|
7
|
+
* mixin imports - so while these lived beside it, importing `Container` alone cost 437 KB in a
|
|
8
|
+
* browser bundle, 423 KB of it zod, for a four-line const class. Keep this file out of any path a
|
|
9
|
+
* non-REST consumer can reach.
|
|
10
|
+
*/
|
|
11
|
+
export declare const trackableHeaders: z.ZodObject<{
|
|
12
|
+
"x-request-id": z.ZodOptional<z.ZodString>;
|
|
13
|
+
"x-request-channel": z.ZodOptional<z.ZodString>;
|
|
14
|
+
"x-device-info": z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const countableHeaders: z.ZodObject<{
|
|
17
|
+
"x-request-count": z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const defaultRequestHeaders: z.ZodObject<{
|
|
20
|
+
"x-request-id": z.ZodOptional<z.ZodString>;
|
|
21
|
+
"x-request-channel": z.ZodOptional<z.ZodString>;
|
|
22
|
+
"x-device-info": z.ZodOptional<z.ZodString>;
|
|
23
|
+
"x-request-count": z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAGtC;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;iBAkB3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;iBAS3B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;iBAAkD,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultRequestHeaders = exports.countableHeaders = exports.trackableHeaders = void 0;
|
|
4
|
+
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
|
+
const common_1 = require("@venizia/ignis-helpers/common");
|
|
6
|
+
/**
|
|
7
|
+
* The zod-backed request schemas, kept apart from `constants.ts` ON PURPOSE.
|
|
8
|
+
*
|
|
9
|
+
* `z.object()` runs at module load, so a file that calls it pulls the whole of zod into any bundle
|
|
10
|
+
* that touches it. `constants.ts` carries `ControllerTransports`, which the container's controller
|
|
11
|
+
* mixin imports - so while these lived beside it, importing `Container` alone cost 437 KB in a
|
|
12
|
+
* browser bundle, 423 KB of it zod, for a four-line const class. Keep this file out of any path a
|
|
13
|
+
* non-REST consumer can reach.
|
|
14
|
+
*/
|
|
15
|
+
exports.trackableHeaders = zod_openapi_1.z.object({
|
|
16
|
+
[common_1.HTTP.Headers.REQUEST_TRACING_ID]: zod_openapi_1.z.string().optional().openapi({
|
|
17
|
+
description: 'Optional request ID',
|
|
18
|
+
}),
|
|
19
|
+
[common_1.HTTP.Headers.REQUEST_CHANNEL]: zod_openapi_1.z
|
|
20
|
+
.string()
|
|
21
|
+
.optional()
|
|
22
|
+
.openapi({
|
|
23
|
+
description: 'Optional request channel',
|
|
24
|
+
examples: ['channel-1', 'web', 'spos'],
|
|
25
|
+
}),
|
|
26
|
+
[common_1.HTTP.Headers.REQUEST_DEVICE_INFO]: zod_openapi_1.z
|
|
27
|
+
.string()
|
|
28
|
+
.optional()
|
|
29
|
+
.openapi({
|
|
30
|
+
description: 'Optional request device info',
|
|
31
|
+
examples: ['dev-1', 'device-abc', 'd-unique-id'],
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
34
|
+
exports.countableHeaders = zod_openapi_1.z.object({
|
|
35
|
+
[common_1.HTTP.Headers.REQUEST_COUNT_DATA]: zod_openapi_1.z
|
|
36
|
+
.string()
|
|
37
|
+
.optional()
|
|
38
|
+
.openapi({
|
|
39
|
+
description: 'Controls response format. When "true" (default): returns {count, data}. When "false": returns data only.',
|
|
40
|
+
examples: ['true', '1', 'false', '0'],
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
43
|
+
exports.defaultRequestHeaders = exports.trackableHeaders.extend(exports.countableHeaders.shape);
|
|
44
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../../src/base/controllers/common/schemas.ts"],"names":[],"mappings":";;;AAAA,mDAAsC;AACtC,0DAAqD;AAErD;;;;;;;;GAQG;AACU,QAAA,gBAAgB,GAAG,eAAC,CAAC,MAAM,CAAC;IACvC,CAAC,aAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,eAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC;QAC/D,WAAW,EAAE,qBAAqB;KACnC,CAAC;IACF,CAAC,aAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,eAAC;SAC9B,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EAAE,0BAA0B;QACvC,QAAQ,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC;KACvC,CAAC;IACJ,CAAC,aAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,eAAC;SAClC,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,aAAa,CAAC;KACjD,CAAC;CACL,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,eAAC,CAAC,MAAM,CAAC;IACvC,CAAC,aAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,eAAC;SACjC,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EACT,0GAA0G;QAC5G,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC;KACtC,CAAC;CACL,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAAG,wBAAgB,CAAC,MAAM,CAAC,wBAAgB,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a class is MARKED as an artifact, and nothing about how one is served.
|
|
3
|
+
*
|
|
4
|
+
* The root barrel is 161 KB gzipped, correctly - it carries the REST surface. This entry is 23 KB,
|
|
5
|
+
* for a consumer that only registers and resolves classes.
|
|
6
|
+
*
|
|
7
|
+
* Listed export by export rather than re-exporting `base/metadata`, which today happens to be free
|
|
8
|
+
* of the transport surface but promises nothing. The point of a sub-path is a surface someone
|
|
9
|
+
* DECIDED on: what lands here is a choice, not whatever that directory grows into. The saving over
|
|
10
|
+
* the barrel is about 2 KB; the boundary is the product.
|
|
11
|
+
*
|
|
12
|
+
* The weight is a contract, checked by `src/__tests__/bundle/browser-weight.test.ts`.
|
|
13
|
+
*/
|
|
14
|
+
export { component, configuration, injectable, pickRegistrationOptions, provide, service, } from './base/metadata/injectable';
|
|
15
|
+
export { datasource, model, repository } from './base/metadata/persistents';
|
|
16
|
+
export { inject } from './base/metadata/injectors';
|
|
17
|
+
export { ArtifactNamespaces, BindingNamespaces } from './common/bindings';
|
|
18
|
+
export type { TBindingNamespace } from './common/bindings';
|
|
19
|
+
/**
|
|
20
|
+
* `CoreBindings` is deliberately NOT here, and adding it back would be a mistake worth naming.
|
|
21
|
+
*
|
|
22
|
+
* The namespaces above are the GRAMMAR of a binding key - how one is spelled, whoever is doing the
|
|
23
|
+
* binding. `CoreBindings` is one application's DICTIONARY: `APPLICATION_SERVER`,
|
|
24
|
+
* `APPLICATION_ROOT_ROUTER`, keys a server binds and a browser never will. A second framework in
|
|
25
|
+
* this house already ships its own `CoreBindings` whose `APPLICATION_INSTANCE` is a different
|
|
26
|
+
* string, so exporting ours beside the stereotypes puts two same-named classes one import away from
|
|
27
|
+
* each other - bind under one, resolve under the other, and nothing fails until run time.
|
|
28
|
+
*
|
|
29
|
+
* It stays on the root barrel, where a consumer asking for the server surface finds it.
|
|
30
|
+
*/
|
|
31
|
+
export { ArtifactTypes, BindingKeys, MetadataRegistry } from './helpers/inversion';
|
|
32
|
+
export type { IArtifactMetadata, IArtifactRegistrationOptions, TBindingScope, } from './helpers/inversion';
|
|
33
|
+
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,OAAO,EACP,OAAO,GACR,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACnF,YAAY,EACV,iBAAiB,EACjB,4BAA4B,EAC5B,aAAa,GACd,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* How a class is MARKED as an artifact, and nothing about how one is served.
|
|
4
|
+
*
|
|
5
|
+
* The root barrel is 161 KB gzipped, correctly - it carries the REST surface. This entry is 23 KB,
|
|
6
|
+
* for a consumer that only registers and resolves classes.
|
|
7
|
+
*
|
|
8
|
+
* Listed export by export rather than re-exporting `base/metadata`, which today happens to be free
|
|
9
|
+
* of the transport surface but promises nothing. The point of a sub-path is a surface someone
|
|
10
|
+
* DECIDED on: what lands here is a choice, not whatever that directory grows into. The saving over
|
|
11
|
+
* the barrel is about 2 KB; the boundary is the product.
|
|
12
|
+
*
|
|
13
|
+
* The weight is a contract, checked by `src/__tests__/bundle/browser-weight.test.ts`.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.MetadataRegistry = exports.BindingKeys = exports.ArtifactTypes = exports.BindingNamespaces = exports.ArtifactNamespaces = exports.inject = exports.repository = exports.model = exports.datasource = exports.service = exports.provide = exports.pickRegistrationOptions = exports.injectable = exports.configuration = exports.component = void 0;
|
|
17
|
+
var injectable_1 = require("./base/metadata/injectable");
|
|
18
|
+
Object.defineProperty(exports, "component", { enumerable: true, get: function () { return injectable_1.component; } });
|
|
19
|
+
Object.defineProperty(exports, "configuration", { enumerable: true, get: function () { return injectable_1.configuration; } });
|
|
20
|
+
Object.defineProperty(exports, "injectable", { enumerable: true, get: function () { return injectable_1.injectable; } });
|
|
21
|
+
Object.defineProperty(exports, "pickRegistrationOptions", { enumerable: true, get: function () { return injectable_1.pickRegistrationOptions; } });
|
|
22
|
+
Object.defineProperty(exports, "provide", { enumerable: true, get: function () { return injectable_1.provide; } });
|
|
23
|
+
Object.defineProperty(exports, "service", { enumerable: true, get: function () { return injectable_1.service; } });
|
|
24
|
+
var persistents_1 = require("./base/metadata/persistents");
|
|
25
|
+
Object.defineProperty(exports, "datasource", { enumerable: true, get: function () { return persistents_1.datasource; } });
|
|
26
|
+
Object.defineProperty(exports, "model", { enumerable: true, get: function () { return persistents_1.model; } });
|
|
27
|
+
Object.defineProperty(exports, "repository", { enumerable: true, get: function () { return persistents_1.repository; } });
|
|
28
|
+
var injectors_1 = require("./base/metadata/injectors");
|
|
29
|
+
Object.defineProperty(exports, "inject", { enumerable: true, get: function () { return injectors_1.inject; } });
|
|
30
|
+
var bindings_1 = require("./common/bindings");
|
|
31
|
+
Object.defineProperty(exports, "ArtifactNamespaces", { enumerable: true, get: function () { return bindings_1.ArtifactNamespaces; } });
|
|
32
|
+
Object.defineProperty(exports, "BindingNamespaces", { enumerable: true, get: function () { return bindings_1.BindingNamespaces; } });
|
|
33
|
+
/**
|
|
34
|
+
* `CoreBindings` is deliberately NOT here, and adding it back would be a mistake worth naming.
|
|
35
|
+
*
|
|
36
|
+
* The namespaces above are the GRAMMAR of a binding key - how one is spelled, whoever is doing the
|
|
37
|
+
* binding. `CoreBindings` is one application's DICTIONARY: `APPLICATION_SERVER`,
|
|
38
|
+
* `APPLICATION_ROOT_ROUTER`, keys a server binds and a browser never will. A second framework in
|
|
39
|
+
* this house already ships its own `CoreBindings` whose `APPLICATION_INSTANCE` is a different
|
|
40
|
+
* string, so exporting ours beside the stereotypes puts two same-named classes one import away from
|
|
41
|
+
* each other - bind under one, resolve under the other, and nothing fails until run time.
|
|
42
|
+
*
|
|
43
|
+
* It stays on the root barrel, where a consumer asking for the server surface finds it.
|
|
44
|
+
*/
|
|
45
|
+
var inversion_1 = require("./helpers/inversion");
|
|
46
|
+
Object.defineProperty(exports, "ArtifactTypes", { enumerable: true, get: function () { return inversion_1.ArtifactTypes; } });
|
|
47
|
+
Object.defineProperty(exports, "BindingKeys", { enumerable: true, get: function () { return inversion_1.BindingKeys; } });
|
|
48
|
+
Object.defineProperty(exports, "MetadataRegistry", { enumerable: true, get: function () { return inversion_1.MetadataRegistry; } });
|
|
49
|
+
//# sourceMappingURL=metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAEH,yDAOoC;AANlC,uGAAA,SAAS,OAAA;AACT,2GAAA,aAAa,OAAA;AACb,wGAAA,UAAU,OAAA;AACV,qHAAA,uBAAuB,OAAA;AACvB,qGAAA,OAAO,OAAA;AACP,qGAAA,OAAO,OAAA;AAET,2DAA4E;AAAnE,yGAAA,UAAU,OAAA;AAAE,oGAAA,KAAK,OAAA;AAAE,yGAAA,UAAU,OAAA;AACtC,uDAAmD;AAA1C,mGAAA,MAAM,OAAA;AAEf,8CAA0E;AAAjE,8GAAA,kBAAkB,OAAA;AAAE,6GAAA,iBAAiB,OAAA;AAG9C;;;;;;;;;;;GAWG;AAEH,iDAAmF;AAA1E,0GAAA,aAAa,OAAA;AAAE,wGAAA,WAAW,OAAA;AAAE,6GAAA,gBAAgB,OAAA"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { z } from '@hono/zod-openapi';
|
|
2
1
|
import type { TConstValue } from '@venizia/ignis-helpers/common';
|
|
3
2
|
import type { TResponseHeaders } from './types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Constants with NO zod import, deliberately. The container's controller mixin imports
|
|
5
|
+
* `ControllerTransports` from here, so anything this file pulls in reaches every consumer of
|
|
6
|
+
* `Container` - the request schemas live in `schemas.ts` for exactly that reason.
|
|
7
|
+
*/
|
|
4
8
|
/** Transport protocol constants for controllers. */
|
|
5
9
|
export declare class ControllerTransports {
|
|
6
10
|
static readonly REST = "rest";
|
|
@@ -21,20 +25,6 @@ export declare class RestPaths {
|
|
|
21
25
|
static readonly COUNT = "/count";
|
|
22
26
|
static readonly FIND_ONE = "/find-one";
|
|
23
27
|
}
|
|
24
|
-
export declare const trackableHeaders: z.ZodObject<{
|
|
25
|
-
"x-request-id": z.ZodOptional<z.ZodString>;
|
|
26
|
-
"x-request-channel": z.ZodOptional<z.ZodString>;
|
|
27
|
-
"x-device-info": z.ZodOptional<z.ZodString>;
|
|
28
|
-
}, z.core.$strip>;
|
|
29
|
-
export declare const countableHeaders: z.ZodObject<{
|
|
30
|
-
"x-request-count": z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
export declare const defaultRequestHeaders: z.ZodObject<{
|
|
33
|
-
"x-request-id": z.ZodOptional<z.ZodString>;
|
|
34
|
-
"x-request-channel": z.ZodOptional<z.ZodString>;
|
|
35
|
-
"x-device-info": z.ZodOptional<z.ZodString>;
|
|
36
|
-
"x-request-count": z.ZodOptional<z.ZodString>;
|
|
37
|
-
}, z.core.$strip>;
|
|
38
28
|
export declare const commonResponseHeaders: TResponseHeaders;
|
|
39
29
|
export declare const findResponseHeaders: TResponseHeaders;
|
|
40
30
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/constants.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;GAIG;AAEH,oDAAoD;AACpD,qBAAa,oBAAoB;IAC/B,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;CAC/B;AAED,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE5E,iGAAiG;AACjG,qBAAa,eAAe;IAC1B,MAAM,CAAC,QAAQ,CAAC,MAAM,YAAY;IAClC,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAEhC,MAAM,CAAC,QAAQ,CAAC,UAAU,cAA8C;IAExE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGvC;AAED,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC;AAElE,6DAA6D;AAC7D,qBAAa,SAAS;IACpB,MAAM,CAAC,QAAQ,CAAC,IAAI,OAAO;IAC3B,MAAM,CAAC,QAAQ,CAAC,KAAK,YAAY;IACjC,MAAM,CAAC,QAAQ,CAAC,QAAQ,eAAe;CACxC;AAED,eAAO,MAAM,qBAAqB,EAAE,gBAanC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,gBAMjC,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { z } from '@hono/zod-openapi';
|
|
2
1
|
import { HTTP } from '@venizia/ignis-helpers/common';
|
|
2
|
+
/**
|
|
3
|
+
* Constants with NO zod import, deliberately. The container's controller mixin imports
|
|
4
|
+
* `ControllerTransports` from here, so anything this file pulls in reaches every consumer of
|
|
5
|
+
* `Container` - the request schemas live in `schemas.ts` for exactly that reason.
|
|
6
|
+
*/
|
|
3
7
|
/** Transport protocol constants for controllers. */
|
|
4
8
|
export class ControllerTransports {
|
|
5
9
|
static { this.REST = 'rest'; }
|
|
@@ -20,35 +24,6 @@ export class RestPaths {
|
|
|
20
24
|
static { this.COUNT = '/count'; }
|
|
21
25
|
static { this.FIND_ONE = '/find-one'; }
|
|
22
26
|
}
|
|
23
|
-
export const trackableHeaders = z.object({
|
|
24
|
-
[HTTP.Headers.REQUEST_TRACING_ID]: z.string().optional().openapi({
|
|
25
|
-
description: 'Optional request ID',
|
|
26
|
-
}),
|
|
27
|
-
[HTTP.Headers.REQUEST_CHANNEL]: z
|
|
28
|
-
.string()
|
|
29
|
-
.optional()
|
|
30
|
-
.openapi({
|
|
31
|
-
description: 'Optional request channel',
|
|
32
|
-
examples: ['channel-1', 'web', 'spos'],
|
|
33
|
-
}),
|
|
34
|
-
[HTTP.Headers.REQUEST_DEVICE_INFO]: z
|
|
35
|
-
.string()
|
|
36
|
-
.optional()
|
|
37
|
-
.openapi({
|
|
38
|
-
description: 'Optional request device info',
|
|
39
|
-
examples: ['dev-1', 'device-abc', 'd-unique-id'],
|
|
40
|
-
}),
|
|
41
|
-
});
|
|
42
|
-
export const countableHeaders = z.object({
|
|
43
|
-
[HTTP.Headers.REQUEST_COUNT_DATA]: z
|
|
44
|
-
.string()
|
|
45
|
-
.optional()
|
|
46
|
-
.openapi({
|
|
47
|
-
description: 'Controls response format. When "true" (default): returns {count, data}. When "false": returns data only.',
|
|
48
|
-
examples: ['true', '1', 'false', '0'],
|
|
49
|
-
}),
|
|
50
|
-
});
|
|
51
|
-
export const defaultRequestHeaders = trackableHeaders.extend(countableHeaders.shape);
|
|
52
27
|
export const commonResponseHeaders = {
|
|
53
28
|
[HTTP.Headers.REQUEST_TRACING_ID]: {
|
|
54
29
|
description: 'Echo of the request tracing ID',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/base/controllers/common/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/base/controllers/common/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAGrD;;;;GAIG;AAEH,oDAAoD;AACpD,MAAM,OAAO,oBAAoB;aACf,SAAI,GAAG,MAAM,CAAC;aACd,SAAI,GAAG,MAAM,CAAC;;AAKhC,iGAAiG;AACjG,MAAM,OAAO,eAAe;aACV,WAAM,GAAG,QAAQ,CAAC;aAClB,UAAK,GAAG,OAAO,CAAC;aAEhB,eAAU,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAExE,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AAKH,6DAA6D;AAC7D,MAAM,OAAO,SAAS;aACJ,SAAI,GAAG,GAAG,CAAC;aACX,UAAK,GAAG,QAAQ,CAAC;aACjB,aAAQ,GAAG,WAAW,CAAC;;AAGzC,MAAM,CAAC,MAAM,qBAAqB,GAAqB;IACrD,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE;QACjC,WAAW,EAAE,gCAAgC;QAC7C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC3B;IACD,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE;QAClC,WAAW,EAAE,+BAA+B;QAC5C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE;KACzD;IACD,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE;QAC9B,WAAW,EAAE,2BAA2B;QACxC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE;KAC1D;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAqB;IACnD,GAAG,qBAAqB;IACxB,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;QAC5B,WAAW,EAAE,yDAAyD;QACtE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,EAAE;KAChF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAE5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/base/controllers/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/base/controllers/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,oGAAoG;AACpG,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from '@hono/zod-openapi';
|
|
2
|
+
/**
|
|
3
|
+
* The zod-backed request schemas, kept apart from `constants.ts` ON PURPOSE.
|
|
4
|
+
*
|
|
5
|
+
* `z.object()` runs at module load, so a file that calls it pulls the whole of zod into any bundle
|
|
6
|
+
* that touches it. `constants.ts` carries `ControllerTransports`, which the container's controller
|
|
7
|
+
* mixin imports - so while these lived beside it, importing `Container` alone cost 437 KB in a
|
|
8
|
+
* browser bundle, 423 KB of it zod, for a four-line const class. Keep this file out of any path a
|
|
9
|
+
* non-REST consumer can reach.
|
|
10
|
+
*/
|
|
11
|
+
export declare const trackableHeaders: z.ZodObject<{
|
|
12
|
+
"x-request-id": z.ZodOptional<z.ZodString>;
|
|
13
|
+
"x-request-channel": z.ZodOptional<z.ZodString>;
|
|
14
|
+
"x-device-info": z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const countableHeaders: z.ZodObject<{
|
|
17
|
+
"x-request-count": z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const defaultRequestHeaders: z.ZodObject<{
|
|
20
|
+
"x-request-id": z.ZodOptional<z.ZodString>;
|
|
21
|
+
"x-request-channel": z.ZodOptional<z.ZodString>;
|
|
22
|
+
"x-device-info": z.ZodOptional<z.ZodString>;
|
|
23
|
+
"x-request-count": z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAGtC;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;iBAkB3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;iBAS3B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;iBAAkD,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from '@hono/zod-openapi';
|
|
2
|
+
import { HTTP } from '@venizia/ignis-helpers/common';
|
|
3
|
+
/**
|
|
4
|
+
* The zod-backed request schemas, kept apart from `constants.ts` ON PURPOSE.
|
|
5
|
+
*
|
|
6
|
+
* `z.object()` runs at module load, so a file that calls it pulls the whole of zod into any bundle
|
|
7
|
+
* that touches it. `constants.ts` carries `ControllerTransports`, which the container's controller
|
|
8
|
+
* mixin imports - so while these lived beside it, importing `Container` alone cost 437 KB in a
|
|
9
|
+
* browser bundle, 423 KB of it zod, for a four-line const class. Keep this file out of any path a
|
|
10
|
+
* non-REST consumer can reach.
|
|
11
|
+
*/
|
|
12
|
+
export const trackableHeaders = z.object({
|
|
13
|
+
[HTTP.Headers.REQUEST_TRACING_ID]: z.string().optional().openapi({
|
|
14
|
+
description: 'Optional request ID',
|
|
15
|
+
}),
|
|
16
|
+
[HTTP.Headers.REQUEST_CHANNEL]: z
|
|
17
|
+
.string()
|
|
18
|
+
.optional()
|
|
19
|
+
.openapi({
|
|
20
|
+
description: 'Optional request channel',
|
|
21
|
+
examples: ['channel-1', 'web', 'spos'],
|
|
22
|
+
}),
|
|
23
|
+
[HTTP.Headers.REQUEST_DEVICE_INFO]: z
|
|
24
|
+
.string()
|
|
25
|
+
.optional()
|
|
26
|
+
.openapi({
|
|
27
|
+
description: 'Optional request device info',
|
|
28
|
+
examples: ['dev-1', 'device-abc', 'd-unique-id'],
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
31
|
+
export const countableHeaders = z.object({
|
|
32
|
+
[HTTP.Headers.REQUEST_COUNT_DATA]: z
|
|
33
|
+
.string()
|
|
34
|
+
.optional()
|
|
35
|
+
.openapi({
|
|
36
|
+
description: 'Controls response format. When "true" (default): returns {count, data}. When "false": returns data only.',
|
|
37
|
+
examples: ['true', '1', 'false', '0'],
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
export const defaultRequestHeaders = trackableHeaders.extend(countableHeaders.shape);
|
|
41
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../../src/base/controllers/common/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC;QAC/D,WAAW,EAAE,qBAAqB;KACnC,CAAC;IACF,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;SAC9B,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EAAE,0BAA0B;QACvC,QAAQ,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC;KACvC,CAAC;IACJ,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC;SAClC,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,aAAa,CAAC;KACjD,CAAC;CACL,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC;SACjC,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EACT,0GAA0G;QAC5G,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC;KACtC,CAAC;CACL,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a class is MARKED as an artifact, and nothing about how one is served.
|
|
3
|
+
*
|
|
4
|
+
* The root barrel is 161 KB gzipped, correctly - it carries the REST surface. This entry is 23 KB,
|
|
5
|
+
* for a consumer that only registers and resolves classes.
|
|
6
|
+
*
|
|
7
|
+
* Listed export by export rather than re-exporting `base/metadata`, which today happens to be free
|
|
8
|
+
* of the transport surface but promises nothing. The point of a sub-path is a surface someone
|
|
9
|
+
* DECIDED on: what lands here is a choice, not whatever that directory grows into. The saving over
|
|
10
|
+
* the barrel is about 2 KB; the boundary is the product.
|
|
11
|
+
*
|
|
12
|
+
* The weight is a contract, checked by `src/__tests__/bundle/browser-weight.test.ts`.
|
|
13
|
+
*/
|
|
14
|
+
export { component, configuration, injectable, pickRegistrationOptions, provide, service, } from './base/metadata/injectable.js';
|
|
15
|
+
export { datasource, model, repository } from './base/metadata/persistents.js';
|
|
16
|
+
export { inject } from './base/metadata/injectors.js';
|
|
17
|
+
export { ArtifactNamespaces, BindingNamespaces } from './common/bindings.js';
|
|
18
|
+
export type { TBindingNamespace } from './common/bindings.js';
|
|
19
|
+
/**
|
|
20
|
+
* `CoreBindings` is deliberately NOT here, and adding it back would be a mistake worth naming.
|
|
21
|
+
*
|
|
22
|
+
* The namespaces above are the GRAMMAR of a binding key - how one is spelled, whoever is doing the
|
|
23
|
+
* binding. `CoreBindings` is one application's DICTIONARY: `APPLICATION_SERVER`,
|
|
24
|
+
* `APPLICATION_ROOT_ROUTER`, keys a server binds and a browser never will. A second framework in
|
|
25
|
+
* this house already ships its own `CoreBindings` whose `APPLICATION_INSTANCE` is a different
|
|
26
|
+
* string, so exporting ours beside the stereotypes puts two same-named classes one import away from
|
|
27
|
+
* each other - bind under one, resolve under the other, and nothing fails until run time.
|
|
28
|
+
*
|
|
29
|
+
* It stays on the root barrel, where a consumer asking for the server surface finds it.
|
|
30
|
+
*/
|
|
31
|
+
export { ArtifactTypes, BindingKeys, MetadataRegistry } from './helpers/inversion/index.js';
|
|
32
|
+
export type { IArtifactMetadata, IArtifactRegistrationOptions, TBindingScope, } from './helpers/inversion/index.js';
|
|
33
|
+
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,OAAO,EACP,OAAO,GACR,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACnF,YAAY,EACV,iBAAiB,EACjB,4BAA4B,EAC5B,aAAa,GACd,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a class is MARKED as an artifact, and nothing about how one is served.
|
|
3
|
+
*
|
|
4
|
+
* The root barrel is 161 KB gzipped, correctly - it carries the REST surface. This entry is 23 KB,
|
|
5
|
+
* for a consumer that only registers and resolves classes.
|
|
6
|
+
*
|
|
7
|
+
* Listed export by export rather than re-exporting `base/metadata`, which today happens to be free
|
|
8
|
+
* of the transport surface but promises nothing. The point of a sub-path is a surface someone
|
|
9
|
+
* DECIDED on: what lands here is a choice, not whatever that directory grows into. The saving over
|
|
10
|
+
* the barrel is about 2 KB; the boundary is the product.
|
|
11
|
+
*
|
|
12
|
+
* The weight is a contract, checked by `src/__tests__/bundle/browser-weight.test.ts`.
|
|
13
|
+
*/
|
|
14
|
+
export { component, configuration, injectable, pickRegistrationOptions, provide, service, } from './base/metadata/injectable.js';
|
|
15
|
+
export { datasource, model, repository } from './base/metadata/persistents.js';
|
|
16
|
+
export { inject } from './base/metadata/injectors.js';
|
|
17
|
+
export { ArtifactNamespaces, BindingNamespaces } from './common/bindings.js';
|
|
18
|
+
/**
|
|
19
|
+
* `CoreBindings` is deliberately NOT here, and adding it back would be a mistake worth naming.
|
|
20
|
+
*
|
|
21
|
+
* The namespaces above are the GRAMMAR of a binding key - how one is spelled, whoever is doing the
|
|
22
|
+
* binding. `CoreBindings` is one application's DICTIONARY: `APPLICATION_SERVER`,
|
|
23
|
+
* `APPLICATION_ROOT_ROUTER`, keys a server binds and a browser never will. A second framework in
|
|
24
|
+
* this house already ships its own `CoreBindings` whose `APPLICATION_INSTANCE` is a different
|
|
25
|
+
* string, so exporting ours beside the stereotypes puts two same-named classes one import away from
|
|
26
|
+
* each other - bind under one, resolve under the other, and nothing fails until run time.
|
|
27
|
+
*
|
|
28
|
+
* It stays on the root barrel, where a consumer asking for the server surface finds it.
|
|
29
|
+
*/
|
|
30
|
+
export { ArtifactTypes, BindingKeys, MetadataRegistry } from './helpers/inversion/index.js';
|
|
31
|
+
//# sourceMappingURL=metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,OAAO,EACP,OAAO,GACR,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG1E;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/ignis-kernel",
|
|
3
|
-
"version": "0.2.0-
|
|
3
|
+
"version": "0.2.0-36",
|
|
4
4
|
"description": "Browser-pure kernel of the IGNIS framework: dependency injection, lifecycle, REST controllers, repository and datasource abstractions, and the authentication and authorization seams. No node builtin and no server-only peer, so the same kernel serves a Bun server and a browser Worker.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -49,6 +49,12 @@
|
|
|
49
49
|
"require": "./dist/cjs/index.js",
|
|
50
50
|
"default": "./dist/cjs/index.js"
|
|
51
51
|
},
|
|
52
|
+
"./metadata": {
|
|
53
|
+
"types": "./dist/cjs/metadata.d.ts",
|
|
54
|
+
"import": "./dist/esm/metadata.js",
|
|
55
|
+
"require": "./dist/cjs/metadata.js",
|
|
56
|
+
"default": "./dist/cjs/metadata.js"
|
|
57
|
+
},
|
|
52
58
|
"./package.json": "./package.json"
|
|
53
59
|
},
|
|
54
60
|
"files": [
|
|
@@ -79,9 +85,9 @@
|
|
|
79
85
|
"prepublishOnly": "bun run rebuild"
|
|
80
86
|
},
|
|
81
87
|
"dependencies": {
|
|
82
|
-
"@venizia/ignis-filter": "^0.2.0-
|
|
83
|
-
"@venizia/ignis-helpers": "^0.2.0-
|
|
84
|
-
"@venizia/ignis-inversion": "^0.2.0-
|
|
88
|
+
"@venizia/ignis-filter": "^0.2.0-15",
|
|
89
|
+
"@venizia/ignis-helpers": "^0.2.0-31",
|
|
90
|
+
"@venizia/ignis-inversion": "^0.2.0-15",
|
|
85
91
|
"lodash": "^4.18.1",
|
|
86
92
|
"reflect-metadata": "^0.2.2",
|
|
87
93
|
"zod": "^4.5.4"
|
|
@@ -107,7 +113,7 @@
|
|
|
107
113
|
"devDependencies": {
|
|
108
114
|
"@types/bun": "^1.4.1",
|
|
109
115
|
"@types/lodash": "^4.17.25",
|
|
110
|
-
"@venizia/dev-configs": "^0.2.0-
|
|
116
|
+
"@venizia/dev-configs": "^0.2.0-8",
|
|
111
117
|
"casbin": "^5.51.1",
|
|
112
118
|
"eslint": "^10.10.0",
|
|
113
119
|
"prettier": "^3.9.6",
|