jinaga-server 3.0.1 → 3.1.1

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 (35) hide show
  1. package/dist/http/line-reader.d.ts +2 -0
  2. package/dist/http/line-reader.js +68 -0
  3. package/dist/http/line-reader.js.map +1 -0
  4. package/dist/http/router.d.ts +4 -1
  5. package/dist/http/router.js +142 -21
  6. package/dist/http/router.js.map +1 -1
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +3 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/jinaga-server.d.ts +1 -0
  11. package/dist/jinaga-server.js +1 -1
  12. package/dist/jinaga-server.js.map +1 -1
  13. package/http/sans-auth/Feeds options.http +1 -0
  14. package/http/sans-auth/Load json.http +64 -0
  15. package/http/sans-auth/Save graph.http +6 -0
  16. package/http/sans-auth/Save json.http +13 -0
  17. package/http/with-auth/Create post with auth.http +24 -0
  18. package/http/with-auth/Define authorization rules.http +25 -0
  19. package/http/with-auth/Define distribution rules.http +30 -0
  20. package/http/with-auth/Feed sites.http +3 -0
  21. package/http/with-auth/Feeds options.http +1 -0
  22. package/http/with-auth/Feeds sites.http +32 -0
  23. package/http/with-auth/Get posts with auth.http +32 -0
  24. package/http/with-auth/Load titles.http +21 -0
  25. package/integration-test/jinaga-test/Dockerfile +1 -1
  26. package/integration-test/jinaga-test/package-lock.json +143 -55
  27. package/integration-test/jinaga-test/package.json +2 -2
  28. package/package.json +3 -3
  29. package/replicator/index.ts +0 -2
  30. package/replicator/package-lock.json +157 -86
  31. package/replicator/package.json +1 -3
  32. package/src/http/line-reader.ts +69 -0
  33. package/src/http/router.ts +180 -27
  34. package/src/index.ts +1 -0
  35. package/src/jinaga-server.ts +2 -1
