jinaga-server 2.4.2 → 2.5.0

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/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  export { AuthenticationDevice } from "./authentication/authentication-device";
2
2
  export { AuthenticationSession } from "./authentication/authentication-session";
3
3
  export { AuthorizationKeystore } from "./authorization/authorization-keystore";
4
- export { Keystore } from "./keystore";
5
- export { FeedCache } from "./http/feed-cache";
4
+ export { DistributedFactCache } from "./authorization/distributed-fact-cache";
5
+ export { FeedCache, FeedDefinition } from "./http/feed-cache";
6
6
  export { HttpRouter, RequestUser } from "./http/router";
7
7
  export { JinagaServer, JinagaServerConfig, JinagaServerInstance, tracePool } from "./jinaga-server";
8
+ export { Keystore } from "./keystore";
8
9
  export { MemoryFeedCache } from "./memory/memory-feed-cache";
9
10
  export { MemoryKeystore } from "./memory/memory-keystore";
10
11
  export { PostgresKeystore } from "./postgres/postgres-keystore";
package/dist/index.js CHANGED
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PostgresStore = exports.PostgresKeystore = exports.MemoryKeystore = exports.MemoryFeedCache = exports.tracePool = exports.JinagaServer = exports.HttpRouter = exports.AuthorizationKeystore = exports.AuthenticationSession = exports.AuthenticationDevice = void 0;
3
+ exports.PostgresStore = exports.PostgresKeystore = exports.MemoryKeystore = exports.MemoryFeedCache = exports.tracePool = exports.JinagaServer = exports.HttpRouter = exports.DistributedFactCache = exports.AuthorizationKeystore = exports.AuthenticationSession = exports.AuthenticationDevice = void 0;
4
4
  var authentication_device_1 = require("./authentication/authentication-device");
5
5
  Object.defineProperty(exports, "AuthenticationDevice", { enumerable: true, get: function () { return authentication_device_1.AuthenticationDevice; } });
6
6
  var authentication_session_1 = require("./authentication/authentication-session");
7
7
  Object.defineProperty(exports, "AuthenticationSession", { enumerable: true, get: function () { return authentication_session_1.AuthenticationSession; } });
8
8
  var authorization_keystore_1 = require("./authorization/authorization-keystore");
9
9
  Object.defineProperty(exports, "AuthorizationKeystore", { enumerable: true, get: function () { return authorization_keystore_1.AuthorizationKeystore; } });
10
+ var distributed_fact_cache_1 = require("./authorization/distributed-fact-cache");
11
+ Object.defineProperty(exports, "DistributedFactCache", { enumerable: true, get: function () { return distributed_fact_cache_1.DistributedFactCache; } });
10
12
  var router_1 = require("./http/router");
11
13
  Object.defineProperty(exports, "HttpRouter", { enumerable: true, get: function () { return router_1.HttpRouter; } });
12
14
  var jinaga_server_1 = require("./jinaga-server");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,gFAA8E;AAArE,6HAAA,oBAAoB,OAAA;AAC7B,kFAAgF;AAAvE,+HAAA,qBAAqB,OAAA;AAC9B,iFAA+E;AAAtE,+HAAA,qBAAqB,OAAA;AAG9B,wCAAwD;AAA/C,oGAAA,UAAU,OAAA;AACnB,iDAAoG;AAA3F,6GAAA,YAAY,OAAA;AAA4C,0GAAA,SAAS,OAAA;AAC1E,gEAA6D;AAApD,oHAAA,eAAe,OAAA;AACxB,4DAA0D;AAAjD,iHAAA,cAAc,OAAA;AACvB,kEAAgE;AAAvD,qHAAA,gBAAgB,OAAA;AACzB,4DAA0D;AAAjD,+GAAA,aAAa,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,gFAA8E;AAArE,6HAAA,oBAAoB,OAAA;AAC7B,kFAAgF;AAAvE,+HAAA,qBAAqB,OAAA;AAC9B,iFAA+E;AAAtE,+HAAA,qBAAqB,OAAA;AAC9B,iFAA8E;AAArE,8HAAA,oBAAoB,OAAA;AAE7B,wCAAwD;AAA/C,oGAAA,UAAU,OAAA;AACnB,iDAAoG;AAA3F,6GAAA,YAAY,OAAA;AAA4C,0GAAA,SAAS,OAAA;AAE1E,gEAA6D;AAApD,oHAAA,eAAe,OAAA;AACxB,4DAA0D;AAAjD,iHAAA,cAAc,OAAA;AACvB,kEAAgE;AAAvD,qHAAA,gBAAgB,OAAA;AACzB,4DAA0D;AAAjD,+GAAA,aAAa,OAAA"}
