@platformatic/runtime 2.0.1 → 2.0.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.
Files changed (250) hide show
  1. package/config.d.ts +1 -1
  2. package/package.json +13 -13
  3. package/schema.json +1 -1
  4. package/fixtures/botched-start/platformatic.runtime.json +0 -14
  5. package/fixtures/botched-start/services/a/platformatic.service.json +0 -14
  6. package/fixtures/botched-start/services/a/plugin.js +0 -11
  7. package/fixtures/composerApp/api1.json +0 -65
  8. package/fixtures/composerApp/platformatic.composer.json +0 -23
  9. package/fixtures/configs/invalid-entrypoint.json +0 -14
  10. package/fixtures/configs/invalid-schema-type.config.json +0 -19
  11. package/fixtures/configs/invalid-web-with-services.json +0 -36
  12. package/fixtures/configs/missing-property.config.json +0 -13
  13. package/fixtures/configs/missing-service-config.json +0 -7
  14. package/fixtures/configs/monorepo-composer-no-autoload.json +0 -32
  15. package/fixtures/configs/monorepo-composer.json +0 -19
  16. package/fixtures/configs/monorepo-create-cycle.json +0 -20
  17. package/fixtures/configs/monorepo-missing-dependencies.json +0 -9
  18. package/fixtures/configs/monorepo-no-cycles.json +0 -19
  19. package/fixtures/configs/monorepo-openapi.json +0 -12
  20. package/fixtures/configs/monorepo-watch-env.json +0 -19
  21. package/fixtures/configs/monorepo-watch-single.json +0 -12
  22. package/fixtures/configs/monorepo-watch.json +0 -27
  23. package/fixtures/configs/monorepo-with-dependencies.json +0 -8
  24. package/fixtures/configs/monorepo-with-management-api-without-metrics.json +0 -21
  25. package/fixtures/configs/monorepo-with-management-api.json +0 -20
  26. package/fixtures/configs/monorepo-with-metrics.json +0 -32
  27. package/fixtures/configs/monorepo.json +0 -27
  28. package/fixtures/configs/no-schema.config.json +0 -18
  29. package/fixtures/configs/no-services.config.json +0 -5
  30. package/fixtures/configs/no-sources.config.json +0 -4
  31. package/fixtures/configs/service-throws-on-start.json +0 -11
  32. package/fixtures/configs/service-with-env-port.json +0 -32
  33. package/fixtures/configs/service-with-stdio.json +0 -12
  34. package/fixtures/configs/watch.json +0 -19
  35. package/fixtures/crash-on-bootstrap/platformatic.runtime.json +0 -15
  36. package/fixtures/crash-on-bootstrap/services/service-1/platformatic.service.json +0 -14
  37. package/fixtures/crash-on-bootstrap/services/service-1/plugin.js +0 -5
  38. package/fixtures/crash-on-bootstrap/services/service-2/platformatic.service.json +0 -14
  39. package/fixtures/crash-on-bootstrap/services/service-2/plugin.js +0 -5
  40. package/fixtures/dbApp/package.json +0 -5
  41. package/fixtures/dbApp/platformatic.db.json +0 -28
  42. package/fixtures/dbApp/plugin.js +0 -12
  43. package/fixtures/dbAppNoName/package.json +0 -4
  44. package/fixtures/dbAppNoName/platformatic.db.json +0 -27
  45. package/fixtures/dbAppNoName/plugin.js +0 -12
  46. package/fixtures/dbAppNoPackageJson/platformatic.db.json +0 -27
  47. package/fixtures/dbAppNoPackageJson/plugin.js +0 -12
  48. package/fixtures/dbAppWithMigrationError/migrations/001.do.sql +0 -4
  49. package/fixtures/dbAppWithMigrationError/migrations/001.undo.sql +0 -1
  50. package/fixtures/dbAppWithMigrationError/package.json +0 -5
  51. package/fixtures/dbAppWithMigrationError/platformatic.db.json +0 -28
  52. package/fixtures/dbAppWithMigrationError/plugin.js +0 -5
  53. package/fixtures/do-not-reload-dependencies/node_modules/foo/foo.js +0 -2
  54. package/fixtures/do-not-reload-dependencies/node_modules/foo/package.json +0 -3
  55. package/fixtures/do-not-reload-dependencies/node_modules/foom/foom.js +0 -1
  56. package/fixtures/do-not-reload-dependencies/node_modules/foom/package.json +0 -4
  57. package/fixtures/do-not-reload-dependencies/platformatic.service.json +0 -18
  58. package/fixtures/do-not-reload-dependencies/plugin.js +0 -14
  59. package/fixtures/do-not-restart-on-crash/platformatic.runtime.json +0 -15
  60. package/fixtures/do-not-restart-on-crash/services/a/platformatic.service.json +0 -16
  61. package/fixtures/do-not-restart-on-crash/services/a/plugin.js +0 -9
  62. package/fixtures/empty/hello.js +0 -7
  63. package/fixtures/express/platformatic.runtime.json +0 -21
  64. package/fixtures/express/services/a/platformatic.service.json +0 -14
  65. package/fixtures/express/services/a/plugin.js +0 -26
  66. package/fixtures/express/services/b/platformatic.service.json +0 -14
  67. package/fixtures/express/services/b/plugin.js +0 -19
  68. package/fixtures/external-client/openmeter.json +0 -420
  69. package/fixtures/external-client/platformatic.service.json +0 -13
  70. package/fixtures/interceptors/external.js +0 -27
  71. package/fixtures/interceptors/idp.js +0 -48
  72. package/fixtures/interceptors/platformatic.runtime.json +0 -27
  73. package/fixtures/interceptors/services/a/platformatic.service.json +0 -17
  74. package/fixtures/interceptors/services/a/plugin.js +0 -15
  75. package/fixtures/interceptors-2/platformatic.runtime.json +0 -25
  76. package/fixtures/interceptors-2/services/a/platformatic.service.json +0 -17
  77. package/fixtures/interceptors-2/services/a/plugin.js +0 -15
  78. package/fixtures/leven/.env.sample +0 -4
  79. package/fixtures/leven/platformatic.runtime.json +0 -11
  80. package/fixtures/leven/services/deeply-spittle/platformatic.service.json +0 -25
  81. package/fixtures/leven/services/deeply-spittle/plugins/example.js +0 -6
  82. package/fixtures/leven/services/deeply-spittle/routes/root.js +0 -8
  83. package/fixtures/leven/services/rainy-empire/platformatic.composer.json +0 -21
  84. package/fixtures/management-api/package.json +0 -4
  85. package/fixtures/management-api/platformatic.json +0 -22
  86. package/fixtures/management-api/services/service-1/platformatic.json +0 -15
  87. package/fixtures/management-api/services/service-1/plugin.js +0 -16
  88. package/fixtures/management-api/services/service-2/platformatic.json +0 -9
  89. package/fixtures/management-api/services/service-2/plugin.js +0 -8
  90. package/fixtures/management-api/services/service-db/migrations/001.do.sql +0 -4
  91. package/fixtures/management-api/services/service-db/migrations/001.undo.sql +0 -1
  92. package/fixtures/management-api/services/service-db/package.json +0 -5
  93. package/fixtures/management-api/services/service-db/platformatic.db.json +0 -29
  94. package/fixtures/management-api/services/service-db/plugin.js +0 -12
  95. package/fixtures/management-api-custom-labels/package.json +0 -4
  96. package/fixtures/management-api-custom-labels/platformatic.json +0 -22
  97. package/fixtures/management-api-custom-labels/services/service-1/platformatic.json +0 -12
  98. package/fixtures/management-api-custom-labels/services/service-1/plugin.js +0 -16
  99. package/fixtures/management-api-custom-labels/services/service-2/platformatic.json +0 -9
  100. package/fixtures/management-api-custom-labels/services/service-2/plugin.js +0 -8
  101. package/fixtures/management-api-custom-labels/services/service-db/migrations/001.do.sql +0 -4
  102. package/fixtures/management-api-custom-labels/services/service-db/migrations/001.undo.sql +0 -1
  103. package/fixtures/management-api-custom-labels/services/service-db/package.json +0 -5
  104. package/fixtures/management-api-custom-labels/services/service-db/platformatic.db.json +0 -29
  105. package/fixtures/management-api-custom-labels/services/service-db/plugin.js +0 -12
  106. package/fixtures/management-api-without-metrics/package.json +0 -4
  107. package/fixtures/management-api-without-metrics/platformatic.json +0 -14
  108. package/fixtures/management-api-without-metrics/services/service-1/platformatic.json +0 -8
  109. package/fixtures/monorepo/composerApp/external-service.json +0 -204
  110. package/fixtures/monorepo/composerApp/platformatic.composer.json +0 -46
  111. package/fixtures/monorepo/dbApp/platformatic.db.json +0 -16
  112. package/fixtures/monorepo/docs/README.md +0 -1
  113. package/fixtures/monorepo/serviceApp/deps/dep1.js +0 -7
  114. package/fixtures/monorepo/serviceApp/deps/dep2.mjs +0 -2
  115. package/fixtures/monorepo/serviceApp/deps/dep3.mjs +0 -2
  116. package/fixtures/monorepo/serviceApp/deps/dep4.js +0 -1
  117. package/fixtures/monorepo/serviceApp/platformatic.service.json +0 -23
  118. package/fixtures/monorepo/serviceApp/plugin.js +0 -29
  119. package/fixtures/monorepo/serviceApp/with-logger/package.json +0 -5
  120. package/fixtures/monorepo/serviceApp/with-logger/with-logger.cjs +0 -25
  121. package/fixtures/monorepo/serviceApp/with-logger/with-logger.d.ts +0 -38
  122. package/fixtures/monorepo/serviceApp/with-logger/with-logger.openapi.json +0 -22
  123. package/fixtures/monorepo/serviceAppWithLogger/platformatic.service.json +0 -20
  124. package/fixtures/monorepo/serviceAppWithLogger/plugin.js +0 -20
  125. package/fixtures/monorepo/serviceAppWithMultiplePlugins/platformatic.service.json +0 -28
  126. package/fixtures/monorepo/serviceAppWithMultiplePlugins/plugin.js +0 -8
  127. package/fixtures/monorepo/serviceAppWithMultiplePlugins/plugin2.mjs +0 -5
  128. package/fixtures/monorepo-missing-dependencies/composer/platformatic.json +0 -24
  129. package/fixtures/monorepo-openapi/serviceAppWithoutOpenapi/platformatic.service.json +0 -13
  130. package/fixtures/monorepo-openapi/serviceAppWithoutOpenapi/plugin.js +0 -8
  131. package/fixtures/monorepo-watch/service1/platformatic.service.json +0 -13
  132. package/fixtures/monorepo-watch/service1/plugin.js +0 -8
  133. package/fixtures/monorepo-with-dependencies/main/clients/service-1/package.json +0 -3
  134. package/fixtures/monorepo-with-dependencies/main/clients/service-1/schema.json +0 -204
  135. package/fixtures/monorepo-with-dependencies/main/clients/service-2/package.json +0 -3
  136. package/fixtures/monorepo-with-dependencies/main/clients/service-2/schema.json +0 -204
  137. package/fixtures/monorepo-with-dependencies/main/external-service.schema.json +0 -204
  138. package/fixtures/monorepo-with-dependencies/main/platformatic.json +0 -46
  139. package/fixtures/monorepo-with-dependencies/service-1/clients/service-2/package.json +0 -3
  140. package/fixtures/monorepo-with-dependencies/service-1/clients/service-2/schema.json +0 -204
  141. package/fixtures/monorepo-with-dependencies/service-1/external-service.schema.json +0 -204
  142. package/fixtures/monorepo-with-dependencies/service-1/platformatic.json +0 -29
  143. package/fixtures/monorepo-with-dependencies/service-2/platformatic.json +0 -15
  144. package/fixtures/no-env.service.json +0 -25
  145. package/fixtures/preload/platformatic.runtime.json +0 -15
  146. package/fixtures/preload/preload.js +0 -1
  147. package/fixtures/preload/services/a/platformatic.service.json +0 -14
  148. package/fixtures/preload/services/a/plugin.js +0 -7
  149. package/fixtures/prom-server/platformatic.json +0 -16
  150. package/fixtures/prom-server/services/service-1/platformatic.json +0 -13
  151. package/fixtures/prom-server/services/service-1/plugin.js +0 -8
  152. package/fixtures/prom-server/services/service-2/platformatic.json +0 -12
  153. package/fixtures/prom-server/services/service-2/plugin.js +0 -8
  154. package/fixtures/restart-on-crash/platformatic.runtime.json +0 -14
  155. package/fixtures/restart-on-crash/services/a/platformatic.service.json +0 -16
  156. package/fixtures/restart-on-crash/services/a/plugin.js +0 -9
  157. package/fixtures/sample-runtime/.env +0 -9
  158. package/fixtures/sample-runtime/package.json +0 -16
  159. package/fixtures/sample-runtime/platformatic.json +0 -18
  160. package/fixtures/sample-runtime/services/rival/package.json +0 -16
  161. package/fixtures/sample-runtime/services/rival/platformatic.json +0 -33
  162. package/fixtures/sample-runtime/services/rival/routes/root.js +0 -7
  163. package/fixtures/sample-runtime-with-2-services/.env +0 -10
  164. package/fixtures/sample-runtime-with-2-services/package.json +0 -16
  165. package/fixtures/sample-runtime-with-2-services/platformatic.json +0 -18
  166. package/fixtures/sample-runtime-with-2-services/services/foobar/package.json +0 -16
  167. package/fixtures/sample-runtime-with-2-services/services/foobar/platformatic.json +0 -18
  168. package/fixtures/sample-runtime-with-2-services/services/foobar/routes/root.js +0 -7
  169. package/fixtures/sample-runtime-with-2-services/services/rival/package.json +0 -16
  170. package/fixtures/sample-runtime-with-2-services/services/rival/platformatic.json +0 -33
  171. package/fixtures/sample-runtime-with-2-services/services/rival/routes/root.js +0 -7
  172. package/fixtures/server/logger-transport/custom-transport.js +0 -15
  173. package/fixtures/server/logger-transport/platformatic.runtime.json +0 -21
  174. package/fixtures/server/logger-transport/services/echo/platformatic.service.json +0 -12
  175. package/fixtures/server/logger-transport/services/echo/routes/hello.js +0 -6
  176. package/fixtures/server/overrides-service/platformatic.runtime.json +0 -18
  177. package/fixtures/server/overrides-service/services/echo/platformatic.service.json +0 -19
  178. package/fixtures/server/overrides-service/services/echo/routes/span.js +0 -8
  179. package/fixtures/server/runtime-server/platformatic.runtime.json +0 -18
  180. package/fixtures/server/runtime-server/services/echo/platformatic.service.json +0 -12
  181. package/fixtures/server/runtime-server/services/echo/routes/hello.js +0 -6
  182. package/fixtures/serviceAppThrowsOnStart/platformatic.service.json +0 -12
  183. package/fixtures/serviceAppThrowsOnStart/plugin.js +0 -6
  184. package/fixtures/stackables/node_modules/foo/foo.js +0 -62
  185. package/fixtures/stackables/node_modules/foo/package.json +0 -4
  186. package/fixtures/stackables/platformatic.json +0 -11
  187. package/fixtures/start-command-in-runtime.js +0 -24
  188. package/fixtures/start-command.js +0 -9
  189. package/fixtures/starter.js +0 -9
  190. package/fixtures/stdio/platformatic.service.json +0 -6
  191. package/fixtures/stdio/plugin.js +0 -24
  192. package/fixtures/telemetry/platformatic.runtime.json +0 -18
  193. package/fixtures/telemetry/services/echo/platformatic.service.json +0 -19
  194. package/fixtures/telemetry/services/echo/routes/span.js +0 -22
  195. package/fixtures/telemetry/services/service-1/platformatic.service.json +0 -19
  196. package/fixtures/telemetry/services/service-1/routes/echo.js +0 -7
  197. package/fixtures/typescript/.env +0 -4
  198. package/fixtures/typescript/platformatic.runtime.json +0 -11
  199. package/fixtures/typescript/services/composer/platformatic.composer.json +0 -28
  200. package/fixtures/typescript/services/movies/.env +0 -4
  201. package/fixtures/typescript/services/movies/global.d.ts +0 -23
  202. package/fixtures/typescript/services/movies/migrations/001.do.sql +0 -6
  203. package/fixtures/typescript/services/movies/migrations/001.undo.sql +0 -3
  204. package/fixtures/typescript/services/movies/platformatic.db.json +0 -33
  205. package/fixtures/typescript/services/movies/plugin.ts +0 -5
  206. package/fixtures/typescript/services/movies/tsconfig.json +0 -21
  207. package/fixtures/typescript/services/movies/types/Movie.d.ts +0 -9
  208. package/fixtures/typescript/services/movies/types/index.d.ts +0 -7
  209. package/fixtures/typescript/services/titles/client/client.d.ts +0 -141
  210. package/fixtures/typescript/services/titles/client/client.openapi.json +0 -630
  211. package/fixtures/typescript/services/titles/client/package.json +0 -4
  212. package/fixtures/typescript/services/titles/platformatic.service.json +0 -31
  213. package/fixtures/typescript/services/titles/plugins/example.ts +0 -6
  214. package/fixtures/typescript/services/titles/routes/root.ts +0 -21
  215. package/fixtures/typescript/services/titles/tsconfig.json +0 -21
  216. package/fixtures/typescript-custom-flags/.env +0 -4
  217. package/fixtures/typescript-custom-flags/platformatic.runtime.json +0 -11
  218. package/fixtures/typescript-custom-flags/services/composer/platformatic.composer.json +0 -28
  219. package/fixtures/typescript-custom-flags/services/movies/global.d.ts +0 -23
  220. package/fixtures/typescript-custom-flags/services/movies/migrations/001.do.sql +0 -6
  221. package/fixtures/typescript-custom-flags/services/movies/migrations/001.undo.sql +0 -3
  222. package/fixtures/typescript-custom-flags/services/movies/platformatic.db.json +0 -35
  223. package/fixtures/typescript-custom-flags/services/movies/plugin.ts +0 -5
  224. package/fixtures/typescript-custom-flags/services/movies/tsconfig.json +0 -20
  225. package/fixtures/typescript-custom-flags/services/movies/types/Movie.d.ts +0 -9
  226. package/fixtures/typescript-custom-flags/services/movies/types/index.d.ts +0 -7
  227. package/fixtures/typescript-custom-flags/services/titles/client/client.d.ts +0 -141
  228. package/fixtures/typescript-custom-flags/services/titles/client/client.openapi.json +0 -630
  229. package/fixtures/typescript-custom-flags/services/titles/client/package.json +0 -4
  230. package/fixtures/typescript-custom-flags/services/titles/platformatic.service.json +0 -33
  231. package/fixtures/typescript-custom-flags/services/titles/plugins/example.ts +0 -6
  232. package/fixtures/typescript-custom-flags/services/titles/routes/root.ts +0 -21
  233. package/fixtures/typescript-custom-flags/services/titles/tsconfig.json +0 -21
  234. package/fixtures/typescript-no-env/platformatic.runtime.json +0 -11
  235. package/fixtures/typescript-no-env/services/composer/platformatic.composer.json +0 -28
  236. package/fixtures/typescript-no-env/services/movies/global.d.ts +0 -23
  237. package/fixtures/typescript-no-env/services/movies/migrations/001.do.sql +0 -6
  238. package/fixtures/typescript-no-env/services/movies/migrations/001.undo.sql +0 -3
  239. package/fixtures/typescript-no-env/services/movies/platformatic.db.json +0 -33
  240. package/fixtures/typescript-no-env/services/movies/plugin.ts +0 -5
  241. package/fixtures/typescript-no-env/services/movies/tsconfig.json +0 -21
  242. package/fixtures/typescript-no-env/services/movies/types/Movie.d.ts +0 -9
  243. package/fixtures/typescript-no-env/services/movies/types/index.d.ts +0 -7
  244. package/fixtures/typescript-no-env/services/titles/client/client.d.ts +0 -141
  245. package/fixtures/typescript-no-env/services/titles/client/client.openapi.json +0 -630
  246. package/fixtures/typescript-no-env/services/titles/client/package.json +0 -4
  247. package/fixtures/typescript-no-env/services/titles/platformatic.service.json +0 -31
  248. package/fixtures/typescript-no-env/services/titles/plugins/example.ts +0 -6
  249. package/fixtures/typescript-no-env/services/titles/routes/root.ts +0 -21
  250. package/fixtures/typescript-no-env/services/titles/tsconfig.json +0 -21
