@fjell/express-router 4.4.14 → 4.4.19

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.
Files changed (65) hide show
  1. package/README.md +2 -2
  2. package/build.js +4 -0
  3. package/dist/CItemRouter.d.ts +5 -4
  4. package/dist/CItemRouter.d.ts.map +1 -0
  5. package/dist/CItemRouter.js +63 -92
  6. package/dist/CItemRouter.js.map +7 -1
  7. package/dist/Instance.d.ts +5 -4
  8. package/dist/Instance.d.ts.map +1 -0
  9. package/dist/Instance.js +12 -22
  10. package/dist/Instance.js.map +7 -1
  11. package/dist/InstanceFactory.d.ts +5 -4
  12. package/dist/InstanceFactory.d.ts.map +1 -0
  13. package/dist/InstanceFactory.js +10 -18
  14. package/dist/InstanceFactory.js.map +7 -1
  15. package/dist/ItemRouter.d.ts +5 -4
  16. package/dist/ItemRouter.d.ts.map +1 -0
  17. package/dist/ItemRouter.js +290 -405
  18. package/dist/ItemRouter.js.map +7 -1
  19. package/dist/PItemRouter.d.ts +5 -4
  20. package/dist/PItemRouter.d.ts.map +1 -0
  21. package/dist/PItemRouter.js +43 -67
  22. package/dist/PItemRouter.js.map +7 -1
  23. package/dist/Registry.d.ts +1 -0
  24. package/dist/Registry.d.ts.map +1 -0
  25. package/dist/Registry.js +22 -27
  26. package/dist/Registry.js.map +7 -1
  27. package/dist/index.d.ts +4 -3
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +6 -6
  30. package/dist/index.js.map +7 -1
  31. package/dist/logger.d.ts +2 -1
  32. package/dist/logger.d.ts.map +1 -0
  33. package/dist/logger.js +6 -5
  34. package/dist/logger.js.map +7 -1
  35. package/dist/util/general.d.ts +1 -0
  36. package/dist/util/general.d.ts.map +1 -0
  37. package/dist/util/general.js +50 -0
  38. package/dist/util/general.js.map +7 -0
  39. package/docs/docs.config.ts +1 -32
  40. package/docs/package.json +4 -4
  41. package/docs/public/README.md +2 -2
  42. package/docs/tsconfig.node.json +2 -11
  43. package/package.json +25 -28
  44. package/vitest.config.ts +45 -0
  45. package/dist/CItemRouter.cjs +0 -100
  46. package/dist/CItemRouter.cjs.map +0 -1
  47. package/dist/Instance.cjs +0 -31
  48. package/dist/Instance.cjs.map +0 -1
  49. package/dist/InstanceFactory.cjs +0 -25
  50. package/dist/InstanceFactory.cjs.map +0 -1
  51. package/dist/ItemRouter.cjs +0 -427
  52. package/dist/ItemRouter.cjs.map +0 -1
  53. package/dist/PItemRouter.cjs +0 -75
  54. package/dist/PItemRouter.cjs.map +0 -1
  55. package/dist/Registry.cjs +0 -36
  56. package/dist/Registry.cjs.map +0 -1
  57. package/dist/index.cjs +0 -657
  58. package/dist/index.cjs.map +0 -1
  59. package/dist/logger.cjs +0 -10
  60. package/dist/logger.cjs.map +0 -1
  61. package/docs/package-lock.json +0 -5129
  62. package/docs/src/index.css +0 -21
  63. package/docs/src/main.tsx +0 -12
  64. package/docs/src/test/setup.ts +0 -1
  65. package/docs/src/types.d.ts +0 -4
package/README.md CHANGED
@@ -20,10 +20,10 @@ Fjell Express Router provides a powerful abstraction layer for creating Express.
20
20
  npm install @fjell/express-router
21
21
  ```
22
22
 
23
- Or with pnpm:
23
+ Or with npm:
24
24
 
25
25
  ```bash
