diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index e4ceabde..47ecac72 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -62,7 +62,6 @@ jobs: echo "INPUT_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV - uses: pnpm/action-setup@v6 with: - cache: true version: 11 - name: Setup Node.js uses: actions/setup-node@v6 @@ -121,7 +120,6 @@ jobs: - uses: actions/checkout@v6 - uses: pnpm/action-setup@v6 with: - cache: true version: 11 - name: Setup Node.js uses: actions/setup-node@v6 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 45703cc9..004b64b3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,6 @@ jobs: - uses: actions/checkout@v6 - uses: pnpm/action-setup@v6 with: - cache: true version: 11 - name: Setup Node.js uses: actions/setup-node@v6 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b08f722c..f125708b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,6 @@ jobs: echo "INPUT_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV - uses: pnpm/action-setup@v6 with: - cache: true version: 11 - name: Setup Node.js uses: actions/setup-node@v6 diff --git a/locale/create-pr.js b/locale/create-pr.js index cc52593f..72a664e7 100644 --- a/locale/create-pr.js +++ b/locale/create-pr.js @@ -1,17 +1,11 @@ -const axios = require('axios'); +const baseURL = `${process.env.GITHUB_API_URL}/repos/${process.env.GITHUB_REPOSITORY}`; -const token = process.env.GITHUB_TOKEN; - -const baseURL = - process.env.GITHUB_API_URL + '/repos/' + process.env.GITHUB_REPOSITORY; -const request = axios.create({ - baseURL: baseURL, - validateStatus: () => true, -}); - -request.defaults.headers.common['Accept'] = 'application/vnd.github+json'; -request.defaults.headers.common['Authorization'] = 'Bearer ' + token; -request.defaults.headers.common['X-GitHub-Api-Version'] = '2022-11-28'; +const apiHeader = { + Accept: 'application/vnd.github+json', + Authorization: `Bearer ${process.env.GITHUB_TOKEN}`, + 'X-GitHub-Api-Version': '2022-11-28', + 'Content-Type': 'application/json', +}; async function main() { if (!token) { @@ -21,34 +15,35 @@ async function main() { console.log('baseURL: ' + baseURL); - const pulls = await request.get('/pulls', { - params: { - state: 'open', - head: 'dev-locale', - base: 'dev', + const pulls = await fetch( + `${baseURL}/pulls?state=open&head=dev-locale&base=dev`, + { + headers: apiHeader, }, - }); + ); - if (pulls.data.length > 0) { + const data = await pulls.json(); + if (data.length > 0) { // already has PR - const item = pulls.data[0]; + const item = data[0]; console.log('PR already exists: ' + item.html_url); return; } // Create new PR - const create = await request.post( - '/pulls', - JSON.stringify({ + const create = await fetch(`${baseURL}/pulls`, { + method: 'POST', + body: JSON.stringify({ title: 'locale: update locales', body: '', head: 'dev-locale', base: 'dev', }), - ); + headers: apiHeader, + }); if (create.status === 201) { - console.log('PR created: ' + create.data.html_url); + console.log(`PR created: ${(await create.json()).html_url}`); } else { console.log('PR created failed: ' + create.status); } diff --git a/package.json b/package.json index 9a3794d4..5fcd7f65 100644 --- a/package.json +++ b/package.json @@ -42,9 +42,8 @@ }, "devDependencies": { "@biomejs/biome": "^2.1.2", + "@fxb/extension-packer": "*", "@modern-js/tsconfig": "^2.68.5", - "@plasmohq/chrome-webstore-api": "^2.11.0", - "@plasmohq/edge-addons-api": "^2.0.0", "@rsbuild/core": "^1.4.11", "@rsbuild/plugin-react": "^1.3.4", "@swc/plugin-emotion": "^11.0.0", @@ -54,11 +53,7 @@ "@types/react": "^18.3.1", "@types/react-dom": "^18.3.1", "@types/webextension-polyfill": "^0.12.3", - "amo-upload": "^1.1.0", - "axios": "^1.7.2", - "cpr": "^3.0.1", "cross-env": "^7.0.3", - "crx": "^5.0.1", "get-port": "^7.1.0", "lint-staged": "^13.2.2", "lodash": "^4.17.21", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e727f025..74d67443 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,9 @@ settings: autoInstallPeers: false excludeLinksFromLockfile: false +overrides: + '@fxb/extension-packer': https://github.com/FirefoxBar/extension-packer.git + patchedDependencies: lodash: a9e8e63b9137cb9b2a30f2548a31b8fe8ed02dbff524f5c3b3817d3fb5c377af lodash-es: 87739c1de481c0b0069b3c5cfcc3a63a3080e12ad9027e4cfb44f04521d3c4d7 @@ -64,15 +67,12 @@ importers: '@biomejs/biome': specifier: ^2.1.2 version: 2.1.2 + '@fxb/extension-packer': + specifier: https://github.com/FirefoxBar/extension-packer.git + version: https://codeload.github.com/FirefoxBar/extension-packer/tar.gz/d8d04c82b35f654f0a357d3f05a4d7f45d5aed71 '@modern-js/tsconfig': specifier: ^2.68.5 version: 2.68.5 - '@plasmohq/chrome-webstore-api': - specifier: ^2.11.0 - version: 2.11.0 - '@plasmohq/edge-addons-api': - specifier: ^2.0.0 - version: 2.0.0 '@rsbuild/core': specifier: ^1.4.11 version: 1.4.11 @@ -100,21 +100,9 @@ importers: '@types/webextension-polyfill': specifier: ^0.12.3 version: 0.12.3 - amo-upload: - specifier: ^1.1.0 - version: 1.1.0 - axios: - specifier: ^1.7.2 - version: 1.7.2 - cpr: - specifier: ^3.0.1 - version: 3.0.1 cross-env: specifier: ^7.0.3 version: 7.0.3 - crx: - specifier: ^5.0.1 - version: 5.0.1 get-port: specifier: ^7.1.0 version: 7.1.0 @@ -409,6 +397,11 @@ packages: resolution: {integrity: sha512-PyUXQWB42s4jBli435TDiYuVsadwRHnMc27YaLouINktvTWsL3FcKrRMGawTayFk46X+n5bE23RjUTWQwrukWw==} engines: {node: '>= 0.10.0'} + '@fxb/extension-packer@https://codeload.github.com/FirefoxBar/extension-packer/tar.gz/d8d04c82b35f654f0a357d3f05a4d7f45d5aed71': + resolution: {gitHosted: true, tarball: https://codeload.github.com/FirefoxBar/extension-packer/tar.gz/d8d04c82b35f654f0a357d3f05a4d7f45d5aed71} + version: 1.0.0 + engines: {node: '>=20', pnpm: '>=10'} + '@humanwhocodes/config-array@0.13.0': resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} engines: {node: '>=10.10.0'} @@ -600,8 +593,8 @@ packages: '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} - '@sindresorhus/is@7.0.2': - resolution: {integrity: sha512-d9xRovfKNz1SKieM0qJdO+PQonjnnIfSNWfHYnBSJ9hkjm0ZPw6HlxscDXYstp3z+7V2GOFHc+J0CYrYTjqCJw==} + '@sindresorhus/is@7.2.0': + resolution: {integrity: sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw==} engines: {node: '>=18'} '@swc/counter@0.1.3': @@ -647,8 +640,8 @@ packages: '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - '@types/http-cache-semantics@4.0.4': - resolution: {integrity: sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==} + '@types/http-cache-semantics@4.2.0': + resolution: {integrity: sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==} '@types/js-cookie@2.2.7': resolution: {integrity: sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA==} @@ -865,9 +858,6 @@ packages: async@3.2.4: resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} - asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - atomic-sleep@1.0.0: resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} engines: {node: '>=8.0.0'} @@ -875,9 +865,6 @@ packages: atomically@2.0.3: resolution: {integrity: sha512-kU6FmrwZ3Lx7/7y3hPS5QnbJfaohcIul5fGqf7ok+4KklIEk9tJ0C2IQPdacSbVUWv6zVHXEBWoWd6NrVMT7Cw==} - axios@1.7.2: - resolution: {integrity: sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==} - b4a@1.6.7: resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==} @@ -1118,10 +1105,6 @@ packages: resolution: {integrity: sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q==} engines: {node: '>=8.0.0'} - combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -1348,10 +1331,6 @@ packages: resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} engines: {node: '>= 14'} - delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -1419,8 +1398,8 @@ packages: error-stack-parser@2.1.4: resolution: {integrity: sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==} - es-toolkit@1.46.1: - resolution: {integrity: sha512-5eNtXOs3tbfxXOj04tjjseeWkRWaoCjdEI+96DgwzZoe6c9juL49pXlzAFTI72aWC9Y8p7168g6XIKjh7k6pyQ==} + es-toolkit@1.47.0: + resolution: {integrity: sha512-n1GuoD0WEQZMBk5tttoZSqwgyLx01oqa5XsBmCHwPyNe1S9jPBEmtR2pSgp2kJuWE3ciFZ6yRHmY4pM4C3OOkw==} es6-error@4.1.1: resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} @@ -1633,15 +1612,6 @@ packages: flatted@3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} - follow-redirects@1.15.6: - resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - foreground-child@3.3.1: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} @@ -1650,10 +1620,6 @@ packages: resolution: {integrity: sha512-G6NsmEW15s0Uw9XnCg+33H3ViYRyiM0hMrMhhqQOR8NFc5GhYrI+6I3u7OTw7b91J2g8rtvMBZJDbcGb2YUniw==} engines: {node: '>= 18'} - form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} - engines: {node: '>= 6'} - fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} @@ -1833,8 +1799,8 @@ packages: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} - index-to-position@1.1.0: - resolution: {integrity: sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg==} + index-to-position@1.2.0: + resolution: {integrity: sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw==} engines: {node: '>=18'} inflight@1.0.6: @@ -2362,14 +2328,6 @@ packages: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} - mime-db@1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} - - mime-types@2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} - mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -2454,8 +2412,8 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - normalize-url@8.0.2: - resolution: {integrity: sha512-Ee/R3SyN4BuynXcnTaekmaVdbDAEiNrHqjQIA37mHU8G9pf7aaAD4ZX3XjBLo6rsdcxA/gtkcNYZLt30ACgynw==} + normalize-url@8.1.1: + resolution: {integrity: sha512-JYc0DPlpGWB40kH5g07gGTrYuMqV653k3uBKY6uITPWds3M0ov3GaWGp9lbE3Bzngx8+XkfzgvASb9vk9JDFXQ==} engines: {node: '>=14.16'} npm-run-path@4.0.1: @@ -2593,8 +2551,8 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - pbf@3.2.1: - resolution: {integrity: sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==} + pbf@3.3.0: + resolution: {integrity: sha512-XDF38WCH3z5OV/OVa8GKUNtLAyneuzbCisx7QUCF8Q6Nutx0WnJrQe5O+kOtBlLfRNUws98Y58Lblp+NJG5T4Q==} hasBin: true pend@1.2.0: @@ -2675,8 +2633,8 @@ packages: proto-list@1.2.4: resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} - protocol-buffers-schema@3.6.0: - resolution: {integrity: sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==} + protocol-buffers-schema@3.6.1: + resolution: {integrity: sha512-VG2K63Igkiv9p76tk1lilczEK1cT+kCjKtkdhw1dQZV3k3IXJbd3o6Ho8b9zJZaHSnT2hKe4I+ObmX9w6m5SmQ==} proxy-agent@6.5.0: resolution: {integrity: sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==} @@ -2774,8 +2732,8 @@ packages: readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} - readable-stream@3.6.1: - resolution: {integrity: sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==} + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} readable-stream@4.7.0: @@ -3030,8 +2988,8 @@ packages: spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - spdx-license-ids@3.0.22: - resolution: {integrity: sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==} + spdx-license-ids@3.0.23: + resolution: {integrity: sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==} split-on-first@3.0.0: resolution: {integrity: sha512-qxQJTx2ryR0Dw0ITYyekNQWpz6f8dGd7vffGNflQQ3Iqj9NJ6qiZ7ELpZsJ/QBhIVAiDfXdag3+Gp8RvWa62AA==} @@ -3800,6 +3758,16 @@ snapshots: '@fregante/relaxed-json@2.0.0': {} + '@fxb/extension-packer@https://codeload.github.com/FirefoxBar/extension-packer/tar.gz/d8d04c82b35f654f0a357d3f05a4d7f45d5aed71': + dependencies: + '@plasmohq/chrome-webstore-api': 2.11.0 + '@plasmohq/edge-addons-api': 2.0.0 + amo-upload: 1.1.0 + cpr: 3.0.1 + crx: 5.0.1 + lodash-es: 4.17.21(patch_hash=87739c1de481c0b0069b3c5cfcc3a63a3080e12ad9027e4cfb44f04521d3c4d7) + rimraf: 6.0.1 + '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 @@ -4029,7 +3997,7 @@ snapshots: '@sec-ant/readable-stream@0.4.1': {} - '@sindresorhus/is@7.0.2': {} + '@sindresorhus/is@7.2.0': {} '@swc/counter@0.1.3': {} @@ -4079,7 +4047,7 @@ snapshots: dependencies: '@types/unist': 2.0.6 - '@types/http-cache-semantics@4.0.4': {} + '@types/http-cache-semantics@4.2.0': {} '@types/js-cookie@2.2.7': {} @@ -4261,7 +4229,7 @@ snapshots: dependencies: commander: 14.0.3 console-table-printer: 2.15.0 - es-toolkit: 1.46.1 + es-toolkit: 1.47.0 jsonwebtoken: 9.0.3 read-package-up: 12.0.0 @@ -4290,7 +4258,7 @@ snapshots: archiver-utils@2.1.0: dependencies: glob: 7.2.3 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 lazystream: 1.0.1 lodash.defaults: 4.2.0 lodash.difference: 4.5.0 @@ -4306,7 +4274,7 @@ snapshots: async: 2.6.4 buffer-crc32: 0.2.13 glob: 7.2.3 - readable-stream: 3.6.1 + readable-stream: 3.6.2 tar-stream: 2.2.0 zip-stream: 2.1.3 @@ -4336,8 +4304,6 @@ snapshots: async@3.2.4: {} - asynckit@0.4.0: {} - atomic-sleep@1.0.0: {} atomically@2.0.3: @@ -4345,14 +4311,6 @@ snapshots: stubborn-fs: 1.2.5 when-exit: 2.1.4 - axios@1.7.2: - dependencies: - follow-redirects: 1.15.6 - form-data: 4.0.0 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - b4a@1.6.7: {} babel-plugin-macros@3.1.0: @@ -4402,7 +4360,7 @@ snapshots: dependencies: buffer: 5.7.1 inherits: 2.0.4 - readable-stream: 3.6.1 + readable-stream: 3.6.2 bluebird@3.7.2: {} @@ -4462,12 +4420,12 @@ snapshots: cacheable-request@12.0.1: dependencies: - '@types/http-cache-semantics': 4.0.4 + '@types/http-cache-semantics': 4.2.0 get-stream: 9.0.1 http-cache-semantics: 4.2.0 keyv: 4.5.4 mimic-response: 4.0.0 - normalize-url: 8.0.2 + normalize-url: 8.1.1 responselike: 3.0.0 callsites@3.1.0: {} @@ -4600,10 +4558,6 @@ snapshots: strip-ansi: 6.0.1 wcwidth: 1.0.1 - combined-stream@1.0.8: - dependencies: - delayed-stream: 1.0.0 - comma-separated-tokens@2.0.3: {} commander@10.0.1: {} @@ -4681,7 +4635,7 @@ snapshots: cpr@3.0.1: dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 minimist: 1.2.8 mkdirp: 0.5.6 rimraf: 2.7.1 @@ -4689,7 +4643,7 @@ snapshots: crc32-stream@3.0.1: dependencies: crc: 3.8.0 - readable-stream: 3.6.1 + readable-stream: 3.6.2 crc@3.8.0: dependencies: @@ -4718,7 +4672,7 @@ snapshots: archiver: 3.1.1 commander: 2.20.3 node-rsa: 1.1.1 - pbf: 3.2.1 + pbf: 3.3.0 css-select@5.1.0: dependencies: @@ -4808,8 +4762,6 @@ snapshots: escodegen: 2.1.0 esprima: 4.0.1 - delayed-stream@1.0.0: {} - dequal@2.0.3: {} devlop@1.1.0: @@ -4874,7 +4826,7 @@ snapshots: dependencies: stackframe: 1.3.4 - es-toolkit@1.46.1: {} + es-toolkit@1.47.0: {} es6-error@4.1.1: {} @@ -5131,8 +5083,6 @@ snapshots: flatted@3.2.7: {} - follow-redirects@1.15.6: {} - foreground-child@3.3.1: dependencies: cross-spawn: 7.0.6 @@ -5140,12 +5090,6 @@ snapshots: form-data-encoder@4.1.0: {} - form-data@4.0.0: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - fs-constants@1.0.0: {} fs-extra@11.3.0: @@ -5235,7 +5179,7 @@ snapshots: got@14.4.4: dependencies: - '@sindresorhus/is': 7.0.2 + '@sindresorhus/is': 7.2.0 '@szmarczak/http-timer': 5.0.1 cacheable-lookup: 7.0.0 cacheable-request: 12.0.1 @@ -5367,7 +5311,7 @@ snapshots: indent-string@4.0.0: {} - index-to-position@1.1.0: {} + index-to-position@1.2.0: {} inflight@1.0.6: dependencies: @@ -6120,12 +6064,6 @@ snapshots: braces: 3.0.2 picomatch: 2.3.1 - mime-db@1.52.0: {} - - mime-types@2.1.35: - dependencies: - mime-db: 1.52.0 - mimic-fn@2.1.0: {} mimic-fn@4.0.0: {} @@ -6219,7 +6157,7 @@ snapshots: normalize-path@3.0.0: {} - normalize-url@8.0.2: {} + normalize-url@8.1.1: {} npm-run-path@4.0.1: dependencies: @@ -6344,7 +6282,7 @@ snapshots: parse-json@8.3.0: dependencies: '@babel/code-frame': 7.27.1 - index-to-position: 1.1.0 + index-to-position: 1.2.0 type-fest: 4.41.0 parse5-htmlparser2-tree-adapter@7.0.0: @@ -6378,7 +6316,7 @@ snapshots: path-type@4.0.0: {} - pbf@3.2.1: + pbf@3.3.0: dependencies: ieee754: 1.2.1 resolve-protobuf-schema: 2.1.0 @@ -6462,7 +6400,7 @@ snapshots: proto-list@1.2.4: {} - protocol-buffers-schema@3.6.0: {} + protocol-buffers-schema@3.6.1: {} proxy-agent@6.5.0: dependencies: @@ -6604,7 +6542,7 @@ snapshots: string_decoder: 1.1.1 util-deprecate: 1.0.2 - readable-stream@3.6.1: + readable-stream@3.6.2: dependencies: inherits: 2.0.4 string_decoder: 1.3.0 @@ -6725,7 +6663,7 @@ snapshots: resolve-protobuf-schema@2.1.0: dependencies: - protocol-buffers-schema: 3.6.0 + protocol-buffers-schema: 3.6.1 resolve@1.22.10: dependencies: @@ -6880,16 +6818,16 @@ snapshots: spdx-correct@3.2.0: dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.22 + spdx-license-ids: 3.0.23 spdx-exceptions@2.5.0: {} spdx-expression-parse@3.0.1: dependencies: spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.22 + spdx-license-ids: 3.0.23 - spdx-license-ids@3.0.22: {} + spdx-license-ids@3.0.23: {} split-on-first@3.0.0: {} @@ -7018,7 +6956,7 @@ snapshots: end-of-stream: 1.4.4 fs-constants: 1.0.0 inherits: 2.0.4 - readable-stream: 3.6.1 + readable-stream: 3.6.2 tar-stream@3.1.7: dependencies: @@ -7320,7 +7258,7 @@ snapshots: dependencies: archiver-utils: 2.1.0 compress-commons: 2.1.1 - readable-stream: 3.6.1 + readable-stream: 3.6.2 zod@3.24.4: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 1444e645..136fce59 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,3 +7,5 @@ allowBuilds: patchedDependencies: lodash: patches/lodash.patch lodash-es: patches/lodash-es.patch +overrides: + '@fxb/extension-packer': https://github.com/FirefoxBar/extension-packer.git diff --git a/public/_locales/zh_TW/messages.json b/public/_locales/zh_TW/messages.json index 16d4a461..c10e6453 100644 --- a/public/_locales/zh_TW/messages.json +++ b/public/_locales/zh_TW/messages.json @@ -1 +1 @@ -{"action":{"message":"動作"},"add":{"message":"新增"},"all_rules":{"message":"所有規則"},"auto":{"message":"自動"},"auto_enable_modify_body":{"message":"已自動開啟「變更回應本文」,如不需要請手動關閉"},"basic_information":{"message":"基本資訊"},"batch_delete":{"message":"批次刪除"},"batch_mode":{"message":"批次作業"},"browser_version":{"message":"瀏覽器版本"},"cancel":{"message":"取消"},"check_update":{"message":"檢查更新"},"choose":{"message":"選擇"},"clone":{"message":"複製"},"cloud_backup":{"message":"雲端備份"},"cloud_backup_at":{"message":"最後備份於 $date$","placeholders":{"date":{"content":"$1"}}},"cloud_no_backup":{"message":"無備份"},"cloud_over_limit":{"message":"超出備份大小限制"},"code":{"message":"代碼"},"code_empty":{"message":"代碼不能為空"},"common_mark":{"message":"設為常用"},"common_mark_tip":{"message":"將任意規則或分組設為常用後,會在此處顯示"},"common_unmark":{"message":"取消常用"},"dark_mode":{"message":"深色模式"},"dark_mode_help":{"message":"深色模式為實驗性功能,重新整理頁面以確認效果"},"debug_mode_enable":{"message":"啟用偵錯模式"},"debug_mode_enable_help":{"message":"開啟「偵錯模式」後,將於背景頁面輸出執行記錄"},"delete":{"message":"刪除"},"delete_confirm":{"message":"您確定要刪除這些規則嗎?"},"description":{"message":"管理瀏覽器要求"},"disable":{"message":"停用"},"display_common_header":{"message":"編輯時顯示常用標頭"},"display_common_header_help":{"message":"在編輯規則時,顯示常用的要求標頭和回應標頭"},"download":{"message":"下載"},"download_rule":{"message":"下載規則"},"edit":{"message":"編輯"},"enable":{"message":"啟用"},"enable_he":{"message":"啟用 Header Editor"},"encoding":{"message":"編碼"},"encoding_desc":{"message":"僅用於解碼"},"enter_group_name":{"message":"請輸入分組名稱"},"env_info":{"message":"環境資訊"},"excludeRule":{"message":"排除規則"},"exec_function":{"message":"自訂函數"},"exec_normal":{"message":"一般"},"exec_type":{"message":"執行類型"},"execution":{"message":"執行"},"export":{"message":"匯出"},"export_and_import":{"message":"匯出與匯入"},"extButtonTitle":{"message":"Header Editor"},"extName":{"message":"Header Editor"},"ext_version":{"message":"套件版本"},"feedback":{"message":"意見反應"},"group":{"message":"分組"},"headerName":{"message":"標頭名稱"},"headerValue":{"message":"標頭內容"},"header_empty":{"message":"標頭名稱不能為空"},"help":{"message":"說明"},"import":{"message":"匯入"},"import_drop":{"message":"不要匯入"},"import_new":{"message":"新增"},"import_override":{"message":"覆寫現有"},"import_success":{"message":"匯入成功"},"include_header_in_custom_function":{"message":"在自訂函數中包含要求標頭"},"include_header_in_custom_function_help":{"message":"向處理回應標頭的自訂函數中傳入要求標頭,開啟後可能會降低性能"},"init_rule_failed":{"message":"初始化規則失敗"},"lite_edit_tip":{"message":"精簡版不支援某些功能"},"lite_not_support":{"message":"精簡版不支援此功能"},"manage":{"message":"管理"},"manage_collapse_group":{"message":"預設摺疊分組"},"marked_as_common":{"message":"已設為常用"},"matchRule":{"message":"比對規則"},"matchType":{"message":"比對類型"},"match_all":{"message":"全部"},"match_domain":{"message":"網域"},"match_method":{"message":"要求方法"},"match_prefix":{"message":"網址首碼"},"match_regexp":{"message":"規則運算式"},"match_resourceType":{"message":"資源類型"},"match_rule_empty":{"message":"比對規則不能為空"},"match_url":{"message":"網址"},"modify_body":{"message":"修改回應本文"},"modify_body_help":{"message":"允許變更回應本文,開啟後可能會降低性能"},"more_information":{"message":"詳細資訊"},"name":{"message":"名稱"},"name_empty":{"message":"名稱不能為空"},"no_update":{"message":"沒有更新"},"ok":{"message":"確定"},"options":{"message":"選項"},"pack_up_or_unfurl":{"message":"摺疊/展開分組"},"quick_edit":{"message":"快速編輯"},"quick_edit_help":{"message":"在彈出式視窗中顯示編輯按鈕"},"redirectTo":{"message":"重新導向至"},"redirect_empty":{"message":"重新導向目標不能為空"},"rename":{"message":"重新命名"},"request_headers":{"message":"要求標頭"},"request_stage":{"message":"要求階段"},"resourceType_csp_report":{"message":"CSP 報告(在 Content-Security-Policy 標頭中設定)"},"resourceType_font":{"message":"字型"},"resourceType_image":{"message":"圖片"},"resourceType_main_frame":{"message":"主框架(在分頁中載入的網頁)"},"resourceType_media":{"message":"媒體(影片和音訊)"},"resourceType_object":{"message":"物件(透過分頁載入)"},"resourceType_other":{"message":"其他"},"resourceType_ping":{"message":"Ping(在超連結的 ping 屬性設定)"},"resourceType_script":{"message":"指令碼"},"resourceType_stylesheet":{"message":"CSS 樣式"},"resourceType_sub_frame":{"message":"子框架(在