@netlify/config 18.1.3 → 18.2.1
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/env/main.js +14 -2
- package/src/events.js +7 -0
- package/src/main.js +1 -1
package/package.json
CHANGED
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,18 @@ export const getEnv = async function ({
|
|
|
67
67
|
return Object.fromEntries(env)
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
const convertToString = (value) => {
|
|
71
|
+
if (value === null || value === undefined) {
|
|
72
|
+
return value
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (typeof value === 'string') {
|
|
76
|
+
return value
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return value.toString()
|
|
80
|
+
}
|
|
81
|
+
|
|
70
82
|
// Environment variables not set by users, but meant to mimic the production
|
|
71
83
|
// environment.
|
|
72
84
|
const getGeneralEnv = async function ({
|
package/src/events.js
CHANGED
package/src/main.js
CHANGED
|
@@ -18,7 +18,7 @@ import { parseConfig } from './parse.js'
|
|
|
18
18
|
import { getConfigPath } from './path.js'
|
|
19
19
|
import { getRedirectsPath, addRedirects } from './redirects.js'
|
|
20
20
|
|
|
21
|
-
export { EVENTS } from './events.js'
|
|
21
|
+
export { DEV_EVENTS, EVENTS } from './events.js'
|
|
22
22
|
export { cleanupConfig } from './log/cleanup.js'
|
|
23
23
|
// eslint-disable-next-line import/max-dependencies
|
|
24
24
|
export { updateConfig, restoreConfig } from './mutations/update.js'
|