gruber 0.4.1 → 0.6.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.
Files changed (122) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +577 -324
  3. package/core/authentication.d.ts +51 -0
  4. package/core/authentication.d.ts.map +1 -0
  5. package/core/authentication.js +81 -0
  6. package/core/authentication.test.js +141 -0
  7. package/core/authentication.ts +147 -0
  8. package/core/authorization.d.ts +36 -0
  9. package/core/authorization.d.ts.map +1 -0
  10. package/core/authorization.js +78 -0
  11. package/core/authorization.test.js +173 -0
  12. package/core/authorization.ts +115 -0
  13. package/core/configuration.d.ts +54 -148
  14. package/core/configuration.d.ts.map +1 -0
  15. package/core/configuration.js +226 -311
  16. package/core/configuration.test.js +100 -9
  17. package/core/configuration.ts +313 -0
  18. package/core/fetch-router.d.ts +17 -39
  19. package/core/fetch-router.d.ts.map +1 -0
  20. package/core/fetch-router.js +54 -91
  21. package/core/fetch-router.test.js +2 -2
  22. package/core/fetch-router.ts +84 -0
  23. package/core/http.d.ts +40 -56
  24. package/core/http.d.ts.map +1 -0
  25. package/core/http.js +78 -111
  26. package/core/http.test.js +1 -1
  27. package/core/http.ts +143 -0
  28. package/core/jwt.d.ts +33 -0
  29. package/core/jwt.d.ts.map +1 -0
  30. package/core/jwt.js +46 -0
  31. package/core/jwt.ts +79 -0
  32. package/core/migrator.d.ts +25 -51
  33. package/core/migrator.d.ts.map +1 -0
  34. package/core/migrator.js +47 -64
  35. package/core/migrator.test.js +1 -1
  36. package/core/migrator.ts +86 -0
  37. package/core/mod.d.ts +15 -7
  38. package/core/mod.d.ts.map +1 -0
  39. package/core/mod.js +7 -0
  40. package/core/mod.ts +14 -0
  41. package/core/postgres.d.ts +9 -42
  42. package/core/postgres.d.ts.map +1 -0
  43. package/core/postgres.js +41 -78
  44. package/core/postgres.ts +79 -0
  45. package/core/random.d.ts +7 -0
  46. package/core/random.d.ts.map +1 -0
  47. package/core/random.js +12 -0
  48. package/core/random.ts +19 -0
  49. package/core/store.d.ts +64 -0
  50. package/core/store.d.ts.map +1 -0
  51. package/core/store.js +115 -0
  52. package/core/store.ts +188 -0
  53. package/core/structures.d.ts +29 -76
  54. package/core/structures.d.ts.map +1 -0
  55. package/core/structures.js +244 -292
  56. package/core/structures.test.js +76 -3
  57. package/core/structures.ts +303 -0
  58. package/core/terminator.d.ts +19 -0
  59. package/core/terminator.d.ts.map +1 -0
  60. package/core/terminator.js +32 -0
  61. package/core/terminator.test.js +124 -0
  62. package/core/terminator.ts +51 -0
  63. package/core/test-deps.js +41 -0
  64. package/core/timers.d.ts +6 -0
  65. package/core/timers.d.ts.map +1 -0
  66. package/core/timers.ts +5 -0
  67. package/core/types.d.ts +2 -22
  68. package/core/types.d.ts.map +1 -0
  69. package/core/types.js +2 -0
  70. package/core/types.ts +1 -39
  71. package/core/utilities.d.ts +5 -12
  72. package/core/utilities.d.ts.map +1 -0
  73. package/core/utilities.js +61 -50
  74. package/core/utilities.test.js +63 -5
  75. package/core/utilities.ts +86 -0
  76. package/package.json +2 -7
  77. package/source/configuration.d.ts +9 -17
  78. package/source/configuration.d.ts.map +1 -0
  79. package/source/configuration.js +34 -40
  80. package/source/configuration.ts +46 -0
  81. package/source/core.d.ts +2 -1
  82. package/source/core.d.ts.map +1 -0
  83. package/source/core.js +1 -0
  84. package/source/core.ts +2 -0
  85. package/source/express-router.d.ts +8 -12
  86. package/source/express-router.d.ts.map +1 -0
  87. package/source/express-router.js +36 -48
  88. package/source/express-router.ts +56 -0
  89. package/source/koa-router.d.ts +8 -16
  90. package/source/koa-router.d.ts.map +1 -0
  91. package/source/koa-router.js +39 -56
  92. package/source/koa-router.ts +55 -0
  93. package/source/mod.d.ts +6 -4
  94. package/source/mod.d.ts.map +1 -0
  95. package/source/mod.js +2 -3
  96. package/source/mod.ts +5 -0
  97. package/source/node-router.d.ts +30 -28
  98. package/source/node-router.d.ts.map +1 -0
  99. package/source/node-router.js +84 -76
  100. package/source/node-router.ts +144 -0
  101. package/source/package-lock.json +5 -176
  102. package/source/package.json +1 -6
  103. package/source/polyfill.d.ts +1 -0
  104. package/source/polyfill.d.ts.map +1 -0
  105. package/source/polyfill.js +3 -1
  106. package/source/polyfill.ts +2 -0
  107. package/source/postgres.d.ts +15 -28
  108. package/source/postgres.d.ts.map +1 -0
  109. package/source/postgres.js +38 -84
  110. package/source/postgres.ts +68 -0
  111. package/source/terminator.d.ts +8 -0
  112. package/source/terminator.d.ts.map +1 -0
  113. package/source/terminator.js +25 -0
  114. package/source/terminator.ts +34 -0
  115. package/tsconfig.json +5 -5
  116. package/core/fetch-router.test.d.ts +0 -1
  117. package/core/http.test.d.ts +0 -1
  118. package/core/migrator.test.d.ts +0 -1
  119. package/core/structures.test.d.ts +0 -1
  120. package/core/test-deps.d.ts +0 -1
  121. package/core/utilities.test.d.ts +0 -1
  122. /package/core/{configuration.test.d.ts → timers.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  This file documents notable changes to the project
4
4
 
5
+ ## next
6
+
7
+ ...
8
+
9
+ ## 0.6.0
10
+
11
+ **new**
12
+
13
+ - Create the Terminator, an API like [@godaddy/terminus](https://github.com/godaddy/terminus) for cross-platform graceful HTTP shutdown.
14
+ - (unstable) Authorize & Authenticate requests
15
+ - (unstable) Store things in key-value pairs
16
+ - (unstable) `serveHTTP` for Node.js a la `Deno.serve`
17
+
18
+ **changed**
19
+
20
+ - Deprecated environment-specific functions in favour of simpler names
21
+ - `get{Node,Deno}ConfigOptions` → `getConfigurationOptions`
22
+ - `get{Node,Deno}Configuration` → `getConfiguration`
23
+ - `get{Node,Deno}PostgresMigratorOptions` → `getPostgresMigratorOptions`
24
+ - `get{Node,Deno}PostgresMigrator` → `getPostgresMigrator`
25
+
26
+ **fixes**
27
+
28
+ - NodeRouter sets the correct `duplex` option
29
+ - FetchRouter ignores the body for `OPTIONS` & `TRACE` methods
30
+
31
+ **internal**
32
+
33
+ - Gruber is now primarily TypeScript, with JavaScript tests
34
+
35
+ ## 0.5.0
36
+
37
+ **new**
38
+
39
+ - Add the second argument to `config.getUsage(struct, currentValue)` so that is also documents the current configuration value after the default one
40
+ - `ConfigurationOptions#readTextField` accepts URLs and strings
41
+ - Allow HTTP `OPTIONS` method
42
+ - Experimental `Structure.union` type
43
+ - Experimental `Configuration.array` type
44
+ - Non `[Configuration.spec]` types are allowed in configuration (and ignored)
45
+ - Added `trimIndentation` utility
46
+
47
+ **fixes**
48
+
49
+ - Fix `formatMarkdownTable` to generate a valid markdown table
50
+ - `ExpressRouter` & `KoaRouter` are processing routes again
51
+ - Update deno postgres type-only dependency from `3.4.3` to `3.4.4`
52
+ - `Structure.url` handles bad URLs better
53
+ - Ignore `$schema` field when parsing configuration
54
+
5
55
  ## 0.4.1
6
56
 
7
57
  **fixes**