@platformatic/service 0.45.1 → 0.46.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 (120) hide show
  1. package/index.js +2 -2
  2. package/package.json +6 -6
  3. package/fixtures/hello/no-server-logger.json +0 -13
  4. package/fixtures/hello/platformatic.service.json +0 -18
  5. package/fixtures/hello/plugin.js +0 -7
  6. package/fixtures/hello/warn-log.service.json +0 -18
  7. package/fixtures/hello-client/hello/hello.cjs +0 -21
  8. package/fixtures/hello-client/hello/hello.d.ts +0 -34
  9. package/fixtures/hello-client/hello/hello.openapi.json +0 -22
  10. package/fixtures/hello-client/hello/package.json +0 -5
  11. package/fixtures/hello-client/platformatic.service.json +0 -19
  12. package/fixtures/hello-client/plugin.js +0 -8
  13. package/fixtures/hello-client-ts/hello/hello.cjs +0 -21
  14. package/fixtures/hello-client-ts/hello/hello.d.ts +0 -34
  15. package/fixtures/hello-client-ts/hello/hello.openapi.json +0 -22
  16. package/fixtures/hello-client-ts/hello/package.json +0 -5
  17. package/fixtures/hello-client-ts/platformatic.service.json +0 -21
  18. package/fixtures/hello-client-ts/plugin.ts +0 -8
  19. package/fixtures/hello-client-ts/tsconfig.json +0 -23
  20. package/fixtures/hello-client-ts-without-deps/hello.d.ts +0 -34
  21. package/fixtures/hello-client-ts-without-deps/hello.openapi.json +0 -22
  22. package/fixtures/hello-client-ts-without-deps/platformatic.service.json +0 -23
  23. package/fixtures/hello-client-ts-without-deps/plugin.ts +0 -8
  24. package/fixtures/hello-client-ts-without-deps/tsconfig.json +0 -22
  25. package/fixtures/hello-client-without-deps/hello.d.ts +0 -34
  26. package/fixtures/hello-client-without-deps/hello.openapi.json +0 -22
  27. package/fixtures/hello-client-without-deps/platformatic.service.json +0 -21
  28. package/fixtures/hello-client-without-deps/plugin.js +0 -8
  29. package/fixtures/https/embedded-pem.json +0 -20
  30. package/fixtures/https/https.crt +0 -25
  31. package/fixtures/https/https.key +0 -27
  32. package/fixtures/https/pem-path.json +0 -20
  33. package/fixtures/https/plugin.js +0 -7
  34. package/fixtures/options/platformatic.service.yml +0 -9
  35. package/fixtures/options/plugin.js +0 -7
  36. package/test/autoload.test.js +0 -486
  37. package/test/cli/compile-1.test.mjs +0 -532
  38. package/test/cli/compile-2.test.mjs +0 -310
  39. package/test/cli/gen-schema.test.mjs +0 -44
  40. package/test/cli/gen-types.test.mjs +0 -30
  41. package/test/cli/helper.mjs +0 -67
  42. package/test/cli/start.test.mjs +0 -126
  43. package/test/cli/tap-parallel-not-ok +0 -0
  44. package/test/cli/validations.test.mjs +0 -33
  45. package/test/clients.test.js +0 -87
  46. package/test/config.test.js +0 -316
  47. package/test/cors.test.js +0 -291
  48. package/test/fixtures/bad-typescript-plugin/platformatic.service.json +0 -16
  49. package/test/fixtures/bad-typescript-plugin/plugin.ts +0 -5
  50. package/test/fixtures/bad-typescript-plugin/tsconfig.json +0 -22
  51. package/test/fixtures/custom-port-placeholder.json +0 -10
  52. package/test/fixtures/default-env-var-names.json +0 -7
  53. package/test/fixtures/directories/platformatic.service.json +0 -13
  54. package/test/fixtures/directories/plugins/decorator.js +0 -7
  55. package/test/fixtures/directories/routes/foo/bar.js +0 -11
  56. package/test/fixtures/directories/routes/foo/baz/index.js +0 -7
  57. package/test/fixtures/directories/routes/foo/baz/index2.js +0 -11
  58. package/test/fixtures/directories/routes/oof/auto.hooks.js +0 -5
  59. package/test/fixtures/directories/routes/oof/index.js +0 -7
  60. package/test/fixtures/directories/routes/root.js +0 -7
  61. package/test/fixtures/hello-ts-with-config/global.d.ts +0 -8
  62. package/test/fixtures/hello-ts-with-config/platformatic.service.json +0 -16
  63. package/test/fixtures/hello-ts-with-config/plugin.ts +0 -8
  64. package/test/fixtures/hello-ts-with-config/tsconfig.json +0 -23
  65. package/test/fixtures/hello-world-resolver.js +0 -16
  66. package/test/fixtures/missing-property.config.json +0 -1
  67. package/test/fixtures/nested-directories/modules/catalogue/index.js +0 -11
  68. package/test/fixtures/nested-directories/modules/catalogue/routes/products.js +0 -14
  69. package/test/fixtures/nested-directories/modules/inventory/index.js +0 -33
  70. package/test/fixtures/nested-directories/modules/inventory/routes/product.js +0 -15
  71. package/test/fixtures/nested-directories/package.json +0 -3
  72. package/test/fixtures/nested-directories/platformatic.service.json +0 -23
  73. package/test/fixtures/nested-directories/plugins/decorator.js +0 -3
  74. package/test/fixtures/nested-directories/plugins/handlers.js +0 -17
  75. package/test/fixtures/not-load.js +0 -8
  76. package/test/fixtures/not-load.service.json +0 -13
  77. package/test/fixtures/other-side.js +0 -9
  78. package/test/fixtures/request-id.js +0 -9
  79. package/test/fixtures/root-endpoint-plugin.js +0 -8
  80. package/test/fixtures/throw-resolver.js +0 -16
  81. package/test/fixtures/typescript-autoload/platformatic.service.json +0 -16
  82. package/test/fixtures/typescript-autoload/routes/plugin.ts +0 -5
  83. package/test/fixtures/typescript-autoload/tsconfig.json +0 -22
  84. package/test/fixtures/typescript-compiled/compiled/plugin.js +0 -6
  85. package/test/fixtures/typescript-compiled/platformatic.service.json +0 -18
  86. package/test/fixtures/typescript-plugin/platformatic.service.json +0 -16
  87. package/test/fixtures/typescript-plugin/plugin.ts +0 -5
  88. package/test/fixtures/typescript-plugin/tsconfig.json +0 -22
  89. package/test/fixtures/typescript-plugin-custom-flags/platformatic.service.json +0 -18
  90. package/test/fixtures/typescript-plugin-custom-flags/plugin.ts +0 -5
  91. package/test/fixtures/typescript-plugin-custom-flags/tsconfig.json +0 -22
  92. package/test/fixtures/typescript-plugin-custom-tsconfig/a-config-for-ts.json +0 -22
  93. package/test/fixtures/typescript-plugin-custom-tsconfig/platformatic.service.json +0 -18
  94. package/test/fixtures/typescript-plugin-custom-tsconfig/plugin.ts +0 -5
  95. package/test/fixtures/typescript-plugin-nocompile/platformatic.service.json +0 -16
  96. package/test/fixtures/typescript-plugin-nocompile/plugin.ts +0 -5
  97. package/test/fixtures/typescript-plugin-nocompile/tsconfig.json +0 -22
  98. package/test/fixtures/typescript-plugin-nocompile-enabled/platformatic.service.json +0 -18
  99. package/test/fixtures/typescript-plugin-nocompile-enabled/plugin.ts +0 -5
  100. package/test/fixtures/typescript-plugin-nocompile-enabled/tsconfig.json +0 -22
  101. package/test/fixtures/typescript-plugin-nocompile-string/platformatic.service.json +0 -16
  102. package/test/fixtures/typescript-plugin-nocompile-string/plugin.ts +0 -5
  103. package/test/fixtures/typescript-plugin-nocompile-string/tsconfig.json +0 -22
  104. package/test/fixtures/typescript-plugin-string/platformatic.service.json +0 -16
  105. package/test/fixtures/typescript-plugin-string/plugin.ts +0 -5
  106. package/test/fixtures/typescript-plugin-string/tsconfig.json +0 -22
  107. package/test/fixtures/undici-plugin.js +0 -15
  108. package/test/graphql.test.js +0 -219
  109. package/test/healthcheck.test.js +0 -92
  110. package/test/helper.js +0 -30
  111. package/test/https.test.js +0 -64
  112. package/test/lambda.test.js +0 -103
  113. package/test/load-and-reload-files.test.js +0 -180
  114. package/test/load-plugin.test.js +0 -67
  115. package/test/metrics.test.js +0 -220
  116. package/test/routes.test.js +0 -230
  117. package/test/schema.test.js +0 -12
  118. package/test/tap-parallel-ok +0 -0
  119. package/test/telemetry.test.js +0 -87
  120. package/test/utils.test.js +0 -37
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "esModuleInterop": true,
5
- "target": "es2020",
6
- "moduleResolution": "node",
7
- "sourceMap": true,
8
- "pretty": true,
9
- "noEmitOnError": true,
10
- "outDir": "dist"
11
- },
12
- "watchOptions": {
13
- "watchFile": "fixedPollingInterval",
14
- "watchDirectory": "fixedPollingInterval",
15
- "fallbackPolling": "dynamicPriority",
16
- "synchronousWatchDirectory": true,
17
- "excludeDirectories": [
18
- "**/node_modules",
19
- "dist"
20
- ]
21
- }
22
- }
@@ -1,10 +0,0 @@
1
- {
2
- "server": {
3
- "logger": {
4
- "level": "info"
5
- },
6
- "hostname": "127.0.0.1",
7
- "port": "{A_CUSTOM_PORT}",
8
- "pluginTimeout": "10"
9
- }
10
- }
@@ -1,7 +0,0 @@
1
- {
2
- "server": {
3
- "hostname": "{HOSTNAME}",
4
- "port": "{PORT}",
5
- "pluginTimeout": "10"
6
- }
7
- }
@@ -1,13 +0,0 @@
1
- {
2
- "server": {
3
- "hostname": "127.0.0.1",
4
- "port": 0,
5
- "logger": {
6
- "level": "info"
7
- }
8
- },
9
- "plugins": {
10
- "paths": ["./routes"]
11
- },
12
- "metrics": false
13
- }
@@ -1,7 +0,0 @@
1
- 'use strict'
2
-
3
- const fp = require('fastify-plugin')
4
-
5
- module.exports = fp(async function (app) {
6
- app.decorate('foo', 'bar')
7
- })
@@ -1,11 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function (fastify, opts) {
4
- fastify.get('/bar', async function (request, reply) {
5
- return { hello: 'from bar' }
6
- })
7
-
8
- fastify.get('/with-decorator', async function (request, reply) {
9
- return { hello: fastify.foo }
10
- })
11
- }
@@ -1,7 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function (fastify, opts) {
4
- fastify.get('/', async function (request, reply) {
5
- return { hello: 'from baz' }
6
- })
7
- }
@@ -1,11 +0,0 @@
1
- 'use strict'
2
-
3
- /*
4
- * Used for providing an alternative `index.js` naming convention
5
- * when specified from the autoload `indexPattern` property.
6
- */
7
- module.exports = async function (fastify, opts) {
8
- fastify.get('/index2', async function (request, reply) {
9
- return { hello: 'from baz with index2.js' }
10
- })
11
- }
@@ -1,5 +0,0 @@
1
- module.exports = async function (app, opts) {
2
- app.addHook('onRequest', async (req, reply) => {
3
- reply.send({ hello: 'from auto.hooks.js' })
4
- })
5
- }
@@ -1,7 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function (fastify, opts) {
4
- fastify.get('/', async function (request, reply) {
5
- return { hello: 'from oof' }
6
- })
7
- }
@@ -1,7 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function (fastify, opts) {
4
- fastify.get('/', async function (request, reply) {
5
- return { hello: 'from root' }
6
- })
7
- }
@@ -1,8 +0,0 @@
1
- import { FastifyInstance } from 'fastify'
2
- import { PlatformaticApp, PlatformaticServiceConfig } from '../../../index'
3
-
4
- declare module 'fastify' {
5
- interface FastifyInstance {
6
- platformatic: PlatformaticApp<PlatformaticServiceConfig>
7
- }
8
- }
@@ -1,16 +0,0 @@
1
- {
2
- "server": {
3
- "hostname": "127.0.0.1",
4
- "port": 0,
5
- "logger": {
6
- "level": "info"
7
- },
8
- "pluginTimeout": 30000
9
- },
10
- "plugins": {
11
- "paths": ["./plugin.ts"],
12
- "typescript": true
13
- },
14
- "metrics": false,
15
- "watch": false
16
- }
@@ -1,8 +0,0 @@
1
- /// <reference path="./global.d.ts" />
2
- import { FastifyInstance } from 'fastify'
3
-
4
- export default async function (app: FastifyInstance) {
5
- app.get('/', async () => {
6
- return app.platformatic.config
7
- })
8
- }
@@ -1,23 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "esModuleInterop": true,
5
- "target": "es2020",
6
- "moduleResolution": "node",
7
- "sourceMap": false,
8
- "incremental": true,
9
- "pretty": true,
10
- "noEmitOnError": true,
11
- "outDir": "dist"
12
- },
13
- "watchOptions": {
14
- "watchFile": "fixedPollingInterval",
15
- "watchDirectory": "fixedPollingInterval",
16
- "fallbackPolling": "dynamicPriority",
17
- "synchronousWatchDirectory": true,
18
- "excludeDirectories": [
19
- "**/node_modules",
20
- "dist"
21
- ]
22
- }
23
- }
@@ -1,16 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function (app) {
4
- app.graphql.extendSchema(`
5
- extend type Query {
6
- hello: String
7
- }
8
- `)
9
- app.graphql.defineResolvers({
10
- Query: {
11
- hello: async function (root, args, context) {
12
- return 'world'
13
- }
14
- }
15
- })
16
- }
@@ -1,11 +0,0 @@
1
- import autoload from '@fastify/autoload'
2
- import { join } from 'desm'
3
-
4
- export default async function catalogue (app, opts) {
5
- app.register(autoload, {
6
- dir: join(import.meta.url, 'routes'),
7
- options: {
8
- prefix: opts.prefix
9
- }
10
- })
11
- }
@@ -1,14 +0,0 @@
1
- export default async function (fastify, opts) {
2
- fastify.get('/products', async (request, reply) => {
3
- const data = [{ sku: 42, name: 'foo' }, { sku: 43, name: 'bar' }]
4
- // Currently slow and inefficient, but ok for the demo
5
- for (const product of data) {
6
- product.inStore = await fastify.inventory.howManyInStore(product.sku)
7
- }
8
- return data
9
- })
10
-
11
- fastify.get('/error', async (request, reply) => {
12
- throw new Error('This is an error')
13
- })
14
- }
@@ -1,33 +0,0 @@
1
- import fp from 'fastify-plugin'
2
- import autoload from '@fastify/autoload'
3
- import { join } from 'desm'
4
-
5
- class Inventory {
6
- async howManyInStore (sku) {
7
- if (sku === 42) {
8
- return 2
9
- } else {
10
- return 0
11
- }
12
- }
13
- }
14
-
15
- async function inventory (fastify, opts) {
16
- // This will be published to the root fastify instance
17
- // it could also be extracted to a separate plugin
18
- fastify.decorate('inventory', new Inventory())
19
-
20
- // These routes would be created in their own child instances
21
- fastify.register(autoload, {
22
- dir: join(import.meta.url, 'routes'),
23
- options: {
24
- prefix: opts.prefix
25
- }
26
- })
27
-
28
- fastify.get('/foo', async function (req) {
29
- return req.foo
30
- })
31
- }
32
-
33
- export default fp(inventory)
@@ -1,15 +0,0 @@
1
- export default async function (fastify, opts) {
2
- fastify.get('/product/:sku', {
3
- schema: {
4
- params: {
5
- type: 'object',
6
- properties: {
7
- sku: { type: 'number' }
8
- }
9
- }
10
- }
11
- }, async (request, reply) => {
12
- const sku = request.params.sku
13
- return { sku, inStore: await fastify.inventory.howManyInStore(sku) }
14
- })
15
- }
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "https://platformatic.dev/schemas/v0.19.7/service",
3
- "server": {
4
- "hostname": "{PLT_SERVER_HOSTNAME}",
5
- "port": "{PORT}",
6
- "logger": {
7
- "level": "{PLT_SERVER_LOGGER_LEVEL}"
8
- }
9
- },
10
- "service": {
11
- "openapi": true
12
- },
13
- "plugins": {
14
- "paths": [{
15
- "path": "plugins",
16
- "encapsulate": false
17
- }, {
18
- "path": "modules",
19
- "encapsulate": false,
20
- "maxDepth": 1
21
- }]
22
- }
23
- }
@@ -1,3 +0,0 @@
1
- export default async function foo (app) {
2
- app.decorateRequest('foo', 'bar')
3
- }
@@ -1,17 +0,0 @@
1
- export default async function (app, opts) {
2
- app.setErrorHandler(async (err, request, reply) => {
3
- if (err.validation) {
4
- reply.code(403)
5
- return err.message
6
- }
7
- request.log.error({ err })
8
- reply.code(err.statusCode || 500)
9
-
10
- return "I'm sorry, there was an error processing your request."
11
- })
12
-
13
- app.setNotFoundHandler(async (request, reply) => {
14
- reply.code(404)
15
- return "I'm sorry, I couldn't find what you were looking for."
16
- })
17
- }
@@ -1,8 +0,0 @@
1
- 'use strict'
2
-
3
- const { promisify } = require('util')
4
- const sleep = promisify(setTimeout)
5
-
6
- module.exports = async function (app) {
7
- await sleep(60000)
8
- }
@@ -1,13 +0,0 @@
1
- {
2
- "server": {
3
- "logger": {
4
- "level": "info"
5
- },
6
- "hostname": "127.0.0.1",
7
- "port": "3042",
8
- "pluginTimeout": "10"
9
- },
10
- "plugins": {
11
- "paths": ["./not-load.js"]
12
- }
13
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function (app) {
4
- app.addHook('onRequest', async () => {
5
- throw new TypeError('kaboom')
6
- })
7
- }
8
-
9
- module.exports[Symbol.for('skip-override')] = true
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function (app) {
4
- app.get('/request-id', async (req, res) => {
5
- return {
6
- request_id: req.id
7
- }
8
- })
9
- }
@@ -1,8 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function (app) {
4
- console.log('plugin loaded')
5
- app.get('/', async function () {
6
- return { message: 'Root Plugin' }
7
- })
8
- }
@@ -1,16 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = async function (app) {
4
- app.graphql.extendSchema(`
5
- extend type Query {
6
- hello: String
7
- }
8
- `)
9
- app.graphql.defineResolvers({
10
- Query: {
11
- hello: async function (root, args, context) {
12
- throw new Error('Kaboooooom!!!')
13
- }
14
- }
15
- })
16
- }
@@ -1,16 +0,0 @@
1
- {
2
- "server": {
3
- "logger": {
4
- "level": "info"
5
- },
6
- "hostname": "127.0.0.1",
7
- "port": "0",
8
- "pluginTimeout": 60000,
9
- "keepAliveTimeout": 1
10
- },
11
- "plugins": {
12
- "paths": ["routes"],
13
- "typescript": true
14
- },
15
- "watch": false
16
- }
@@ -1,5 +0,0 @@
1
- import { FastifyInstance } from 'fastify'
2
-
3
- export default async function (app: FastifyInstance) {
4
- app.log.info('Typescript plugin loaded')
5
- }
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "esModuleInterop": true,
5
- "target": "es2020",
6
- "moduleResolution": "node",
7
- "sourceMap": false,
8
- "pretty": false,
9
- "noEmitOnError": true,
10
- "outDir": "dist"
11
- },
12
- "watchOptions": {
13
- "watchFile": "fixedPollingInterval",
14
- "watchDirectory": "fixedPollingInterval",
15
- "fallbackPolling": "dynamicPriority",
16
- "synchronousWatchDirectory": true,
17
- "excludeDirectories": [
18
- "**/node_modules",
19
- "dist"
20
- ]
21
- }
22
- }
@@ -1,6 +0,0 @@
1
- 'use strict'
2
-
3
- async function plugin (app) {
4
- app.log.info('Typescript plugin loaded')
5
- }
6
- module.exports = plugin
@@ -1,18 +0,0 @@
1
- {
2
- "server": {
3
- "logger": {
4
- "level": "info"
5
- },
6
- "hostname": "127.0.0.1",
7
- "port": "0",
8
- "pluginTimeout": 60000,
9
- "keepAliveTimeout": 1
10
- },
11
- "plugins": {
12
- "paths": ["plugin.ts"],
13
- "typescript": {
14
- "outDir": "compiled"
15
- }
16
- },
17
- "watch": false
18
- }
@@ -1,16 +0,0 @@
1
- {
2
- "server": {
3
- "logger": {
4
- "level": "info"
5
- },
6
- "hostname": "127.0.0.1",
7
- "port": "0",
8
- "pluginTimeout": 60000,
9
- "keepAliveTimeout": 1
10
- },
11
- "plugins": {
12
- "paths": ["plugin.ts"],
13
- "typescript": true
14
- },
15
- "watch": false
16
- }
@@ -1,5 +0,0 @@
1
- import { FastifyInstance } from 'fastify'
2
-
3
- export default async function (app: FastifyInstance) {
4
- app.log.info('Typescript plugin loaded')
5
- }
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "esModuleInterop": true,
5
- "target": "es6",
6
- "moduleResolution": "node",
7
- "sourceMap": true,
8
- "pretty": true,
9
- "noEmitOnError": true,
10
- "outDir": "dist"
11
- },
12
- "watchOptions": {
13
- "watchFile": "fixedPollingInterval",
14
- "watchDirectory": "fixedPollingInterval",
15
- "fallbackPolling": "dynamicPriority",
16
- "synchronousWatchDirectory": true,
17
- "excludeDirectories": [
18
- "**/node_modules",
19
- "dist"
20
- ]
21
- }
22
- }
@@ -1,18 +0,0 @@
1
- {
2
- "server": {
3
- "logger": {
4
- "level": "info"
5
- },
6
- "hostname": "127.0.0.1",
7
- "port": "0",
8
- "pluginTimeout": 60000,
9
- "keepAliveTimeout": 1
10
- },
11
- "plugins": {
12
- "paths": ["plugin.ts"],
13
- "typescript": {
14
- "flags": ["-b"]
15
- }
16
- },
17
- "watch": false
18
- }
@@ -1,5 +0,0 @@
1
- import { FastifyInstance } from 'fastify'
2
-
3
- export default async function (app: FastifyInstance) {
4
- app.log.info('Typescript plugin loaded')
5
- }
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "esModuleInterop": true,
5
- "target": "es2020",
6
- "moduleResolution": "node",
7
- "sourceMap": false,
8
- "pretty": false,
9
- "noEmitOnError": true,
10
- "outDir": "dist"
11
- },
12
- "watchOptions": {
13
- "watchFile": "fixedPollingInterval",
14
- "watchDirectory": "fixedPollingInterval",
15
- "fallbackPolling": "dynamicPriority",
16
- "synchronousWatchDirectory": true,
17
- "excludeDirectories": [
18
- "**/node_modules",
19
- "dist"
20
- ]
21
- }
22
- }
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "esModuleInterop": true,
5
- "target": "es6",
6
- "moduleResolution": "node",
7
- "sourceMap": true,
8
- "pretty": true,
9
- "noEmitOnError": true,
10
- "outDir": "dist"
11
- },
12
- "watchOptions": {
13
- "watchFile": "fixedPollingInterval",
14
- "watchDirectory": "fixedPollingInterval",
15
- "fallbackPolling": "dynamicPriority",
16
- "synchronousWatchDirectory": true,
17
- "excludeDirectories": [
18
- "**/node_modules",
19
- "dist"
20
- ]
21
- }
22
- }
@@ -1,18 +0,0 @@
1
- {
2
- "server": {
3
- "logger": {
4
- "level": "info"
5
- },
6
- "hostname": "127.0.0.1",
7
- "port": "0",
8
- "pluginTimeout": 60000,
9
- "keepAliveTimeout": 1
10
- },
11
- "plugins": {
12
- "paths": ["plugin.ts"],
13
- "typescript": {
14
- "tsConfig": "./a-config-for-ts.json"
15
- }
16
- },
17
- "watch": false
18
- }
@@ -1,5 +0,0 @@
1
- import { FastifyInstance } from 'fastify'
2
-
3
- export default async function (app: FastifyInstance) {
4
- app.log.info('Typescript plugin loaded')
5
- }
@@ -1,16 +0,0 @@
1
- {
2
- "server": {
3
- "logger": {
4
- "level": "info"
5
- },
6
- "hostname": "127.0.0.1",
7
- "port": "0",
8
- "pluginTimeout": 60000,
9
- "keepAliveTimeout": 1
10
- },
11
- "plugins": {
12
- "paths": ["plugin.ts"],
13
- "typescript": false
14
- },
15
- "watch": false
16
- }
@@ -1,5 +0,0 @@
1
- import { FastifyInstance } from 'fastify'
2
-
3
- export default async function (app: FastifyInstance) {
4
- app.log.info('Typescript plugin loaded')
5
- }