@netlify/config 18.1.2 → 19.0.0-rc
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 +1 -1
- package/src/bin/flags.js +0 -3
- package/src/env/main.js +10 -2
- package/src/events.js +7 -0
- package/src/main.js +1 -3
- package/src/validate/validations.js +0 -3
package/package.json
CHANGED
package/src/bin/flags.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable max-lines */
|
|
2
|
-
|
|
3
1
|
import process from 'process'
|
|
4
2
|
|
|
5
3
|
import filterObj from 'filter-obj'
|
|
@@ -181,4 +179,3 @@ const isUserFlag = function (key, value) {
|
|
|
181
179
|
}
|
|
182
180
|
|
|
183
181
|
const INTERNAL_KEYS = new Set(['help', 'version', '_', '$0'])
|
|
184
|
-
/* eslint-enable max-lines */
|
package/src/env/main.js
CHANGED
|
@@ -53,12 +53,12 @@ export const getEnv = async function ({
|
|
|
53
53
|
|
|
54
54
|
env.set(key, {
|
|
55
55
|
sources: [...envSources, source.key],
|
|
56
|
-
value,
|
|
56
|
+
value: convertToString(value),
|
|
57
57
|
})
|
|
58
58
|
} else {
|
|
59
59
|
env.set(key, {
|
|
60
60
|
sources: [source.key],
|
|
61
|
-
value: source.values[key],
|
|
61
|
+
value: convertToString(source.values[key]),
|
|
62
62
|
})
|
|
63
63
|
}
|
|
64
64
|
})
|
|
@@ -67,6 +67,14 @@ export const getEnv = async function ({
|
|
|
67
67
|
return Object.fromEntries(env)
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
const convertToString = (value) => {
|
|
71
|
+
if (typeof value === 'string') {
|
|
72
|
+
return value
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return value.toString()
|
|
76
|
+
}
|
|
77
|
+
|
|
70
78
|
// Environment variables not set by users, but meant to mimic the production
|
|
71
79
|
// environment.
|
|
72
80
|
const getGeneralEnv = async function ({
|
package/src/events.js
CHANGED
package/src/main.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable max-lines */
|
|
2
1
|
import { getApiClient } from './api/client.js'
|
|
3
2
|
import { getSiteInfo } from './api/site_info.js'
|
|
4
3
|
import { getInitialBase, getBase, addBase } from './base.js'
|
|
@@ -19,7 +18,7 @@ import { parseConfig } from './parse.js'
|
|
|
19
18
|
import { getConfigPath } from './path.js'
|
|
20
19
|
import { getRedirectsPath, addRedirects } from './redirects.js'
|
|
21
20
|
|
|
22
|
-
export { EVENTS } from './events.js'
|
|
21
|
+
export { DEV_EVENTS, EVENTS } from './events.js'
|
|
23
22
|
export { cleanupConfig } from './log/cleanup.js'
|
|
24
23
|
// eslint-disable-next-line import/max-dependencies
|
|
25
24
|
export { updateConfig, restoreConfig } from './mutations/update.js'
|
|
@@ -284,4 +283,3 @@ const resolveFiles = async function ({ config, repositoryRoot, base, baseRelDir
|
|
|
284
283
|
const configB = addBase(configA, baseA)
|
|
285
284
|
return { config: configB, buildDir, base: baseA }
|
|
286
285
|
}
|
|
287
|
-
/* eslint-enable max-lines */
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable max-lines */
|
|
2
|
-
|
|
3
1
|
import CronParser from 'cron-parser'
|
|
4
2
|
import isPlainObj from 'is-plain-obj'
|
|
5
3
|
import validateNpmPackageName from 'validate-npm-package-name'
|
|
@@ -289,4 +287,3 @@ export const POST_NORMALIZE_VALIDATIONS = [
|
|
|
289
287
|
example: () => ({ edge_functions: [{ path: '/hello', function: 'hello' }] }),
|
|
290
288
|
},
|
|
291
289
|
]
|
|
292
|
-
/* eslint-enable max-lines */
|