@pipelab/plugin-tauri 1.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["e","t","n","r","i","a","o","s","c","t","n","r","i","a","o","e","i","a","#e","#t","#n","n","e","t","r","osPlatform","parseTOML","readFilePromise","stringifyTOML","writeFilePromise","osArch"],"sources":["../../../node_modules/change-case/dist/index.js","../../../node_modules/confbox/dist/_chunks/libs/detect-indent.mjs","../../../node_modules/confbox/dist/_chunks/_format.mjs","../../../node_modules/confbox/dist/_chunks/libs/smol-toml.mjs","../../../node_modules/confbox/dist/toml.mjs","../src/tauri.ts","../src/utils.ts","../src/make.ts","../src/preview.ts","../src/configure.ts","../src/package.ts","../src/index.ts"],"sourcesContent":["// Regexps involved with splitting words in various case formats.\nconst SPLIT_LOWER_UPPER_RE = /([\\p{Ll}\\d])(\\p{Lu})/gu;\nconst SPLIT_UPPER_UPPER_RE = /(\\p{Lu})([\\p{Lu}][\\p{Ll}])/gu;\n// Used to iterate over the initial split result and separate numbers.\nconst SPLIT_SEPARATE_NUMBER_RE = /(\\d)\\p{Ll}|(\\p{L})\\d/u;\n// Regexp involved with stripping non-word characters from the result.\nconst DEFAULT_STRIP_REGEXP = /[^\\p{L}\\d]+/giu;\n// The replacement value for splits.\nconst SPLIT_REPLACE_VALUE = \"$1\\0$2\";\n// The default characters to keep after transforming case.\nconst DEFAULT_PREFIX_SUFFIX_CHARACTERS = \"\";\n/**\n * Split any cased input strings into an array of words.\n */\nexport function split(value) {\n let result = value.trim();\n result = result\n .replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE)\n .replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);\n result = result.replace(DEFAULT_STRIP_REGEXP, \"\\0\");\n let start = 0;\n let end = result.length;\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\")\n start++;\n if (start === end)\n return [];\n while (result.charAt(end - 1) === \"\\0\")\n end--;\n return result.slice(start, end).split(/\\0/g);\n}\n/**\n * Split the input string into an array of words, separating numbers.\n */\nexport function splitSeparateNumbers(value) {\n const words = split(value);\n for (let i = 0; i < words.length; i++) {\n const word = words[i];\n const match = SPLIT_SEPARATE_NUMBER_RE.exec(word);\n if (match) {\n const offset = match.index + (match[1] ?? match[2]).length;\n words.splice(i, 1, word.slice(0, offset), word.slice(offset));\n }\n }\n return words;\n}\n/**\n * Convert a string to space separated lower case (`foo bar`).\n */\nexport function noCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n return (prefix +\n words.map(lowerFactory(options?.locale)).join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to camel case (`fooBar`).\n */\nexport function camelCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = options?.mergeAmbiguousCharacters\n ? capitalCaseTransformFactory(lower, upper)\n : pascalCaseTransformFactory(lower, upper);\n return (prefix +\n words\n .map((word, index) => {\n if (index === 0)\n return lower(word);\n return transform(word, index);\n })\n .join(options?.delimiter ?? \"\") +\n suffix);\n}\n/**\n * Convert a string to pascal case (`FooBar`).\n */\nexport function pascalCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = options?.mergeAmbiguousCharacters\n ? capitalCaseTransformFactory(lower, upper)\n : pascalCaseTransformFactory(lower, upper);\n return prefix + words.map(transform).join(options?.delimiter ?? \"\") + suffix;\n}\n/**\n * Convert a string to pascal snake case (`Foo_Bar`).\n */\nexport function pascalSnakeCase(input, options) {\n return capitalCase(input, { delimiter: \"_\", ...options });\n}\n/**\n * Convert a string to capital case (`Foo Bar`).\n */\nexport function capitalCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n return (prefix +\n words\n .map(capitalCaseTransformFactory(lower, upper))\n .join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to constant case (`FOO_BAR`).\n */\nexport function constantCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n return (prefix +\n words.map(upperFactory(options?.locale)).join(options?.delimiter ?? \"_\") +\n suffix);\n}\n/**\n * Convert a string to dot case (`foo.bar`).\n */\nexport function dotCase(input, options) {\n return noCase(input, { delimiter: \".\", ...options });\n}\n/**\n * Convert a string to kebab case (`foo-bar`).\n */\nexport function kebabCase(input, options) {\n return noCase(input, { delimiter: \"-\", ...options });\n}\n/**\n * Convert a string to path case (`foo/bar`).\n */\nexport function pathCase(input, options) {\n return noCase(input, { delimiter: \"/\", ...options });\n}\n/**\n * Convert a string to path case (`Foo bar`).\n */\nexport function sentenceCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = capitalCaseTransformFactory(lower, upper);\n return (prefix +\n words\n .map((word, index) => {\n if (index === 0)\n return transform(word);\n return lower(word);\n })\n .join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to snake case (`foo_bar`).\n */\nexport function snakeCase(input, options) {\n return noCase(input, { delimiter: \"_\", ...options });\n}\n/**\n * Convert a string to header case (`Foo-Bar`).\n */\nexport function trainCase(input, options) {\n return capitalCase(input, { delimiter: \"-\", ...options });\n}\nfunction lowerFactory(locale) {\n return locale === false\n ? (input) => input.toLowerCase()\n : (input) => input.toLocaleLowerCase(locale);\n}\nfunction upperFactory(locale) {\n return locale === false\n ? (input) => input.toUpperCase()\n : (input) => input.toLocaleUpperCase(locale);\n}\nfunction capitalCaseTransformFactory(lower, upper) {\n return (word) => `${upper(word[0])}${lower(word.slice(1))}`;\n}\nfunction pascalCaseTransformFactory(lower, upper) {\n return (word, index) => {\n const char0 = word[0];\n const initial = index > 0 && char0 >= \"0\" && char0 <= \"9\" ? \"_\" + char0 : upper(char0);\n return initial + lower(word.slice(1));\n };\n}\nfunction splitPrefixSuffix(input, options = {}) {\n const splitFn = options.split ?? (options.separateNumbers ? splitSeparateNumbers : split);\n const prefixCharacters = options.prefixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;\n const suffixCharacters = options.suffixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;\n let prefixIndex = 0;\n let suffixIndex = input.length;\n while (prefixIndex < input.length) {\n const char = input.charAt(prefixIndex);\n if (!prefixCharacters.includes(char))\n break;\n prefixIndex++;\n }\n while (suffixIndex > prefixIndex) {\n const index = suffixIndex - 1;\n const char = input.charAt(index);\n if (!suffixCharacters.includes(char))\n break;\n suffixIndex = index;\n }\n return [\n input.slice(0, prefixIndex),\n splitFn(input.slice(prefixIndex, suffixIndex)),\n input.slice(suffixIndex),\n ];\n}\n//# sourceMappingURL=index.js.map","const e=/^(?:( )+|\\t+)/,t=`space`;function n(e,n,r){return e&&n===t&&r===1}function r(r,a){let o=new Map,s=0,c,l;for(let u of r.split(/\\n/g)){if(!u)continue;let r=u.match(e);if(r===null)s=0,c=``;else{let e=r[0].length,u=r[1]?t:`tab`;if(n(a,u,e))continue;u!==c&&(s=0),c=u;let d=1,f=0,p=e-s;if(s=e,p===0)d=0,f=1;else{let e=Math.abs(p);if(n(a,u,e))continue;l=i(u,e)}let m=o.get(l);o.set(l,m===void 0?[1,0]:[m[0]+d,m[1]+f])}}return o}function i(e,n){return(e===t?`s`:`t`)+String(n)}function a(e){return{type:e[0]===`s`?t:`tab`,amount:Number(e.slice(1))}}function o(e){let t,n=0,r=0;for(let[i,[a,o]]of e)(a>n||a===n&&o>r)&&(n=a,r=o,t=i);return t}function s(e,n){return(e===t?` `:`\t`).repeat(n)}function c(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);let t=r(e,!0);t.size===0&&(t=r(e,!1));let n=o(t),i,c=0,l=``;return n!==void 0&&({type:i,amount:c}=a(n),l=s(i,c)),{amount:c,type:i,indent:l}}export{c as t};","import{t as e}from\"./libs/detect-indent.mjs\";const t=Symbol.for(`__confbox_fmt__`),n=/^(\\s+)/,r=/(\\s+)$/;function i(e,t={}){return{sample:t.indent===void 0&&t.preserveIndentation!==!1&&e.slice(0,t?.sampleSize||1024),whiteSpace:t.preserveWhitespace===!1?void 0:{start:n.exec(e)?.[0]||``,end:r.exec(e)?.[0]||``}}}function a(e,n,r){!n||typeof n!=`object`||Object.defineProperty(n,t,{enumerable:!1,configurable:!0,writable:!0,value:i(e,r)})}function o(n,r){if(!n||typeof n!=`object`||!(t in n))return{indent:r?.indent??2,whitespace:{start:``,end:``}};let i=n[t];return{indent:r?.indent||e(i.sample||``).indent,whitespace:i.whiteSpace||{start:``,end:``}}}export{a as n,o as t};","/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n* list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n* this list of conditions and the following disclaimer in the\n* documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n* may be used to endorse or promote products derived from this software without\n* specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nfunction e(e,t){let n=e.slice(0,t).split(/\\r\\n|\\n|\\r/g);return[n.length,n.pop().length+1]}function t(e,t,n){let r=e.split(/\\r\\n|\\n|\\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`\n`,e===t&&(i+=` `.repeat(a+n+2),i+=`^\n`))}return i}var n=class extends Error{line;column;codeblock;constructor(n,r){let[i,a]=e(r.toml,r.ptr),o=t(r.toml,i,a);super(`Invalid TOML document: ${n}\\n\\n${o}`,r),this.line=i,this.column=a,this.codeblock=o}};\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n* list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n* this list of conditions and the following disclaimer in the\n* documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n* may be used to endorse or promote products derived from this software without\n* specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nfunction r(e,t){let n=0;for(;e[t-++n]===`\\\\`;);return--n&&n%2}function i(e,t=0,n=e.length){let r=e.indexOf(`\n`,t);return e[r-1]===`\\r`&&r--,r<=n?r:-1}function a(e,t){for(let r=t;r<e.length;r++){let i=e[r];if(i===`\n`)return r;if(i===`\\r`&&e[r+1]===`\n`)return r+1;if(i<` `&&i!==`\t`||i===``)throw new n(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}function o(e,t,n,r){let i;for(;(i=e[t])===` `||i===`\t`||!n&&(i===`\n`||i===`\\r`&&e[t+1]===`\n`);)t++;return r||i!==`#`?t:o(e,a(e,t),n)}function s(e,t,r,a,o=!1){if(!a)return t=i(e,t),t<0?e.length:t;for(let n=t;n<e.length;n++){let t=e[n];if(t===`#`)n=i(e,n);else if(t===r)return n+1;else if(t===a||o&&(t===`\n`||t===`\\r`&&e[n+1]===`\n`))return n}throw new n(`cannot find end of structure`,{toml:e,ptr:t})}function c(e,t){let n=e[t],i=n===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):n;t+=i.length-1;do t=e.indexOf(i,++t);while(t>-1&&n!==`'`&&r(e,t));return t>-1&&(t+=i.length,i.length>1&&(e[t]===n&&t++,e[t]===n&&t++)),t}\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n* list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n* this list of conditions and the following disclaimer in the\n* documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n* may be used to endorse or promote products derived from this software without\n* specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nlet l=/^(\\d{4}-\\d{2}-\\d{2})?[T ]?(?:(\\d{2}):\\d{2}(?::\\d{2}(?:\\.\\d+)?)?)?(Z|[-+]\\d{2}:\\d{2})?$/i;var u=class e extends Date{#e=!1;#t=!1;#n=null;constructor(e){let t=!0,n=!0,r=`Z`;if(typeof e==`string`){let i=e.match(l);i?(i[1]||(t=!1,e=`0000-01-01T${e}`),n=!!i[2],n&&e[10]===` `&&(e=e.replace(` `,`T`)),i[2]&&+i[2]>23?e=``:(r=i[3]||null,e=e.toUpperCase(),!r&&n&&(e+=`Z`))):e=``}super(e),isNaN(this.getTime())||(this.#e=t,this.#t=n,this.#n=r)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}};\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n* list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n* this list of conditions and the following disclaimer in the\n* documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n* may be used to endorse or promote products derived from this software without\n* specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nlet d=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\\d(_?\\d)*))$/,f=/^[+-]?\\d(_?\\d)*(\\.\\d(_?\\d)*)?([eE][+-]?\\d(_?\\d)*)?$/,p=/^[+-]?0[0-9_]/,m=/^[0-9a-f]{2,8}$/i,h={b:`\\b`,t:`\t`,n:`\n`,f:`\\f`,r:`\\r`,e:`\\x1B`,'\"':`\"`,\"\\\\\":`\\\\`};function g(e,t=0,r=e.length){let i=e[t]===`'`,a=e[t++]===e[t]&&e[t]===e[t+1];a&&(r-=2,e[t+=2]===`\\r`&&t++,e[t]===`\n`&&t++);let s=0,c,l=``,u=t;for(;t<r-1;){let r=e[t++];if(r===`\n`||r===`\\r`&&e[t]===`\n`){if(!a)throw new n(`newlines are not allowed in strings`,{toml:e,ptr:t-1})}else if(r<` `&&r!==`\t`||r===``)throw new n(`control characters are not allowed in strings`,{toml:e,ptr:t-1});if(c){if(c=!1,r===`x`||r===`u`||r===`U`){let i=e.slice(t,t+=r===`x`?2:r===`u`?4:8);if(!m.test(i))throw new n(`invalid unicode escape`,{toml:e,ptr:s});try{l+=String.fromCodePoint(parseInt(i,16))}catch{throw new n(`invalid unicode escape`,{toml:e,ptr:s})}}else if(a&&(r===`\n`||r===` `||r===`\t`||r===`\\r`)){if(t=o(e,t-1,!0),e[t]!==`\n`&&e[t]!==`\\r`)throw new n(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:s});t=o(e,t)}else if(r in h)l+=h[r];else throw new n(`unrecognized escape sequence`,{toml:e,ptr:s});u=t}else !i&&r===`\\\\`&&(s=t-1,c=!0,l+=e.slice(u,s))}return l+e.slice(u,r-1)}function _(e,t,r,i){if(e===`true`)return!0;if(e===`false`)return!1;if(e===`-inf`)return-1/0;if(e===`inf`||e===`+inf`)return 1/0;if(e===`nan`||e===`+nan`||e===`-nan`)return NaN;if(e===`-0`)return i?0n:0;let a=d.test(e);if(a||f.test(e)){if(p.test(e))throw new n(`leading zeroes are not allowed`,{toml:t,ptr:r});e=e.replace(/_/g,``);let o=+e;if(isNaN(o))throw new n(`invalid number`,{toml:t,ptr:r});if(a){if((a=!Number.isSafeInteger(o))&&!i)throw new n(`integer value cannot be represented losslessly`,{toml:t,ptr:r});(a||i===!0)&&(o=BigInt(e))}return o}let o=new u(e);if(!o.isValid())throw new n(`invalid value`,{toml:t,ptr:r});return o}\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n* list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n* this list of conditions and the following disclaimer in the\n* documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n* may be used to endorse or promote products derived from this software without\n* specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nfunction v(e,t,n){let r=e.slice(t,n),i=r.indexOf(`#`);return i>-1&&(a(e,i),r=r.slice(0,i)),[r.trimEnd(),i]}function y(e,t,r,i,a){if(i===0)throw new n(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let l=e[t];if(l===`[`||l===`{`){let[s,c]=l===`[`?C(e,t,i,a):S(e,t,i,a);if(r){if(c=o(e,c),e[c]===`,`)c++;else if(e[c]!==r)throw new n(`expected comma or end of structure`,{toml:e,ptr:c})}return[s,c]}let u;if(l===`\"`||l===`'`){u=c(e,t);let i=g(e,t,u);if(r){if(u=o(e,u),e[u]&&e[u]!==`,`&&e[u]!==r&&e[u]!==`\n`&&e[u]!==`\\r`)throw new n(`unexpected character encountered`,{toml:e,ptr:u});u+=+(e[u]===`,`)}return[i,u]}u=s(e,t,`,`,r);let d=v(e,t,u-+(e[u-1]===`,`));if(!d[0])throw new n(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return r&&d[1]>-1&&(u=o(e,t+d[1]),u+=+(e[u]===`,`)),[_(d[0],e,t,a),u]}\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n* list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n* this list of conditions and the following disclaimer in the\n* documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n* may be used to endorse or promote products derived from this software without\n* specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nlet b=/^[a-zA-Z0-9-_]+[ \\t]*$/;function x(e,t,r=`=`){let a=t-1,s=[],l=e.indexOf(r,t);if(l<0)throw new n(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});do{let o=e[t=++a];if(o!==` `&&o!==`\t`)if(o===`\"`||o===`'`){if(o===e[t+1]&&o===e[t+2])throw new n(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let u=c(e,t);if(u<0)throw new n(`unfinished string encountered`,{toml:e,ptr:t});a=e.indexOf(`.`,u);let d=e.slice(u,a<0||a>l?l:a),f=i(d);if(f>-1)throw new n(`newlines are not allowed in keys`,{toml:e,ptr:t+a+f});if(d.trimStart())throw new n(`found extra tokens after the string part`,{toml:e,ptr:u});if(l<u&&(l=e.indexOf(r,u),l<0))throw new n(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});s.push(g(e,t,u))}else{a=e.indexOf(`.`,t);let r=e.slice(t,a<0||a>l?l:a);if(!b.test(r))throw new n(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e,ptr:t});s.push(r.trimEnd())}}while(a+1&&a<l);return[s,o(e,l+1,!0,!0)]}function S(e,t,r,i){let o={},s=new Set,c;for(t++;(c=e[t++])!==`}`&&c;)if(c===`,`)throw new n(`expected value, found comma`,{toml:e,ptr:t-1});else if(c===`#`)t=a(e,t);else if(c!==` `&&c!==`\t`&&c!==`\n`&&c!==`\\r`){let a,c=o,l=!1,[u,d]=x(e,t-1);for(let r=0;r<u.length;r++){if(r&&(c=l?c[a]:c[a]={}),a=u[r],(l=Object.hasOwn(c,a))&&(typeof c[a]!=`object`||s.has(c[a])))throw new n(`trying to redefine an already defined value`,{toml:e,ptr:t});!l&&a===`__proto__`&&Object.defineProperty(c,a,{enumerable:!0,configurable:!0,writable:!0})}if(l)throw new n(`trying to redefine an already defined value`,{toml:e,ptr:t});let[f,p]=y(e,d,`}`,r-1,i);s.add(f),c[a]=f,t=p}if(!c)throw new n(`unfinished table encountered`,{toml:e,ptr:t});return[o,t]}function C(e,t,r,i){let o=[],s;for(t++;(s=e[t++])!==`]`&&s;)if(s===`,`)throw new n(`expected value, found comma`,{toml:e,ptr:t-1});else if(s===`#`)t=a(e,t);else if(s!==` `&&s!==`\t`&&s!==`\n`&&s!==`\\r`){let n=y(e,t-1,`]`,r-1,i);o.push(n[0]),t=n[1]}if(!s)throw new n(`unfinished array encountered`,{toml:e,ptr:t});return[o,t]}\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n* list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n* this list of conditions and the following disclaimer in the\n* documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n* may be used to endorse or promote products derived from this software without\n* specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nfunction w(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}function T(e,{maxDepth:t=1e3,integersAsBigInt:r}={}){let i={},a={},s=i,c=a;for(let l=o(e,0);l<e.length;){if(e[l]===`[`){let t=e[++l]===`[`,r=x(e,l+=+t,`]`);if(t){if(e[r[1]-1]!==`]`)throw new n(`expected end of table declaration`,{toml:e,ptr:r[1]-1});r[1]++}let o=w(r[0],i,a,t?2:1);if(!o)throw new n(`trying to redefine an already defined table or value`,{toml:e,ptr:l});c=o[2],s=o[1],l=r[1]}else{let i=x(e,l),a=w(i[0],s,c,0);if(!a)throw new n(`trying to redefine an already defined table or value`,{toml:e,ptr:l});let o=y(e,i[1],void 0,t,r);a[1][a[0]]=o[0],l=o[1]}if(l=o(e,l,!0),e[l]&&e[l]!==`\n`&&e[l]!==`\\r`)throw new n(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:l});l=o(e,l)}return i}\n/*!\n* Copyright (c) Squirrel Chat et al., All rights reserved.\n* SPDX-License-Identifier: BSD-3-Clause\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n*\n* 1. Redistributions of source code must retain the above copyright notice, this\n* list of conditions and the following disclaimer.\n* 2. Redistributions in binary form must reproduce the above copyright notice,\n* this list of conditions and the following disclaimer in the\n* documentation and/or other materials provided with the distribution.\n* 3. Neither the name of the copyright holder nor the names of its contributors\n* may be used to endorse or promote products derived from this software without\n* specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nlet E=/^[a-z0-9-_]+$/i;function D(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(e instanceof Date)return`date`}return t}function O(e){for(let t=0;t<e.length;t++)if(D(e[t])!==`object`)return!1;return e.length!=0}function k(e){return JSON.stringify(e).replace(/\\x7f/g,`\\\\u007f`)}function A(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);if(t===`number`)return isNaN(e)?`nan`:e===1/0?`inf`:e===-1/0?`-inf`:r&&Number.isInteger(e)?e.toFixed(1):e.toString();if(t===`bigint`||t===`boolean`)return e.toString();if(t===`string`)return k(e);if(t===`date`){if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString()}if(t===`object`)return j(e,n,r);if(t===`array`)return M(e,n,r)}function j(e,t,n){let r=Object.keys(e);if(r.length===0)return`{}`;let i=`{ `;for(let a=0;a<r.length;a++){let o=r[a];a&&(i+=`, `),i+=E.test(o)?o:k(o),i+=` = `,i+=A(e[o],D(e[o]),t-1,n)}return i+` }`}function M(e,t,n){if(e.length===0)return`[]`;let r=`[ `;for(let i=0;i<e.length;i++){if(i&&(r+=`, `),e[i]===null||e[i]===void 0)throw TypeError(`arrays cannot contain null or undefined values`);r+=A(e[i],D(e[i]),t-1,n)}return r+` ]`}function N(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let i=``;for(let a=0;a<e.length;a++)i+=`${i&&`\n`}[[${t}]]\\n`,i+=P(0,e[a],t,n,r);return i}function P(e,t,n,r,i){if(r===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let a=``,o=``,s=Object.keys(t);for(let e=0;e<s.length;e++){let c=s[e];if(t[c]!==null&&t[c]!==void 0){let e=D(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=E.test(c)?c:k(c);if(e===`array`&&O(t[c]))o+=(o&&`\n`)+N(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`\n`)+P(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=A(t[c],e,r,i),a+=`\n`}}return e&&(a||!o)&&(a=a?`[${e}]\\n${a}`:`[${e}]`),a&&o?`${a}\\n${o}`:a||o}function F(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(D(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=P(0,e,``,t,n);return r[r.length-1]===`\n`?r:r+`\n`}export{T as n,F as t};","import{n as e,t}from\"./_chunks/_format.mjs\";import{n,t as r}from\"./_chunks/libs/smol-toml.mjs\";function i(t){let r=n(t);return e(t,r,{preserveIndentation:!1}),r}function a(e){let n=t(e,{preserveIndentation:!1}),i=r(e);return n.whitespace.start+i+n.whitespace.end}export{i as parseTOML,a as stringifyTOML};","import { getBinName } from \"@pipelab/constants\";\nimport {\n ActionRunnerData,\n createAction,\n createArray,\n createBooleanParam,\n createNumberParam,\n createPathParam,\n createStringParam,\n detectRuntime,\n InputsDefinition,\n OutputsDefinition,\n runPnpm,\n runWithLiveLogs,\n fetchPipelabAsset,\n} from \"@pipelab/plugin-core\";\nimport { dirname, join, basename, delimiter } from \"node:path\";\nimport { existsSync, readFile, writeFile } from \"node:fs\";\nimport { cp, readFile as readFilePromise, writeFile as writeFilePromise } from \"node:fs/promises\";\nimport { homedir, platform as osPlatform, arch as osArch } from \"node:os\";\nimport { execa } from \"execa\";\nimport { kebabCase } from \"change-case\";\nimport { parseTOML, stringifyTOML } from \"confbox\";\n\n/**\n * Searches for common cargo paths and resolves to a valid cargo executable path\n * @returns The path to the cargo executable\n * @throws Error if cargo cannot be found\n */\nasync function resolveCargoPath(): Promise<string> {\n const cargoBinName = osPlatform() === \"win32\" ? \"cargo.exe\" : \"cargo\";\n\n // Common cargo paths by platform\n const commonPaths: string[] = [];\n const currentPlatform = osPlatform();\n\n // Helper function to add paths if they exist\n const addIfExists = (path: string) => {\n if (existsSync(path)) {\n commonPaths.push(path);\n }\n };\n\n const rustupHome = process.env.RUSTUP_HOME || join(homedir(), \".rustup\");\n const cargoHome = process.env.CARGO_HOME || join(homedir(), \".cargo\");\n\n if (currentPlatform === \"win32\") {\n // Windows paths\n addIfExists(\n join(rustupHome, \"toolchains\", \"stable-x86_64-pc-windows-msvc\", \"bin\", cargoBinName),\n );\n addIfExists(\n join(rustupHome, \"toolchains\", \"nightly-x86_64-pc-windows-msvc\", \"bin\", cargoBinName),\n );\n addIfExists(join(cargoHome, \"bin\", cargoBinName));\n } else if (currentPlatform === \"linux\") {\n // Linux paths\n addIfExists(\n join(rustupHome, \"toolchains\", \"stable-x86_64-unknown-linux-gnu\", \"bin\", cargoBinName),\n );\n addIfExists(\n join(rustupHome, \"toolchains\", \"nightly-x86_64-unknown-linux-gnu\", \"bin\", cargoBinName),\n );\n addIfExists(join(cargoHome, \"bin\", cargoBinName));\n addIfExists(\"/usr/bin/cargo\");\n addIfExists(\"/usr/local/bin/cargo\");\n } else if (currentPlatform === \"darwin\") {\n // macOS paths\n addIfExists(join(rustupHome, \"toolchains\", \"stable-x86_64-apple-darwin\", \"bin\", cargoBinName));\n addIfExists(join(rustupHome, \"toolchains\", \"nightly-x86_64-apple-darwin\", \"bin\", cargoBinName));\n addIfExists(join(cargoHome, \"bin\", cargoBinName));\n addIfExists(\"/usr/local/bin/cargo\");\n addIfExists(\"/opt/homebrew/bin/cargo\");\n }\n\n // Return first existing path found\n if (commonPaths.length > 0) {\n return commonPaths[0];\n }\n\n // Fallback: try to find cargo using system tools on Unix systems\n if (currentPlatform !== \"win32\") {\n try {\n const whichResult = await execa(\"which\", [\"cargo\"]);\n const cargoPath = whichResult.stdout.trim();\n if (cargoPath && existsSync(cargoPath)) {\n return cargoPath;\n }\n } catch {\n // Ignore errors from which command\n }\n }\n\n throw new Error(\"Cargo not found. Please install it first\");\n}\n\n// TODO: https://js.electronforge.io/modules/_electron_forge_core.html\n\nexport const IDMake = \"tauri:make\";\nexport const IDPackageV2 = \"tauri:package:v2\";\nexport const IDPreview = \"tauri:preview\";\n\nconst paramsInputFolder = {\n \"input-folder\": createPathParam(\"\", {\n label: \"Folder to package\",\n required: true,\n control: {\n type: \"path\",\n options: {\n properties: [\"openDirectory\"],\n },\n },\n }),\n} satisfies InputsDefinition;\n\nconst paramsInputURL = {\n \"input-url\": createStringParam(\"\", {\n label: \"URL to preview\",\n required: true,\n }),\n} satisfies InputsDefinition;\n\nconst params = {\n arch: {\n value: \"\" as NodeJS.Architecture | \"\", // MakeOptions['arch'],\n label: \"Architecture\",\n required: false,\n control: {\n type: \"select\",\n options: {\n placeholder: \"Architecture\",\n options: [\n {\n label: \"Older PCs (ia32)\",\n value: \"ia32\",\n },\n {\n label: \"Modern PCs (x64)\",\n value: \"x64\",\n },\n {\n label: \"Older Mobile/Pi (armv7l)\",\n value: \"armv7l\",\n },\n {\n label: \"New Mobile/Apple Silicon (arm64)\",\n value: \"arm64\",\n },\n {\n label: \"Mac Universal (universal)\",\n value: \"universal\",\n },\n {\n label: \"Special Systems (mips64el)\",\n value: \"mips64el\",\n },\n ],\n },\n },\n },\n platform: {\n value: \"\" as NodeJS.Platform | \"\", // MakeOptions['platform'],\n label: \"Platform\",\n required: false,\n control: {\n type: \"select\",\n options: {\n placeholder: \"Platform\",\n options: [\n {\n label: \"Windows (win32)\",\n value: \"win32\",\n },\n {\n label: \"macOS (darwin)\",\n value: \"darwin\",\n },\n {\n label: \"Linux (linux)\",\n value: \"linux\",\n },\n {\n label: \"Android\",\n value: \"android\",\n },\n {\n label: \"iOS\",\n value: \"ios\",\n },\n ],\n },\n },\n },\n configuration: {\n label: \"Tauri configuration\",\n value: undefined as Partial<DesktopApp.Tauri> | undefined,\n required: true,\n control: {\n type: \"json\",\n },\n },\n} satisfies InputsDefinition;\n\nexport const configureParams = {\n name: createStringParam(\"Pipelab\", {\n label: \"Application name\",\n description: \"The name of the application\",\n required: true,\n }),\n appBundleId: createStringParam(\"com.pipelab.app\", {\n label: \"Application bundle ID\",\n description: \"The bundle ID of the application\",\n required: true,\n }),\n appCopyright: createStringParam(\"Copyright © 2024 Pipelab\", {\n label: \"Application copyright\",\n description: \"The copyright of the application\",\n required: false,\n }),\n appVersion: createStringParam(\"1.0.0\", {\n label: \"Application version\",\n description: \"The version of the application\",\n required: true,\n }),\n icon: createPathParam(\"\", {\n label: \"Application icon\",\n description: \"The icon of the application. macOS: .icns. Windows: .ico\",\n required: false,\n control: {\n type: \"path\",\n options: {\n filters: [\n { name: \"Image\", extensions: [\"png\", \"jpg\", \"jpeg\", \"gif\", \"bmp\", \"ico\", \"icns\"] },\n ],\n },\n label: \"Path to an image file\",\n },\n }),\n author: createStringParam(\"Pipelab\", {\n label: \"Application author\",\n description: \"The author of the application\",\n required: true,\n }),\n description: createStringParam(\"A simple Electron application\", {\n label: \"Application description\",\n description: \"The description of the application\",\n required: false,\n }),\n\n appCategoryType: createStringParam(\"public.app-category.developer-tools\", {\n platforms: [\"darwin\"],\n label: \"Application category type\",\n description: \"The category type of the application\",\n required: false,\n }),\n\n // window\n width: createNumberParam(800, {\n label: \"Window width\",\n description: \"The width of the window\",\n required: false,\n }),\n height: createNumberParam(600, {\n label: \"Window height\",\n description: \"The height of the window\",\n required: false,\n }),\n fullscreen: {\n label: \"Fullscreen\",\n value: false,\n description: \"Whether to start the application in fullscreen mode\",\n required: false,\n control: {\n type: \"boolean\",\n },\n },\n frame: {\n label: \"Frame\",\n value: true,\n description: \"Whether to show the window frame\",\n required: false,\n control: {\n type: \"boolean\",\n },\n },\n transparent: {\n label: \"Transparent\",\n value: false,\n description: \"Whether to make the window transparent\",\n required: false,\n control: {\n type: \"boolean\",\n },\n },\n toolbar: {\n label: \"Toolbar\",\n value: true,\n description: \"Whether to show the toolbar\",\n required: false,\n control: {\n type: \"boolean\",\n },\n },\n alwaysOnTop: {\n label: \"Always on top\",\n value: false,\n description: \"Whether to always keep the window on top\",\n required: false,\n control: {\n type: \"boolean\",\n },\n },\n\n tauriVersion: createStringParam(\"\", {\n label: \"Tauri version\",\n description:\n \"The version of Tauri to use. If no version specified, it will use the latest one.\",\n required: false,\n }),\n enableExtraLogging: {\n required: false,\n label: \"Enable extra logging\",\n value: false,\n control: {\n type: \"boolean\",\n },\n description: \"Whether to enable extra logging of internal tools while bundling\",\n },\n openDevtoolsOnStart: createBooleanParam(false, {\n label: \"Open devtools on app start\",\n required: false,\n description: \"Whether to open devtools on app start\",\n }),\n\n // websocket apis\n websocketApi: {\n required: false,\n label: \"WebSocket APIs to allow (empty = all)\",\n value: \"[]\",\n control: {\n type: \"array\",\n options: {\n kind: \"text\",\n },\n },\n },\n ignore: createArray<(string | RegExp)[]>(\n `[\n // use 'src/app/' as starting point\n]`,\n {\n required: false,\n label: \"Folders to ignore\",\n description:\n \"An array of string or Regex that allow ignoring certain files or folders from being packaged\",\n control: {\n type: \"array\",\n options: {\n kind: \"text\",\n },\n },\n },\n ),\n\n // integrations\n\n enableSteamSupport: {\n required: false,\n label: \"Enable steam support\",\n description: \"Whether to enable Steam support\",\n value: false,\n control: {\n type: \"boolean\",\n },\n },\n steamGameId: createNumberParam(480, {\n required: false,\n label: \"Steam game ID\",\n description: \"The Steam game ID\",\n }),\n enableDiscordSupport: {\n required: false,\n label: \"Enable Discord support\",\n description: \"Whether to enable Discord support\",\n value: false,\n control: {\n type: \"boolean\",\n },\n },\n discordAppId: createStringParam(\"\", {\n required: false,\n label: \"Discord application ID\",\n description: \"The Discord application ID\",\n }),\n} satisfies InputsDefinition;\n\nconst outputs = {\n output: {\n label: \"Output\",\n value: \"\",\n control: {\n type: \"path\",\n options: {\n properties: [\"openDirectory\"],\n },\n },\n },\n binary: {\n label: \"Binary\",\n value: \"\",\n control: {\n type: \"path\",\n options: {\n properties: [\"openFile\"],\n },\n },\n },\n} satisfies OutputsDefinition;\n\n// type Inputs = ParamsToInput<typeof params>\n\nexport const createMakeProps = (\n id: string,\n name: string,\n description: string,\n icon: string,\n displayString: string,\n) =>\n createAction({\n id,\n name,\n description,\n icon,\n displayString,\n meta: {},\n params: {\n ...params,\n ...paramsInputFolder,\n },\n outputs,\n });\n\nexport const createPackageV2Props = (\n id: string,\n name: string,\n description: string,\n icon: string,\n displayString: string,\n advanced?: boolean,\n deprecated?: boolean,\n deprecatedMessage?: string,\n disabled?: false,\n updateAvailable?: boolean,\n) => {\n const { arch, platform } = params;\n return createAction({\n id,\n name,\n description,\n icon,\n displayString,\n meta: {},\n advanced,\n deprecated,\n deprecatedMessage,\n disabled,\n updateAvailable,\n params: {\n arch,\n platform,\n ...paramsInputFolder,\n ...configureParams,\n },\n outputs: outputs,\n });\n};\n\nexport const createPreviewProps = (\n id: string,\n name: string,\n description: string,\n icon: string,\n displayString: string,\n) =>\n createAction({\n id,\n name,\n description,\n icon,\n displayString,\n meta: {},\n params: {\n ...params,\n ...paramsInputURL,\n },\n outputs: outputs,\n });\n\nexport const tauri = async (\n action: \"make\" | \"package\" | \"preview\",\n appFolder: string | undefined,\n {\n cwd,\n log,\n inputs,\n setOutput,\n paths,\n abortSignal,\n context,\n }: ActionRunnerData<ReturnType<typeof createPackageV2Props>>,\n completeConfiguration: DesktopApp.Config,\n): Promise<{ folder: string; binary: string | undefined } | undefined> => {\n console.log(\"appFolder\", appFolder);\n\n log(\"Building tauri\");\n\n if (action !== \"preview\") {\n await detectRuntime(appFolder);\n }\n\n const { modules, cache, node } = paths;\n\n const destinationFolder = join(cwd, \"build\");\n\n const rawAssetFolder = await fetchPipelabAsset(\"@pipelab/asset-tauri\", \"^1.0.0\", { context });\n const templateFolder = join(rawAssetFolder, \"template\");\n\n // copy template to destination\n await cp(templateFolder, destinationFolder, {\n recursive: true,\n filter: (src) => {\n // log('src', src)\n // log('dest', dest)\n // TODO: support other oses\n return (\n basename(src) !== \"node_modules\" &&\n !src.includes(\"src-tauri\\\\target\") &&\n !src.includes(\"src-tauri\\\\gen\")\n );\n },\n });\n\n const placeAppFolder = join(destinationFolder, \"src\", \"app\");\n\n // if input is folder, copy folder to destination\n if (appFolder && action !== \"preview\") {\n // copy app to template\n await cp(appFolder, placeAppFolder, { recursive: true });\n }\n\n writeFilePromise(\n join(destinationFolder, \"config.cjs\"),\n `module.exports = ${JSON.stringify(completeConfiguration, undefined, 2)}`,\n \"utf8\",\n );\n\n const sanitizedName = kebabCase(completeConfiguration.name);\n\n // package.json update\n log(\"Package.json update\");\n const pkgJSONPath = join(destinationFolder, \"package.json\");\n const pkgJSONContent = await readFile(pkgJSONPath, \"utf8\");\n const pkgJSON = JSON.parse(pkgJSONContent);\n log(\"Setting name to\", sanitizedName);\n pkgJSON.name = sanitizedName;\n log(\"Setting productName to\", completeConfiguration.name);\n pkgJSON.productName = completeConfiguration.name;\n await writeFile(pkgJSONPath, JSON.stringify(pkgJSON, null, 2));\n\n // Cargo.toml update\n log(\"Cargo.toml update\");\n const cargoTomlPath = join(destinationFolder, \"src-tauri\", \"Cargo.toml\");\n const cargoTomlContent = await readFilePromise(cargoTomlPath, \"utf8\");\n const cargoToml = parseTOML(cargoTomlContent) as { name: string; version: string };\n log(\"Setting name to\", sanitizedName);\n console.log(\"cargoToml\", cargoToml);\n cargoToml.name = sanitizedName;\n log(\"Setting version to\", completeConfiguration.appVersion);\n cargoToml.version = completeConfiguration.appVersion;\n console.log(\"cargoToml\", stringifyTOML(cargoToml));\n await writeFilePromise(cargoTomlPath, stringifyTOML(cargoToml));\n\n // tauri.conf.json update\n log(\"Tauri.conf.json update\");\n const tauriConfJSONPath = join(destinationFolder, \"src-tauri\", \"tauri.conf.json\");\n const tauriConfJSONContent = await readFile(tauriConfJSONPath, \"utf8\");\n const tauriConfJSON = JSON.parse(tauriConfJSONContent);\n log(\"Setting productName to\", completeConfiguration.name);\n tauriConfJSON.productName = completeConfiguration.name;\n log(\"Setting version to\", completeConfiguration.appVersion);\n tauriConfJSON.version = completeConfiguration.appVersion;\n log(\"Setting identifier to\", completeConfiguration.appBundleId);\n tauriConfJSON.identifier = completeConfiguration.appBundleId;\n if (action === \"preview\") {\n log(\"Setting build.devUrl to\", appFolder);\n tauriConfJSON.build.devUrl = appFolder;\n await writeFilePromise(tauriConfJSONPath, JSON.stringify(tauriConfJSON, null, 2));\n }\n /* else {\n log('Setting build.frontendDist to', appFolder)\n tauriConfJSON.build.frontendDist = appFolder\n await writeFile(tauriConfJSONPath, JSON.stringify(tauriConfJSON, null, 2))\n } */\n\n log(\"Installing packages\");\n const { all } = await runPnpm(destinationFolder, {\n signal: abortSignal,\n context,\n });\n if (all) log(all);\n\n // override tauri version\n // if (completeConfiguration.electronVersion && completeConfiguration.electronVersion !== '') {\n // log(`Installing tauri@${completeConfiguration.electronVersion}`)\n // await runWithLiveLogs(\n // process.execPath,\n // [pnpm, 'install', `tauri@${completeConfiguration.electronVersion}`, '--prefer-offline'],\n // {\n // cwd: destinationFolder,\n // env: {\n // // DEBUG: '*',\n // PATH: `${dirname(node)}${delimiter}${process.env.PATH}`,\n // PNPM_HOME: pnpmHome\n // },\n // cancelSignal: abortSignal\n // },\n // log,\n // {\n // onStderr(data) {\n // log(data)\n // },\n // onStdout(data) {\n // log(data)\n // }\n // }\n // )\n // }\n\n const inputPlatform = inputs.platform === \"\" ? undefined : inputs.platform;\n const inputArch = inputs.arch === \"\" ? undefined : inputs.arch;\n\n try {\n log(\"typeof inputs.platform\", typeof inputs.platform);\n const finalPlatform: NodeJS.Platform = inputPlatform ?? osPlatform();\n log(\"finalPlatform\", finalPlatform);\n const finalArch: NodeJS.Architecture = inputArch ?? (osArch() as NodeJS.Architecture);\n log(\"finalArch\", finalArch);\n\n let tauriPlatform = \"\";\n if (finalPlatform === \"win32\") {\n tauriPlatform = \"pc-windows-msvc\";\n } else if (finalPlatform === \"linux\") {\n tauriPlatform = \"unknown-linux-gnu\";\n } else {\n throw new Error(\"Unsupported platform\");\n }\n\n let tauriArch = \"\";\n if (finalArch === \"x64\") {\n tauriArch = \"x86_64\";\n } else {\n throw new Error(\"Unsupported arch\");\n }\n\n const target = `${tauriArch}-${tauriPlatform}`;\n\n // Resolve cargo path using the new function\n const cargo = await resolveCargoPath();\n const cargoBinDir = dirname(cargo);\n\n log(\"cargoBinDir\", cargoBinDir);\n console.log(\"cargo\", cargo);\n\n log(\"destinationFolder\", destinationFolder);\n\n const cargoTargetDir = join(cache, \"cargo\", \"target\", completeConfiguration.appBundleId);\n const cargoOutputPath = join(cargoTargetDir, target, \"release\");\n\n log(\"cargoTargetDir\", cargoTargetDir);\n log(\"cargoOutputPath\", cargoOutputPath);\n\n log(\"Starting compiling\");\n\n // by default add the tauri cli\n await runWithLiveLogs(\n cargo,\n [\"install\", \"tauri-cli\", \"--version\", \"^2.0.0\", \"--locked\"],\n {\n cwd: join(destinationFolder, \"src-tauri\"),\n env: {\n ...process.env,\n DEBUG: completeConfiguration.enableExtraLogging ? \"*\" : \"\",\n ELECTRON_NO_ASAR: \"1\",\n CARGO_TARGET_DIR: cargoTargetDir,\n PATH: `${cargoBinDir}${delimiter}${dirname(node)}${delimiter}${process.env.PATH}`,\n },\n cancelSignal: abortSignal,\n },\n log,\n {\n onStderr(data) {\n // on ci, do not log\n if (!process.env.CI) {\n log(data);\n }\n },\n onStdout(data) {\n // on ci, do not log\n if (!process.env.CI) {\n log(data);\n }\n },\n },\n );\n\n // if preview, run tauri dev\n if (action === \"preview\") {\n await runWithLiveLogs(\n cargo,\n [\"tauri\", \"dev\", \"--target\", target],\n {\n cwd: join(destinationFolder, \"src-tauri\"),\n env: {\n ...process.env,\n DEBUG: completeConfiguration.enableExtraLogging ? \"*\" : \"\",\n ELECTRON_NO_ASAR: \"1\",\n CARGO_TARGET_DIR: cargoTargetDir,\n PATH: `${cargoBinDir}${delimiter}${dirname(node)}${delimiter}${process.env.PATH}`,\n },\n cancelSignal: abortSignal,\n },\n log,\n {\n onStderr(data) {\n log(data);\n },\n onStdout(data) {\n log(data);\n },\n },\n );\n } else {\n // otherwise build, but don't bundle\n await runWithLiveLogs(\n cargo,\n [\"tauri\", \"build\", \"--target\", target, \"--no-bundle\"],\n {\n cwd: join(destinationFolder, \"src-tauri\"),\n env: {\n ...process.env,\n DEBUG: completeConfiguration.enableExtraLogging ? \"*\" : \"\",\n ELECTRON_NO_ASAR: \"1\",\n CARGO_TARGET_DIR: cargoTargetDir,\n PATH: `${cargoBinDir}${delimiter}${dirname(node)}${delimiter}${process.env.PATH}`,\n },\n cancelSignal: abortSignal,\n },\n log,\n {\n onStderr(data) {\n // on ci, do not log\n if (!process.env.CI) {\n log(data);\n }\n },\n onStdout(data) {\n // on ci, do not log\n if (!process.env.CI) {\n log(data);\n }\n },\n },\n );\n\n // if make, bundle\n if (action === \"make\") {\n await runWithLiveLogs(\n cargo,\n // TODO: https://v2.tauri.app/fr/distribute/#bundling\n [\"tauri\", \"bundle\", \"--\", \"--bundles\", \"appimage\"],\n {\n cwd: join(destinationFolder, \"src-tauri\"),\n env: {\n DEBUG: completeConfiguration.enableExtraLogging ? \"*\" : \"\",\n ELECTRON_NO_ASAR: \"1\",\n CARGO_TARGET_DIR: cargoTargetDir,\n PATH: `${cargoBinDir}${delimiter}${dirname(node)}${delimiter}${process.env.PATH}`,\n },\n cancelSignal: abortSignal,\n },\n log,\n {\n onStderr(data) {\n log(data);\n },\n onStdout(data) {\n log(data);\n },\n },\n );\n }\n }\n\n if (action === \"package\") {\n const binName = getBinName(sanitizedName);\n\n log(\"cargoOutputPath\", cargoOutputPath);\n\n setOutput(\"output\", cargoOutputPath);\n setOutput(\"binary\", join(cargoOutputPath, binName));\n return {\n folder: cargoOutputPath,\n binary: join(cargoOutputPath, binName),\n };\n } else if (action === \"make\") {\n // TODO:\n throw new Error(\"Unsupported action\");\n } else if (action === \"preview\") {\n // continue\n } else {\n throw new Error(\"Unsupported action\");\n // const output = join(destinationFolder, 'out', 'make')\n // setOutput('output', output)\n // return {\n // folder: output,\n // binary: undefined\n // }\n }\n } catch (e) {\n if (e instanceof Error) {\n if (e.name === \"RequestError\") {\n log(\"Request error\");\n }\n if (e.name === \"RequestError\") {\n log(\"Request error\");\n }\n throw e;\n }\n log(e);\n return undefined;\n }\n};\n","export const defaultTauriConfig = {\n alwaysOnTop: false,\n appBundleId: \"com.pipelab.app\",\n appCategoryType: \"\",\n appCopyright: \"Copyright © 2024 Pipelab\",\n appVersion: \"1.0.0\",\n author: \"Pipelab\",\n description: \"A simple Electron application\",\n tauriVersion: \"\",\n enableExtraLogging: false,\n clearServiceWorkerOnBoot: false,\n frame: true,\n fullscreen: false,\n icon: \"\",\n height: 600,\n name: \"Pipelab\",\n toolbar: true,\n transparent: false,\n width: 800,\n enableSteamSupport: false,\n steamGameId: 480,\n enableDiscordSupport: false,\n discordAppId: \"\",\n ignore: [] as string[],\n backgroundColor: \"#FFF\",\n openDevtoolsOnStart: false,\n} satisfies DesktopApp.Tauri;\n","import { createActionRunner } from \"@pipelab/plugin-core\";\nimport { createMakeProps, tauri } from \"./tauri\";\nimport { merge } from \"ts-deepmerge\";\nimport { defaultTauriConfig } from \"./utils\";\n\nexport const makeRunner = createActionRunner<ReturnType<typeof createMakeProps>>(\n async (options) => {\n const appFolder = options.inputs[\"input-folder\"];\n\n if (!options.inputs.configuration) {\n throw new Error(\"Missing tauri configuration\");\n }\n\n const completeConfiguration = merge(\n defaultTauriConfig,\n options.inputs.configuration,\n ) as DesktopApp.Tauri;\n\n await tauri(\"make\", appFolder, options, completeConfiguration);\n },\n);\n","import { createActionRunner, runWithLiveLogs } from \"@pipelab/plugin-core\";\nimport { createPreviewProps, tauri } from \"./tauri\";\nimport { merge } from \"ts-deepmerge\";\nimport { defaultTauriConfig } from \"./utils\";\n\nexport const previewRunner = createActionRunner<ReturnType<typeof createPreviewProps>>(\n async (options) => {\n const url = options.inputs[\"input-url\"];\n if (url === \"\") {\n throw new Error(\"URL can't be empty\");\n }\n\n if (!options.inputs.configuration) {\n throw new Error(\"Missing tauri configuration\");\n }\n\n const completeConfiguration = merge(defaultTauriConfig, {\n alwaysOnTop: options.inputs.configuration[\"alwaysOnTop\"],\n appBundleId: options.inputs.configuration[\"appBundleId\"],\n appCategoryType: options.inputs.configuration[\"appCategoryType\"],\n appCopyright: options.inputs.configuration[\"appCopyright\"],\n appVersion: options.inputs.configuration[\"appVersion\"],\n author: options.inputs.configuration[\"author\"],\n description: options.inputs.configuration[\"description\"],\n tauriVersion: options.inputs.configuration[\"tauriVersion\"],\n enableExtraLogging: options.inputs.configuration[\"enableExtraLogging\"],\n clearServiceWorkerOnBoot: options.inputs.configuration[\"clearServiceWorkerOnBoot\"],\n frame: options.inputs.configuration[\"frame\"],\n fullscreen: options.inputs.configuration[\"fullscreen\"],\n icon: options.inputs.configuration[\"icon\"],\n height: options.inputs.configuration[\"height\"],\n name: options.inputs.configuration[\"name\"],\n toolbar: options.inputs.configuration[\"toolbar\"],\n transparent: options.inputs.configuration[\"transparent\"],\n width: options.inputs.configuration[\"width\"],\n enableSteamSupport: options.inputs.configuration[\"enableSteamSupport\"],\n steamGameId: options.inputs.configuration[\"steamGameId\"],\n ignore: options.inputs.configuration[\"ignore\"],\n openDevtoolsOnStart: options.inputs.configuration[\"openDevtoolsOnStart\"],\n enableDiscordSupport: options.inputs.configuration[\"enableDiscordSupport\"],\n discordAppId: options.inputs.configuration[\"discordAppId\"],\n customPackages: options.inputs.configuration[\"customPackages\"],\n backgroundColor: options.inputs.configuration[\"backgroundColor\"],\n } satisfies DesktopApp.Tauri) as DesktopApp.Tauri;\n\n console.log(\"completeConfiguration\", completeConfiguration);\n\n await tauri(\"preview\", url, options, completeConfiguration);\n return;\n },\n);\n","import { createAction, createActionRunner } from \"@pipelab/plugin-core\";\nimport { configureParams } from \"./tauri\";\n\nexport const props = createAction({\n id: \"tauri:configure\",\n description: \"Configure tauri\",\n displayString: \"'Configure Tauri'\",\n icon: \"\",\n meta: {},\n name: \"Configure Tauri\",\n advanced: true,\n outputs: {\n configuration: {\n label: \"Configuration\",\n value: {} as Partial<DesktopApp.Tauri>,\n },\n },\n params: configureParams,\n});\n\nexport const configureRunner = createActionRunner<typeof props>(async ({ setOutput, inputs }) => {\n setOutput(\"configuration\", inputs);\n});\n","import { createActionRunner } from \"@pipelab/plugin-core\";\nimport { createPackageV2Props, tauri } from \"./tauri\";\nimport { merge } from \"ts-deepmerge\";\nimport { defaultTauriConfig } from \"./utils\";\n\nexport const packageV2Runner = createActionRunner<ReturnType<typeof createPackageV2Props>>(\n async (options) => {\n const appFolder = options.inputs[\"input-folder\"];\n\n const completeConfiguration = merge(defaultTauriConfig, {\n alwaysOnTop: options.inputs[\"alwaysOnTop\"],\n appBundleId: options.inputs[\"appBundleId\"],\n appCategoryType: options.inputs[\"appCategoryType\"],\n appCopyright: options.inputs[\"appCopyright\"],\n appVersion: options.inputs[\"appVersion\"],\n author: options.inputs[\"author\"],\n description: options.inputs[\"description\"],\n tauriVersion: options.inputs[\"tauriVersion\"],\n enableExtraLogging: options.inputs[\"enableExtraLogging\"],\n clearServiceWorkerOnBoot: options.inputs[\"clearServiceWorkerOnBoot\"],\n frame: options.inputs[\"frame\"],\n fullscreen: options.inputs[\"fullscreen\"],\n icon: options.inputs[\"icon\"],\n height: options.inputs[\"height\"],\n name: options.inputs[\"name\"],\n toolbar: options.inputs[\"toolbar\"],\n transparent: options.inputs[\"transparent\"],\n width: options.inputs[\"width\"],\n enableSteamSupport: options.inputs[\"enableSteamSupport\"],\n steamGameId: options.inputs[\"steamGameId\"],\n ignore: options.inputs[\"ignore\"],\n openDevtoolsOnStart: options.inputs[\"openDevtoolsOnStart\"],\n enableDiscordSupport: options.inputs[\"enableDiscordSupport\"],\n discordAppId: options.inputs[\"discordAppId\"],\n customPackages: options.inputs[\"customPackages\"],\n backgroundColor: options.inputs[\"backgroundColor\"],\n } satisfies DesktopApp.Tauri) as DesktopApp.Tauri;\n\n console.log(\"completeConfiguration\", completeConfiguration);\n\n await tauri(\"package\", appFolder, options, completeConfiguration);\n },\n);\n","import { makeRunner } from \"./make\";\nimport { previewRunner } from \"./preview\";\n\nimport { createNodeDefinition } from \"@pipelab/plugin-core\";\nconst icon = new URL(\"./public/tauri.webp\", import.meta.url).href;\nimport {\n createMakeProps,\n createPackageV2Props,\n createPreviewProps,\n IDMake,\n IDPackageV2,\n IDPreview,\n} from \"./tauri\";\nimport { configureRunner, props } from \"./configure\";\nimport { packageV2Runner } from \"./package\";\n\nexport default createNodeDefinition({\n description: \"Tauri\",\n name: \"Tauri\",\n id: \"tauri\",\n icon: {\n type: \"image\",\n image: icon,\n },\n nodes: [\n // make and package\n {\n node: createMakeProps(\n IDMake,\n \"Create Installer\",\n \"Create a distributable installer for your chosen platform\",\n \"\",\n \"`Build package for ${fmt.param(params['input-folder'], 'primary', 'Input folder not set')}`\",\n ),\n runner: makeRunner,\n // disabled: platform === 'linux' ? 'Tauri is not supported on Linux' : undefined\n },\n {\n node: createPackageV2Props(\n IDPackageV2,\n \"Package app with configuration\",\n \"Gather all necessary files and prepare your app for distribution, creating a platform-specific bundle.\",\n \"\",\n \"`Package app from ${fmt.param(params['input-folder'], 'primary', 'Input folder not set')}`\",\n false,\n false,\n undefined,\n false,\n false,\n ),\n runner: packageV2Runner,\n },\n {\n node: createPreviewProps(\n IDPreview,\n \"Preview app\",\n \"Package and preview your app from an URL\",\n \"\",\n \"`Preview app from ${fmt.param(params['input-url'], 'primary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;EACV,SAAS,EACP,MAAM,WACP;EACF;CACD,SAAS;EACP,OAAO;EACP,OAAO;EACP,aAAa;EACb,UAAU;EACV,SAAS,EACP,MAAM,WACP;EACF;CACD,aAAa;EACX,OAAO;EACP,OAAO;EACP,aAAa;EACb,UAAU;EACV,SAAS,EACP,MAAM,WACP;EACF;CAED,cAAc,kBAAkB,IAAI;EAClC,OAAO;EACP,aACE;EACF,UAAU;EACX,CAAC;CACF,oBAAoB;EAClB,UAAU;EACV,OAAO;EACP,OAAO;EACP,SAAS,EACP,MAAM,WACP;EACD,aAAa;EACd;CACD,qBAAqB,mBAAmB,OAAO;EAC7C,OAAO;EACP,UAAU;EACV,aAAa;EACd,CAAC;CAGF,cAAc;EACZ,UAAU;EACV,OAAO;EACP,OAAO;EACP,SAAS;GACP,MAAM;GACN,SAAS,EACP,MAAM,QACP;GACF;EACF;CACD,QAAQ,YACN;;IAGA;EACE,UAAU;EACV,OAAO;EACP,aACE;EACF,SAAS;GACP,MAAM;GACN,SAAS,EACP,MAAM,QACP;GACF;EACF,CACF;CAID,oBAAoB;EAClB,UAAU;EACV,OAAO;EACP,aAAa;EACb,OAAO;EACP,SAAS,EACP,MAAM,WACP;EACF;CACD,aAAa,kBAAkB,KAAK;EAClC,UAAU;EACV,OAAO;EACP,aAAa;EACd,CAAC;CACF,sBAAsB;EACpB,UAAU;EACV,OAAO;EACP,aAAa;EACb,OAAO;EACP,SAAS,EACP,MAAM,WACP;EACF;CACD,cAAc,kBAAkB,IAAI;EAClC,UAAU;EACV,OAAO;EACP,aAAa;EACd,CAAC;CACH;AAED,MAAM,UAAU;CACd,QAAQ;EACN,OAAO;EACP,OAAO;EACP,SAAS;GACP,MAAM;GACN,SAAS,EACP,YAAY,CAAC,gBAAgB,EAC9B;GACF;EACF;CACD,QAAQ;EACN,OAAO;EACP,OAAO;EACP,SAAS;GACP,MAAM;GACN,SAAS,EACP,YAAY,CAAC,WAAW,EACzB;GACF;EACF;CACF;AAID,MAAa,mBACX,IAC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I;CACJ,MAAM;EACJ,MAAM;EACN,OAAO;EACR;CACD,OAAO;EAEL;GACE,MAAM,gBACJ,QACA,oBACA,6DACA,IACA,8FACD;GACD,QAAQ;GAET;EACD;GACE,MAAM,qBACJ,aACA,kCACA,0GACA,IACA,8FACA,OACA,OACA,KAAA,GACA,OACA,MACD;GACD,QAAQ;GACT;EACD;GACE,MAAM,mBACJ,WACA,eACA,4CACA,IACA,0FACD;GACD,QAAQ;GACT;EACD;GACE,MAAM;GACN,QAAQ;GACT;EACF;CACF,CAAC"}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@pipelab/plugin-tauri",
3
+ "version": "1.0.0-beta.0",
4
+ "license": "FSL-1.1-MIT",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/CynToolkit/pipelab.git",
8
+ "directory": "plugins/plugin-tauri"
9
+ },
10
+ "type": "module",
11
+ "main": "./dist/index.cjs",
12
+ "module": "./dist/index.mjs",
13
+ "types": "./dist/index.d.mts",
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "dependencies": {
18
+ "@types/node": "^24.12.2",
19
+ "electron": "32.1.2",
20
+ "execa": "9.4.1",
21
+ "ts-deepmerge": "7.0.1",
22
+ "@pipelab/constants": "1.0.0-beta.0",
23
+ "@pipelab/plugin-core": "1.0.0-beta.0",
24
+ "@pipelab/shared": "1.0.0-beta.0"
25
+ },
26
+ "devDependencies": {
27
+ "tsdown": "0.21.2",
28
+ "typescript": "5.9.3",
29
+ "@pipelab/tsconfig": "1.0.0-beta.0"
30
+ },
31
+ "scripts": {
32
+ "format": "oxfmt .",
33
+ "lint": "oxlint .",
34
+ "build": "tsdown"
35
+ },
36
+ "exports": {
37
+ ".": {
38
+ "types": "./dist/index.d.mts",
39
+ "import": "./dist/index.mjs",
40
+ "require": "./dist/index.cjs",
41
+ "default": "./dist/index.mjs"
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,23 @@
1
+ import { createAction, createActionRunner } from "@pipelab/plugin-core";
2
+ import { configureParams } from "./tauri";
3
+
4
+ export const props = createAction({
5
+ id: "tauri:configure",
6
+ description: "Configure tauri",
7
+ displayString: "'Configure Tauri'",
8
+ icon: "",
9
+ meta: {},
10
+ name: "Configure Tauri",
11
+ advanced: true,
12
+ outputs: {
13
+ configuration: {
14
+ label: "Configuration",
15
+ value: {} as Partial<DesktopApp.Tauri>,
16
+ },
17
+ },
18
+ params: configureParams,
19
+ });
20
+
21
+ export const configureRunner = createActionRunner<typeof props>(async ({ setOutput, inputs }) => {
22
+ setOutput("configuration", inputs);
23
+ });
@@ -0,0 +1 @@
1
+ declare module "*.webp";
@@ -0,0 +1,11 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Document</title>
7
+ </head>
8
+ <body>
9
+ <p>Hello</p>
10
+ </body>
11
+ </html>
package/src/index.ts ADDED
@@ -0,0 +1,68 @@
1
+ import { makeRunner } from "./make";
2
+ import { previewRunner } from "./preview";
3
+
4
+ import { createNodeDefinition } from "@pipelab/plugin-core";
5
+ const icon = new URL("./public/tauri.webp", import.meta.url).href;
6
+ import {
7
+ createMakeProps,
8
+ createPackageV2Props,
9
+ createPreviewProps,
10
+ IDMake,
11
+ IDPackageV2,
12
+ IDPreview,
13
+ } from "./tauri";
14
+ import { configureRunner, props } from "./configure";
15
+ import { packageV2Runner } from "./package";
16
+
17
+ export default createNodeDefinition({
18
+ description: "Tauri",
19
+ name: "Tauri",
20
+ id: "tauri",
21
+ icon: {
22
+ type: "image",
23
+ image: icon,
24
+ },
25
+ nodes: [
26
+ // make and package
27
+ {
28
+ node: createMakeProps(
29
+ IDMake,
30
+ "Create Installer",
31
+ "Create a distributable installer for your chosen platform",
32
+ "",
33
+ "`Build package for ${fmt.param(params['input-folder'], 'primary', 'Input folder not set')}`",
34
+ ),
35
+ runner: makeRunner,
36
+ // disabled: platform === 'linux' ? 'Tauri is not supported on Linux' : undefined
37
+ },
38
+ {
39
+ node: createPackageV2Props(
40
+ IDPackageV2,
41
+ "Package app with configuration",
42
+ "Gather all necessary files and prepare your app for distribution, creating a platform-specific bundle.",
43
+ "",
44
+ "`Package app from ${fmt.param(params['input-folder'], 'primary', 'Input folder not set')}`",
45
+ false,
46
+ false,
47
+ undefined,
48
+ false,
49
+ false,
50
+ ),
51
+ runner: packageV2Runner,
52
+ },
53
+ {
54
+ node: createPreviewProps(
55
+ IDPreview,
56
+ "Preview app",
57
+ "Package and preview your app from an URL",
58
+ "",
59
+ "`Preview app from ${fmt.param(params['input-url'], 'primary', 'Input folder not set')}`",
60
+ ),
61
+ runner: previewRunner,
62
+ },
63
+ {
64
+ node: props,
65
+ runner: configureRunner,
66
+ },
67
+ ],
68
+ });
@@ -0,0 +1,57 @@
1
+ import { expect, test, vi } from "vitest";
2
+ import { makeRunner } from "./make.js";
3
+ import { tmpdir } from "node:os";
4
+ import { join } from "node:path";
5
+ import { type fs } from "memfs";
6
+ import { browserWindow } from "@pipelab/shared";
7
+
8
+ // ...
9
+
10
+ // vi.mock('node:fs/promises', async () => {
11
+ // const memfs: { fs: typeof fs } = await vi.importActual('memfs')
12
+
13
+ // return memfs.fs.promises
14
+ // })
15
+
16
+ test("adds 1 + 2 to equal 3", async () => {
17
+ const outputs: Record<string, unknown> = {};
18
+
19
+ const id = "ut-electron-build";
20
+ const tmpDir = join(tmpdir(), id);
21
+
22
+ console.log("tmpDir", tmpDir);
23
+
24
+ const inputFolder = join(process.cwd(), "fixtures", "build");
25
+
26
+ console.log("inputFolder", inputFolder);
27
+
28
+ // await makeRunner({
29
+ // inputs: {
30
+ // 'input-folder': inputFolder,
31
+ // configuration: {},
32
+ // arch: undefined,
33
+ // platform: undefined
34
+ // },
35
+ // log: (...args) => {
36
+ // console.log(...args)
37
+ // },
38
+ // setOutput: (key, value) => {
39
+ // outputs[key] = value
40
+ // },
41
+ // meta: {
42
+ // definition: ''
43
+ // },
44
+ // setMeta: () => {
45
+ // console.log('set meta defined here')
46
+ // },
47
+ // cwd: tmpDir,
48
+ // paths: {
49
+ // assets: '',
50
+ // unpack: ''
51
+ // },
52
+ // api: undefined,
53
+ // browserWindow
54
+ // })
55
+ console.log("outputs", outputs);
56
+ expect(true).toBe(true);
57
+ }, 120_000);
package/src/make.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { createActionRunner } from "@pipelab/plugin-core";
2
+ import { createMakeProps, tauri } from "./tauri";
3
+ import { merge } from "ts-deepmerge";
4
+ import { defaultTauriConfig } from "./utils";
5
+
6
+ export const makeRunner = createActionRunner<ReturnType<typeof createMakeProps>>(
7
+ async (options) => {
8
+ const appFolder = options.inputs["input-folder"];
9
+
10
+ if (!options.inputs.configuration) {
11
+ throw new Error("Missing tauri configuration");
12
+ }
13
+
14
+ const completeConfiguration = merge(
15
+ defaultTauriConfig,
16
+ options.inputs.configuration,
17
+ ) as DesktopApp.Tauri;
18
+
19
+ await tauri("make", appFolder, options, completeConfiguration);
20
+ },
21
+ );
package/src/package.ts ADDED
@@ -0,0 +1,43 @@
1
+ import { createActionRunner } from "@pipelab/plugin-core";
2
+ import { createPackageV2Props, tauri } from "./tauri";
3
+ import { merge } from "ts-deepmerge";
4
+ import { defaultTauriConfig } from "./utils";
5
+
6
+ export const packageV2Runner = createActionRunner<ReturnType<typeof createPackageV2Props>>(
7
+ async (options) => {
8
+ const appFolder = options.inputs["input-folder"];
9
+
10
+ const completeConfiguration = merge(defaultTauriConfig, {
11
+ alwaysOnTop: options.inputs["alwaysOnTop"],
12
+ appBundleId: options.inputs["appBundleId"],
13
+ appCategoryType: options.inputs["appCategoryType"],
14
+ appCopyright: options.inputs["appCopyright"],
15
+ appVersion: options.inputs["appVersion"],
16
+ author: options.inputs["author"],
17
+ description: options.inputs["description"],
18
+ tauriVersion: options.inputs["tauriVersion"],
19
+ enableExtraLogging: options.inputs["enableExtraLogging"],
20
+ clearServiceWorkerOnBoot: options.inputs["clearServiceWorkerOnBoot"],
21
+ frame: options.inputs["frame"],
22
+ fullscreen: options.inputs["fullscreen"],
23
+ icon: options.inputs["icon"],
24
+ height: options.inputs["height"],
25
+ name: options.inputs["name"],
26
+ toolbar: options.inputs["toolbar"],
27
+ transparent: options.inputs["transparent"],
28
+ width: options.inputs["width"],
29
+ enableSteamSupport: options.inputs["enableSteamSupport"],
30
+ steamGameId: options.inputs["steamGameId"],
31
+ ignore: options.inputs["ignore"],
32
+ openDevtoolsOnStart: options.inputs["openDevtoolsOnStart"],
33
+ enableDiscordSupport: options.inputs["enableDiscordSupport"],
34
+ discordAppId: options.inputs["discordAppId"],
35
+ customPackages: options.inputs["customPackages"],
36
+ backgroundColor: options.inputs["backgroundColor"],
37
+ } satisfies DesktopApp.Tauri) as DesktopApp.Tauri;
38
+
39
+ console.log("completeConfiguration", completeConfiguration);
40
+
41
+ await tauri("package", appFolder, options, completeConfiguration);
42
+ },
43
+ );
package/src/preview.ts ADDED
@@ -0,0 +1,51 @@
1
+ import { createActionRunner, runWithLiveLogs } from "@pipelab/plugin-core";
2
+ import { createPreviewProps, tauri } from "./tauri";
3
+ import { merge } from "ts-deepmerge";
4
+ import { defaultTauriConfig } from "./utils";
5
+
6
+ export const previewRunner = createActionRunner<ReturnType<typeof createPreviewProps>>(
7
+ async (options) => {
8
+ const url = options.inputs["input-url"];
9
+ if (url === "") {
10
+ throw new Error("URL can't be empty");
11
+ }
12
+
13
+ if (!options.inputs.configuration) {
14
+ throw new Error("Missing tauri configuration");
15
+ }
16
+
17
+ const completeConfiguration = merge(defaultTauriConfig, {
18
+ alwaysOnTop: options.inputs.configuration["alwaysOnTop"],
19
+ appBundleId: options.inputs.configuration["appBundleId"],
20
+ appCategoryType: options.inputs.configuration["appCategoryType"],
21
+ appCopyright: options.inputs.configuration["appCopyright"],
22
+ appVersion: options.inputs.configuration["appVersion"],
23
+ author: options.inputs.configuration["author"],
24
+ description: options.inputs.configuration["description"],
25
+ tauriVersion: options.inputs.configuration["tauriVersion"],
26
+ enableExtraLogging: options.inputs.configuration["enableExtraLogging"],
27
+ clearServiceWorkerOnBoot: options.inputs.configuration["clearServiceWorkerOnBoot"],
28
+ frame: options.inputs.configuration["frame"],
29
+ fullscreen: options.inputs.configuration["fullscreen"],
30
+ icon: options.inputs.configuration["icon"],
31
+ height: options.inputs.configuration["height"],
32
+ name: options.inputs.configuration["name"],
33
+ toolbar: options.inputs.configuration["toolbar"],
34
+ transparent: options.inputs.configuration["transparent"],
35
+ width: options.inputs.configuration["width"],
36
+ enableSteamSupport: options.inputs.configuration["enableSteamSupport"],
37
+ steamGameId: options.inputs.configuration["steamGameId"],
38
+ ignore: options.inputs.configuration["ignore"],
39
+ openDevtoolsOnStart: options.inputs.configuration["openDevtoolsOnStart"],
40
+ enableDiscordSupport: options.inputs.configuration["enableDiscordSupport"],
41
+ discordAppId: options.inputs.configuration["discordAppId"],
42
+ customPackages: options.inputs.configuration["customPackages"],
43
+ backgroundColor: options.inputs.configuration["backgroundColor"],
44
+ } satisfies DesktopApp.Tauri) as DesktopApp.Tauri;
45
+
46
+ console.log("completeConfiguration", completeConfiguration);
47
+
48
+ await tauri("preview", url, options, completeConfiguration);
49
+ return;
50
+ },
51
+ );
Binary file