@@ -80,9 +80,7 @@ class ConnectionFactory {
80
80
  });
81
81
  }
82
82
  createClient() {
83
- return jinaga_1.Trace.dependency('Postgres client', '', () => {
84
- return this.postgresPool.connect();
85
- });
83
+ return this.postgresPool.connect();
86
84
  }
87
85
  }
88
86
  exports.ConnectionFactory = ConnectionFactory;
@@ -1 +1 @@
1
- {"version":3,"file":"connection.js","sourceRoot":"","sources":["../../src/postgres/connection.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAA+B;AAC/B,2BAAqD;AACrD,6CAAwC;AAIxC,MAAa,iBAAiB;IAC1B,YAAqB,YAAkB;QAAlB,iBAAY,GAAZ,YAAY,CAAM;IACvC,CAAC;IAED,eAAe,CAAI,QAAgD;QAC/D,OAAO,IAAI,CAAC,IAAI,CAAC,CAAM,UAAU,EAAC,EAAE;YAChC,qEAAqE;YACrE,IAAI,QAAQ,GAAG,CAAC,CAAC;YACjB,OAAO,IAAI,EAAE;gBACT,IAAI;oBACA,MAAM,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;oBAChC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,CAAC;oBAC1C,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;oBACjC,OAAO,MAAM,CAAC;iBACjB;gBACD,OAAO,CAAC,EAAE;oBACN,cAAK,CAAC,IAAI,CAAC,8BAA8B,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC9D,MAAM,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;oBACnC,IAAI,CAAC,YAAY,kBAAa,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,EAAE;wBAClD,cAAK,CAAC,IAAI,CAAC,kCAAkC,C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AAK,KAAK,CAAC,MAAM,EAAE;wBAC1B,MAAM,CAAC,CAAC;qBACX;iBACJ;gBACD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;oBACpB,cAAK,CAAC,IAAI,CAAC,uBAAuB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;oBAC5D,MAAM,IAAA,eAAK,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;iBAC/B;aACJ;YACD,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACnD,CAAC;KAAA;IAEO,YAAY;QAChB,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;IACvC,CAAC;CACJ;AArED,8CAqEC;AAED,SAAS,gBAAgB,CAAC,CAAM;IAC5B,IAAI,CAAC,CAAC,IAAI,KAAK,cAAc,EAAE;QAC3B,OAAO,IAAI,CAAC;KACf;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,SAAS,aAAa,CAAC,CAAM;IACzB,MAAM,KAAK,GAAG;QACV,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,OAAO,EAAE,CAAC,CAAC,OAAO;KACrB,CAAC;IACF,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinaga-server",
3
- "version": "2.4.2",
3
+ "version": "2.5.0",
4
4
  "description": "Data management for web and mobile applications.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "express": "^4.18.2",
51
- "jinaga": "^5.4.3",
51
+ "jinaga": "^5.5.0",
52
52
  "node-forge": "^1.3.1",
53
53
  "passport": "^0.6.0",
54
54
  "pg": "^8.11.0"
package/src/index.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  export { AuthenticationDevice } from "./authentication/authentication-device";
2
2
  export { AuthenticationSession } from "./authentication/authentication-session";
3
3
  export { AuthorizationKeystore } from "./authorization/authorization-keystore";
4
- export { Keystore } from "./keystore";
5
- export { FeedCache } from "./http/feed-cache";
4
+ export { DistributedFactCache } from "./authorization/distributed-fact-cache";
5
+ export { FeedCache, FeedDefinition } from "./http/feed-cache";
6
6
  export { HttpRouter, RequestUser } from "./http/router";
7
7
  export { JinagaServer, JinagaServerConfig, JinagaServerInstance, tracePool } from "./jinaga-server";
8
+ export { Keystore } from "./keystore";
8
9
  export { MemoryFeedCache } from "./memory/memory-feed-cache";
9
10
  export { MemoryKeystore } from "./memory/memory-keystore";
10
11
  export { PostgresKeystore } from "./postgres/postgres-keystore";
11
- export { PostgresStore } from "./postgres/postgres-store";
12
+ export { PostgresStore } from "./postgres/postgres-store";
@@ -71,9 +71,7 @@ export class ConnectionFactory {
71
71
  }
72
72
 
73
73
  private createClient() {
74
- return Trace.dependency('Postgres client', '', () => {
75
- return this.postgresPool.connect();
76
- });
74
+ return this.postgresPool.connect();
77
75
  }
78
76
  }
79
77