@multiplatform.one/desktop 7.83.1 → 7.83.2
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/dist/cjs/dialog/index.cjs +60 -0
- package/dist/cjs/dialog/index.native.js +64 -0
- package/dist/cjs/dialog/index.native.js.map +1 -0
- package/dist/cjs/dialog/index.tauri.cjs +74 -0
- package/dist/cjs/dialog/index.tauri.native.js +77 -0
- package/dist/cjs/dialog/index.tauri.native.js.map +1 -0
- package/dist/cjs/fs/index.cjs +50 -0
- package/dist/cjs/fs/index.native.js +53 -0
- package/dist/cjs/fs/index.native.js.map +1 -0
- package/dist/cjs/fs/index.tauri.cjs +51 -0
- package/dist/cjs/fs/index.tauri.native.js +54 -0
- package/dist/cjs/fs/index.tauri.native.js.map +1 -0
- package/dist/cjs/index.cjs +23 -0
- package/dist/cjs/index.native.js +26 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/paths/index.cjs +46 -0
- package/dist/cjs/paths/index.native.js +55 -0
- package/dist/cjs/paths/index.native.js.map +1 -0
- package/dist/cjs/paths/index.tauri.cjs +53 -0
- package/dist/cjs/paths/index.tauri.native.js +62 -0
- package/dist/cjs/paths/index.tauri.native.js.map +1 -0
- package/dist/cjs/updater/index.cjs +38 -0
- package/dist/cjs/updater/index.native.js +41 -0
- package/dist/cjs/updater/index.native.js.map +1 -0
- package/dist/cjs/updater/index.tauri.cjs +104 -0
- package/dist/cjs/updater/index.tauri.native.js +109 -0
- package/dist/cjs/updater/index.tauri.native.js.map +1 -0
- package/dist/esm/dialog/index.mjs +35 -0
- package/dist/esm/dialog/index.mjs.map +1 -0
- package/dist/esm/dialog/index.native.js +36 -0
- package/dist/esm/dialog/index.native.js.map +1 -0
- package/dist/esm/dialog/index.tauri.mjs +49 -0
- package/dist/esm/dialog/index.tauri.mjs.map +1 -0
- package/dist/esm/dialog/index.tauri.native.js +49 -0
- package/dist/esm/dialog/index.tauri.native.js.map +1 -0
- package/dist/esm/fs/index.mjs +25 -0
- package/dist/esm/fs/index.mjs.map +1 -0
- package/dist/esm/fs/index.native.js +25 -0
- package/dist/esm/fs/index.native.js.map +1 -0
- package/dist/esm/fs/index.tauri.mjs +26 -0
- package/dist/esm/fs/index.tauri.mjs.map +1 -0
- package/dist/esm/fs/index.tauri.native.js +26 -0
- package/dist/esm/fs/index.tauri.native.js.map +1 -0
- package/dist/esm/index.mjs +5 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +5 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/paths/index.mjs +21 -0
- package/dist/esm/paths/index.mjs.map +1 -0
- package/dist/esm/paths/index.native.js +27 -0
- package/dist/esm/paths/index.native.js.map +1 -0
- package/dist/esm/paths/index.tauri.mjs +28 -0
- package/dist/esm/paths/index.tauri.mjs.map +1 -0
- package/dist/esm/paths/index.tauri.native.js +34 -0
- package/dist/esm/paths/index.tauri.native.js.map +1 -0
- package/dist/esm/updater/index.mjs +13 -0
- package/dist/esm/updater/index.mjs.map +1 -0
- package/dist/esm/updater/index.native.js +13 -0
- package/dist/esm/updater/index.native.js.map +1 -0
- package/dist/esm/updater/index.tauri.mjs +68 -0
- package/dist/esm/updater/index.tauri.mjs.map +1 -0
- package/dist/esm/updater/index.tauri.native.js +70 -0
- package/dist/esm/updater/index.tauri.native.js.map +1 -0
- package/package.json +12 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","paths_exports","__export","paths","module","exports","getAppPath","getPath","_name","join","_len","arguments","length","segments","Array","_key","resolve"],"sources":["../../../src/paths/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,KAAA,EAAAA,CAAA,KAAAA;AAAA;AASOC,MAAM,CAAAC,OAAkB,GAAAT,YAAA,CAAAK,aAAA;AAAA,IAC7BE,KAAM;EACJ,MAAAG,UAAOA,CAAA;IACT;EACA;EACE,MAAAC,OAAOA,CAAAC,KAAA;IACT;EACA;EACE,MAAAC,IAAOA,CAAA;IACT,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,QAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MACAF,QAAM,CAAAE,IAAW,IAAAJ,SAAoB,CAAAI,IAAA;IACnC;IACF,OAAAF,QAAA,CAAAJ,IAAA;EACA;EACE,MAAAO,OAAMA,CAAA,EAAQ;IACd,SAAMN,IAAI,GAAAC,SAAA,CAAAC,MAAA,EAAAC,QAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MACVF,QAAO,CAAAE,IAAM,IAAKJ,SAAQ,CAAAI,IAAA;IAC5B;IACF,OAAAF,QAAA,CAAAJ,IAAA","ignoreList":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var index_tauri_exports = {};
|
|
24
|
+
__export(index_tauri_exports, {
|
|
25
|
+
paths: () => paths
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(index_tauri_exports);
|
|
28
|
+
var import_core = require("@tauri-apps/api/core");
|
|
29
|
+
const paths = {
|
|
30
|
+
async getAppPath() {
|
|
31
|
+
return (0, import_core.invoke)("get_app_path");
|
|
32
|
+
},
|
|
33
|
+
async getPath(name) {
|
|
34
|
+
return (0, import_core.invoke)("get_path", {
|
|
35
|
+
name
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
async join(...segments) {
|
|
39
|
+
return (0, import_core.invoke)("join_path", {
|
|
40
|
+
segments
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
async resolve(...segments) {
|
|
44
|
+
return (0, import_core.invoke)("resolve_path", {
|
|
45
|
+
segments
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
async dirname(path) {
|
|
49
|
+
return (0, import_core.invoke)("dirname", {
|
|
50
|
+
path
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var index_tauri_exports = {};
|
|
26
|
+
__export(index_tauri_exports, {
|
|
27
|
+
paths: () => paths
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(index_tauri_exports);
|
|
30
|
+
var import_core = require("@tauri-apps/api/core");
|
|
31
|
+
var paths = {
|
|
32
|
+
async getAppPath() {
|
|
33
|
+
return (0, import_core.invoke)("get_app_path");
|
|
34
|
+
},
|
|
35
|
+
async getPath(name) {
|
|
36
|
+
return (0, import_core.invoke)("get_path", {
|
|
37
|
+
name
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
async join() {
|
|
41
|
+
for (var _len = arguments.length, segments = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
42
|
+
segments[_key] = arguments[_key];
|
|
43
|
+
}
|
|
44
|
+
return (0, import_core.invoke)("join_path", {
|
|
45
|
+
segments
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
async resolve() {
|
|
49
|
+
for (var _len = arguments.length, segments = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
50
|
+
segments[_key] = arguments[_key];
|
|
51
|
+
}
|
|
52
|
+
return (0, import_core.invoke)("resolve_path", {
|
|
53
|
+
segments
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
async dirname(path) {
|
|
57
|
+
return (0, import_core.invoke)("dirname", {
|
|
58
|
+
path
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=index.tauri.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_tauri_exports","__export","paths","module","exports","import_core","require","getAppPath","invoke","getPath","name","join","_len","arguments","length","segments","Array","_key"],"sources":["../../../src/paths/index.tauri.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,KAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAuB,CAAAK,mBAAA;AAGhB,IAAAK,WAAwB,GAAAC,OAAA;AAAA,IAC7BJ,KAAM;EACJ,MAAAK,UAAOA,CAAA;IACT,WAAAF,WAAA,CAAAG,MAAA;EACA;EACE,MAAAC,OAAOA,CAAAC,IAAA;IACT,WAAAL,WAAA,CAAAG,MAAA;MACAE;IACE;EACF;EACA,MAAMC,KAAA;IACJ,SAAAC,IAAO,GAAAC,SAAA,CAAAC,MAAe,EAAAC,QAAA,OAAkBC,KAAA,CAAAJ,IAAU,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MACpDF,QAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IACA;IACE,WAAOZ,WAAA,CAAAG,MAAA,EAAe,WAAW,EAAE;MACrCO;IACF","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var updater_exports = {};
|
|
24
|
+
__export(updater_exports, {
|
|
25
|
+
updater: () => updater
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(updater_exports);
|
|
28
|
+
const updater = {
|
|
29
|
+
async checkForUpdates() {
|
|
30
|
+
return null;
|
|
31
|
+
},
|
|
32
|
+
async downloadAndInstall() {
|
|
33
|
+
return false;
|
|
34
|
+
},
|
|
35
|
+
isSupported() {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var updater_exports = {};
|
|
26
|
+
__export(updater_exports, {
|
|
27
|
+
updater: () => updater
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(updater_exports);
|
|
30
|
+
var updater = {
|
|
31
|
+
async checkForUpdates() {
|
|
32
|
+
return null;
|
|
33
|
+
},
|
|
34
|
+
async downloadAndInstall() {
|
|
35
|
+
return false;
|
|
36
|
+
},
|
|
37
|
+
isSupported() {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","updater_exports","__export","updater","module","exports","checkForUpdates","downloadAndInstall","isSupported"],"sources":["../../../src/updater/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAA;AAAA;AAsCOC,MAAM,CAAAC,OAAA,GAAsBT,YAAA,CAAAK,eAAA;AAAA,IACjCE,OAAM;EACJ,MAAAG,eAAOA,CAAA;IACT;EAEA;EACE,MAAAC,kBAAOA,CAAA;IACT;EAEA;EACEC,WAAOA,CAAA;IACT;EACF","ignoreList":[]}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: true
|
|
33
|
+
}), mod);
|
|
34
|
+
var index_tauri_exports = {};
|
|
35
|
+
__export(index_tauri_exports, {
|
|
36
|
+
updater: () => updater
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(index_tauri_exports);
|
|
39
|
+
let _updater = null;
|
|
40
|
+
async function getUpdater() {
|
|
41
|
+
if (!_updater) {
|
|
42
|
+
_updater = await import("@tauri-apps/plugin-updater");
|
|
43
|
+
}
|
|
44
|
+
return _updater;
|
|
45
|
+
}
|
|
46
|
+
const updater = {
|
|
47
|
+
async checkForUpdates() {
|
|
48
|
+
try {
|
|
49
|
+
const {
|
|
50
|
+
check
|
|
51
|
+
} = await getUpdater();
|
|
52
|
+
const update = await check();
|
|
53
|
+
if (update) {
|
|
54
|
+
return {
|
|
55
|
+
version: update.version,
|
|
56
|
+
date: update.date ?? (/* @__PURE__ */new Date()).toISOString(),
|
|
57
|
+
body: update.body ?? void 0
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error("[updater] Failed to check for updates:", error);
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
async downloadAndInstall(onProgress) {
|
|
67
|
+
try {
|
|
68
|
+
const {
|
|
69
|
+
check
|
|
70
|
+
} = await getUpdater();
|
|
71
|
+
const update = await check();
|
|
72
|
+
if (!update) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
let downloaded = 0;
|
|
76
|
+
let contentLength = 0;
|
|
77
|
+
await update.downloadAndInstall(event => {
|
|
78
|
+
switch (event.event) {
|
|
79
|
+
case "Started":
|
|
80
|
+
contentLength = event.data.contentLength ?? 0;
|
|
81
|
+
break;
|
|
82
|
+
case "Progress":
|
|
83
|
+
downloaded += event.data.chunkLength;
|
|
84
|
+
if (onProgress && contentLength > 0) {
|
|
85
|
+
onProgress(Math.round(downloaded / contentLength * 100));
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
case "Finished":
|
|
89
|
+
if (onProgress) {
|
|
90
|
+
onProgress(100);
|
|
91
|
+
}
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
return true;
|
|
96
|
+
} catch (error) {
|
|
97
|
+
console.error("[updater] Failed to download and install update:", error);
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
isSupported() {
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
+
get: () => from[key],
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
+
value: mod,
|
|
31
|
+
enumerable: true
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
}), mod);
|
|
36
|
+
var index_tauri_exports = {};
|
|
37
|
+
__export(index_tauri_exports, {
|
|
38
|
+
updater: () => updater
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(index_tauri_exports);
|
|
41
|
+
var _updater = null;
|
|
42
|
+
async function getUpdater() {
|
|
43
|
+
if (!_updater) {
|
|
44
|
+
_updater = await import("@tauri-apps/plugin-updater");
|
|
45
|
+
}
|
|
46
|
+
return _updater;
|
|
47
|
+
}
|
|
48
|
+
var updater = {
|
|
49
|
+
async checkForUpdates() {
|
|
50
|
+
try {
|
|
51
|
+
var {
|
|
52
|
+
check
|
|
53
|
+
} = await getUpdater();
|
|
54
|
+
var update = await check();
|
|
55
|
+
if (update) {
|
|
56
|
+
var _update_date, _update_body;
|
|
57
|
+
return {
|
|
58
|
+
version: update.version,
|
|
59
|
+
date: (_update_date = update.date) !== null && _update_date !== void 0 ? _update_date : (/* @__PURE__ */new Date()).toISOString(),
|
|
60
|
+
body: (_update_body = update.body) !== null && _update_body !== void 0 ? _update_body : void 0
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
} catch (error) {
|
|
65
|
+
console.error("[updater] Failed to check for updates:", error);
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
async downloadAndInstall(onProgress) {
|
|
70
|
+
try {
|
|
71
|
+
var {
|
|
72
|
+
check
|
|
73
|
+
} = await getUpdater();
|
|
74
|
+
var update = await check();
|
|
75
|
+
if (!update) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
var downloaded = 0;
|
|
79
|
+
var contentLength = 0;
|
|
80
|
+
await update.downloadAndInstall(function (event) {
|
|
81
|
+
switch (event.event) {
|
|
82
|
+
case "Started":
|
|
83
|
+
var _event_data_contentLength;
|
|
84
|
+
contentLength = (_event_data_contentLength = event.data.contentLength) !== null && _event_data_contentLength !== void 0 ? _event_data_contentLength : 0;
|
|
85
|
+
break;
|
|
86
|
+
case "Progress":
|
|
87
|
+
downloaded += event.data.chunkLength;
|
|
88
|
+
if (onProgress && contentLength > 0) {
|
|
89
|
+
onProgress(Math.round(downloaded / contentLength * 100));
|
|
90
|
+
}
|
|
91
|
+
break;
|
|
92
|
+
case "Finished":
|
|
93
|
+
if (onProgress) {
|
|
94
|
+
onProgress(100);
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return true;
|
|
100
|
+
} catch (error) {
|
|
101
|
+
console.error("[updater] Failed to download and install update:", error);
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
isSupported() {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
//# sourceMappingURL=index.tauri.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_tauri_exports","__export","updater","module","exports","_updater","getUpdater","checkForUpdates","check","update","_update_date","_update_body","version","date","Date","toISOString","body","error","console","downloadAndInstall","onProgress","downloaded","contentLength","event","_event_data_contentLength","data","chunkLength","Math","round","isSupported"],"sources":["../../../src/updater/index.tauri.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAA;AAAA;AAWAC,MAAI,CAAAC,OAAA,GAA+DT,YAAA,CAAAK,mBAAA;AAEnE,IAAAK,QAAA,GAAe;AACb,eAAKC,UAAUA,CAAA;EACb,KAAAD,QAAW;IACbA,QAAA;EACA;EACF,OAAAA,QAAA;AAEO;AAA4B,IACjCH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List":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function browserDialog(name, api) {
|
|
2
|
+
const fn = typeof window === "undefined" ? void 0 : window[name];
|
|
3
|
+
if (typeof fn !== "function") {
|
|
4
|
+
throw new Error(`@multiplatform.one/desktop: dialog.${api} needs window.${name}, which this platform does not have. The dialog defaults are the browser's modal globals and are web-only; GNOME needs an Adw.AlertDialog backend in dialog/index.gnome.ts.`);
|
|
5
|
+
}
|
|
6
|
+
return fn.bind(window);
|
|
7
|
+
}
|
|
8
|
+
const dialog = {
|
|
9
|
+
async open(_options) {
|
|
10
|
+
return null;
|
|
11
|
+
},
|
|
12
|
+
async save(_options) {
|
|
13
|
+
return null;
|
|
14
|
+
},
|
|
15
|
+
async message(message, options) {
|
|
16
|
+
browserDialog("alert", "message")(options?.title ? `${options.title}
|
|
17
|
+
|
|
18
|
+
${message}` : message);
|
|
19
|
+
},
|
|
20
|
+
async ask(message, options) {
|
|
21
|
+
return browserDialog("confirm", "ask")(options?.title ? `${options.title}
|
|
22
|
+
|
|
23
|
+
${message}` : message);
|
|
24
|
+
},
|
|
25
|
+
async confirm(message, options) {
|
|
26
|
+
return browserDialog("confirm", "confirm")(options?.title ? `${options.title}
|
|
27
|
+
|
|
28
|
+
${message}` : message);
|
|
29
|
+
},
|
|
30
|
+
async prompt(message, defaultValue = "") {
|
|
31
|
+
return browserDialog("prompt", "prompt")(message, defaultValue);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export { dialog };
|
|
35
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["browserDialog","name","api","fn","window","Error","bind","dialog","open","_options","save","message","options","title","ask","confirm","prompt","defaultValue"],"sources":["../../../src/dialog/index.ts"],"sourcesContent":[null],"mappings":"AA4DA,SAASA,cACPC,IAAA,EACAC,GAAA,EAC2B;EAC3B,MAAMC,EAAA,GAAK,OAAOC,MAAA,KAAW,cAAc,SAAYA,MAAA,CAAOH,IAAI;EAClE,IAAI,OAAOE,EAAA,KAAO,YAAY;IAC5B,MAAM,IAAIE,KAAA,CACR,sCAAsCH,GAAG,iBAAiBD,IAAI,6KAGhE;EACF;EACA,OAAOE,EAAA,CAAGG,IAAA,CAAKF,MAAM;AACvB;AAEO,MAAMG,MAAA,GAAoB;EAC/B,MAAMC,KAAKC,QAAA,EAAiE;IAG1E,OAAO;EACT;EACA,MAAMC,KAAKD,QAAA,EAAsD;IAC/D,OAAO;EACT;EACA,MAAME,QAAQA,OAAA,EAAiBC,OAAA,EAA+C;IAC5EZ,aAAA,CAAc,SAAS,SAAS,EAAEY,OAAA,EAASC,KAAA,GAAQ,GAAGD,OAAA,CAAQC,KAAK;AAAA;AAAA,EAAOF,OAAO,KAAKA,OAAO;EAC/F;EACA,MAAMG,IAAIH,OAAA,EAAiBC,OAAA,EAAkD;IAC3E,OAAOZ,aAAA,CACL,WACA,KACF,EAAEY,OAAA,EAASC,KAAA,GAAQ,GAAGD,OAAA,CAAQC,KAAK;AAAA;AAAA,EAAOF,OAAO,KAAKA,OAAO;EAC/D;EACA,MAAMI,QAAQJ,OAAA,EAAiBC,OAAA,EAAkD;IAC/E,OAAOZ,aAAA,CACL,WACA,SACF,EAAEY,OAAA,EAASC,KAAA,GAAQ,GAAGD,OAAA,CAAQC,KAAK;AAAA;AAAA,EAAOF,OAAO,KAAKA,OAAO;EAC/D;EACA,MAAMK,OAAOL,OAAA,EAAiBM,YAAA,GAAe,IAA4B;IACvE,OAAOjB,aAAA,CAAc,UAAU,QAAQ,EAAEW,OAAA,EAASM,YAAY;EAChE;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function browserDialog(name, api) {
|
|
2
|
+
var fn = typeof window === "undefined" ? void 0 : window[name];
|
|
3
|
+
if (typeof fn !== "function") {
|
|
4
|
+
throw new Error(`@multiplatform.one/desktop: dialog.${api} needs window.${name}, which this platform does not have. The dialog defaults are the browser's modal globals and are web-only; GNOME needs an Adw.AlertDialog backend in dialog/index.gnome.ts.`);
|
|
5
|
+
}
|
|
6
|
+
return fn.bind(window);
|
|
7
|
+
}
|
|
8
|
+
var dialog = {
|
|
9
|
+
async open(_options) {
|
|
10
|
+
return null;
|
|
11
|
+
},
|
|
12
|
+
async save(_options) {
|
|
13
|
+
return null;
|
|
14
|
+
},
|
|
15
|
+
async message(message, options) {
|
|
16
|
+
browserDialog("alert", "message")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
|
|
17
|
+
|
|
18
|
+
${message}` : message);
|
|
19
|
+
},
|
|
20
|
+
async ask(message, options) {
|
|
21
|
+
return browserDialog("confirm", "ask")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
|
|
22
|
+
|
|
23
|
+
${message}` : message);
|
|
24
|
+
},
|
|
25
|
+
async confirm(message, options) {
|
|
26
|
+
return browserDialog("confirm", "confirm")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
|
|
27
|
+
|
|
28
|
+
${message}` : message);
|
|
29
|
+
},
|
|
30
|
+
async prompt(message) {
|
|
31
|
+
var defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
32
|
+
return browserDialog("prompt", "prompt")(message, defaultValue);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export { dialog };
|
|
36
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["browserDialog","name","api","fn","window","Error","bind","dialog","open","_options","save","message","options","title","ask","confirm","prompt","defaultValue","arguments","length"],"sources":["../../../src/dialog/index.ts"],"sourcesContent":[null],"mappings":"AA4DA,SAASA,cACPC,IAAA,EACAC,GAAA,EAC2B;EAC3B,IAAAC,EAAM,UAAKC,MAAO,gBAAW,QAAc,IAAAA,MAAY,CAAAH,IAAO;EAC9D,IAAI,OAAOE,EAAA,KAAO,YAAY;IAC5B,MAAM,IAAIE,KAAA,uCAAAH,GAAA,iBAAAD,IAAA;EAAA;EACsD,OAGhEE,EAAA,CAAAG,IAAA,CAAAF,MAAA;AAAA;AAEF,IAAAG,MAAO,GAAG;EACZ,MAAAC,KAAAC,QAAA;IAEO,OAAM,IAAoB;EAC/B;EAGE,MAAAC,IAAOA,CAAAD,QAAA;IACT;EACA;EACE,MAAAE,OAAOA,QAAA,EAAAC,OAAA;IACTZ,aAAA,sBAAAY,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAC,KAAA,OAAAD,OAAA,CAAAC,KAAA;AAAA;AAEE,EAAAF,OAAA,KAAAA,OAAc;EAAqD;EAAO,MAAAG,GAAOA,CAAAH,OAAK,EAAOC,OAAA;IAC/F,OAAAZ,aAAA,oBAAAY,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAC,KAAA,OAAAD,OAAA,CAAAC,KAAA;AAAA;AAEE,EAAAF,OAAA,EAAO,GAAAA,OAAA;EAAA;EACL,MACAI,QAAAJ,OAAA,EAAAC,OAAA;IACF,OAAEZ,aAAiB,UAAW,WAAK,GAAAY,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAC,KAAA,OAAAD,OAAA,CAAAC,KAAA;AAAA;AAAA,EAAOF,OAAO,KAAKA,OAAO;EAC/D;EACA,MAAMK,OAAAL,OAAQ;IACZ,IAAAM,YAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;IAAA,OACLlB,aAAA,qBAAAW,OAAA,EAAAM,YAAA;EAAA;AACA;AACiC,SAAOV,MAAA","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { open as tauriOpen, save as tauriSave, message as tauriMessage, ask as tauriAsk, confirm as tauriConfirm } from "@tauri-apps/plugin-dialog";
|
|
2
|
+
const dialog = {
|
|
3
|
+
async open(options) {
|
|
4
|
+
const result = await tauriOpen({
|
|
5
|
+
title: options?.title,
|
|
6
|
+
defaultPath: options?.defaultPath,
|
|
7
|
+
filters: options?.filters,
|
|
8
|
+
multiple: options?.multiple,
|
|
9
|
+
directory: options?.directory
|
|
10
|
+
});
|
|
11
|
+
return result;
|
|
12
|
+
},
|
|
13
|
+
async save(options) {
|
|
14
|
+
const result = await tauriSave({
|
|
15
|
+
title: options?.title,
|
|
16
|
+
defaultPath: options?.defaultPath,
|
|
17
|
+
filters: options?.filters
|
|
18
|
+
});
|
|
19
|
+
return result;
|
|
20
|
+
},
|
|
21
|
+
async message(message, options) {
|
|
22
|
+
await tauriMessage(message, {
|
|
23
|
+
title: options?.title,
|
|
24
|
+
kind: options?.kind,
|
|
25
|
+
okLabel: options?.okLabel
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
async ask(message, options) {
|
|
29
|
+
return tauriAsk(message, {
|
|
30
|
+
title: options?.title,
|
|
31
|
+
kind: options?.kind,
|
|
32
|
+
okLabel: options?.okLabel,
|
|
33
|
+
cancelLabel: options?.cancelLabel
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
async confirm(message, options) {
|
|
37
|
+
return tauriConfirm(message, {
|
|
38
|
+
title: options?.title,
|
|
39
|
+
kind: options?.kind,
|
|
40
|
+
okLabel: options?.okLabel,
|
|
41
|
+
cancelLabel: options?.cancelLabel
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
async prompt(_message, _defaultValue) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export { dialog };
|
|
49
|
+
//# sourceMappingURL=index.tauri.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["open","tauriOpen","save","tauriSave","message","tauriMessage","ask","tauriAsk","confirm","tauriConfirm","dialog","options","result","title","defaultPath","filters","multiple","directory","kind","okLabel","cancelLabel","prompt","_message","_defaultValue"],"sources":["../../../src/dialog/index.tauri.ts"],"sourcesContent":[null],"mappings":"AAAA,SACEA,IAAA,IAAQC,SAAA,EACRC,IAAA,IAAQC,SAAA,EACRC,OAAA,IAAWC,YAAA,EACXC,GAAA,IAAOC,QAAA,EACPC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AASQ,OAAA;MAClBC,WAAA,EAAaT,OAAA,EAASS;IACxB,CAAC;EACH;EACA,MAAMC,OAAOC,QAAA,EAAkBC,aAAA,EAAgD;IAC7E,OAAO;EACT;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { open as tauriOpen, save as tauriSave, message as tauriMessage, ask as tauriAsk, confirm as tauriConfirm } from "@tauri-apps/plugin-dialog";
|
|
2
|
+
var dialog = {
|
|
3
|
+
async open(options) {
|
|
4
|
+
var result = await tauriOpen({
|
|
5
|
+
title: options === null || options === void 0 ? void 0 : options.title,
|
|
6
|
+
defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,
|
|
7
|
+
filters: options === null || options === void 0 ? void 0 : options.filters,
|
|
8
|
+
multiple: options === null || options === void 0 ? void 0 : options.multiple,
|
|
9
|
+
directory: options === null || options === void 0 ? void 0 : options.directory
|
|
10
|
+
});
|
|
11
|
+
return result;
|
|
12
|
+
},
|
|
13
|
+
async save(options) {
|
|
14
|
+
var result = await tauriSave({
|
|
15
|
+
title: options === null || options === void 0 ? void 0 : options.title,
|
|
16
|
+
defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,
|
|
17
|
+
filters: options === null || options === void 0 ? void 0 : options.filters
|
|
18
|
+
});
|
|
19
|
+
return result;
|
|
20
|
+
},
|
|
21
|
+
async message(message, options) {
|
|
22
|
+
await tauriMessage(message, {
|
|
23
|
+
title: options === null || options === void 0 ? void 0 : options.title,
|
|
24
|
+
kind: options === null || options === void 0 ? void 0 : options.kind,
|
|
25
|
+
okLabel: options === null || options === void 0 ? void 0 : options.okLabel
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
async ask(message, options) {
|
|
29
|
+
return tauriAsk(message, {
|
|
30
|
+
title: options === null || options === void 0 ? void 0 : options.title,
|
|
31
|
+
kind: options === null || options === void 0 ? void 0 : options.kind,
|
|
32
|
+
okLabel: options === null || options === void 0 ? void 0 : options.okLabel,
|
|
33
|
+
cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
async confirm(message, options) {
|
|
37
|
+
return tauriConfirm(message, {
|
|
38
|
+
title: options === null || options === void 0 ? void 0 : options.title,
|
|
39
|
+
kind: options === null || options === void 0 ? void 0 : options.kind,
|
|
40
|
+
okLabel: options === null || options === void 0 ? void 0 : options.okLabel,
|
|
41
|
+
cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
async prompt(_message, _defaultValue) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export { dialog };
|
|
49
|
+
//# sourceMappingURL=index.tauri.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["open","tauriOpen","save","tauriSave","message","tauriMessage","ask","tauriAsk","confirm","tauriConfirm","dialog","options","result","title","defaultPath","filters","multiple","directory","kind","okLabel","cancelLabel","prompt","_message","_defaultValue"],"sources":["../../../src/dialog/index.tauri.ts"],"sourcesContent":[null],"mappings":"AAAA,SAAAA,IAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,SAAA,EAAAC,OAAA,IAAAC,YAAA,EAAAC,GAAA,IAAAC,QAAA,EAAAC,OAAA,IAAAC,YAAA;AAAA,IACEC,MAAQ;EACR,MAAAV,IAAQA,CAAAW,OAAA;IACR,IAAAC,MAAW,SAAAX,SAAA;MACXY,KAAO,EAAAF,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAE,KAAA;MACPC,WAAW,EAAAH,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAG,WAAA;MAAAC,OACN,EAAAJ,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAI,OAAA;MASMC,QAAA,EAAoBL,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAK,QAAA;MAC/BC,SAAW,EAAAN,OAAgE,aAAAA,OAAA,uBAAAA,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,EAAAR,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAQ,OAAA;MACHC,WAAA,EAAAT,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAS;IACA;EACE;EAA6B,MAC3BC,MAAOA,CAAAC,QAAS,EAAAC,aAAA;IAAA,OAChB,IAAM;EAAS;AACG;AACI,SAE1Bb,MAAA","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const fs = {
|
|
2
|
+
async readTextFile(_path) {
|
|
3
|
+
throw new Error("File system not available in browser");
|
|
4
|
+
},
|
|
5
|
+
async writeTextFile(_path, _contents) {
|
|
6
|
+
throw new Error("File system not available in browser");
|
|
7
|
+
},
|
|
8
|
+
async exists(_path) {
|
|
9
|
+
throw new Error("File system not available in browser");
|
|
10
|
+
},
|
|
11
|
+
async mkdir(_path, _options) {
|
|
12
|
+
throw new Error("File system not available in browser");
|
|
13
|
+
},
|
|
14
|
+
async remove(_path, _options) {
|
|
15
|
+
throw new Error("File system not available in browser");
|
|
16
|
+
},
|
|
17
|
+
async rename(_oldPath, _newPath) {
|
|
18
|
+
throw new Error("File system not available in browser");
|
|
19
|
+
},
|
|
20
|
+
async copyFile(_src, _dst) {
|
|
21
|
+
throw new Error("File system not available in browser");
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export { fs };
|
|
25
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["fs","readTextFile","_path","Error","writeTextFile","_contents","exists","mkdir","_options","remove","rename","_oldPath","_newPath","copyFile","_src","_dst"],"sources":["../../../src/fs/index.ts"],"sourcesContent":[null],"mappings":"AAWO,MAAMA,EAAA,GAAY;EACvB,MAAMC,aAAaC,KAAA,EAAgC;IACjD,MAAM,IAAIC,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMC,cAAcF,KAAA,EAAeG,SAAA,EAAkC;IACnE,MAAM,IAAIF,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMG,OAAOJ,KAAA,EAAiC;IAC5C,MAAM,IAAIC,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMI,MAAML,KAAA,EAAeM,QAAA,EAAmD;IAC5E,MAAM,IAAIL,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMM,OAAOP,KAAA,EAAeM,QAAA,EAAmD;IAC7E,MAAM,IAAIL,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMO,OAAOC,QAAA,EAAkBC,QAAA,EAAiC;IAC9D,MAAM,IAAIT,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMU,SAASC,IAAA,EAAcC,IAAA,EAA6B;IACxD,MAAM,IAAIZ,KAAA,CAAM,sCAAsC;EACxD;AACF","ignoreList":[]}
|