@mittwald/flow-remote-core 0.2.0-alpha.858 → 0.2.0-alpha.859
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.
|
@@ -7,7 +7,9 @@ function isFileWithAwaitedArrayBuffer(file) {
|
|
|
7
7
|
const getAwaitArrayBuffer = (file) => {
|
|
8
8
|
invariant(
|
|
9
9
|
isFileWithAwaitedArrayBuffer(file),
|
|
10
|
-
|
|
10
|
+
`File buffer unavailable (objectType=${Object.prototype.toString.call(
|
|
11
|
+
file
|
|
12
|
+
)}, hasArrayBuffer=${Key in file && file[Key] instanceof ArrayBuffer}, isDetached=${Key in file && file[Key] instanceof ArrayBuffer ? file[Key].detached : "n/a"})`
|
|
11
13
|
);
|
|
12
14
|
return file[Key];
|
|
13
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.mjs","sources":["../../../../../core/src/file.ts"],"sourcesContent":["import invariant from \"invariant\";\n\nconst Key = \"mittwald.flow-core.file.awaitedArrayBuffer\";\n\nexport type FileWithAwaitedArrayBuffer = File & {\n [Key]: ArrayBuffer;\n};\n\nexport function isFileWithAwaitedArrayBuffer(\n file: File | FileWithAwaitedArrayBuffer,\n): file is FileWithAwaitedArrayBuffer {\n return Key in file && file[Key] instanceof ArrayBuffer && !file[Key].detached;\n}\n\nexport const addAwaitedArrayBuffer = async (file: File) => {\n if (isFileWithAwaitedArrayBuffer(file)) {\n return file;\n }\n\n const arrayBuffer = await file.arrayBuffer();\n Object.assign(file, { [Key]: arrayBuffer });\n\n return file;\n};\n\nexport const getAwaitArrayBuffer = (\n file: File | FileWithAwaitedArrayBuffer,\n) => {\n invariant(\n isFileWithAwaitedArrayBuffer(file),\n \
|
|
1
|
+
{"version":3,"file":"file.mjs","sources":["../../../../../core/src/file.ts"],"sourcesContent":["import invariant from \"invariant\";\n\nconst Key = \"mittwald.flow-core.file.awaitedArrayBuffer\";\n\nexport type FileWithAwaitedArrayBuffer = File & {\n [Key]: ArrayBuffer;\n};\n\nexport function isFileWithAwaitedArrayBuffer(\n file: File | FileWithAwaitedArrayBuffer,\n): file is FileWithAwaitedArrayBuffer {\n return Key in file && file[Key] instanceof ArrayBuffer && !file[Key].detached;\n}\n\nexport const addAwaitedArrayBuffer = async (file: File) => {\n if (isFileWithAwaitedArrayBuffer(file)) {\n return file;\n }\n\n const arrayBuffer = await file.arrayBuffer();\n Object.assign(file, { [Key]: arrayBuffer });\n\n return file;\n};\n\nexport const getAwaitArrayBuffer = (\n file: File | FileWithAwaitedArrayBuffer,\n) => {\n invariant(\n isFileWithAwaitedArrayBuffer(file),\n `File buffer unavailable (objectType=${Object.prototype.toString.call(\n file,\n )}, hasArrayBuffer=${\n Key in file && file[Key] instanceof ArrayBuffer\n }, isDetached=${\n Key in file && file[Key] instanceof ArrayBuffer\n ? file[Key].detached\n : \"n/a\"\n })`,\n );\n return file[Key];\n};\n"],"names":[],"mappings":";;AAEA,MAAM,GAAA,GAAM,4CAAA;AAML,SAAS,6BACd,IAAA,EACoC;AACpC,EAAA,OAAO,GAAA,IAAO,QAAQ,IAAA,CAAK,GAAG,aAAa,WAAA,IAAe,CAAC,IAAA,CAAK,GAAG,CAAA,CAAE,QAAA;AACvE;AAaO,MAAM,mBAAA,GAAsB,CACjC,IAAA,KACG;AACH,EAAA,SAAA;AAAA,IACE,6BAA6B,IAAI,CAAA;AAAA,IACjC,CAAA,oCAAA,EAAuC,MAAA,CAAO,SAAA,CAAU,QAAA,CAAS,IAAA;AAAA,MAC/D;AAAA,KACD,CAAA,iBAAA,EACC,GAAA,IAAO,QAAQ,IAAA,CAAK,GAAG,aAAa,WACtC,CAAA,aAAA,EACE,OAAO,IAAA,IAAQ,IAAA,CAAK,GAAG,CAAA,YAAa,WAAA,GAChC,KAAK,GAAG,CAAA,CAAE,WACV,KACN,CAAA,CAAA;AAAA,GACF;AACA,EAAA,OAAO,KAAK,GAAG,CAAA;AACjB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-remote-core",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.859",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Core functionality to setup a remote/host environment",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"remeda": "^2.33.6"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@mittwald/ext-bridge": "0.2.0-alpha.
|
|
37
|
+
"@mittwald/ext-bridge": "0.2.0-alpha.859",
|
|
38
38
|
"@mittwald/flow-core": "",
|
|
39
|
-
"@mittwald/flow-react-components": "0.2.0-alpha.
|
|
39
|
+
"@mittwald/flow-react-components": "0.2.0-alpha.859",
|
|
40
40
|
"@mittwald/typescript-config": "",
|
|
41
41
|
"@types/node": "^24.12.0",
|
|
42
42
|
"nx": "^22.5.4",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"vitest": "^4.0.18"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@mittwald/ext-bridge": "0.2.0-alpha.
|
|
55
|
-
"@mittwald/flow-react-components": "0.2.0-alpha.
|
|
54
|
+
"@mittwald/ext-bridge": "0.2.0-alpha.858",
|
|
55
|
+
"@mittwald/flow-react-components": "0.2.0-alpha.858"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
58
58
|
"@mittwald/ext-bridge": {
|
|
59
59
|
"optional": true
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "884d13e03ca9255f9b6c74f980c6a8c91468e7bb"
|
|
63
63
|
}
|