@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.
- package/index.js +2 -2
- package/package.json +6 -6
- package/fixtures/hello/no-server-logger.json +0 -13
- package/fixtures/hello/platformatic.service.json +0 -18
- package/fixtures/hello/plugin.js +0 -7
- package/fixtures/hello/warn-log.service.json +0 -18
- package/fixtures/hello-client/hello/hello.cjs +0 -21
- package/fixtures/hello-client/hello/hello.d.ts +0 -34
- package/fixtures/hello-client/hello/hello.openapi.json +0 -22
- package/fixtures/hello-client/hello/package.json +0 -5
- package/fixtures/hello-client/platformatic.service.json +0 -19
- package/fixtures/hello-client/plugin.js +0 -8
- package/fixtures/hello-client-ts/hello/hello.cjs +0 -21
- package/fixtures/hello-client-ts/hello/hello.d.ts +0 -34
- package/fixtures/hello-client-ts/hello/hello.openapi.json +0 -22
- package/fixtures/hello-client-ts/hello/package.json +0 -5
- package/fixtures/hello-client-ts/platformatic.service.json +0 -21
- package/fixtures/hello-client-ts/plugin.ts +0 -8
- package/fixtures/hello-client-ts/tsconfig.json +0 -23
- package/fixtures/hello-client-ts-without-deps/hello.d.ts +0 -34
- package/fixtures/hello-client-ts-without-deps/hello.openapi.json +0 -22
- package/fixtures/hello-client-ts-without-deps/platformatic.service.json +0 -23
- package/fixtures/hello-client-ts-without-deps/plugin.ts +0 -8
- package/fixtures/hello-client-ts-without-deps/tsconfig.json +0 -22
- package/fixtures/hello-client-without-deps/hello.d.ts +0 -34
- package/fixtures/hello-client-without-deps/hello.openapi.json +0 -22
- package/fixtures/hello-client-without-deps/platformatic.service.json +0 -21
- package/fixtures/hello-client-without-deps/plugin.js +0 -8
- package/fixtures/https/embedded-pem.json +0 -20
- package/fixtures/https/https.crt +0 -25
- package/fixtures/https/https.key +0 -27
- package/fixtures/https/pem-path.json +0 -20
- package/fixtures/https/plugin.js +0 -7
- package/fixtures/options/platformatic.service.yml +0 -9
- package/fixtures/options/plugin.js +0 -7
- package/test/autoload.test.js +0 -486
- package/test/cli/compile-1.test.mjs +0 -532
- package/test/cli/compile-2.test.mjs +0 -310
- package/test/cli/gen-schema.test.mjs +0 -44
- package/test/cli/gen-types.test.mjs +0 -30
- package/test/cli/helper.mjs +0 -67
- package/test/cli/start.test.mjs +0 -126
- package/test/cli/tap-parallel-not-ok +0 -0
- package/test/cli/validations.test.mjs +0 -33
- package/test/clients.test.js +0 -87
- package/test/config.test.js +0 -316
- package/test/cors.test.js +0 -291
- package/test/fixtures/bad-typescript-plugin/platformatic.service.json +0 -16
- package/test/fixtures/bad-typescript-plugin/plugin.ts +0 -5
- package/test/fixtures/bad-typescript-plugin/tsconfig.json +0 -22
- package/test/fixtures/custom-port-placeholder.json +0 -10
- package/test/fixtures/default-env-var-names.json +0 -7
- package/test/fixtures/directories/platformatic.service.json +0 -13
- package/test/fixtures/directories/plugins/decorator.js +0 -7
- package/test/fixtures/directories/routes/foo/bar.js +0 -11
- package/test/fixtures/directories/routes/foo/baz/index.js +0 -7
- package/test/fixtures/directories/routes/foo/baz/index2.js +0 -11
- package/test/fixtures/directories/routes/oof/auto.hooks.js +0 -5
- package/test/fixtures/directories/routes/oof/index.js +0 -7
- package/test/fixtures/directories/routes/root.js +0 -7
- package/test/fixtures/hello-ts-with-config/global.d.ts +0 -8
- package/test/fixtures/hello-ts-with-config/platformatic.service.json +0 -16
- package/test/fixtures/hello-ts-with-config/plugin.ts +0 -8
- package/test/fixtures/hello-ts-with-config/tsconfig.json +0 -23
- package/test/fixtures/hello-world-resolver.js +0 -16
- package/test/fixtures/missing-property.config.json +0 -1
- package/test/fixtures/nested-directories/modules/catalogue/index.js +0 -11
- package/test/fixtures/nested-directories/modules/catalogue/routes/products.js +0 -14
- package/test/fixtures/nested-directories/modules/inventory/index.js +0 -33
- package/test/fixtures/nested-directories/modules/inventory/routes/product.js +0 -15
- package/test/fixtures/nested-directories/package.json +0 -3
- package/test/fixtures/nested-directories/platformatic.service.json +0 -23
- package/test/fixtures/nested-directories/plugins/decorator.js +0 -3
- package/test/fixtures/nested-directories/plugins/handlers.js +0 -17
- package/test/fixtures/not-load.js +0 -8
- package/test/fixtures/not-load.service.json +0 -13
- package/test/fixtures/other-side.js +0 -9
- package/test/fixtures/request-id.js +0 -9
- package/test/fixtures/root-endpoint-plugin.js +0 -8
- package/test/fixtures/throw-resolver.js +0 -16
- package/test/fixtures/typescript-autoload/platformatic.service.json +0 -16
- package/test/fixtures/typescript-autoload/routes/plugin.ts +0 -5
- package/test/fixtures/typescript-autoload/tsconfig.json +0 -22
- package/test/fixtures/typescript-compiled/compiled/plugin.js +0 -6
- package/test/fixtures/typescript-compiled/platformatic.service.json +0 -18
- package/test/fixtures/typescript-plugin/platformatic.service.json +0 -16
- package/test/fixtures/typescript-plugin/plugin.ts +0 -5
- package/test/fixtures/typescript-plugin/tsconfig.json +0 -22
- package/test/fixtures/typescript-plugin-custom-flags/platformatic.service.json +0 -18
- package/test/fixtures/typescript-plugin-custom-flags/plugin.ts +0 -5
- package/test/fixtures/typescript-plugin-custom-flags/tsconfig.json +0 -22
- package/test/fixtures/typescript-plugin-custom-tsconfig/a-config-for-ts.json +0 -22
- package/test/fixtures/typescript-plugin-custom-tsconfig/platformatic.service.json +0 -18
- package/test/fixtures/typescript-plugin-custom-tsconfig/plugin.ts +0 -5
- package/test/fixtures/typescript-plugin-nocompile/platformatic.service.json +0 -16
- package/test/fixtures/typescript-plugin-nocompile/plugin.ts +0 -5
- package/test/fixtures/typescript-plugin-nocompile/tsconfig.json +0 -22
- package/test/fixtures/typescript-plugin-nocompile-enabled/platformatic.service.json +0 -18
- package/test/fixtures/typescript-plugin-nocompile-enabled/plugin.ts +0 -5
- package/test/fixtures/typescript-plugin-nocompile-enabled/tsconfig.json +0 -22
- package/test/fixtures/typescript-plugin-nocompile-string/platformatic.service.json +0 -16
- package/test/fixtures/typescript-plugin-nocompile-string/plugin.ts +0 -5
- package/test/fixtures/typescript-plugin-nocompile-string/tsconfig.json +0 -22
- package/test/fixtures/typescript-plugin-string/platformatic.service.json +0 -16
- package/test/fixtures/typescript-plugin-string/plugin.ts +0 -5
- package/test/fixtures/typescript-plugin-string/tsconfig.json +0 -22
- package/test/fixtures/undici-plugin.js +0 -15
- package/test/graphql.test.js +0 -219
- package/test/healthcheck.test.js +0 -92
- package/test/helper.js +0 -30
- package/test/https.test.js +0 -64
- package/test/lambda.test.js +0 -103
- package/test/load-and-reload-files.test.js +0 -180
- package/test/load-plugin.test.js +0 -67
- package/test/metrics.test.js +0 -220
- package/test/routes.test.js +0 -230
- package/test/schema.test.js +0 -12
- package/test/tap-parallel-ok +0 -0
- package/test/telemetry.test.js +0 -87
- package/test/utils.test.js +0 -37
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const { isKeyEnabled } = require('@platformatic/utils')
|
|
4
4
|
const { readFile } = require('fs/promises')
|
|
5
|
-
const {
|
|
5
|
+
const { join } = require('path')
|
|
6
6
|
|
|
7
7
|
const compiler = require('./lib/compile')
|
|
8
8
|
const setupCors = require('./lib/plugins/cors')
|
|
@@ -108,7 +108,7 @@ platformaticService.configManagerConfig = {
|
|
|
108
108
|
let outDir = typescript.outDir
|
|
109
109
|
if (outDir === undefined) {
|
|
110
110
|
let tsConfigFile = typescript.tsConfigFile || 'tsconfig.json'
|
|
111
|
-
tsConfigFile = join(
|
|
111
|
+
tsConfigFile = join(this.dirname, tsConfigFile)
|
|
112
112
|
try {
|
|
113
113
|
const tsConfig = JSON.parse(await readFile(tsConfigFile, 'utf8'))
|
|
114
114
|
outDir = tsConfig.compilerOptions.outDir
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/service",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"pino-pretty": "^10.0.0",
|
|
66
66
|
"rfdc": "^1.3.0",
|
|
67
67
|
"ua-parser-js": "^1.0.35",
|
|
68
|
-
"@platformatic/client": "0.
|
|
69
|
-
"@platformatic/config": "0.
|
|
70
|
-
"@platformatic/swagger-ui-theme": "0.
|
|
71
|
-
"@platformatic/utils": "0.
|
|
72
|
-
"@platformatic/telemetry": "0.
|
|
68
|
+
"@platformatic/client": "0.46.2",
|
|
69
|
+
"@platformatic/config": "0.46.2",
|
|
70
|
+
"@platformatic/swagger-ui-theme": "0.46.2",
|
|
71
|
+
"@platformatic/utils": "0.46.2",
|
|
72
|
+
"@platformatic/telemetry": "0.46.2"
|
|
73
73
|
},
|
|
74
74
|
"standard": {
|
|
75
75
|
"ignore": [
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"server": {
|
|
3
|
-
"hostname": "127.0.0.1",
|
|
4
|
-
"port": 0,
|
|
5
|
-
"logger": {
|
|
6
|
-
"level": "info",
|
|
7
|
-
"name": "hello server"
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
"plugins": {
|
|
11
|
-
"paths": ["./plugin.js"]
|
|
12
|
-
},
|
|
13
|
-
"service": {
|
|
14
|
-
"openapi": true
|
|
15
|
-
},
|
|
16
|
-
"metrics": false,
|
|
17
|
-
"watch": false
|
|
18
|
-
}
|
package/fixtures/hello/plugin.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"server": {
|
|
3
|
-
"hostname": "127.0.0.1",
|
|
4
|
-
"port": 0,
|
|
5
|
-
"logger": {
|
|
6
|
-
"level": "warn",
|
|
7
|
-
"name": "hello server"
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
"plugins": {
|
|
11
|
-
"paths": ["./plugin.js"]
|
|
12
|
-
},
|
|
13
|
-
"service": {
|
|
14
|
-
"openapi": true
|
|
15
|
-
},
|
|
16
|
-
"metrics": false,
|
|
17
|
-
"watch": false
|
|
18
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const pltClient = require('@platformatic/client')
|
|
4
|
-
const { join } = require('path')
|
|
5
|
-
|
|
6
|
-
async function generateHelloClientPlugin (app, opts) {
|
|
7
|
-
app.register(pltClient, {
|
|
8
|
-
type: 'openapi',
|
|
9
|
-
name: 'hello',
|
|
10
|
-
path: join(__dirname, 'hello.openapi.json'),
|
|
11
|
-
url: opts.url
|
|
12
|
-
})
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
generateHelloClientPlugin[Symbol.for('plugin-meta')] = {
|
|
16
|
-
name: 'hello OpenAPI Client'
|
|
17
|
-
}
|
|
18
|
-
generateHelloClientPlugin[Symbol.for('skip-override')] = true
|
|
19
|
-
|
|
20
|
-
module.exports = generateHelloClientPlugin
|
|
21
|
-
module.exports.default = generateHelloClientPlugin
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { FastifyPluginAsync } from 'fastify'
|
|
2
|
-
|
|
3
|
-
interface GetRequest {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
interface GetResponse {
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface Hello {
|
|
10
|
-
get(req: GetRequest): Promise<GetResponse>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type HelloPlugin = FastifyPluginAsync<NonNullable<hello.HelloOptions>>
|
|
14
|
-
|
|
15
|
-
declare module 'fastify' {
|
|
16
|
-
interface FastifyInstance {
|
|
17
|
-
'hello': Hello;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface FastifyRequest {
|
|
21
|
-
'hello': Hello;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
declare namespace hello {
|
|
26
|
-
export interface HelloOptions {
|
|
27
|
-
url: string
|
|
28
|
-
}
|
|
29
|
-
export const hello: HelloPlugin;
|
|
30
|
-
export { hello as default };
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
declare function hello(...params: Parameters<HelloPlugin>): ReturnType<HelloPlugin>;
|
|
34
|
-
export = hello;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.3",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Platformatic",
|
|
5
|
-
"description": "This is a service built on top of Platformatic",
|
|
6
|
-
"version": "1.0.0"
|
|
7
|
-
},
|
|
8
|
-
"components": {
|
|
9
|
-
"schemas": {}
|
|
10
|
-
},
|
|
11
|
-
"paths": {
|
|
12
|
-
"/": {
|
|
13
|
-
"get": {
|
|
14
|
-
"responses": {
|
|
15
|
-
"200": {
|
|
16
|
-
"description": "Default Response"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"server": {
|
|
3
|
-
"hostname": "127.0.0.1",
|
|
4
|
-
"port": 0,
|
|
5
|
-
"logger": {
|
|
6
|
-
"level": "warn",
|
|
7
|
-
"name": "hello client"
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
"plugins": {
|
|
11
|
-
"paths": ["./plugin.js"]
|
|
12
|
-
},
|
|
13
|
-
"clients": [{
|
|
14
|
-
"path": "hello",
|
|
15
|
-
"url": "{PLT_CLIENT_URL}"
|
|
16
|
-
}],
|
|
17
|
-
"metrics": false,
|
|
18
|
-
"watch": false
|
|
19
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const pltClient = require('@platformatic/client')
|
|
4
|
-
const { join } = require('path')
|
|
5
|
-
|
|
6
|
-
async function generateHelloClientPlugin (app, opts) {
|
|
7
|
-
app.register(pltClient, {
|
|
8
|
-
type: 'openapi',
|
|
9
|
-
name: 'hello',
|
|
10
|
-
path: join(__dirname, 'hello.openapi.json'),
|
|
11
|
-
url: opts.url
|
|
12
|
-
})
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
generateHelloClientPlugin[Symbol.for('plugin-meta')] = {
|
|
16
|
-
name: 'hello OpenAPI Client'
|
|
17
|
-
}
|
|
18
|
-
generateHelloClientPlugin[Symbol.for('skip-override')] = true
|
|
19
|
-
|
|
20
|
-
module.exports = generateHelloClientPlugin
|
|
21
|
-
module.exports.default = generateHelloClientPlugin
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { FastifyPluginAsync } from 'fastify'
|
|
2
|
-
|
|
3
|
-
interface GetRequest {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
interface GetResponse {
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface Hello {
|
|
10
|
-
get(req: GetRequest): Promise<GetResponse>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type HelloPlugin = FastifyPluginAsync<NonNullable<hello.HelloOptions>>
|
|
14
|
-
|
|
15
|
-
declare module 'fastify' {
|
|
16
|
-
interface FastifyInstance {
|
|
17
|
-
'hello': Hello;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface FastifyRequest {
|
|
21
|
-
'hello': Hello;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
declare namespace hello {
|
|
26
|
-
export interface HelloOptions {
|
|
27
|
-
url: string
|
|
28
|
-
}
|
|
29
|
-
export const hello: HelloPlugin;
|
|
30
|
-
export { hello as default };
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
declare function hello(...params: Parameters<HelloPlugin>): ReturnType<HelloPlugin>;
|
|
34
|
-
export = hello;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.3",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Platformatic",
|
|
5
|
-
"description": "This is a service built on top of Platformatic",
|
|
6
|
-
"version": "1.0.0"
|
|
7
|
-
},
|
|
8
|
-
"components": {
|
|
9
|
-
"schemas": {}
|
|
10
|
-
},
|
|
11
|
-
"paths": {
|
|
12
|
-
"/": {
|
|
13
|
-
"get": {
|
|
14
|
-
"responses": {
|
|
15
|
-
"200": {
|
|
16
|
-
"description": "Default Response"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"server": {
|
|
3
|
-
"hostname": "127.0.0.1",
|
|
4
|
-
"port": 0,
|
|
5
|
-
"logger": {
|
|
6
|
-
"level": "warn",
|
|
7
|
-
"name": "hello client ts"
|
|
8
|
-
},
|
|
9
|
-
"pluginTimeout": 30000
|
|
10
|
-
},
|
|
11
|
-
"plugins": {
|
|
12
|
-
"paths": ["./plugin.ts"],
|
|
13
|
-
"typescript": true
|
|
14
|
-
},
|
|
15
|
-
"clients": [{
|
|
16
|
-
"path": "hello",
|
|
17
|
-
"url": "{PLT_CLIENT_URL}"
|
|
18
|
-
}],
|
|
19
|
-
"metrics": false,
|
|
20
|
-
"watch": false
|
|
21
|
-
}
|
|
@@ -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,34 +0,0 @@
|
|
|
1
|
-
import { FastifyPluginAsync } from 'fastify'
|
|
2
|
-
|
|
3
|
-
interface GetRequest {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
interface GetResponse {
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface Hello {
|
|
10
|
-
get(req: GetRequest): Promise<GetResponse>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type HelloPlugin = FastifyPluginAsync<NonNullable<hello.HelloOptions>>
|
|
14
|
-
|
|
15
|
-
declare module 'fastify' {
|
|
16
|
-
interface FastifyInstance {
|
|
17
|
-
'hello': Hello;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface FastifyRequest {
|
|
21
|
-
'hello': Hello;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
declare namespace hello {
|
|
26
|
-
export interface HelloOptions {
|
|
27
|
-
url: string
|
|
28
|
-
}
|
|
29
|
-
export const hello: HelloPlugin;
|
|
30
|
-
export { hello as default };
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
declare function hello(...params: Parameters<HelloPlugin>): ReturnType<HelloPlugin>;
|
|
34
|
-
export = hello;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.3",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Platformatic",
|
|
5
|
-
"description": "This is a service built on top of Platformatic",
|
|
6
|
-
"version": "1.0.0"
|
|
7
|
-
},
|
|
8
|
-
"components": {
|
|
9
|
-
"schemas": {}
|
|
10
|
-
},
|
|
11
|
-
"paths": {
|
|
12
|
-
"/": {
|
|
13
|
-
"get": {
|
|
14
|
-
"responses": {
|
|
15
|
-
"200": {
|
|
16
|
-
"description": "Default Response"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"server": {
|
|
3
|
-
"hostname": "127.0.0.1",
|
|
4
|
-
"port": 0,
|
|
5
|
-
"logger": {
|
|
6
|
-
"level": "warn",
|
|
7
|
-
"name": "hello client ts"
|
|
8
|
-
},
|
|
9
|
-
"pluginTimeout": 30000
|
|
10
|
-
},
|
|
11
|
-
"plugins": {
|
|
12
|
-
"paths": ["./plugin.ts"],
|
|
13
|
-
"typescript": true
|
|
14
|
-
},
|
|
15
|
-
"clients": [{
|
|
16
|
-
"schema": "./hello.openapi.json",
|
|
17
|
-
"name": "hello",
|
|
18
|
-
"type": "openapi",
|
|
19
|
-
"url": "{PLT_CLIENT_URL}"
|
|
20
|
-
}],
|
|
21
|
-
"metrics": false,
|
|
22
|
-
"watch": false
|
|
23
|
-
}
|
|
@@ -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,34 +0,0 @@
|
|
|
1
|
-
import { FastifyPluginAsync } from 'fastify'
|
|
2
|
-
|
|
3
|
-
interface GetRequest {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
interface GetResponse {
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface Hello {
|
|
10
|
-
get(req: GetRequest): Promise<GetResponse>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type HelloPlugin = FastifyPluginAsync<NonNullable<hello.HelloOptions>>
|
|
14
|
-
|
|
15
|
-
declare module 'fastify' {
|
|
16
|
-
interface FastifyInstance {
|
|
17
|
-
'hello': Hello;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface FastifyRequest {
|
|
21
|
-
'hello': Hello;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
declare namespace hello {
|
|
26
|
-
export interface HelloOptions {
|
|
27
|
-
url: string
|
|
28
|
-
}
|
|
29
|
-
export const hello: HelloPlugin;
|
|
30
|
-
export { hello as default };
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
declare function hello(...params: Parameters<HelloPlugin>): ReturnType<HelloPlugin>;
|
|
34
|
-
export = hello;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.3",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Platformatic",
|
|
5
|
-
"description": "This is a service built on top of Platformatic",
|
|
6
|
-
"version": "1.0.0"
|
|
7
|
-
},
|
|
8
|
-
"components": {
|
|
9
|
-
"schemas": {}
|
|
10
|
-
},
|
|
11
|
-
"paths": {
|
|
12
|
-
"/": {
|
|
13
|
-
"get": {
|
|
14
|
-
"responses": {
|
|
15
|
-
"200": {
|
|
16
|
-
"description": "Default Response"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"server": {
|
|
3
|
-
"hostname": "127.0.0.1",
|
|
4
|
-
"port": 0,
|
|
5
|
-
"logger": {
|
|
6
|
-
"level": "warn",
|
|
7
|
-
"name": "hello client"
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
"plugins": {
|
|
11
|
-
"paths": ["./plugin.js"]
|
|
12
|
-
},
|
|
13
|
-
"clients": [{
|
|
14
|
-
"schema": "./hello.openapi.json",
|
|
15
|
-
"name": "hello",
|
|
16
|
-
"type": "openapi",
|
|
17
|
-
"url": "{PLT_CLIENT_URL}"
|
|
18
|
-
}],
|
|
19
|
-
"metrics": false,
|
|
20
|
-
"watch": false
|
|
21
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"server": {
|
|
3
|
-
"hostname": "127.0.0.1",
|
|
4
|
-
"port": 0,
|
|
5
|
-
"logger": {
|
|
6
|
-
"level": "info"
|
|
7
|
-
},
|
|
8
|
-
"https": {
|
|
9
|
-
"cert": "-----BEGIN CERTIFICATE-----\nMIIERDCCAyygAwIBAgIBATANBgkqhkiG9w0BAQUFADBsMRgwFgYDVQQDEw9iYXNl\nLXZpcnR1YWxib3gxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdHZW9yZ2lhMRAwDgYD\nVQQHEwdBdGxhbnRhMQ0wCwYDVQQKEwROb25lMRAwDgYDVQQLEwdleGFtcGxlMB4X\nDTIzMDQwNzE0MTg0NVoXDTI4MDUwNzA3MDAwMFowbDEYMBYGA1UEAxMPYmFzZS12\naXJ0dWFsYm94MQswCQYDVQQGEwJVUzEQMA4GA1UECBMHR2VvcmdpYTEQMA4GA1UE\nBxMHQXRsYW50YTENMAsGA1UEChMETm9uZTEQMA4GA1UECxMHZXhhbXBsZTCCASIw\nDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKIUVhOE8bskYs4fmUGJsfGyPr6Z\nv+jvYlM16/0nnN94DWHi6XnDNYEAltlhP5GtpL7MIdu4gZE4BZGEOxbMOKMhzOEO\ncYLmQrdsGa00lxQ+lYC9TdN3Qo1p0SeNxALwIEFTYzEqM195cmLx2pKobkRysLMM\nvJQbWQTYblXdFtrryVutK5ipC7Uu/hIFyMQNRZ7qpTLNZtznUyRpYL1U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DjYrshtRm/ByMUvekCY\nIR0+/O6WbNVss4JdUEcGpwECgYB1HxXZgqODI5FtC6UBAa/PXr2vZIwCCzoZiUyi\nMQpAjlULY9JUCmmPqqPSClB67ZxdDp87essSpT9ukNHt2PY6j6o6PIAmK/TGMR+H\new/SnDNWXEfz4GU/xyF/fajCJzEpi51ipeejl98H3w1VOWjjuA/Uo/xZJJuPEQiW\nW9PtnQKBgQDFJYAQNUqiQ8/o3r5qrQ1m+WwDcSjJo0K+y53WQWWOLQvyaitpxBIV\n6HN6YOqB7D1jjceQisSoGITZklKv5d2szsUwk4OrIDgVjTnbffUPjs18r4sttARV\ni11eYjenblw76OAc5shwCKCGXhKDcpq/23VxjghFqbJw25Ou3A1iMA==\n-----END RSA PRIVATE KEY-----"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"plugins": {
|
|
14
|
-
"paths": ["./plugin.js"]
|
|
15
|
-
},
|
|
16
|
-
"service": {
|
|
17
|
-
"openapi": true
|
|
18
|
-
},
|
|
19
|
-
"metrics": false
|
|
20
|
-
}
|
package/fixtures/https/https.crt
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
|
2
|
-
MIIERDCCAyygAwIBAgIBATANBgkqhkiG9w0BAQUFADBsMRgwFgYDVQQDEw9iYXNl
|
|
3
|
-
LXZpcnR1YWxib3gxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdHZW9yZ2lhMRAwDgYD
|
|
4
|
-
VQQHEwdBdGxhbnRhMQ0wCwYDVQQKEwROb25lMRAwDgYDVQQLEwdleGFtcGxlMB4X
|
|
5
|
-
DTIzMDQwNzE0MTg0NVoXDTI4MDUwNzA3MDAwMFowbDEYMBYGA1UEAxMPYmFzZS12
|
|
6
|
-
aXJ0dWFsYm94MQswCQYDVQQGEwJVUzEQMA4GA1UECBMHR2VvcmdpYTEQMA4GA1UE
|
|
7
|
-
BxMHQXRsYW50YTENMAsGA1UEChMETm9uZTEQMA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