@@ -0,0 +1,30 @@
1
+ POST {{distributionEndpoint}}
2
+ Content-Type: text/plain
3
+ Authorization: Bearer {{secret}}
4
+
5
+ distribution {
6
+ share (site: Blog.Site) {
7
+ post: Blog.Post [
8
+ post->site: Blog.Site = site
9
+ !E {
10
+ deleted: Blog.Post.Deleted [
11
+ deleted->post: Blog.Post = post
12
+ ]
13
+ }
14
+ ]
15
+ } => {
16
+ id = #post
17
+ createdAt = post.createdAt
18
+ titles = {
19
+ title: Blog.Post.Title [
20
+ title->post: Blog.Post = post
21
+ !E {
22
+ next: Blog.Post.Title [
23
+ next->prior: Blog.Post.Title = title
24
+ ]
25
+ }
26
+ ]
27
+ } => title.value
28
+ }
29
+ with everyone
30
+ }
@@ -0,0 +1,3 @@
1
+ GET {{replicatorUrl}}/feeds/dx2gDQc8HI5kA1zm4p32D8b4mL_UySPtTMCbIUO43E-FiCG7bqRWqOLQRIDDL6J4qLUMdJI8q0aHl0Yel9zVlQ
2
+ Authorization: oauth2 authorization_code
3
+ Accept: application/json
@@ -0,0 +1 @@
1
+ OPTIONS {{replicatorUrl}}/feeds
@@ -0,0 +1,32 @@
1
+ POST {{replicatorUrl}}/feeds
2
+ Content-Type: text/plain
3
+ Authorization: oauth2 authorization_code
4
+
5
+ let site: Blog.Site = {
6
+ creator: me,
7
+ domain: "michaelperry.net"
8
+ }
9
+
10
+ (site: Blog.Site) {
11
+ post: Blog.Post [
12
+ post->site: Blog.Site = site
13
+ !E {
14
+ deleted: Blog.Post.Deleted [
15
+ deleted->post: Blog.Post = post
16
+ ]
17
+ }
18
+ ]
19
+ } => {
20
+ id = #post
21
+ createdAt = post.createdAt
22
+ titles = {
23
+ title: Blog.Post.Title [
24
+ title->post: Blog.Post = post
25
+ !E {
26
+ next: Blog.Post.Title [
27
+ next->prior: Blog.Post.Title = title
28
+ ]
29
+ }
30
+ ]
31
+ } => title.value
32
+ }
@@ -0,0 +1,32 @@
1
+ POST {{replicatorUrl}}/read
2
+ Content-Type: text/plain
3
+ Authorization: oauth2 authorization_code
4
+
5
+ let site: Blog.Site = {
6
+ creator: me,
7
+ domain: "michaelperry.net"
8
+ }
9
+
10
+ (site: Blog.Site) {
11
+ post: Blog.Post [
12
+ post->site: Blog.Site = site
13
+ !E {
14
+ deleted: Blog.Post.Deleted [
15
+ deleted->post: Blog.Post = post
16
+ ]
17
+ }
18
+ ]
19
+ } => {
20
+ id = #post
21
+ createdAt = post.createdAt
22
+ titles = {
23
+ title: Blog.Post.Title [
24
+ title->post: Blog.Post = post
25
+ !E {
26
+ next: Blog.Post.Title [
27
+ next->prior: Blog.Post.Title = title
28
+ ]
29
+ }
30
+ ]
31
+ } => title.value
32
+ }
@@ -0,0 +1,21 @@
1
+ POST {{replicatorUrl}}/load
2
+ Authorization: oauth2 authorization_code
3
+ Content-Type: application/json
4
+ Accept: application/x-jinaga-graph-v1
5
+
6
+ {
7
+ "references": [
8
+ {
9
+ "type": "Blog.Post",
10
+ "hash": "XiDu5OWoNUwZhTBs+mwHrxjBDlFjBmDIgEt9ZXmCeMq8uv3Tv89Am6GQSt2ppl4wGG1UWMFxd9tstg5NMSSjKg=="
11
+ },
12
+ {
13
+ "type": "Blog.Post.Title",
14
+ "hash": "n+hKtiGWHVu16UlxKY73Va+jsriQ/UxVFn3DCdXQEccWeXN5/SIxhWXmuMlfzelpHjuwPgCyeyid/jJrkJRRtQ=="
15
+ },
16
+ {
17
+ "type": "Blog.Post.Title",
18
+ "hash": "iuRHB3Zkj0P3+b7XPvbEzA/ANdJ3C8Bm1dJ/nW8I9Tb+9VdHQP5g2bpp8hwS4KqzecgG6KSG6VCNOY7RoaEsIQ=="
19
+ }
20
+ ]
21
+ }
@@ -1,4 +1,4 @@
1
- FROM node:20.9-bullseye-slim
1
+ FROM node:20.12-bullseye-slim
2
2
 
3
3
  WORKDIR /root
4
4
 
@@ -10,10 +10,10 @@
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@stablelib/base64": "^1.0.1",
13
- "express": "^4.17.2",
13
+ "express": "^4.19.2",
14
14
  "jest": "^29.7.0",
15
15
  "jest-compact-reporter": "^1.2.9",
16
- "jinaga": "^6.0.0",
16
+ "jinaga": "^6.0.1",
17
17
  "node-forge": "^1.3.0",
18
18
  "pg": "^8.11.3"
19
19
  }
@@ -1314,12 +1314,12 @@
1314
1314
  "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
1315
1315
  },
1316
1316
  "node_modules/body-parser": {
1317
- "version": "1.20.1",
1318
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
1319
- "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
1317
+ "version": "1.20.2",
1318
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
1319
+ "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
1320
1320
  "dependencies": {
1321
1321
  "bytes": "3.1.2",
1322
- "content-type": "~1.0.4",
1322
+ "content-type": "~1.0.5",
1323
1323
  "debug": "2.6.9",
1324
1324
  "depd": "2.0.0",
1325
1325
  "destroy": "1.2.0",
@@ -1327,7 +1327,7 @@
1327
1327
  "iconv-lite": "0.4.24",
1328
1328
  "on-finished": "2.4.1",
1329
1329
  "qs": "6.11.0",
1330
- "raw-body": "2.5.1",
1330
+ "raw-body": "2.5.2",
1331
1331
  "type-is": "~1.6.18",
1332
1332
  "unpipe": "1.0.0"
1333
1333
  },
@@ -1417,12 +1417,18 @@
1417
1417
  }
