mirror of
https://github.com/actions/configure-pages.git
synced 2025-12-08 08:06:09 +00:00
Apply consistent spacing and use of single quotes
This commit is contained in:
18
dist/index.js
vendored
18
dist/index.js
vendored
@@ -15438,7 +15438,7 @@ class ConfigParser {
|
||||
throw 'Could not find a configuration object in the configuration file'
|
||||
}
|
||||
|
||||
// A property may be nested in the configuration file. Split the property name with `.`
|
||||
// A property may be nested in the configuration file. Split the property name with '.'
|
||||
// then walk the configuration object one property at a time.
|
||||
var depth = 0
|
||||
const properties = propertyName.split('.')
|
||||
@@ -15519,7 +15519,7 @@ class ConfigParser {
|
||||
}
|
||||
|
||||
// Logging
|
||||
core.info(`Injection successful, new configuration:`)
|
||||
core.info('Injection successful, new configuration:')
|
||||
core.info(this.configuration)
|
||||
|
||||
// Finally write the new configuration in the file
|
||||
@@ -15609,7 +15609,7 @@ const removeTrailingSlash = __nccwpck_require__(9255)
|
||||
// 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
|
||||
function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, siteUrl }) {
|
||||
let { pathname, origin } = siteUrl
|
||||
let { pathname: path, origin } = siteUrl
|
||||
|
||||
switch (staticSiteGenerator) {
|
||||
case 'nuxt':
|
||||
@@ -15618,7 +15618,7 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, sit
|
||||
blankConfigurationFile: __nccwpck_require__.ab + "nuxt.js",
|
||||
properties: {
|
||||
// Configure a base path on the router
|
||||
'router.base': pathname,
|
||||
'router.base': path,
|
||||
|
||||
// Set the target to static too
|
||||
// https://nuxtjs.org/docs/configuration-glossary/configuration-target/
|
||||
@@ -15627,14 +15627,14 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, sit
|
||||
}
|
||||
case 'next':
|
||||
// Next does not want a trailing slash
|
||||
pathname = removeTrailingSlash(pathname)
|
||||
path = removeTrailingSlash(path)
|
||||
|
||||
return {
|
||||
configurationFile: generatorConfigFile || './next.config.js',
|
||||
blankConfigurationFile: __nccwpck_require__.ab + "next.js",
|
||||
properties: {
|
||||
// Configure a base path
|
||||
basePath: pathname,
|
||||
basePath: path,
|
||||
|
||||
// Disable server side image optimization too
|
||||
// https://nextjs.org/docs/api-reference/next/image#unoptimized
|
||||
@@ -15647,21 +15647,21 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, sit
|
||||
blankConfigurationFile: __nccwpck_require__.ab + "gatsby.js",
|
||||
properties: {
|
||||
// Configure a path prefix
|
||||
pathPrefix: pathname,
|
||||
pathPrefix: path,
|
||||
// Configure a site url
|
||||
'siteMetadata.siteUrl': origin
|
||||
}
|
||||
}
|
||||
case 'sveltekit':
|
||||
// SvelteKit does not want a trailing slash
|
||||
pathname = removeTrailingSlash(pathname)
|
||||
path = removeTrailingSlash(path)
|
||||
|
||||
return {
|
||||
configurationFile: generatorConfigFile || './svelte.config.js',
|
||||
blankConfigurationFile: __nccwpck_require__.ab + "sveltekit.js",
|
||||
properties: {
|
||||
// Configure a base path
|
||||
'kit.paths.base': pathname,
|
||||
'kit.paths.base': path,
|
||||
// Configure a prerender origin
|
||||
'kit.prerender.origin': origin
|
||||
}
|
||||
|
||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -184,7 +184,7 @@ class ConfigParser {
|
||||
throw 'Could not find a configuration object in the configuration file'
|
||||
}
|
||||
|
||||
// A property may be nested in the configuration file. Split the property name with `.`
|
||||
// A property may be nested in the configuration file. Split the property name with '.'
|
||||
// then walk the configuration object one property at a time.
|
||||
var depth = 0
|
||||
const properties = propertyName.split('.')
|
||||
@@ -265,7 +265,7 @@ class ConfigParser {
|
||||
}
|
||||
|
||||
// Logging
|
||||
core.info(`Injection successful, new configuration:`)
|
||||
core.info('Injection successful, new configuration:')
|
||||
core.info(this.configuration)
|
||||
|
||||
// Finally write the new configuration in the file
|
||||
|
||||
@@ -14,79 +14,79 @@ const cases = [
|
||||
//
|
||||
{
|
||||
property: 'property',
|
||||
source: `export default {}`,
|
||||
expected: `export default { property: "value" }`
|
||||
source: 'export default {}',
|
||||
expected: 'export default { property: "value" }'
|
||||
},
|
||||
{
|
||||
property: 'property',
|
||||
source: `export default { property: 0 }`, // property exists and is a number
|
||||
expected: `export default { property: "value" }`
|
||||
source: 'export default { property: 0 }', // property exists and is a number
|
||||
expected: 'export default { property: "value" }'
|
||||
},
|
||||
{
|
||||
property: 'property',
|
||||
source: `export default { property: false }`, // property exists and is a boolean
|
||||
expected: `export default { property: "value" }`
|
||||
source: 'export default { property: false }', // property exists and is a boolean
|
||||
expected: 'export default { property: "value" }'
|
||||
},
|
||||
{
|
||||
property: 'property',
|
||||
source: `export default { property: "test" }`, // property exists and is a string
|
||||
expected: `export default { property: "value" }`
|
||||
source: 'export default { property: "test" }', // property exists and is a string
|
||||
expected: 'export default { property: "value" }'
|
||||
},
|
||||
{
|
||||
property: 'property',
|
||||
source: `export default { property: [1,2] }`, // property exists and is an array
|
||||
expected: `export default { property: "value" }`
|
||||
source: 'export default { property: [1,2] }', // property exists and is an array
|
||||
expected: 'export default { property: "value" }'
|
||||
},
|
||||
{
|
||||
property: 'property',
|
||||
source: `export default { property: null }`, // property exists and is null
|
||||
expected: `export default { property: "value" }`
|
||||
source: 'export default { property: null }', // property exists and is null
|
||||
expected: 'export default { property: "value" }'
|
||||
},
|
||||
{
|
||||
property: 'property',
|
||||
source: `export default { property: {}}`, // property exists and is an object
|
||||
expected: `export default { property: "value" }`
|
||||
source: 'export default { property: { } }', // property exists and is an object
|
||||
expected: 'export default { property: "value" }'
|
||||
},
|
||||
|
||||
// Deep properties (injection 1)
|
||||
{
|
||||
property: 'property.b.c',
|
||||
source: `export default {}`,
|
||||
expected: `export default { property: { b: { c: "value" }}}`
|
||||
source: 'export default {}',
|
||||
expected: 'export default { property: { b: { c: "value" } } }'
|
||||
},
|
||||
{
|
||||
property: 'property.b.c',
|
||||
source: `export default { property: 0 }`, // property exists and is a number
|
||||
expected: `export default { property: { b: { c: "value" }}}`
|
||||
source: 'export default { property: 0 }', // property exists and is a number
|
||||
expected: 'export default { property: { b: { c: "value" } } }'
|
||||
},
|
||||
{
|
||||
property: 'property.b.c',
|
||||
source: `export default { property: {}}`, // property exists and is an object
|
||||
expected: `export default { property: { b: { c: "value" }}}`
|
||||
source: 'export default { property: { } }', // property exists and is an object
|
||||
expected: 'export default { property: { b: { c: "value" } } }'
|
||||
},
|
||||
|
||||
// Deep properties (injection 2)
|
||||
{
|
||||
property: 'property.b.c',
|
||||
source: `export default { property: { b: 0 }}`, // property exists and is a number
|
||||
expected: `export default { property: { b: { c: "value" }}}`
|
||||
source: 'export default { property: { b: 0 } }', // property exists and is a number
|
||||
expected: 'export default { property: { b: { c: "value" } } }'
|
||||
},
|
||||
{
|
||||
property: 'property.b.c',
|
||||
source: `export default { property: { b: {}}}`, // property exists and is an object
|
||||
expected: `export default { property: { b: { c: "value" }}}`
|
||||
source: 'export default { property: { b: { } } }', // property exists and is an object
|
||||
expected: 'export default { property: { b: { c: "value" } } }'
|
||||
},
|
||||
{
|
||||
property: 'property.b.c',
|
||||
source: `export default { property: { b: { hello: 123}}}`, // property exists and is a non-empty object
|
||||
expected: `export default { property: { b: { c: "value", hello: 123 }}}`
|
||||
source: 'export default { property: { b: { hello: 123 } } }', // property exists and is a non-empty object
|
||||
expected: 'export default { property: { b: { c: "value", hello: 123 } } }'
|
||||
},
|
||||
|
||||
// Deep properties (existing properties)
|
||||
{
|
||||
property: 'a1.a2',
|
||||
source: `export default { a2: false, a1: { a3: [12]}}`, // property exists and is a non-empty object
|
||||
expected: `export default { a2: false, a1: { a2: "value", a3: [12]}}`
|
||||
source: 'export default { a2: false, a1: { a3: [12] } }', // property exists and is a non-empty object
|
||||
expected: 'export default { a2: false, a1: { a2: "value", a3: [12] } }'
|
||||
},
|
||||
|
||||
//
|
||||
@@ -94,23 +94,23 @@ const cases = [
|
||||
//
|
||||
{
|
||||
property: 'property',
|
||||
source: `const config = {}; export default config`,
|
||||
expected: `const config = { property: "value"}; export default config`
|
||||
source: 'const config = {}; export default config',
|
||||
expected: 'const config = { property: "value"}; export default config'
|
||||
},
|
||||
{
|
||||
property: 'property',
|
||||
source: `var config = {}; export default config`,
|
||||
expected: `var config = { property: "value"}; export default config`
|
||||
source: 'var config = {}; export default config',
|
||||
expected: 'var config = { property: "value"}; export default config'
|
||||
},
|
||||
{
|
||||
property: 'a.b.c',
|
||||
source: `var config = {}; export default config`,
|
||||
expected: `var config = { a: { b: { c: "value"}}}; export default config`
|
||||
source: 'var config = {}; export default config',
|
||||
expected: 'var config = { a: { b: { c: "value" } } }; export default config'
|
||||
},
|
||||
{
|
||||
property: 'a.b.c',
|
||||
source: `var config = { a: { b: [], c: "hello"}}; export default config`,
|
||||
expected: `var config = { a: { b: { c: "value"}, c: "hello"}}; export default config`
|
||||
source: 'var config = { a: { b: [], c: "hello" } }; export default config',
|
||||
expected: 'var config = { a: { b: { c: "value"}, c: "hello" } }; export default config'
|
||||
},
|
||||
|
||||
//
|
||||
@@ -118,18 +118,18 @@ const cases = [
|
||||
//
|
||||
{
|
||||
property: 'property',
|
||||
source: `module.exports = {}`,
|
||||
expected: `module.exports = { property: "value"}`
|
||||
source: 'module.exports = {}',
|
||||
expected: 'module.exports = { property: "value"}'
|
||||
},
|
||||
{
|
||||
property: 'property',
|
||||
source: `module.exports = { p1: 0}`,
|
||||
expected: `module.exports = { property: "value", p1: 0}`
|
||||
source: 'module.exports = { p1: 0}',
|
||||
expected: 'module.exports = { property: "value", p1: 0}'
|
||||
},
|
||||
{
|
||||
property: 'a.b.c',
|
||||
source: `module.exports = { p1: 0}`,
|
||||
expected: `module.exports = { a: { b: { c: "value" }}, p1: 0}`
|
||||
source: 'module.exports = { p1: 0}',
|
||||
expected: 'module.exports = { a: { b: { c: "value" } }, p1: 0}'
|
||||
},
|
||||
|
||||
//
|
||||
@@ -137,23 +137,23 @@ const cases = [
|
||||
//
|
||||
{
|
||||
property: 'property',
|
||||
source: `const config = {}; module.exports = config`,
|
||||
expected: `const config = { property: "value"}; module.exports = config`
|
||||
source: 'const config = {}; module.exports = config',
|
||||
expected: 'const config = { property: "value"}; module.exports = config'
|
||||
},
|
||||
{
|
||||
property: 'property',
|
||||
source: `var config = {}; module.exports = config`,
|
||||
expected: `var config = { property: "value"}; module.exports = config`
|
||||
source: 'var config = {}; module.exports = config',
|
||||
expected: 'var config = { property: "value"}; module.exports = config'
|
||||
},
|
||||
{
|
||||
property: 'a.b.c',
|
||||
source: `var config = {}; module.exports = config`,
|
||||
expected: `var config = { a: { b: { c: "value"}}}; module.exports = config`
|
||||
source: 'var config = {}; module.exports = config',
|
||||
expected: 'var config = { a: { b: { c: "value" } } }; module.exports = config'
|
||||
},
|
||||
{
|
||||
property: 'a.b.c',
|
||||
source: `var config = { a: { b: [], c: "hello"}}; module.exports = config`,
|
||||
expected: `var config = { a: { b: { c: "value"}, c: "hello"}}; module.exports = config`
|
||||
source: 'var config = { a: { b: [], c: "hello" } }; module.exports = config',
|
||||
expected: 'var config = { a: { b: { c: "value"}, c: "hello" } }; module.exports = config'
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports = {
|
||||
siteMetadata: {
|
||||
title: `My Gatsby Site`
|
||||
title: 'My Gatsby Site'
|
||||
},
|
||||
plugins: []
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ module.exports = {
|
||||
pathPrefix: '/docs/',
|
||||
siteMetadata: {
|
||||
siteUrl: 'https://configure-pages.github.io',
|
||||
title: `My Gatsby Site`
|
||||
title: 'My Gatsby Site'
|
||||
},
|
||||
plugins: []
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ module.exports = {
|
||||
pathPrefix: '/docs/',
|
||||
siteMetadata: {
|
||||
siteUrl: 'https://configure-pages.github.io',
|
||||
title: `My Gatsby Site`
|
||||
title: 'My Gatsby Site'
|
||||
},
|
||||
plugins: []
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ export default {
|
||||
pathPrefix: '/docs/',
|
||||
siteMetadata: {
|
||||
siteUrl: 'https://configure-pages.github.io',
|
||||
title: `My Gatsby Site`
|
||||
title: 'My Gatsby Site'
|
||||
},
|
||||
plugins: []
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports = {
|
||||
siteMetadata: {
|
||||
title: `My Gatsby Site`
|
||||
title: 'My Gatsby Site'
|
||||
},
|
||||
plugins: []
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export default {
|
||||
siteMetadata: {
|
||||
title: `My Gatsby Site`
|
||||
title: 'My Gatsby Site'
|
||||
},
|
||||
plugins: []
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
experimental: {images: {unoptimized: true}},
|
||||
experimental: { images: { unoptimized: true } },
|
||||
basePath: '/docs',
|
||||
reactStrictMode: true,
|
||||
swcMinify: true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
experimental: {images: {unoptimized: true}},
|
||||
experimental: { images: { unoptimized: true } },
|
||||
basePath: '/docs',
|
||||
reactStrictMode: true,
|
||||
swcMinify: true
|
||||
|
||||
@@ -7,7 +7,7 @@ const getAllDynamicRoute = async function() {
|
||||
|
||||
module.exports = {
|
||||
target: 'static',
|
||||
router: {base: '/docs/'},
|
||||
router: { base: '/docs/' },
|
||||
mode: 'universal',
|
||||
generate: {
|
||||
async routes () {
|
||||
|
||||
@@ -7,7 +7,7 @@ const getAllDynamicRoute = async function() {
|
||||
|
||||
export default {
|
||||
target: 'static',
|
||||
router: {base: '/docs/'},
|
||||
router: { base: '/docs/' },
|
||||
mode: 'universal',
|
||||
generate: {
|
||||
async routes () {
|
||||
|
||||
@@ -20,25 +20,20 @@ module.exports = {
|
||||
},
|
||||
|
||||
// Global CSS: https://go.nuxtjs.dev/config-css
|
||||
css: [
|
||||
],
|
||||
css: [],
|
||||
|
||||
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
|
||||
plugins: [
|
||||
],
|
||||
plugins: [],
|
||||
|
||||
// Auto import components: https://go.nuxtjs.dev/config-components
|
||||
components: true,
|
||||
|
||||
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
|
||||
buildModules: [
|
||||
],
|
||||
buildModules: [],
|
||||
|
||||
// Modules: https://go.nuxtjs.dev/config-modules
|
||||
modules: [
|
||||
],
|
||||
modules: [],
|
||||
|
||||
// Build Configuration: https://go.nuxtjs.dev/config-build
|
||||
build: {
|
||||
}
|
||||
build: {}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
|
||||
target: 'static',
|
||||
router: { base: "/docs/" },
|
||||
router: { base: '/docs/' },
|
||||
ssr: false,
|
||||
|
||||
// Global page headers: https://go.nuxtjs.dev/config-head
|
||||
@@ -22,25 +22,20 @@ module.exports = {
|
||||
},
|
||||
|
||||
// Global CSS: https://go.nuxtjs.dev/config-css
|
||||
css: [
|
||||
],
|
||||
css: [],
|
||||
|
||||
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
|
||||
plugins: [
|
||||
],
|
||||
plugins: [],
|
||||
|
||||
// Auto import components: https://go.nuxtjs.dev/config-components
|
||||
components: true,
|
||||
|
||||
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
|
||||
buildModules: [
|
||||
],
|
||||
buildModules: [],
|
||||
|
||||
// Modules: https://go.nuxtjs.dev/config-modules
|
||||
modules: [
|
||||
],
|
||||
modules: [],
|
||||
|
||||
// Build Configuration: https://go.nuxtjs.dev/config-build
|
||||
build: {
|
||||
}
|
||||
build: {}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
export default {
|
||||
// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
|
||||
target: 'static',
|
||||
router: { base: "/docs/" },
|
||||
router: { base: '/docs/' },
|
||||
ssr: false,
|
||||
|
||||
// Global page headers: https://go.nuxtjs.dev/config-head
|
||||
@@ -22,25 +22,20 @@ export default {
|
||||
},
|
||||
|
||||
// Global CSS: https://go.nuxtjs.dev/config-css
|
||||
css: [
|
||||
],
|
||||
css: [],
|
||||
|
||||
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
|
||||
plugins: [
|
||||
],
|
||||
plugins: [],
|
||||
|
||||
// Auto import components: https://go.nuxtjs.dev/config-components
|
||||
components: true,
|
||||
|
||||
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
|
||||
buildModules: [
|
||||
],
|
||||
buildModules: [],
|
||||
|
||||
// Modules: https://go.nuxtjs.dev/config-modules
|
||||
modules: [
|
||||
],
|
||||
modules: [],
|
||||
|
||||
// Build Configuration: https://go.nuxtjs.dev/config-build
|
||||
build: {
|
||||
}
|
||||
build: {}
|
||||
}
|
||||
@@ -20,25 +20,20 @@ export default {
|
||||
},
|
||||
|
||||
// Global CSS: https://go.nuxtjs.dev/config-css
|
||||
css: [
|
||||
],
|
||||
css: [],
|
||||
|
||||
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
|
||||
plugins: [
|
||||
],
|
||||
plugins: [],
|
||||
|
||||
// Auto import components: https://go.nuxtjs.dev/config-components
|
||||
components: true,
|
||||
|
||||
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
|
||||
buildModules: [
|
||||
],
|
||||
buildModules: [],
|
||||
|
||||
// Modules: https://go.nuxtjs.dev/config-modules
|
||||
modules: [
|
||||
],
|
||||
modules: [],
|
||||
|
||||
// Build Configuration: https://go.nuxtjs.dev/config-build
|
||||
build: {
|
||||
}
|
||||
build: {}
|
||||
}
|
||||
Reference in New Issue
Block a user