Skip to content

Commit b863c14

Browse files
Add typings for configurations (#498)
Add missing configurations property to plugin metadata type
1 parent d522a59 commit b863c14

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

packages/gasket-plugin-metadata/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# `@gasket/plugin-metadata`
22

3+
- Add missing `configurations` property to plugin metadata type
4+
35
### 6.35.0
46

57
- Fix package object type ([#489])

packages/gasket-plugin-metadata/lib/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ export interface PluginData extends ModuleData {
4040
/** App files and directories used by plugin */
4141
structures?: Array<DetailData>,
4242

43+
/** Configuration options for gasket.config.js */
44+
configurations?: Array<DetailData & { type: 'object' }>
45+
4346
/** Description of lifecycles invoked by plugin */
4447
lifecycles?: Array<LifecycleData>,
4548

packages/gasket-typescript-tests/test/plugin-metadata.spec.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ describe('@gasket/plugin-metadata', () => {
2323
});
2424
});
2525

26-
it('adds a manifest property to Gasket', () => {
27-
const metadata: SlimGasket = {
26+
it('adds a metadata property to Gasket', () => {
27+
const gasket1: SlimGasket = {
2828
metadata: {
2929
app: {
3030
name: 'example',
@@ -34,13 +34,26 @@ describe('@gasket/plugin-metadata', () => {
3434
name: 'example'
3535
}
3636
},
37-
plugins: [],
37+
plugins: [
38+
{
39+
module: {},
40+
name: '@mock/gasket-plugin-x',
41+
configurations: [
42+
{
43+
name: 'configX',
44+
description: 'Configures the X plugin',
45+
type: 'object',
46+
link: 'https://some.docs.url/'
47+
}
48+
]
49+
}
50+
],
3851
presets: [],
3952
modules: []
4053
}
4154
};
4255

43-
const metadata2: SlimGasket = {
56+
const gasket2: SlimGasket = {
4457
metadata: {
4558
app: {
4659
name: 'example',

0 commit comments

Comments
 (0)