@thisisagile/easy 8.38.3 → 8.39.2

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.
@@ -0,0 +1,26 @@
1
+ declare type Func<T = unknown> = (a: any) => T;
2
+ export declare type Viewer = {
3
+ in?: {
4
+ key: string;
5
+ f?: Func;
6
+ };
7
+ out?: {
8
+ key: string;
9
+ f?: Func;
10
+ };
11
+ };
12
+ declare type InOut = {
13
+ in?: Func | View;
14
+ out?: Func | View;
15
+ col?: string;
16
+ };
17
+ declare type Views = {
18
+ [key: string]: string | Func | InOut;
19
+ };
20
+ export declare class View {
21
+ readonly views: Viewer[];
22
+ readonly from: 'scratch' | 'source';
23
+ constructor(views?: Viewer[], from?: 'scratch' | 'source');
24
+ }
25
+ export declare const view: (map: Views, from?: "scratch" | "source" | undefined) => View;
26
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.view = exports.View = void 0;
4
+ class View {
5
+ constructor(views = [], from = 'scratch') {
6
+ this.views = views;
7
+ this.from = from;
8
+ }
9
+ }
10
+ exports.View = View;
11
+ const view = (map, from) => new View([], from);
12
+ exports.view = view;
13
+ //# sourceMappingURL=View.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"View.js","sourceRoot":"","sources":["../../src/utils/View.ts"],"names":[],"mappings":";;;AAOA,MAAa,IAAI;IACf,YAAqB,QAAkB,EAAE,EAAW,OAA6B,SAAS;QAArE,UAAK,GAAL,KAAK,CAAe;QAAW,SAAI,GAAJ,IAAI,CAAkC;IAC1F,CAAC;CACF;AAHD,oBAGC;AAEM,MAAM,IAAI,GAAG,CAAC,GAAU,EAAE,IAA2B,EAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;AAA7E,QAAA,IAAI,QAAyE"}
@@ -8,3 +8,4 @@ export * from './Property';
8
8
  export * from './State';
9
9
  export * from './Sentence';
10
10
  export * from './Traverse';
11
+ export * from './View';
@@ -20,4 +20,5 @@ __exportStar(require("./Property"), exports);
20
20
  __exportStar(require("./State"), exports);
21
21
  __exportStar(require("./Sentence"), exports);
22
22
  __exportStar(require("./Traverse"), exports);
23
+ __exportStar(require("./View"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAuB;AACvB,4CAA0B;AAC1B,uCAAqB;AACrB,wCAAsB;AACtB,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B;AAC3B,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAuB;AACvB,4CAA0B;AAC1B,uCAAqB;AACrB,wCAAsB;AACtB,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B;AAC3B,6CAA2B;AAC3B,yCAAuB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thisisagile/easy",
3
- "version": "8.38.3",
3
+ "version": "8.39.2",
4
4
  "description": "Straightforward library for building domain-driven microservice architectures",
5
5
  "author": "Sander Hoogendoorn",
6
6
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "access": "public"
32
32
  },
33
33
  "devDependencies": {
34
- "@thisisagile/easy-test": "8.38.3",
34
+ "@thisisagile/easy-test": "8.39.2",
35
35
  "@types/form-urlencoded": "^4.4.0",
36
36
  "@types/jsonwebtoken": "^8.5.8",
37
37
  "@types/validator": "^13.7.1"
@@ -0,0 +1,13 @@
1
+ type Func<T = unknown> = (a: any) => T;
2
+ export type Viewer = { in?: { key: string, f?: Func }, out?: { key: string, f?: Func } };
3
+
4
+ type InOut = { in?: Func | View, out?: Func | View, col?: string };
5
+ type Views = { [key: string]: string | Func | InOut };
6
+
7
+
8
+ export class View {
9
+ constructor(readonly views: Viewer[] = [], readonly from: 'scratch' | 'source' = 'scratch') {
10
+ }
11
+ }
12
+
13
+ export const view = (map: Views, from?: 'scratch' | 'source'): View => new View([], from);
@@ -8,3 +8,4 @@ export * from './Property';
8
8
  export * from './State';
9
9
  export * from './Sentence';
10
10
  export * from './Traverse';
11
+ export * from './View';