@design-edito/tools 0.5.11 → 0.5.13
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/agnostic/colors/index.d.ts +1 -1
- package/agnostic/colors/index.js +1 -1
- package/agnostic/css/index.d.ts +1 -1
- package/agnostic/css/index.js +1 -1
- package/agnostic/errors/index.d.ts +1 -1
- package/agnostic/errors/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +13 -13
- package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +13 -13
- package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +2 -2
- package/agnostic/html/hyper-json/smart-tags/isolated/index.js +2 -2
- package/agnostic/html/index.d.ts +2 -2
- package/agnostic/html/index.js +2 -2
- package/agnostic/index.d.ts +3 -3
- package/agnostic/index.js +3 -3
- package/agnostic/misc/index.d.ts +3 -3
- package/agnostic/misc/index.js +3 -3
- package/agnostic/misc/logs/index.d.ts +1 -1
- package/agnostic/misc/logs/index.js +1 -1
- package/agnostic/numbers/index.d.ts +2 -2
- package/agnostic/numbers/index.js +2 -2
- package/agnostic/objects/index.d.ts +2 -2
- package/agnostic/objects/index.js +2 -2
- package/agnostic/optim/index.d.ts +1 -1
- package/agnostic/optim/index.js +1 -1
- package/agnostic/strings/index.d.ts +2 -2
- package/agnostic/strings/index.js +2 -2
- package/components/Lightbox/index.d.ts +25 -9
- package/components/Lightbox/index.js +30 -14
- package/node/@google-cloud/storage/directory/index.d.ts +1 -1
- package/node/@google-cloud/storage/directory/index.js +1 -1
- package/node/@google-cloud/storage/file/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/index.js +1 -1
- package/node/ftps/directory/index.d.ts +1 -1
- package/node/ftps/directory/index.js +1 -1
- package/node/images/transform/operations/index.d.ts +1 -1
- package/node/images/transform/operations/index.js +1 -1
- package/node/index.d.ts +1 -1
- package/node/index.js +1 -1
- package/node/process/spawner/index.d.ts +26 -0
- package/node/process/spawner/index.js +21 -8
- package/node/sftp/index.d.ts +1 -1
- package/node/sftp/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as channels from './channels/index.js'
|
|
2
|
-
export * as convert from './convert/index.js'
|
|
3
2
|
export * as contrast from './contrast/index.js'
|
|
3
|
+
export * as convert from './convert/index.js'
|
|
4
4
|
export * as distance from './distance/index.js'
|
|
5
5
|
export * as grayscale from './grayscale/index.js'
|
|
6
6
|
export * as invert from './invert/index.js'
|
package/agnostic/colors/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as channels from './channels/index.js'
|
|
2
|
-
export * as convert from './convert/index.js'
|
|
3
2
|
export * as contrast from './contrast/index.js'
|
|
3
|
+
export * as convert from './convert/index.js'
|
|
4
4
|
export * as distance from './distance/index.js'
|
|
5
5
|
export * as grayscale from './grayscale/index.js'
|
|
6
6
|
export * as invert from './invert/index.js'
|
package/agnostic/css/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export * as bem from './bem/index.js'
|
|
|
2
2
|
export * as clss from './clss/index.js'
|
|
3
3
|
export * as generateNiceColor from './generate-nice-color/index.js'
|
|
4
4
|
export * as isValidCssClassName from './is-valid-css-class-name/index.js'
|
|
5
|
-
export * as stylesSet from './styles-set/index.js'
|
|
6
5
|
export * as scale from './scale/index.js'
|
|
6
|
+
export * as stylesSet from './styles-set/index.js'
|
package/agnostic/css/index.js
CHANGED
|
@@ -2,5 +2,5 @@ export * as bem from './bem/index.js'
|
|
|
2
2
|
export * as clss from './clss/index.js'
|
|
3
3
|
export * as generateNiceColor from './generate-nice-color/index.js'
|
|
4
4
|
export * as isValidCssClassName from './is-valid-css-class-name/index.js'
|
|
5
|
-
export * as stylesSet from './styles-set/index.js'
|
|
6
5
|
export * as scale from './scale/index.js'
|
|
6
|
+
export * as stylesSet from './styles-set/index.js'
|
package/agnostic/errors/index.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
export * as add from './add/index.js'
|
|
2
1
|
export * as addclass from './addclass/index.js'
|
|
2
|
+
export * as add from './add/index.js'
|
|
3
3
|
export * as and from './and/index.js'
|
|
4
4
|
export * as append from './append/index.js'
|
|
5
5
|
export * as at from './at/index.js'
|
|
6
6
|
export * as clone from './clone/index.js'
|
|
7
|
-
export * as call from './call/index.js'
|
|
8
7
|
export * as deleteproperties from './deleteproperties/index.js'
|
|
8
|
+
export * as call from './call/index.js'
|
|
9
9
|
export * as equals from './equals/index.js'
|
|
10
10
|
export * as getattribute from './getattribute/index.js'
|
|
11
|
-
export * as getproperties from './getproperties/index.js'
|
|
12
11
|
export * as getproperty from './getproperty/index.js'
|
|
13
12
|
export * as hjparse from './hjparse/index.js'
|
|
14
|
-
export * as if from './if/index.js'
|
|
15
13
|
export * as hjstringify from './hjstringify/index.js'
|
|
16
|
-
export * as
|
|
14
|
+
export * as if from './if/index.js'
|
|
17
15
|
export * as join from './join/index.js'
|
|
16
|
+
export * as getproperties from './getproperties/index.js'
|
|
18
17
|
export * as length from './length/index.js'
|
|
19
18
|
export * as map from './map/index.js'
|
|
19
|
+
export * as initialize from './initialize/index.js'
|
|
20
20
|
export * as negate from './negate/index.js'
|
|
21
21
|
export * as or from './or/index.js'
|
|
22
|
-
export * as notrailing from './notrailing/index.js'
|
|
23
22
|
export * as pickrandom from './pickrandom/index.js'
|
|
24
23
|
export * as populate from './populate/index.js'
|
|
25
24
|
export * as print from './print/index.js'
|
|
26
25
|
export * as push from './push/index.js'
|
|
27
26
|
export * as pusheach from './pusheach/index.js'
|
|
28
27
|
export * as recordtoarray from './recordtoarray/index.js'
|
|
28
|
+
export * as notrailing from './notrailing/index.js'
|
|
29
29
|
export * as removeattribute from './removeattribute/index.js'
|
|
30
30
|
export * as removeclass from './removeclass/index.js'
|
|
31
|
-
export * as replace from './replace/index.js'
|
|
32
31
|
export * as renameproperty from './renameproperty/index.js'
|
|
33
|
-
export * as
|
|
34
|
-
export * as setattribute from './setattribute/index.js'
|
|
32
|
+
export * as replace from './replace/index.js'
|
|
35
33
|
export * as select from './select/index.js'
|
|
34
|
+
export * as set from './set/index.js'
|
|
36
35
|
export * as setproperty from './setproperty/index.js'
|
|
37
|
-
export * as
|
|
36
|
+
export * as setattribute from './setattribute/index.js'
|
|
38
37
|
export * as split from './split/index.js'
|
|
39
|
-
export * as
|
|
38
|
+
export * as sorton from './sorton/index.js'
|
|
40
39
|
export * as toarray from './toarray/index.js'
|
|
40
|
+
export * as spread from './spread/index.js'
|
|
41
41
|
export * as toboolean from './toboolean/index.js'
|
|
42
42
|
export * as toelement from './toelement/index.js'
|
|
43
43
|
export * as toggleclass from './toggleclass/index.js'
|
|
44
44
|
export * as tonodelist from './tonodelist/index.js'
|
|
45
|
-
export * as tonumber from './tonumber/index.js'
|
|
46
45
|
export * as tonull from './tonull/index.js'
|
|
47
|
-
export * as
|
|
46
|
+
export * as tonumber from './tonumber/index.js'
|
|
48
47
|
export * as toref from './toref/index.js'
|
|
48
|
+
export * as torecord from './torecord/index.js'
|
|
49
49
|
export * as tostring from './tostring/index.js'
|
|
50
50
|
export * as totext from './totext/index.js'
|
|
51
51
|
export * as transformselected from './transformselected/index.js'
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
export * as add from './add/index.js'
|
|
2
1
|
export * as addclass from './addclass/index.js'
|
|
2
|
+
export * as add from './add/index.js'
|
|
3
3
|
export * as and from './and/index.js'
|
|
4
4
|
export * as append from './append/index.js'
|
|
5
5
|
export * as at from './at/index.js'
|
|
6
6
|
export * as clone from './clone/index.js'
|
|
7
|
-
export * as call from './call/index.js'
|
|
8
7
|
export * as deleteproperties from './deleteproperties/index.js'
|
|
8
|
+
export * as call from './call/index.js'
|
|
9
9
|
export * as equals from './equals/index.js'
|
|
10
10
|
export * as getattribute from './getattribute/index.js'
|
|
11
|
-
export * as getproperties from './getproperties/index.js'
|
|
12
11
|
export * as getproperty from './getproperty/index.js'
|
|
13
12
|
export * as hjparse from './hjparse/index.js'
|
|
14
|
-
export * as if from './if/index.js'
|
|
15
13
|
export * as hjstringify from './hjstringify/index.js'
|
|
16
|
-
export * as
|
|
14
|
+
export * as if from './if/index.js'
|
|
17
15
|
export * as join from './join/index.js'
|
|
16
|
+
export * as getproperties from './getproperties/index.js'
|
|
18
17
|
export * as length from './length/index.js'
|
|
19
18
|
export * as map from './map/index.js'
|
|
19
|
+
export * as initialize from './initialize/index.js'
|
|
20
20
|
export * as negate from './negate/index.js'
|
|
21
21
|
export * as or from './or/index.js'
|
|
22
|
-
export * as notrailing from './notrailing/index.js'
|
|
23
22
|
export * as pickrandom from './pickrandom/index.js'
|
|
24
23
|
export * as populate from './populate/index.js'
|
|
25
24
|
export * as print from './print/index.js'
|
|
26
25
|
export * as push from './push/index.js'
|
|
27
26
|
export * as pusheach from './pusheach/index.js'
|
|
28
27
|
export * as recordtoarray from './recordtoarray/index.js'
|
|
28
|
+
export * as notrailing from './notrailing/index.js'
|
|
29
29
|
export * as removeattribute from './removeattribute/index.js'
|
|
30
30
|
export * as removeclass from './removeclass/index.js'
|
|
31
|
-
export * as replace from './replace/index.js'
|
|
32
31
|
export * as renameproperty from './renameproperty/index.js'
|
|
33
|
-
export * as
|
|
34
|
-
export * as setattribute from './setattribute/index.js'
|
|
32
|
+
export * as replace from './replace/index.js'
|
|
35
33
|
export * as select from './select/index.js'
|
|
34
|
+
export * as set from './set/index.js'
|
|
36
35
|
export * as setproperty from './setproperty/index.js'
|
|
37
|
-
export * as
|
|
36
|
+
export * as setattribute from './setattribute/index.js'
|
|
38
37
|
export * as split from './split/index.js'
|
|
39
|
-
export * as
|
|
38
|
+
export * as sorton from './sorton/index.js'
|
|
40
39
|
export * as toarray from './toarray/index.js'
|
|
40
|
+
export * as spread from './spread/index.js'
|
|
41
41
|
export * as toboolean from './toboolean/index.js'
|
|
42
42
|
export * as toelement from './toelement/index.js'
|
|
43
43
|
export * as toggleclass from './toggleclass/index.js'
|
|
44
44
|
export * as tonodelist from './tonodelist/index.js'
|
|
45
|
-
export * as tonumber from './tonumber/index.js'
|
|
46
45
|
export * as tonull from './tonull/index.js'
|
|
47
|
-
export * as
|
|
46
|
+
export * as tonumber from './tonumber/index.js'
|
|
48
47
|
export * as toref from './toref/index.js'
|
|
48
|
+
export * as torecord from './torecord/index.js'
|
|
49
49
|
export * as tostring from './tostring/index.js'
|
|
50
50
|
export * as totext from './totext/index.js'
|
|
51
51
|
export * as transformselected from './transformselected/index.js'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export * as any from './any/index.js'
|
|
2
2
|
export * as array from './array/index.js'
|
|
3
|
-
export * as boolean from './boolean/index.js'
|
|
4
3
|
export * as element from './element/index.js'
|
|
4
|
+
export * as boolean from './boolean/index.js'
|
|
5
5
|
export * as get from './get/index.js'
|
|
6
6
|
export * as guess from './guess/index.js'
|
|
7
7
|
export * as nodelist from './nodelist/index.js'
|
|
8
8
|
export * as null from './null/index.js'
|
|
9
|
+
export * as number from './number/index.js'
|
|
9
10
|
export * as record from './record/index.js'
|
|
10
11
|
export * as ref from './ref/index.js'
|
|
11
|
-
export * as number from './number/index.js'
|
|
12
12
|
export * as string from './string/index.js'
|
|
13
13
|
export * as text from './text/index.js'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export * as any from './any/index.js'
|
|
2
2
|
export * as array from './array/index.js'
|
|
3
|
-
export * as boolean from './boolean/index.js'
|
|
4
3
|
export * as element from './element/index.js'
|
|
4
|
+
export * as boolean from './boolean/index.js'
|
|
5
5
|
export * as get from './get/index.js'
|
|
6
6
|
export * as guess from './guess/index.js'
|
|
7
7
|
export * as nodelist from './nodelist/index.js'
|
|
8
8
|
export * as null from './null/index.js'
|
|
9
|
+
export * as number from './number/index.js'
|
|
9
10
|
export * as record from './record/index.js'
|
|
10
11
|
export * as ref from './ref/index.js'
|
|
11
|
-
export * as number from './number/index.js'
|
|
12
12
|
export * as string from './string/index.js'
|
|
13
13
|
export * as text from './text/index.js'
|
package/agnostic/html/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export * as getNodeAncestors from './get-node-ancestors/index.js'
|
|
|
3
3
|
export * as getPositionInsideParent from './get-position-inside-parent/index.js'
|
|
4
4
|
export * as hyperJson from './hyper-json/index.js'
|
|
5
5
|
export * as insertNode from './insert-node/index.js'
|
|
6
|
-
export * as
|
|
6
|
+
export * as placeholders from './placeholders/index.js'
|
|
7
7
|
export * as selectorToElement from './selector-to-element/index.js'
|
|
8
|
+
export * as replaceInElement from './replace-in-element/index.js'
|
|
8
9
|
export * as stringToNodes from './string-to-nodes/index.js'
|
|
9
10
|
export * as watchSelection from './watch-selection/index.js'
|
|
10
|
-
export * as placeholders from './placeholders/index.js'
|
package/agnostic/html/index.js
CHANGED
|
@@ -3,8 +3,8 @@ export * as getNodeAncestors from './get-node-ancestors/index.js'
|
|
|
3
3
|
export * as getPositionInsideParent from './get-position-inside-parent/index.js'
|
|
4
4
|
export * as hyperJson from './hyper-json/index.js'
|
|
5
5
|
export * as insertNode from './insert-node/index.js'
|
|
6
|
-
export * as
|
|
6
|
+
export * as placeholders from './placeholders/index.js'
|
|
7
7
|
export * as selectorToElement from './selector-to-element/index.js'
|
|
8
|
+
export * as replaceInElement from './replace-in-element/index.js'
|
|
8
9
|
export * as stringToNodes from './string-to-nodes/index.js'
|
|
9
10
|
export * as watchSelection from './watch-selection/index.js'
|
|
10
|
-
export * as placeholders from './placeholders/index.js'
|
package/agnostic/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * as arrays from './arrays/index.js'
|
|
2
1
|
export * as booleans from './booleans/index.js'
|
|
2
|
+
export * as arrays from './arrays/index.js'
|
|
3
3
|
export * as colors from './colors/index.js'
|
|
4
4
|
export * as css from './css/index.js'
|
|
5
5
|
export * as errors from './errors/index.js'
|
|
@@ -8,10 +8,10 @@ export * as misc from './misc/index.js'
|
|
|
8
8
|
export * as numbers from './numbers/index.js'
|
|
9
9
|
export * as objects from './objects/index.js'
|
|
10
10
|
export * as optim from './optim/index.js'
|
|
11
|
+
export * as random from './random/index.js'
|
|
11
12
|
export * as regexps from './regexps/index.js'
|
|
12
13
|
export * as sanitization from './sanitization/index.js'
|
|
13
14
|
export * as strings from './strings/index.js'
|
|
14
|
-
export * as
|
|
15
|
+
export * as subtitles from './subtitles/index.js'
|
|
15
16
|
export * as time from './time/index.js'
|
|
16
17
|
export * as typescript from './typescript/index.js'
|
|
17
|
-
export * as subtitles from './subtitles/index.js'
|
package/agnostic/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * as arrays from './arrays/index.js'
|
|
2
1
|
export * as booleans from './booleans/index.js'
|
|
2
|
+
export * as arrays from './arrays/index.js'
|
|
3
3
|
export * as colors from './colors/index.js'
|
|
4
4
|
export * as css from './css/index.js'
|
|
5
5
|
export * as errors from './errors/index.js'
|
|
@@ -8,10 +8,10 @@ export * as misc from './misc/index.js'
|
|
|
8
8
|
export * as numbers from './numbers/index.js'
|
|
9
9
|
export * as objects from './objects/index.js'
|
|
10
10
|
export * as optim from './optim/index.js'
|
|
11
|
+
export * as random from './random/index.js'
|
|
11
12
|
export * as regexps from './regexps/index.js'
|
|
12
13
|
export * as sanitization from './sanitization/index.js'
|
|
13
14
|
export * as strings from './strings/index.js'
|
|
14
|
-
export * as
|
|
15
|
+
export * as subtitles from './subtitles/index.js'
|
|
15
16
|
export * as time from './time/index.js'
|
|
16
17
|
export * as typescript from './typescript/index.js'
|
|
17
|
-
export * as subtitles from './subtitles/index.js'
|
package/agnostic/misc/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * as cast from './cast/index.js'
|
|
2
1
|
export * as assert from './assert/index.js'
|
|
2
|
+
export * as cast from './cast/index.js'
|
|
3
3
|
export * as connection from './connection/index.js'
|
|
4
4
|
export * as crawler from './crawler/index.js'
|
|
5
5
|
export * as crossenv from './crossenv/index.js'
|
|
6
|
-
export * as isConstructorFunction from './is-constructor-function/index.js'
|
|
7
6
|
export * as dataSize from './data-size/index.js'
|
|
7
|
+
export * as isConstructorFunction from './is-constructor-function/index.js'
|
|
8
8
|
export * as isNullish from './is-nullish/index.js'
|
|
9
9
|
export * as logs from './logs/index.js'
|
|
10
10
|
export * as loremIpsum from './lorem-ipsum/index.js'
|
|
11
|
-
export * as outcome from './outcome/index.js'
|
|
12
11
|
export * as normalizeExtension from './normalize-extension/index.js'
|
|
12
|
+
export * as outcome from './outcome/index.js'
|
package/agnostic/misc/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * as cast from './cast/index.js'
|
|
2
1
|
export * as assert from './assert/index.js'
|
|
2
|
+
export * as cast from './cast/index.js'
|
|
3
3
|
export * as connection from './connection/index.js'
|
|
4
4
|
export * as crawler from './crawler/index.js'
|
|
5
5
|
export * as crossenv from './crossenv/index.js'
|
|
6
|
-
export * as isConstructorFunction from './is-constructor-function/index.js'
|
|
7
6
|
export * as dataSize from './data-size/index.js'
|
|
7
|
+
export * as isConstructorFunction from './is-constructor-function/index.js'
|
|
8
8
|
export * as isNullish from './is-nullish/index.js'
|
|
9
9
|
export * as logs from './logs/index.js'
|
|
10
10
|
export * as loremIpsum from './lorem-ipsum/index.js'
|
|
11
|
-
export * as outcome from './outcome/index.js'
|
|
12
11
|
export * as normalizeExtension from './normalize-extension/index.js'
|
|
12
|
+
export * as outcome from './outcome/index.js'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as absoluteModulo from './absolute-modulo/index.js'
|
|
2
2
|
export * as approximateRational from './approximate-rational/index.js'
|
|
3
|
-
export * as geometricProgressions from './geometric-progressions/index.js'
|
|
4
|
-
export * as interpolate from './interpolate/index.js'
|
|
5
3
|
export * as clamp from './clamp/index.js'
|
|
4
|
+
export * as interpolate from './interpolate/index.js'
|
|
5
|
+
export * as geometricProgressions from './geometric-progressions/index.js'
|
|
6
6
|
export * as round from './round/index.js'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as absoluteModulo from './absolute-modulo/index.js'
|
|
2
2
|
export * as approximateRational from './approximate-rational/index.js'
|
|
3
|
-
export * as geometricProgressions from './geometric-progressions/index.js'
|
|
4
|
-
export * as interpolate from './interpolate/index.js'
|
|
5
3
|
export * as clamp from './clamp/index.js'
|
|
4
|
+
export * as interpolate from './interpolate/index.js'
|
|
5
|
+
export * as geometricProgressions from './geometric-progressions/index.js'
|
|
6
6
|
export * as round from './round/index.js'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * as deepGetProperty from './deep-get-property/index.js'
|
|
2
|
-
export * as enums from './enums/index.js'
|
|
3
2
|
export * as flattenGetters from './flatten-getters/index.js'
|
|
4
|
-
export * as
|
|
3
|
+
export * as enums from './enums/index.js'
|
|
5
4
|
export * as isRecord from './is-record/index.js'
|
|
5
|
+
export * as isObject from './is-object/index.js'
|
|
6
6
|
export * as recordFormat from './record-format/index.js'
|
|
7
7
|
export * as sortKeys from './sort-keys/index.js'
|
|
8
8
|
export * as recordMap from './record-map/index.js'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * as deepGetProperty from './deep-get-property/index.js'
|
|
2
|
-
export * as enums from './enums/index.js'
|
|
3
2
|
export * as flattenGetters from './flatten-getters/index.js'
|
|
4
|
-
export * as
|
|
3
|
+
export * as enums from './enums/index.js'
|
|
5
4
|
export * as isRecord from './is-record/index.js'
|
|
5
|
+
export * as isObject from './is-object/index.js'
|
|
6
6
|
export * as recordFormat from './record-format/index.js'
|
|
7
7
|
export * as sortKeys from './sort-keys/index.js'
|
|
8
8
|
export * as recordMap from './record-map/index.js'
|
package/agnostic/optim/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export * as charCodes from './char-codes/index.js'
|
|
|
2
2
|
export * as matches from './matches/index.js'
|
|
3
3
|
export * as normalizeIndent from './normalize-indent/index.js'
|
|
4
4
|
export * as parseTable from './parse-table/index.js'
|
|
5
|
-
export * as
|
|
5
|
+
export * as splitTrim from './split-trim/index.js'
|
|
6
6
|
export * as toAlphanum from './to-alphanum/index.js'
|
|
7
7
|
export * as trim from './trim/index.js'
|
|
8
|
-
export * as
|
|
8
|
+
export * as replaceAll from './replace-all/index.js'
|
|
@@ -2,7 +2,7 @@ export * as charCodes from './char-codes/index.js'
|
|
|
2
2
|
export * as matches from './matches/index.js'
|
|
3
3
|
export * as normalizeIndent from './normalize-indent/index.js'
|
|
4
4
|
export * as parseTable from './parse-table/index.js'
|
|
5
|
-
export * as
|
|
5
|
+
export * as splitTrim from './split-trim/index.js'
|
|
6
6
|
export * as toAlphanum from './to-alphanum/index.js'
|
|
7
7
|
export * as trim from './trim/index.js'
|
|
8
|
-
export * as
|
|
8
|
+
export * as replaceAll from './replace-all/index.js'
|
|
@@ -8,11 +8,12 @@ import type { WithClassName } from '../utils/types.js';
|
|
|
8
8
|
* one a click on this member opens; the others only matter when another member opens
|
|
9
9
|
* them. Declaring none makes it a group of its own.
|
|
10
10
|
* @property closeBtnContent - Content rendered inside the close button.
|
|
11
|
-
* @property openBtnContent - Content rendered inside the open button.
|
|
12
|
-
* button:
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* @property openBtnContent - Content rendered inside the open button. Left empty, the
|
|
12
|
+
* button is still rendered: a stylesheet hides an empty control with `:empty`, and the
|
|
13
|
+
* lightbox is then opened by whatever the consumer wires up.
|
|
14
|
+
* @property prevBtnContent - Content rendered inside the previous button. The button is
|
|
15
|
+
* always rendered; the root's `navigable` modifier says whether it has anywhere to go.
|
|
16
|
+
* @property nextBtnContent - Content rendered inside the next button, same.
|
|
16
17
|
* @property isOn - Controlled state. When defined, this member is driven by the
|
|
17
18
|
* parent and the shared registry never opens or closes it.
|
|
18
19
|
* @property defaultIsOn - Whether the lightbox starts open, in uncontrolled mode.
|
|
@@ -22,6 +23,9 @@ import type { WithClassName } from '../utils/types.js';
|
|
|
22
23
|
* the open group. Only has an effect on a group of more than one member.
|
|
23
24
|
* @property exitOnBgClick - When `true`, clicking the backdrop, and not its
|
|
24
25
|
* content, closes it.
|
|
26
|
+
* @property openOnClick - When `true`, clicking the content opens the lightbox. An
|
|
27
|
+
* affordance layered on the open button, never a replacement for it: a click is
|
|
28
|
+
* mouse and touch only, and the button is what a keyboard reaches.
|
|
25
29
|
* @property onOpenButtonClicked - Called when the open button is clicked, before the
|
|
26
30
|
* lightbox reacts, with the state as it was.
|
|
27
31
|
* @property onCloseButtonClicked - Same, for the close button.
|
|
@@ -29,6 +33,8 @@ import type { WithClassName } from '../utils/types.js';
|
|
|
29
33
|
* @property onNextButtonClicked - Same, for the next button.
|
|
30
34
|
* @property onBackgroundClicked - Called when the backdrop is clicked (only
|
|
31
35
|
* while `exitOnBgClick` is `true`), before the lightbox reacts.
|
|
36
|
+
* @property onContentClicked - Called when the content is clicked while closed (only
|
|
37
|
+
* while `openOnClick` is `true`), before the lightbox reacts.
|
|
32
38
|
* @property onEscapePressed - Called when `Escape` is pressed while the lightbox is open
|
|
33
39
|
* (only while `exitOnEscape` is `true`), before the lightbox reacts.
|
|
34
40
|
* @property onPrevArrowPressed - Called when the left arrow is pressed while the lightbox
|
|
@@ -50,12 +56,14 @@ export type Props = PropsWithChildren<WithClassName<{
|
|
|
50
56
|
defaultIsOn?: boolean;
|
|
51
57
|
exitOnEscape?: boolean;
|
|
52
58
|
exitOnBgClick?: boolean;
|
|
59
|
+
openOnClick?: boolean;
|
|
53
60
|
navOnArrowKeys?: boolean;
|
|
54
61
|
onOpenButtonClicked?: (isOn: boolean) => void;
|
|
55
62
|
onCloseButtonClicked?: (isOn: boolean) => void;
|
|
56
63
|
onPrevButtonClicked?: (isOn: boolean) => void;
|
|
57
64
|
onNextButtonClicked?: (isOn: boolean) => void;
|
|
58
65
|
onBackgroundClicked?: (isOn: boolean) => void;
|
|
66
|
+
onContentClicked?: (isOn: boolean) => void;
|
|
59
67
|
onEscapePressed?: (isOn: boolean) => void;
|
|
60
68
|
onPrevArrowPressed?: (isOn: boolean) => void;
|
|
61
69
|
onNextArrowPressed?: (isOn: boolean) => void;
|
|
@@ -68,7 +76,11 @@ export type Props = PropsWithChildren<WithClassName<{
|
|
|
68
76
|
* ### CSS modifiers
|
|
69
77
|
* - `on` - this member is open.
|
|
70
78
|
* - `off` - it is not.
|
|
71
|
-
* - `grouped` - it belongs to a group it did not invent
|
|
79
|
+
* - `grouped` - it belongs to a group it did not invent.
|
|
80
|
+
* - `navigable` - that group holds someone else, so the previous and next controls
|
|
81
|
+
* have somewhere to go.
|
|
82
|
+
* - `open-on-click` - the content itself opens the lightbox, so a stylesheet can say
|
|
83
|
+
* so with a cursor. Named after the prop it mirrors, as modifiers are.
|
|
72
84
|
*
|
|
73
85
|
* ### CSS elements
|
|
74
86
|
* - `placeholder` - holds the content's last measured size while it is out of flow.
|
|
@@ -93,9 +105,13 @@ export type Props = PropsWithChildren<WithClassName<{
|
|
|
93
105
|
* - **A placeholder keeps the layout still.** Its size is the content's last measured
|
|
94
106
|
* one, read while closed; without it the article would collapse around the hole left
|
|
95
107
|
* once the backdrop goes out of flow.
|
|
96
|
-
* - **
|
|
97
|
-
* `transform`, a `filter` or a `contain
|
|
98
|
-
*
|
|
108
|
+
* - **A `position: fixed` backdrop is contained by the first ancestor carrying a
|
|
109
|
+
* `transform`, a `filter` or a `contain`**, which becomes its containing block. That
|
|
110
|
+
* is wanted, not suffered: where several articles are preloaded side by side and
|
|
111
|
+
* slid through by a transformed container, containment is what keeps an offscreen
|
|
112
|
+
* article's lightbox offscreen. The top layer - `<dialog>` with `showModal()`, or
|
|
113
|
+
* the popover API - would do the opposite, being document-wide and above
|
|
114
|
+
* everything, and paint over whichever article is being read.
|
|
99
115
|
* - **Groups are held outside React**, in `./store.ts`: a consumer may render each
|
|
100
116
|
* component in a root of its own, in which case members of a group share no tree
|
|
101
117
|
* and a context could not reach from one to the other.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
3
3
|
import { clss } from '../../agnostic/css/clss/index.js';
|
|
4
|
-
import { isNotNullish } from '../../agnostic/misc/is-nullish/index.js';
|
|
5
4
|
import { mergeClassNames, useChangeDispatch } from '../utils/index.js';
|
|
6
5
|
import { lightbox as publicClassName } from '../public-classnames.js';
|
|
7
6
|
import { close as closeLightbox, getState, membersOf, open as openLightbox, register, soloGroupOf, step, subscribe, unregister } from './store.js';
|
|
@@ -13,7 +12,11 @@ import cssModule from './styles.module.css';
|
|
|
13
12
|
* ### CSS modifiers
|
|
14
13
|
* - `on` - this member is open.
|
|
15
14
|
* - `off` - it is not.
|
|
16
|
-
* - `grouped` - it belongs to a group it did not invent
|
|
15
|
+
* - `grouped` - it belongs to a group it did not invent.
|
|
16
|
+
* - `navigable` - that group holds someone else, so the previous and next controls
|
|
17
|
+
* have somewhere to go.
|
|
18
|
+
* - `open-on-click` - the content itself opens the lightbox, so a stylesheet can say
|
|
19
|
+
* so with a cursor. Named after the prop it mirrors, as modifiers are.
|
|
17
20
|
*
|
|
18
21
|
* ### CSS elements
|
|
19
22
|
* - `placeholder` - holds the content's last measured size while it is out of flow.
|
|
@@ -38,9 +41,13 @@ import cssModule from './styles.module.css';
|
|
|
38
41
|
* - **A placeholder keeps the layout still.** Its size is the content's last measured
|
|
39
42
|
* one, read while closed; without it the article would collapse around the hole left
|
|
40
43
|
* once the backdrop goes out of flow.
|
|
41
|
-
* - **
|
|
42
|
-
* `transform`, a `filter` or a `contain
|
|
43
|
-
*
|
|
44
|
+
* - **A `position: fixed` backdrop is contained by the first ancestor carrying a
|
|
45
|
+
* `transform`, a `filter` or a `contain`**, which becomes its containing block. That
|
|
46
|
+
* is wanted, not suffered: where several articles are preloaded side by side and
|
|
47
|
+
* slid through by a transformed container, containment is what keeps an offscreen
|
|
48
|
+
* article's lightbox offscreen. The top layer - `<dialog>` with `showModal()`, or
|
|
49
|
+
* the popover API - would do the opposite, being document-wide and above
|
|
50
|
+
* everything, and paint over whichever article is being read.
|
|
44
51
|
* - **Groups are held outside React**, in `./store.ts`: a consumer may render each
|
|
45
52
|
* component in a root of its own, in which case members of a group share no tree
|
|
46
53
|
* and a context could not reach from one to the other.
|
|
@@ -51,7 +58,7 @@ import cssModule from './styles.module.css';
|
|
|
51
58
|
* buttons are the consumer stylesheet's business. Without one, the content is moved
|
|
52
59
|
* to the end of the document and nothing looks like a lightbox.
|
|
53
60
|
*/
|
|
54
|
-
export const Lightbox = ({ group, closeBtnContent, openBtnContent, prevBtnContent, nextBtnContent, isOn: isOnProp, defaultIsOn = false, exitOnEscape, exitOnBgClick, navOnArrowKeys, onOpenButtonClicked, onCloseButtonClicked, onPrevButtonClicked, onNextButtonClicked, onBackgroundClicked, onEscapePressed, onPrevArrowPressed, onNextArrowPressed, onIsOnChanged, children, className }) => {
|
|
61
|
+
export const Lightbox = ({ group, closeBtnContent, openBtnContent, prevBtnContent, nextBtnContent, isOn: isOnProp, defaultIsOn = false, exitOnEscape, exitOnBgClick, openOnClick, navOnArrowKeys, onOpenButtonClicked, onCloseButtonClicked, onPrevButtonClicked, onNextButtonClicked, onBackgroundClicked, onContentClicked, onEscapePressed, onPrevArrowPressed, onNextArrowPressed, onIsOnChanged, children, className }) => {
|
|
55
62
|
// State & refs
|
|
56
63
|
const id = useId();
|
|
57
64
|
const rootRef = useRef(null);
|
|
@@ -124,6 +131,12 @@ export const Lightbox = ({ group, closeBtnContent, openBtnContent, prevBtnConten
|
|
|
124
131
|
onNextButtonClicked?.(isOn);
|
|
125
132
|
step(1);
|
|
126
133
|
};
|
|
134
|
+
const handleContentClick = () => {
|
|
135
|
+
if (openOnClick !== true || isOn)
|
|
136
|
+
return;
|
|
137
|
+
onContentClicked?.(isOn);
|
|
138
|
+
requestOpen();
|
|
139
|
+
};
|
|
127
140
|
const handleBackdropClick = e => {
|
|
128
141
|
if (exitOnBgClick !== true)
|
|
129
142
|
return;
|
|
@@ -181,13 +194,16 @@ export const Lightbox = ({ group, closeBtnContent, openBtnContent, prevBtnConten
|
|
|
181
194
|
const rootClss = mergeClassNames(c(null, {
|
|
182
195
|
on: isOn,
|
|
183
196
|
off: !isOn,
|
|
184
|
-
grouped: isGrouped
|
|
197
|
+
grouped: isGrouped,
|
|
198
|
+
navigable: siblingsCount > 1,
|
|
199
|
+
'open-on-click': openOnClick === true && !isOn
|
|
185
200
|
}), className);
|
|
186
201
|
const size = sizeRef.current;
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
//
|
|
190
|
-
//
|
|
191
|
-
//
|
|
192
|
-
|
|
202
|
+
// Nothing here is conditional. React reconciles by position, so a branch that
|
|
203
|
+
// appears and disappears shifts what follows it - and moving `children` between two
|
|
204
|
+
// positions would unmount and remount them, the very thing this component exists to
|
|
205
|
+
// avoid. Which control is reachable, and when, is the stylesheet's business: the
|
|
206
|
+
// root carries a modifier per state, and `:empty` tells a control with no content
|
|
207
|
+
// from one that has some.
|
|
208
|
+
return _jsxs("div", { className: rootClss, ref: rootRef, children: [_jsx("div", { className: c('placeholder'), style: isOn && size !== null ? { width: size.width, height: size.height } : undefined }), _jsxs("div", { className: c('backdrop'), onClick: handleBackdropClick, ref: backdropRef, children: [_jsx("div", { className: c('content'), onClick: handleContentClick, children: children }), _jsx("button", { type: 'button', className: c('close-btn'), onClick: handleCloseButtonClick, children: closeBtnContent }), _jsx("button", { type: 'button', className: c('prev-btn'), onClick: handlePrevButtonClick, children: prevBtnContent }), _jsx("button", { type: 'button', className: c('next-btn'), onClick: handleNextButtonClick, children: nextBtnContent })] }), _jsx("button", { type: 'button', className: c('open-btn'), onClick: handleOpenButtonClick, children: openBtnContent })] });
|
|
193
209
|
};
|
|
@@ -2,8 +2,8 @@ export * as copy from './copy/index.js'
|
|
|
2
2
|
export * as download from './download/index.js'
|
|
3
3
|
export * as exists from './exists/index.js'
|
|
4
4
|
export * as generateSignedUrl from './generate-signed-url/index.js'
|
|
5
|
-
export * as getMetadata from './get-metadata/index.js'
|
|
6
5
|
export * as getPermissions from './get-permissions/index.js'
|
|
6
|
+
export * as getMetadata from './get-metadata/index.js'
|
|
7
7
|
export * as move from './move/index.js'
|
|
8
8
|
export * as remove from './remove/index.js'
|
|
9
9
|
export * as revokeSignedUrls from './revoke-signed-urls/index.js'
|
|
@@ -2,8 +2,8 @@ export * as copy from './copy/index.js'
|
|
|
2
2
|
export * as download from './download/index.js'
|
|
3
3
|
export * as exists from './exists/index.js'
|
|
4
4
|
export * as generateSignedUrl from './generate-signed-url/index.js'
|
|
5
|
-
export * as getMetadata from './get-metadata/index.js'
|
|
6
5
|
export * as getPermissions from './get-permissions/index.js'
|
|
6
|
+
export * as getMetadata from './get-metadata/index.js'
|
|
7
7
|
export * as move from './move/index.js'
|
|
8
8
|
export * as remove from './remove/index.js'
|
|
9
9
|
export * as revokeSignedUrls from './revoke-signed-urls/index.js'
|
|
@@ -7,8 +7,8 @@ export * as flip from './flip/index.js'
|
|
|
7
7
|
export * as flop from './flop/index.js'
|
|
8
8
|
export * as hue from './hue/index.js'
|
|
9
9
|
export * as level from './level/index.js'
|
|
10
|
-
export * as lighten from './lighten/index.js'
|
|
11
10
|
export * as normalize from './normalize/index.js'
|
|
11
|
+
export * as lighten from './lighten/index.js'
|
|
12
12
|
export * as overlay from './overlay/index.js'
|
|
13
13
|
export * as resize from './resize/index.js'
|
|
14
14
|
export * as rotate from './rotate/index.js'
|
|
@@ -7,8 +7,8 @@ export * as flip from './flip/index.js'
|
|
|
7
7
|
export * as flop from './flop/index.js'
|
|
8
8
|
export * as hue from './hue/index.js'
|
|
9
9
|
export * as level from './level/index.js'
|
|
10
|
-
export * as lighten from './lighten/index.js'
|
|
11
10
|
export * as normalize from './normalize/index.js'
|
|
11
|
+
export * as lighten from './lighten/index.js'
|
|
12
12
|
export * as overlay from './overlay/index.js'
|
|
13
13
|
export * as resize from './resize/index.js'
|
|
14
14
|
export * as rotate from './rotate/index.js'
|
package/node/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * as awsS3 from './@aws-s3/index.js'
|
|
2
2
|
export * as designEdito from './@design-edito/index.js'
|
|
3
3
|
export * as express from './@express/index.js'
|
|
4
|
+
export * as cloudStorage from './cloud-storage/index.js'
|
|
4
5
|
export * as googleCloud from './@google-cloud/index.js'
|
|
5
6
|
export * as encryption from './encryption/index.js'
|
|
6
7
|
export * as files from './files/index.js'
|
|
7
8
|
export * as ftps from './ftps/index.js'
|
|
8
|
-
export * as cloudStorage from './cloud-storage/index.js'
|
|
9
9
|
export * as images from './images/index.js'
|
|
10
10
|
export * as process from './process/index.js'
|
|
11
11
|
export * as sftp from './sftp/index.js'
|
package/node/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * as awsS3 from './@aws-s3/index.js'
|
|
2
2
|
export * as designEdito from './@design-edito/index.js'
|
|
3
3
|
export * as express from './@express/index.js'
|
|
4
|
+
export * as cloudStorage from './cloud-storage/index.js'
|
|
4
5
|
export * as googleCloud from './@google-cloud/index.js'
|
|
5
6
|
export * as encryption from './encryption/index.js'
|
|
6
7
|
export * as files from './files/index.js'
|
|
7
8
|
export * as ftps from './ftps/index.js'
|
|
8
|
-
export * as cloudStorage from './cloud-storage/index.js'
|
|
9
9
|
export * as images from './images/index.js'
|
|
10
10
|
export * as process from './process/index.js'
|
|
11
11
|
export * as sftp from './sftp/index.js'
|
|
@@ -5,9 +5,33 @@ type Output = {
|
|
|
5
5
|
stderr: string;
|
|
6
6
|
err: unknown;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* How much a spawned command says about itself.
|
|
10
|
+
*
|
|
11
|
+
* Three levels rather than a boolean, because three are genuinely useful in a
|
|
12
|
+
* deployment script:
|
|
13
|
+
*
|
|
14
|
+
* - `'full'` — the label, the echoed command line, and the child's own output as it
|
|
15
|
+
* streams. The default, and what to use for anything whose output is news: a build
|
|
16
|
+
* log, an rsync diff.
|
|
17
|
+
* - `'command'` — the label and the echoed command line, without the child's output.
|
|
18
|
+
* **The level for a probe** — `gcloud projects list`, `npm config get registry` —
|
|
19
|
+
* whose `stdout` is parsed rather than read, and whose two hundred lines of table
|
|
20
|
+
* would bury the narration around it. The echo stays: it is the audit trail, and
|
|
21
|
+
* the last thing worth losing.
|
|
22
|
+
* - `'silent'` — nothing at all. Only for a call already narrated by whatever step
|
|
23
|
+
* contains it.
|
|
24
|
+
*
|
|
25
|
+
* Nothing here is read from the environment on purpose. A deployment that can be run
|
|
26
|
+
* quietly is a deployment whose log you do not have when it breaks, so the choice is
|
|
27
|
+
* made per call, in the source, by whoever knows what that call prints.
|
|
28
|
+
*/
|
|
29
|
+
export type Verbosity = 'full' | 'command' | 'silent';
|
|
8
30
|
type ThisOptions = {
|
|
9
31
|
argsPrintFormat?: (args: string[]) => string[];
|
|
10
32
|
throwOnError?: boolean;
|
|
33
|
+
/** How much to print. Defaults to `'full'`. See {@link Verbosity}. */
|
|
34
|
+
verbosity?: Verbosity;
|
|
11
35
|
};
|
|
12
36
|
/**
|
|
13
37
|
* Options for the asynchronous `spawner` function.
|
|
@@ -18,6 +42,7 @@ type ThisOptions = {
|
|
|
18
42
|
* before they are printed to the console (does not affect execution).
|
|
19
43
|
* - `throwOnError`: If `true`, the function throws when the spawned process exits
|
|
20
44
|
* with a non-zero status instead of returning a failure outcome.
|
|
45
|
+
* - `verbosity`: How much to print — see {@link Verbosity}. Defaults to `'full'`.
|
|
21
46
|
*/
|
|
22
47
|
export type Options = SpawnOptions & ThisOptions;
|
|
23
48
|
/**
|
|
@@ -29,6 +54,7 @@ export type Options = SpawnOptions & ThisOptions;
|
|
|
29
54
|
* before they are printed to the console (does not affect execution).
|
|
30
55
|
* - `throwOnError`: If `true`, the function throws when the spawned process exits
|
|
31
56
|
* with a non-zero status instead of returning a failure outcome.
|
|
57
|
+
* - `verbosity`: How much to print — see {@link Verbosity}. Defaults to `'full'`.
|
|
32
58
|
*/
|
|
33
59
|
export type SyncOptions = SpawnSyncOptions & ThisOptions;
|
|
34
60
|
/**
|
|
@@ -22,13 +22,17 @@ import { unknownToString } from '../../../agnostic/errors/unknown-to-string/inde
|
|
|
22
22
|
* - failure: `{ stdout, stderr, err }` when the command exits with a non-zero code
|
|
23
23
|
*/
|
|
24
24
|
export async function spawner(label, command, args, options) {
|
|
25
|
+
const verbosity = options?.verbosity ?? 'full';
|
|
26
|
+
const printsCommand = verbosity !== 'silent';
|
|
27
|
+
const printsOutput = verbosity === 'full';
|
|
25
28
|
return await new Promise((resolve, reject) => {
|
|
26
|
-
if (label !== null)
|
|
29
|
+
if (label !== null && printsCommand)
|
|
27
30
|
console.log(`\n${styles.info(label)}\n`);
|
|
28
31
|
const printableArgs = options?.argsPrintFormat !== undefined
|
|
29
32
|
? options.argsPrintFormat(args)
|
|
30
33
|
: args;
|
|
31
|
-
|
|
34
|
+
if (printsCommand)
|
|
35
|
+
console.log(styles.light(`> ${command} ${printableArgs.join(' ')}\n`));
|
|
32
36
|
const prcss = spawn(command, args, { stdio: 'pipe', ...options });
|
|
33
37
|
let stdout = '';
|
|
34
38
|
let stderr = '';
|
|
@@ -36,13 +40,17 @@ export async function spawner(label, command, args, options) {
|
|
|
36
40
|
prcss.stdout?.on('data', data => {
|
|
37
41
|
const strData = unknownToString(data);
|
|
38
42
|
stdout += strData;
|
|
39
|
-
|
|
43
|
+
if (printsOutput)
|
|
44
|
+
console.log(styles.light(strData.replace(ansiRegex(), '').trim()));
|
|
40
45
|
});
|
|
41
46
|
prcss.stderr?.on('data', data => {
|
|
42
47
|
const strData = unknownToString(data);
|
|
43
48
|
stderr += strData;
|
|
44
|
-
|
|
49
|
+
if (printsOutput)
|
|
50
|
+
console.log(styles.warning(strData.replace(ansiRegex(), '').trim()));
|
|
45
51
|
});
|
|
52
|
+
// An error is always printed, whatever the verbosity: a command that could not be
|
|
53
|
+
// spawned at all is never the noise the caller asked to be spared.
|
|
46
54
|
prcss.on('error', e => {
|
|
47
55
|
err = e;
|
|
48
56
|
console.log(styles.error(unknownToString(err).replace(ansiRegex(), '').trim()));
|
|
@@ -75,27 +83,32 @@ export async function spawner(label, command, args, options) {
|
|
|
75
83
|
* @throws Error if `throwOnError` is `true` and the process exits with a non-zero status
|
|
76
84
|
*/
|
|
77
85
|
export function spawnerSync(label, command, args, options) {
|
|
78
|
-
|
|
86
|
+
const verbosity = options?.verbosity ?? 'full';
|
|
87
|
+
const printsCommand = verbosity !== 'silent';
|
|
88
|
+
const printsOutput = verbosity === 'full';
|
|
89
|
+
if (label !== null && printsCommand)
|
|
79
90
|
console.log(`\n${styles.info(label)}\n}`);
|
|
80
91
|
const printableArgs = options?.argsPrintFormat !== undefined
|
|
81
92
|
? options.argsPrintFormat(args)
|
|
82
93
|
: args;
|
|
83
|
-
|
|
94
|
+
if (printsCommand)
|
|
95
|
+
console.log(styles.light(`> ${command} ${printableArgs.join(' ')}\n`));
|
|
84
96
|
const result = spawnSync(command, args, { stdio: 'pipe', encoding: 'utf8', ...options });
|
|
85
97
|
const stderr = result.stderr.toString().trim();
|
|
86
98
|
const stdout = result.stdout.toString().trim();
|
|
87
99
|
const err = result.error;
|
|
100
|
+
// Always printed, whatever the verbosity — see the async twin.
|
|
88
101
|
if (err !== undefined) {
|
|
89
102
|
console.log(styles.light(chalk.italic('err:\n')));
|
|
90
103
|
console.log(styles.error(unknownToString(err).replace(ansiRegex(), '')));
|
|
91
104
|
console.log('');
|
|
92
105
|
}
|
|
93
|
-
if (stderr !== '') {
|
|
106
|
+
if (stderr !== '' && printsOutput) {
|
|
94
107
|
console.log(styles.light(chalk.italic('stderr:\n')));
|
|
95
108
|
console.log(styles.warning(stderr.replace(ansiRegex(), '')));
|
|
96
109
|
console.log('');
|
|
97
110
|
}
|
|
98
|
-
if (stdout !== '') {
|
|
111
|
+
if (stdout !== '' && printsOutput) {
|
|
99
112
|
console.log(styles.light(chalk.italic('stdout:\n')));
|
|
100
113
|
console.log(styles.light(stdout.replace(ansiRegex(), '')));
|
|
101
114
|
console.log('');
|
package/node/sftp/index.d.ts
CHANGED
package/node/sftp/index.js
CHANGED