@@ -1,32 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
- "entrypoint": "serviceApp",
4
- "watch": false,
5
- "managementApi": false,
6
- "autoload": {
7
- "path": "../monorepo",
8
- "exclude": [
9
- "docs",
10
- "composerApp"
11
- ],
12
- "mappings": {
13
- "serviceAppWithLogger": {
14
- "id": "with-logger",
15
- "config": "platformatic.service.json"
16
- },
17
- "serviceAppWithMultiplePlugins": {
18
- "id": "multi-plugin-service",
19
- "config": "platformatic.service.json"
20
- },
21
- "dbApp": {
22
- "id": "db-app",
23
- "config": "platformatic.db.json"
24
- }
25
- }
26
- },
27
- "server":{
28
- "hostname":"127.0.0.1",
29
- "port":"{PORT}"
30
- }
31
- }
32
-
@@ -1,12 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
- "entrypoint": "stdio",
4
- "managementApi": {},
5
- "services": [
6
- {
7
- "id": "stdio",
8
- "path": "../stdio",
9
- "config": "platformatic.service.json"
10
- }
11
- ]
12
- }
@@ -1,19 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
- "entrypoint": "serviceApp",
4
- "watch": true,
5
- "autoload": {
6
- "path": "../monorepo",
7
- "exclude": ["docs", "composerApp"],
8
- "mappings": {
9
- "serviceAppWithLogger": {
10
- "id": "with-logger",
11
- "config": "platformatic.service.json"
12
- },
13
- "serviceAppWithMultiplePlugins": {
14
- "id": "multi-plugin-service",
15
- "config": "platformatic.service.json"
16
- }
17
- }
18
- }
19
- }
@@ -1,15 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
- "entrypoint": "service-1",
4
- "autoload": {
5
- "path": "./services"
6
- },
7
- "restartOnError": 100,
8
- "server": {
9
- "hostname": "127.0.0.1",
10
- "port": "0",
11
- "logger": {
12
- "level": "info"
13
- }
14
- }
15
- }
@@ -1,14 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/service/1.52.0.json",
3
- "server": {
4
- "logger": {
5
- "level": "warn"
6
- }
7
- },
8
- "plugins": {
9
- "paths": [{
10
- "path": "plugin.js",
11
- "encapsulate": false
12
- }]
13
- }
14
- }
@@ -1,5 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function (app) {
4
- app.log.info('Service 1 plugin')
5
- }
@@ -1,14 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/service/1.52.0.json",
3
- "server": {
4
- "logger": {
5
- "level": "warn"
6
- }
7
- },
8
- "plugins": {
9
- "paths": [{
10
- "path": "plugin.js",
11
- "encapsulate": false
12
- }]
13
- }
14
- }
@@ -1,5 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function () {
4
- throw new Error('Crash!')
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@myscope/myname",
3
- "version": "0.0.1",
4
- "description": "test package.json"
5
- }
@@ -1,28 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/db/1.52.0.json",
3
- "server": {
4
- "hostname": "127.0.0.1",
5
- "port": 0
6
- },
7
- "migrations": {
8
- "dir": "migrations",
9
- "table": "versions"
10
- },
11
- "types": {
12
- "autogenerate": false
13
- },
14
- "db": {
15
- "connectionString": "sqlite://db.sqlite",
16
- "graphql": true,
17
- "ignore": {
18
- "versions": true
19
- },
20
- "events": false
21
- },
22
- "plugins": {
23
- "paths": [
24
- "plugin.js"
25
- ]
26
- },
27
- "watch": false
28
- }
@@ -1,12 +0,0 @@
1
- 'use strict'
2
-
3
- /** @param {import('fastify').FastifyInstance} app */
4
- module.exports = async function (app) {
5
- app.get('/async_crash', async () => {
6
- setImmediate(() => {
7
- throw new Error('boom')
8
- })
9
-
10
- return 'ok'
11
- })
12
- }
@@ -1,4 +0,0 @@
1
- {
2
- "version": "0.0.1",
3
- "description": "test package.json"
4
- }
@@ -1,27 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/db/1.52.0.json",
3
- "server": {
4
- "hostname": "127.0.0.1",
5
- "port": 0
6
- },
7
- "migrations": {
8
- "dir": "migrations",
9
- "table": "versions"
10
- },
11
- "types": {
12
- "autogenerate": false
13
- },
14
- "db": {
15
- "connectionString": "sqlite://db.sqlite",
16
- "graphql": true,
17
- "ignore": {
18
- "versions": true
19
- },
20
- "events": false
21
- },
22
- "plugins": {
23
- "paths": [
24
- "plugin.js"
25
- ]
26
- }
27
- }
@@ -1,12 +0,0 @@
1
- 'use strict'
2
-
3
- /** @param {import('fastify').FastifyInstance} app */
4
- module.exports = async function (app) {
5
- app.get('/async_crash', async () => {
6
- setImmediate(() => {
7
- throw new Error('boom')
8
- })
9
-
10
- return 'ok'
11
- })
12
- }
@@ -1,27 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/db/1.52.0.json",
3
- "server": {
4
- "hostname": "127.0.0.1",
5
- "port": 0
6
- },
7
- "migrations": {
8
- "dir": "migrations",
9
- "table": "versions"
10
- },
11
- "types": {
12
- "autogenerate": false
13
- },
14
- "db": {
15
- "connectionString": "sqlite://db.sqlite",
16
- "graphql": true,
17
- "ignore": {
18
- "versions": true
19
- },
20
- "events": false
21
- },
22
- "plugins": {
23
- "paths": [
24
- "plugin.js"
25
- ]
26
- }
27
- }
@@ -1,12 +0,0 @@
1
- 'use strict'
2
-
3
- /** @param {import('fastify').FastifyInstance} app */
4
- module.exports = async function (app) {
5
- app.get('/async_crash', async () => {
6
- setImmediate(() => {
7
- throw new Error('boom')
8
- })
9
-
10
- return 'ok'
11
- })
12
- }
@@ -1,4 +0,0 @@
1
- CREATE TABLE IF NOT EXISTS movies (
2
- id INTEGER PRIMARY KEY,
3
- title TEXT NOT NULL fiddlesticks
4
- );
@@ -1 +0,0 @@
1
- DROP TABLE movies;
@@ -1,5 +0,0 @@
1
- {
2
- "name": "mysimplename",
3
- "version": "0.0.1",
4
- "description": "test package.json"
5
- }
@@ -1,28 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/db/1.52.0.json",
3
- "server": {
4
- "hostname": "127.0.0.1",
5
- "port": 3042
6
- },
7
- "migrations": {
8
- "autoApply": true,
9
- "dir": "migrations",
10
- "table": "versions"
11
- },
12
- "types": {
13
- "autogenerate": false
14
- },
15
- "plugins": {
16
- "paths": [
17
- "plugin.js"
18
- ]
19
- },
20
- "db": {
21
- "connectionString": "sqlite://db.sqlite",
22
- "graphql": true,
23
- "ignore": {
24
- "versions": true
25
- },
26
- "events": false
27
- }
28
- }
@@ -1,5 +0,0 @@
1
- /// <reference path="./global.d.ts" />
2
- 'use strict'
3
-
4
- /** @param {import('fastify').FastifyInstance} app */
5
- module.exports = async function (app) {}
@@ -1,2 +0,0 @@
1
- 'use strict'
2
- module.exports = Math.random()
@@ -1,3 +0,0 @@
1
- {
2
- "main": "foo.js"
3
- }
@@ -1 +0,0 @@
1
- export default Math.random()
@@ -1,4 +0,0 @@
1
- {
2
- "main": "foom.js",
3
- "type": "module"
4
- }
@@ -1,18 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/service/1.52.0.json",
3
- "server": {
4
- "hostname": "127.0.0.1",
5
- "port": "{PORT}",
6
- "logger": {
7
- "level": "info"
8
- }
9
- },
10
- "service": {
11
- "openapi": true
12
- },
13
- "plugins": {
14
- "paths": [
15
- "./plugin.js"
16
- ]
17
- }
18
- }
@@ -1,14 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function (fastify, opts, next) {
4
- fastify.get('/plugin1', function (request, reply) {
5
- const foo = require('foo')
6
- reply.send({ hello: foo })
7
- })
8
-
9
- fastify.get('/plugin2', async function (request, reply) {
10
- const foom = (await import('foom')).default
11
- return { hello: foom }
12
- })
13
- next()
14
- }
@@ -1,15 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.22.0.json",
3
- "entrypoint": "a",
4
- "autoload": {
5
- "path": "./services"
6
- },
7
- "server": {
8
- "hostname": "127.0.0.1",
9
- "port": "{PORT}",
10
- "logger": {
11
- "level": "info"
12
- }
13
- },
14
- "restartOnError": false
15
- }
@@ -1,16 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/service/1.52.0.json",
3
- "server": {
4
- "logger": {
5
- "level": "info"
6
- }
7
- },
8
- "plugins": {
9
- "paths": [
10
- {
11
- "path": "plugin.js",
12
- "encapsulate": false
13
- }
14
- ]
15
- }
16
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function (fastify, options) {
4
- fastify.post('/crash', async (_, reply) => {
5
- setImmediate(() => {
6
- throw new Error('Crash!')
7
- })
8
- })
9
- }
@@ -1,7 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function (app) {
4
- app.get('/hello', async () => {
5
- return { hello: 'hello123' }
6
- })
7
- }
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
- "entrypoint": "b",
4
- "autoload": {
5
- "path": "./services",
6
- "mappings": {
7
- "a": {
8
- "id": "a",
9
- "config": "platformatic.service.json",
10
- "useHttp": true
11
- }
12
- }
13
- },
14
- "server": {
15
- "hostname": "127.0.0.1",
16
- "port": 3000,
17
- "logger": {
18
- "level": "warn"
19
- }
20
- }
21
- }
@@ -1,14 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/service/1.52.0.json",
3
- "server": {
4
- "logger": {
5
- "level": "warn"
6
- }
7
- },
8
- "plugins": {
9
- "paths": [{
10
- "path": "plugin.js",
11
- "encapsulate": false
12
- }]
13
- }
14
- }
@@ -1,26 +0,0 @@
1
- 'use strict'
2
-
3
- const fastifyExpress = require('@fastify/express')
4
- const express = require('express')
5
-
6
- module.exports = async function (app) {
7
- const router = express.Router()
8
-
9
- router.use(function (req, res, next) {
10
- res.setHeader('x-custom', true)
11
- next()
12
- })
13
-
14
- router.get('/hello', (req, res) => {
15
- res.status(200)
16
- res.json({ hello: 'world' })
17
- })
18
-
19
- await app.register(fastifyExpress)
20
-
21
- app.use(router)
22
-
23
- app.get('/hello2', (req, res) => {
24
- return { hello: 'world2' }
25
- })
26
- }
@@ -1,14 +0,0 @@
1
- {
2
- "$schema": "https://schemas.platformatic.dev/@platformatic/service/1.52.0.json",
3
- "server": {
4
- "logger": {
5
- "level": "warn"
6
- }
7
- },
8
- "plugins": {
9
- "paths": [{
10
- "path": "plugin.js",
11
- "encapsulate": false
12
- }]
13
- }
14
- }
@@ -1,19 +0,0 @@
1
- 'use strict'
2
-
3
- const { request } = require('undici')
4
-
5
- module.exports = async function (fastify) {
6
- fastify.get('/hello', async (_, reply) => {
7
- const res = await request('http://a.plt.local/hello')
8
- reply.log.info('response received')
9
- const data = await res.body.json()
10
- return data
11
- })
12
-
13
- fastify.get('/hello2', async (_, reply) => {
14
- const res = await request('http://a.plt.local/hello2')
15
- reply.log.info('response received')
16
- const data = await res.body.json()
17
- return data
18
- })
19
- }