@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.
- package/config.d.ts +1 -1
- package/package.json +13 -13
- package/schema.json +1 -1
- package/fixtures/botched-start/platformatic.runtime.json +0 -14
- package/fixtures/botched-start/services/a/platformatic.service.json +0 -14
- package/fixtures/botched-start/services/a/plugin.js +0 -11
- package/fixtures/composerApp/api1.json +0 -65
- package/fixtures/composerApp/platformatic.composer.json +0 -23
- package/fixtures/configs/invalid-entrypoint.json +0 -14
- package/fixtures/configs/invalid-schema-type.config.json +0 -19
- package/fixtures/configs/invalid-web-with-services.json +0 -36
- package/fixtures/configs/missing-property.config.json +0 -13
- package/fixtures/configs/missing-service-config.json +0 -7
- package/fixtures/configs/monorepo-composer-no-autoload.json +0 -32
- package/fixtures/configs/monorepo-composer.json +0 -19
- package/fixtures/configs/monorepo-create-cycle.json +0 -20
- package/fixtures/configs/monorepo-missing-dependencies.json +0 -9
- package/fixtures/configs/monorepo-no-cycles.json +0 -19
- package/fixtures/configs/monorepo-openapi.json +0 -12
- package/fixtures/configs/monorepo-watch-env.json +0 -19
- package/fixtures/configs/monorepo-watch-single.json +0 -12
- package/fixtures/configs/monorepo-watch.json +0 -27
- package/fixtures/configs/monorepo-with-dependencies.json +0 -8
- package/fixtures/configs/monorepo-with-management-api-without-metrics.json +0 -21
- package/fixtures/configs/monorepo-with-management-api.json +0 -20
- package/fixtures/configs/monorepo-with-metrics.json +0 -32
- package/fixtures/configs/monorepo.json +0 -27
- package/fixtures/configs/no-schema.config.json +0 -18
- package/fixtures/configs/no-services.config.json +0 -5
- package/fixtures/configs/no-sources.config.json +0 -4
- package/fixtures/configs/service-throws-on-start.json +0 -11
- package/fixtures/configs/service-with-env-port.json +0 -32
- package/fixtures/configs/service-with-stdio.json +0 -12
- package/fixtures/configs/watch.json +0 -19
- package/fixtures/crash-on-bootstrap/platformatic.runtime.json +0 -15
- package/fixtures/crash-on-bootstrap/services/service-1/platformatic.service.json +0 -14
- package/fixtures/crash-on-bootstrap/services/service-1/plugin.js +0 -5
- package/fixtures/crash-on-bootstrap/services/service-2/platformatic.service.json +0 -14
- package/fixtures/crash-on-bootstrap/services/service-2/plugin.js +0 -5
- package/fixtures/dbApp/package.json +0 -5
- package/fixtures/dbApp/platformatic.db.json +0 -28
- package/fixtures/dbApp/plugin.js +0 -12
- package/fixtures/dbAppNoName/package.json +0 -4
- package/fixtures/dbAppNoName/platformatic.db.json +0 -27
- package/fixtures/dbAppNoName/plugin.js +0 -12
- package/fixtures/dbAppNoPackageJson/platformatic.db.json +0 -27
- package/fixtures/dbAppNoPackageJson/plugin.js +0 -12
- package/fixtures/dbAppWithMigrationError/migrations/001.do.sql +0 -4
- package/fixtures/dbAppWithMigrationError/migrations/001.undo.sql +0 -1
- package/fixtures/dbAppWithMigrationError/package.json +0 -5
- package/fixtures/dbAppWithMigrationError/platformatic.db.json +0 -28
- package/fixtures/dbAppWithMigrationError/plugin.js +0 -5
- package/fixtures/do-not-reload-dependencies/node_modules/foo/foo.js +0 -2
- package/fixtures/do-not-reload-dependencies/node_modules/foo/package.json +0 -3
- package/fixtures/do-not-reload-dependencies/node_modules/foom/foom.js +0 -1
- package/fixtures/do-not-reload-dependencies/node_modules/foom/package.json +0 -4
- package/fixtures/do-not-reload-dependencies/platformatic.service.json +0 -18
- package/fixtures/do-not-reload-dependencies/plugin.js +0 -14
- package/fixtures/do-not-restart-on-crash/platformatic.runtime.json +0 -15
- package/fixtures/do-not-restart-on-crash/services/a/platformatic.service.json +0 -16
- package/fixtures/do-not-restart-on-crash/services/a/plugin.js +0 -9
- package/fixtures/empty/hello.js +0 -7
- package/fixtures/express/platformatic.runtime.json +0 -21
- package/fixtures/express/services/a/platformatic.service.json +0 -14
- package/fixtures/express/services/a/plugin.js +0 -26
- package/fixtures/express/services/b/platformatic.service.json +0 -14
- package/fixtures/express/services/b/plugin.js +0 -19
- package/fixtures/external-client/openmeter.json +0 -420
- package/fixtures/external-client/platformatic.service.json +0 -13
- package/fixtures/interceptors/external.js +0 -27
- package/fixtures/interceptors/idp.js +0 -48
- package/fixtures/interceptors/platformatic.runtime.json +0 -27
- package/fixtures/interceptors/services/a/platformatic.service.json +0 -17
- package/fixtures/interceptors/services/a/plugin.js +0 -15
- package/fixtures/interceptors-2/platformatic.runtime.json +0 -25
- package/fixtures/interceptors-2/services/a/platformatic.service.json +0 -17
- package/fixtures/interceptors-2/services/a/plugin.js +0 -15
- package/fixtures/leven/.env.sample +0 -4
- package/fixtures/leven/platformatic.runtime.json +0 -11
- package/fixtures/leven/services/deeply-spittle/platformatic.service.json +0 -25
- package/fixtures/leven/services/deeply-spittle/plugins/example.js +0 -6
- package/fixtures/leven/services/deeply-spittle/routes/root.js +0 -8
- package/fixtures/leven/services/rainy-empire/platformatic.composer.json +0 -21
- package/fixtures/management-api/package.json +0 -4
- package/fixtures/management-api/platformatic.json +0 -22
- package/fixtures/management-api/services/service-1/platformatic.json +0 -15
- package/fixtures/management-api/services/service-1/plugin.js +0 -16
- package/fixtures/management-api/services/service-2/platformatic.json +0 -9
- package/fixtures/management-api/services/service-2/plugin.js +0 -8
- package/fixtures/management-api/services/service-db/migrations/001.do.sql +0 -4
- package/fixtures/management-api/services/service-db/migrations/001.undo.sql +0 -1
- package/fixtures/management-api/services/service-db/package.json +0 -5
- package/fixtures/management-api/services/service-db/platformatic.db.json +0 -29
- package/fixtures/management-api/services/service-db/plugin.js +0 -12
- package/fixtures/management-api-custom-labels/package.json +0 -4
- package/fixtures/management-api-custom-labels/platformatic.json +0 -22
- package/fixtures/management-api-custom-labels/services/service-1/platformatic.json +0 -12
- package/fixtures/management-api-custom-labels/services/service-1/plugin.js +0 -16
- package/fixtures/management-api-custom-labels/services/service-2/platformatic.json +0 -9
- package/fixtures/management-api-custom-labels/services/service-2/plugin.js +0 -8
- package/fixtures/management-api-custom-labels/services/service-db/migrations/001.do.sql +0 -4
- package/fixtures/management-api-custom-labels/services/service-db/migrations/001.undo.sql +0 -1
- package/fixtures/management-api-custom-labels/services/service-db/package.json +0 -5
- package/fixtures/management-api-custom-labels/services/service-db/platformatic.db.json +0 -29
- package/fixtures/management-api-custom-labels/services/service-db/plugin.js +0 -12
- package/fixtures/management-api-without-metrics/package.json +0 -4
- package/fixtures/management-api-without-metrics/platformatic.json +0 -14
- package/fixtures/management-api-without-metrics/services/service-1/platformatic.json +0 -8
- package/fixtures/monorepo/composerApp/external-service.json +0 -204
- package/fixtures/monorepo/composerApp/platformatic.composer.json +0 -46
- package/fixtures/monorepo/dbApp/platformatic.db.json +0 -16
- package/fixtures/monorepo/docs/README.md +0 -1
- package/fixtures/monorepo/serviceApp/deps/dep1.js +0 -7
- package/fixtures/monorepo/serviceApp/deps/dep2.mjs +0 -2
- package/fixtures/monorepo/serviceApp/deps/dep3.mjs +0 -2
- package/fixtures/monorepo/serviceApp/deps/dep4.js +0 -1
- package/fixtures/monorepo/serviceApp/platformatic.service.json +0 -23
- package/fixtures/monorepo/serviceApp/plugin.js +0 -29
- package/fixtures/monorepo/serviceApp/with-logger/package.json +0 -5
- package/fixtures/monorepo/serviceApp/with-logger/with-logger.cjs +0 -25
- package/fixtures/monorepo/serviceApp/with-logger/with-logger.d.ts +0 -38
- package/fixtures/monorepo/serviceApp/with-logger/with-logger.openapi.json +0 -22
- package/fixtures/monorepo/serviceAppWithLogger/platformatic.service.json +0 -20
- package/fixtures/monorepo/serviceAppWithLogger/plugin.js +0 -20
- package/fixtures/monorepo/serviceAppWithMultiplePlugins/platformatic.service.json +0 -28
- package/fixtures/monorepo/serviceAppWithMultiplePlugins/plugin.js +0 -8
- package/fixtures/monorepo/serviceAppWithMultiplePlugins/plugin2.mjs +0 -5
- package/fixtures/monorepo-missing-dependencies/composer/platformatic.json +0 -24
- package/fixtures/monorepo-openapi/serviceAppWithoutOpenapi/platformatic.service.json +0 -13
- package/fixtures/monorepo-openapi/serviceAppWithoutOpenapi/plugin.js +0 -8
- package/fixtures/monorepo-watch/service1/platformatic.service.json +0 -13
- package/fixtures/monorepo-watch/service1/plugin.js +0 -8
- package/fixtures/monorepo-with-dependencies/main/clients/service-1/package.json +0 -3
- package/fixtures/monorepo-with-dependencies/main/clients/service-1/schema.json +0 -204
- package/fixtures/monorepo-with-dependencies/main/clients/service-2/package.json +0 -3
- package/fixtures/monorepo-with-dependencies/main/clients/service-2/schema.json +0 -204
- package/fixtures/monorepo-with-dependencies/main/external-service.schema.json +0 -204
- package/fixtures/monorepo-with-dependencies/main/platformatic.json +0 -46
- package/fixtures/monorepo-with-dependencies/service-1/clients/service-2/package.json +0 -3
- package/fixtures/monorepo-with-dependencies/service-1/clients/service-2/schema.json +0 -204
- package/fixtures/monorepo-with-dependencies/service-1/external-service.schema.json +0 -204
- package/fixtures/monorepo-with-dependencies/service-1/platformatic.json +0 -29
- package/fixtures/monorepo-with-dependencies/service-2/platformatic.json +0 -15
- package/fixtures/no-env.service.json +0 -25
- package/fixtures/preload/platformatic.runtime.json +0 -15
- package/fixtures/preload/preload.js +0 -1
- package/fixtures/preload/services/a/platformatic.service.json +0 -14
- package/fixtures/preload/services/a/plugin.js +0 -7
- package/fixtures/prom-server/platformatic.json +0 -16
- package/fixtures/prom-server/services/service-1/platformatic.json +0 -13
- package/fixtures/prom-server/services/service-1/plugin.js +0 -8
- package/fixtures/prom-server/services/service-2/platformatic.json +0 -12
- package/fixtures/prom-server/services/service-2/plugin.js +0 -8
- package/fixtures/restart-on-crash/platformatic.runtime.json +0 -14
- package/fixtures/restart-on-crash/services/a/platformatic.service.json +0 -16
- package/fixtures/restart-on-crash/services/a/plugin.js +0 -9
- package/fixtures/sample-runtime/.env +0 -9
- package/fixtures/sample-runtime/package.json +0 -16
- package/fixtures/sample-runtime/platformatic.json +0 -18
- package/fixtures/sample-runtime/services/rival/package.json +0 -16
- package/fixtures/sample-runtime/services/rival/platformatic.json +0 -33
- package/fixtures/sample-runtime/services/rival/routes/root.js +0 -7
- package/fixtures/sample-runtime-with-2-services/.env +0 -10
- package/fixtures/sample-runtime-with-2-services/package.json +0 -16
- package/fixtures/sample-runtime-with-2-services/platformatic.json +0 -18
- package/fixtures/sample-runtime-with-2-services/services/foobar/package.json +0 -16
- package/fixtures/sample-runtime-with-2-services/services/foobar/platformatic.json +0 -18
- package/fixtures/sample-runtime-with-2-services/services/foobar/routes/root.js +0 -7
- package/fixtures/sample-runtime-with-2-services/services/rival/package.json +0 -16
- package/fixtures/sample-runtime-with-2-services/services/rival/platformatic.json +0 -33
- package/fixtures/sample-runtime-with-2-services/services/rival/routes/root.js +0 -7
- package/fixtures/server/logger-transport/custom-transport.js +0 -15
- package/fixtures/server/logger-transport/platformatic.runtime.json +0 -21
- package/fixtures/server/logger-transport/services/echo/platformatic.service.json +0 -12
- package/fixtures/server/logger-transport/services/echo/routes/hello.js +0 -6
- package/fixtures/server/overrides-service/platformatic.runtime.json +0 -18
- package/fixtures/server/overrides-service/services/echo/platformatic.service.json +0 -19
- package/fixtures/server/overrides-service/services/echo/routes/span.js +0 -8
- package/fixtures/server/runtime-server/platformatic.runtime.json +0 -18
- package/fixtures/server/runtime-server/services/echo/platformatic.service.json +0 -12
- package/fixtures/server/runtime-server/services/echo/routes/hello.js +0 -6
- package/fixtures/serviceAppThrowsOnStart/platformatic.service.json +0 -12
- package/fixtures/serviceAppThrowsOnStart/plugin.js +0 -6
- package/fixtures/stackables/node_modules/foo/foo.js +0 -62
- package/fixtures/stackables/node_modules/foo/package.json +0 -4
- package/fixtures/stackables/platformatic.json +0 -11
- package/fixtures/start-command-in-runtime.js +0 -24
- package/fixtures/start-command.js +0 -9
- package/fixtures/starter.js +0 -9
- package/fixtures/stdio/platformatic.service.json +0 -6
- package/fixtures/stdio/plugin.js +0 -24
- package/fixtures/telemetry/platformatic.runtime.json +0 -18
- package/fixtures/telemetry/services/echo/platformatic.service.json +0 -19
- package/fixtures/telemetry/services/echo/routes/span.js +0 -22
- package/fixtures/telemetry/services/service-1/platformatic.service.json +0 -19
- package/fixtures/telemetry/services/service-1/routes/echo.js +0 -7
- package/fixtures/typescript/.env +0 -4
- package/fixtures/typescript/platformatic.runtime.json +0 -11
- package/fixtures/typescript/services/composer/platformatic.composer.json +0 -28
- package/fixtures/typescript/services/movies/.env +0 -4
- package/fixtures/typescript/services/movies/global.d.ts +0 -23
- package/fixtures/typescript/services/movies/migrations/001.do.sql +0 -6
- package/fixtures/typescript/services/movies/migrations/001.undo.sql +0 -3
- package/fixtures/typescript/services/movies/platformatic.db.json +0 -33
- package/fixtures/typescript/services/movies/plugin.ts +0 -5
- package/fixtures/typescript/services/movies/tsconfig.json +0 -21
- package/fixtures/typescript/services/movies/types/Movie.d.ts +0 -9
- package/fixtures/typescript/services/movies/types/index.d.ts +0 -7
- package/fixtures/typescript/services/titles/client/client.d.ts +0 -141
- package/fixtures/typescript/services/titles/client/client.openapi.json +0 -630
- package/fixtures/typescript/services/titles/client/package.json +0 -4
- package/fixtures/typescript/services/titles/platformatic.service.json +0 -31
- package/fixtures/typescript/services/titles/plugins/example.ts +0 -6
- package/fixtures/typescript/services/titles/routes/root.ts +0 -21
- package/fixtures/typescript/services/titles/tsconfig.json +0 -21
- package/fixtures/typescript-custom-flags/.env +0 -4
- package/fixtures/typescript-custom-flags/platformatic.runtime.json +0 -11
- package/fixtures/typescript-custom-flags/services/composer/platformatic.composer.json +0 -28
- package/fixtures/typescript-custom-flags/services/movies/global.d.ts +0 -23
- package/fixtures/typescript-custom-flags/services/movies/migrations/001.do.sql +0 -6
- package/fixtures/typescript-custom-flags/services/movies/migrations/001.undo.sql +0 -3
- package/fixtures/typescript-custom-flags/services/movies/platformatic.db.json +0 -35
- package/fixtures/typescript-custom-flags/services/movies/plugin.ts +0 -5
- package/fixtures/typescript-custom-flags/services/movies/tsconfig.json +0 -20
- package/fixtures/typescript-custom-flags/services/movies/types/Movie.d.ts +0 -9
- package/fixtures/typescript-custom-flags/services/movies/types/index.d.ts +0 -7
- package/fixtures/typescript-custom-flags/services/titles/client/client.d.ts +0 -141
- package/fixtures/typescript-custom-flags/services/titles/client/client.openapi.json +0 -630
- package/fixtures/typescript-custom-flags/services/titles/client/package.json +0 -4
- package/fixtures/typescript-custom-flags/services/titles/platformatic.service.json +0 -33
- package/fixtures/typescript-custom-flags/services/titles/plugins/example.ts +0 -6
- package/fixtures/typescript-custom-flags/services/titles/routes/root.ts +0 -21
- package/fixtures/typescript-custom-flags/services/titles/tsconfig.json +0 -21
- package/fixtures/typescript-no-env/platformatic.runtime.json +0 -11
- package/fixtures/typescript-no-env/services/composer/platformatic.composer.json +0 -28
- package/fixtures/typescript-no-env/services/movies/global.d.ts +0 -23
- package/fixtures/typescript-no-env/services/movies/migrations/001.do.sql +0 -6
- package/fixtures/typescript-no-env/services/movies/migrations/001.undo.sql +0 -3
- package/fixtures/typescript-no-env/services/movies/platformatic.db.json +0 -33
- package/fixtures/typescript-no-env/services/movies/plugin.ts +0 -5
- package/fixtures/typescript-no-env/services/movies/tsconfig.json +0 -21
- package/fixtures/typescript-no-env/services/movies/types/Movie.d.ts +0 -9
- package/fixtures/typescript-no-env/services/movies/types/index.d.ts +0 -7
- package/fixtures/typescript-no-env/services/titles/client/client.d.ts +0 -141
- package/fixtures/typescript-no-env/services/titles/client/client.openapi.json +0 -630
- package/fixtures/typescript-no-env/services/titles/client/package.json +0 -4
- package/fixtures/typescript-no-env/services/titles/platformatic.service.json +0 -31
- package/fixtures/typescript-no-env/services/titles/plugins/example.ts +0 -6
- package/fixtures/typescript-no-env/services/titles/routes/root.ts +0 -21
- package/fixtures/typescript-no-env/services/titles/tsconfig.json +0 -21
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"esModuleInterop": true,
|
|
5
|
-
"target": "es2019",
|
|
6
|
-
"sourceMap": true,
|
|
7
|
-
"pretty": true,
|
|
8
|
-
"noEmitOnError": true,
|
|
9
|
-
"outDir": "dist"
|
|
10
|
-
},
|
|
11
|
-
"watchOptions": {
|
|
12
|
-
"watchFile": "fixedPollingInterval",
|
|
13
|
-
"watchDirectory": "fixedPollingInterval",
|
|
14
|
-
"fallbackPolling": "dynamicPriority",
|
|
15
|
-
"synchronousWatchDirectory": true,
|
|
16
|
-
"excludeDirectories": [
|
|
17
|
-
"**/node_modules",
|
|
18
|
-
"dist"
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://schemas.platformatic.dev/@platformatic/composer/1.52.0.json",
|
|
3
|
-
"server": {
|
|
4
|
-
"hostname": "{PLT_SERVER_HOSTNAME}",
|
|
5
|
-
"port": "{PORT}",
|
|
6
|
-
"logger": {
|
|
7
|
-
"level": "{PLT_SERVER_LOGGER_LEVEL}"
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
"composer": {
|
|
11
|
-
"services": [
|
|
12
|
-
{
|
|
13
|
-
"id": "movies",
|
|
14
|
-
"openapi": {
|
|
15
|
-
"url": "/documentation/json"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"id": "titles",
|
|
20
|
-
"openapi": {
|
|
21
|
-
"url": "/documentation/json"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"refreshTimeout": 1000
|
|
26
|
-
},
|
|
27
|
-
"watch": true
|
|
28
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Entity } from '@platformatic/sql-mapper'
|
|
2
|
-
import { EntityTypes, Movie } from './types'
|
|
3
|
-
|
|
4
|
-
declare module 'fastify' {
|
|
5
|
-
interface FastifyInstance {
|
|
6
|
-
getSchema<T extends 'Movie'>(schemaId: T): {
|
|
7
|
-
$id: string,
|
|
8
|
-
title: string,
|
|
9
|
-
description: string,
|
|
10
|
-
type: string,
|
|
11
|
-
properties: {
|
|
12
|
-
[x in keyof EntityTypes[T]]: { type: string, nullable?: boolean }
|
|
13
|
-
},
|
|
14
|
-
required: string[]
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare module '@platformatic/sql-mapper' {
|
|
20
|
-
interface Entities {
|
|
21
|
-
movie: Entity<Movie>,
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://schemas.platformatic.dev/@platformatic/db/1.52.0.json",
|
|
3
|
-
"server": {
|
|
4
|
-
"hostname": "{PLT_SERVER_HOSTNAME}",
|
|
5
|
-
"port": "{PORT}",
|
|
6
|
-
"logger": {
|
|
7
|
-
"level": "{PLT_SERVER_LOGGER_LEVEL}"
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
"db": {
|
|
11
|
-
"connectionString": "{DATABASE_URL}",
|
|
12
|
-
"graphql": true,
|
|
13
|
-
"openapi": true
|
|
14
|
-
},
|
|
15
|
-
"watch": {
|
|
16
|
-
"ignore": [
|
|
17
|
-
"*.sqlite",
|
|
18
|
-
"*.sqlite-journal"
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
"migrations": {
|
|
22
|
-
"dir": "migrations"
|
|
23
|
-
},
|
|
24
|
-
"plugins": {
|
|
25
|
-
"paths": [
|
|
26
|
-
"plugin.ts"
|
|
27
|
-
],
|
|
28
|
-
"typescript": {
|
|
29
|
-
"flags": ["--outDir", "custom"]
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"types": {
|
|
33
|
-
"autogenerate": true
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"esModuleInterop": true,
|
|
5
|
-
"target": "es2019",
|
|
6
|
-
"sourceMap": true,
|
|
7
|
-
"pretty": true,
|
|
8
|
-
"noEmitOnError": true
|
|
9
|
-
},
|
|
10
|
-
"watchOptions": {
|
|
11
|
-
"watchFile": "fixedPollingInterval",
|
|
12
|
-
"watchDirectory": "fixedPollingInterval",
|
|
13
|
-
"fallbackPolling": "dynamicPriority",
|
|
14
|
-
"synchronousWatchDirectory": true,
|
|
15
|
-
"excludeDirectories": [
|
|
16
|
-
"**/node_modules",
|
|
17
|
-
"dist"
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { FastifyPluginAsync } from 'fastify'
|
|
2
|
-
|
|
3
|
-
interface GetMoviesRequest {
|
|
4
|
-
limit?: number;
|
|
5
|
-
offset?: number;
|
|
6
|
-
totalCount?: boolean;
|
|
7
|
-
fields?: Array<string>;
|
|
8
|
-
'where.id.eq'?: number;
|
|
9
|
-
'where.id.neq'?: number;
|
|
10
|
-
'where.id.gt'?: number;
|
|
11
|
-
'where.id.gte'?: number;
|
|
12
|
-
'where.id.lt'?: number;
|
|
13
|
-
'where.id.lte'?: number;
|
|
14
|
-
'where.id.like'?: number;
|
|
15
|
-
'where.id.in'?: string;
|
|
16
|
-
'where.id.nin'?: string;
|
|
17
|
-
'where.title.eq'?: string;
|
|
18
|
-
'where.title.neq'?: string;
|
|
19
|
-
'where.title.gt'?: string;
|
|
20
|
-
'where.title.gte'?: string;
|
|
21
|
-
'where.title.lt'?: string;
|
|
22
|
-
'where.title.lte'?: string;
|
|
23
|
-
'where.title.like'?: string;
|
|
24
|
-
'where.title.in'?: string;
|
|
25
|
-
'where.title.nin'?: string;
|
|
26
|
-
'where.or'?: Array<string>;
|
|
27
|
-
'orderby.id'?: string;
|
|
28
|
-
'orderby.title'?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
interface GetMoviesResponseOK {
|
|
32
|
-
id?: number;
|
|
33
|
-
title: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
interface CreateMovieRequest {
|
|
37
|
-
id?: number;
|
|
38
|
-
title: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
interface CreateMovieResponseOK {
|
|
42
|
-
id?: number;
|
|
43
|
-
title: string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
interface UpdateMoviesRequest {
|
|
47
|
-
fields?: Array<string>;
|
|
48
|
-
'where.id.eq'?: number;
|
|
49
|
-
'where.id.neq'?: number;
|
|
50
|
-
'where.id.gt'?: number;
|
|
51
|
-
'where.id.gte'?: number;
|
|
52
|
-
'where.id.lt'?: number;
|
|
53
|
-
'where.id.lte'?: number;
|
|
54
|
-
'where.id.like'?: number;
|
|
55
|
-
'where.id.in'?: string;
|
|
56
|
-
'where.id.nin'?: string;
|
|
57
|
-
'where.title.eq'?: string;
|
|
58
|
-
'where.title.neq'?: string;
|
|
59
|
-
'where.title.gt'?: string;
|
|
60
|
-
'where.title.gte'?: string;
|
|
61
|
-
'where.title.lt'?: string;
|
|
62
|
-
'where.title.lte'?: string;
|
|
63
|
-
'where.title.like'?: string;
|
|
64
|
-
'where.title.in'?: string;
|
|
65
|
-
'where.title.nin'?: string;
|
|
66
|
-
'where.or'?: Array<string>;
|
|
67
|
-
id?: number;
|
|
68
|
-
title: string;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
interface UpdateMoviesResponseOK {
|
|
72
|
-
id?: number;
|
|
73
|
-
title: string;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
interface GetMovieByIdRequest {
|
|
77
|
-
fields?: Array<string>;
|
|
78
|
-
id: number;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
interface GetMovieByIdResponseOK {
|
|
82
|
-
id?: number;
|
|
83
|
-
title: string;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
interface UpdateMovieRequest {
|
|
87
|
-
fields?: Array<string>;
|
|
88
|
-
id: number;
|
|
89
|
-
title: string;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
interface UpdateMovieResponseOK {
|
|
93
|
-
id?: number;
|
|
94
|
-
title: string;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
interface DeleteMoviesRequest {
|
|
98
|
-
fields?: Array<string>;
|
|
99
|
-
id: number;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
interface DeleteMoviesResponseOK {
|
|
103
|
-
id?: number;
|
|
104
|
-
title: string;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
interface Client {
|
|
108
|
-
getMovies(req: GetMoviesRequest): Promise<Array<GetMoviesResponseOK>>;
|
|
109
|
-
createMovie(req: CreateMovieRequest): Promise<CreateMovieResponseOK>;
|
|
110
|
-
updateMovies(req: UpdateMoviesRequest): Promise<Array<UpdateMoviesResponseOK>>;
|
|
111
|
-
getMovieById(req: GetMovieByIdRequest): Promise<GetMovieByIdResponseOK>;
|
|
112
|
-
updateMovie(req: UpdateMovieRequest): Promise<UpdateMovieResponseOK>;
|
|
113
|
-
deleteMovies(req: DeleteMoviesRequest): Promise<DeleteMoviesResponseOK>;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
type ClientPlugin = FastifyPluginAsync<NonNullable<client.ClientOptions>>
|
|
117
|
-
|
|
118
|
-
declare module 'fastify' {
|
|
119
|
-
interface ConfigureClient {
|
|
120
|
-
getHeaders(req: FastifyRequest, reply: FastifyReply): Promise<Record<string, string>>;
|
|
121
|
-
}
|
|
122
|
-
interface FastifyInstance {
|
|
123
|
-
client: Client;
|
|
124
|
-
configureClient(opts: ConfigureClient): unknown
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
interface FastifyRequest {
|
|
128
|
-
client: Client;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
declare namespace client {
|
|
133
|
-
export interface ClientOptions {
|
|
134
|
-
url: string
|
|
135
|
-
}
|
|
136
|
-
export const client: ClientPlugin
|
|
137
|
-
export { client as default }
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
declare function client (...params: Parameters<ClientPlugin>): ReturnType<ClientPlugin>
|
|
141
|
-
export = client
|