26
- pnpm add @fjell/express-router
26
+ npm install @fjell/express-router
27
27
  ```
28
28
 
29
29
  ## Quick Start
package/build.js ADDED
@@ -0,0 +1,4 @@
1
+ import buildMultiFile from '@fjell/eslint-config/esbuild/multi-file';
2
+
3
+ // Multi-file compilation - compiles each TypeScript file separately
4
+ buildMultiFile();
@@ -1,7 +1,7 @@
1
- import { ComKey, Item, LocKeyArray } from '@fjell/core';
2
- import { Request, Response } from 'express';
3
- import { ItemRouter, ItemRouterOptions } from './ItemRouter';
4
- import { Instance } from './Instance';
1
+ import { ComKey, Item, LocKeyArray } from "@fjell/core";
2
+ import { Request, Response } from "express";
3
+ import { ItemRouter, ItemRouterOptions } from "@/ItemRouter";
4
+ import { Instance } from "./Instance";
5
5
  export declare class CItemRouter<T extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> extends ItemRouter<S, L1, L2, L3, L4, L5> {
6
6
  private parentRoute;
7
7
  constructor(lib: Instance<T, S, L1, L2, L3, L4, L5>, type: S, parentRoute: ItemRouter<L1, L2, L3, L4, L5, never>, options?: ItemRouterOptions);
@@ -12,3 +12,4 @@ export declare class CItemRouter<T extends Item<S, L1, L2, L3, L4, L5>, S extend
12
12
  protected createItem: (req: Request, res: Response) => Promise<void>;
13
13
  protected findItems: (req: Request, res: Response) => Promise<void>;
14
14
  }
15
+ //# sourceMappingURL=CItemRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CItemRouter.d.ts","sourceRoot":"","sources":["../src/CItemRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EAAE,IAAI,EAAqB,WAAW,EAC7C,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAMtC,qBAAa,WAAW,CACtB,CAAC,SAAS,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EACrC,CAAC,SAAS,MAAM,EAChB,EAAE,SAAS,MAAM,EACjB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,CACzB,SAAQ,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IAEzC,OAAO,CAAC,WAAW,CAAwC;gBAGzD,GAAG,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EACvC,IAAI,EAAE,CAAC,EACP,WAAW,EAAE,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,EAClD,OAAO,GAAE,iBAAsB;IAM1B,SAAS,IAAI,OAAO;IAIpB,KAAK,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IAMnD,MAAM,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IAWrD,YAAY,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IAInE,SAAS,CAAC,UAAU,GAAU,KAAK,OAAO,EAAE,KAAK,QAAQ,mBASvD;IAEF,SAAS,CAAC,SAAS,GAAU,KAAK,OAAO,EAAE,KAAK,QAAQ,mBA4BtD;CAEH"}
@@ -1,96 +1,67 @@
1
- import { validatePK, paramsToQuery } from '@fjell/core';
2
- import { ItemRouter } from './ItemRouter.js';
3
-
4
- function _define_property(obj, key, value) {
5
- if (key in obj) {
6
- Object.defineProperty(obj, key, {
7
- value: value,
8
- enumerable: true,
9
- configurable: true,
10
- writable: true
11
- });
12
- } else {
13
- obj[key] = value;
14
- }
15
- return obj;
16
- }
1
+ import {
2
+ paramsToQuery,
3
+ validatePK
4
+ } from "@fjell/core";
5
+ import { ItemRouter } from "@/ItemRouter";
17
6
  class CItemRouter extends ItemRouter {
18
- hasParent() {
19
- return !!this.parentRoute;
20
- }
21
- getIk(res) {
22
- const pri = this.getPk(res);
23
- const loc = this.getLocations(res);
24
- return {
25
- kt: pri.kt,
26
- pk: pri.pk,
27
- loc
28
- };
29
- }
30
- getLKA(res) {
31
- /**
32
- * A location key array is passed to a child router to provide contextfor the items it will
33
- * be working with. It is always a concatenation of "My LKA" + "Parent LKA" which will
34
- * bubble all the way up to the root Primary.
35
- */ let lka = [
36
- this.getLk(res)
37
- ];
38
- lka = lka.concat(this.parentRoute.getLKA(res));
39
- return lka;
40
- }
41
- getLocations(res) {
42
- return this.parentRoute.getLKA(res);
43
- }
44
- constructor(lib, type, parentRoute, options = {}){
45
- super(lib, type, options), _define_property(this, "parentRoute", void 0), _define_property(this, "createItem", async (req, res)=>{
46
- const libOperations = this.lib.operations;
47
- this.logger.default('Creating Item', {
48
- body: req === null || req === void 0 ? void 0 : req.body,
49
- query: req === null || req === void 0 ? void 0 : req.query,
50
- params: req === null || req === void 0 ? void 0 : req.params,
51
- locals: res === null || res === void 0 ? void 0 : res.locals
52
- });
53
- const itemToCreate = this.convertDates(req.body);
54
- let item = validatePK(await libOperations.create(itemToCreate, {
55
- locations: this.getLocations(res)
56
- }), this.getPkType());
57
- item = await this.postCreateItem(item);
58
- this.logger.default('Created Item %j', item);
59
- res.json(item);
60
- }), _define_property(this, "findItems", async (req, res)=>{
61
- const libOperations = this.lib.operations;
62
- const query = req.query;
63
- const finder = query['finder'];
64
- const finderParams = query['finderParams'];
65
- const one = query['one'];
66
- let items = [];
67
- if (finder) {
68
- // If finder is defined? Call a finder.
69
- this.logger.default('Finding Items with Finder', {
70
- finder,
71
- finderParams,
72
- one
73
- });
74
- if (one === 'true') {
75
- const item = await this.lib.findOne(finder, JSON.parse(finderParams), this.getLocations(res));
76
- items = item ? [
77
- item
78
- ] : [];
79
- } else {
80
- items = await libOperations.find(finder, JSON.parse(finderParams), this.getLocations(res));
81
- }
82
- } else {
83
- // TODO: This is once of the more important places to perform some validaation and feedback
84
- const itemQuery = paramsToQuery(req.query);
85
- this.logger.default('Finding Items with Query: %j', itemQuery);
86
- items = await libOperations.all(itemQuery, this.getLocations(res));
87
- this.logger.default('Found %d Items with Query', items.length);
88
- }
89
- res.json(items.map((item)=>validatePK(item, this.getPkType())));
90
- });
91
- this.parentRoute = parentRoute;
7
+ parentRoute;
8
+ constructor(lib, type, parentRoute, options = {}) {
9
+ super(lib, type, options);
10
+ this.parentRoute = parentRoute;
11
+ }
12
+ hasParent() {
13
+ return !!this.parentRoute;
14
+ }
15
+ getIk(res) {
16
+ const pri = this.getPk(res);
17
+ const loc = this.getLocations(res);
18
+ return { kt: pri.kt, pk: pri.pk, loc };
19
+ }
20
+ getLKA(res) {
21
+ let lka = [this.getLk(res)];
22
+ lka = lka.concat(this.parentRoute.getLKA(res));
23
+ return lka;
24
+ }
25
+ getLocations(res) {
26
+ return this.parentRoute.getLKA(res);
27
+ }
28
+ createItem = async (req, res) => {
29
+ const libOperations = this.lib.operations;
30
+ this.logger.default("Creating Item", { body: req?.body, query: req?.query, params: req?.params, locals: res?.locals });
31
+ const itemToCreate = this.convertDates(req.body);
32
+ let item = validatePK(await libOperations.create(
33
+ itemToCreate,
34
+ { locations: this.getLocations(res) }
35
+ ), this.getPkType());
36
+ item = await this.postCreateItem(item);
37
+ this.logger.default("Created Item %j", item);
38
+ res.json(item);
39
+ };
40
+ findItems = async (req, res) => {
41
+ const libOperations = this.lib.operations;
42
+ const query = req.query;
43
+ const finder = query["finder"];
44
+ const finderParams = query["finderParams"];
45
+ const one = query["one"];
46
+ let items = [];
47
+ if (finder) {
48
+ this.logger.default("Finding Items with Finder", { finder, finderParams, one });
49
+ if (one === "true") {
50
+ const item = await this.lib.findOne(finder, JSON.parse(finderParams), this.getLocations(res));
51
+ items = item ? [item] : [];
52
+ } else {
53
+ items = await libOperations.find(finder, JSON.parse(finderParams), this.getLocations(res));
54
+ }
55
+ } else {
56
+ const itemQuery = paramsToQuery(req.query);
57
+ this.logger.default("Finding Items with Query: %j", itemQuery);
58
+ items = await libOperations.all(itemQuery, this.getLocations(res));
59
+ this.logger.default("Found %d Items with Query", items.length);
92
60
  }
61
+ res.json(items.map((item) => validatePK(item, this.getPkType())));
62
+ };
93
63
  }
94
-
95
- export { CItemRouter };
64
+ export {
65
+ CItemRouter
66
+ };
96
67
  //# sourceMappingURL=CItemRouter.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"CItemRouter.js","sources":["../src/CItemRouter.ts"],"sourcesContent":["import {\n ComKey, Item, ItemQuery, LocKey, LocKeyArray, paramsToQuery, PriKey, QueryParams, validatePK\n} from \"@fjell/core\";\nimport { Request, Response } from \"express\";\nimport { ItemRouter, ItemRouterOptions } from \"@/ItemRouter\";\nimport { Instance } from \"./Instance\";\n\ninterface ParsedQuery {\n [key: string]: undefined | string | string[] | ParsedQuery | ParsedQuery[];\n}\n\nexport class CItemRouter<\n T extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never\n> extends ItemRouter<S, L1, L2, L3, L4, L5> {\n\n private parentRoute: ItemRouter<L1, L2, L3, L4, L5, never>;\n\n constructor(\n lib: Instance<T, S, L1, L2, L3, L4, L5>,\n type: S,\n parentRoute: ItemRouter<L1, L2, L3, L4, L5, never>,\n options: ItemRouterOptions = {},\n ) {\n super(lib as any, type, options);\n this.parentRoute = parentRoute;\n }\n\n public hasParent(): boolean {\n return !!this.parentRoute;\n }\n\n public getIk(res: Response): ComKey<S, L1, L2, L3, L4, L5> {\n const pri = this.getPk(res) as PriKey<S>;\n const loc = this.getLocations(res) as LocKeyArray<L1, L2, L3, L4, L5>;\n return { kt: pri.kt, pk: pri.pk, loc }\n }\n\n public getLKA(res: Response): LocKeyArray<S, L1, L2, L3, L4> {\n /**\n * A location key array is passed to a child router to provide contextfor the items it will\n * be working with. It is always a concatenation of \"My LKA\" + \"Parent LKA\" which will\n * bubble all the way up to the root Primary.\n */\n let lka: LocKey<S | L1 | L2 | L3 | L4>[] = [this.getLk(res)];\n lka = lka.concat(this.parentRoute.getLKA(res) as LocKey<S | L1 | L2 | L3 | L4>[]);\n return lka as LocKeyArray<S, L1, L2, L3, L4>;\n }\n\n public getLocations(res: Response): LocKeyArray<L1, L2, L3, L4, L5> {\n return this.parentRoute.getLKA(res) as LocKeyArray<L1, L2, L3, L4, L5>;\n }\n\n protected createItem = async (req: Request, res: Response) => {\n const libOperations = this.lib.operations;\n this.logger.default('Creating Item', { body: req?.body, query: req?.query, params: req?.params, locals: res?.locals });\n const itemToCreate = this.convertDates(req.body as Item<S, L1, L2, L3, L4, L5>);\n let item = validatePK(await libOperations.create(\n itemToCreate, { locations: this.getLocations(res) }), this.getPkType()) as Item<S, L1, L2, L3, L4, L5>;\n item = await this.postCreateItem(item);\n this.logger.default('Created Item %j', item);\n res.json(item);\n };\n\n protected findItems = async (req: Request, res: Response) => {\n const libOperations = this.lib.operations;\n const query: ParsedQuery = req.query as unknown as ParsedQuery;\n const finder = query['finder'] as string;\n const finderParams = query['finderParams'] as string;\n const one = query['one'] as string;\n\n let items: Item<S, L1, L2, L3, L4, L5>[] = [];\n\n if (finder) {\n // If finder is defined? Call a finder.\n this.logger.default('Finding Items with Finder', { finder, finderParams, one });\n\n if (one === 'true') {\n const item = await (this.lib as any).findOne(finder, JSON.parse(finderParams), this.getLocations(res));\n items = item ? [item] : [];\n } else {\n items = await libOperations.find(finder, JSON.parse(finderParams), this.getLocations(res));\n }\n } else {\n // TODO: This is once of the more important places to perform some validaation and feedback\n const itemQuery: ItemQuery = paramsToQuery(req.query as QueryParams);\n this.logger.default('Finding Items with Query: %j', itemQuery);\n items = await libOperations.all(itemQuery, this.getLocations(res));\n this.logger.default('Found %d Items with Query', items.length);\n }\n\n res.json(items.map((item: Item<S, L1, L2, L3, L4, L5>) => validatePK(item, this.getPkType())));\n };\n\n}\n"],"names":["CItemRouter","ItemRouter","hasParent","parentRoute","getIk","res","pri","getPk","loc","getLocations","kt","pk","getLKA","lka","getLk","concat","lib","type","options","createItem","req","libOperations","operations","logger","default","body","query","params","locals","itemToCreate","convertDates","item","validatePK","create","locations","getPkType","postCreateItem","json","findItems","finder","finderParams","one","items","findOne","JSON","parse","find","itemQuery","paramsToQuery","all","length","map"],"mappings":";;;;;;;;;;;;;;;;AAWO,MAAMA,WAAAA,SAQHC,UAAAA,CAAAA;IAcDC,SAAAA,GAAqB;AAC1B,QAAA,OAAO,CAAC,CAAC,IAAI,CAACC,WAAW;AAC3B,IAAA;AAEOC,IAAAA,KAAAA,CAAMC,GAAa,EAAiC;AACzD,QAAA,MAAMC,GAAAA,GAAM,IAAI,CAACC,KAAK,CAACF,GAAAA,CAAAA;AACvB,QAAA,MAAMG,GAAAA,GAAM,IAAI,CAACC,YAAY,CAACJ,GAAAA,CAAAA;QAC9B,OAAO;AAAEK,YAAAA,EAAAA,EAAIJ,IAAII,EAAE;AAAEC,YAAAA,EAAAA,EAAIL,IAAIK,EAAE;AAAEH,YAAAA;AAAI,SAAA;AACvC,IAAA;AAEOI,IAAAA,MAAAA,CAAOP,GAAa,EAAkC;AAC3D;;;;AAIC,QACD,IAAIQ,GAAAA,GAAuC;YAAC,IAAI,CAACC,KAAK,CAACT,GAAAA;AAAK,SAAA;QAC5DQ,GAAAA,GAAMA,GAAAA,CAAIE,MAAM,CAAC,IAAI,CAACZ,WAAW,CAACS,MAAM,CAACP,GAAAA,CAAAA,CAAAA;QACzC,OAAOQ,GAAAA;AACT,IAAA;AAEOJ,IAAAA,YAAAA,CAAaJ,GAAa,EAAmC;AAClE,QAAA,OAAO,IAAI,CAACF,WAAW,CAACS,MAAM,CAACP,GAAAA,CAAAA;AACjC,IAAA;IAjCA,WAAA,CACEW,GAAuC,EACvCC,IAAO,EACPd,WAAkD,EAClDe,OAAAA,GAA6B,EAAE,CAC/B;QACA,KAAK,CAACF,GAAAA,EAAYC,IAAAA,EAAMC,OAAAA,CAAAA,EAR1B,gBAAA,CAAA,IAAA,EAAQf,aAAAA,EAAR,MAAA,CAAA,EAqCA,gBAAA,CAAA,IAAA,EAAUgB,YAAAA,EAAa,OAAOC,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AAAA,CAAAA,CAAAA;AAC7D,gBAAA,IAAI,CAACkB,MAAM,CAACC,OAAO,CAAC,2BAAA,EAA6BkB,MAAMQ,MAAM,CAAA;AAC/D,YAAA;YAEA7C,GAAAA,CAAIgC,IAAI,CAACK,KAAAA,CAAMS,GAAG,CAAC,CAACpB,IAAAA,GAAsCC,UAAAA,CAAWD,IAAAA,EAAM,IAAI,CAACI,SAAS,EAAA,CAAA,CAAA,CAAA;AAC3F,QAAA,CAAA,CAAA;QAnEE,IAAI,CAAChC,WAAW,GAAGA,WAAAA;AACrB,IAAA;AAoEF;;;;"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/CItemRouter.ts"],
4
+ "sourcesContent": ["import {\n ComKey, Item, ItemQuery, LocKey, LocKeyArray, paramsToQuery, PriKey, QueryParams, validatePK\n} from \"@fjell/core\";\nimport { Request, Response } from \"express\";\nimport { ItemRouter, ItemRouterOptions } from \"@/ItemRouter\";\nimport { Instance } from \"./Instance\";\n\ninterface ParsedQuery {\n [key: string]: undefined | string | string[] | ParsedQuery | ParsedQuery[];\n}\n\nexport class CItemRouter<\n T extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never\n> extends ItemRouter<S, L1, L2, L3, L4, L5> {\n\n private parentRoute: ItemRouter<L1, L2, L3, L4, L5, never>;\n\n constructor(\n lib: Instance<T, S, L1, L2, L3, L4, L5>,\n type: S,\n parentRoute: ItemRouter<L1, L2, L3, L4, L5, never>,\n options: ItemRouterOptions = {},\n ) {\n super(lib as any, type, options);\n this.parentRoute = parentRoute;\n }\n\n public hasParent(): boolean {\n return !!this.parentRoute;\n }\n\n public getIk(res: Response): ComKey<S, L1, L2, L3, L4, L5> {\n const pri = this.getPk(res) as PriKey<S>;\n const loc = this.getLocations(res) as LocKeyArray<L1, L2, L3, L4, L5>;\n return { kt: pri.kt, pk: pri.pk, loc }\n }\n\n public getLKA(res: Response): LocKeyArray<S, L1, L2, L3, L4> {\n /**\n * A location key array is passed to a child router to provide contextfor the items it will\n * be working with. It is always a concatenation of \"My LKA\" + \"Parent LKA\" which will\n * bubble all the way up to the root Primary.\n */\n let lka: LocKey<S | L1 | L2 | L3 | L4>[] = [this.getLk(res)];\n lka = lka.concat(this.parentRoute.getLKA(res) as LocKey<S | L1 | L2 | L3 | L4>[]);\n return lka as LocKeyArray<S, L1, L2, L3, L4>;\n }\n\n public getLocations(res: Response): LocKeyArray<L1, L2, L3, L4, L5> {\n return this.parentRoute.getLKA(res) as LocKeyArray<L1, L2, L3, L4, L5>;\n }\n\n protected createItem = async (req: Request, res: Response) => {\n const libOperations = this.lib.operations;\n this.logger.default('Creating Item', { body: req?.body, query: req?.query, params: req?.params, locals: res?.locals });\n const itemToCreate = this.convertDates(req.body as Item<S, L1, L2, L3, L4, L5>);\n let item = validatePK(await libOperations.create(\n itemToCreate, { locations: this.getLocations(res) }), this.getPkType()) as Item<S, L1, L2, L3, L4, L5>;\n item = await this.postCreateItem(item);\n this.logger.default('Created Item %j', item);\n res.json(item);\n };\n\n protected findItems = async (req: Request, res: Response) => {\n const libOperations = this.lib.operations;\n const query: ParsedQuery = req.query as unknown as ParsedQuery;\n const finder = query['finder'] as string;\n const finderParams = query['finderParams'] as string;\n const one = query['one'] as string;\n\n let items: Item<S, L1, L2, L3, L4, L5>[] = [];\n\n if (finder) {\n // If finder is defined? Call a finder.\n this.logger.default('Finding Items with Finder', { finder, finderParams, one });\n\n if (one === 'true') {\n const item = await (this.lib as any).findOne(finder, JSON.parse(finderParams), this.getLocations(res));\n items = item ? [item] : [];\n } else {\n items = await libOperations.find(finder, JSON.parse(finderParams), this.getLocations(res));\n }\n } else {\n // TODO: This is once of the more important places to perform some validaation and feedback\n const itemQuery: ItemQuery = paramsToQuery(req.query as QueryParams);\n this.logger.default('Finding Items with Query: %j', itemQuery);\n items = await libOperations.all(itemQuery, this.getLocations(res));\n this.logger.default('Found %d Items with Query', items.length);\n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,IAAI;AAAA,EACf;AAAA,EAEU,YAAY,OAAO,KAAc,QAAkB;AAC3D,UAAM,gBAAgB,KAAK,IAAI;AAC/B,UAAM,QAAqB,IAAI;AAC/B,UAAM,SAAS,MAAM,QAAQ;AAC7B,UAAM,eAAe,MAAM,cAAc;AACzC,UAAM,MAAM,MAAM,KAAK;AAEvB,QAAI,QAAuC,CAAC;AAE5C,QAAI,QAAQ;AAEV,WAAK,OAAO,QAAQ,6BAA6B,EAAE,QAAQ,cAAc,IAAI,CAAC;AAE9E,UAAI,QAAQ,QAAQ;AAClB,cAAM,OAAO,MAAO,KAAK,IAAY,QAAQ,QAAQ,KAAK,MAAM,YAAY,GAAG,KAAK,aAAa,GAAG,CAAC;AACrG,gBAAQ,OAAO,CAAC,IAAI,IAAI,CAAC;AAAA,MAC3B,OAAO;AACL,gBAAQ,MAAM,cAAc,KAAK,QAAQ,KAAK,MAAM,YAAY,GAAG,KAAK,aAAa,GAAG,CAAC;AAAA,MAC3F;AAAA,IACF,OAAO;AAEL,YAAM,YAAuB,cAAc,IAAI,KAAoB;AACnE,WAAK,OAAO,QAAQ,gCAAgC,SAAS;AAC7D,cAAQ,MAAM,cAAc,IAAI,WAAW,KAAK,aAAa,GAAG,CAAC;AACjE,WAAK,OAAO,QAAQ,6BAA6B,MAAM,MAAM;AAAA,IAC/D;AAEA,QAAI,KAAK,MAAM,IAAI,CAAC,SAAsC,WAAW,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC;AAAA,EAC/F;AAEF;",
6
+ "names": []
7
+ }
@@ -1,7 +1,7 @@
1
- import { Item } from '@fjell/core';
2
- import { Instance as BaseInstance, Coordinate, Registry } from '@fjell/registry';
3
- import { Operations, Options } from '@fjell/lib';
4
- import { ItemRouter } from './ItemRouter';
1
+ import { Item } from "@fjell/core";
2
+ import { Instance as BaseInstance, Coordinate, Registry } from "@fjell/registry";
3
+ import { Operations, Options } from "@fjell/lib";
4
+ import { ItemRouter } from "./ItemRouter";
5
5
  /**
6
6
  * The Express Router Instance interface represents a router model instance that extends the base Instance
7
7
  * from @fjell/registry and adds express router operations for handling HTTP requests.
@@ -27,3 +27,4 @@ export interface Instance<V extends Item<S, L1, L2, L3, L4, L5>, S extends strin
27
27
  }
28
28
  export declare const createInstance: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(registry: Registry, coordinate: Coordinate<S, L1, L2, L3, L4, L5>, router: ItemRouter<S, L1, L2, L3, L4, L5>, operations: Operations<V, S, L1, L2, L3, L4, L5>, options?: Options<V, S, L1, L2, L3, L4, L5>) => Instance<V, S, L1, L2, L3, L4, L5>;
29
29
  export declare const isInstance: (instance: any) => instance is Instance<any, any, any, any, any, any, any>;
30
+ //# sourceMappingURL=Instance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Instance.d.ts","sourceRoot":"","sources":["../src/Instance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,UAAU,EAAwC,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvH,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,QAAQ,CACvB,CAAC,SAAS,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EACrC,CAAC,SAAS,MAAM,EAChB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,CACzB,SAAQ,YAAY,CAAC,CAAC,EA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EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,KAC1C,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAIrC,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,UAAU,GAAG,KAAG,QAAQ,IAAI,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAQhG,CAAA"}
package/dist/Instance.js CHANGED
@@ -1,26 +1,16 @@
1
- import LibLogger from './logger.js';
2
- import { createInstance as createInstance$1 } from '@fjell/registry';
3
-
1
+ import LibLogger from "./logger";
2
+ import { createInstance as createBaseInstance } from "@fjell/registry";
4
3
  const logger = LibLogger.get("Instance");
5
- const createInstance = (registry, coordinate, router, operations, options)=>{
6
- logger.debug("createInstance", {
7
- coordinate,
8
- router,
9
- registry,
10
- operations,
11
- options
12
- });
13
- const baseInstance = createInstance$1(registry, coordinate);
14
- return {
15
- ...baseInstance,
16
- router,
17
- operations,
18
- options: options || {}
19
- };
4
+ const createInstance = (registry, coordinate, router, operations, options) => {
5
+ logger.debug("createInstance", { coordinate, router, registry, operations, options });
6
+ const baseInstance = createBaseInstance(registry, coordinate);
7
+ return { ...baseInstance, router, operations, options: options || {} };
20
8
  };
21
- const isInstance = (instance)=>{
22
- return instance != null && typeof instance === 'object' && instance.coordinate != null && instance.router != null && instance.registry != null && instance.operations != null && instance.options != null;
9
+ const isInstance = (instance) => {
10
+ return instance != null && typeof instance === "object" && instance.coordinate != null && instance.router != null && instance.registry != null && instance.operations != null && instance.options != null;
11
+ };
12
+ export {
13
+ createInstance,
14
+ isInstance
23
15
  };
24
-
25
- export { createInstance, isInstance };
26
16
  //# sourceMappingURL=Instance.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"Instance.js","sources":["../src/Instance.ts"],"sourcesContent":["import LibLogger from \"./logger\";\nimport { Item } from \"@fjell/core\";\nimport { Instance as BaseInstance, Coordinate, createInstance as createBaseInstance, Registry } from \"@fjell/registry\";\nimport { Operations, Options } from \"@fjell/lib\";\nimport { ItemRouter } from \"./ItemRouter\";\n\nconst logger = LibLogger.get(\"Instance\");\n\n/**\n * The Express Router Instance interface represents a router model instance that extends the base Instance\n * from @fjell/registry and adds express router operations for handling HTTP requests.\n *\n * The interface extends the base Instance (which provides coordinate and registry) with:\n * - router: Provides methods for routing HTTP requests and handling CRUD operations\n * - operations: Provides methods for interacting with the data model (get, find, all, etc.)\n * - options: Provides hooks, validators, finders, actions, and facets\n *\n * @template V - The type of the data model item, extending Item\n * @template S - The string literal type representing the model's key type\n * @template L1-L5 - Optional string literal types for location hierarchy levels\n */\nexport interface Instance<\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never\n> extends BaseInstance<S, L1, L2, L3, L4, L5> {\n /** The router object that provides methods for handling HTTP requests */\n router: ItemRouter<S, L1, L2, L3, L4, L5>;\n /** The operations object that provides methods for interacting with the data model */\n operations: Operations<V, S, L1, L2, L3, L4, L5>;\n /** The options object that provides hooks, validators, finders, actions, and facets */\n options: Options<V, S, L1, L2, L3, L4, L5>;\n /** The data model item type (for type safety) */\n readonly itemType?: V;\n}\n\nexport const createInstance = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never\n>(\n registry: Registry,\n coordinate: Coordinate<S, L1, L2, L3, L4, L5>,\n router: ItemRouter<S, L1, L2, L3, L4, L5>,\n operations: Operations<V, S, L1, L2, L3, L4, L5>,\n options?: Options<V, S, L1, L2, L3, L4, L5>,\n ): Instance<V, S, L1, L2, L3, L4, L5> => {\n logger.debug(\"createInstance\", { coordinate, router, registry, operations, options });\n const baseInstance = createBaseInstance(registry, coordinate);\n return { ...baseInstance, router, operations, options: options || {} as Options<V, S, L1, L2, L3, L4, L5> };\n}\n\nexport const isInstance = (instance: any): instance is Instance<any, any, any, any, any, any, any> => {\n return instance != null &&\n typeof instance === 'object' &&\n instance.coordinate != null &&\n instance.router != null &&\n instance.registry != null &&\n instance.operations != null &&\n instance.options != null;\n}\n"],"names":["logger","LibLogger","get","createInstance","registry","coordinate","router","operations","options","debug","baseInstance","createBaseInstance","isInstance","instance"],"mappings":";;;AAMA,MAAMA,MAAAA,GAASC,SAAAA,CAAUC,GAAG,CAAC,UAAA,CAAA;MAkChBC,cAAAA,GAAiB,CAS1BC,QAAAA,EACAC,UAAAA,EACAC,QACAC,UAAAA,EACAC,OAAAA,GAAAA;IAEFR,MAAAA,CAAOS,KAAK,CAAC,gBAAA,EAAkB;AAAEJ,QAAAA,UAAAA;AAAYC,QAAAA,MAAAA;AAAQF,QAAAA,QAAAA;AAAUG,QAAAA,UAAAA;AAAYC,QAAAA;AAAQ,KAAA,CAAA;IACnF,MAAME,YAAAA,GAAeC,iBAAmBP,QAAAA,EAAUC,UAAAA,CAAAA;IAClD,OAAO;AAAE,QAAA,GAAGK,YAAY;AAAEJ,QAAAA,MAAAA;AAAQC,QAAAA,UAAAA;AAAYC,QAAAA,OAAAA,EAASA,WAAW;AAAwC,KAAA;AAC5G;AAEO,MAAMI,aAAa,CAACC,QAAAA,GAAAA;IACzB,OAAOA,QAAAA,IAAY,QACjB,OAAOA,QAAAA,KAAa,YACpBA,QAAAA,CAASR,UAAU,IAAI,IAAA,IACvBQ,QAAAA,CAASP,MAAM,IAAI,IAAA,IACnBO,QAAAA,CAAST,QAAQ,IAAI,IAAA,IACrBS,QAAAA,CAASN,UAAU,IAAI,IAAA,IACvBM,QAAAA,CAASL,OAAO,IAAI,IAAA;AACxB;;;;"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/Instance.ts"],
4
+ "sourcesContent": ["import LibLogger from \"./logger\";\nimport { Item } from \"@fjell/core\";\nimport { Instance as BaseInstance, Coordinate, createInstance as createBaseInstance, Registry } from \"@fjell/registry\";\nimport { Operations, Options } from \"@fjell/lib\";\nimport { ItemRouter } from \"./ItemRouter\";\n\nconst logger = LibLogger.get(\"Instance\");\n\n/**\n * The Express Router Instance interface represents a router model instance that extends the base Instance\n * from @fjell/registry and adds express router operations for handling HTTP requests.\n *\n * The interface extends the base Instance (which provides coordinate and registry) with:\n * - router: Provides methods for routing HTTP requests and handling CRUD operations\n * - operations: Provides methods for interacting with the data model (get, find, all, etc.)\n * - options: Provides hooks, validators, finders, actions, and facets\n *\n * @template V - The type of the data model item, extending Item\n * @template S - The string literal type representing the model's key type\n * @template L1-L5 - Optional string literal types for location hierarchy levels\n */\nexport interface Instance<\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never\n> extends BaseInstance<S, L1, L2, L3, L4, L5> {\n /** The router object that provides methods for handling HTTP requests */\n router: ItemRouter<S, L1, L2, L3, L4, L5>;\n /** The operations object that provides methods for interacting with the data model */\n operations: Operations<V, S, L1, L2, L3, L4, L5>;\n /** The options object that provides hooks, validators, finders, actions, and facets */\n options: Options<V, S, L1, L2, L3, L4, L5>;\n /** The data model item type (for type safety) */\n readonly itemType?: V;\n}\n\nexport const createInstance = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never\n>(\n registry: Registry,\n coordinate: Coordinate<S, L1, L2, L3, L4, L5>,\n router: ItemRouter<S, L1, L2, L3, L4, L5>,\n operations: Operations<V, S, L1, L2, L3, L4, L5>,\n options?: Options<V, S, L1, L2, L3, L4, L5>,\n ): Instance<V, S, L1, L2, L3, L4, L5> => {\n logger.debug(\"createInstance\", { coordinate, router, registry, operations, options });\n const baseInstance = createBaseInstance(registry, coordinate);\n return { ...baseInstance, router, operations, options: options || {} as Options<V, S, L1, L2, L3, L4, L5> };\n}\n\nexport const isInstance = (instance: any): instance is Instance<any, any, any, any, any, any, any> => {\n return instance != null &&\n typeof instance === 'object' &&\n instance.coordinate != null &&\n instance.router != null &&\n instance.registry != null &&\n instance.operations != null &&\n instance.options != null;\n}\n"],
5
+ "mappings": "AAAA,OAAO,eAAe;AAEtB,SAA+C,kBAAkB,0BAAoC;AAIrG,MAAM,SAAS,UAAU,IAAI,UAAU;AAkChC,MAAM,iBAAiB,CAS1B,UACA,YACA,QACA,YACA,YACuC;AACzC,SAAO,MAAM,kBAAkB,EAAE,YAAY,QAAQ,UAAU,YAAY,QAAQ,CAAC;AACpF,QAAM,eAAe,mBAAmB,UAAU,UAAU;AAC5D,SAAO,EAAE,GAAG,cAAc,QAAQ,YAAY,SAAS,WAAW,CAAC,EAAuC;AAC5G;AAEO,MAAM,aAAa,CAAC,aAA2E;AACpG,SAAO,YAAY,QACjB,OAAO,aAAa,YACpB,SAAS,cAAc,QACvB,SAAS,UAAU,QACnB,SAAS,YAAY,QACrB,SAAS,cAAc,QACvB,SAAS,WAAW;AACxB;",
6
+ "names": []
7
+ }
@@ -1,7 +1,7 @@
1
- import { Item } from '@fjell/core';
2
- import { ItemRouter } from './ItemRouter';
3
- import { InstanceFactory as BaseInstanceFactory } from '@fjell/registry';
4
- import { Operations, Options } from '@fjell/lib';
1
+ import { Item } from "@fjell/core";
2
+ import { ItemRouter } from "./ItemRouter";
3
+ import { InstanceFactory as BaseInstanceFactory } from "@fjell/registry";
4
+ import { Operations, Options } from "@fjell/lib";
5
5
  export type InstanceFactory<V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> = (router: ItemRouter<S, L1, L2, L3, L4, L5>, operations: Operations<V, S, L1, L2, L3, L4, L5>, options?: Options<V, S, L1, L2, L3, L4, L5>) => BaseInstanceFactory<S, L1, L2, L3, L4, L5> & {
6
6
  readonly _itemType?: V;
7
7
  };
@@ -9,3 +9,4 @@ export type InstanceFactory<V extends Item<S, L1, L2, L3, L4, L5>, S extends str
9
9
  * Factory function for creating express-router instances
10
10
  */
11
11
  export declare const createInstanceFactory: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(router: ItemRouter<S, L1, L2, L3, L4, L5>, operations: Operations<V, S, L1, L2, L3, L4, L5>, options?: Options<V, S, L1, L2, L3, L4, L5>) => BaseInstanceFactory<S, L1, L2, L3, L4, L5>;
12
+ //# sourceMappingURL=InstanceFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InstanceFactory.d.ts","sourceRoot":"","sources":["../src/InstanceFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,IAAI,mBAAmB,EAAyB,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAOjD,MAAM,MAAM,eAAe,CACzB,CAAC,SAAS,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EACrC,CAAC,SAAS,MAAM,EAChB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,IACvB,CACF,MAAM,EAAE,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EACzC,UAAU,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAChD,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,KACxC,mBAAmB,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG;IAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,CAAC,SAAS,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EACrC,CAAC,SAAS,MAAM,EAChB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EAEvB,QAAQ,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EACzC,YAAY,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAChD,UAAU,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,KAC1C,mBAAmB,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAM7C,CAAC"}
@@ -1,21 +1,13 @@
1
- import { createInstance } from './Instance.js';
2
- import LibLogger from './logger.js';
3
-
1
+ import { createInstance } from "./Instance";
2
+ import LibLogger from "./logger";
4
3
  const logger = LibLogger.get("InstanceFactory");
5
- /**
6
- * Factory function for creating express-router instances
7
- */ const createInstanceFactory = (router, operations, options)=>{
8
- return (coordinate, context)=>{
9
- logger.debug("Creating express-router instance", {
10
- coordinate,
11
- registry: context.registry,
12
- router,
13
- operations,
14
- options
15
- });
16
- return createInstance(context.registry, coordinate, router, operations, options);
17
- };
4
+ const createInstanceFactory = (router, operations, options) => {
5
+ return (coordinate, context) => {
6
+ logger.debug("Creating express-router instance", { coordinate, registry: context.registry, router, operations, options });
7
+ return createInstance(context.registry, coordinate, router, operations, options);
8
+ };
9
+ };
10
+ export {
11
+ createInstanceFactory
18
12
  };
19
-
20
- export { createInstanceFactory };
21
13
  //# sourceMappingURL=InstanceFactory.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"InstanceFactory.js","sources":["../src/InstanceFactory.ts"],"sourcesContent":["import { Item } from \"@fjell/core\";\nimport { ItemRouter } from \"./ItemRouter\";\nimport { InstanceFactory as BaseInstanceFactory, Registry, RegistryHub } from \"@fjell/registry\";\nimport { Operations, Options } from \"@fjell/lib\";\nimport { createInstance, Instance } from \"./Instance\";\nimport { Coordinate } from \"@fjell/registry\";\nimport LibLogger from \"./logger\";\n\nconst logger = LibLogger.get(\"InstanceFactory\");\n\nexport type InstanceFactory<\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never\n> = (\n router: ItemRouter<S, L1, L2, L3, L4, L5>,\n operations: Operations<V, S, L1, L2, L3, L4, L5>,\n options?: Options<V, S, L1, L2, L3, L4, L5>\n) => BaseInstanceFactory<S, L1, L2, L3, L4, L5> & { readonly _itemType?: V };\n\n/**\n * Factory function for creating express-router instances\n */\nexport const createInstanceFactory = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never\n>(\n router: ItemRouter<S, L1, L2, L3, L4, L5>,\n operations: Operations<V, S, L1, L2, L3, L4, L5>,\n options?: Options<V, S, L1, L2, L3, L4, L5>\n ): BaseInstanceFactory<S, L1, L2, L3, L4, L5> => {\n return (coordinate: Coordinate<S, L1, L2, L3, L4, L5>, context: { registry: Registry, registryHub?: RegistryHub }) => {\n logger.debug(\"Creating express-router instance\", { coordinate, registry: context.registry, router, operations, options });\n\n return createInstance(context.registry, coordinate, router, operations, options) as Instance<V, S, L1, L2, L3, L4, L5>;\n };\n};\n"],"names":["logger","LibLogger","get","createInstanceFactory","router","operations","options","coordinate","context","debug","registry","createInstance"],"mappings":";;;AAQA,MAAMA,MAAAA,GAASC,SAAAA,CAAUC,GAAG,CAAC,iBAAA,CAAA;AAgB7B;;AAEC,IACM,MAAMC,qBAAAA,GAAwB,CASjCC,QACAC,UAAAA,EACAC,OAAAA,GAAAA;AAEF,IAAA,OAAO,CAACC,UAAAA,EAA+CC,OAAAA,GAAAA;QACrDR,MAAAA,CAAOS,KAAK,CAAC,kCAAA,EAAoC;AAAEF,YAAAA,UAAAA;AAAYG,YAAAA,QAAAA,EAAUF,QAAQE,QAAQ;AAAEN,YAAAA,MAAAA;AAAQC,YAAAA,UAAAA;AAAYC,YAAAA;AAAQ,SAAA,CAAA;AAEvH,QAAA,OAAOK,eAAeH,OAAAA,CAAQE,QAAQ,EAAEH,UAAAA,EAAYH,QAAQC,UAAAA,EAAYC,OAAAA,CAAAA;AAC1E,IAAA,CAAA;AACF;;;;"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/InstanceFactory.ts"],
4
+ "sourcesContent": ["import { Item } from \"@fjell/core\";\nimport { ItemRouter } from \"./ItemRouter\";\nimport { InstanceFactory as BaseInstanceFactory, Registry, RegistryHub } from \"@fjell/registry\";\nimport { Operations, Options } from \"@fjell/lib\";\nimport { createInstance, Instance } from \"./Instance\";\nimport { Coordinate } from \"@fjell/registry\";\nimport LibLogger from \"./logger\";\n\nconst logger = LibLogger.get(\"InstanceFactory\");\n\nexport type InstanceFactory<\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never\n> = (\n router: ItemRouter<S, L1, L2, L3, L4, L5>,\n operations: Operations<V, S, L1, L2, L3, L4, L5>,\n options?: Options<V, S, L1, L2, L3, L4, L5>\n) => BaseInstanceFactory<S, L1, L2, L3, L4, L5> & { readonly _itemType?: V };\n\n/**\n * Factory function for creating express-router instances\n */\nexport const createInstanceFactory = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never\n>(\n router: ItemRouter<S, L1, L2, L3, L4, L5>,\n operations: Operations<V, S, L1, L2, L3, L4, L5>,\n options?: Options<V, S, L1, L2, L3, L4, L5>\n ): BaseInstanceFactory<S, L1, L2, L3, L4, L5> => {\n return (coordinate: Coordinate<S, L1, L2, L3, L4, L5>, context: { registry: Registry, registryHub?: RegistryHub }) => {\n logger.debug(\"Creating express-router instance\", { coordinate, registry: context.registry, router, operations, options });\n\n return createInstance(context.registry, coordinate, router, operations, options) as Instance<V, S, L1, L2, L3, L4, L5>;\n };\n};\n"],
5
+ "mappings": "AAIA,SAAS,sBAAgC;AAEzC,OAAO,eAAe;AAEtB,MAAM,SAAS,UAAU,IAAI,iBAAiB;AAmBvC,MAAM,wBAAwB,CASjC,QACA,YACA,YAC+C;AACjD,SAAO,CAAC,YAA+C,YAA+D;AACpH,WAAO,MAAM,oCAAoC,EAAE,YAAY,UAAU,QAAQ,UAAU,QAAQ,YAAY,QAAQ,CAAC;AAExH,WAAO,eAAe,QAAQ,UAAU,YAAY,QAAQ,YAAY,OAAO;AAAA,EACjF;AACF;",
6
+ "names": []
7
+ }
@@ -1,13 +1,13 @@
1
- import { ComKey, Item, LocKey, LocKeyArray, PriKey } from '@fjell/core';
2
- import { Instance } from './Instance';
3
- import { Request, Response, Router } from 'express';
1
+ import { ComKey, Item, LocKey, LocKeyArray, PriKey } from "@fjell/core";
2
+ import { Instance } from "./Instance";
3
+ import { Request, Response, Router } from "express";
4
4
  export type ItemRouterOptions = Record<string, never>;
5
5
  export declare class ItemRouter<S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> {
6
6
  protected lib: Instance<Item<S, L1, L2, L3, L4, L5>, S, L1, L2, L3, L4, L5>;
7
7
  private keyType;
8
8
  protected options: ItemRouterOptions;
9
9
  private childRouters;
10
- protected logger: import('@fjell/logging').Logger;
10
+ protected logger: import("@fjell/logging").Logger;
11
11
  constructor(lib: Instance<Item<S, L1, L2, L3, L4, L5>, S, L1, L2, L3, L4, L5>, keyType: S, options?: ItemRouterOptions);
12
12
  getPkType: () => S;
13
13
  protected getPkParam: () => string;
@@ -41,3 +41,4 @@ export declare class ItemRouter<S extends string, L1 extends string = never, L2
41
41
  */
42
42
  protected validatePKParam: (pkParamValue: string) => boolean;
43
43
  }
44
+ //# sourceMappingURL=ItemRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItemRouter.d.ts","sourceRoot":"","sources":["../src/ItemRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EAEN,IAAI,EAEJ,MAAM,EACN,WAAW,EACX,MAAM,EAEP,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGpD,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEtD,qBAAa,UAAU,CACrB,CAAC,SAAS,MAAM,EAChB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK,EACzB,EAAE,SAAS,MAAM,GAAG,KAAK;I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