@platformatic/runtime 1.53.3 → 2.0.0-alpha.10

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 (178) hide show
  1. package/config.d.ts +284 -0
  2. package/eslint.config.js +8 -0
  3. package/fixtures/botched-start/platformatic.runtime.json +1 -1
  4. package/fixtures/botched-start/services/a/platformatic.service.json +1 -1
  5. package/fixtures/composerApp/platformatic.composer.json +1 -1
  6. package/fixtures/configs/{monorepo-hotreload.json → invalid-autoload-with-services.json} +8 -8
  7. package/fixtures/configs/invalid-entrypoint.json +1 -1
  8. package/fixtures/configs/invalid-schema-type.config.json +1 -1
  9. package/fixtures/configs/missing-property.config.json +1 -1
  10. package/fixtures/configs/missing-service-config.json +1 -1
  11. package/fixtures/configs/monorepo-composer-no-autoload.json +32 -0
  12. package/fixtures/configs/monorepo-composer.json +2 -2
  13. package/fixtures/configs/monorepo-create-cycle.json +2 -3
  14. package/fixtures/configs/monorepo-missing-dependencies.json +9 -0
  15. package/fixtures/configs/monorepo-no-cycles.json +2 -3
  16. package/fixtures/configs/monorepo-openapi.json +2 -2
  17. package/fixtures/configs/{hotreload.json → monorepo-watch-env.json} +2 -3
  18. package/fixtures/configs/monorepo-watch-single.json +12 -0
  19. package/fixtures/configs/monorepo-watch.json +26 -9
  20. package/fixtures/configs/monorepo-with-dependencies.json +2 -2
  21. package/fixtures/configs/{monorepo-client-without-id.json → monorepo-with-management-api-without-metrics.json} +5 -8
  22. package/fixtures/configs/monorepo-with-management-api.json +2 -3
  23. package/fixtures/configs/monorepo-with-metrics.json +1 -2
  24. package/fixtures/configs/monorepo.json +2 -3
  25. package/fixtures/configs/no-services.config.json +1 -1
  26. package/fixtures/configs/no-sources.config.json +1 -1
  27. package/fixtures/configs/service-throws-on-start.json +1 -1
  28. package/fixtures/configs/service-with-env-port.json +2 -3
  29. package/fixtures/configs/service-with-stdio.json +12 -0
  30. package/fixtures/configs/{monorepo-hotreload-env.json → watch.json} +2 -3
  31. package/fixtures/crash-on-bootstrap/platformatic.runtime.json +15 -0
  32. package/fixtures/crash-on-bootstrap/services/service-1/platformatic.service.json +14 -0
  33. package/fixtures/crash-on-bootstrap/services/service-1/plugin.js +5 -0
  34. package/fixtures/crash-on-bootstrap/services/service-2/platformatic.service.json +14 -0
  35. package/fixtures/crash-on-bootstrap/services/service-2/plugin.js +5 -0
  36. package/fixtures/dbApp/platformatic.db.json +1 -1
  37. package/fixtures/dbAppNoName/platformatic.db.json +1 -1
  38. package/fixtures/dbAppNoPackageJson/platformatic.db.json +1 -1
  39. package/fixtures/dbAppWithMigrationError/platformatic.db.json +1 -1
  40. package/fixtures/do-not-reload-dependencies/platformatic.service.json +1 -1
  41. package/fixtures/do-not-restart-on-crash/platformatic.runtime.json +3 -2
  42. package/fixtures/do-not-restart-on-crash/services/a/platformatic.service.json +1 -1
  43. package/fixtures/express/platformatic.runtime.json +1 -1
  44. package/fixtures/express/services/a/platformatic.service.json +1 -1
  45. package/fixtures/express/services/b/platformatic.service.json +1 -1
  46. package/fixtures/external-client/platformatic.service.json +1 -1
  47. package/fixtures/interceptors/idp.js +2 -2
  48. package/fixtures/interceptors/platformatic.runtime.json +1 -1
  49. package/fixtures/interceptors/services/a/platformatic.service.json +1 -1
  50. package/fixtures/interceptors-2/platformatic.runtime.json +1 -1
  51. package/fixtures/interceptors-2/services/a/platformatic.service.json +1 -1
  52. package/fixtures/leven/platformatic.runtime.json +2 -3
  53. package/fixtures/leven/services/deeply-spittle/platformatic.service.json +1 -1
  54. package/fixtures/leven/services/rainy-empire/platformatic.composer.json +1 -1
  55. package/fixtures/management-api/platformatic.json +8 -4
  56. package/fixtures/management-api/services/service-1/platformatic.json +1 -1
  57. package/fixtures/management-api/services/service-1/plugin.js +4 -3
  58. package/fixtures/management-api/services/service-2/platformatic.json +1 -1
  59. package/fixtures/management-api/services/service-db/platformatic.db.json +1 -1
  60. package/fixtures/management-api-custom-labels/platformatic.json +2 -3
  61. package/fixtures/management-api-custom-labels/services/service-1/platformatic.json +1 -1
  62. package/fixtures/management-api-custom-labels/services/service-1/plugin.js +4 -3
  63. package/fixtures/management-api-custom-labels/services/service-2/platformatic.json +1 -1
  64. package/fixtures/management-api-custom-labels/services/service-db/platformatic.db.json +1 -1
  65. package/fixtures/management-api-without-metrics/platformatic.json +3 -3
  66. package/fixtures/management-api-without-metrics/services/service-1/platformatic.json +1 -1
  67. package/fixtures/monorepo/composerApp/platformatic.composer.json +1 -2
  68. package/fixtures/monorepo/dbApp/platformatic.db.json +1 -1
  69. package/fixtures/monorepo/serviceApp/platformatic.service.json +3 -2
  70. package/fixtures/monorepo/serviceApp/with-logger/with-logger.cjs +2 -2
  71. package/fixtures/monorepo/serviceApp/with-logger/with-logger.d.ts +7 -7
  72. package/fixtures/monorepo/serviceAppWithLogger/platformatic.service.json +1 -1
  73. package/fixtures/monorepo/serviceAppWithLogger/plugin.js +12 -0
  74. package/fixtures/monorepo/serviceAppWithMultiplePlugins/platformatic.service.json +3 -2
  75. package/fixtures/monorepo-missing-dependencies/composer/platformatic.json +24 -0
  76. package/fixtures/monorepo-openapi/serviceAppWithoutOpenapi/platformatic.service.json +1 -1
  77. package/fixtures/monorepo-watch/service1/platformatic.service.json +1 -1
  78. package/fixtures/monorepo-with-dependencies/main/platformatic.json +1 -1
  79. package/fixtures/monorepo-with-dependencies/service-1/platformatic.json +1 -1
  80. package/fixtures/monorepo-with-dependencies/service-2/platformatic.json +1 -1
  81. package/fixtures/no-env.service.json +1 -1
  82. package/fixtures/preload/platformatic.runtime.json +1 -1
  83. package/fixtures/preload/services/a/platformatic.service.json +1 -1
  84. package/fixtures/prom-server/platformatic.json +2 -3
  85. package/fixtures/prom-server/services/service-1/platformatic.json +1 -1
  86. package/fixtures/prom-server/services/service-2/platformatic.json +1 -1
  87. package/fixtures/restart-on-crash/platformatic.runtime.json +1 -1
  88. package/fixtures/restart-on-crash/services/a/platformatic.service.json +1 -1
  89. package/fixtures/sample-runtime/package.json +1 -1
  90. package/fixtures/sample-runtime/platformatic.json +2 -3
  91. package/fixtures/sample-runtime/services/rival/package.json +1 -1
  92. package/fixtures/sample-runtime/services/rival/platformatic.json +1 -1
  93. package/fixtures/sample-runtime-with-2-services/package.json +1 -1
  94. package/fixtures/sample-runtime-with-2-services/platformatic.json +2 -3
  95. package/fixtures/sample-runtime-with-2-services/services/foobar/package.json +1 -1
  96. package/fixtures/sample-runtime-with-2-services/services/foobar/platformatic.json +1 -1
  97. package/fixtures/sample-runtime-with-2-services/services/rival/package.json +1 -1
  98. package/fixtures/sample-runtime-with-2-services/services/rival/platformatic.json +1 -1
  99. package/fixtures/server/logger-transport/platformatic.runtime.json +2 -3
  100. package/fixtures/server/logger-transport/services/echo/platformatic.service.json +1 -1
  101. package/fixtures/server/overrides-service/platformatic.runtime.json +2 -3
  102. package/fixtures/server/overrides-service/services/echo/platformatic.service.json +1 -1
  103. package/fixtures/server/runtime-server/platformatic.runtime.json +2 -3
  104. package/fixtures/server/runtime-server/services/echo/platformatic.service.json +1 -1
  105. package/fixtures/serviceAppThrowsOnStart/platformatic.service.json +1 -1
  106. package/fixtures/stackables/node_modules/foo/foo.js +2 -1
  107. package/fixtures/start-command-in-runtime.js +1 -1
  108. package/fixtures/stdio/platformatic.service.json +6 -0
  109. package/fixtures/stdio/plugin.js +24 -0
  110. package/fixtures/telemetry/platformatic.runtime.json +2 -3
  111. package/fixtures/telemetry/services/echo/platformatic.service.json +1 -1
  112. package/fixtures/telemetry/services/echo/routes/span.js +16 -2
  113. package/fixtures/telemetry/services/service-1/platformatic.service.json +19 -0
  114. package/fixtures/telemetry/services/service-1/routes/echo.js +7 -0
  115. package/fixtures/typescript/platformatic.runtime.json +2 -3
  116. package/fixtures/typescript/services/composer/platformatic.composer.json +1 -1
  117. package/fixtures/typescript/services/movies/global.d.ts +2 -3
  118. package/fixtures/typescript/services/movies/platformatic.db.json +1 -1
  119. package/fixtures/typescript/services/movies/types/Movie.d.ts +3 -3
  120. package/fixtures/typescript/services/movies/types/index.d.ts +6 -6
  121. package/fixtures/typescript/services/titles/client/client.d.ts +35 -35
  122. package/fixtures/typescript/services/titles/platformatic.service.json +1 -1
  123. package/fixtures/typescript-custom-flags/platformatic.runtime.json +2 -3
  124. package/fixtures/typescript-custom-flags/services/composer/platformatic.composer.json +1 -1
  125. package/fixtures/typescript-custom-flags/services/movies/global.d.ts +2 -3
  126. package/fixtures/typescript-custom-flags/services/movies/platformatic.db.json +1 -1
  127. package/fixtures/typescript-custom-flags/services/movies/types/Movie.d.ts +3 -3
  128. package/fixtures/typescript-custom-flags/services/movies/types/index.d.ts +6 -6
  129. package/fixtures/typescript-custom-flags/services/titles/client/client.d.ts +35 -35
  130. package/fixtures/typescript-custom-flags/services/titles/platformatic.service.json +1 -1
  131. package/fixtures/typescript-no-env/platformatic.runtime.json +2 -3
  132. package/fixtures/typescript-no-env/services/composer/platformatic.composer.json +1 -1
  133. package/fixtures/typescript-no-env/services/movies/global.d.ts +2 -3
  134. package/fixtures/typescript-no-env/services/movies/platformatic.db.json +1 -1
  135. package/fixtures/typescript-no-env/services/movies/types/Movie.d.ts +3 -3
  136. package/fixtures/typescript-no-env/services/movies/types/index.d.ts +6 -6
  137. package/fixtures/typescript-no-env/services/titles/client/client.d.ts +35 -35
  138. package/fixtures/typescript-no-env/services/titles/platformatic.service.json +1 -1
  139. package/index.d.ts +7 -8
  140. package/index.js +15 -10
  141. package/index.test-d.ts +10 -12
  142. package/lib/build-server.js +23 -15
  143. package/lib/compile.js +56 -13
  144. package/lib/config.js +27 -139
  145. package/lib/dependencies.js +59 -0
  146. package/lib/errors.js +6 -2
  147. package/lib/generator/errors.js +1 -1
  148. package/lib/generator/runtime-generator.d.ts +15 -15
  149. package/lib/generator/runtime-generator.js +81 -66
  150. package/lib/logger.js +55 -0
  151. package/lib/management-api.js +29 -44
  152. package/lib/prom-server.js +5 -9
  153. package/lib/runtime.js +1005 -0
  154. package/lib/schema.js +46 -44
  155. package/lib/start.js +49 -117
  156. package/lib/upgrade.js +4 -3
  157. package/lib/utils.js +49 -1
  158. package/lib/versions/v1.36.0.js +1 -1
  159. package/lib/versions/v1.5.0.js +1 -1
  160. package/lib/versions/v2.0.0.js +17 -0
  161. package/lib/worker/app.js +266 -0
  162. package/lib/worker/default-stackable.js +32 -0
  163. package/lib/worker/itc.js +149 -0
  164. package/lib/worker/main.js +129 -0
  165. package/lib/worker/metrics.js +106 -0
  166. package/lib/worker/symbols.js +7 -0
  167. package/package.json +44 -44
  168. package/runtime.mjs +11 -6
  169. package/schema.json +25 -13
  170. package/fixtures/monorepo/serviceApp/platformatic.service-client-without-id.json +0 -21
  171. package/lib/api-client.js +0 -497
  172. package/lib/api.js +0 -397
  173. package/lib/app.js +0 -365
  174. package/lib/load-config.js +0 -20
  175. package/lib/loader.mjs +0 -103
  176. package/lib/message-port-writable.js +0 -50
  177. package/lib/worker.js +0 -182
  178. /package/lib/{interceptors.js → worker/interceptors.js} +0 -0
