@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.
- package/README.md +2 -2
- package/build.js +4 -0
- package/dist/CItemRouter.d.ts +5 -4
- package/dist/CItemRouter.d.ts.map +1 -0
- package/dist/CItemRouter.js +63 -92
- package/dist/CItemRouter.js.map +7 -1
- package/dist/Instance.d.ts +5 -4
- package/dist/Instance.d.ts.map +1 -0
- package/dist/Instance.js +12 -22
- package/dist/Instance.js.map +7 -1
- package/dist/InstanceFactory.d.ts +5 -4
- package/dist/InstanceFactory.d.ts.map +1 -0
- package/dist/InstanceFactory.js +10 -18
- package/dist/InstanceFactory.js.map +7 -1
- package/dist/ItemRouter.d.ts +5 -4
- package/dist/ItemRouter.d.ts.map +1 -0
- package/dist/ItemRouter.js +290 -405
- package/dist/ItemRouter.js.map +7 -1
- package/dist/PItemRouter.d.ts +5 -4
- package/dist/PItemRouter.d.ts.map +1 -0
- package/dist/PItemRouter.js +43 -67
- package/dist/PItemRouter.js.map +7 -1
- package/dist/Registry.d.ts +1 -0
- package/dist/Registry.d.ts.map +1 -0
- package/dist/Registry.js +22 -27
- package/dist/Registry.js.map +7 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -6
- package/dist/index.js.map +7 -1
- package/dist/logger.d.ts +2 -1
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +6 -5
- package/dist/logger.js.map +7 -1
- package/dist/util/general.d.ts +1 -0
- package/dist/util/general.d.ts.map +1 -0
- package/dist/util/general.js +50 -0
- package/dist/util/general.js.map +7 -0
- package/docs/docs.config.ts +1 -32
- package/docs/package.json +4 -4
- package/docs/public/README.md +2 -2
- package/docs/tsconfig.node.json +2 -11
- package/package.json +25 -28
- package/vitest.config.ts +45 -0
- package/dist/CItemRouter.cjs +0 -100
- package/dist/CItemRouter.cjs.map +0 -1
- package/dist/Instance.cjs +0 -31
- package/dist/Instance.cjs.map +0 -1
- package/dist/InstanceFactory.cjs +0 -25
- package/dist/InstanceFactory.cjs.map +0 -1
- package/dist/ItemRouter.cjs +0 -427
- package/dist/ItemRouter.cjs.map +0 -1
- package/dist/PItemRouter.cjs +0 -75
- package/dist/PItemRouter.cjs.map +0 -1
- package/dist/Registry.cjs +0 -36
- package/dist/Registry.cjs.map +0 -1
- package/dist/index.cjs +0 -657
- package/dist/index.cjs.map +0 -1
- package/dist/logger.cjs +0 -10
- package/dist/logger.cjs.map +0 -1
- package/docs/package-lock.json +0 -5129
- package/docs/src/index.css +0 -21
- package/docs/src/main.tsx +0 -12
- package/docs/src/test/setup.ts +0 -1
- 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
|
|
23
|
+
Or with npm:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
|
|
26
|
+
npm install @fjell/express-router
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Quick Start
|
package/build.js
ADDED
package/dist/CItemRouter.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ComKey, Item, LocKeyArray } from
|
|
2
|
-
import { Request, Response } from
|
|
3
|
-
import { ItemRouter, ItemRouterOptions } from
|
|
4
|
-
import { Instance } from
|
|
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"}
|
package/dist/CItemRouter.js
CHANGED
|
@@ -1,96 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
64
|
+
export {
|
|
65
|
+
CItemRouter
|
|
66
|
+
};
|
|
96
67
|
//# sourceMappingURL=CItemRouter.js.map
|
package/dist/CItemRouter.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
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 }\n\n res.json(items.map((item: Item<S, L1, L2, L3, L4, L5>) => validatePK(item, this.getPkType())));\n };\n\n}\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EACgD;AAAA,EAAoC;AAAA,OAC7E;AAEP,SAAS,kBAAqC;AAOvC,MAAM,oBAQH,WAAkC;AAAA,EAElC;AAAA,EAER,YACE,KACA,MACA,aACA,UAA6B,CAAC,GAC9B;AACA,UAAM,KAAY,MAAM,OAAO;AAC/B,SAAK,cAAc;AAAA,EACrB;AAAA,EAEO,YAAqB;AAC1B,WAAO,CAAC,CAAC,KAAK;AAAA,EAChB;AAAA,EAEO,MAAM,KAA8C;AACzD,UAAM,MAAM,KAAK,MAAM,GAAG;AAC1B,UAAM,MAAM,KAAK,aAAa,GAAG;AACjC,WAAO,EAAE,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI;AAAA,EACvC;AAAA,EAEO,OAAO,KAA+C;AAM3D,QAAI,MAAuC,CAAC,KAAK,MAAM,GAAG,CAAC;AAC3D,UAAM,IAAI,OAAO,KAAK,YAAY,OAAO,GAAG,CAAoC;AAChF,WAAO;AAAA,EACT;AAAA,EAEO,aAAa,KAAgD;AAClE,WAAO,KAAK,YAAY,OAAO,GAAG;AAAA,EACpC;AAAA,EAEU,aAAa,OAAO,KAAc,QAAkB;AAC5D,UAAM,gBAAgB,KAAK,IAAI;AAC/B,SAAK,OAAO,QAAQ,iBAAiB,EAAE,MAAM,KAAK,MAAM,OAAO,KAAK,OAAO,QAAQ,KAAK,QAAQ,QAAQ,KAAK,OAAO,CAAC;AACrH,UAAM,eAAe,KAAK,aAAa,IAAI,IAAmC;AAC9E,QAAI,OAAO,WAAW,MAAM,cAAc;AAAA,MACxC;AAAA,MAAc,EAAE,WAAW,KAAK,aAAa,G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
import { Operations, Options } from
|
|
4
|
-
import { ItemRouter } from
|
|
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,E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EAAE,EAAE,CAAC,EAC7C,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,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
|
|
2
|
-
import { createInstance as
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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
|
package/dist/Instance.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
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
|
|
2
|
-
import { ItemRouter } from
|
|
3
|
-
import { InstanceFactory as BaseInstanceFactory } from
|
|
4
|
-
import { Operations, Options } from
|
|
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,E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E,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"}
|
package/dist/InstanceFactory.js
CHANGED
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import { createInstance } from
|
|
2
|
-
import LibLogger from
|
|
3
|
-
|
|
1
|
+
import { createInstance } from "./Instance";
|
|
2
|
+
import LibLogger from "./logger";
|
|
4
3
|
const logger = LibLogger.get("InstanceFactory");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return (coordinate,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
{
|
|
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
|
+
}
|
package/dist/ItemRouter.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ComKey, Item, LocKey, LocKeyArray, PriKey } from
|
|
2
|
-
import { Instance } from
|
|
3
|
-
import { Request, Response, Router } from
|
|
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(
|
|
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
|
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