Skip to content

Commit 9a4705d

Browse files
committed
Update distributables
1 parent f6ded38 commit 9a4705d

File tree

3 files changed

+61
-10
lines changed

3 files changed

+61
-10
lines changed

dist/index.js

+50-9
Original file line numberDiff line numberDiff line change
@@ -35742,6 +35742,7 @@ function wrappy (fn, cb) {
3574235742

3574335743
const core = __nccwpck_require__(2186)
3574435744
const github = __nccwpck_require__(5438)
35745+
const { convertErrorToAnnotationProperties } = __nccwpck_require__(1507)
3574535746

3574635747
async function enablePagesSite({ githubToken }) {
3574735748
const octokit = github.getOctokit(githubToken)
@@ -35785,20 +35786,20 @@ async function findOrCreatePagesSite({ githubToken, enablement = true }) {
3578535786
} catch (error) {
3578635787
if (!enablement) {
3578735788
core.error(
35788-
'Get Pages site failed. Please verify that the repository has Pages enabled and configured to build using GitHub Actions, or consider exploring the `enablement` parameter for this action.',
35789-
error
35789+
`Get Pages site failed. Please verify that the repository has Pages enabled and configured to build using GitHub Actions, or consider exploring the \`enablement\` parameter for this action. Error: ${error.message}`,
35790+
convertErrorToAnnotationProperties(error)
3579035791
)
3579135792
throw error
3579235793
}
35793-
core.warning('Get Pages site failed', error)
35794+
core.warning(`Get Pages site failed. Error: ${error.message}`, convertErrorToAnnotationProperties(error))
3579435795
}
3579535796

3579635797
if (!pageObject && enablement) {
3579735798
// Create a new Pages site if one doesn't exist
3579835799
try {
3579935800
pageObject = await enablePagesSite({ githubToken })
3580035801
} catch (error) {
35801-
core.error('Create Pages site failed', error)
35802+
core.error(`Create Pages site failed. Error: ${error.message}`, convertErrorToAnnotationProperties(error))
3580235803
throw error
3580335804
}
3580435805

@@ -35808,7 +35809,7 @@ async function findOrCreatePagesSite({ githubToken, enablement = true }) {
3580835809
try {
3580935810
pageObject = await getPagesSite({ githubToken })
3581035811
} catch (error) {
35811-
core.error('Get Pages site still failed', error)
35812+
core.error(`Get Pages site still failed. Error: ${error.message}`, convertErrorToAnnotationProperties(error))
3581235813
throw error
3581335814
}
3581435815
}
@@ -36295,6 +36296,37 @@ function getContext() {
3629536296
module.exports = { getContext }
3629636297

3629736298

36299+
/***/ }),
36300+
36301+
/***/ 1507:
36302+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
36303+
36304+
const ErrorStackParser = __nccwpck_require__(8057)
36305+
36306+
// Convert an Error's stack into `@actions/core` toolkit AnnotationProperties:
36307+
// https://github.com/actions/toolkit/blob/ef77c9d60bdb03700d7758b0d04b88446e72a896/packages/core/src/core.ts#L36-L71
36308+
function convertErrorToAnnotationProperties(error, title = error.name) {
36309+
if (!(error instanceof Error)) {
36310+
throw new TypeError('error must be an instance of Error')
36311+
}
36312+
36313+
const stack = ErrorStackParser.parse(error)
36314+
const firstFrame = stack && stack.length > 0 ? stack[0] : null
36315+
if (!firstFrame) {
36316+
throw new Error('Error stack is empty or unparseable')
36317+
}
36318+
36319+
return {
36320+
title,
36321+
file: firstFrame.fileName,
36322+
startLine: firstFrame.lineNumber,
36323+
startColumn: firstFrame.columnNumber
36324+
}
36325+
}
36326+
36327+
module.exports = { convertErrorToAnnotationProperties }
36328+
36329+
3629836330
/***/ }),
3629936331

3630036332
/***/ 7527:
@@ -36335,6 +36367,7 @@ module.exports = function removeTrailingSlash(str) {
3633536367
const core = __nccwpck_require__(2186)
3633636368
const { ConfigParser } = __nccwpck_require__(8395)
3633736369
const removeTrailingSlash = __nccwpck_require__(9255)
36370+
const { convertErrorToAnnotationProperties } = __nccwpck_require__(1507)
3633836371

3633936372
const SUPPORTED_FILE_EXTENSIONS = ['.js', '.cjs', '.mjs']
3634036373

@@ -36422,13 +36455,13 @@ function setPagesConfig({ staticSiteGenerator, generatorConfigFile, siteUrl }) {
3642236455
core.warning(
3642336456
`Unsupported configuration file extension. Currently supported extensions: ${SUPPORTED_FILE_EXTENSIONS.map(
3642436457
ext => JSON.stringify(ext)
36425-
).join(', ')}`,
36426-
error
36458+
).join(', ')}. Error: ${error.message}`,
36459+
convertErrorToAnnotationProperties(error)
3642736460
)
3642836461
} else {
3642936462
core.warning(
36430-
`We were unable to determine how to inject the site metadata into your config. Generated URLs may be incorrect. The base URL for this site should be ${siteUrl}. Please ensure your framework is configured to generate relative links appropriately.`,
36431-
error
36463+
`We were unable to determine how to inject the site metadata into your config. Generated URLs may be incorrect. The base URL for this site should be ${siteUrl}. Please ensure your framework is configured to generate relative links appropriately. Error: ${error.message}`,
36464+
convertErrorToAnnotationProperties(error)
3643236465
)
3643336466
}
3643436467
}
@@ -36437,6 +36470,14 @@ function setPagesConfig({ staticSiteGenerator, generatorConfigFile, siteUrl }) {
3643736470
module.exports = { getConfigParserSettings, setPagesConfig }
3643836471

3643936472

36473+
/***/ }),
36474+
36475+
/***/ 8057:
36476+
/***/ ((module) => {
36477+
36478+
module.exports = eval("require")("error-stack-parser");
36479+
36480+
3644036481
/***/ }),
3644136482

3644236483
/***/ 9491:

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/licenses.txt

+10
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
241241
THE SOFTWARE.
242242

243243

244+
@vercel/ncc
245+
MIT
246+
Copyright 2018 ZEIT, Inc.
247+
248+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
249+
250+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
251+
252+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
253+
244254
acorn
245255
MIT
246256
MIT License

0 commit comments

Comments
 (0)