Skip to content

Commit

Permalink
Add typings for configurations (#498)
Browse files Browse the repository at this point in the history
Add missing configurations property to plugin metadata type
  • Loading branch information
jpage-godaddy authored Dec 20, 2022
1 parent d522a59 commit b863c14
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/gasket-plugin-metadata/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# `@gasket/plugin-metadata`

- Add missing `configurations` property to plugin metadata type

### 6.35.0

- Fix package object type ([#489])
Expand Down
3 changes: 3 additions & 0 deletions packages/gasket-plugin-metadata/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export interface PluginData extends ModuleData {
/** App files and directories used by plugin */
structures?: Array<DetailData>,

/** Configuration options for gasket.config.js */
configurations?: Array<DetailData & { type: 'object' }>

/** Description of lifecycles invoked by plugin */
lifecycles?: Array<LifecycleData>,

Expand Down
21 changes: 17 additions & 4 deletions packages/gasket-typescript-tests/test/plugin-metadata.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ describe('@gasket/plugin-metadata', () => {
});
});

it('adds a manifest property to Gasket', () => {
const metadata: SlimGasket = {
it('adds a metadata property to Gasket', () => {
const gasket1: SlimGasket = {
metadata: {
app: {
name: 'example',
Expand All @@ -34,13 +34,26 @@ describe('@gasket/plugin-metadata', () => {
name: 'example'
}
},
plugins: [],
plugins: [
{
module: {},
name: '@mock/gasket-plugin-x',
configurations: [
{
name: 'configX',
description: 'Configures the X plugin',
type: 'object',
link: 'https://some.docs.url/'
}
]
}
],
presets: [],
modules: []
}
};

const metadata2: SlimGasket = {
const gasket2: SlimGasket = {
metadata: {
app: {
name: 'example',
Expand Down

0 comments on commit b863c14

Please sign in to comment.