@netlify/config 24.3.0 → 24.4.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/lib/files.js CHANGED
@@ -18,6 +18,7 @@ const FILE_PATH_CONFIG_PROPS = [
18
18
  'functions.*.deno_import_map',
19
19
  'build.publish',
20
20
  'build.edge_functions',
21
+ 'db.migrations.path',
21
22
  ];
22
23
  /**
23
24
  * Make configuration paths relative to `buildDir` and converts them to
@@ -94,6 +95,11 @@ const DEFAULT_PATHS = [
94
95
  defaultPath: 'netlify/edge-functions',
95
96
  propName: 'build.edge_functions',
96
97
  },
98
+ {
99
+ getConfig: (directory) => ({ db: { migrations: { path: directory } } }),
100
+ defaultPath: 'netlify/db/migrations',
101
+ propName: 'db.migrations.path',
102
+ },
97
103
  ];
98
104
  const addDefaultPath = ({ repositoryRoot, packagePath, baseRel, defaultPath, getConfig, propName, }) => {
99
105
  const absolutePath = resolvePath(repositoryRoot, join(baseRel, packagePath || ''), defaultPath, propName);
@@ -96,6 +96,17 @@ export const PRE_NORMALIZE_VALIDATIONS: ({
96
96
  function: string;
97
97
  }[];
98
98
  };
99
+ } | {
100
+ property: string;
101
+ check: typeof isPlainObj;
102
+ message: string;
103
+ example: () => {
104
+ db: {
105
+ migrations: {
106
+ path: string;
107
+ };
108
+ };
109
+ };
99
110
  })[];
100
111
  export const POST_NORMALIZE_VALIDATIONS: ({
101
112
  example: () => {
@@ -294,5 +305,16 @@ export const POST_NORMALIZE_VALIDATIONS: ({
294
305
  property: string;
295
306
  check: (value: any) => value is string;
296
307
  message: string;
308
+ } | {
309
+ property: string;
310
+ check: (value: any) => value is string;
311
+ message: string;
312
+ example: () => {
313
+ db: {
314
+ migrations: {
315
+ path: string;
316
+ };
317
+ };
318
+ };
297
319
  })[];
298
320
  import isPlainObj from 'is-plain-obj';
@@ -104,6 +104,18 @@ export const PRE_NORMALIZE_VALIDATIONS = [
104
104
  ],
105
105
  }),
106
106
  },
107
+ {
108
+ property: 'db',
109
+ check: isPlainObj,
110
+ message: 'must be a plain object.',
111
+ example: () => ({ db: { migrations: { path: 'netlify/db/migrations' } } }),
112
+ },
113
+ {
114
+ property: 'db.migrations',
115
+ check: isPlainObj,
116
+ message: 'must be a plain object.',
117
+ example: () => ({ db: { migrations: { path: 'netlify/db/migrations' } } }),
118
+ },
107
119
  ];
108
120
  const EXAMPLE_PORT = 80;
109
121
  // Validations done after normalization
@@ -252,5 +264,11 @@ export const POST_NORMALIZE_VALIDATIONS = [
252
264
  functions: { directory: 'my-functions' },
253
265
  }),
254
266
  },
267
+ {
268
+ property: 'db.migrations.path',
269
+ check: isString,
270
+ message: 'must be a string.',
271
+ example: () => ({ db: { migrations: { path: 'netlify/db/migrations' } } }),
272
+ },
255
273
  ...edgeFunctionValidations,
256
274
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/config",
3
- "version": "24.3.0",
3
+ "version": "24.4.0",
4
4
  "description": "Netlify config module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -59,7 +59,7 @@
59
59
  "license": "MIT",
60
60
  "dependencies": {
61
61
  "@iarna/toml": "^2.2.5",
62
- "@netlify/api": "^14.0.13",
62
+ "@netlify/api": "^14.0.14",
63
63
  "@netlify/headers-parser": "^9.0.2",
64
64
  "@netlify/redirect-parser": "^15.0.3",
65
65
  "chalk": "^5.0.0",
@@ -96,5 +96,5 @@
96
96
  "engines": {
97
97
  "node": ">=18.14.0"
98
98
  },
99
- "gitHead": "b361a613025153da728f16946fb3e2f784127d1a"
99
+ "gitHead": "7afb85bef616ee25b81b3bd5728333dbbd076725"
100
100
  }