fix(docs): lot of misspelling (#1180) [skip ci]
This commit is contained in:
@@ -176,11 +176,11 @@ function quit(reason) {
|
||||
const api = {}
|
||||
const resources = {}
|
||||
api.graphql = octokit.graphql.defaults({headers: {authorization: `token ${token}`}})
|
||||
info("Github GraphQL API", "ok")
|
||||
info("GitHub GraphQL API", "ok")
|
||||
const octoraw = github.getOctokit(token)
|
||||
api.rest = octoraw.rest
|
||||
api.rest.request = octoraw.request
|
||||
info("Github REST API", "ok")
|
||||
info("GitHub REST API", "ok")
|
||||
//Apply mocking if needed
|
||||
if (mocked) {
|
||||
Object.assign(api, await mocks(api))
|
||||
@@ -397,7 +397,7 @@ function quit(reason) {
|
||||
let rendered = await retry(async () => {
|
||||
const {rendered, errors} = await metrics({login: user, q}, {graphql, rest, plugins, conf, die, verify, convert}, {Plugins, Templates})
|
||||
if (errors.length) {
|
||||
console.warn(`::group::${errors.length} error(s) occured`)
|
||||
console.warn(`::group::${errors.length} error(s) occurred`)
|
||||
console.warn(util.inspect(errors, {depth: Infinity, maxStringLength: 256}))
|
||||
console.warn("::endgroup::")
|
||||
}
|
||||
@@ -459,7 +459,7 @@ function quit(reason) {
|
||||
else {
|
||||
//Cache embed svg for markdown outputs
|
||||
if (/markdown/.test(convert)) {
|
||||
const regex = /(?<match><img class="metrics-cachable" data-name="(?<name>[\s\S]+?)" src="data:image[/](?<format>(?:svg[+]xml)|jpeg|png);base64,(?<content>[/+=\w]+?)">)/
|
||||
const regex = /(?<match><img class="metrics-cacheable" data-name="(?<name>[\s\S]+?)" src="data:image[/](?<format>(?:svg[+]xml)|jpeg|png);base64,(?<content>[/+=\w]+?)">)/
|
||||
let matched = null
|
||||
while (matched = regex.exec(rendered)?.groups) { //eslint-disable-line no-cond-assign
|
||||
await retry(async () => {
|
||||
@@ -499,7 +499,7 @@ function quit(reason) {
|
||||
}
|
||||
}
|
||||
|
||||
//Check editions
|
||||
//Check changes
|
||||
if ((committer.commit) || (committer.pr)) {
|
||||
const git = sgit()
|
||||
const sha = await git.hashObject(paths.join("/renders", filename))
|
||||
@@ -690,7 +690,7 @@ function quit(reason) {
|
||||
console.error(error)
|
||||
//Print debug buffer if debug was not enabled (if it is, it's already logged on the fly)
|
||||
if (!DEBUG) {
|
||||
for (const log of [info.break(), "An error occured, logging debug message :", ...debugged])
|
||||
for (const log of [info.break(), "An error occurred, logging debug message :", ...debugged])
|
||||
console.log(log)
|
||||
}
|
||||
core.setFailed(error.message)
|
||||
|
||||
@@ -68,7 +68,7 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf,
|
||||
if (errors.length) {
|
||||
console.debug(`metrics/compute/${login} > ${errors.length} errors !`)
|
||||
if (die)
|
||||
throw new Error("An error occured during rendering, dying")
|
||||
throw new Error("An error occurred during rendering, dying")
|
||||
else
|
||||
console.debug(util.inspect(errors, {depth: Infinity, maxStringLength: 256}))
|
||||
}
|
||||
@@ -117,7 +117,7 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf,
|
||||
console.debug(`metrics/compute/${login}/embed > ${name} >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`)
|
||||
if ((!name) || (typeof q !== "object") || (q === null)) {
|
||||
if (die)
|
||||
throw new Error("An error occured during embed rendering, dying")
|
||||
throw new Error("An error occurred during embed rendering, dying")
|
||||
return "<p>⚠️ Failed to execute embed function: invalid arguments</p>"
|
||||
}
|
||||
console.debug(`metrics/compute/${login} > embed called with`)
|
||||
@@ -142,7 +142,7 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf,
|
||||
//Compute rendering
|
||||
const {rendered} = await metrics({login, q}, {...arguments[1], convert: ["svg", "png", "jpeg"].includes(q["config.output"]) ? q["config.output"] : null}, arguments[2])
|
||||
console.debug(`metrics/compute/${login}/embed > ${name} > success >>>>>>>>>>>>>>>>>>>>>>`)
|
||||
return `<img class="metrics-cachable" data-name="${name}" src="data:image/${{png: "png", jpeg: "jpeg"}[q["config.output"]] ?? "svg+xml"};base64,${Buffer.from(rendered).toString("base64")}">`
|
||||
return `<img class="metrics-cacheable" data-name="${name}" src="data:image/${{png: "png", jpeg: "jpeg"}[q["config.output"]] ?? "svg+xml"};base64,${Buffer.from(rendered).toString("base64")}">`
|
||||
}
|
||||
//Rendering template source
|
||||
let rendered = source.replace(/\{\{ (?<content>[\s\S]*?) \}\}/g, "{%= $<content> %}")
|
||||
|
||||
@@ -63,7 +63,7 @@ export default async function presets(list, {log = true, core = null} = {}) {
|
||||
catch (error) {
|
||||
if (env === "action")
|
||||
console.log(`::warning::skipping preset ${file}: ${error.message}`)
|
||||
logger(`metrics/presets > an error occured while loading preset ${file} (${error}), ignoring`)
|
||||
logger(`metrics/presets > an error occurred while loading preset ${file} (${error}), ignoring`)
|
||||
}
|
||||
}
|
||||
return options
|
||||
|
||||
@@ -269,7 +269,7 @@ export async function spawn(command, args = [], options = {}, {prefixed = true,
|
||||
})
|
||||
}
|
||||
|
||||
/**Check command existance */
|
||||
/**Check command existence */
|
||||
export async function which(command) {
|
||||
try {
|
||||
console.debug(`metrics/command > checking existence of ${command}`)
|
||||
@@ -282,7 +282,7 @@ export async function which(command) {
|
||||
return false
|
||||
}
|
||||
|
||||
/**Code hightlighter */
|
||||
/**Code highlighter */
|
||||
export function highlight(code, lang) {
|
||||
return lang in prism.languages ? prism.highlight(code, prism.languages[lang]) : code
|
||||
}
|
||||
@@ -479,7 +479,7 @@ export const svg = {
|
||||
console.debug("metrics/svg/resize > successfully executed user javascript")
|
||||
}
|
||||
catch (error) {
|
||||
console.debug(`an error occured while evaluating script: ${error}`)
|
||||
console.debug(`an error occurred while evaluating script: ${error}`)
|
||||
}
|
||||
}
|
||||
//Disable animations
|
||||
@@ -510,7 +510,7 @@ export const svg = {
|
||||
))
|
||||
}
|
||||
catch (error) {
|
||||
console.debug(`metrics/svg/resize > an error occured: ${error}`)
|
||||
console.debug(`metrics/svg/resize > an error occurred: ${error}`)
|
||||
throw error
|
||||
}
|
||||
//Convert if required
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<small>{{ requests.rest.remaining }} REST / {{ requests.graphql.remaining }} GraphQL / {{ requests.search.remaining }} search</small>
|
||||
<small class="warning" v-if="preview">
|
||||
Metrics are rendered by <a href="https://metrics.lecoq.io/">metrics.lecoq.io</a> in preview mode.
|
||||
Any backend editions won't be reflected but client-side rendering can still be tested.
|
||||
Any backend changes won't be reflected but client-side rendering can still be tested.
|
||||
</small>
|
||||
<div class="warning" v-if="unusable.length">
|
||||
The following plugins options are not available on this web instance: {{ unusable.join(", ") }}
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<div class="about">
|
||||
<small class="warning mb1" v-if="preview">
|
||||
Metrics are rendered by <a href="https://metrics.lecoq.io/">metrics.lecoq.io</a> in preview mode.<br>
|
||||
Any backend editions won't be reflected but client-side rendering can still be tested.
|
||||
Any backend changes won't be reflected but client-side rendering can still be tested.
|
||||
</small>
|
||||
<div class="warning mb1" v-if="(!requests.rest.remaining)||(!requests.graphql.remaining)">
|
||||
This web instance has run out of GitHub API requests.
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</div>
|
||||
<small class="warning" v-if="preview">
|
||||
Metrics insights are rendered by <a href="https://metrics.lecoq.io/">metrics.lecoq.io</a> in preview mode.<br>
|
||||
Any backend editions won't be reflected but client-side rendering can still be tested.
|
||||
Any backend changes won't be reflected but client-side rendering can still be tested.
|
||||
</small>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user