@emulsify/cli 1.4.2 → 1.6.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/README.md +5 -1
- package/dist/handlers/componentInstall.js +8 -4
- package/dist/handlers/init.js +1 -1
- package/dist/handlers/systemInstall.js +3 -2
- package/dist/index.js +1 -0
- package/dist/node_modules/.package-lock.json +19 -28
- package/dist/node_modules/@types/node/README.md +3 -3
- package/dist/node_modules/@types/node/async_hooks.d.ts +1 -1
- package/dist/node_modules/@types/node/buffer.d.ts +64 -0
- package/dist/node_modules/@types/node/crypto.d.ts +28 -4
- package/dist/node_modules/@types/node/globals.d.ts +141 -8
- package/dist/node_modules/@types/node/http.d.ts +3 -1
- package/dist/node_modules/@types/node/http2.d.ts +4 -3
- package/dist/node_modules/@types/node/index.d.ts +0 -1
- package/dist/node_modules/@types/node/inspector.d.ts +1 -1
- package/dist/node_modules/@types/node/net.d.ts +15 -3
- package/dist/node_modules/@types/node/package.json +3 -8
- package/dist/node_modules/@types/node/process.d.ts +1 -1
- package/dist/node_modules/@types/node/stream.d.ts +8 -8
- package/dist/node_modules/@types/node/timers.d.ts +3 -3
- package/dist/node_modules/@types/node/tls.d.ts +2 -1
- package/dist/node_modules/@types/node/url.d.ts +31 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/README.md +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.d.ts +1 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js +9 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js +8 -9
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/parse.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/serialize.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.d.ts +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.js +3 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.d.ts +5 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js +13 -11
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.d.ts +4 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.js +20 -17
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js +6 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js.map +1 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/standalone/index.js +8 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/standalone/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/index.d.ts +6 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/jtd-schema.d.ts +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/ref.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js +10 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/ref.js +3 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js +4 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/codegen/code.ts +8 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/index.ts +8 -8
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/jtd/parse.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/jtd/serialize.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/ref_error.ts +4 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/resolve.ts +15 -12
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/validate/index.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/core.ts +9 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/runtime/uri.ts +6 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/standalone/index.ts +9 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/index.ts +7 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/json-schema.ts +1 -4
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/jtd-schema.ts +4 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/core/ref.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/discriminator/index.ts +11 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/jtd/ref.ts +3 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/validation/enum.ts +5 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/package.json +5 -3
- package/dist/node_modules/debug/README.md +3 -0
- package/dist/node_modules/debug/package.json +1 -1
- package/dist/node_modules/debug/src/common.js +1 -1
- package/dist/node_modules/fs-extra/README.md +3 -5
- package/dist/node_modules/fs-extra/lib/{copy-sync → copy}/copy-sync.js +11 -8
- package/dist/node_modules/fs-extra/lib/copy/copy.js +12 -9
- package/dist/node_modules/fs-extra/lib/copy/index.js +2 -1
- package/dist/node_modules/fs-extra/lib/empty/index.js +10 -19
- package/dist/node_modules/fs-extra/lib/ensure/index.js +15 -15
- package/dist/node_modules/fs-extra/lib/ensure/link.js +10 -7
- package/dist/node_modules/fs-extra/lib/ensure/symlink.js +34 -15
- package/dist/node_modules/fs-extra/lib/fs/index.js +8 -10
- package/dist/node_modules/fs-extra/lib/index.js +1 -12
- package/dist/node_modules/fs-extra/lib/json/output-json-sync.js +1 -1
- package/dist/node_modules/fs-extra/lib/json/output-json.js +1 -1
- package/dist/node_modules/fs-extra/lib/mkdirs/make-dir.js +16 -130
- package/dist/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/dist/node_modules/fs-extra/lib/move/index.js +2 -1
- package/dist/node_modules/fs-extra/lib/{move-sync → move}/move-sync.js +12 -5
- package/dist/node_modules/fs-extra/lib/move/move.js +14 -4
- package/dist/node_modules/fs-extra/lib/{output → output-file}/index.js +0 -0
- package/dist/node_modules/fs-extra/lib/remove/index.js +15 -2
- package/dist/node_modules/fs-extra/lib/util/stat.js +60 -45
- package/dist/node_modules/fs-extra/package.json +7 -10
- package/dist/node_modules/graceful-fs/LICENSE +1 -1
- package/dist/node_modules/graceful-fs/graceful-fs.js +23 -4
- package/dist/node_modules/graceful-fs/package.json +1 -1
- package/dist/node_modules/graceful-fs/polyfills.js +39 -30
- package/dist/node_modules/ramda/dist/ramda.js +4 -4
- package/dist/node_modules/ramda/dist/ramda.min.js +1 -1
- package/dist/node_modules/ramda/es/trim.js +1 -1
- package/dist/node_modules/ramda/package.json +1 -1
- package/dist/node_modules/ramda/src/trim.js +1 -1
- package/dist/package.json +4 -4
- package/dist/schemas/variant.json +28 -5
- package/dist/util/cache/cloneIntoCache.js +1 -7
- package/dist/util/getAvailableStarters.js +1 -1
- package/dist/util/platform/getInitSuccessMessageForPlatform.js +4 -3
- package/dist/util/project/buildComponentDependencyList.js +20 -0
- package/package.json +5 -5
- package/dist/node_modules/at-least-node/LICENSE +0 -6
- package/dist/node_modules/at-least-node/README.md +0 -25
- package/dist/node_modules/at-least-node/index.js +0 -5
- package/dist/node_modules/at-least-node/package.json +0 -32
- package/dist/node_modules/fs-extra/CHANGELOG.md +0 -902
- package/dist/node_modules/fs-extra/lib/copy-sync/index.js +0 -5
- package/dist/node_modules/fs-extra/lib/move-sync/index.js +0 -5
|
@@ -3,27 +3,28 @@
|
|
|
3
3
|
const fs = require('../fs')
|
|
4
4
|
const path = require('path')
|
|
5
5
|
const util = require('util')
|
|
6
|
-
const atLeastNode = require('at-least-node')
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function getStats (src, dest) {
|
|
7
|
+
function getStats (src, dest, opts) {
|
|
8
|
+
const statFunc = opts.dereference
|
|
9
|
+
? (file) => fs.stat(file, { bigint: true })
|
|
10
|
+
: (file) => fs.lstat(file, { bigint: true })
|
|
13
11
|
return Promise.all([
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
statFunc(src),
|
|
13
|
+
statFunc(dest).catch(err => {
|
|
16
14
|
if (err.code === 'ENOENT') return null
|
|
17
15
|
throw err
|
|
18
16
|
})
|
|
19
17
|
]).then(([srcStat, destStat]) => ({ srcStat, destStat }))
|
|
20
18
|
}
|
|
21
19
|
|
|
22
|
-
function getStatsSync (src, dest) {
|
|
20
|
+
function getStatsSync (src, dest, opts) {
|
|
23
21
|
let destStat
|
|
24
|
-
const
|
|
22
|
+
const statFunc = opts.dereference
|
|
23
|
+
? (file) => fs.statSync(file, { bigint: true })
|
|
24
|
+
: (file) => fs.lstatSync(file, { bigint: true })
|
|
25
|
+
const srcStat = statFunc(src)
|
|
25
26
|
try {
|
|
26
|
-
destStat =
|
|
27
|
+
destStat = statFunc(dest)
|
|
27
28
|
} catch (err) {
|
|
28
29
|
if (err.code === 'ENOENT') return { srcStat, destStat: null }
|
|
29
30
|
throw err
|
|
@@ -31,13 +32,30 @@ function getStatsSync (src, dest) {
|
|
|
31
32
|
return { srcStat, destStat }
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
function checkPaths (src, dest, funcName, cb) {
|
|
35
|
-
util.callbackify(getStats)(src, dest, (err, stats) => {
|
|
35
|
+
function checkPaths (src, dest, funcName, opts, cb) {
|
|
36
|
+
util.callbackify(getStats)(src, dest, opts, (err, stats) => {
|
|
36
37
|
if (err) return cb(err)
|
|
37
38
|
const { srcStat, destStat } = stats
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
|
|
40
|
+
if (destStat) {
|
|
41
|
+
if (areIdentical(srcStat, destStat)) {
|
|
42
|
+
const srcBaseName = path.basename(src)
|
|
43
|
+
const destBaseName = path.basename(dest)
|
|
44
|
+
if (funcName === 'move' &&
|
|
45
|
+
srcBaseName !== destBaseName &&
|
|
46
|
+
srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
47
|
+
return cb(null, { srcStat, destStat, isChangingCase: true })
|
|
48
|
+
}
|
|
49
|
+
return cb(new Error('Source and destination must not be the same.'))
|
|
50
|
+
}
|
|
51
|
+
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
52
|
+
return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
|
|
53
|
+
}
|
|
54
|
+
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
55
|
+
return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`))
|
|
56
|
+
}
|
|
40
57
|
}
|
|
58
|
+
|
|
41
59
|
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
|
42
60
|
return cb(new Error(errMsg(src, dest, funcName)))
|
|
43
61
|
}
|
|
@@ -45,11 +63,28 @@ function checkPaths (src, dest, funcName, cb) {
|
|
|
45
63
|
})
|
|
46
64
|
}
|
|
47
65
|
|
|
48
|
-
function checkPathsSync (src, dest, funcName) {
|
|
49
|
-
const { srcStat, destStat } = getStatsSync(src, dest)
|
|
50
|
-
|
|
51
|
-
|
|
66
|
+
function checkPathsSync (src, dest, funcName, opts) {
|
|
67
|
+
const { srcStat, destStat } = getStatsSync(src, dest, opts)
|
|
68
|
+
|
|
69
|
+
if (destStat) {
|
|
70
|
+
if (areIdentical(srcStat, destStat)) {
|
|
71
|
+
const srcBaseName = path.basename(src)
|
|
72
|
+
const destBaseName = path.basename(dest)
|
|
73
|
+
if (funcName === 'move' &&
|
|
74
|
+
srcBaseName !== destBaseName &&
|
|
75
|
+
srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
76
|
+
return { srcStat, destStat, isChangingCase: true }
|
|
77
|
+
}
|
|
78
|
+
throw new Error('Source and destination must not be the same.')
|
|
79
|
+
}
|
|
80
|
+
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
81
|
+
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
|
|
82
|
+
}
|
|
83
|
+
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
84
|
+
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)
|
|
85
|
+
}
|
|
52
86
|
}
|
|
87
|
+
|
|
53
88
|
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
|
54
89
|
throw new Error(errMsg(src, dest, funcName))
|
|
55
90
|
}
|
|
@@ -64,7 +99,7 @@ function checkParentPaths (src, srcStat, dest, funcName, cb) {
|
|
|
64
99
|
const srcParent = path.resolve(path.dirname(src))
|
|
65
100
|
const destParent = path.resolve(path.dirname(dest))
|
|
66
101
|
if (destParent === srcParent || destParent === path.parse(destParent).root) return cb()
|
|
67
|
-
|
|
102
|
+
fs.stat(destParent, { bigint: true }, (err, destStat) => {
|
|
68
103
|
if (err) {
|
|
69
104
|
if (err.code === 'ENOENT') return cb()
|
|
70
105
|
return cb(err)
|
|
@@ -73,9 +108,7 @@ function checkParentPaths (src, srcStat, dest, funcName, cb) {
|
|
|
73
108
|
return cb(new Error(errMsg(src, dest, funcName)))
|
|
74
109
|
}
|
|
75
110
|
return checkParentPaths(src, srcStat, destParent, funcName, cb)
|
|
76
|
-
}
|
|
77
|
-
if (nodeSupportsBigInt) fs.stat(destParent, { bigint: true }, callback)
|
|
78
|
-
else fs.stat(destParent, callback)
|
|
111
|
+
})
|
|
79
112
|
}
|
|
80
113
|
|
|
81
114
|
function checkParentPathsSync (src, srcStat, dest, funcName) {
|
|
@@ -84,7 +117,7 @@ function checkParentPathsSync (src, srcStat, dest, funcName) {
|
|
|
84
117
|
if (destParent === srcParent || destParent === path.parse(destParent).root) return
|
|
85
118
|
let destStat
|
|
86
119
|
try {
|
|
87
|
-
destStat = statSync(destParent)
|
|
120
|
+
destStat = fs.statSync(destParent, { bigint: true })
|
|
88
121
|
} catch (err) {
|
|
89
122
|
if (err.code === 'ENOENT') return
|
|
90
123
|
throw err
|
|
@@ -96,26 +129,7 @@ function checkParentPathsSync (src, srcStat, dest, funcName) {
|
|
|
96
129
|
}
|
|
97
130
|
|
|
98
131
|
function areIdentical (srcStat, destStat) {
|
|
99
|
-
|
|
100
|
-
if (nodeSupportsBigInt || destStat.ino < Number.MAX_SAFE_INTEGER) {
|
|
101
|
-
// definitive answer
|
|
102
|
-
return true
|
|
103
|
-
}
|
|
104
|
-
// Use additional heuristics if we can't use 'bigint'.
|
|
105
|
-
// Different 'ino' could be represented the same if they are >= Number.MAX_SAFE_INTEGER
|
|
106
|
-
// See issue 657
|
|
107
|
-
if (destStat.size === srcStat.size &&
|
|
108
|
-
destStat.mode === srcStat.mode &&
|
|
109
|
-
destStat.nlink === srcStat.nlink &&
|
|
110
|
-
destStat.atimeMs === srcStat.atimeMs &&
|
|
111
|
-
destStat.mtimeMs === srcStat.mtimeMs &&
|
|
112
|
-
destStat.ctimeMs === srcStat.ctimeMs &&
|
|
113
|
-
destStat.birthtimeMs === srcStat.birthtimeMs) {
|
|
114
|
-
// heuristic answer
|
|
115
|
-
return true
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return false
|
|
132
|
+
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev
|
|
119
133
|
}
|
|
120
134
|
|
|
121
135
|
// return true if dest is a subdir of src, otherwise false.
|
|
@@ -135,5 +149,6 @@ module.exports = {
|
|
|
135
149
|
checkPathsSync,
|
|
136
150
|
checkParentPaths,
|
|
137
151
|
checkParentPathsSync,
|
|
138
|
-
isSrcSubdir
|
|
152
|
+
isSrcSubdir,
|
|
153
|
+
areIdentical
|
|
139
154
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fs-extra",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.",
|
|
5
5
|
"engines": {
|
|
6
|
-
"node": ">=
|
|
6
|
+
"node": ">=12"
|
|
7
7
|
},
|
|
8
8
|
"homepage": "https://github.com/jprichardson/node-fs-extra",
|
|
9
9
|
"repository": {
|
|
@@ -37,13 +37,12 @@
|
|
|
37
37
|
"author": "JP Richardson <jprichardson@gmail.com>",
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"at-least-node": "^1.0.0",
|
|
41
40
|
"graceful-fs": "^4.2.0",
|
|
42
41
|
"jsonfile": "^6.0.1",
|
|
43
42
|
"universalify": "^2.0.0"
|
|
44
43
|
},
|
|
45
44
|
"devDependencies": {
|
|
46
|
-
"
|
|
45
|
+
"at-least-node": "^1.0.0",
|
|
47
46
|
"klaw": "^2.1.1",
|
|
48
47
|
"klaw-sync": "^3.0.2",
|
|
49
48
|
"minimist": "^1.1.1",
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
"nyc": "^15.0.0",
|
|
52
51
|
"proxyquire": "^2.0.1",
|
|
53
52
|
"read-dir-files": "^0.1.1",
|
|
54
|
-
"standard": "^
|
|
53
|
+
"standard": "^16.0.3"
|
|
55
54
|
},
|
|
56
55
|
"main": "./lib/index.js",
|
|
57
56
|
"files": [
|
|
@@ -59,12 +58,10 @@
|
|
|
59
58
|
"!lib/**/__tests__/"
|
|
60
59
|
],
|
|
61
60
|
"scripts": {
|
|
62
|
-
"full-ci": "npm run lint && npm run coverage",
|
|
63
|
-
"coverage": "nyc -r lcovonly npm run unit",
|
|
64
|
-
"coveralls": "coveralls < coverage/lcov.info",
|
|
65
61
|
"lint": "standard",
|
|
66
62
|
"test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
|
|
67
63
|
"test": "npm run lint && npm run unit",
|
|
68
|
-
"unit": "node test.js"
|
|
69
|
-
}
|
|
64
|
+
"unit": "nyc node test.js"
|
|
65
|
+
},
|
|
66
|
+
"sideEffects": false
|
|
70
67
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The ISC License
|
|
2
2
|
|
|
3
|
-
Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors
|
|
3
|
+
Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
|
|
4
4
|
|
|
5
5
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
6
|
purpose with or without fee is hereby granted, provided that the above
|
|
@@ -191,16 +191,35 @@ function patch (fs) {
|
|
|
191
191
|
|
|
192
192
|
var fs$readdir = fs.readdir
|
|
193
193
|
fs.readdir = readdir
|
|
194
|
+
var noReaddirOptionVersions = /^v[0-5]\./
|
|
194
195
|
function readdir (path, options, cb) {
|
|
195
196
|
if (typeof options === 'function')
|
|
196
197
|
cb = options, options = null
|
|
197
198
|
|
|
199
|
+
var go$readdir = noReaddirOptionVersions.test(process.version)
|
|
200
|
+
? function go$readdir (path, options, cb, startTime) {
|
|
201
|
+
return fs$readdir(path, fs$readdirCallback(
|
|
202
|
+
path, options, cb, startTime
|
|
203
|
+
))
|
|
204
|
+
}
|
|
205
|
+
: function go$readdir (path, options, cb, startTime) {
|
|
206
|
+
return fs$readdir(path, options, fs$readdirCallback(
|
|
207
|
+
path, options, cb, startTime
|
|
208
|
+
))
|
|
209
|
+
}
|
|
210
|
+
|
|
198
211
|
return go$readdir(path, options, cb)
|
|
199
212
|
|
|
200
|
-
function
|
|
201
|
-
return
|
|
213
|
+
function fs$readdirCallback (path, options, cb, startTime) {
|
|
214
|
+
return function (err, files) {
|
|
202
215
|
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
|
203
|
-
enqueue([
|
|
216
|
+
enqueue([
|
|
217
|
+
go$readdir,
|
|
218
|
+
[path, options, cb],
|
|
219
|
+
err,
|
|
220
|
+
startTime || Date.now(),
|
|
221
|
+
Date.now()
|
|
222
|
+
])
|
|
204
223
|
else {
|
|
205
224
|
if (files && files.sort)
|
|
206
225
|
files.sort()
|
|
@@ -208,7 +227,7 @@ function patch (fs) {
|
|
|
208
227
|
if (typeof cb === 'function')
|
|
209
228
|
cb.call(this, err, files)
|
|
210
229
|
}
|
|
211
|
-
}
|
|
230
|
+
}
|
|
212
231
|
}
|
|
213
232
|
}
|
|
214
233
|
|
|
@@ -71,13 +71,13 @@ function patch (fs) {
|
|
|
71
71
|
fs.lstatSync = statFixSync(fs.lstatSync)
|
|
72
72
|
|
|
73
73
|
// if lchmod/lchown do not exist, then make them no-ops
|
|
74
|
-
if (!fs.lchmod) {
|
|
74
|
+
if (fs.chmod && !fs.lchmod) {
|
|
75
75
|
fs.lchmod = function (path, mode, cb) {
|
|
76
76
|
if (cb) process.nextTick(cb)
|
|
77
77
|
}
|
|
78
78
|
fs.lchmodSync = function () {}
|
|
79
79
|
}
|
|
80
|
-
if (!fs.lchown) {
|
|
80
|
+
if (fs.chown && !fs.lchown) {
|
|
81
81
|
fs.lchown = function (path, uid, gid, cb) {
|
|
82
82
|
if (cb) process.nextTick(cb)
|
|
83
83
|
}
|
|
@@ -94,32 +94,38 @@ function patch (fs) {
|
|
|
94
94
|
// CPU to a busy looping process, which can cause the program causing the lock
|
|
95
95
|
// contention to be starved of CPU by node, so the contention doesn't resolve.
|
|
96
96
|
if (platform === "win32") {
|
|
97
|
-
fs.rename =
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
backoff
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
97
|
+
fs.rename = typeof fs.rename !== 'function' ? fs.rename
|
|
98
|
+
: (function (fs$rename) {
|
|
99
|
+
function rename (from, to, cb) {
|
|
100
|
+
var start = Date.now()
|
|
101
|
+
var backoff = 0;
|
|
102
|
+
fs$rename(from, to, function CB (er) {
|
|
103
|
+
if (er
|
|
104
|
+
&& (er.code === "EACCES" || er.code === "EPERM")
|
|
105
|
+
&& Date.now() - start < 60000) {
|
|
106
|
+
setTimeout(function() {
|
|
107
|
+
fs.stat(to, function (stater, st) {
|
|
108
|
+
if (stater && stater.code === "ENOENT")
|
|
109
|
+
fs$rename(from, to, CB);
|
|
110
|
+
else
|
|
111
|
+
cb(er)
|
|
112
|
+
})
|
|
113
|
+
}, backoff)
|
|
114
|
+
if (backoff < 100)
|
|
115
|
+
backoff += 10;
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (cb) cb(er)
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename)
|
|
122
|
+
return rename
|
|
123
|
+
})(fs.rename)
|
|
119
124
|
}
|
|
120
125
|
|
|
121
126
|
// if read() returns EAGAIN, then just try it again.
|
|
122
|
-
fs.read =
|
|
127
|
+
fs.read = typeof fs.read !== 'function' ? fs.read
|
|
128
|
+
: (function (fs$read) {
|
|
123
129
|
function read (fd, buffer, offset, length, position, callback_) {
|
|
124
130
|
var callback
|
|
125
131
|
if (callback_ && typeof callback_ === 'function') {
|
|
@@ -140,7 +146,8 @@ function patch (fs) {
|
|
|
140
146
|
return read
|
|
141
147
|
})(fs.read)
|
|
142
148
|
|
|
143
|
-
fs.readSync =
|
|
149
|
+
fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync
|
|
150
|
+
: (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
|
|
144
151
|
var eagCounter = 0
|
|
145
152
|
while (true) {
|
|
146
153
|
try {
|
|
@@ -199,7 +206,7 @@ function patch (fs) {
|
|
|
199
206
|
}
|
|
200
207
|
|
|
201
208
|
function patchLutimes (fs) {
|
|
202
|
-
if (constants.hasOwnProperty("O_SYMLINK")) {
|
|
209
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) {
|
|
203
210
|
fs.lutimes = function (path, at, mt, cb) {
|
|
204
211
|
fs.open(path, constants.O_SYMLINK, function (er, fd) {
|
|
205
212
|
if (er) {
|
|
@@ -233,7 +240,7 @@ function patch (fs) {
|
|
|
233
240
|
return ret
|
|
234
241
|
}
|
|
235
242
|
|
|
236
|
-
} else {
|
|
243
|
+
} else if (fs.futimes) {
|
|
237
244
|
fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
|
|
238
245
|
fs.lutimesSync = function () {}
|
|
239
246
|
}
|
|
@@ -310,8 +317,10 @@ function patch (fs) {
|
|
|
310
317
|
return function (target, options) {
|
|
311
318
|
var stats = options ? orig.call(fs, target, options)
|
|
312
319
|
: orig.call(fs, target)
|
|
313
|
-
if (stats
|
|
314
|
-
|
|
320
|
+
if (stats) {
|
|
321
|
+
if (stats.uid < 0) stats.uid += 0x100000000
|
|
322
|
+
if (stats.gid < 0) stats.gid += 0x100000000
|
|
323
|
+
}
|
|
315
324
|
return stats;
|
|
316
325
|
}
|
|
317
326
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// Ramda v0.27.
|
|
1
|
+
// Ramda v0.27.2
|
|
2
2
|
// https://github.com/ramda/ramda
|
|
3
|
-
// (c) 2013-
|
|
3
|
+
// (c) 2013-2022 Scott Sauyet, Michael Hurley, and David Chambers
|
|
4
4
|
// Ramda may be freely distributed under the MIT license.
|
|
5
5
|
|
|
6
6
|
(function (global, factory) {
|
|
@@ -8729,7 +8729,7 @@
|
|
|
8729
8729
|
sequence(of, map(f, traversable));
|
|
8730
8730
|
});
|
|
8731
8731
|
|
|
8732
|
-
var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\
|
|
8732
|
+
var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003' +
|
|
8733
8733
|
'\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' +
|
|
8734
8734
|
'\u2029\uFEFF';
|
|
8735
8735
|
var zeroWidth = '\u200b';
|
|
@@ -8749,7 +8749,7 @@
|
|
|
8749
8749
|
* R.trim(' xyz '); //=> 'xyz'
|
|
8750
8750
|
* R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z']
|
|
8751
8751
|
*/
|
|
8752
|
-
var trim = !hasProtoTrim ||
|
|
8752
|
+
var trim = !hasProtoTrim || ws.trim() || !zeroWidth.trim() ?
|
|
8753
8753
|
_curry1(function trim(str) {
|
|
8754
8754
|
var beginRx = new RegExp('^[' + ws + '][' + ws + ']*');
|
|
8755
8755
|
var endRx = new RegExp('[' + ws + '][' + ws + ']*$');
|