@runeditrun/rer 0.2.102 → 0.2.103

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.
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.2.103
6
+
7
+ ### Fixes
8
+
9
+ - Preview no longer fails to start when Wrangler prints stdout banners about `.dev.vars` or experimental features. The preview runtime reads its resolved Worker configuration from a dedicated pipe instead of parsing the planner child's entire stdout as JSON.
10
+
11
+ ### Repository tooling
12
+
13
+ - Base CI's actionlint and Gitleaks installers retry failed downloads within a ten-minute retry window, cap each attempt at 60 seconds, and report the last HTTP status and curl exit code on failure. Pinned versions and checksum verification are unchanged. These repository-only scripts are not shipped in the rer package.
14
+
5
15
  ## 0.2.102
6
16
 
7
17
  ### Fixes
@@ -1,8 +1,10 @@
1
+ import {createWriteStream} from 'node:fs';
1
2
  import {productionPlan,serializePlan} from './production-options.mjs';
2
3
 
3
4
  // Short-lived: resolves the Worker's Miniflare options with Wrangler and writes
4
- // them as JSON to stdout, a pipe only the starting runtime reads. The plan holds
5
+ // them as JSON to fd 3, a pipe only the starting runtime reads. The plan holds
5
6
  // private settings, so it is never written to a file or an argument.
6
7
  if(process.env.RER_ORIGIN_KEY && !/^[A-Z][A-Z0-9_]*$/.test(process.env.RER_ORIGIN_KEY))throw Error('Invalid local origin setting name');
7
8
  const plan=await productionPlan(process.cwd(),process.env.RER_DEV_ORIGIN,Number(process.env.RER_RUNTIME_PORT),process.env.RER_RUNTIME_HOST);
8
- await new Promise((done,fail)=>process.stdout.write(serializePlan(plan),error=>error?fail(error):done()));
9
+ const output=createWriteStream(null,{fd:3});
10
+ await new Promise((done,fail)=>{output.once('error',fail);output.end(serializePlan(plan),done);});
@@ -13,12 +13,12 @@ const stop=()=>stopping??=(async()=>{planner?.kill('SIGTERM');await closeAssets?
13
13
  process.on('SIGINT',()=>void stop());process.on('SIGTERM',()=>void stop());
14
14
  async function plan(){
15
15
  let text='';
16
- planner=spawn(process.execPath,[fileURLToPath(new URL('./production-plan.mjs',import.meta.url))],{cwd:process.cwd(),env:process.env,stdio:['ignore','pipe','inherit']});
17
- planner.stdout.setEncoding('utf8').on('data',chunk=>{text+=chunk;});
16
+ planner=spawn(process.execPath,[fileURLToPath(new URL('./production-plan.mjs',import.meta.url))],{cwd:process.cwd(),env:process.env,stdio:['ignore',2,'inherit','pipe']});
17
+ planner.stdio[3].setEncoding('utf8').on('data',chunk=>{text+=chunk;});
18
18
  const code=await new Promise((done,fail)=>{planner.once('error',fail);planner.once('close',done);});
19
19
  if(stopping)return undefined;
20
20
  if(code!==0)throw Error('Resolving the Worker configuration failed.');
21
- return JSON.parse(text);
21
+ try{return JSON.parse(text);}catch{throw Error('Resolving the Worker configuration failed.');}
22
22
  }
23
23
  try{
24
24
  const options=await plan();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runeditrun/rer",
3
- "version": "0.2.102",
3
+ "version": "0.2.103",
4
4
  "description": "The rer command: install, set up, run and launch Run Edit Run checkouts.",
5
5
  "license": "MIT",
6
6
  "type": "module",