From 6423d941aeee15c0027305aae54a31953a3f5292 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sat, 18 Apr 2026 17:19:34 +0900 Subject: [PATCH 1/2] Add missing semicolon to NullProtoObjectViaSc64bit Terminate the function expression assigned to NullProtoObjectViaSc64bit with a semicolon (replace `}` with `};`) in app/assets/js/core-js-3.49.0.wsh.js. This ensures the statement is properly closed and prevents potential parsing/concatenation issues with following code. --- app/assets/js/core-js-3.49.0.wsh.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/js/core-js-3.49.0.wsh.js b/app/assets/js/core-js-3.49.0.wsh.js index e715ac3..3c39c22 100644 --- a/app/assets/js/core-js-3.49.0.wsh.js +++ b/app/assets/js/core-js-3.49.0.wsh.js @@ -2425,7 +2425,7 @@ var NullProtoObjectViaSc64bit = function () { return {}; }; } -} +}; // Create object with fake `null` prototype: use iframe Object with cleared prototype var NullProtoObjectViaIFrame = function () { From 1530c8bff981de17e1356a01946e2181e21c6504 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sat, 18 Apr 2026 17:28:47 +0900 Subject: [PATCH 2/2] Add iex-compatible branch parsing Remove the param block and rename DefaultBranch to $defaultBranch. Add argument parsing for iex-compatible invocations (e.g. `iex -dev main`, `iex main`, or no args) by inspecting $args and selecting the branch accordingly, then log the chosen branch. Simplify branch handling and build the GitHub ZIP download URL using the resolved branch. Small cleanup and reordering of steps to accommodate the new parsing logic. --- bootstrap.ps1 | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/bootstrap.ps1 b/bootstrap.ps1 index b24a451..17e92e7 100644 --- a/bootstrap.ps1 +++ b/bootstrap.ps1 @@ -7,15 +7,11 @@ # irm https://catswords.blob.core.windows.net/welsonjs/bootstrap.ps1 | iex # irm https://catswords.blob.core.windows.net/welsonjs/bootstrap.ps1 | iex -dev main # irm https://catswords.blob.core.windows.net/welsonjs/bootstrap.ps1 | iex -dev dev +# irm https://catswords.blob.core.windows.net/welsonjs/bootstrap.ps1 | iex main # # Central default branch configuration for this install script. # Update this value if the repository's default branch changes. -$DefaultBranch = "master" - -param( - # Branch to install from; defaults to the repository's configured primary branch. - [string]$dev = $DefaultBranch -) +$defaultBranch = "master" $ErrorActionPreference = "Stop" @@ -32,6 +28,27 @@ function Write-Err($msg) { } try { + # Step 0: Parse arguments (iex-compatible) + # Supports: + # iex -dev main + # iex main + # iex + $branch = $defaultBranch + + for ($i = 0; $i -lt $args.Count; $i++) { + $arg = $args[$i] + + if ($arg -eq "-dev" -and ($i + 1) -lt $args.Count) { + $branch = $args[$i + 1] + break + } + elseif ($arg -notmatch "^-") { + $branch = $arg + } + } + + Write-Step "Using branch: $branch" + # Step 1: Create a temporary working directory using a UUID Write-Step "Creating temporary workspace..." @@ -45,12 +62,7 @@ try { $repo = "gnh1201/welsonjs" $zipPath = Join-Path $tempDir "package.zip" - # Step 2: Determine branch (default: master) - $branch = $dev - - Write-Step "Using branch: $branch" - - # GitHub branch ZIP URL + # Step 2: Build download URL $downloadUrl = "https://github.com/$repo/archive/refs/heads/$branch.zip" Write-Ok "Download URL: $downloadUrl" @@ -102,4 +114,4 @@ try { catch { Write-Err $_ exit 1 -} +} \ No newline at end of file