From 076d8cafb4f6b8bf3928250d9a0a695dbee522c3 Mon Sep 17 00:00:00 2001 From: Gareth Parker Date: Thu, 19 Apr 2018 20:56:31 +0100 Subject: [PATCH 1/5] Glue - Fix to plugins --- types/glue/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/glue/index.d.ts b/types/glue/index.d.ts index 8e710d233a..d1bf010ffe 100644 --- a/types/glue/index.d.ts +++ b/types/glue/index.d.ts @@ -24,7 +24,7 @@ export interface Plugin { export interface Manifest { server: ServerOptions; register?: { - plugins: Plugin[] + plugins: string | Plugin[] }; } From f9810f1caa738e724cfdc07533c139486cbf5146 Mon Sep 17 00:00:00 2001 From: Gareth Parker Date: Fri, 20 Apr 2018 21:25:56 +0100 Subject: [PATCH 2/5] Plugins can now be string arrays rather that just strings --- types/glue/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/glue/index.d.ts b/types/glue/index.d.ts index d1bf010ffe..f347e69746 100644 --- a/types/glue/index.d.ts +++ b/types/glue/index.d.ts @@ -24,7 +24,7 @@ export interface Plugin { export interface Manifest { server: ServerOptions; register?: { - plugins: string | Plugin[] + plugins: string[] | Plugin[] }; } From 9d85152b0c31868a4adf4d06e62a310fc18080a5 Mon Sep 17 00:00:00 2001 From: Gareth Parker Date: Sat, 12 May 2018 15:41:54 +0100 Subject: [PATCH 3/5] Glue - Fixed compose to return promise --- types/glue/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/glue/index.d.ts b/types/glue/index.d.ts index f347e69746..71c7714827 100644 --- a/types/glue/index.d.ts +++ b/types/glue/index.d.ts @@ -28,4 +28,4 @@ export interface Manifest { }; } -export function compose(manifest: Manifest, options?: Options): Server; +export function compose(manifest: Manifest, options?: Options): Promise; From 64d8a682dc73cd0932e8c889a08169ed9a4cb201 Mon Sep 17 00:00:00 2001 From: Gareth Parker Date: Sat, 12 May 2018 15:47:07 +0100 Subject: [PATCH 4/5] Glue - Updated Test --- types/glue/glue-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/glue/glue-tests.ts b/types/glue/glue-tests.ts index 7ac309352c..577434661a 100644 --- a/types/glue/glue-tests.ts +++ b/types/glue/glue-tests.ts @@ -7,6 +7,7 @@ const manifest: Glue.Manifest = { }, register: { plugins: [ + "test-plugin", { plugin: "./test", routes: { From fc3ff10ba010411871da782f24a5b2d4b5286d6c Mon Sep 17 00:00:00 2001 From: Gareth Parker Date: Sat, 12 May 2018 17:16:18 +0100 Subject: [PATCH 5/5] Glue - Added union types for plugins --- types/glue/glue-tests.ts | 4 ++-- types/glue/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/glue/glue-tests.ts b/types/glue/glue-tests.ts index 577434661a..dd400697e6 100644 --- a/types/glue/glue-tests.ts +++ b/types/glue/glue-tests.ts @@ -7,9 +7,9 @@ const manifest: Glue.Manifest = { }, register: { plugins: [ - "test-plugin", + "./test-plugin.js", { - plugin: "./test", + plugin: "./test.js", routes: { prefix: "test" } diff --git a/types/glue/index.d.ts b/types/glue/index.d.ts index 71c7714827..060d729d66 100644 --- a/types/glue/index.d.ts +++ b/types/glue/index.d.ts @@ -24,7 +24,7 @@ export interface Plugin { export interface Manifest { server: ServerOptions; register?: { - plugins: string[] | Plugin[] + plugins: string[] | Plugin[] | Array<(string|Plugin)> }; }