chore(workflows): adding pr-check.yaml to validate dist folder (#213)

* chore(workflows): adding pr-check.yaml to validate dist/index.js

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

* fix: update dist/index.js

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

---------

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
This commit is contained in:
axel7083 authored and GitHub committed 2026-03-19 14:52:48 +01:00
1 parent fc06bc1257
commit 2e223e0f0d
2 files changed
+29 -1

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
name: pr-check
on: [ pull_request ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
check-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
run_install: true
version: 9
- name: Update dist/index.js
run: pnpm run build
- name: Check for uncommitted changes in dist
run: git diff --exit-code dist/index.js
+1 -1
View File
@@ -1,4 +1,4 @@
(()=>{var __webpack_modules__={64928:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.restoreCache=restoreCache;const i=n(18715);const o=n(59999);const d=n(93573);async function restoreCache(e){if(!e.cache)return;if(!(0,i.isFeatureAvailable)()){(0,o.warning)("Cache is not available, skipping cache restoration");return}(0,o.startGroup)("Restoring cache...");await(0,d.runRestoreCache)(e);(0,o.endGroup)()}t["default"]=restoreCache},93573:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.runRestoreCache=runRestoreCache;const o=n(18715);const d=n(59999);const p=n(58872);const f=n(8505);const y=i(n(70857));async function runRestoreCache(e){const t=await getCacheDirectory();(0,d.saveState)("cache_path",t);const n=await(0,f.hashFiles)(e.cacheDependencyPath);if(!n){throw new Error("Some specified paths were not resolved, unable to cache dependencies.")}const i=`pnpm-cache-${process.env.RUNNER_OS}-${y.default.arch()}-${n}`;(0,d.debug)(`Primary key is ${i}`);(0,d.saveState)("cache_primary_key",i);let p=await(0,o.restoreCache)([t],i);(0,d.setOutput)("cache-hit",Boolean(p));if(!p){(0,d.info)(`Cache is not found`);return}(0,d.saveState)("cache_restored_key",p);(0,d.info)(`Cache restored from key: ${p}`)}async function getCacheDirectory(){const{stdout:e}=await(0,p.getExecOutput)("pnpm store path --silent");const t=e.trim();(0,d.debug)(`Cache folder is set to "${t}"`);return t}},26171:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.saveCache=saveCache;const i=n(59999);const o=n(98086);async function saveCache(e){if(!e.cache)return;try{await(0,o.runSaveCache)()}catch(e){(0,i.setFailed)(e.message)}}t["default"]=saveCache},98086:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runSaveCache=runSaveCache;const i=n(18715);const o=n(59999);async function runSaveCache(){const e=(0,o.getState)("cache_restored_key");const t=(0,o.getState)("cache_primary_key");const n=(0,o.getState)("cache_path");if(t===e){(0,o.info)(`Cache hit occurred on the primary key ${t}, not saving cache.`);return}const d=await(0,i.saveCache)([n],t);if(d==-1)return;(0,o.info)(`Cache saved with the key: ${t}`)}},21046:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const o=n(59999);const d=i(n(64928));const p=i(n(26171));const f=i(n(66414));const y=i(n(13144));const v=i(n(9596));const D=i(n(4728));const M=i(n(96879));async function main(){const e=(0,f.default)();if((0,o.getState)("is_post")==="true"){await runPost(e)}else{await runMain(e)}}async function runMain(e){(0,o.saveState)("is_post","true");await(0,y.default)(e);console.log("Installation Completed!");(0,v.default)(e);await(0,d.default)(e);(0,D.default)(e)}async function runPost(e){(0,M.default)(e);await(0,p.default)(e)}main().catch((e=>{console.error(e);(0,o.setFailed)(e)}))},66414:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const o=n(59999);const d=i(n(66746));const p=n(9065);const f={required:true};const parseInputPath=e=>(0,d.default)((0,o.getInput)(e,f));const getInputs=()=>({version:(0,o.getInput)("version"),dest:parseInputPath("dest"),cache:(0,o.getBooleanInput)("cache"),cacheDependencyPath:parseInputPath("cache_dependency_path"),runInstall:(0,p.parseRunInstall)("run_install"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,o.getBooleanInput)("standalone")});t.getInputs=getInputs;t["default"]=t.getInputs},9065:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){if(i===undefined)i=n;var o=Object.getOwnPropertyDescriptor(t,n);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable)){o={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,i,o)}:function(e,t,n,i){if(i===undefined)i=n;e[i]=t[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var d=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))t[t.length]=n;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=ownKeys(e),d=0;d<n.length;d++)if(n[d]!=="default")i(t,e,n[d]);o(t,e);return t}}();Object.defineProperty(t,"__esModule",{value:true});t.parseRunInstall=parseRunInstall;const p=n(59999);const f=d(n(87669));const y=n(66516);const v=y.z.object({recursive:y.z.boolean().optional(),cwd:y.z.string().optional(),args:y.z.array(y.z.string()).optional()});const D=y.z.union([y.z.null(),y.z.boolean(),v,y.z.array(v)]);function parseRunInstall(e){cLine truncated
(()=>{var __webpack_modules__={64928:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.restoreCache=restoreCache;const i=n(18715);const o=n(59999);const d=n(93573);async function restoreCache(e){if(!e.cache)return;if(!(0,i.isFeatureAvailable)()){(0,o.warning)("Cache is not available, skipping cache restoration");return}(0,o.startGroup)("Restoring cache...");await(0,d.runRestoreCache)(e);(0,o.endGroup)()}t["default"]=restoreCache},93573:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.runRestoreCache=runRestoreCache;const o=n(18715);const d=n(59999);const p=n(58872);const f=n(8505);const y=i(n(70857));async function runRestoreCache(e){const t=await getCacheDirectory();(0,d.saveState)("cache_path",t);const n=await(0,f.hashFiles)(e.cacheDependencyPath);if(!n){throw new Error("Some specified paths were not resolved, unable to cache dependencies.")}const i=`pnpm-cache-${process.env.RUNNER_OS}-${y.default.arch()}-${n}`;(0,d.debug)(`Primary key is ${i}`);(0,d.saveState)("cache_primary_key",i);let p=await(0,o.restoreCache)([t],i);(0,d.setOutput)("cache-hit",Boolean(p));if(!p){(0,d.info)(`Cache is not found`);return}(0,d.saveState)("cache_restored_key",p);(0,d.info)(`Cache restored from key: ${p}`)}async function getCacheDirectory(){const{stdout:e}=await(0,p.getExecOutput)("pnpm store path --silent");const t=e.trim();(0,d.debug)(`Cache folder is set to "${t}"`);return t}},26171:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.saveCache=saveCache;const i=n(59999);const o=n(98086);async function saveCache(e){if(!e.cache)return;try{await(0,o.runSaveCache)()}catch(e){(0,i.setFailed)(e.message)}}t["default"]=saveCache},98086:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runSaveCache=runSaveCache;const i=n(18715);const o=n(59999);async function runSaveCache(){const e=(0,o.getState)("cache_restored_key");const t=(0,o.getState)("cache_primary_key");const n=(0,o.getState)("cache_path");if(t===e){(0,o.info)(`Cache hit occurred on the primary key ${t}, not saving cache.`);return}const d=await(0,i.saveCache)([n],t);if(d==-1)return;(0,o.info)(`Cache saved with the key: ${t}`)}},21046:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const o=n(59999);const d=i(n(64928));const p=i(n(26171));const f=i(n(66414));const y=i(n(13144));const v=i(n(9596));const D=i(n(4728));const M=i(n(96879));async function main(){const e=(0,f.default)();if((0,o.getState)("is_post")==="true"){await runPost(e)}else{await runMain(e)}}async function runMain(e){(0,o.saveState)("is_post","true");await(0,y.default)(e);console.log("Installation Completed!");(0,v.default)(e);await(0,d.default)(e);(0,D.default)(e)}async function runPost(e){(0,M.default)(e);await(0,p.default)(e)}main().catch((e=>{console.error(e);(0,o.setFailed)(e)}))},66414:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const o=n(59999);const d=i(n(66746));const p=n(9065);const f={required:true};const parseInputPath=e=>(0,d.default)((0,o.getInput)(e,f));const getInputs=()=>({version:(0,o.getInput)("version"),dest:parseInputPath("dest"),cache:(0,o.getBooleanInput)("cache"),cacheDependencyPath:parseInputPath("cache_dependency_path"),runInstall:(0,p.parseRunInstall)("run_install"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,o.getBooleanInput)("standalone")});t.getInputs=getInputs;t["default"]=t.getInputs},9065:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.parseRunInstall=parseRunInstall;const i=n(59999);const o=n(87669);const d=n(66516);const p=d.z.object({recursive:d.z.boolean().optional(),cwd:d.z.string().optional(),args:d.z.array(d.z.string()).optional()});const f=d.z.union([d.z.null(),d.z.boolean(),p,d.z.array(p)]);function parseRunInstall(e){const t=(0,i.getInput)(e,{required:true});const n=(0,o.parse)(t);try{const e=f.parse(n);if(!e)return[];if(e===true)return[{recursive:true}];if(Array.isArray(e))return e;return[e]}catch(n){(0,i.error)(`Error for input "${e}" = ${t}`);if(n instanceof d.ZodError){(0,i.error)(`Errors: ${n.errors}`)}else{(0,i.error)(`Exception: ${n}`)}process.exit(1)}}},13144:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.runSelfInstaller=void 0;t.install=install;const o=n(59999);const d=i(n(77053));t.runSelfInstaller=d.default;async function install(e){(0,o.startGroup)("Running self-installer...");const t=await(0,d.default)(e);(0,o.endGroup)();if(t){return(0,o.setFailed)(`Something went wrong, self-installer exits with code ${t}`)}}t["default"]=install},77053:functioLine truncated
/*!
* expand-tilde <https://github.com/jonschlinkert/expand-tilde>
*