File tree Expand file tree Collapse file tree 4 files changed +29
-1
lines changed
Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @walkeros/cli ' : patch
3+ ---
4+
5+ Fix URL handling in resolveAsset - URLs are now passed through unchanged instead
6+ of being mangled into invalid filesystem paths
Original file line number Diff line number Diff line change 9494 exit $EXIT_CODE
9595 fi
9696 # Extract published packages for PR comment
97- PUBLISHED=$(echo "$OUTPUT" | grep -E "^@walkeros/|^walkeros" | head -20 || true)
97+ PUBLISHED=$(echo "$OUTPUT" | grep -E "^@walkeros/|^walkeros" | head -20 | sed 's/^/- /' | | true)
9898 echo "published<<EOF" >> $GITHUB_OUTPUT
9999 echo "$PUBLISHED" >> $GITHUB_OUTPUT
100100 echo "EOF" >> $GITHUB_OUTPUT
@@ -204,6 +204,7 @@ jobs:
204204
205205 BODY="$EMOJI **$TITLE**
206206
207+ **Packages**
207208 ${{ steps.publish.outputs.published }}
208209
209210 Install: \`npm i @walkeros/core$INSTALL_TAG\`$DOCKER_SECTION"
Original file line number Diff line number Diff line change 1+ import { resolveAsset } from '../../core/asset-resolver.js' ;
2+
3+ describe ( 'resolveAsset' , ( ) => {
4+ describe ( 'URL handling' , ( ) => {
5+ it ( 'should preserve HTTPS URLs as-is' , ( ) => {
6+ const url = 'https://www.walkeros.io/flows/gcp-bigquery.json' ;
7+ expect ( resolveAsset ( url , 'config' ) ) . toBe ( url ) ;
8+ } ) ;
9+
10+ it ( 'should preserve HTTP URLs as-is' , ( ) => {
11+ const url = 'http://example.com/config.json' ;
12+ expect ( resolveAsset ( url , 'config' ) ) . toBe ( url ) ;
13+ } ) ;
14+ } ) ;
15+ } ) ;
Original file line number Diff line number Diff line change 88import { fileURLToPath } from 'url' ;
99import { existsSync } from 'fs' ;
1010import path from 'path' ;
11+ import { isUrl } from '../config/utils.js' ;
1112
1213/**
1314 * Cached asset directory to avoid repeated filesystem checks
@@ -65,6 +66,11 @@ export function resolveAsset(
6566 assetType : AssetType ,
6667 baseDir ?: string ,
6768) : string {
69+ // URL → pass through unchanged
70+ if ( isUrl ( assetPath ) ) {
71+ return assetPath ;
72+ }
73+
6874 // Bare name → package asset (examples directory)
6975 if ( ! assetPath . includes ( '/' ) && ! assetPath . includes ( '\\' ) ) {
7076 const assetDir = getAssetDir ( ) ;
You can’t perform that action at this time.
0 commit comments