@tauri-apps/cli
Advanced tools
Comparing version 1.0.0-beta.5 to 1.0.0-beta.6
# Changelog | ||
## \[1.0.0-beta.6] | ||
- Run powershell commands with `-NoProfile` flag | ||
- [3e6f3416](https://www.github.com/tauri-apps/tauri/commit/3e6f34160deab4f774d90aba28122e5b6b6f9db2) fix(cli.rs): run powershell kill command without profile ([#2130](https://www.github.com/tauri-apps/tauri/pull/2130)) on 2021-06-30 | ||
- Throw error on `cli.rs` download failure instead of silent exit. | ||
- [fd033464](https://www.github.com/tauri-apps/tauri/commit/fd0334645b415b8be574d44256194f601227cb40) fix: tauri init may failed with no error message. (fix [#2079](https://www.github.com/tauri-apps/tauri/pull/2079)) ([#2117](https://www.github.com/tauri-apps/tauri/pull/2117)) on 2021-06-30 | ||
## \[1.0.0-beta.5] | ||
@@ -4,0 +11,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tauri=t():e.tauri=t()}(this,(function(){return e={210:e=>{e.exports={workspace:{},package:{name:"tauri-cli",version:"1.0.0-beta.4",authors:["Tauri Programme within The Commons Conservancy"],edition:"2018",categories:["gui","web-programming"],license:"Apache-2.0 OR MIT",homepage:"https://tauri.studio",repository:"https://github.com/tauri-apps/tauri",description:"Command line interface for building Tauri apps",include:["src/","/templates","MergeModules/","*.json","*.rs"]},bin:[{name:"cargo-tauri",path:"src/main.rs"}],dependencies:{clap:{version:"3.0.0-beta.2",features:["yaml"]},anyhow:"1.0","tauri-bundler":{version:"1.0.0-beta.2",path:"../bundler"},colored:"2.0",once_cell:"1.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9",notify:"4.0",shared_child:"0.3",toml_edit:"0.2","json-patch":"0.2",schemars:"0.8",toml:"0.5",valico:"3.6",handlebars:"4.0",include_dir:"0.6",minisign:"0.6",base64:"0.13.0",ureq:"2.1",os_info:"3.0",semver:"1.0",regex:"1.5",lazy_static:"1",libc:"0.2",terminal_size:"0.1","unicode-width":"0.1",tempfile:"3",zeroize:"1.3"},target:{"cfg(windows)":{dependencies:{winapi:{version:"0.3",features:["winbase","winuser","consoleapi","processenv","wincon"]},encode_unicode:"0.3"}},'cfg(target_os = "linux")':{dependencies:{heck:"0.3"}}},"build-dependencies":{schemars:"0.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9"}}},857:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.build=t.dev=t.init=void 0;var o=n(889);function s(e,t){return r(this,void 0,void 0,(function(){var n,r,s,a,u,c;return i(this,(function(i){switch(i.label){case 0:for(n=[],r=0,s=Object.entries(null!=t?t:{});r<s.length;r++)a=s[r],u=a[0],!1!==(c=a[1])&&(n.push("--"+u.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()),!0!==c&&n.push("string"==typeof c?c:JSON.stringify(c)));return[4,o.runOnRustCli(e,n)];case 1:return[2,i.sent()]}}))}))}t.init=function(e){return r(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,s("init",e)];case 1:return[2,t.sent()]}}))}))},t.dev=function(e){return r(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,s("dev",e)];case 1:return[2,t.sent()]}}))}))},t.build=function(e){return r(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,s("build",e)];case 1:return[2,t.sent()]}}))}))}},632:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.downloadRustup=t.downloadCli=void 0;var s=o(n(413)),a=n(669),u=o(n(747)),c=o(n(301)),l=o(n(622)),f=a.promisify(s.default.pipeline),d=n(210),p={};function h(e,t,n){return r(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r="https://github.com/tauri-apps/binary-releases/releases/download/"+e+"/"+t,o=function(){try{r in p||u.default.unlinkSync(n)}finally{process.exit()}},process.on("exit",o),process.on("SIGINT",o),process.on("SIGTERM",o),process.on("SIGHUP",o),process.on("SIGBREAK",o),[4,f(c.default.stream(r),u.default.createWriteStream(n)).catch((function(e){throw o(),e}))];case 1:return i.sent(),p[r]=!0,u.default.chmodSync(n,448),console.log("Download Complete"),[2]}}))}))}t.downloadCli=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:if(e=d.package.version,"win32"===(t=process.platform))t="windows";else if("linux"===t)t="linux";else{if("darwin"!==t)throw Error("Unsupported platform");t="macos"}return n="windows"===t?".exe":"",r=l.default.join(__dirname,"../../bin/tauri-cli"+n),console.log("Downloading Rust CLI..."),[4,h("tauri-cli-v"+e,"tauri-cli_"+t+n,r)];case 1:return i.sent(),[2]}}))}))},t.downloadRustup=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e="win32"===process.platform?"rustup-init.exe":"rustup-init.sh",console.log("Downloading Rustup..."),[4,h("rustup",e,l.default.join(__dirname,"../../bin/"+e))];case 1:return[2,t.sent()]}}))}))}},976:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i,o=r(n(242)),s=r(n(517));t.default=function(e,t){return void 0===t&&(t=o.default.green),function(n){var r=+new Date,a=r-(i||r);i=r,n?console.log(" "+t(String(e))+" "+n+" "+o.default.green("+"+s.default(a))):console.log()}}},889:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.runOnRustCli=void 0;var s=n(747),a=n(622),u=n(71),c=n(632);t.runOnRustCli=function(e,t){return r(this,void 0,void 0,(function(){var r,l,f,d,p,h,v,w,b;return i(this,(function(i){switch(i.label){case 0:return r=a.resolve(__dirname,"../.."),l=a.join(r,"bin/tauri-cli"+("win32"===process.platform?".exe":"")),h=new Promise((function(e,t){f=e,d=function(){return t(new Error)}})),v=function(e,t){0===e?f():d()},s.existsSync(l)?(p=u.spawn(l,o(["tauri",e],t),process.cwd(),v),[3,4]):[3,1];case 1:return[4,c.downloadCli()];case 2:return i.sent(),p=u.spawn(l,o(["tauri",e],t),process.cwd(),v),[3,4];case 3:s.existsSync(a.resolve(r,"../bundler"))?(w=a.resolve(r,"../cli.rs"),u.spawnSync("cargo",["build","--release"],w),b=a.resolve(r,"../cli.rs/target/release/cargo-tauri"),p=u.spawn(b,o(["tauri",e],t),process.cwd(),v)):(u.spawnSync("cargo",["install","--root",r,"tauri-cli","--version",n(210).package.version],process.cwd()),p=u.spawn(l,o(["tauri",e],t),process.cwd(),v)),i.label=4;case 4:return[2,{pid:p,promise:h}]}}))}))}},71:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.spawnSync=t.spawn=void 0;var i=r(n(793)),o=r(n(976)),s=r(n(242)),a=o.default("app:spawn"),u=o.default("app:spawn",s.default.red);t.spawn=function(e,t,n,r){var o;a('Running "'+e+" "+t.join(" ")+'"'),a();var s=i.default(e,t,{stdio:"inherit",cwd:n,env:process.env});return s.on("close",(function(t){var n;a(),t&&a('Command "'+e+'" failed with exit code: '+t),r&&r(null!=t?t:0,null!==(n=s.pid)&&void 0!==n?n:0)})),null!==(o=s.pid)&&void 0!==o?o:0},t.spawnSync=function(e,t,n,r){a('[sync] Running "'+e+" "+t.join(" ")+'"'),a();var o=i.default.sync(e,t,{stdio:"inherit",cwd:n});(o.status||o.error)&&(u(),u('⚠️ Command "'+e+'" failed with exit code: '+o.status),null===o.status&&u('⚠️ Please globally install "'+e+'"'),r&&r(),process.exit(1))}},242:e=>{"use strict";e.exports=require("chalk")},793:e=>{"use strict";e.exports=require("cross-spawn")},747:e=>{"use strict";e.exports=require("fs")},301:e=>{"use strict";e.exports=require("got")},517:e=>{"use strict";e.exports=require("ms")},622:e=>{"use strict";e.exports=require("path")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}},t={},function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(857);var e,t})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tauri=t():e.tauri=t()}(this,(function(){return e={210:e=>{e.exports={workspace:{},package:{name:"tauri-cli",version:"1.0.0-beta.5",authors:["Tauri Programme within The Commons Conservancy"],edition:"2018",categories:["gui","web-programming"],license:"Apache-2.0 OR MIT",homepage:"https://tauri.studio",repository:"https://github.com/tauri-apps/tauri",description:"Command line interface for building Tauri apps",include:["src/","/templates","MergeModules/","*.json","*.rs"]},bin:[{name:"cargo-tauri",path:"src/main.rs"}],dependencies:{clap:{version:"3.0.0-beta.2",features:["yaml"]},anyhow:"1.0","tauri-bundler":{version:"1.0.0-beta.3",path:"../bundler"},colored:"2.0",once_cell:"1.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9",notify:"4.0",shared_child:"0.3",toml_edit:"0.2","json-patch":"0.2",schemars:"0.8",toml:"0.5",valico:"3.6",handlebars:"4.1",include_dir:"0.6",minisign:"0.6",base64:"0.13.0",ureq:"2.1",os_info:"3.0",semver:"1.0",regex:"1.5",lazy_static:"1",libc:"0.2",terminal_size:"0.1","unicode-width":"0.1",tempfile:"3",zeroize:"1.3"},target:{"cfg(windows)":{dependencies:{winapi:{version:"0.3",features:["winbase","winuser","consoleapi","processenv","wincon"]},encode_unicode:"0.3"}},'cfg(target_os = "linux")':{dependencies:{heck:"0.3"}}},"build-dependencies":{schemars:"0.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9"}}},857:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.build=t.dev=t.init=void 0;var o=n(889);function s(e,t){return r(this,void 0,void 0,(function(){var n,r,s,a,u,c;return i(this,(function(i){switch(i.label){case 0:for(n=[],r=0,s=Object.entries(null!=t?t:{});r<s.length;r++)a=s[r],u=a[0],!1!==(c=a[1])&&(n.push("--"+u.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()),!0!==c&&n.push("string"==typeof c?c:JSON.stringify(c)));return[4,o.runOnRustCli(e,n)];case 1:return[2,i.sent()]}}))}))}t.init=function(e){return r(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,s("init",e)];case 1:return[2,t.sent()]}}))}))},t.dev=function(e){return r(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,s("dev",e)];case 1:return[2,t.sent()]}}))}))},t.build=function(e){return r(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,s("build",e)];case 1:return[2,t.sent()]}}))}))}},632:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.downloadRustup=t.downloadCli=void 0;var s=o(n(413)),a=n(669),u=o(n(747)),c=o(n(301)),l=o(n(622)),f=a.promisify(s.default.pipeline),d=n(210),p={};function h(e,t,n){return r(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r="https://github.com/tauri-apps/binary-releases/releases/download/"+e+"/"+t,o=function(){try{r in p||u.default.unlinkSync(n)}finally{process.exit()}},process.on("exit",o),process.on("SIGINT",o),process.on("SIGTERM",o),process.on("SIGHUP",o),process.on("SIGBREAK",o),[4,f(c.default.stream(r),u.default.createWriteStream(n)).catch((function(e){try{u.default.unlinkSync(n)}catch(e){}throw e}))];case 1:return i.sent(),p[r]=!0,u.default.chmodSync(n,448),console.log("Download Complete"),[2]}}))}))}t.downloadCli=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:if(e=d.package.version,"win32"===(t=process.platform))t="windows";else if("linux"===t)t="linux";else{if("darwin"!==t)throw Error("Unsupported platform");t="macos"}return n="windows"===t?".exe":"",r=l.default.join(__dirname,"../../bin/tauri-cli"+n),console.log("Downloading Rust CLI..."),[4,h("tauri-cli-v"+e,"tauri-cli_"+t+n,r)];case 1:return i.sent(),[2]}}))}))},t.downloadRustup=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e="win32"===process.platform?"rustup-init.exe":"rustup-init.sh",console.log("Downloading Rustup..."),[4,h("rustup",e,l.default.join(__dirname,"../../bin/"+e))];case 1:return[2,t.sent()]}}))}))}},976:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i,o=r(n(242)),s=r(n(517));t.default=function(e,t){return void 0===t&&(t=o.default.green),function(n){var r=+new Date,a=r-(i||r);i=r,n?console.log(" "+t(String(e))+" "+n+" "+o.default.green("+"+s.default(a))):console.log()}}},889:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.runOnRustCli=void 0;var s=n(747),a=n(622),u=n(71),c=n(632);t.runOnRustCli=function(e,t){return r(this,void 0,void 0,(function(){var r,l,f,d,p,h,v,w,b;return i(this,(function(i){switch(i.label){case 0:return r=a.resolve(__dirname,"../.."),l=a.join(r,"bin/tauri-cli"+("win32"===process.platform?".exe":"")),h=new Promise((function(e,t){f=e,d=function(){return t(new Error)}})),v=function(e,t){0===e?f():d()},s.existsSync(l)?(p=u.spawn(l,o(["tauri",e],t),process.cwd(),v),[3,4]):[3,1];case 1:return[4,c.downloadCli()];case 2:return i.sent(),p=u.spawn(l,o(["tauri",e],t),process.cwd(),v),[3,4];case 3:s.existsSync(a.resolve(r,"../bundler"))?(w=a.resolve(r,"../cli.rs"),u.spawnSync("cargo",["build","--release"],w),b=a.resolve(r,"../cli.rs/target/release/cargo-tauri"),p=u.spawn(b,o(["tauri",e],t),process.cwd(),v)):(u.spawnSync("cargo",["install","--root",r,"tauri-cli","--version",n(210).package.version],process.cwd()),p=u.spawn(l,o(["tauri",e],t),process.cwd(),v)),i.label=4;case 4:return[2,{pid:p,promise:h}]}}))}))}},71:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.spawnSync=t.spawn=void 0;var i=r(n(793)),o=r(n(976)),s=r(n(242)),a=o.default("app:spawn"),u=o.default("app:spawn",s.default.red);t.spawn=function(e,t,n,r){var o;a('Running "'+e+" "+t.join(" ")+'"'),a();var s=i.default(e,t,{stdio:"inherit",cwd:n,env:process.env});return s.on("close",(function(t){var n;a(),t&&a('Command "'+e+'" failed with exit code: '+t),r&&r(null!=t?t:0,null!==(n=s.pid)&&void 0!==n?n:0)})),null!==(o=s.pid)&&void 0!==o?o:0},t.spawnSync=function(e,t,n,r){a('[sync] Running "'+e+" "+t.join(" ")+'"'),a();var o=i.default.sync(e,t,{stdio:"inherit",cwd:n});(o.status||o.error)&&(u(),u('⚠️ Command "'+e+'" failed with exit code: '+o.status),null===o.status&&u('⚠️ Please globally install "'+e+'"'),r&&r(),process.exit(1))}},242:e=>{"use strict";e.exports=require("chalk")},793:e=>{"use strict";e.exports=require("cross-spawn")},747:e=>{"use strict";e.exports=require("fs")},301:e=>{"use strict";e.exports=require("got")},517:e=>{"use strict";e.exports=require("ms")},622:e=>{"use strict";e.exports=require("path")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}},t={},function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(857);var e,t})); | ||
//# sourceMappingURL=cli.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tauri=t():e.tauri=t()}(this,(function(){return e={210:e=>{e.exports={workspace:{},package:{name:"tauri-cli",version:"1.0.0-beta.4",authors:["Tauri Programme within The Commons Conservancy"],edition:"2018",categories:["gui","web-programming"],license:"Apache-2.0 OR MIT",homepage:"https://tauri.studio",repository:"https://github.com/tauri-apps/tauri",description:"Command line interface for building Tauri apps",include:["src/","/templates","MergeModules/","*.json","*.rs"]},bin:[{name:"cargo-tauri",path:"src/main.rs"}],dependencies:{clap:{version:"3.0.0-beta.2",features:["yaml"]},anyhow:"1.0","tauri-bundler":{version:"1.0.0-beta.2",path:"../bundler"},colored:"2.0",once_cell:"1.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9",notify:"4.0",shared_child:"0.3",toml_edit:"0.2","json-patch":"0.2",schemars:"0.8",toml:"0.5",valico:"3.6",handlebars:"4.0",include_dir:"0.6",minisign:"0.6",base64:"0.13.0",ureq:"2.1",os_info:"3.0",semver:"1.0",regex:"1.5",lazy_static:"1",libc:"0.2",terminal_size:"0.1","unicode-width":"0.1",tempfile:"3",zeroize:"1.3"},target:{"cfg(windows)":{dependencies:{winapi:{version:"0.3",features:["winbase","winuser","consoleapi","processenv","wincon"]},encode_unicode:"0.3"}},'cfg(target_os = "linux")':{dependencies:{heck:"0.3"}}},"build-dependencies":{schemars:"0.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9"}}},816:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.update=t.install=void 0;var s=n(71),u=n(743),c=n(786),l=o(n(976)),p=n(123),f=n(747),d=o(n(621)),h=o(n(39)),v=l.default("dependency:crates"),y=["tauri"];function g(e){if(f.existsSync(e)){var t=f.readFileSync(e).toString();return d.default.parse(t)}return null}function w(e){return{version:e.substring(0,e.lastIndexOf("."))}}function m(e){return r(this,void 0,void 0,(function(){var t,n,r,o,l,m,b,_,x,M;return a(this,(function(k){switch(k.label){case 0:if(t=[],n=[],r=new Map,null===(o=g(p.resolve.tauri("Cargo.toml"))))return v("Cargo.toml not found. Skipping crates check..."),[2,r];l=p.resolve.tauri("Cargo.lock"),f.existsSync(l)||s.spawnSync("cargo",["generate-lockfile"],p.tauriDir),m=g(l),b=function(r){var i,s,l,p;return a(this,(function(a){switch(a.label){case 0:return i=m?m.package.filter((function(e){return e.name===r})):[],s=o.dependencies[r],void 0!==(l=1===i.length?i[0].version:"string"==typeof s?s:null==s?void 0:s.version)?[3,1]:(v("Installing "+r+"..."),null!==(p=c.getCrateLatestVersion(r))&&(o.dependencies[r]=w(p)),t.push(r),[3,6]);case 1:return e!==u.ManagementType.Update?[3,5]:null!==(p=c.getCrateLatestVersion(r))&&c.semverLt(l,p)?[4,h.default.prompt([{type:"confirm",name:"answer",message:'[CRATES] "'+r+'" latest version is '+p+". Do you want to update?",default:!1}])]:[3,3];case 2:return a.sent().answer&&(v("Updating "+r+"..."),o.dependencies[r]=w(p),n.push(r)),[3,4];case 3:v('"'+r+'" is up to date'),a.label=4;case 4:return[3,6];case 5:v('"'+r+'" is already installed'),a.label=6;case 6:return[2]}}))},_=0,x=y,k.label=1;case 1:return _<x.length?(M=x[_],[5,b(M)]):[3,4];case 2:k.sent(),k.label=3;case 3:return _++,[3,1];case 4:return(t.length||n.length)&&f.writeFileSync(p.resolve.tauri("Cargo.toml"),d.default.stringify(o)),n.length&&(f.existsSync(p.resolve.tauri("Cargo.lock"))||s.spawnSync("cargo",["generate-lockfile"],p.tauriDir),s.spawnSync("cargo",i(["update","--aggressive"],n.reduce((function(e,t){return i(i([],e),["-p",t])}),[])),p.tauriDir)),r.set(u.ManagementType.Install,t),r.set(u.ManagementType.Update,n),[2,r]}}))}))}t.install=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,m(u.ManagementType.Install)];case 1:return[2,e.sent()]}}))}))},t.update=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,m(u.ManagementType.Update)];case 1:return[2,e.sent()]}}))}))}},559:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=u(n(976)),l=i(n(55)),p=i(n(816)),f=i(n(503)),d=c.default("dependency:manager");e.exports={installDependencies:function(){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return d("Installing missing dependencies..."),[4,l.install()];case 1:return e.sent(),[4,p.install()];case 2:return e.sent(),[4,f.install()];case 3:return e.sent(),[2]}}))}))},updateDependencies:function(){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return d("Updating dependencies..."),[4,l.update()];case 1:return e.sent(),[4,p.update()];case 2:return e.sent(),[4,f.update()];case 3:return e.sent(),[2]}}))}))}}},439:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(247),t),a(n(581),t),a(n(1),t),a(n(295),t)},581:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NpmManager=void 0;var r=n(793),a=n(71),i=n(123),o=function(){function e(){this.type="npm"}return e.prototype.installPackage=function(e){a.spawnSync("npm",["install",e],i.appDir)},e.prototype.installDevPackage=function(e){a.spawnSync("npm",["install",e,"--save-dev"],i.appDir)},e.prototype.updatePackage=function(e){a.spawnSync("npm",["install",e+"@latest"],i.appDir)},e.prototype.getPackageVersion=function(e){var t=r.sync("npm",["list",e,"version","--depth","0"],{cwd:i.appDir}),n=String(t.output[1]),a=new RegExp(e+"@(\\S+)","g").exec(n);return(null==a?void 0:a[1])?a[1]:null},e.prototype.getLatestVersion=function(e){var t=r.sync("npm",["show",e,"version"],{cwd:i.appDir});return String(t.output[1]).replace("\n","")},e}();t.NpmManager=o},1:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PnpmManager=void 0;var r=n(793),a=n(71),i=n(123),o=function(){function e(){this.type="pnpm"}return e.prototype.installPackage=function(e){a.spawnSync("pnpm",["add",e],i.appDir)},e.prototype.installDevPackage=function(e){a.spawnSync("pnpm",["add",e,"--save-dev"],i.appDir)},e.prototype.updatePackage=function(e){a.spawnSync("pnpm",["add",e+"@latest"],i.appDir)},e.prototype.getPackageVersion=function(e){var t=r.sync("pnpm",["list",e,"version","--depth","0"],{cwd:i.appDir}),n=String(t.output[1]),a=new RegExp(e+" (\\S+)","g").exec(n);return(null==a?void 0:a[1])?a[1]:null},e.prototype.getLatestVersion=function(e){var t=r.sync("pnpm",["info",e,"version"],{cwd:i.appDir});return String(t.output[1]).replace("\n","")},e}();t.PnpmManager=o},295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},247:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YarnManager=void 0;var r=n(793),a=n(71),i=n(123),o=function(){function e(){this.type="yarn"}return e.prototype.installPackage=function(e){a.spawnSync("yarn",["add",e],i.appDir)},e.prototype.installDevPackage=function(e){a.spawnSync("yarn",["add",e,"--dev"],i.appDir)},e.prototype.updatePackage=function(e){a.spawnSync("yarn",["upgrade",e,"--latest"],i.appDir)},e.prototype.getPackageVersion=function(e){var t=r.sync("yarn",["list","--pattern",e,"--depth","0"],{cwd:i.appDir}),n=String(t.output[1]),a=new RegExp(e+"@(\\S+)","g").exec(n);return(null==a?void 0:a[1])?a[1]:null},e.prototype.getLatestVersion=function(e){var t=r.sync("yarn",["info",e,"version","--json"],{cwd:i.appDir}),n=String(t.output[1]);return JSON.parse(n).data},e}();t.YarnManager=o},503:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.update=t.installTheseDev=t.installThese=t.install=void 0;var o=n(743),s=n(786),u=i(n(976)),c=n(123),l=i(n(39)),p=n(747),f=n(793),d=u.default("dependency:npm-packages");function h(e,t){var n,i,u;return r(this,void 0,void 0,(function(){var r,h,v,y,g,w,m,b,_,x,M,k,S;return a(this,(function(a){switch(a.label){case 0:if(r=[],h=[],v=f.sync("npm",["--version"]),y=f.sync("yarn",["--version"]),g=f.sync("pnpm",["--version"]),(null!==(n=v.status)&&void 0!==n?n:v.error)&&(null!==(i=y.status)&&void 0!==i?i:y.error)&&(null!==(u=g.status)&&void 0!==u?u:g.error))throw new Error("must have installed one of the following package managers `npm`, `yarn`, `pnpm` to manage dependenices");if(!p.existsSync(c.resolve.app("package.json")))return[3,10];w=0,m=t,a.label=1;case 1:return w<m.length?(b=m[w],_=s.getNpmPackageVersion(b),x=s.getManager().type.toUpperCase(),null!==_?[3,4]:(d("Installing "+b+"..."),e!==o.ManagementType.Install&&e!==o.ManagementType.InstallDev?[3,3]:(M=e===o.ManagementType.InstallDev?" as dev-dependency":"",[4,l.default.prompt([{type:"confirm",name:"answer",message:"["+x+']: "Do you want to install '+b+M+'?"',default:!1}])]))):[3,10];case 2:a.sent().answer&&(e===o.ManagementType.Install?s.installNpmPackage(b):e===o.ManagementType.InstallDev&&s.installNpmDevPackage(b),r.push(b)),a.label=3;case 3:return[3,9];case 4:return e!==o.ManagementType.Update?[3,8]:(k=s.getNpmLatestVersion(b),s.semverLt(_,k)?[4,l.default.prompt([{type:"confirm",name:"answer",message:"["+x+']: "'+b+'" latest version is '+k+". Do you want to update?",default:!1}])]:[3,6]);case 5:return a.sent().answer&&(d("Updating "+b+"..."),s.updateNpmPackage(b),h.push(b)),[3,7];case 6:d('"'+b+'" is up to date'),a.label=7;case 7:return[3,9];case 8:d('"'+b+'" is already installed'),a.label=9;case 9:return w++,[3,1];case 10:return(S=new Map).set(o.ManagementType.Install,r),S.set(o.ManagementType.Update,h),[2,S]}}))}))}var v=["@tauri-apps/api","@tauri-apps/cli"];t.install=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,h(o.ManagementType.Install,v)];case 1:return[2,e.sent()]}}))}))},t.installThese=function(e){return r(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,h(o.ManagementType.Install,e)];case 1:return[2,t.sent()]}}))}))},t.installTheseDev=function(e){return r(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,h(o.ManagementType.InstallDev,e)];case 1:return[2,t.sent()]}}))}))},t.update=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,h(o.ManagementType.Update,v)];case 1:return[2,e.sent()]}}))}))}},55:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.update=t.install=void 0;var o=n(743),s=n(71),u=i(n(375)),c=n(632),l=i(n(976)),p=n(747),f=n(622),d=n(87),h=(i(n(211)),l.default("dependency:rust"));function v(){return r(this,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:return e="win32"===d.platform()?"rustup-init.exe":"rustup-init.sh",t=f.resolve(__dirname,"../../bin/"+e),p.existsSync(t)?[3,2]:[4,c.downloadRustup()];case 1:n.sent(),n.label=2;case 2:return"win32"===d.platform()?[2,s.spawnSync("powershell",[t],process.cwd())]:[2,s.spawnSync("/bin/sh",[t],process.cwd())]}}))}))}function y(e){return r(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return null!==u.default("rustup")?[3,2]:(h("Installing rustup..."),[4,v()]);case 1:t.sent(),t.label=2;case 2:return e===o.ManagementType.Update&&s.spawnSync("rustup",["update"],process.cwd()),[2]}}))}))}t.install=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,y(o.ManagementType.Install)];case 1:return[2,e.sent()]}}))}))},t.update=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,y(o.ManagementType.Update)];case 1:return[2,e.sent()]}}))}))}},743:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ManagementType=void 0,(n=t.ManagementType||(t.ManagementType={}))[n.Install=0]="Install",n[n.InstallDev=1]="InstallDev",n[n.Update=2]="Update"},786:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.semverLt=t.padVersion=t.updateNpmPackage=t.installNpmDevPackage=t.installNpmPackage=t.getNpmPackageVersion=t.getNpmLatestVersion=t.getCrateLatestVersion=t.getManager=void 0;var r=n(793),a=n(123),i=n(747),o=n(439),s=function(){return i.existsSync(a.resolve.app("yarn.lock"))?new o.YarnManager:i.existsSync(a.resolve.app("pnpm-lock.yaml"))?new o.PnpmManager:new o.NpmManager};t.getManager=s,t.getCrateLatestVersion=function(e){var t=r.sync("cargo",["search",e,"--limit","1"]),n=String(t.output[1]),a=new RegExp(e+' = "(\\S+)"',"g").exec(n);return(null==a?void 0:a[1])?a[1]:null},t.getNpmLatestVersion=function(e){return s().getLatestVersion(e)},t.getNpmPackageVersion=function(e){return s().getPackageVersion(e)},t.installNpmPackage=function(e){return s().installPackage(e)},t.installNpmDevPackage=function(e){return s().installDevPackage(e)},t.updateNpmPackage=function(e){return s().updatePackage(e)},t.padVersion=function(e){for(var t,n=(null!==(t=e.match(/\./g))&&void 0!==t?t:[]).length;n<2;)n++,e+=".0";return e},t.semverLt=function(e,t){return e!==t}},123:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resolve=t.tauriDir=t.appDir=void 0;var a=n(747),i=n(622),o=r(n(976)),s=r(n(242)),u=o.default("tauri",s.default.red);function c(e,t){return t&&i.isAbsolute(t)?t:i.resolve(e,t)}var l=function(){for(var e=process.cwd(),t=0;e.length>0&&!e.endsWith(i.sep)&&t<=2;){if(a.existsSync(i.join(e,"src-tauri","tauri.conf.json")))return e;t++,e=i.normalize(i.join(e,".."))}u("Couldn't find recognize the current folder as a part of a Tauri project"),process.exit(1)}();t.appDir=l;var p=i.resolve(l,"src-tauri");t.tauriDir=p;var f={app:function(e){return c(l,e)},tauri:function(e){return c(p,e)}};t.resolve=f},632:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.downloadRustup=t.downloadCli=void 0;var o=i(n(413)),s=n(669),u=i(n(747)),c=i(n(301)),l=i(n(622)),p=s.promisify(o.default.pipeline),f=n(210),d={};function h(e,t,n){return r(this,void 0,void 0,(function(){var r,i;return a(this,(function(a){switch(a.label){case 0:return r="https://github.com/tauri-apps/binary-releases/releases/download/"+e+"/"+t,i=function(){try{r in d||u.default.unlinkSync(n)}finally{process.exit()}},process.on("exit",i),process.on("SIGINT",i),process.on("SIGTERM",i),process.on("SIGHUP",i),process.on("SIGBREAK",i),[4,p(c.default.stream(r),u.default.createWriteStream(n)).catch((function(e){throw i(),e}))];case 1:return a.sent(),d[r]=!0,u.default.chmodSync(n,448),console.log("Download Complete"),[2]}}))}))}t.downloadCli=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return a(this,(function(a){switch(a.label){case 0:if(e=f.package.version,"win32"===(t=process.platform))t="windows";else if("linux"===t)t="linux";else{if("darwin"!==t)throw Error("Unsupported platform");t="macos"}return n="windows"===t?".exe":"",r=l.default.join(__dirname,"../../bin/tauri-cli"+n),console.log("Downloading Rust CLI..."),[4,h("tauri-cli-v"+e,"tauri-cli_"+t+n,r)];case 1:return a.sent(),[2]}}))}))},t.downloadRustup=function(){return r(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return e="win32"===process.platform?"rustup-init.exe":"rustup-init.sh",console.log("Downloading Rustup..."),[4,h("rustup",e,l.default.join(__dirname,"../../bin/"+e))];case 1:return[2,t.sent()]}}))}))}},375:function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(793);t.default=function(e,t){void 0===t&&(t=[]);try{var n=a.sync(e,r(r([],t),["--version"]));return 0===n.status?String(n.output[1]).replace(/\n/g,""):null}catch(e){return null}}},976:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a,i=r(n(242)),o=r(n(517));t.default=function(e,t){return void 0===t&&(t=i.default.green),function(n){var r=+new Date,s=r-(a||r);a=r,n?console.log(" "+t(String(e))+" "+n+" "+i.default.green("+"+o.default(s))):console.log()}}},71:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.spawnSync=t.spawn=void 0;var a=r(n(793)),i=r(n(976)),o=r(n(242)),s=i.default("app:spawn"),u=i.default("app:spawn",o.default.red);t.spawn=function(e,t,n,r){var i;s('Running "'+e+" "+t.join(" ")+'"'),s();var o=a.default(e,t,{stdio:"inherit",cwd:n,env:process.env});return o.on("close",(function(t){var n;s(),t&&s('Command "'+e+'" failed with exit code: '+t),r&&r(null!=t?t:0,null!==(n=o.pid)&&void 0!==n?n:0)})),null!==(i=o.pid)&&void 0!==i?i:0},t.spawnSync=function(e,t,n,r){s('[sync] Running "'+e+" "+t.join(" ")+'"'),s();var i=a.default.sync(e,t,{stdio:"inherit",cwd:n});(i.status||i.error)&&(u(),u('⚠️ Command "'+e+'" failed with exit code: '+i.status),null===i.status&&u('⚠️ Please globally install "'+e+'"'),r&&r(),process.exit(1))}},621:e=>{"use strict";e.exports=require("@tauri-apps/toml")},242:e=>{"use strict";e.exports=require("chalk")},793:e=>{"use strict";e.exports=require("cross-spawn")},747:e=>{"use strict";e.exports=require("fs")},301:e=>{"use strict";e.exports=require("got")},211:e=>{"use strict";e.exports=require("https")},39:e=>{"use strict";e.exports=require("inquirer")},517:e=>{"use strict";e.exports=require("ms")},87:e=>{"use strict";e.exports=require("os")},622:e=>{"use strict";e.exports=require("path")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}},t={},function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(559);var e,t})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tauri=t():e.tauri=t()}(this,(function(){return e={210:e=>{e.exports={workspace:{},package:{name:"tauri-cli",version:"1.0.0-beta.5",authors:["Tauri Programme within The Commons Conservancy"],edition:"2018",categories:["gui","web-programming"],license:"Apache-2.0 OR MIT",homepage:"https://tauri.studio",repository:"https://github.com/tauri-apps/tauri",description:"Command line interface for building Tauri apps",include:["src/","/templates","MergeModules/","*.json","*.rs"]},bin:[{name:"cargo-tauri",path:"src/main.rs"}],dependencies:{clap:{version:"3.0.0-beta.2",features:["yaml"]},anyhow:"1.0","tauri-bundler":{version:"1.0.0-beta.3",path:"../bundler"},colored:"2.0",once_cell:"1.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9",notify:"4.0",shared_child:"0.3",toml_edit:"0.2","json-patch":"0.2",schemars:"0.8",toml:"0.5",valico:"3.6",handlebars:"4.1",include_dir:"0.6",minisign:"0.6",base64:"0.13.0",ureq:"2.1",os_info:"3.0",semver:"1.0",regex:"1.5",lazy_static:"1",libc:"0.2",terminal_size:"0.1","unicode-width":"0.1",tempfile:"3",zeroize:"1.3"},target:{"cfg(windows)":{dependencies:{winapi:{version:"0.3",features:["winbase","winuser","consoleapi","processenv","wincon"]},encode_unicode:"0.3"}},'cfg(target_os = "linux")':{dependencies:{heck:"0.3"}}},"build-dependencies":{schemars:"0.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9"}}},816:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.update=t.install=void 0;var s=n(71),u=n(743),c=n(786),l=o(n(976)),p=n(123),f=n(747),d=o(n(621)),h=o(n(39)),v=l.default("dependency:crates"),y=["tauri"];function g(e){if(f.existsSync(e)){var t=f.readFileSync(e).toString();return d.default.parse(t)}return null}function w(e){return{version:e.substring(0,e.lastIndexOf("."))}}function m(e){return r(this,void 0,void 0,(function(){var t,n,r,o,l,m,b,_,x,k;return a(this,(function(M){switch(M.label){case 0:if(t=[],n=[],r=new Map,null===(o=g(p.resolve.tauri("Cargo.toml"))))return v("Cargo.toml not found. Skipping crates check..."),[2,r];l=p.resolve.tauri("Cargo.lock"),f.existsSync(l)||s.spawnSync("cargo",["generate-lockfile"],p.tauriDir),m=g(l),b=function(r){var i,s,l,p;return a(this,(function(a){switch(a.label){case 0:return i=m?m.package.filter((function(e){return e.name===r})):[],s=o.dependencies[r],void 0!==(l=1===i.length?i[0].version:"string"==typeof s?s:null==s?void 0:s.version)?[3,1]:(v("Installing "+r+"..."),null!==(p=c.getCrateLatestVersion(r))&&(o.dependencies[r]=w(p)),t.push(r),[3,6]);case 1:return e!==u.ManagementType.Update?[3,5]:null!==(p=c.getCrateLatestVersion(r))&&c.semverLt(l,p)?[4,h.default.prompt([{type:"confirm",name:"answer",message:'[CRATES] "'+r+'" latest version is '+p+". Do you want to update?",default:!1}])]:[3,3];case 2:return a.sent().answer&&(v("Updating "+r+"..."),o.dependencies[r]=w(p),n.push(r)),[3,4];case 3:v('"'+r+'" is up to date'),a.label=4;case 4:return[3,6];case 5:v('"'+r+'" is already installed'),a.label=6;case 6:return[2]}}))},_=0,x=y,M.label=1;case 1:return _<x.length?(k=x[_],[5,b(k)]):[3,4];case 2:M.sent(),M.label=3;case 3:return _++,[3,1];case 4:return(t.length||n.length)&&f.writeFileSync(p.resolve.tauri("Cargo.toml"),d.default.stringify(o)),n.length&&(f.existsSync(p.resolve.tauri("Cargo.lock"))||s.spawnSync("cargo",["generate-lockfile"],p.tauriDir),s.spawnSync("cargo",i(["update","--aggressive"],n.reduce((function(e,t){return i(i([],e),["-p",t])}),[])),p.tauriDir)),r.set(u.ManagementType.Install,t),r.set(u.ManagementType.Update,n),[2,r]}}))}))}t.install=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,m(u.ManagementType.Install)];case 1:return[2,e.sent()]}}))}))},t.update=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,m(u.ManagementType.Update)];case 1:return[2,e.sent()]}}))}))}},559:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=u(n(976)),l=i(n(55)),p=i(n(816)),f=i(n(503)),d=c.default("dependency:manager");e.exports={installDependencies:function(){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return d("Installing missing dependencies..."),[4,l.install()];case 1:return e.sent(),[4,p.install()];case 2:return e.sent(),[4,f.install()];case 3:return e.sent(),[2]}}))}))},updateDependencies:function(){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return d("Updating dependencies..."),[4,l.update()];case 1:return e.sent(),[4,p.update()];case 2:return e.sent(),[4,f.update()];case 3:return e.sent(),[2]}}))}))}}},439:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(247),t),a(n(581),t),a(n(1),t),a(n(295),t)},581:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NpmManager=void 0;var r=n(793),a=n(71),i=n(123),o=function(){function e(){this.type="npm"}return e.prototype.installPackage=function(e){a.spawnSync("npm",["install",e],i.appDir)},e.prototype.installDevPackage=function(e){a.spawnSync("npm",["install",e,"--save-dev"],i.appDir)},e.prototype.updatePackage=function(e){a.spawnSync("npm",["install",e+"@latest"],i.appDir)},e.prototype.getPackageVersion=function(e){var t=r.sync("npm",["list",e,"version","--depth","0"],{cwd:i.appDir}),n=String(t.output[1]),a=new RegExp(e+"@(\\S+)","g").exec(n);return(null==a?void 0:a[1])?a[1]:null},e.prototype.getLatestVersion=function(e){var t=r.sync("npm",["show",e,"version"],{cwd:i.appDir});return String(t.output[1]).replace("\n","")},e}();t.NpmManager=o},1:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PnpmManager=void 0;var r=n(793),a=n(71),i=n(123),o=function(){function e(){this.type="pnpm"}return e.prototype.installPackage=function(e){a.spawnSync("pnpm",["add",e],i.appDir)},e.prototype.installDevPackage=function(e){a.spawnSync("pnpm",["add",e,"--save-dev"],i.appDir)},e.prototype.updatePackage=function(e){a.spawnSync("pnpm",["add",e+"@latest"],i.appDir)},e.prototype.getPackageVersion=function(e){var t=r.sync("pnpm",["list",e,"version","--depth","0"],{cwd:i.appDir}),n=String(t.output[1]),a=new RegExp(e+" (\\S+)","g").exec(n);return(null==a?void 0:a[1])?a[1]:null},e.prototype.getLatestVersion=function(e){var t=r.sync("pnpm",["info",e,"version"],{cwd:i.appDir});return String(t.output[1]).replace("\n","")},e}();t.PnpmManager=o},295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},247:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YarnManager=void 0;var r=n(793),a=n(71),i=n(123),o=function(){function e(){this.type="yarn"}return e.prototype.installPackage=function(e){a.spawnSync("yarn",["add",e],i.appDir)},e.prototype.installDevPackage=function(e){a.spawnSync("yarn",["add",e,"--dev"],i.appDir)},e.prototype.updatePackage=function(e){a.spawnSync("yarn",["upgrade",e,"--latest"],i.appDir)},e.prototype.getPackageVersion=function(e){var t=r.sync("yarn",["list","--pattern",e,"--depth","0"],{cwd:i.appDir}),n=String(t.output[1]),a=new RegExp(e+"@(\\S+)","g").exec(n);return(null==a?void 0:a[1])?a[1]:null},e.prototype.getLatestVersion=function(e){var t=r.sync("yarn",["info",e,"version","--json"],{cwd:i.appDir}),n=String(t.output[1]);return JSON.parse(n).data},e}();t.YarnManager=o},503:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.update=t.installTheseDev=t.installThese=t.install=void 0;var o=n(743),s=n(786),u=i(n(976)),c=n(123),l=i(n(39)),p=n(747),f=n(793),d=u.default("dependency:npm-packages");function h(e,t){var n,i,u;return r(this,void 0,void 0,(function(){var r,h,v,y,g,w,m,b,_,x,k,M,S;return a(this,(function(a){switch(a.label){case 0:if(r=[],h=[],v=f.sync("npm",["--version"]),y=f.sync("yarn",["--version"]),g=f.sync("pnpm",["--version"]),(null!==(n=v.status)&&void 0!==n?n:v.error)&&(null!==(i=y.status)&&void 0!==i?i:y.error)&&(null!==(u=g.status)&&void 0!==u?u:g.error))throw new Error("must have installed one of the following package managers `npm`, `yarn`, `pnpm` to manage dependenices");if(!p.existsSync(c.resolve.app("package.json")))return[3,10];w=0,m=t,a.label=1;case 1:return w<m.length?(b=m[w],_=s.getNpmPackageVersion(b),x=s.getManager().type.toUpperCase(),null!==_?[3,4]:(d("Installing "+b+"..."),e!==o.ManagementType.Install&&e!==o.ManagementType.InstallDev?[3,3]:(k=e===o.ManagementType.InstallDev?" as dev-dependency":"",[4,l.default.prompt([{type:"confirm",name:"answer",message:"["+x+']: "Do you want to install '+b+k+'?"',default:!1}])]))):[3,10];case 2:a.sent().answer&&(e===o.ManagementType.Install?s.installNpmPackage(b):e===o.ManagementType.InstallDev&&s.installNpmDevPackage(b),r.push(b)),a.label=3;case 3:return[3,9];case 4:return e!==o.ManagementType.Update?[3,8]:(M=s.getNpmLatestVersion(b),s.semverLt(_,M)?[4,l.default.prompt([{type:"confirm",name:"answer",message:"["+x+']: "'+b+'" latest version is '+M+". Do you want to update?",default:!1}])]:[3,6]);case 5:return a.sent().answer&&(d("Updating "+b+"..."),s.updateNpmPackage(b),h.push(b)),[3,7];case 6:d('"'+b+'" is up to date'),a.label=7;case 7:return[3,9];case 8:d('"'+b+'" is already installed'),a.label=9;case 9:return w++,[3,1];case 10:return(S=new Map).set(o.ManagementType.Install,r),S.set(o.ManagementType.Update,h),[2,S]}}))}))}var v=["@tauri-apps/api","@tauri-apps/cli"];t.install=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,h(o.ManagementType.Install,v)];case 1:return[2,e.sent()]}}))}))},t.installThese=function(e){return r(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,h(o.ManagementType.Install,e)];case 1:return[2,t.sent()]}}))}))},t.installTheseDev=function(e){return r(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,h(o.ManagementType.InstallDev,e)];case 1:return[2,t.sent()]}}))}))},t.update=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,h(o.ManagementType.Update,v)];case 1:return[2,e.sent()]}}))}))}},55:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.update=t.install=void 0;var o=n(743),s=n(71),u=i(n(375)),c=n(632),l=i(n(976)),p=n(747),f=n(622),d=n(87),h=(i(n(211)),l.default("dependency:rust"));function v(){return r(this,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:return e="win32"===d.platform()?"rustup-init.exe":"rustup-init.sh",t=f.resolve(__dirname,"../../bin/"+e),p.existsSync(t)?[3,2]:[4,c.downloadRustup()];case 1:n.sent(),n.label=2;case 2:return"win32"===d.platform()?[2,s.spawnSync("powershell",["-NoProfile",t],process.cwd())]:[2,s.spawnSync("/bin/sh",[t],process.cwd())]}}))}))}function y(e){return r(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return null!==u.default("rustup")?[3,2]:(h("Installing rustup..."),[4,v()]);case 1:t.sent(),t.label=2;case 2:return e===o.ManagementType.Update&&s.spawnSync("rustup",["update"],process.cwd()),[2]}}))}))}t.install=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,y(o.ManagementType.Install)];case 1:return[2,e.sent()]}}))}))},t.update=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,y(o.ManagementType.Update)];case 1:return[2,e.sent()]}}))}))}},743:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ManagementType=void 0,(n=t.ManagementType||(t.ManagementType={}))[n.Install=0]="Install",n[n.InstallDev=1]="InstallDev",n[n.Update=2]="Update"},786:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.semverLt=t.padVersion=t.updateNpmPackage=t.installNpmDevPackage=t.installNpmPackage=t.getNpmPackageVersion=t.getNpmLatestVersion=t.getCrateLatestVersion=t.getManager=void 0;var r=n(793),a=n(123),i=n(747),o=n(439),s=function(){return i.existsSync(a.resolve.app("yarn.lock"))?new o.YarnManager:i.existsSync(a.resolve.app("pnpm-lock.yaml"))?new o.PnpmManager:new o.NpmManager};t.getManager=s,t.getCrateLatestVersion=function(e){var t=r.sync("cargo",["search",e,"--limit","1"]),n=String(t.output[1]),a=new RegExp(e+' = "(\\S+)"',"g").exec(n);return(null==a?void 0:a[1])?a[1]:null},t.getNpmLatestVersion=function(e){return s().getLatestVersion(e)},t.getNpmPackageVersion=function(e){return s().getPackageVersion(e)},t.installNpmPackage=function(e){return s().installPackage(e)},t.installNpmDevPackage=function(e){return s().installDevPackage(e)},t.updateNpmPackage=function(e){return s().updatePackage(e)},t.padVersion=function(e){for(var t,n=(null!==(t=e.match(/\./g))&&void 0!==t?t:[]).length;n<2;)n++,e+=".0";return e},t.semverLt=function(e,t){return e!==t}},123:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resolve=t.tauriDir=t.appDir=void 0;var a=n(747),i=n(622),o=r(n(976)),s=r(n(242)),u=o.default("tauri",s.default.red);function c(e,t){return t&&i.isAbsolute(t)?t:i.resolve(e,t)}var l=function(){for(var e=process.cwd(),t=0;e.length>0&&!e.endsWith(i.sep)&&t<=2;){if(a.existsSync(i.join(e,"src-tauri","tauri.conf.json")))return e;t++,e=i.normalize(i.join(e,".."))}u("Couldn't find recognize the current folder as a part of a Tauri project"),process.exit(1)}();t.appDir=l;var p=i.resolve(l,"src-tauri");t.tauriDir=p;var f={app:function(e){return c(l,e)},tauri:function(e){return c(p,e)}};t.resolve=f},632:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.downloadRustup=t.downloadCli=void 0;var o=i(n(413)),s=n(669),u=i(n(747)),c=i(n(301)),l=i(n(622)),p=s.promisify(o.default.pipeline),f=n(210),d={};function h(e,t,n){return r(this,void 0,void 0,(function(){var r,i;return a(this,(function(a){switch(a.label){case 0:return r="https://github.com/tauri-apps/binary-releases/releases/download/"+e+"/"+t,i=function(){try{r in d||u.default.unlinkSync(n)}finally{process.exit()}},process.on("exit",i),process.on("SIGINT",i),process.on("SIGTERM",i),process.on("SIGHUP",i),process.on("SIGBREAK",i),[4,p(c.default.stream(r),u.default.createWriteStream(n)).catch((function(e){try{u.default.unlinkSync(n)}catch(e){}throw e}))];case 1:return a.sent(),d[r]=!0,u.default.chmodSync(n,448),console.log("Download Complete"),[2]}}))}))}t.downloadCli=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return a(this,(function(a){switch(a.label){case 0:if(e=f.package.version,"win32"===(t=process.platform))t="windows";else if("linux"===t)t="linux";else{if("darwin"!==t)throw Error("Unsupported platform");t="macos"}return n="windows"===t?".exe":"",r=l.default.join(__dirname,"../../bin/tauri-cli"+n),console.log("Downloading Rust CLI..."),[4,h("tauri-cli-v"+e,"tauri-cli_"+t+n,r)];case 1:return a.sent(),[2]}}))}))},t.downloadRustup=function(){return r(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return e="win32"===process.platform?"rustup-init.exe":"rustup-init.sh",console.log("Downloading Rustup..."),[4,h("rustup",e,l.default.join(__dirname,"../../bin/"+e))];case 1:return[2,t.sent()]}}))}))}},375:function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(793);t.default=function(e,t){void 0===t&&(t=[]);try{var n=a.sync(e,r(r([],t),["--version"]));return 0===n.status?String(n.output[1]).replace(/\n/g,""):null}catch(e){return null}}},976:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a,i=r(n(242)),o=r(n(517));t.default=function(e,t){return void 0===t&&(t=i.default.green),function(n){var r=+new Date,s=r-(a||r);a=r,n?console.log(" "+t(String(e))+" "+n+" "+i.default.green("+"+o.default(s))):console.log()}}},71:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.spawnSync=t.spawn=void 0;var a=r(n(793)),i=r(n(976)),o=r(n(242)),s=i.default("app:spawn"),u=i.default("app:spawn",o.default.red);t.spawn=function(e,t,n,r){var i;s('Running "'+e+" "+t.join(" ")+'"'),s();var o=a.default(e,t,{stdio:"inherit",cwd:n,env:process.env});return o.on("close",(function(t){var n;s(),t&&s('Command "'+e+'" failed with exit code: '+t),r&&r(null!=t?t:0,null!==(n=o.pid)&&void 0!==n?n:0)})),null!==(i=o.pid)&&void 0!==i?i:0},t.spawnSync=function(e,t,n,r){s('[sync] Running "'+e+" "+t.join(" ")+'"'),s();var i=a.default.sync(e,t,{stdio:"inherit",cwd:n});(i.status||i.error)&&(u(),u('⚠️ Command "'+e+'" failed with exit code: '+i.status),null===i.status&&u('⚠️ Please globally install "'+e+'"'),r&&r(),process.exit(1))}},621:e=>{"use strict";e.exports=require("@tauri-apps/toml")},242:e=>{"use strict";e.exports=require("chalk")},793:e=>{"use strict";e.exports=require("cross-spawn")},747:e=>{"use strict";e.exports=require("fs")},301:e=>{"use strict";e.exports=require("got")},211:e=>{"use strict";e.exports=require("https")},39:e=>{"use strict";e.exports=require("inquirer")},517:e=>{"use strict";e.exports=require("ms")},87:e=>{"use strict";e.exports=require("os")},622:e=>{"use strict";e.exports=require("path")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}},t={},function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(559);var e,t})); | ||
//# sourceMappingURL=dependency-manager.js.map |
/*! For license information please see tauricon.js.LICENSE.txt */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tauri=t():e.tauri=t()}(this,(function(){return(()=>{"use strict";var __webpack_modules__={729:(e,t,i)=>{i.r(t),i.d(t,{default:()=>d});const r=require("util");var n=i(622);const a=require("graceful-fs");var o=i(747),s=i(975);const p=require("globby");function f(...e){if(0===e.length)throw new Error("Expected at least one argument");return async t=>{let i=t;for(const t of e)i=await t(i);return i}}const c=require("replace-ext"),u=require("junk"),m=(0,r.promisify)(a.readFile),l=(0,r.promisify)(a.writeFile);async function d(e,{glob:t=!0,...i}={}){if(!Array.isArray(e))throw new TypeError(`Expected an \`Array\`, got \`${typeof e}\``);const r=t?await p(e,{onlyFiles:!0}):e;return Promise.all(r.filter((e=>u.not(n.basename(e)))).map((async t=>{try{return await(async(e,{destination:t,plugins:i=[]})=>{if(i&&!Array.isArray(i))throw new TypeError("The `plugins` option should be an `Array`");let r=await m(e);r=await(i.length>0?f(...i)(r):r);const{ext:a}=await s.fromBuffer(r);let p=t?n.join(t,n.basename(e)):void 0;p="webp"===a?c(p,".webp"):p;const u={data:r,sourcePath:e,destinationPath:p};return p?(await o.promises.mkdir(n.dirname(u.destinationPath),{recursive:!0}),await l(u.destinationPath,u.data),u):u})(t,i)}catch(t){throw t.message=`Error occurred when handling file: ${e}\n\n${t.stack}`,t}})))}d.buffer=async(e,{plugins:t=[]}={})=>{if(!Buffer.isBuffer(e))throw new TypeError(`Expected a \`Buffer\`, got \`${typeof e}\``);return 0===t.length?e:f(...t)(e)}},499:(module,__unused_webpack_exports,__webpack_require__)=>{const Token=__webpack_require__(313),strtok3=__webpack_require__(96),{stringToBytes,tarHeaderChecksumMatches,uint32SyncSafeToken}=__webpack_require__(992),supported=__webpack_require__(722),minimumBytes=4100;async function fromStream(e){const t=await strtok3.fromStream(e);try{return await fromTokenizer(t)}finally{await t.close()}}async function fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||Buffer.isBuffer(e)))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof e}\``);const t=e instanceof Buffer?e:Buffer.from(e);if(t&&t.length>1)return fromTokenizer(strtok3.fromBuffer(t))}function _check(e,t,i){i={offset:0,...i};for(const[r,n]of t.entries())if(i.mask){if(n!==(i.mask[r]&e[r+i.offset]))return!1}else if(n!==e[r+i.offset])return!1;return!0}async function _checkSequence(e,t,i){const r=Buffer.alloc(minimumBytes);return await t.ignore(i),await t.peekBuffer(r,{mayBeLess:!0}),r.includes(Buffer.from(e))}async function fromTokenizer(e){try{return _fromTokenizer(e)}catch(e){if(!(e instanceof strtok3.EndOfStreamError))throw e}}async function _fromTokenizer(e){let t=Buffer.alloc(minimumBytes);const i=(e,i)=>_check(t,e,i),r=(e,t)=>i(stringToBytes(e),t);if(e.fileInfo.size||(e.fileInfo.size=Number.MAX_SAFE_INTEGER),await e.peekBuffer(t,{length:12,mayBeLess:!0}),i([66,77]))return{ext:"bmp",mime:"image/bmp"};if(i([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(i([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(i([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(i([37,33]))return await e.peekBuffer(t,{length:24,mayBeLess:!0}),r("PS-Adobe-",{offset:2})&&r(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(i([31,160])||i([31,157]))return{ext:"Z",mime:"application/x-compress"};if(i([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(i([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(i([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(i([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r("ID3")){await e.ignore(6);const t=await e.readToken(uint32SyncSafeToken);return e.position+t>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(t),fromTokenizer(e))}if(r("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===t[0]||70===t[0])&&i([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(i([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r("FLIF"))return{ext:"flif",mime:"image/flif"};if(r("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(r("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(r("FORM"))return{ext:"aif",mime:"audio/aiff"};if(r("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(i([80,75,3,4])){try{for(;e.position+30<e.fileInfo.size;){await e.readBuffer(t,{length:30});const i={compressedSize:t.readUInt32LE(18),uncompressedSize:t.readUInt32LE(22),filenameLength:t.readUInt16LE(26),extraFieldLength:t.readUInt16LE(28)};if(i.filename=await e.readToken(new Token.StringType(i.filenameLength,"utf-8")),await e.ignore(i.extraFieldLength),"META-INF/mozilla.rsa"===i.filename)return{ext:"xpi",mime:"application/x-xpinstall"};if(i.filename.endsWith(".rels")||i.filename.endsWith(".xml"))switch(i.filename.split("/")[0]){case"_rels":break;case"word":return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};case"ppt":return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};case"xl":return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}if(i.filename.startsWith("xl/"))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if("mimetype"===i.filename&&i.compressedSize===i.uncompressedSize)switch(await e.readToken(new Token.StringType(i.compressedSize,"utf-8"))){case"application/epub+zip":return{ext:"epub",mime:"application/epub+zip"};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"}}if(0===i.compressedSize){let i=-1;for(;i<0&&e.position<e.fileInfo.size;)await e.peekBuffer(t,{mayBeLess:!0}),i=t.indexOf("504B0304",0,"hex"),await e.ignore(i>=0?i:t.length)}else await e.ignore(i.compressedSize)}}catch(e){if(!(e instanceof strtok3.EndOfStreamError))throw e}return{ext:"zip",mime:"application/zip"}}if(r("OggS")){await e.ignore(28);const t=Buffer.alloc(8);return await e.readBuffer(t),_check(t,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/opus"}:_check(t,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:_check(t,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:_check(t,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:_check(t,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:_check(t,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(i([80,75])&&(3===t[2]||5===t[2]||7===t[2])&&(4===t[3]||6===t[3]||8===t[3]))return{ext:"zip",mime:"application/zip"};if(r("ftyp",{offset:4})&&0!=(96&t[8])){const e=t.toString("binary",8,12).replace("\0"," ").trim();switch(e){case"avif":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return e.startsWith("3g")?e.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(r("MThd"))return{ext:"mid",mime:"audio/midi"};if(r("wOFF")&&(i([0,1,0,0],{offset:4})||r("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(r("wOF2")&&(i([0,1,0,0],{offset:4})||r("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(i([212,195,178,161])||i([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(r("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(r("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(r("fLaC"))return{ext:"flac",mime:"audio/x-flac"};if(i([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(r("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(r("%PDF"))return await("Adobe Illustrator",1350,_checkSequence("Adobe Illustrator",e,1350))?{ext:"ai",mime:"application/postscript"}:{ext:"pdf",mime:"application/pdf"};if(i([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(i([73,73,42,0]))return r("CR",{offset:8})?{ext:"cr2",mime:"image/x-canon-cr2"}:i([28,0,254,0],{offset:8})||i([31,0,11,0],{offset:8})?{ext:"nef",mime:"image/x-nikon-nef"}:i([8,0,0,0],{offset:4})&&(i([45,0,254,0],{offset:8})||i([39,0,254,0],{offset:8}))?{ext:"dng",mime:"image/x-adobe-dng"}:(t=Buffer.alloc(24),await e.peekBuffer(t),(i([16,251,134,1],{offset:4})||i([8,0,0,0],{offset:4}))&&i([0,254,0,4,0,1,0,0,0,1,0,0,0,3,1],{offset:9})?{ext:"arw",mime:"image/x-sony-arw"}:{ext:"tif",mime:"image/tiff"});if(i([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r("MAC "))return{ext:"ape",mime:"audio/ape"};if(i([26,69,223,163])){async function n(){const t=await e.peekNumber(Token.UINT8);let i=128,r=0;for(;0==(t&i);)++r,i>>=1;const n=Buffer.alloc(r+1);return await e.readBuffer(n),n}async function a(){const e=await n(),t=await n();t[0]^=128>>t.length-1;const i=Math.min(6,t.length);return{id:e.readUIntBE(0,e.length),len:t.readUIntBE(t.length-i,i)}}const t=await a();switch(await async function(t,i){for(;i>0;){const t=await a();if(17026===t.id)return e.readToken(new Token.StringType(t.len,"utf-8"));await e.ignore(t.len),--i}}(0,t.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/x-matroska"};default:return}}if(i([82,73,70,70])){if(i([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(i([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(i([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(r("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(i([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(r("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(r("MSCF")||r("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(i([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(i([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(i([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(r("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(r("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(i([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(r("IMPM"))return{ext:"it",mime:"audio/x-it"};if(r("-lh0-",{offset:2})||r("-lh1-",{offset:2})||r("-lh2-",{offset:2})||r("-lh3-",{offset:2})||r("-lh4-",{offset:2})||r("-lh5-",{offset:2})||r("-lh6-",{offset:2})||r("-lh7-",{offset:2})||r("-lzs-",{offset:2})||r("-lz4-",{offset:2})||r("-lz5-",{offset:2})||r("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(i([0,0,1,186])){if(i([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(i([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(i([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(r("<?xml "))return{ext:"xml",mime:"application/xml"};if(r("BEGIN:"))return{ext:"ics",mime:"text/calendar"};if(i([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(i([82,97,114,33,26,7])&&(0===t[6]||1===t[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(r("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(r("!<arch>"))return await e.ignore(8),"debian-binary"===await e.readToken(new Token.StringType(13,"ascii"))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(i([137,80,78,71,13,10,26,10])){async function o(){return{length:await e.readToken(Token.INT32_BE),type:await e.readToken(new Token.StringType(4,"binary"))}}await e.ignore(8);do{const t=await o();switch(t.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e.ignore(t.length+4)}}while(e.position<e.fileInfo.size);return{ext:"png",mime:"image/png"}}if(i([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/x-apache-arrow"};if(i([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(i([102,114,101,101],{offset:4})||i([109,100,97,116],{offset:4})||i([109,111,111,118],{offset:4})||i([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(i([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(i([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(i([48,38,178,117,142,102,207,17,166,217])){async function s(){const t=Buffer.alloc(16);return await e.readBuffer(t),{id:t,size:await e.readToken(Token.UINT64_LE)}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const t=await s();let i=t.size-24;if(_check(t.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const t=Buffer.alloc(16);if(i-=await e.readBuffer(t),_check(t,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"wma",mime:"audio/x-ms-wma"};if(_check(t,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"wmv",mime:"video/x-ms-asf"};break}await e.ignore(i)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(i([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((i([126,16,4])||i([126,24,4]))&&i([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(i([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(i([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new Token.StringType(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(i([0,0,1,186])||i([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(i([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(i([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(i([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await e.peekBuffer(t,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),r("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(r("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(r("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(i([4,0,0,0])&&t.length>=16){const e=t.readUInt32LE(12);if(e>12&&e<240&&t.length>=e+16)try{const i=t.slice(16,e+16).toString();if(JSON.parse(i).files)return{ext:"asar",mime:"application/x-asar"}}catch(e){}}if(i([208,207,17,224,161,177,26,225,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62]))return{ext:"msi",mime:"application/x-msi"};if(i([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(r("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(i([71],{offset:4})&&(i([71],{offset:192})||i([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(i([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(i([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(i([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(i([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(i([76,80],{offset:34})&&(i([0,0,1],{offset:8})||i([1,0,2],{offset:8})||i([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(i([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(await e.peekBuffer(t,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),tarHeaderChecksumMatches(t))return{ext:"tar",mime:"application/x-tar"};if(i([255,254,255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0]))return{ext:"skp",mime:"application/vnd.sketchup.skp"};if(r("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"};for(let e=0;e<2&&e<t.length-16;e++)if(t.length>=e+2&&i([255,224],{offset:e,mask:[255,224]})){if(i([16],{offset:e+1,mask:[22]}))return i([8],{offset:e+1,mask:[8]}),{ext:"aac",mime:"audio/aac"};if(i([2],{offset:e+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(i([4],{offset:e+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(i([6],{offset:e+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}const stream=readableStream=>new Promise(((resolve,reject)=>{const stream=eval("require")("stream");readableStream.on("error",reject),readableStream.once("readable",(async()=>{const e=new stream.PassThrough;let t;t=stream.pipeline?stream.pipeline(readableStream,e,(()=>{})):readableStream.pipe(e);const i=readableStream.read(minimumBytes)||readableStream.read()||Buffer.alloc(0);try{const t=await fromBuffer(i);e.fileType=t}catch(e){reject(e)}resolve(t)}))})),fileType={fromStream,fromTokenizer,fromBuffer,stream};Object.defineProperty(fileType,"extensions",{get:()=>new Set(supported.extensions)}),Object.defineProperty(fileType,"mimeTypes",{get:()=>new Set(supported.mimeTypes)}),module.exports=fileType},975:(e,t,i)=>{const r=i(454),n=i(499),a={fromFile:async function(e){const t=await r.fromFile(e);try{return await n.fromTokenizer(t)}finally{await t.close()}}};Object.assign(a,n),Object.defineProperty(a,"extensions",{get:()=>n.extensions}),Object.defineProperty(a,"mimeTypes",{get:()=>n.mimeTypes}),e.exports=a},722:e=>{e.exports={extensions:["jpg","png","apng","gif","webp","flif","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","msi","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","wmv","wma","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","ai","skp","avif","eps","lzh","pgp","asar"],mimeTypes:["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/x-apache-arrow","video/mp4","audio/midi","video/x-matroska","video/webm","video/quicktime","video/vnd.avi","audio/vnd.wave","audio/qcelp","audio/x-ms-wma","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","audio/opus","video/ogg","audio/ogg","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-msi","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar"]}},992:(e,t)=>{t.stringToBytes=e=>[...e].map((e=>e.charCodeAt(0))),t.tarHeaderChecksumMatches=e=>{if(e.length<512)return!1;const t=parseInt(e.toString("utf8",148,154).replace(/\0.*$/,"").trim(),8);if(isNaN(t))return!1;let i=256,r=0;for(let t=0;t<148;t++){const n=e[t];i+=n,r+=128&n}for(let t=156;t<512;t++){const n=e[t];i+=n,r+=128&n}return t===i||t===i-(r<<1)},t.uint32SyncSafeToken={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4}},209:(e,t,i)=>{function r(e){return!(!e||e.length<8)&&137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]&&13===e[4]&&10===e[5]&&26===e[6]&&10===e[7]}i.r(t),i.d(t,{default:()=>r})},333:function(e,t,i){var r=this&&this.__createBinding||(Object.create?function(e,t,i,r){void 0===r&&(r=i),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,r){void 0===r&&(r=i),e[r]=t[i]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&r(t,e,i);return n(t,e),t},o=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var i,r,n,a,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){o.label=a[1];break}if(6===a[0]&&o.label<n[1]){o.label=n[1],n=a;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(a);break}n[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{i=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var f=i(298),c=p(i(729)),u=p(i(423)),m=p(i(169)),l=p(i(209)),d=p(i(622)),x=a(i(42)),g=p(i(555)),h=p(i(742)),b=i(123),v=p(i(976)),w=a(i(352)),y=p(i(242)),_=i(306),k=v.default("app:spawn"),z=v.default("app:spawn",y.default.red),S=!1,T=null,j=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,f.access(e)];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))},B=function(e){return o(void 0,void 0,void 0,(function(){var t,i;return s(this,(function(r){switch(r.label){case 0:return!1===S?[3,1]:[2,S];case 1:return[4,j(e)];case 2:return r.sent()?[3,3]:(S=!1,T&&clearInterval(T),z("[ERROR] Source image for tauricon not found"),process.exit(1),[3,8]);case 3:return[4,g.default(e,0,8)];case 4:return t=r.sent(),l.default(t)?[4,(S=h.default(e)).metadata()]:[3,7];case 5:return(i=r.sent()).hasAlpha&&4===i.channels||(T&&clearInterval(T),z("[ERROR] Source png for tauricon is not transparent"),process.exit(1)),[4,S.stats()];case 6:return r.sent().isOpaque&&(T&&clearInterval(T),z("[ERROR] Source png for tauricon could not be detected as transparent"),process.exit(1)),[2,S];case 7:S=!1,T&&clearInterval(T),z("[ERROR] Source image for tauricon is not a png"),process.exit(1),r.label=8;case 8:return[2]}}))}))},q=function(e){var t=[];for(var i in e){var r=e[String(i)];r.folder&&t.push(r.folder)}return t.sort().filter((function(e,t,i){return!t||e!==i[t-1]}))},I=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,i,r){return t+t+i+i+r+r}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:void 0},E=function(e,t){return o(void 0,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return void 0===t?[3,2]:[4,f.ensureDir(t)];case 1:i.sent(),i.label=2;case 2:return[4,B(e)];case 3:return[2,i.sent()]}}))}))},O=function(e){process.stdout.write(" "+e+" \r")},M=t.tauricon={validate:function(e,t){return o(this,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return[4,E(e,t)];case 1:return i.sent(),[2,"object"==typeof S]}}))}))},version:function(){return _.version},make:function(e,t,i,r){return void 0===t&&(t=d.default.resolve(b.tauriDir,"icons")),o(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return e||(e=d.default.resolve(b.appDir,"app-icon.png")),T="CI"in process.env||process.argv.some((function(e){return"--ci"===e}))?null:setInterval((function(){process.stdout.write("/ \r"),setTimeout((function(){process.stdout.write("- \r"),setTimeout((function(){process.stdout.write("\\ \r"),setTimeout((function(){process.stdout.write("| \r")}),100)}),100)}),100)}),500),r=r||w.options.tauri,O('Building Tauri icns and ico from "'+e+'"'),[4,this.validate(e,t)];case 1:return n.sent(),[4,this.icns(e,t,r,i)];case 2:return n.sent(),O("Building Tauri png icons"),[4,this.build(e,t,r)];case 3:return n.sent(),i?(O("Minifying assets with "+i),[4,this.minify(t,r,i,"batch")]):[3,5];case 4:return n.sent(),[3,6];case 5:k("no minify strategy"),n.label=6;case 6:return O("Tauricon Finished"),T&&clearInterval(T),[2,!0]}}))}))},build:function(e,t,i){return o(this,void 0,void 0,(function(){var r,n,a,p,c,u,m,l,x,g,b,v,w,y,_,k,S,T;return s(this,(function(j){switch(j.label){case 0:return[4,this.validate(e,t)];case 1:for(c in j.sent(),r=h.default(e),n=function(e){return o(this,void 0,void 0,(function(){var t,n,a;return s(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=r.resize(e[1],e[1]),e[2]&&(n=I(i.background_color)||{r:void 0,g:void 0,b:void 0},t.flatten({background:{r:n.r,g:n.g,b:n.b,alpha:1}})),t.png(),[4,t.toFile(e[0])];case 1:return o.sent(),[3,3];case 2:return a=o.sent(),z(a),[3,3];case 3:return[2]}}))}))},p=q(i))u=p[Number(c)],f.ensureDir(""+t+d.default.sep+u);for(l in m=[],i)m.push(l);x=0,j.label=2;case 2:if(!(x<m.length))return[3,7];for(w in g=m[x],b=i[String(g)],v=[],b.sizes)v.push(w);y=0,j.label=3;case 3:return y<v.length?(_=v[y],k=b.sizes[String(_)],b.splash?[3,5]:(S=t+"/"+b.folder,a=!0===b.infix?""+S+d.default.sep+b.prefix+k+"x"+k+b.suffix:""+S+d.default.sep+b.prefix+b.suffix,T=[a,k,b.background],[4,n(T)])):[3,6];case 4:j.sent(),j.label=5;case 5:return y++,[3,3];case 6:return x++,[3,2];case 7:return[2]}}))}))},splash:function(e,t,i,r){return o(this,void 0,void 0,(function(){var n,a,o,p,c,u,m,l,x,g,b,v,w,y,_,k,z;return s(this,(function(s){switch(s.label){case 0:return a=!1,o=I(r.background_color)||{r:void 0,g:void 0,b:void 0},t===e&&(a=!0),a||"generate"===r.splashscreen_type?[4,this.validate(e,i)]:[3,2];case 1:return s.sent(),S||process.exit(1),(p=h.default(e)).extend({top:726,bottom:726,left:726,right:726,background:{r:o.r,g:o.g,b:o.b,alpha:1}}).flatten({background:{r:o.r,g:o.g,b:o.b,alpha:1}}),[3,3];case 2:if("overlay"===r.splashscreen_type)p=h.default(t).flatten({background:{r:o.r,g:o.g,b:o.b,alpha:1}}).composite([{input:e}]);else{if("pure"!==r.splashscreen_type)throw new Error("unknown options.splashscreen_type: "+r.splashscreen_type);p=h.default(t).flatten({background:{r:o.r,g:o.g,b:o.b,alpha:1}})}s.label=3;case 3:return[4,p.toBuffer()];case 4:for(m in c=s.sent(),u=[],r)u.push(m);l=0,s.label=5;case 5:if(!(l<u.length))return[3,11];for(v in x=u[l],g=r[String(x)],b=[],g.sizes)b.push(v);w=0,s.label=6;case 6:return w<b.length?(y=b[w],_=g.sizes[String(y)],g.splash?(k=""+i+d.default.sep+g.folder,[4,f.ensureDir(k)]):[3,9]):[3,10];case 7:return s.sent(),n=!0===g.infix?""+k+d.default.sep+g.prefix+_+"x"+_+g.suffix:""+k+d.default.sep+g.prefix+g.suffix,z=[n,_],[4,h.default(c).resize(z[1][0],z[1][1]).toFile(z[0])];case 8:s.sent(),s.label=9;case 9:return w++,[3,6];case 10:return l++,[3,5];case 11:return[2]}}))}))},minify:function(e,t,i,r){return o(this,void 0,void 0,(function(){var n,a,p,f,l,x,g,h,b,v=this;return s(this,(function(y){switch(y.label){case 0:switch((a=w.options.minify).available.find((function(e){return e===i}))||(i=a.type),i){case"optipng":n=u.default(a.optipngOptions);break;case"zopfli":n=m.default(a.zopfliOptions);break;default:throw new Error("unknown strategy"+i)}switch(p=function(e,t){return o(v,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return[4,c.default([e[0]],{destination:e[1],plugins:[t]}).catch((function(e){z(e)}))];case 1:return i.sent(),[2]}}))}))},r){case"singlefile":return[3,1];case"batch":return[3,3]}return[3,8];case 1:return[4,p([e,d.default.dirname(e)],n)];case 2:return y.sent(),[3,9];case 3:for(x in f=q(t),l=[],f)l.push(x);g=0,y.label=4;case 4:return g<l.length?(h=l[g],b=f[Number(h)],k("batch minify:"+String(b)),[4,p([""+e+d.default.sep+b+d.default.sep+"*.png",""+e+d.default.sep+b],n)]):[3,7];case 5:y.sent(),y.label=6;case 6:return g++,[3,4];case 7:return[3,9];case 8:z("[ERROR] Minify mode must be one of [ singlefile | batch]"),process.exit(1),y.label=9;case 9:return[2,"minified"]}}))}))},icns:function(e,t,i,r){return o(this,void 0,void 0,(function(){var i,r,n,a;return s(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),S||process.exit(1),[4,this.validate(e,t)];case 1:return o.sent(),[4,h.default(e).toBuffer()];case 2:if(i=o.sent(),null===(r=x.createICNS(i,x.BICUBIC,0)))throw new Error("Failed to create icon.icns");if(f.ensureFileSync(d.default.join(t,"/icon.icns")),f.writeFileSync(d.default.join(t,"/icon.icns"),r),null===(n=x.createICO(i,x.BICUBIC,0,!0)))throw new Error("Failed to create icon.ico");return f.ensureFileSync(d.default.join(t,"/icon.ico")),f.writeFileSync(d.default.join(t,"/icon.ico"),n),[3,4];case 3:throw a=o.sent(),console.error(a),a;case 4:return[2]}}))}))}};e.exports&&(t=e.exports=M),t.tauricon=M},123:function(e,t,i){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resolve=t.tauriDir=t.appDir=void 0;var n=i(747),a=i(622),o=r(i(976)),s=r(i(242)),p=o.default("tauri",s.default.red);function f(e,t){return t&&a.isAbsolute(t)?t:a.resolve(e,t)}var c=function(){for(var e=process.cwd(),t=0;e.length>0&&!e.endsWith(a.sep)&&t<=2;){if(n.existsSync(a.join(e,"src-tauri","tauri.conf.json")))return e;t++,e=a.normalize(a.join(e,".."))}p("Couldn't find recognize the current folder as a part of a Tauri project"),process.exit(1)}();t.appDir=c;var u=a.resolve(c,"src-tauri");t.tauriDir=u;var m={app:function(e){return f(c,e)},tauri:function(e){return f(u,e)}};t.resolve=m},976:function(e,t,i){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n,a=r(i(242)),o=r(i(517));t.default=function(e,t){return void 0===t&&(t=a.default.green),function(i){var r=+new Date,s=r-(n||r);n=r,i?console.log(" "+t(String(e))+" "+i+" "+a.default.green("+"+o.default(s))):console.log()}}},352:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.options=void 0,t.options={background_color:"#000074",theme_color:"#02aa9b",sharp:"kernel: sharp.kernel.lanczos3",minify:{batch:!1,overwrite:!0,available:["optipng","zopfli"],type:"optipng",optipngOptions:{optimizationLevel:4,paletteReduction:!0},zopfliOptions:{transparent:!0,more:!0}},splash_type:"generate",tauri:{linux:{folder:".",prefix:"",infix:!0,suffix:".png",sizes:[32,128]},linux_2x:{folder:".",prefix:"128x128@2x",infix:!1,suffix:".png",sizes:[256]},defaults:{folder:".",prefix:"icon",infix:!1,suffix:".png",sizes:[512]},appx_logo:{folder:".",prefix:"StoreLogo",infix:!1,suffix:".png",sizes:[50]},appx_square:{folder:".",prefix:"Square",infix:!0,suffix:"Logo.png",sizes:[30,44,71,89,107,142,150,284,310]}}}},306:e=>{e.exports=JSON.parse('{"name":"@tauri-apps/cli","version":"1.0.0-beta.5","description":"Command line interface for building Tauri apps","bin":{"tauri":"./bin/tauri.js"},"files":["bin","dist","scripts"],"funding":{"type":"opencollective","url":"https://opencollective.com/tauri"},"scripts":{"build":"rimraf ./dist && webpack --progress","build-release":"rimraf ./dist && cross-env NODE_ENV=production webpack","test":"jest --runInBand --no-cache --testPathIgnorePatterns=\\"(build|dev)\\"","pretest":"yarn build","prepublishOnly":"yarn build-release","test:local":"jest --runInBand","lint":"eslint --ext ts \\"./src/**/*.ts\\"","lint-fix":"eslint --fix --ext ts \\"./src/**/*.ts\\"","lint:lockfile":"lockfile-lint --path yarn.lock --type yarn --validate-https --allowed-hosts npm yarn","format":"prettier --write --end-of-line=auto \\"./**/*.{js,jsx,ts,tsx,html,css,json}\\" --ignore-path .gitignore","format:check":"prettier --check --end-of-line=auto \\"./**/*.{js,jsx,ts,tsx,html,css,json}\\" --ignore-path .gitignore"},"repository":{"type":"git","url":"git+https://github.com/tauri-apps/tauri.git"},"contributors":["Tauri Team <team@tauri-apps.org> (https://tauri.studio)"],"license":"Apache-2.0 OR MIT","bugs":{"url":"https://github.com/tauri-apps/tauri/issues"},"homepage":"https://github.com/tauri-apps/tauri#readme","publishConfig":{"access":"public"},"engines":{"node":">= 12.13.0","npm":">= 6.6.0","yarn":">= 1.19.1"},"dependencies":{"@tauri-apps/toml":"2.2.4","chalk":"4.1.1","cross-env":"7.0.3","cross-spawn":"7.0.3","fs-extra":"10.0.0","got":"11.8.2","imagemin":"8.0.0","imagemin-optipng":"8.0.0","imagemin-zopfli":"7.0.0","inquirer":"8.1.1","is-png":"3.0.0","minimist":"1.2.5","ms":"2.1.3","png2icons":"2.0.1","read-chunk":"3.2.0","semver":"7.3.5","sharp":"0.28.3","update-notifier":"5.1.0"},"devDependencies":{"@babel/core":"7.14.6","@babel/preset-env":"7.14.7","@babel/preset-typescript":"7.14.5","@types/cross-spawn":"6.0.2","@types/fs-extra":"9.0.11","@types/imagemin":"7.0.0","@types/imagemin-optipng":"5.2.0","@types/inquirer":"7.3.2","@types/ms":"0.7.31","@types/semver":"7.3.6","@types/sharp":"0.28.3","@typescript-eslint/eslint-plugin":"4.28.0","@typescript-eslint/parser":"4.28.0","babel-jest":"27.0.5","eslint":"7.29.0","eslint-config-prettier":"8.3.0","eslint-config-standard-with-typescript":"20.0.0","eslint-plugin-import":"2.23.4","eslint-plugin-lodash-template":"0.19.0","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"5.1.0","eslint-plugin-security":"1.4.0","is-running":"2.1.0","jest":"27.0.5","jest-transform-toml":"1.0.0","lockfile-lint":"4.6.2","prettier":"2.3.1","promise":"8.1.0","raw-loader":"4.0.2","rimraf":"3.0.2","toml-loader":"1.0.0","ts-loader":"9.2.3","typescript":"4.3.4","webpack":"5.40.0","webpack-cli":"4.7.2","webpack-node-externals":"3.0.0"},"resolutions":{"**/lodash":"4.17.21","**/hosted-git-info":"4.0.2","**/normalize-url":"6.1.0","**/trim-newlines":"4.0.2"}}')},242:e=>{e.exports=require("chalk")},747:e=>{e.exports=require("fs")},298:e=>{e.exports=require("fs-extra")},423:e=>{e.exports=require("imagemin-optipng")},169:e=>{e.exports=require("imagemin-zopfli")},517:e=>{e.exports=require("ms")},622:e=>{e.exports=require("path")},42:e=>{e.exports=require("png2icons")},555:e=>{e.exports=require("read-chunk")},742:e=>{e.exports=require("sharp")},454:e=>{e.exports=require("strtok3")},96:e=>{e.exports=require("strtok3/lib/core")},313:e=>{e.exports=require("token-types")}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(i.exports,i,i.exports,__webpack_require__),i.exports}__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(333);return __webpack_exports__})()})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tauri=t():e.tauri=t()}(this,(function(){return(()=>{"use strict";var __webpack_modules__={729:(e,t,i)=>{i.r(t),i.d(t,{default:()=>d});const r=require("util");var n=i(622);const a=require("graceful-fs");var o=i(747),s=i(975);const p=require("globby");function f(...e){if(0===e.length)throw new Error("Expected at least one argument");return async t=>{let i=t;for(const t of e)i=await t(i);return i}}const c=require("replace-ext"),u=require("junk"),m=(0,r.promisify)(a.readFile),l=(0,r.promisify)(a.writeFile);async function d(e,{glob:t=!0,...i}={}){if(!Array.isArray(e))throw new TypeError(`Expected an \`Array\`, got \`${typeof e}\``);const r=t?await p(e,{onlyFiles:!0}):e;return Promise.all(r.filter((e=>u.not(n.basename(e)))).map((async t=>{try{return await(async(e,{destination:t,plugins:i=[]})=>{if(i&&!Array.isArray(i))throw new TypeError("The `plugins` option should be an `Array`");let r=await m(e);r=await(i.length>0?f(...i)(r):r);const{ext:a}=await s.fromBuffer(r);let p=t?n.join(t,n.basename(e)):void 0;p="webp"===a?c(p,".webp"):p;const u={data:r,sourcePath:e,destinationPath:p};return p?(await o.promises.mkdir(n.dirname(u.destinationPath),{recursive:!0}),await l(u.destinationPath,u.data),u):u})(t,i)}catch(t){throw t.message=`Error occurred when handling file: ${e}\n\n${t.stack}`,t}})))}d.buffer=async(e,{plugins:t=[]}={})=>{if(!Buffer.isBuffer(e))throw new TypeError(`Expected a \`Buffer\`, got \`${typeof e}\``);return 0===t.length?e:f(...t)(e)}},499:(module,__unused_webpack_exports,__webpack_require__)=>{const Token=__webpack_require__(313),strtok3=__webpack_require__(96),{stringToBytes,tarHeaderChecksumMatches,uint32SyncSafeToken}=__webpack_require__(992),supported=__webpack_require__(722),minimumBytes=4100;async function fromStream(e){const t=await strtok3.fromStream(e);try{return await fromTokenizer(t)}finally{await t.close()}}async function fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||Buffer.isBuffer(e)))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof e}\``);const t=e instanceof Buffer?e:Buffer.from(e);if(t&&t.length>1)return fromTokenizer(strtok3.fromBuffer(t))}function _check(e,t,i){i={offset:0,...i};for(const[r,n]of t.entries())if(i.mask){if(n!==(i.mask[r]&e[r+i.offset]))return!1}else if(n!==e[r+i.offset])return!1;return!0}async function _checkSequence(e,t,i){const r=Buffer.alloc(minimumBytes);return await t.ignore(i),await t.peekBuffer(r,{mayBeLess:!0}),r.includes(Buffer.from(e))}async function fromTokenizer(e){try{return _fromTokenizer(e)}catch(e){if(!(e instanceof strtok3.EndOfStreamError))throw e}}async function _fromTokenizer(e){let t=Buffer.alloc(minimumBytes);const i=(e,i)=>_check(t,e,i),r=(e,t)=>i(stringToBytes(e),t);if(e.fileInfo.size||(e.fileInfo.size=Number.MAX_SAFE_INTEGER),await e.peekBuffer(t,{length:12,mayBeLess:!0}),i([66,77]))return{ext:"bmp",mime:"image/bmp"};if(i([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(i([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(i([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(i([37,33]))return await e.peekBuffer(t,{length:24,mayBeLess:!0}),r("PS-Adobe-",{offset:2})&&r(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(i([31,160])||i([31,157]))return{ext:"Z",mime:"application/x-compress"};if(i([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(i([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(i([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(i([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r("ID3")){await e.ignore(6);const t=await e.readToken(uint32SyncSafeToken);return e.position+t>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(t),fromTokenizer(e))}if(r("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===t[0]||70===t[0])&&i([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(i([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r("FLIF"))return{ext:"flif",mime:"image/flif"};if(r("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(r("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(r("FORM"))return{ext:"aif",mime:"audio/aiff"};if(r("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(i([80,75,3,4])){try{for(;e.position+30<e.fileInfo.size;){await e.readBuffer(t,{length:30});const i={compressedSize:t.readUInt32LE(18),uncompressedSize:t.readUInt32LE(22),filenameLength:t.readUInt16LE(26),extraFieldLength:t.readUInt16LE(28)};if(i.filename=await e.readToken(new Token.StringType(i.filenameLength,"utf-8")),await e.ignore(i.extraFieldLength),"META-INF/mozilla.rsa"===i.filename)return{ext:"xpi",mime:"application/x-xpinstall"};if(i.filename.endsWith(".rels")||i.filename.endsWith(".xml"))switch(i.filename.split("/")[0]){case"_rels":break;case"word":return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};case"ppt":return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};case"xl":return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}if(i.filename.startsWith("xl/"))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if("mimetype"===i.filename&&i.compressedSize===i.uncompressedSize)switch(await e.readToken(new Token.StringType(i.compressedSize,"utf-8"))){case"application/epub+zip":return{ext:"epub",mime:"application/epub+zip"};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"}}if(0===i.compressedSize){let i=-1;for(;i<0&&e.position<e.fileInfo.size;)await e.peekBuffer(t,{mayBeLess:!0}),i=t.indexOf("504B0304",0,"hex"),await e.ignore(i>=0?i:t.length)}else await e.ignore(i.compressedSize)}}catch(e){if(!(e instanceof strtok3.EndOfStreamError))throw e}return{ext:"zip",mime:"application/zip"}}if(r("OggS")){await e.ignore(28);const t=Buffer.alloc(8);return await e.readBuffer(t),_check(t,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/opus"}:_check(t,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:_check(t,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:_check(t,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:_check(t,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:_check(t,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(i([80,75])&&(3===t[2]||5===t[2]||7===t[2])&&(4===t[3]||6===t[3]||8===t[3]))return{ext:"zip",mime:"application/zip"};if(r("ftyp",{offset:4})&&0!=(96&t[8])){const e=t.toString("binary",8,12).replace("\0"," ").trim();switch(e){case"avif":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return e.startsWith("3g")?e.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(r("MThd"))return{ext:"mid",mime:"audio/midi"};if(r("wOFF")&&(i([0,1,0,0],{offset:4})||r("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(r("wOF2")&&(i([0,1,0,0],{offset:4})||r("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(i([212,195,178,161])||i([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(r("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(r("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(r("fLaC"))return{ext:"flac",mime:"audio/x-flac"};if(i([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(r("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(r("%PDF"))return await("Adobe Illustrator",1350,_checkSequence("Adobe Illustrator",e,1350))?{ext:"ai",mime:"application/postscript"}:{ext:"pdf",mime:"application/pdf"};if(i([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(i([73,73,42,0]))return r("CR",{offset:8})?{ext:"cr2",mime:"image/x-canon-cr2"}:i([28,0,254,0],{offset:8})||i([31,0,11,0],{offset:8})?{ext:"nef",mime:"image/x-nikon-nef"}:i([8,0,0,0],{offset:4})&&(i([45,0,254,0],{offset:8})||i([39,0,254,0],{offset:8}))?{ext:"dng",mime:"image/x-adobe-dng"}:(t=Buffer.alloc(24),await e.peekBuffer(t),(i([16,251,134,1],{offset:4})||i([8,0,0,0],{offset:4}))&&i([0,254,0,4,0,1,0,0,0,1,0,0,0,3,1],{offset:9})?{ext:"arw",mime:"image/x-sony-arw"}:{ext:"tif",mime:"image/tiff"});if(i([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r("MAC "))return{ext:"ape",mime:"audio/ape"};if(i([26,69,223,163])){async function n(){const t=await e.peekNumber(Token.UINT8);let i=128,r=0;for(;0==(t&i);)++r,i>>=1;const n=Buffer.alloc(r+1);return await e.readBuffer(n),n}async function a(){const e=await n(),t=await n();t[0]^=128>>t.length-1;const i=Math.min(6,t.length);return{id:e.readUIntBE(0,e.length),len:t.readUIntBE(t.length-i,i)}}const t=await a();switch(await async function(t,i){for(;i>0;){const t=await a();if(17026===t.id)return e.readToken(new Token.StringType(t.len,"utf-8"));await e.ignore(t.len),--i}}(0,t.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/x-matroska"};default:return}}if(i([82,73,70,70])){if(i([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(i([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(i([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(r("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(i([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(r("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(r("MSCF")||r("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(i([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(i([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(i([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(r("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(r("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(i([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(r("IMPM"))return{ext:"it",mime:"audio/x-it"};if(r("-lh0-",{offset:2})||r("-lh1-",{offset:2})||r("-lh2-",{offset:2})||r("-lh3-",{offset:2})||r("-lh4-",{offset:2})||r("-lh5-",{offset:2})||r("-lh6-",{offset:2})||r("-lh7-",{offset:2})||r("-lzs-",{offset:2})||r("-lz4-",{offset:2})||r("-lz5-",{offset:2})||r("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(i([0,0,1,186])){if(i([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(i([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(i([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(r("<?xml "))return{ext:"xml",mime:"application/xml"};if(r("BEGIN:"))return{ext:"ics",mime:"text/calendar"};if(i([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(i([82,97,114,33,26,7])&&(0===t[6]||1===t[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(r("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(r("!<arch>"))return await e.ignore(8),"debian-binary"===await e.readToken(new Token.StringType(13,"ascii"))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(i([137,80,78,71,13,10,26,10])){async function o(){return{length:await e.readToken(Token.INT32_BE),type:await e.readToken(new Token.StringType(4,"binary"))}}await e.ignore(8);do{const t=await o();switch(t.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e.ignore(t.length+4)}}while(e.position<e.fileInfo.size);return{ext:"png",mime:"image/png"}}if(i([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/x-apache-arrow"};if(i([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(i([102,114,101,101],{offset:4})||i([109,100,97,116],{offset:4})||i([109,111,111,118],{offset:4})||i([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(i([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(i([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(i([48,38,178,117,142,102,207,17,166,217])){async function s(){const t=Buffer.alloc(16);return await e.readBuffer(t),{id:t,size:await e.readToken(Token.UINT64_LE)}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const t=await s();let i=t.size-24;if(_check(t.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const t=Buffer.alloc(16);if(i-=await e.readBuffer(t),_check(t,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"wma",mime:"audio/x-ms-wma"};if(_check(t,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"wmv",mime:"video/x-ms-asf"};break}await e.ignore(i)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(i([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((i([126,16,4])||i([126,24,4]))&&i([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(i([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(i([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new Token.StringType(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(i([0,0,1,186])||i([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(i([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(i([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(i([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await e.peekBuffer(t,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),r("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(r("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(r("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(i([4,0,0,0])&&t.length>=16){const e=t.readUInt32LE(12);if(e>12&&e<240&&t.length>=e+16)try{const i=t.slice(16,e+16).toString();if(JSON.parse(i).files)return{ext:"asar",mime:"application/x-asar"}}catch(e){}}if(i([208,207,17,224,161,177,26,225,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62]))return{ext:"msi",mime:"application/x-msi"};if(i([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(r("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(i([71],{offset:4})&&(i([71],{offset:192})||i([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(i([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(i([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(i([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(i([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(i([76,80],{offset:34})&&(i([0,0,1],{offset:8})||i([1,0,2],{offset:8})||i([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(i([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(await e.peekBuffer(t,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),tarHeaderChecksumMatches(t))return{ext:"tar",mime:"application/x-tar"};if(i([255,254,255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0]))return{ext:"skp",mime:"application/vnd.sketchup.skp"};if(r("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"};for(let e=0;e<2&&e<t.length-16;e++)if(t.length>=e+2&&i([255,224],{offset:e,mask:[255,224]})){if(i([16],{offset:e+1,mask:[22]}))return i([8],{offset:e+1,mask:[8]}),{ext:"aac",mime:"audio/aac"};if(i([2],{offset:e+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(i([4],{offset:e+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(i([6],{offset:e+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}const stream=readableStream=>new Promise(((resolve,reject)=>{const stream=eval("require")("stream");readableStream.on("error",reject),readableStream.once("readable",(async()=>{const e=new stream.PassThrough;let t;t=stream.pipeline?stream.pipeline(readableStream,e,(()=>{})):readableStream.pipe(e);const i=readableStream.read(minimumBytes)||readableStream.read()||Buffer.alloc(0);try{const t=await fromBuffer(i);e.fileType=t}catch(e){reject(e)}resolve(t)}))})),fileType={fromStream,fromTokenizer,fromBuffer,stream};Object.defineProperty(fileType,"extensions",{get:()=>new Set(supported.extensions)}),Object.defineProperty(fileType,"mimeTypes",{get:()=>new Set(supported.mimeTypes)}),module.exports=fileType},975:(e,t,i)=>{const r=i(454),n=i(499),a={fromFile:async function(e){const t=await r.fromFile(e);try{return await n.fromTokenizer(t)}finally{await t.close()}}};Object.assign(a,n),Object.defineProperty(a,"extensions",{get:()=>n.extensions}),Object.defineProperty(a,"mimeTypes",{get:()=>n.mimeTypes}),e.exports=a},722:e=>{e.exports={extensions:["jpg","png","apng","gif","webp","flif","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","msi","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","wmv","wma","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","ai","skp","avif","eps","lzh","pgp","asar"],mimeTypes:["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/x-apache-arrow","video/mp4","audio/midi","video/x-matroska","video/webm","video/quicktime","video/vnd.avi","audio/vnd.wave","audio/qcelp","audio/x-ms-wma","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","audio/opus","video/ogg","audio/ogg","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-msi","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar"]}},992:(e,t)=>{t.stringToBytes=e=>[...e].map((e=>e.charCodeAt(0))),t.tarHeaderChecksumMatches=e=>{if(e.length<512)return!1;const t=parseInt(e.toString("utf8",148,154).replace(/\0.*$/,"").trim(),8);if(isNaN(t))return!1;let i=256,r=0;for(let t=0;t<148;t++){const n=e[t];i+=n,r+=128&n}for(let t=156;t<512;t++){const n=e[t];i+=n,r+=128&n}return t===i||t===i-(r<<1)},t.uint32SyncSafeToken={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4}},209:(e,t,i)=>{function r(e){return!(!e||e.length<8)&&137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]&&13===e[4]&&10===e[5]&&26===e[6]&&10===e[7]}i.r(t),i.d(t,{default:()=>r})},333:function(e,t,i){var r=this&&this.__createBinding||(Object.create?function(e,t,i,r){void 0===r&&(r=i),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,r){void 0===r&&(r=i),e[r]=t[i]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&r(t,e,i);return n(t,e),t},o=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var i,r,n,a,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){o.label=a[1];break}if(6===a[0]&&o.label<n[1]){o.label=n[1],n=a;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(a);break}n[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{i=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var f=i(298),c=p(i(729)),u=p(i(423)),m=p(i(169)),l=p(i(209)),d=p(i(622)),x=a(i(42)),g=p(i(555)),h=p(i(742)),b=i(123),v=p(i(976)),w=a(i(352)),y=p(i(242)),_=i(306),k=v.default("app:spawn"),z=v.default("app:spawn",y.default.red),S=!1,T=null,j=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,f.access(e)];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))},B=function(e){return o(void 0,void 0,void 0,(function(){var t,i;return s(this,(function(r){switch(r.label){case 0:return!1===S?[3,1]:[2,S];case 1:return[4,j(e)];case 2:return r.sent()?[3,3]:(S=!1,T&&clearInterval(T),z("[ERROR] Source image for tauricon not found"),process.exit(1),[3,8]);case 3:return[4,g.default(e,0,8)];case 4:return t=r.sent(),l.default(t)?[4,(S=h.default(e)).metadata()]:[3,7];case 5:return(i=r.sent()).hasAlpha&&4===i.channels||(T&&clearInterval(T),z("[ERROR] Source png for tauricon is not transparent"),process.exit(1)),[4,S.stats()];case 6:return r.sent().isOpaque&&(T&&clearInterval(T),z("[ERROR] Source png for tauricon could not be detected as transparent"),process.exit(1)),[2,S];case 7:S=!1,T&&clearInterval(T),z("[ERROR] Source image for tauricon is not a png"),process.exit(1),r.label=8;case 8:return[2]}}))}))},q=function(e){var t=[];for(var i in e){var r=e[String(i)];r.folder&&t.push(r.folder)}return t.sort().filter((function(e,t,i){return!t||e!==i[t-1]}))},I=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,i,r){return t+t+i+i+r+r}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:void 0},E=function(e,t){return o(void 0,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return void 0===t?[3,2]:[4,f.ensureDir(t)];case 1:i.sent(),i.label=2;case 2:return[4,B(e)];case 3:return[2,i.sent()]}}))}))},O=function(e){process.stdout.write(" "+e+" \r")},M=t.tauricon={validate:function(e,t){return o(this,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return[4,E(e,t)];case 1:return i.sent(),[2,"object"==typeof S]}}))}))},version:function(){return _.version},make:function(e,t,i,r){return void 0===t&&(t=d.default.resolve(b.tauriDir,"icons")),o(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return e||(e=d.default.resolve(b.appDir,"app-icon.png")),T="CI"in process.env||process.argv.some((function(e){return"--ci"===e}))?null:setInterval((function(){process.stdout.write("/ \r"),setTimeout((function(){process.stdout.write("- \r"),setTimeout((function(){process.stdout.write("\\ \r"),setTimeout((function(){process.stdout.write("| \r")}),100)}),100)}),100)}),500),r=r||w.options.tauri,O('Building Tauri icns and ico from "'+e+'"'),[4,this.validate(e,t)];case 1:return n.sent(),[4,this.icns(e,t,r,i)];case 2:return n.sent(),O("Building Tauri png icons"),[4,this.build(e,t,r)];case 3:return n.sent(),i?(O("Minifying assets with "+i),[4,this.minify(t,r,i,"batch")]):[3,5];case 4:return n.sent(),[3,6];case 5:k("no minify strategy"),n.label=6;case 6:return O("Tauricon Finished"),T&&clearInterval(T),[2,!0]}}))}))},build:function(e,t,i){return o(this,void 0,void 0,(function(){var r,n,a,p,c,u,m,l,x,g,b,v,w,y,_,k,S,T;return s(this,(function(j){switch(j.label){case 0:return[4,this.validate(e,t)];case 1:for(c in j.sent(),r=h.default(e),n=function(e){return o(this,void 0,void 0,(function(){var t,n,a;return s(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=r.resize(e[1],e[1]),e[2]&&(n=I(i.background_color)||{r:void 0,g:void 0,b:void 0},t.flatten({background:{r:n.r,g:n.g,b:n.b,alpha:1}})),t.png(),[4,t.toFile(e[0])];case 1:return o.sent(),[3,3];case 2:return a=o.sent(),z(a),[3,3];case 3:return[2]}}))}))},p=q(i))u=p[Number(c)],f.ensureDir(""+t+d.default.sep+u);for(l in m=[],i)m.push(l);x=0,j.label=2;case 2:if(!(x<m.length))return[3,7];for(w in g=m[x],b=i[String(g)],v=[],b.sizes)v.push(w);y=0,j.label=3;case 3:return y<v.length?(_=v[y],k=b.sizes[String(_)],b.splash?[3,5]:(S=t+"/"+b.folder,a=!0===b.infix?""+S+d.default.sep+b.prefix+k+"x"+k+b.suffix:""+S+d.default.sep+b.prefix+b.suffix,T=[a,k,b.background],[4,n(T)])):[3,6];case 4:j.sent(),j.label=5;case 5:return y++,[3,3];case 6:return x++,[3,2];case 7:return[2]}}))}))},splash:function(e,t,i,r){return o(this,void 0,void 0,(function(){var n,a,o,p,c,u,m,l,x,g,b,v,w,y,_,k,z;return s(this,(function(s){switch(s.label){case 0:return a=!1,o=I(r.background_color)||{r:void 0,g:void 0,b:void 0},t===e&&(a=!0),a||"generate"===r.splashscreen_type?[4,this.validate(e,i)]:[3,2];case 1:return s.sent(),S||process.exit(1),(p=h.default(e)).extend({top:726,bottom:726,left:726,right:726,background:{r:o.r,g:o.g,b:o.b,alpha:1}}).flatten({background:{r:o.r,g:o.g,b:o.b,alpha:1}}),[3,3];case 2:if("overlay"===r.splashscreen_type)p=h.default(t).flatten({background:{r:o.r,g:o.g,b:o.b,alpha:1}}).composite([{input:e}]);else{if("pure"!==r.splashscreen_type)throw new Error("unknown options.splashscreen_type: "+r.splashscreen_type);p=h.default(t).flatten({background:{r:o.r,g:o.g,b:o.b,alpha:1}})}s.label=3;case 3:return[4,p.toBuffer()];case 4:for(m in c=s.sent(),u=[],r)u.push(m);l=0,s.label=5;case 5:if(!(l<u.length))return[3,11];for(v in x=u[l],g=r[String(x)],b=[],g.sizes)b.push(v);w=0,s.label=6;case 6:return w<b.length?(y=b[w],_=g.sizes[String(y)],g.splash?(k=""+i+d.default.sep+g.folder,[4,f.ensureDir(k)]):[3,9]):[3,10];case 7:return s.sent(),n=!0===g.infix?""+k+d.default.sep+g.prefix+_+"x"+_+g.suffix:""+k+d.default.sep+g.prefix+g.suffix,z=[n,_],[4,h.default(c).resize(z[1][0],z[1][1]).toFile(z[0])];case 8:s.sent(),s.label=9;case 9:return w++,[3,6];case 10:return l++,[3,5];case 11:return[2]}}))}))},minify:function(e,t,i,r){return o(this,void 0,void 0,(function(){var n,a,p,f,l,x,g,h,b,v=this;return s(this,(function(y){switch(y.label){case 0:switch((a=w.options.minify).available.find((function(e){return e===i}))||(i=a.type),i){case"optipng":n=u.default(a.optipngOptions);break;case"zopfli":n=m.default(a.zopfliOptions);break;default:throw new Error("unknown strategy"+i)}switch(p=function(e,t){return o(v,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return[4,c.default([e[0]],{destination:e[1],plugins:[t]}).catch((function(e){z(e)}))];case 1:return i.sent(),[2]}}))}))},r){case"singlefile":return[3,1];case"batch":return[3,3]}return[3,8];case 1:return[4,p([e,d.default.dirname(e)],n)];case 2:return y.sent(),[3,9];case 3:for(x in f=q(t),l=[],f)l.push(x);g=0,y.label=4;case 4:return g<l.length?(h=l[g],b=f[Number(h)],k("batch minify:"+String(b)),[4,p([""+e+d.default.sep+b+d.default.sep+"*.png",""+e+d.default.sep+b],n)]):[3,7];case 5:y.sent(),y.label=6;case 6:return g++,[3,4];case 7:return[3,9];case 8:z("[ERROR] Minify mode must be one of [ singlefile | batch]"),process.exit(1),y.label=9;case 9:return[2,"minified"]}}))}))},icns:function(e,t,i,r){return o(this,void 0,void 0,(function(){var i,r,n,a;return s(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),S||process.exit(1),[4,this.validate(e,t)];case 1:return o.sent(),[4,h.default(e).toBuffer()];case 2:if(i=o.sent(),null===(r=x.createICNS(i,x.BICUBIC,0)))throw new Error("Failed to create icon.icns");if(f.ensureFileSync(d.default.join(t,"/icon.icns")),f.writeFileSync(d.default.join(t,"/icon.icns"),r),null===(n=x.createICO(i,x.BICUBIC,0,!0)))throw new Error("Failed to create icon.ico");return f.ensureFileSync(d.default.join(t,"/icon.ico")),f.writeFileSync(d.default.join(t,"/icon.ico"),n),[3,4];case 3:throw a=o.sent(),console.error(a),a;case 4:return[2]}}))}))}};e.exports&&(t=e.exports=M),t.tauricon=M},123:function(e,t,i){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resolve=t.tauriDir=t.appDir=void 0;var n=i(747),a=i(622),o=r(i(976)),s=r(i(242)),p=o.default("tauri",s.default.red);function f(e,t){return t&&a.isAbsolute(t)?t:a.resolve(e,t)}var c=function(){for(var e=process.cwd(),t=0;e.length>0&&!e.endsWith(a.sep)&&t<=2;){if(n.existsSync(a.join(e,"src-tauri","tauri.conf.json")))return e;t++,e=a.normalize(a.join(e,".."))}p("Couldn't find recognize the current folder as a part of a Tauri project"),process.exit(1)}();t.appDir=c;var u=a.resolve(c,"src-tauri");t.tauriDir=u;var m={app:function(e){return f(c,e)},tauri:function(e){return f(u,e)}};t.resolve=m},976:function(e,t,i){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n,a=r(i(242)),o=r(i(517));t.default=function(e,t){return void 0===t&&(t=a.default.green),function(i){var r=+new Date,s=r-(n||r);n=r,i?console.log(" "+t(String(e))+" "+i+" "+a.default.green("+"+o.default(s))):console.log()}}},352:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.options=void 0,t.options={background_color:"#000074",theme_color:"#02aa9b",sharp:"kernel: sharp.kernel.lanczos3",minify:{batch:!1,overwrite:!0,available:["optipng","zopfli"],type:"optipng",optipngOptions:{optimizationLevel:4,paletteReduction:!0},zopfliOptions:{transparent:!0,more:!0}},splash_type:"generate",tauri:{linux:{folder:".",prefix:"",infix:!0,suffix:".png",sizes:[32,128]},linux_2x:{folder:".",prefix:"128x128@2x",infix:!1,suffix:".png",sizes:[256]},defaults:{folder:".",prefix:"icon",infix:!1,suffix:".png",sizes:[512]},appx_logo:{folder:".",prefix:"StoreLogo",infix:!1,suffix:".png",sizes:[50]},appx_square:{folder:".",prefix:"Square",infix:!0,suffix:"Logo.png",sizes:[30,44,71,89,107,142,150,284,310]}}}},306:e=>{e.exports=JSON.parse('{"name":"@tauri-apps/cli","version":"1.0.0-beta.6","description":"Command line interface for building Tauri apps","bin":{"tauri":"./bin/tauri.js"},"files":["bin","dist","scripts"],"funding":{"type":"opencollective","url":"https://opencollective.com/tauri"},"scripts":{"build":"rimraf ./dist && webpack --progress","build-release":"rimraf ./dist && cross-env NODE_ENV=production webpack","test":"jest --runInBand --no-cache --testPathIgnorePatterns=\\"(build|dev)\\"","pretest":"yarn build","prepublishOnly":"yarn build-release","test:local":"jest --runInBand","lint":"eslint --ext ts \\"./src/**/*.ts\\"","lint-fix":"eslint --fix --ext ts \\"./src/**/*.ts\\"","lint:lockfile":"lockfile-lint --path yarn.lock --type yarn --validate-https --allowed-hosts npm yarn","format":"prettier --write --end-of-line=auto \\"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\\" --ignore-path .gitignore","format:check":"prettier --check --end-of-line=auto \\"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\\" --ignore-path .gitignore"},"repository":{"type":"git","url":"git+https://github.com/tauri-apps/tauri.git"},"contributors":["Tauri Team <team@tauri-apps.org> (https://tauri.studio)"],"license":"Apache-2.0 OR MIT","bugs":{"url":"https://github.com/tauri-apps/tauri/issues"},"homepage":"https://github.com/tauri-apps/tauri#readme","publishConfig":{"access":"public"},"engines":{"node":">= 12.13.0","npm":">= 6.6.0","yarn":">= 1.19.1"},"dependencies":{"@tauri-apps/toml":"2.2.4","chalk":"4.1.1","cross-env":"7.0.3","cross-spawn":"7.0.3","fs-extra":"10.0.0","got":"11.8.2","imagemin":"8.0.0","imagemin-optipng":"8.0.0","imagemin-zopfli":"7.0.0","inquirer":"8.1.1","is-png":"3.0.0","minimist":"1.2.5","ms":"2.1.3","png2icons":"2.0.1","read-chunk":"3.2.0","semver":"7.3.5","sharp":"0.28.3","update-notifier":"5.1.0"},"devDependencies":{"@babel/core":"7.14.6","@babel/preset-env":"7.14.7","@babel/preset-typescript":"7.14.5","@types/cross-spawn":"6.0.2","@types/fs-extra":"9.0.12","@types/imagemin":"7.0.1","@types/imagemin-optipng":"5.2.1","@types/inquirer":"7.3.3","@types/ms":"0.7.31","@types/semver":"7.3.7","@types/sharp":"0.28.4","@typescript-eslint/eslint-plugin":"4.28.3","@typescript-eslint/parser":"4.28.3","babel-jest":"27.0.6","eslint":"7.30.0","eslint-config-prettier":"8.3.0","eslint-config-standard-with-typescript":"20.0.0","eslint-plugin-import":"2.23.4","eslint-plugin-lodash-template":"0.19.0","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"5.1.0","eslint-plugin-security":"1.4.0","is-running":"2.1.0","jest":"27.0.6","jest-transform-toml":"1.0.0","lockfile-lint":"4.6.2","prettier":"2.3.2","promise":"8.1.0","raw-loader":"4.0.2","rimraf":"3.0.2","toml-loader":"1.0.0","ts-loader":"9.2.3","typescript":"4.3.5","webpack":"5.44.0","webpack-cli":"4.7.2","webpack-node-externals":"3.0.0"},"resolutions":{"**/lodash":"4.17.21","**/hosted-git-info":"4.0.2","**/normalize-url":"6.1.0","**/trim-newlines":"4.0.2"}}')},242:e=>{e.exports=require("chalk")},747:e=>{e.exports=require("fs")},298:e=>{e.exports=require("fs-extra")},423:e=>{e.exports=require("imagemin-optipng")},169:e=>{e.exports=require("imagemin-zopfli")},517:e=>{e.exports=require("ms")},622:e=>{e.exports=require("path")},42:e=>{e.exports=require("png2icons")},555:e=>{e.exports=require("read-chunk")},742:e=>{e.exports=require("sharp")},454:e=>{e.exports=require("strtok3")},96:e=>{e.exports=require("strtok3/lib/core")},313:e=>{e.exports=require("token-types")}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(i.exports,i,i.exports,__webpack_require__),i.exports}__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(333);return __webpack_exports__})()})); | ||
//# sourceMappingURL=tauricon.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tauri=t():e.tauri=t()}(this,(function(){return e={210:e=>{e.exports={workspace:{},package:{name:"tauri-cli",version:"1.0.0-beta.4",authors:["Tauri Programme within The Commons Conservancy"],edition:"2018",categories:["gui","web-programming"],license:"Apache-2.0 OR MIT",homepage:"https://tauri.studio",repository:"https://github.com/tauri-apps/tauri",description:"Command line interface for building Tauri apps",include:["src/","/templates","MergeModules/","*.json","*.rs"]},bin:[{name:"cargo-tauri",path:"src/main.rs"}],dependencies:{clap:{version:"3.0.0-beta.2",features:["yaml"]},anyhow:"1.0","tauri-bundler":{version:"1.0.0-beta.2",path:"../bundler"},colored:"2.0",once_cell:"1.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9",notify:"4.0",shared_child:"0.3",toml_edit:"0.2","json-patch":"0.2",schemars:"0.8",toml:"0.5",valico:"3.6",handlebars:"4.0",include_dir:"0.6",minisign:"0.6",base64:"0.13.0",ureq:"2.1",os_info:"3.0",semver:"1.0",regex:"1.5",lazy_static:"1",libc:"0.2",terminal_size:"0.1","unicode-width":"0.1",tempfile:"3",zeroize:"1.3"},target:{"cfg(windows)":{dependencies:{winapi:{version:"0.3",features:["winbase","winuser","consoleapi","processenv","wincon"]},encode_unicode:"0.3"}},'cfg(target_os = "linux")':{dependencies:{heck:"0.3"}}},"build-dependencies":{schemars:"0.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9"}}},632:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.downloadRustup=t.downloadCli=void 0;var s=o(r(413)),a=r(669),u=o(r(747)),c=o(r(301)),l=o(r(622)),p=a.promisify(s.default.pipeline),d=r(210),f={};function h(e,t,r){return n(this,void 0,void 0,(function(){var n,o;return i(this,(function(i){switch(i.label){case 0:return n="https://github.com/tauri-apps/binary-releases/releases/download/"+e+"/"+t,o=function(){try{n in f||u.default.unlinkSync(r)}finally{process.exit()}},process.on("exit",o),process.on("SIGINT",o),process.on("SIGTERM",o),process.on("SIGHUP",o),process.on("SIGBREAK",o),[4,p(c.default.stream(n),u.default.createWriteStream(r)).catch((function(e){throw o(),e}))];case 1:return i.sent(),f[n]=!0,u.default.chmodSync(r,448),console.log("Download Complete"),[2]}}))}))}t.downloadCli=function(){return n(this,void 0,void 0,(function(){var e,t,r,n;return i(this,(function(i){switch(i.label){case 0:if(e=d.package.version,"win32"===(t=process.platform))t="windows";else if("linux"===t)t="linux";else{if("darwin"!==t)throw Error("Unsupported platform");t="macos"}return r="windows"===t?".exe":"",n=l.default.join(__dirname,"../../bin/tauri-cli"+r),console.log("Downloading Rust CLI..."),[4,h("tauri-cli-v"+e,"tauri-cli_"+t+r,n)];case 1:return i.sent(),[2]}}))}))},t.downloadRustup=function(){return n(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e="win32"===process.platform?"rustup-init.exe":"rustup-init.sh",console.log("Downloading Rustup..."),[4,h("rustup",e,l.default.join(__dirname,"../../bin/"+e))];case 1:return[2,t.sent()]}}))}))}},747:e=>{"use strict";e.exports=require("fs")},301:e=>{"use strict";e.exports=require("got")},622:e=>{"use strict";e.exports=require("path")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}},t={},function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}(632);var e,t})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tauri=t():e.tauri=t()}(this,(function(){return e={210:e=>{e.exports={workspace:{},package:{name:"tauri-cli",version:"1.0.0-beta.5",authors:["Tauri Programme within The Commons Conservancy"],edition:"2018",categories:["gui","web-programming"],license:"Apache-2.0 OR MIT",homepage:"https://tauri.studio",repository:"https://github.com/tauri-apps/tauri",description:"Command line interface for building Tauri apps",include:["src/","/templates","MergeModules/","*.json","*.rs"]},bin:[{name:"cargo-tauri",path:"src/main.rs"}],dependencies:{clap:{version:"3.0.0-beta.2",features:["yaml"]},anyhow:"1.0","tauri-bundler":{version:"1.0.0-beta.3",path:"../bundler"},colored:"2.0",once_cell:"1.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9",notify:"4.0",shared_child:"0.3",toml_edit:"0.2","json-patch":"0.2",schemars:"0.8",toml:"0.5",valico:"3.6",handlebars:"4.1",include_dir:"0.6",minisign:"0.6",base64:"0.13.0",ureq:"2.1",os_info:"3.0",semver:"1.0",regex:"1.5",lazy_static:"1",libc:"0.2",terminal_size:"0.1","unicode-width":"0.1",tempfile:"3",zeroize:"1.3"},target:{"cfg(windows)":{dependencies:{winapi:{version:"0.3",features:["winbase","winuser","consoleapi","processenv","wincon"]},encode_unicode:"0.3"}},'cfg(target_os = "linux")':{dependencies:{heck:"0.3"}}},"build-dependencies":{schemars:"0.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9"}}},632:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.downloadRustup=t.downloadCli=void 0;var s=o(r(413)),a=r(669),u=o(r(747)),c=o(r(301)),l=o(r(622)),p=a.promisify(s.default.pipeline),d=r(210),f={};function h(e,t,r){return n(this,void 0,void 0,(function(){var n,o;return i(this,(function(i){switch(i.label){case 0:return n="https://github.com/tauri-apps/binary-releases/releases/download/"+e+"/"+t,o=function(){try{n in f||u.default.unlinkSync(r)}finally{process.exit()}},process.on("exit",o),process.on("SIGINT",o),process.on("SIGTERM",o),process.on("SIGHUP",o),process.on("SIGBREAK",o),[4,p(c.default.stream(n),u.default.createWriteStream(r)).catch((function(e){try{u.default.unlinkSync(r)}catch(e){}throw e}))];case 1:return i.sent(),f[n]=!0,u.default.chmodSync(r,448),console.log("Download Complete"),[2]}}))}))}t.downloadCli=function(){return n(this,void 0,void 0,(function(){var e,t,r,n;return i(this,(function(i){switch(i.label){case 0:if(e=d.package.version,"win32"===(t=process.platform))t="windows";else if("linux"===t)t="linux";else{if("darwin"!==t)throw Error("Unsupported platform");t="macos"}return r="windows"===t?".exe":"",n=l.default.join(__dirname,"../../bin/tauri-cli"+r),console.log("Downloading Rust CLI..."),[4,h("tauri-cli-v"+e,"tauri-cli_"+t+r,n)];case 1:return i.sent(),[2]}}))}))},t.downloadRustup=function(){return n(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e="win32"===process.platform?"rustup-init.exe":"rustup-init.sh",console.log("Downloading Rustup..."),[4,h("rustup",e,l.default.join(__dirname,"../../bin/"+e))];case 1:return[2,t.sent()]}}))}))}},747:e=>{"use strict";e.exports=require("fs")},301:e=>{"use strict";e.exports=require("got")},622:e=>{"use strict";e.exports=require("path")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}},t={},function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}(632);var e,t})); | ||
//# sourceMappingURL=download-binary.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tauri=t():e.tauri=t()}(this,(function(){return e={210:e=>{e.exports={workspace:{},package:{name:"tauri-cli",version:"1.0.0-beta.4",authors:["Tauri Programme within The Commons Conservancy"],edition:"2018",categories:["gui","web-programming"],license:"Apache-2.0 OR MIT",homepage:"https://tauri.studio",repository:"https://github.com/tauri-apps/tauri",description:"Command line interface for building Tauri apps",include:["src/","/templates","MergeModules/","*.json","*.rs"]},bin:[{name:"cargo-tauri",path:"src/main.rs"}],dependencies:{clap:{version:"3.0.0-beta.2",features:["yaml"]},anyhow:"1.0","tauri-bundler":{version:"1.0.0-beta.2",path:"../bundler"},colored:"2.0",once_cell:"1.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9",notify:"4.0",shared_child:"0.3",toml_edit:"0.2","json-patch":"0.2",schemars:"0.8",toml:"0.5",valico:"3.6",handlebars:"4.0",include_dir:"0.6",minisign:"0.6",base64:"0.13.0",ureq:"2.1",os_info:"3.0",semver:"1.0",regex:"1.5",lazy_static:"1",libc:"0.2",terminal_size:"0.1","unicode-width":"0.1",tempfile:"3",zeroize:"1.3"},target:{"cfg(windows)":{dependencies:{winapi:{version:"0.3",features:["winbase","winuser","consoleapi","processenv","wincon"]},encode_unicode:"0.3"}},'cfg(target_os = "linux")':{dependencies:{heck:"0.3"}}},"build-dependencies":{schemars:"0.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9"}}},632:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.downloadRustup=t.downloadCli=void 0;var s=o(n(413)),a=n(669),u=o(n(747)),c=o(n(301)),l=o(n(622)),p=a.promisify(s.default.pipeline),d=n(210),f={};function h(e,t,n){return r(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r="https://github.com/tauri-apps/binary-releases/releases/download/"+e+"/"+t,o=function(){try{r in f||u.default.unlinkSync(n)}finally{process.exit()}},process.on("exit",o),process.on("SIGINT",o),process.on("SIGTERM",o),process.on("SIGHUP",o),process.on("SIGBREAK",o),[4,p(c.default.stream(r),u.default.createWriteStream(n)).catch((function(e){throw o(),e}))];case 1:return i.sent(),f[r]=!0,u.default.chmodSync(n,448),console.log("Download Complete"),[2]}}))}))}t.downloadCli=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:if(e=d.package.version,"win32"===(t=process.platform))t="windows";else if("linux"===t)t="linux";else{if("darwin"!==t)throw Error("Unsupported platform");t="macos"}return n="windows"===t?".exe":"",r=l.default.join(__dirname,"../../bin/tauri-cli"+n),console.log("Downloading Rust CLI..."),[4,h("tauri-cli-v"+e,"tauri-cli_"+t+n,r)];case 1:return i.sent(),[2]}}))}))},t.downloadRustup=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e="win32"===process.platform?"rustup-init.exe":"rustup-init.sh",console.log("Downloading Rustup..."),[4,h("rustup",e,l.default.join(__dirname,"../../bin/"+e))];case 1:return[2,t.sent()]}}))}))}},976:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i,o=r(n(242)),s=r(n(517));t.default=function(e,t){return void 0===t&&(t=o.default.green),function(n){var r=+new Date,a=r-(i||r);i=r,n?console.log(" "+t(String(e))+" "+n+" "+o.default.green("+"+s.default(a))):console.log()}}},889:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.runOnRustCli=void 0;var s=n(747),a=n(622),u=n(71),c=n(632);t.runOnRustCli=function(e,t){return r(this,void 0,void 0,(function(){var r,l,p,d,f,h,w,v,b;return i(this,(function(i){switch(i.label){case 0:return r=a.resolve(__dirname,"../.."),l=a.join(r,"bin/tauri-cli"+("win32"===process.platform?".exe":"")),h=new Promise((function(e,t){p=e,d=function(){return t(new Error)}})),w=function(e,t){0===e?p():d()},s.existsSync(l)?(f=u.spawn(l,o(["tauri",e],t),process.cwd(),w),[3,4]):[3,1];case 1:return[4,c.downloadCli()];case 2:return i.sent(),f=u.spawn(l,o(["tauri",e],t),process.cwd(),w),[3,4];case 3:s.existsSync(a.resolve(r,"../bundler"))?(v=a.resolve(r,"../cli.rs"),u.spawnSync("cargo",["build","--release"],v),b=a.resolve(r,"../cli.rs/target/release/cargo-tauri"),f=u.spawn(b,o(["tauri",e],t),process.cwd(),w)):(u.spawnSync("cargo",["install","--root",r,"tauri-cli","--version",n(210).package.version],process.cwd()),f=u.spawn(l,o(["tauri",e],t),process.cwd(),w)),i.label=4;case 4:return[2,{pid:f,promise:h}]}}))}))}},71:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.spawnSync=t.spawn=void 0;var i=r(n(793)),o=r(n(976)),s=r(n(242)),a=o.default("app:spawn"),u=o.default("app:spawn",s.default.red);t.spawn=function(e,t,n,r){var o;a('Running "'+e+" "+t.join(" ")+'"'),a();var s=i.default(e,t,{stdio:"inherit",cwd:n,env:process.env});return s.on("close",(function(t){var n;a(),t&&a('Command "'+e+'" failed with exit code: '+t),r&&r(null!=t?t:0,null!==(n=s.pid)&&void 0!==n?n:0)})),null!==(o=s.pid)&&void 0!==o?o:0},t.spawnSync=function(e,t,n,r){a('[sync] Running "'+e+" "+t.join(" ")+'"'),a();var o=i.default.sync(e,t,{stdio:"inherit",cwd:n});(o.status||o.error)&&(u(),u('⚠️ Command "'+e+'" failed with exit code: '+o.status),null===o.status&&u('⚠️ Please globally install "'+e+'"'),r&&r(),process.exit(1))}},242:e=>{"use strict";e.exports=require("chalk")},793:e=>{"use strict";e.exports=require("cross-spawn")},747:e=>{"use strict";e.exports=require("fs")},301:e=>{"use strict";e.exports=require("got")},517:e=>{"use strict";e.exports=require("ms")},622:e=>{"use strict";e.exports=require("path")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}},t={},function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(889);var e,t})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tauri=t():e.tauri=t()}(this,(function(){return e={210:e=>{e.exports={workspace:{},package:{name:"tauri-cli",version:"1.0.0-beta.5",authors:["Tauri Programme within The Commons Conservancy"],edition:"2018",categories:["gui","web-programming"],license:"Apache-2.0 OR MIT",homepage:"https://tauri.studio",repository:"https://github.com/tauri-apps/tauri",description:"Command line interface for building Tauri apps",include:["src/","/templates","MergeModules/","*.json","*.rs"]},bin:[{name:"cargo-tauri",path:"src/main.rs"}],dependencies:{clap:{version:"3.0.0-beta.2",features:["yaml"]},anyhow:"1.0","tauri-bundler":{version:"1.0.0-beta.3",path:"../bundler"},colored:"2.0",once_cell:"1.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9",notify:"4.0",shared_child:"0.3",toml_edit:"0.2","json-patch":"0.2",schemars:"0.8",toml:"0.5",valico:"3.6",handlebars:"4.1",include_dir:"0.6",minisign:"0.6",base64:"0.13.0",ureq:"2.1",os_info:"3.0",semver:"1.0",regex:"1.5",lazy_static:"1",libc:"0.2",terminal_size:"0.1","unicode-width":"0.1",tempfile:"3",zeroize:"1.3"},target:{"cfg(windows)":{dependencies:{winapi:{version:"0.3",features:["winbase","winuser","consoleapi","processenv","wincon"]},encode_unicode:"0.3"}},'cfg(target_os = "linux")':{dependencies:{heck:"0.3"}}},"build-dependencies":{schemars:"0.8",serde:{version:"1.0",features:["derive"]},serde_json:"1.0",serde_with:"1.9"}}},632:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.downloadRustup=t.downloadCli=void 0;var s=o(n(413)),a=n(669),u=o(n(747)),c=o(n(301)),l=o(n(622)),d=a.promisify(s.default.pipeline),p=n(210),f={};function h(e,t,n){return r(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r="https://github.com/tauri-apps/binary-releases/releases/download/"+e+"/"+t,o=function(){try{r in f||u.default.unlinkSync(n)}finally{process.exit()}},process.on("exit",o),process.on("SIGINT",o),process.on("SIGTERM",o),process.on("SIGHUP",o),process.on("SIGBREAK",o),[4,d(c.default.stream(r),u.default.createWriteStream(n)).catch((function(e){try{u.default.unlinkSync(n)}catch(e){}throw e}))];case 1:return i.sent(),f[r]=!0,u.default.chmodSync(n,448),console.log("Download Complete"),[2]}}))}))}t.downloadCli=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:if(e=p.package.version,"win32"===(t=process.platform))t="windows";else if("linux"===t)t="linux";else{if("darwin"!==t)throw Error("Unsupported platform");t="macos"}return n="windows"===t?".exe":"",r=l.default.join(__dirname,"../../bin/tauri-cli"+n),console.log("Downloading Rust CLI..."),[4,h("tauri-cli-v"+e,"tauri-cli_"+t+n,r)];case 1:return i.sent(),[2]}}))}))},t.downloadRustup=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e="win32"===process.platform?"rustup-init.exe":"rustup-init.sh",console.log("Downloading Rustup..."),[4,h("rustup",e,l.default.join(__dirname,"../../bin/"+e))];case 1:return[2,t.sent()]}}))}))}},976:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i,o=r(n(242)),s=r(n(517));t.default=function(e,t){return void 0===t&&(t=o.default.green),function(n){var r=+new Date,a=r-(i||r);i=r,n?console.log(" "+t(String(e))+" "+n+" "+o.default.green("+"+s.default(a))):console.log()}}},889:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.runOnRustCli=void 0;var s=n(747),a=n(622),u=n(71),c=n(632);t.runOnRustCli=function(e,t){return r(this,void 0,void 0,(function(){var r,l,d,p,f,h,w,v,b;return i(this,(function(i){switch(i.label){case 0:return r=a.resolve(__dirname,"../.."),l=a.join(r,"bin/tauri-cli"+("win32"===process.platform?".exe":"")),h=new Promise((function(e,t){d=e,p=function(){return t(new Error)}})),w=function(e,t){0===e?d():p()},s.existsSync(l)?(f=u.spawn(l,o(["tauri",e],t),process.cwd(),w),[3,4]):[3,1];case 1:return[4,c.downloadCli()];case 2:return i.sent(),f=u.spawn(l,o(["tauri",e],t),process.cwd(),w),[3,4];case 3:s.existsSync(a.resolve(r,"../bundler"))?(v=a.resolve(r,"../cli.rs"),u.spawnSync("cargo",["build","--release"],v),b=a.resolve(r,"../cli.rs/target/release/cargo-tauri"),f=u.spawn(b,o(["tauri",e],t),process.cwd(),w)):(u.spawnSync("cargo",["install","--root",r,"tauri-cli","--version",n(210).package.version],process.cwd()),f=u.spawn(l,o(["tauri",e],t),process.cwd(),w)),i.label=4;case 4:return[2,{pid:f,promise:h}]}}))}))}},71:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.spawnSync=t.spawn=void 0;var i=r(n(793)),o=r(n(976)),s=r(n(242)),a=o.default("app:spawn"),u=o.default("app:spawn",s.default.red);t.spawn=function(e,t,n,r){var o;a('Running "'+e+" "+t.join(" ")+'"'),a();var s=i.default(e,t,{stdio:"inherit",cwd:n,env:process.env});return s.on("close",(function(t){var n;a(),t&&a('Command "'+e+'" failed with exit code: '+t),r&&r(null!=t?t:0,null!==(n=s.pid)&&void 0!==n?n:0)})),null!==(o=s.pid)&&void 0!==o?o:0},t.spawnSync=function(e,t,n,r){a('[sync] Running "'+e+" "+t.join(" ")+'"'),a();var o=i.default.sync(e,t,{stdio:"inherit",cwd:n});(o.status||o.error)&&(u(),u('⚠️ Command "'+e+'" failed with exit code: '+o.status),null===o.status&&u('⚠️ Please globally install "'+e+'"'),r&&r(),process.exit(1))}},242:e=>{"use strict";e.exports=require("chalk")},793:e=>{"use strict";e.exports=require("cross-spawn")},747:e=>{"use strict";e.exports=require("fs")},301:e=>{"use strict";e.exports=require("got")},517:e=>{"use strict";e.exports=require("ms")},622:e=>{"use strict";e.exports=require("path")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}},t={},function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(889);var e,t})); | ||
//# sourceMappingURL=rust-cli.js.map |
{ | ||
"name": "@tauri-apps/cli", | ||
"version": "1.0.0-beta.5", | ||
"version": "1.0.0-beta.6", | ||
"description": "Command line interface for building Tauri apps", | ||
@@ -27,4 +27,4 @@ "bin": { | ||
"lint:lockfile": "lockfile-lint --path yarn.lock --type yarn --validate-https --allowed-hosts npm yarn", | ||
"format": "prettier --write --end-of-line=auto \"./**/*.{js,jsx,ts,tsx,html,css,json}\" --ignore-path .gitignore", | ||
"format:check": "prettier --check --end-of-line=auto \"./**/*.{js,jsx,ts,tsx,html,css,json}\" --ignore-path .gitignore" | ||
"format": "prettier --write --end-of-line=auto \"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\" --ignore-path .gitignore", | ||
"format:check": "prettier --check --end-of-line=auto \"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\" --ignore-path .gitignore" | ||
}, | ||
@@ -76,13 +76,13 @@ "repository": { | ||
"@types/cross-spawn": "6.0.2", | ||
"@types/fs-extra": "9.0.11", | ||
"@types/imagemin": "7.0.0", | ||
"@types/imagemin-optipng": "5.2.0", | ||
"@types/inquirer": "7.3.2", | ||
"@types/fs-extra": "9.0.12", | ||
"@types/imagemin": "7.0.1", | ||
"@types/imagemin-optipng": "5.2.1", | ||
"@types/inquirer": "7.3.3", | ||
"@types/ms": "0.7.31", | ||
"@types/semver": "7.3.6", | ||
"@types/sharp": "0.28.3", | ||
"@typescript-eslint/eslint-plugin": "4.28.0", | ||
"@typescript-eslint/parser": "4.28.0", | ||
"babel-jest": "27.0.5", | ||
"eslint": "7.29.0", | ||
"@types/semver": "7.3.7", | ||
"@types/sharp": "0.28.4", | ||
"@typescript-eslint/eslint-plugin": "4.28.3", | ||
"@typescript-eslint/parser": "4.28.3", | ||
"babel-jest": "27.0.6", | ||
"eslint": "7.30.0", | ||
"eslint-config-prettier": "8.3.0", | ||
@@ -96,6 +96,6 @@ "eslint-config-standard-with-typescript": "20.0.0", | ||
"is-running": "2.1.0", | ||
"jest": "27.0.5", | ||
"jest": "27.0.6", | ||
"jest-transform-toml": "1.0.0", | ||
"lockfile-lint": "4.6.2", | ||
"prettier": "2.3.1", | ||
"prettier": "2.3.2", | ||
"promise": "8.1.0", | ||
@@ -106,4 +106,4 @@ "raw-loader": "4.0.2", | ||
"ts-loader": "9.2.3", | ||
"typescript": "4.3.4", | ||
"webpack": "5.40.0", | ||
"typescript": "4.3.5", | ||
"webpack": "5.44.0", | ||
"webpack-cli": "4.7.2", | ||
@@ -110,0 +110,0 @@ "webpack-node-externals": "3.0.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
478045
527