1418
1418
  },
1419
1419
  "node_modules/call-bind": {
1420
- "version": "1.0.2",
1421
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
1422
- "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
1420
+ "version": "1.0.7",
1421
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
1422
+ "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
1423
1423
  "dependencies": {
1424
- "function-bind": "^1.1.1",
1425
- "get-intrinsic": "^1.0.2"
1424
+ "es-define-property": "^1.0.0",
1425
+ "es-errors": "^1.3.0",
1426
+ "function-bind": "^1.1.2",
1427
+ "get-intrinsic": "^1.2.4",
1428
+ "set-function-length": "^1.2.1"
1429
+ },
1430
+ "engines": {
1431
+ "node": ">= 0.4"
1426
1432
  },
1427
1433
  "funding": {
1428
1434
  "url": "https://github.com/sponsors/ljharb"
@@ -1565,9 +1571,9 @@
1565
1571
  }
1566
1572
  },
1567
1573
  "node_modules/content-type": {
1568
- "version": "1.0.4",
1569
- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
1570
- "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
1574
+ "version": "1.0.5",
1575
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
1576
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
1571
1577
  "engines": {
1572
1578
  "node": ">= 0.6"
1573
1579
  }
@@ -1578,9 +1584,9 @@
1578
1584
  "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="
1579
1585
  },
1580
1586
  "node_modules/cookie": {
1581
- "version": "0.5.0",
1582
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
1583
- "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
1587
+ "version": "0.6.0",
1588
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
1589
+ "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
1584
1590
  "engines": {
1585
1591
  "node": ">= 0.6"
1586
1592
  }
@@ -1652,6 +1658,22 @@
1652
1658
  "node": ">=0.10.0"
1653
1659
  }
1654
1660
  },
1661
+ "node_modules/define-data-property": {
1662
+ "version": "1.1.4",
1663
+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
1664
+ "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
1665
+ "dependencies": {
1666
+ "es-define-property": "^1.0.0",
1667
+ "es-errors": "^1.3.0",
1668
+ "gopd": "^1.0.1"
1669
+ },
1670
+ "engines": {
1671
+ "node": ">= 0.4"
1672
+ },
1673
+ "funding": {
1674
+ "url": "https://github.com/sponsors/ljharb"
1675
+ }
1676
+ },
1655
1677
  "node_modules/depd": {
1656
1678
  "version": "2.0.0",
1657
1679
  "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@@ -1727,6 +1749,25 @@
1727
1749
  "is-arrayish": "^0.2.1"
1728
1750
  }
1729
1751
  },
1752
+ "node_modules/es-define-property": {
1753
+ "version": "1.0.0",
1754
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
1755
+ "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
1756
+ "dependencies": {
1757
+ "get-intrinsic": "^1.2.4"
1758
+ },
1759
+ "engines": {
1760
+ "node": ">= 0.4"
1761
+ }
1762
+ },
1763
+ "node_modules/es-errors": {
1764
+ "version": "1.3.0",
1765
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
1766
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
1767
+ "engines": {
1768
+ "node": ">= 0.4"
1769
+ }
1770
+ },
1730
1771
  "node_modules/escalade": {
1731
1772
  "version": "3.1.1",
1732
1773
  "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@@ -1814,16 +1855,16 @@
1814
1855
  }
1815
1856
  },
1816
1857
  "node_modules/express": {
1817
- "version": "4.18.2",
1818
- "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
1819
- "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
1858
+ "version": "4.19.2",
1859
+ "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
1860
+ "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
1820
1861
  "dependencies": {
1821
1862
  "accepts": "~1.3.8",
1822
1863
  "array-flatten": "1.1.1",
1823
- "body-parser": "1.20.1",
1864
+ "body-parser": "1.20.2",
1824
1865
  "content-disposition": "0.5.4",
1825
1866
  "content-type": "~1.0.4",
1826
- "cookie": "0.5.0",
1867
+ "cookie": "0.6.0",
1827
1868
  "cookie-signature": "1.0.6",
1828
1869
  "debug": "2.6.9",
1829
1870
  "depd": "2.0.0",
@@ -1966,13 +2007,18 @@
1966
2007
  }
1967
2008
  },
