@netlify/build 20.3.2 → 22.0.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.1",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"main": "src/core/main.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"@netlify/cache-utils": "^3.0.0",
|
|
58
58
|
"@netlify/config": "^16.0.0",
|
|
59
59
|
"@netlify/functions-utils": "^3.0.0",
|
|
60
|
-
"@netlify/git-utils": "^
|
|
60
|
+
"@netlify/git-utils": "^4.0.0",
|
|
61
61
|
"@netlify/plugin-edge-handlers": "^3.0.0",
|
|
62
62
|
"@netlify/plugins-list": "^6.2.0",
|
|
63
|
-
"@netlify/run-utils": "^
|
|
63
|
+
"@netlify/run-utils": "^4.0.0",
|
|
64
64
|
"@netlify/zip-it-and-ship-it": "^5.2.0",
|
|
65
65
|
"@sindresorhus/slugify": "^1.1.0",
|
|
66
66
|
"ansi-escapes": "^4.3.2",
|
package/src/plugins/child/run.js
CHANGED
|
@@ -13,7 +13,7 @@ const run = async function (
|
|
|
13
13
|
) {
|
|
14
14
|
const method = methods[event]
|
|
15
15
|
const runState = {}
|
|
16
|
-
const utils = getUtils({ event, constants, runState })
|
|
16
|
+
const utils = await getUtils({ event, constants, runState })
|
|
17
17
|
const netlifyConfigCopy = cloneNetlifyConfig(netlifyConfig)
|
|
18
18
|
const runOptions = { utils, constants, inputs, netlifyConfig: netlifyConfigCopy, packageJson, error }
|
|
19
19
|
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
const { bindOpts: cacheBindOpts } = require('@netlify/cache-utils')
|
|
4
4
|
const { add: functionsAdd, list: functionsList, listAll: functionsListAll } = require('@netlify/functions-utils')
|
|
5
|
-
const getGitUtils = require('@netlify/git-utils')
|
|
6
|
-
const run = require('@netlify/run-utils')
|
|
7
5
|
|
|
8
6
|
const { failBuild, failPlugin, cancelBuild, failPluginWithWarning } = require('../error')
|
|
9
7
|
const { isSoftFailEvent } = require('../events')
|
|
@@ -11,8 +9,15 @@ const { isSoftFailEvent } = require('../events')
|
|
|
11
9
|
const { addLazyProp } = require('./lazy')
|
|
12
10
|
const { show } = require('./status')
|
|
13
11
|
|
|
12
|
+
const gitUtilsPromise = import('@netlify/git-utils')
|
|
13
|
+
const runUtilsPromise = import('@netlify/run-utils')
|
|
14
|
+
|
|
14
15
|
// Retrieve the `utils` argument.
|
|
15
|
-
const getUtils = function ({ event, constants: { FUNCTIONS_SRC, INTERNAL_FUNCTIONS_SRC, CACHE_DIR }, runState }) {
|
|
16
|
+
const getUtils = async function ({ event, constants: { FUNCTIONS_SRC, INTERNAL_FUNCTIONS_SRC, CACHE_DIR }, runState }) {
|
|
17
|
+
const [{ getGitUtils }, { run, runCommand }] = await Promise.all([gitUtilsPromise, runUtilsPromise])
|
|
18
|
+
// eslint-disable-next-line fp/no-mutation
|
|
19
|
+
run.command = runCommand
|
|
20
|
+
|
|
16
21
|
const build = getBuildUtils(event)
|
|
17
22
|
const cache = getCacheUtils(CACHE_DIR)
|
|
18
23
|
const functions = getFunctionsUtils(FUNCTIONS_SRC, INTERNAL_FUNCTIONS_SRC)
|