@wocker/utils 1.0.5 → 1.0.7
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/lib/demuxOutput.js +2 -2
- package/lib/promptSelect.d.ts +1 -1
- package/lib/volumeParse.d.ts +2 -1
- package/lib/volumeParse.js +2 -0
- package/package.json +2 -2
package/lib/demuxOutput.js
CHANGED
|
@@ -10,8 +10,8 @@ const demuxOutput = (buffer) => {
|
|
|
10
10
|
output = Buffer.concat([output, content]);
|
|
11
11
|
}
|
|
12
12
|
function bufferSlice(end) {
|
|
13
|
-
const out = buffer.
|
|
14
|
-
buffer = Buffer.from(buffer.
|
|
13
|
+
const out = buffer.subarray(0, end);
|
|
14
|
+
buffer = Buffer.from(buffer.subarray(end, buffer.length));
|
|
15
15
|
return out;
|
|
16
16
|
}
|
|
17
17
|
return output;
|
package/lib/promptSelect.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ type Options = {
|
|
|
10
10
|
default?: string[];
|
|
11
11
|
});
|
|
12
12
|
type ResultType<T extends Options> = T['multiple'] extends true ? string[] : string;
|
|
13
|
-
export declare const promptSelect: <T extends Options>(props: T) => Promise<
|
|
13
|
+
export declare const promptSelect: <R extends ResultType<T>, T extends Options = any>(props: T) => Promise<R>;
|
|
14
14
|
export { Options as PromptSelectOptions };
|
package/lib/volumeParse.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { Volume } from "./volumeFormat";
|
|
2
|
+
export declare const volumeParse: (volume: string) => Volume;
|
package/lib/volumeParse.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.volumeParse = void 0;
|
|
3
4
|
const volumeParse = (volume) => {
|
|
4
5
|
const regVolume = /^([^:]+):([^:]+)(?::([^:]+))?$/;
|
|
5
6
|
const [, source, destination, options] = regVolume.exec(volume) || [];
|
|
@@ -9,3 +10,4 @@ const volumeParse = (volume) => {
|
|
|
9
10
|
options
|
|
10
11
|
};
|
|
11
12
|
};
|
|
13
|
+
exports.volumeParse = volumeParse;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wocker/utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"author": "Kris Papercut <krispcut@gmail.com>",
|
|
5
5
|
"description": "Utils for @wocker",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/inquirer": "^7.3.3",
|
|
31
31
|
"jest": "^29.7.0",
|
|
32
|
-
"typescript": "^5.
|
|
32
|
+
"typescript": "^5.6.3"
|
|
33
33
|
}
|
|
34
34
|
}
|