1968
2009
  "node_modules/get-intrinsic": {
1969
- "version": "1.2.0",
1970
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
1971
- "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
2010
+ "version": "1.2.4",
2011
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
2012
+ "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
1972
2013
  "dependencies": {
1973
- "function-bind": "^1.1.1",
1974
- "has": "^1.0.3",
1975
- "has-symbols": "^1.0.3"
2014
+ "es-errors": "^1.3.0",
2015
+ "function-bind": "^1.1.2",
2016
+ "has-proto": "^1.0.1",
2017
+ "has-symbols": "^1.0.3",
2018
+ "hasown": "^2.0.0"
2019
+ },
2020
+ "engines": {
2021
+ "node": ">= 0.4"
1976
2022
  },
1977
2023
  "funding": {
1978
2024
  "url": "https://github.com/sponsors/ljharb"
@@ -2024,22 +2070,22 @@
2024
2070
  "node": ">=4"
2025
2071
  }
2026
2072
  },
2073
+ "node_modules/gopd": {
2074
+ "version": "1.0.1",
2075
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
2076
+ "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
2077
+ "dependencies": {
2078
+ "get-intrinsic": "^1.1.3"
2079
+ },
2080
+ "funding": {
2081
+ "url": "https://github.com/sponsors/ljharb"
2082
+ }
2083
+ },
2027
2084
  "node_modules/graceful-fs": {
2028
2085
  "version": "4.2.11",
2029
2086
  "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
2030
2087
  "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
2031
2088
  },
2032
- "node_modules/has": {
2033
- "version": "1.0.3",
2034
- "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
2035
- "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
2036
- "dependencies": {
2037
- "function-bind": "^1.1.1"
2038
- },
2039
- "engines": {
2040
- "node": ">= 0.4.0"
2041
- }
2042
- },
2043
2089
  "node_modules/has-flag": {
2044
2090
  "version": "4.0.0",
2045
2091
  "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
@@ -2048,6 +2094,28 @@
2048
2094
  "node": ">=8"
2049
2095
  }
2050
2096
  },
2097
+ "node_modules/has-property-descriptors": {
2098
+ "version": "1.0.2",
2099
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
2100
+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
2101
+ "dependencies": {
2102
+ "es-define-property": "^1.0.0"
2103
+ },
2104
+ "funding": {
2105
+ "url": "https://github.com/sponsors/ljharb"
2106
+ }
2107
+ },
2108
+ "node_modules/has-proto": {
2109
+ "version": "1.0.3",
2110
+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
2111
+ "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
2112
+ "engines": {
2113
+ "node": ">= 0.4"
2114
+ },
2115
+ "funding": {
2116
+ "url": "https://github.com/sponsors/ljharb"
2117
+ }
2118
+ },
2051
2119
  "node_modules/has-symbols": {
2052
2120
  "version": "1.0.3",
2053
2121
  "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
@@ -2891,9 +2959,9 @@
2891
2959
  }
2892
2960
  },
2893
2961
  "node_modules/jinaga": {
2894
- "version": "6.0.0",
2895
- "resolved": "https://registry.npmjs.org/jinaga/-/jinaga-6.0.0.tgz",
2896
- "integrity": "sha512-LWUCAO5L3FQgM+SBVHQYlZ2ot1TkPgdDp3SzhfmhgPN9Vapv5l15zKtUs0ggPHECvAskRMmAZIDXWHC3rt0pmg==",
2962
+ "version": "6.0.1",
2963
+ "resolved": "https://registry.npmjs.org/jinaga/-/jinaga-6.0.1.tgz",
2964
+ "integrity": "sha512-0ViCNhYkG1FgOg7vy626xSY8N6Jk72mdXx00wolVWUN9Lx7vaYvnreTPwcrXmlbW4XIjvIVUIQjhXrjkZ2u+WA==",
2897
2965
  "dependencies": {
2898
2966
  "@stablelib/base64": "^1.0.1",
2899
2967
  "@stablelib/sha512": "^1.0.1",
@@ -3182,9 +3250,9 @@
3182
3250
  }
3183
3251
  },
