mirror of
https://github.com/actions/configure-pages.git
synced 2026-02-09 03:45:14 +00:00
Update distributables
This commit is contained in:
10
dist/index.js
vendored
10
dist/index.js
vendored
@@ -15757,6 +15757,8 @@ const core = __nccwpck_require__(2186)
|
|||||||
const { ConfigParser } = __nccwpck_require__(8395)
|
const { ConfigParser } = __nccwpck_require__(8395)
|
||||||
const removeTrailingSlash = __nccwpck_require__(9255)
|
const removeTrailingSlash = __nccwpck_require__(9255)
|
||||||
|
|
||||||
|
const SUPPORTED_FILE_EXTENSIONS = ['.js', '.cjs', '.mjs']
|
||||||
|
|
||||||
// Return the settings to be passed to a {ConfigParser} for a given static site generator,
|
// Return the settings to be passed to a {ConfigParser} for a given static site generator,
|
||||||
// optional configuration file path, and a Pages siteUrl value to inject
|
// optional configuration file path, and a Pages siteUrl value to inject
|
||||||
function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, siteUrl }) {
|
function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, siteUrl }) {
|
||||||
@@ -15831,12 +15833,14 @@ function setPagesConfig({ staticSiteGenerator, generatorConfigFile, siteUrl }) {
|
|||||||
const settings = getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, siteUrl })
|
const settings = getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, siteUrl })
|
||||||
new ConfigParser(settings).injectAll()
|
new ConfigParser(settings).injectAll()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const supportedFileExtension = ['.js', '.cjs', '.mjs'].some(extension => generatorConfigFile.endsWith(extension))
|
const isSupportedFileExtension = SUPPORTED_FILE_EXTENSIONS.some(ext => generatorConfigFile.endsWith(ext))
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
if (!supportedFileExtension) {
|
if (!isSupportedFileExtension) {
|
||||||
core.warning(
|
core.warning(
|
||||||
`We were unable to determine how to inject the site metadata into your config. Currently we only support ".js", ".cjs" and ".mjs".`,
|
`Unsupported configuration file extension. Currently supported extensions: ${SUPPORTED_FILE_EXTENSIONS.map(
|
||||||
|
ext => JSON.stringify(ext)
|
||||||
|
).join(', ')}`,
|
||||||
error
|
error
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user