77
88
99
10- var _chunkOLZEGNJMjs = require ( './chunk-OLZEGNJM .js' ) ;
10+ var _chunk1js = require ( './chunk1 .js' ) ;
1111
1212// src/main.ts
13- var core2 = _chunkOLZEGNJMjs . __toESM . call ( void 0 , _chunkOLZEGNJMjs . require_core . call ( void 0 , ) ) ;
13+ var core2 = _chunk1js . __toESM . call ( void 0 , _chunk1js . require_core . call ( void 0 , ) ) ;
1414
1515// src/registry_url.ts
16- var core = _chunkOLZEGNJMjs . __toESM . call ( void 0 , _chunkOLZEGNJMjs . require_core . call ( void 0 , ) ) ;
16+ var core = _chunk1js . __toESM . call ( void 0 , _chunk1js . require_core . call ( void 0 , ) ) ;
1717function getAudienceFromUrl ( url ) {
1818 const audience = url . replace ( / ^ h t t p s ? : \/ \/ / , "" ) ;
1919 if ( audience . startsWith ( "http://" ) || audience . startsWith ( "https://" ) ) {
@@ -32,16 +32,16 @@ function getRegistryUrl() {
3232}
3333
3434// src/main.ts
35- _chunkOLZEGNJMjs . runAction . call ( void 0 , run ) ;
35+ _chunk1js . runAction . call ( void 0 , run ) ;
3636async function run ( ) {
3737 checkPermissions ( ) ;
3838 const registryUrl = getRegistryUrl ( ) ;
3939 const audience = getAudienceFromUrl ( registryUrl ) ;
4040 const jwtToken = await getJwtToken ( audience ) ;
4141 const token = await requestTrustedPublishingToken ( registryUrl , jwtToken ) ;
4242 setTokenOutput ( token ) ;
43- core2 . saveState ( _chunkOLZEGNJMjs . TOKEN_KEY , token ) ;
44- core2 . saveState ( _chunkOLZEGNJMjs . REGISTRY_URL_KEY , registryUrl ) ;
43+ core2 . saveState ( _chunk1js . TOKEN_KEY , token ) ;
44+ core2 . saveState ( _chunk1js . REGISTRY_URL_KEY , registryUrl ) ;
4545}
4646function checkPermissions ( ) {
4747 if ( process . env . ACTIONS_ID_TOKEN_REQUEST_URL === void 0 || ! process . env . ACTIONS_ID_TOKEN_REQUEST_URL ) {
@@ -60,8 +60,8 @@ async function getJwtToken(audience) {
6060 return jwtToken ;
6161}
6262async function requestTrustedPublishingToken ( registryUrl , jwtToken ) {
63- const tokenUrl = _chunkOLZEGNJMjs . getTokensEndpoint . call ( void 0 , registryUrl ) ;
64- const userAgent = _chunkOLZEGNJMjs . getUserAgent . call ( void 0 , ) ;
63+ const tokenUrl = _chunk1js . getTokensEndpoint . call ( void 0 , registryUrl ) ;
64+ const userAgent = _chunk1js . getUserAgent . call ( void 0 , ) ;
6565 core2 . info (
6666 `Requesting token from: ${ tokenUrl } . User agent: ${ userAgent [ "User-Agent" ] } `
6767 ) ;
@@ -75,14 +75,14 @@ async function requestTrustedPublishingToken(registryUrl, jwtToken) {
7575 body : JSON . stringify ( { jwt : jwtToken } )
7676 } ) ;
7777 if ( ! response . ok ) {
78- await _chunkOLZEGNJMjs . throwHttpErrorMessage . call ( void 0 ,
78+ await _chunk1js . throwHttpErrorMessage . call ( void 0 ,
7979 "Failed to retrieve token from Cargo registry" ,
8080 response
8181 ) ;
8282 }
8383 const tokenResponse = await response . json ( ) ;
8484 if ( ! tokenResponse . token ) {
85- await _chunkOLZEGNJMjs . throwHttpErrorMessage . call ( void 0 ,
85+ await _chunk1js . throwHttpErrorMessage . call ( void 0 ,
8686 "Failed to retrieve token from the Cargo registry response body" ,
8787 response
8888 ) ;
@@ -92,7 +92,7 @@ async function requestTrustedPublishingToken(registryUrl, jwtToken) {
9292}
9393function setTokenOutput ( token ) {
9494 core2 . setSecret ( token ) ;
95- core2 . setOutput ( _chunkOLZEGNJMjs . TOKEN_KEY , token ) ;
95+ core2 . setOutput ( _chunk1js . TOKEN_KEY , token ) ;
9696}
9797
9898
0 commit comments