@netlify/build 18.16.0 → 18.17.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "18.16.0",
3
+ "version": "18.17.0",
4
4
  "description": "Netlify build module",
5
5
  "main": "src/core/main.js",
6
6
  "types": "types/index.d.ts",
@@ -2,7 +2,7 @@ import { JSONValue } from '../utils/json_value'
2
2
 
3
3
  interface NetlifyPlugin {
4
4
  package: string
5
- inputs: JSONValue
5
+ inputs: Partial<Record<string, JSONValue>>
6
6
  }
7
7
 
8
8
  /* eslint-disable camelcase -- some properties are named in snake case in this API */
@@ -1,7 +1,8 @@
1
1
  import { NetlifyConfig } from './config/netlify_config'
2
2
  import { NetlifyPluginUtils } from './options/netlify_plugin_utils'
3
+ import { JSONValue } from './utils/json_value'
3
4
 
4
- export interface NetlifyPluginOptions {
5
+ export interface NetlifyPluginOptions<TInputs extends Record<string, JSONValue> = Partial<Record<string, JSONValue>>> {
5
6
  constants: {
6
7
  /**
7
8
  * path to the Netlify configuration file.
@@ -42,7 +43,7 @@ export interface NetlifyPluginOptions {
42
43
  /**
43
44
  * If your plugin requires additional values from the user, you can specify these requirements in an `inputs` array in the plugin’s [`manifest.yml` file](https://docs.netlify.com/configure-builds/build-plugins/create-plugins/#anatomy-of-a-plugin).
44
45
  */
45
- inputs: Partial<Record<string, string>>
46
+ inputs: TInputs
46
47
  /**
47
48
  * @see https://docs.netlify.com/configure-builds/build-plugins/create-plugins/#netlifyconfig
48
49
  */
@@ -51,6 +52,6 @@ export interface NetlifyPluginOptions {
51
52
  * When an event handler executes, the contents of the `package.json` in a site's base directory get passed to a plugin.
52
53
  * The data fields are normalized to prevent plugin errors. If the site has no `package.json`, the argument is an empty object.
53
54
  */
54
- packageJson: Partial<Record<string, string>>
55
+ packageJson: Partial<Record<string, JSONValue>>
55
56
  utils: NetlifyPluginUtils
56
57
  }