package/config.d.ts ADDED
@@ -0,0 +1,284 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type HttpsSchemasPlatformaticDevPlatformaticRuntime200Alpha10Json = {
9
+ [k: string]: unknown;
10
+ } & {
11
+ $schema?: string;
12
+ preload?: string;
13
+ autoload?: {
14
+ path: string;
15
+ exclude?: string[];
16
+ mappings?: {
17
+ [k: string]: {
18
+ id: string;
19
+ config?: string;
20
+ useHttp?: boolean;
21
+ };
22
+ };
23
+ };
24
+ telemetry?: OpenTelemetry;
25
+ server?: {
26
+ hostname?: string;
27
+ port?: number | string;
28
+ pluginTimeout?: number;
29
+ healthCheck?:
30
+ | boolean
31
+ | {
32
+ enabled?: boolean;
33
+ interval?: number;
34
+ [k: string]: unknown;
35
+ };
36
+ ignoreTrailingSlash?: boolean;
37
+ ignoreDuplicateSlashes?: boolean;
38
+ connectionTimeout?: number;
39
+ keepAliveTimeout?: number;
40
+ maxRequestsPerSocket?: number;
41
+ forceCloseConnections?: boolean | string;
42
+ requestTimeout?: number;
43
+ bodyLimit?: number;
44
+ maxParamLength?: number;
45
+ disableRequestLogging?: boolean;
46
+ exposeHeadRoutes?: boolean;
47
+ logger?:
48
+ | boolean
49
+ | {
50
+ level?: string;
51
+ transport?:
52
+ | {
53
+ target?: string;
54
+ options?: {
55
+ [k: string]: unknown;
56
+ };
57
+ }
58
+ | {
59
+ targets?: {
60
+ target?: string;
61
+ options?: {
62
+ [k: string]: unknown;
63
+ };
64
+ level?: string;
65
+ additionalProperties?: never;
66
+ [k: string]: unknown;
67
+ }[];
68
+ options?: {
69
+ [k: string]: unknown;
70
+ };
71
+ };
72
+ pipeline?: {
73
+ target?: string;
74
+ options?: {
75
+ [k: string]: unknown;
76
+ };
77
+ };
78
+ [k: string]: unknown;
79
+ };
80
+ loggerInstance?: {
81
+ [k: string]: unknown;
82
+ };
83
+ serializerOpts?: {
84
+ schema?: {
85
+ [k: string]: unknown;
86
+ };
87
+ ajv?: {
88
+ [k: string]: unknown;
89
+ };
90
+ rounding?: "floor" | "ceil" | "round" | "trunc";
91
+ debugMode?: boolean;
92
+ mode?: "debug" | "standalone";
93
+ largeArraySize?: number | string;
94
+ largeArrayMechanism?: "default" | "json-stringify";
95
+ [k: string]: unknown;
96
+ };
97
+ caseSensitive?: boolean;
98
+ requestIdHeader?: string | false;
99
+ requestIdLogLabel?: string;
100
+ jsonShorthand?: boolean;
101
+ trustProxy?: boolean | string | string[] | number;
102
+ http2?: boolean;
103
+ https?: {
104
+ allowHTTP1?: boolean;
105
+ key:
106
+ | string
107
+ | {
108
+ path?: string;
109
+ }
110
+ | (
111
+ | string
112
+ | {
113
+ path?: string;
114
+ }
115
+ )[];
116
+ cert:
117
+ | string
118
+ | {
119
+ path?: string;
120
+ }
121
+ | (
122
+ | string
123
+ | {
124
+ path?: string;
125
+ }
126
+ )[];
127
+ requestCert?: boolean;
128
+ rejectUnauthorized?: boolean;
129
+ };
130
+ cors?: {
131
+ origin?:
132
+ | boolean
133
+ | string
134
+ | (
135
+ | string
136
+ | {
137
+ regexp: string;
138
+ [k: string]: unknown;
139
+ }
140
+ )[]
141
+ | {
142
+ regexp: string;
143
+ [k: string]: unknown;
144
+ };
145
+ methods?: string[];
146
+ /**
147
+ * Comma separated string of allowed headers.
148
+ */
149
+ allowedHeaders?: string;
150
+ exposedHeaders?: string[] | string;
151
+ credentials?: boolean;
152
+ maxAge?: number;
153
+ preflightContinue?: boolean;
154
+ optionsSuccessStatus?: number;
155
+ preflight?: boolean;
156
+ strictPreflight?: boolean;
157
+ hideOptionsRoute?: boolean;
158
+ };
159
+ };
160
+ entrypoint?: string;
161
+ watch?: boolean | string;
162
+ inspectorOptions?: {
163
+ host?: string;
164
+ port?: number;
165
+ breakFirstLine?: boolean;
166
+ watchDisabled?: boolean;
167
+ [k: string]: unknown;
168
+ };
169
+ undici?: {
170
+ agentOptions?: {
171
+ [k: string]: unknown;
172
+ };
173
+ interceptors?:
174
+ | UndiciInterceptor[]
175
+ | {
176
+ Client?: UndiciInterceptor[];
177
+ Pool?: UndiciInterceptor[];
178
+ Agent?: UndiciInterceptor[];
179
+ [k: string]: unknown;
180
+ };
181
+ [k: string]: unknown;
182
+ };
183
+ managementApi?:
184
+ | boolean
185
+ | string
186
+ | {
187
+ logs?: {
188
+ [k: string]: unknown;
189
+ };
190
+ };
191
+ metrics?:
192
+ | boolean
193
+ | {
194
+ port?: number | string;
195
+ hostname?: string;
196
+ endpoint?: string;
197
+ auth?: {
198
+ username: string;
199
+ password: string;
200
+ };
201
+ labels?: {
202
+ [k: string]: string;
203
+ };
204
+ };
205
+ restartOnError?: boolean | number;
206
+ services?: {
207
+ [k: string]: unknown;
208
+ }[];
209
+ };
210
+
211
+ export interface OpenTelemetry {
212
+ /**
213
+ * The name of the service. Defaults to the folder name if not specified.
214
+ */
215
+ serviceName: string;
216
+ /**
217
+ * The version of the service (optional)
218
+ */
219
+ version?: string;
220
+ /**
221
+ * An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.
222
+ */
223
+ skip?: {
224
+ /**
225
+ * The path to skip. Can be a string or a regex.
226
+ */
227
+ path?: string;
228
+ /**
229
+ * HTTP method to skip
230
+ */
231
+ method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
232
+ [k: string]: unknown;
233
+ }[];
234
+ exporter?:
235
+ | {
236
+ type?: "console" | "otlp" | "zipkin" | "memory";
237
+ /**
238
+ * Options for the exporter. These are passed directly to the exporter.
239
+ */
240
+ options?: {
241
+ /**
242
+ * The URL to send the traces to. Not used for console or memory exporters.
243
+ */
244
+ url?: string;
245
+ /**
246
+ * Headers to send to the exporter. Not used for console or memory exporters.
247
+ */
248
+ headers?: {
249
+ [k: string]: unknown;
250
+ };
251
+ [k: string]: unknown;
252
+ };
253
+ additionalProperties?: never;
254
+ [k: string]: unknown;
255
+ }[]
256
+ | {
257
+ type?: "console" | "otlp" | "zipkin" | "memory";
258
+ /**
259
+ * Options for the exporter. These are passed directly to the exporter.
260
+ */
261
+ options?: {
262
+ /**
263
+ * The URL to send the traces to. Not used for console or memory exporters.
264
+ */
265
+ url?: string;
266
+ /**
267
+ * Headers to send to the exporter. Not used for console or memory exporters.
268
+ */
269
+ headers?: {
270
+ [k: string]: unknown;
271
+ };
272
+ [k: string]: unknown;
273
+ };
274
+ additionalProperties?: never;
275
+ [k: string]: unknown;
276
+ };
277
+ }
278
+ export interface UndiciInterceptor {
279
+ module: string;
280
+ options: {
281
+ [k: string]: unknown;
282
+ };
283
+ [k: string]: unknown;
284
+ }
@@ -0,0 +1,8 @@
1
+ 'use strict'
2
+
3
+ const neostandard = require('neostandard')
4
+
5
+ module.exports = neostandard({
6
+ ts: true,
7
+ ignores: [...neostandard.resolveIgnoresFromGitignore(), 'test/tmp/**/*', 'dist/**/*'],
8
+ })
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v1.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "a",
4
4
  "autoload": {
5
5
  "path": "./services"
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v1.3.0/service",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/service/1.52.0.json",
3
3
  "server": {
4
4
  "logger": {
5
5
  "level": "warn"
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.23.2/composer",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/composer/1.52.0.json",
3
3
  "server": {
4
4
  "hostname": "127.0.0.1",
5
5
  "port": 0,
@@ -1,8 +1,6 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
3
- "entrypoint": "serviceApp",
4
- "allowCycles": true,
5
- "hotReload": true,
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
+ "entrypoint": "db-app",
6
4
  "autoload": {
7
5
  "path": "../monorepo",
8
6
  "exclude": [
@@ -24,9 +22,11 @@
24
22
  }
25
23
  }
26
24
  },
27
- "server": {
28
- "logger": {
29
- "level": "trace"
25
+ "services": [
26
+ {
27
+ "id": "with-logger",
28
+ "path": "../monorepo/serviceAppWithLogger",
29
+ "config": "platformatic.service.json"
30
30
  }
31
- }
31
+ ]
32
32
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "invalid",
4
4
  "autoload": {
5
5
  "path": "../monorepo",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.22.0/trickortreat",
2
+ "$schema": "https://schemas.platformatic.dev/trickortreat/0.22.0.json",
3
3
  "server": {
4
4
  "hostname": "127.0.0.1",
5
5
  "port": 0,
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "serviceApp",
4
4
  "autoload": {
5
5
  "exclude": ["docs", "composerApp"],
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "serviceApp",
4
4
  "autoload": {
5
5
  "path": "../monorepo"
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
+ "entrypoint": "composerApp",
4
+ "watch": false,
5
+ "services": [
6
+ {
7
+ "id": "with-logger",
8
+ "path": "../monorepo/serviceAppWithLogger",
9
+ "config": "platformatic.service.json"
10
+ },
11
+ {
12
+ "id": "db-app",
13
+ "path": "../monorepo/dbApp",
14
+ "config": "platformatic.db.json"
15
+ },
16
+ {
17
+ "id": "composerApp",
18
+ "path": "../monorepo/composerApp",
19
+ "config": "platformatic.composer.json"
20
+ },
21
+ {
22
+ "id": "multi-plugin-service",
23
+ "path": "../monorepo/serviceAppWithMultiplePlugins",
24
+ "config": "platformatic.service.json"
25
+ },
26
+ {
27
+ "id": "serviceApp",
28
+ "path": "../monorepo/serviceApp",
29
+ "config": "platformatic.service.json"
30
+ }
31
+ ]
32
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "composerApp",
4
- "hotReload": false,
4
+ "watch": false,
5
5
  "autoload": {
6
6
  "path": "../monorepo",
7
7
  "exclude": ["docs"],
@@ -1,8 +1,7 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "with-logger",
4
- "allowCycles": false,
5
- "hotReload": false,
4
+ "watch": false,
6
5
  "autoload": {
7
6
  "path": "../monorepo",
8
7
  "exclude": [
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
+ "entrypoint": "composer",
4
+ "watch": false,
5
+ "managementApi": false,
6
+ "autoload": {
7
+ "path": "../monorepo-missing-dependencies"
8
+ }
9
+ }
@@ -1,8 +1,7 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "serviceApp",
4
- "allowCycles": false,
5
- "hotReload": false,
4
+ "watch": false,
6
5
  "autoload": {
7
6
  "path": "../monorepo",
8
7
  "exclude": ["docs", "composerApp"],
@@ -1,7 +1,7 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.35.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "without-openapi",
4
- "hotReload": false,
4
+ "watch": false,
5
5
  "services": [
6
6
  {
7
7
  "id": "without-openapi",
@@ -1,8 +1,7 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.32.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "serviceApp",
4
- "allowCycles": true,
5
- "hotReload": true,
4
+ "watch": "{PLT_WATCH}",
6
5
  "autoload": {
7
6
  "path": "../monorepo",
8
7
  "exclude": ["docs", "composerApp"],
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://platformatic.dev/schemas/v0.35.0/runtime",
3
+ "entrypoint": "service1",
4
+ "watch": true,
5
+ "services": [
6
+ {
7
+ "id": "service1",
8
+ "path": "../monorepo-watch/service1",
9
+ "config": "platformatic.service.json"
10
+ }
11
+ ]
12
+ }
@@ -1,12 +1,29 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.35.0/runtime",
3
- "entrypoint": "service1",
4
- "hotReload": true,
5
- "services": [
6
- {
7
- "id": "service1",
8
- "path": "../monorepo-watch/service1",
9
- "config": "platformatic.service.json"
2
+ "$schema": "https://platformatic.dev/schemas/v2.0.0/runtime",
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
+ "dbApp": {
18
+ "id": "db-app",
19
+ "config": "platformatic.db.json"
20
+ }
10
21
  }
11
- ]
22
+ },
23
+ "server": {
24
+ "logger": {
25
+ "level": "trace"
26
+ }
27
+ },
28
+ "restartOnError": 1000
12
29
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v1.44.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "main",
4
- "hotReload": true,
4
+ "watch": true,
5
5
  "autoload": {
6
6
  "path": "../monorepo-with-dependencies"
7
7
  }
@@ -1,16 +1,11 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.22.0.json",
3
3
  "entrypoint": "serviceApp",
4
- "allowCycles": true,
5
- "hotReload": false,
4
+ "watch": true,
6
5
  "autoload": {
7
6
  "path": "../monorepo",
8
7
  "exclude": ["docs", "composerApp"],
9
8
  "mappings": {
10
- "serviceApp": {
11
- "id": "serviceApp",
12
- "config": "platformatic.service-client-without-id.json"
13
- },
14
9
  "serviceAppWithLogger": {
15
10
  "id": "with-logger",
16
11
  "config": "platformatic.service.json"
@@ -20,5 +15,7 @@
20
15
  "config": "platformatic.service.json"
21
16
  }
22
17
  }
23
- }
18
+ },
19
+ "managementApi": {},
20
+ "metrics": false
24
21
  }
@@ -1,8 +1,7 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v1.21.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "serviceApp",
4
- "allowCycles": true,
5
- "hotReload": false,
4
+ "watch": false,
6
5
  "autoload": {
7
6
  "path": "../monorepo",
8
7
  "exclude": ["docs", "composerApp"],
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
3
3
  "entrypoint": "serviceApp",
4
- "allowCycles": true,
5
- "hotReload": false,
4
+ "watch": false,
6
5
  "managementApi": false,
7
6
  "autoload": {
8
7
  "path": "../monorepo",
@@ -1,8 +1,7 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "serviceApp",
4
- "allowCycles": true,
5
- "hotReload": false,
4
+ "watch": false,
6
5
  "managementApi": false,
7
6
  "autoload": {
8
7
  "path": "../monorepo",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "doesNotExist",
4
4
  "services": []
5
5
  }
@@ -1,4 +1,4 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": ""
4
4
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "serviceThrowsOnStart",
4
4
  "services": [
5
5
  {
@@ -1,8 +1,7 @@
1
1
  {
2
- "$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/1.52.0.json",
3
3
  "entrypoint": "serviceApp",
4
- "allowCycles": true,
5
- "hotReload": false,
4
+ "watch": false,
6
5
  "managementApi": false,
7
6
  "autoload": {
8
7
  "path": "../monorepo",
@@ -0,0 +1,12 @@
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
+ }