3184
3252
  "node_modules/object-inspect": {
3185
- "version": "1.12.3",
3186
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
3187
- "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==",
3253
+ "version": "1.13.1",
3254
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
3255
+ "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
3188
3256
  "funding": {
3189
3257
  "url": "https://github.com/sponsors/ljharb"
3190
3258
  }
@@ -3572,9 +3640,9 @@
3572
3640
  }
3573
3641
  },
3574
3642
  "node_modules/raw-body": {
3575
- "version": "2.5.1",
3576
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
3577
- "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
3643
+ "version": "2.5.2",
3644
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
3645
+ "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
3578
3646
  "dependencies": {
3579
3647
  "bytes": "3.1.2",
3580
3648
  "http-errors": "2.0.0",
@@ -3715,6 +3783,22 @@
3715
3783
  "node": ">= 0.8.0"
3716
3784
  }
3717
3785
  },
3786
+ "node_modules/set-function-length": {
3787
+ "version": "1.2.2",
3788
+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
3789
+ "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
3790
+ "dependencies": {
3791
+ "define-data-property": "^1.1.4",
3792
+ "es-errors": "^1.3.0",
3793
+ "function-bind": "^1.1.2",
3794
+ "get-intrinsic": "^1.2.4",
3795
+ "gopd": "^1.0.1",
3796
+ "has-property-descriptors": "^1.0.2"
3797
+ },
3798
+ "engines": {
3799
+ "node": ">= 0.4"
3800
+ }
3801
+ },
3718
3802
  "node_modules/setprototypeof": {
3719
3803
  "version": "1.2.0",
3720
3804
  "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
@@ -3740,13 +3824,17 @@
3740
3824
  }
3741
3825
  },
3742
3826
  "node_modules/side-channel": {
3743
- "version": "1.0.4",
3744
- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
3745
- "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
3827
+ "version": "1.0.6",
3828
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
3829
+ "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
3746
3830
  "dependencies": {
3747
- "call-bind": "^1.0.0",
3748
- "get-intrinsic": "^1.0.2",
3749
- "object-inspect": "^1.9.0"
3831
+ "call-bind": "^1.0.7",
3832
+ "es-errors": "^1.3.0",
3833
+ "get-intrinsic": "^1.2.4",
3834
+ "object-inspect": "^1.13.1"
3835
+ },
3836
+ "engines": {
3837
+ "node": ">= 0.4"
3750
3838
  },
3751
3839
  "funding": {
3752
3840
  "url": "https://github.com/sponsors/ljharb"
@@ -14,10 +14,10 @@
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
16
  "@stablelib/base64": "^1.0.1",
17
- "express": "^4.17.2",
17
+ "express": "^4.19.2",
18
18
  "jest": "^29.7.0",
19
19
  "jest-compact-reporter": "^1.2.9",
20
- "jinaga": "^6.0.0",
20
+ "jinaga": "^6.0.1",
21
21
  "node-forge": "^1.3.0",
22
22
  "pg": "^8.11.3"
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinaga-server",
3
- "version": "3.0.1",
3
+ "version": "3.1.1",
4
4
  "description": "Data management for web and mobile applications.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -47,8 +47,8 @@
47
47
  "typescript": "^4.7.2"
48
48
  },
49
49
  "dependencies": {
50
- "express": "^4.18.2",
51
- "jinaga": "^6.0.0",
50
+ "express": "^4.19.2",
51
+ "jinaga": "^6.1.1",
52
52
  "node-forge": "^1.3.1",
53
53
  "pg": "^8.11.3"
54
54
  }
@@ -1,4 +1,3 @@
1
- import cors = require("cors");
2
1
  import express = require("express");
3
2
  import * as http from "http";
4
3
  import { JinagaServer } from "../src";
@@ -15,7 +14,6 @@ const server = http.createServer(app);
15
14
  app.set('port', process.env.PORT || 8080);
16
15
  app.use(express.json());
17
16
  app.use(express.text());
18
- app.use(cors());
19
17
 
20
18
  const pgConnection = process.env.JINAGA_POSTGRESQL ||
21
19
  'postgresql://appuser:apppw@localhost:5432/appdb';