Skip to content

Commit

Permalink
Update distributables
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMGreene committed Mar 28, 2024
1 parent f6ded38 commit 9a4705d
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 10 deletions.
59 changes: 50 additions & 9 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35742,6 +35742,7 @@ function wrappy (fn, cb) {

const core = __nccwpck_require__(2186)
const github = __nccwpck_require__(5438)
const { convertErrorToAnnotationProperties } = __nccwpck_require__(1507)

async function enablePagesSite({ githubToken }) {
const octokit = github.getOctokit(githubToken)
Expand Down Expand Up @@ -35785,20 +35786,20 @@ async function findOrCreatePagesSite({ githubToken, enablement = true }) {
} catch (error) {
if (!enablement) {
core.error(
'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
`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}`,
convertErrorToAnnotationProperties(error)
)
throw error
}
core.warning('Get Pages site failed', error)
core.warning(`Get Pages site failed. Error: ${error.message}`, convertErrorToAnnotationProperties(error))
}

if (!pageObject && enablement) {
// Create a new Pages site if one doesn't exist
try {
pageObject = await enablePagesSite({ githubToken })
} catch (error) {
core.error('Create Pages site failed', error)
core.error(`Create Pages site failed. Error: ${error.message}`, convertErrorToAnnotationProperties(error))
throw error
}

Expand All @@ -35808,7 +35809,7 @@ async function findOrCreatePagesSite({ githubToken, enablement = true }) {
try {
pageObject = await getPagesSite({ githubToken })
} catch (error) {
core.error('Get Pages site still failed', error)
core.error(`Get Pages site still failed. Error: ${error.message}`, convertErrorToAnnotationProperties(error))
throw error
}
}
Expand Down Expand Up @@ -36295,6 +36296,37 @@ function getContext() {
module.exports = { getContext }


/***/ }),

/***/ 1507:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {

const ErrorStackParser = __nccwpck_require__(8057)

// Convert an Error's stack into `@actions/core` toolkit AnnotationProperties:
// https://github.com/actions/toolkit/blob/ef77c9d60bdb03700d7758b0d04b88446e72a896/packages/core/src/core.ts#L36-L71
function convertErrorToAnnotationProperties(error, title = error.name) {
if (!(error instanceof Error)) {
throw new TypeError('error must be an instance of Error')
}

const stack = ErrorStackParser.parse(error)
const firstFrame = stack && stack.length > 0 ? stack[0] : null
if (!firstFrame) {
throw new Error('Error stack is empty or unparseable')
}

return {
title,
file: firstFrame.fileName,
startLine: firstFrame.lineNumber,
startColumn: firstFrame.columnNumber
}
}

module.exports = { convertErrorToAnnotationProperties }


/***/ }),

/***/ 7527:
Expand Down Expand Up @@ -36335,6 +36367,7 @@ module.exports = function removeTrailingSlash(str) {
const core = __nccwpck_require__(2186)
const { ConfigParser } = __nccwpck_require__(8395)
const removeTrailingSlash = __nccwpck_require__(9255)
const { convertErrorToAnnotationProperties } = __nccwpck_require__(1507)

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

Expand Down Expand Up @@ -36422,13 +36455,13 @@ function setPagesConfig({ staticSiteGenerator, generatorConfigFile, siteUrl }) {
core.warning(
`Unsupported configuration file extension. Currently supported extensions: ${SUPPORTED_FILE_EXTENSIONS.map(
ext => JSON.stringify(ext)
).join(', ')}`,
error
).join(', ')}. Error: ${error.message}`,
convertErrorToAnnotationProperties(error)
)
} else {
core.warning(
`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
`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}`,
convertErrorToAnnotationProperties(error)
)
}
}
Expand All @@ -36437,6 +36470,14 @@ function setPagesConfig({ staticSiteGenerator, generatorConfigFile, siteUrl }) {
module.exports = { getConfigParserSettings, setPagesConfig }


/***/ }),

/***/ 8057:
/***/ ((module) => {

module.exports = eval("require")("error-stack-parser");


/***/ }),

/***/ 9491:
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions dist/licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


@vercel/ncc
MIT
Copyright 2018 ZEIT, Inc.

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:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.

acorn
MIT
MIT License
Expand Down

0 comments on commit 9a4705d

Please sign in to comment.