feat: docker compose maybe

This commit is contained in:
2023-11-13 16:10:04 -05:00
parent 180b261e40
commit b625ccd8d6
8031 changed files with 2182966 additions and 0 deletions

12
node_modules/postcss-scss/lib/nested-declaration.js generated vendored Normal file
View File

@ -0,0 +1,12 @@
const { Container } = require('postcss')
class NestedDeclaration extends Container {
constructor(defaults) {
super(defaults)
this.type = 'decl'
this.isNested = true
if (!this.nodes) this.nodes = []
}
}
module.exports = NestedDeclaration

12
node_modules/postcss-scss/lib/scss-parse.js generated vendored Normal file
View File

@ -0,0 +1,12 @@
let { Input } = require('postcss')
let ScssParser = require('./scss-parser')
module.exports = function scssParse(scss, opts) {
let input = new Input(scss, opts)
let parser = new ScssParser(input)
parser.parse()
return parser.root
}

213
node_modules/postcss-scss/lib/scss-parser.js generated vendored Normal file
View File

@ -0,0 +1,213 @@
let { Comment } = require('postcss')
let Parser = require('postcss/lib/parser')
let NestedDeclaration = require('./nested-declaration')
let scssTokenizer = require('./scss-tokenize')
class ScssParser extends Parser {
atrule(token) {
let name = token[1]
let prev = token
while (!this.tokenizer.endOfFile()) {
let next = this.tokenizer.nextToken()
if (next[0] === 'word' && next[2] === prev[3] + 1) {
name += next[1]
prev = next
} else {
this.tokenizer.back(next)
break
}
}
super.atrule(['at-word', name, token[2], prev[3]])
}
comment(token) {
if (token[4] === 'inline') {
let node = new Comment()
this.init(node, token[2])
node.raws.inline = true
let pos = this.input.fromOffset(token[3])
node.source.end = {
column: pos.col,
line: pos.line,
offset: token[3] + 1
}
let text = token[1].slice(2)
if (/^\s*$/.test(text)) {
node.text = ''
node.raws.left = text
node.raws.right = ''
} else {
let match = text.match(/^(\s*)([^]*\S)(\s*)$/)
let fixed = match[2].replace(/(\*\/|\/\*)/g, '*//*')
node.text = fixed
node.raws.left = match[1]
node.raws.right = match[3]
node.raws.text = match[2]
}
} else {
super.comment(token)
}
}
createTokenizer() {
this.tokenizer = scssTokenizer(this.input)
}
raw(node, prop, tokens, customProperty) {
super.raw(node, prop, tokens, customProperty)
if (node.raws[prop]) {
let scss = node.raws[prop].raw
node.raws[prop].raw = tokens.reduce((all, i) => {
if (i[0] === 'comment' && i[4] === 'inline') {
let text = i[1].slice(2).replace(/(\*\/|\/\*)/g, '*//*')
return all + '/*' + text + '*/'
} else {
return all + i[1]
}
}, '')
if (scss !== node.raws[prop].raw) {
node.raws[prop].scss = scss
}
}
}
rule(tokens) {
let withColon = false
let brackets = 0
let value = ''
for (let i of tokens) {
if (withColon) {
if (i[0] !== 'comment' && i[0] !== '{') {
value += i[1]
}
} else if (i[0] === 'space' && i[1].includes('\n')) {
break
} else if (i[0] === '(') {
brackets += 1
} else if (i[0] === ')') {
brackets -= 1
} else if (brackets === 0 && i[0] === ':') {
withColon = true
}
}
if (!withColon || value.trim() === '' || /^[#:A-Za-z-]/.test(value)) {
super.rule(tokens)
} else {
tokens.pop()
let node = new NestedDeclaration()
this.init(node, tokens[0][2])
let last
for (let i = tokens.length - 1; i >= 0; i--) {
if (tokens[i][0] !== 'space') {
last = tokens[i]
break
}
}
if (last[3]) {
let pos = this.input.fromOffset(last[3])
node.source.end = {
column: pos.col,
line: pos.line,
offset: last[3] + 1
}
} else {
let pos = this.input.fromOffset(last[2])
node.source.end = {
column: pos.col,
line: pos.line,
offset: last[2] + 1
}
}
while (tokens[0][0] !== 'word') {
node.raws.before += tokens.shift()[1]
}
if (tokens[0][2]) {
let pos = this.input.fromOffset(tokens[0][2])
node.source.start = {
column: pos.col,
line: pos.line,
offset: tokens[0][2]
}
}
node.prop = ''
while (tokens.length) {
let type = tokens[0][0]
if (type === ':' || type === 'space' || type === 'comment') {
break
}
node.prop += tokens.shift()[1]
}
node.raws.between = ''
let token
while (tokens.length) {
token = tokens.shift()
if (token[0] === ':') {
node.raws.between += token[1]
break
} else {
node.raws.between += token[1]
}
}
if (node.prop[0] === '_' || node.prop[0] === '*') {
node.raws.before += node.prop[0]
node.prop = node.prop.slice(1)
}
node.raws.between += this.spacesAndCommentsFromStart(tokens)
this.precheckMissedSemicolon(tokens)
for (let i = tokens.length - 1; i > 0; i--) {
token = tokens[i]
if (token[1] === '!important') {
node.important = true
let string = this.stringFrom(tokens, i)
string = this.spacesFromEnd(tokens) + string
if (string !== ' !important') {
node.raws.important = string
}
break
} else if (token[1] === 'important') {
let cache = tokens.slice(0)
let str = ''
for (let j = i; j > 0; j--) {
let type = cache[j][0]
if (str.trim().indexOf('!') === 0 && type !== 'space') {
break
}
str = cache.pop()[1] + str
}
if (str.trim().indexOf('!') === 0) {
node.important = true
node.raws.important = str
tokens = cache
}
}
if (token[0] !== 'space' && token[0] !== 'comment') {
break
}
}
this.raw(node, 'value', tokens)
if (node.value.includes(':')) {
this.checkMissedSemicolon(tokens)
}
this.current = node
}
}
}
module.exports = ScssParser

51
node_modules/postcss-scss/lib/scss-stringifier.js generated vendored Normal file
View File

@ -0,0 +1,51 @@
let Stringifier = require('postcss/lib/stringifier')
class ScssStringifier extends Stringifier {
comment(node) {
let left = this.raw(node, 'left', 'commentLeft')
let right = this.raw(node, 'right', 'commentRight')
if (node.raws.inline) {
let text = node.raws.text || node.text
this.builder('//' + left + text + right, node)
} else {
this.builder('/*' + left + node.text + right + '*/', node)
}
}
decl(node, semicolon) {
if (!node.isNested) {
super.decl(node, semicolon)
} else {
let between = this.raw(node, 'between', 'colon')
let string = node.prop + between + this.rawValue(node, 'value')
if (node.important) {
string += node.raws.important || ' !important'
}
this.builder(string + '{', node, 'start')
let after
if (node.nodes && node.nodes.length) {
this.body(node)
after = this.raw(node, 'after')
} else {
after = this.raw(node, 'after', 'emptyBody')
}
if (after) this.builder(after)
this.builder('}', node, 'end')
}
}
rawValue(node, prop) {
let value = node[prop]
let raw = node.raws[prop]
if (raw && raw.value === value) {
return raw.scss ? raw.scss : raw.raw
} else {
return value
}
}
}
module.exports = ScssStringifier

6
node_modules/postcss-scss/lib/scss-stringify.js generated vendored Normal file
View File

@ -0,0 +1,6 @@
let ScssStringifier = require('./scss-stringifier')
module.exports = function scssStringify(node, builder) {
let str = new ScssStringifier(builder)
str.stringify(node)
}

4
node_modules/postcss-scss/lib/scss-syntax.d.ts generated vendored Normal file
View File

@ -0,0 +1,4 @@
import * as postcss from 'postcss'
export const parse: postcss.Parser<postcss.Root>
export const stringify: postcss.Stringifier

4
node_modules/postcss-scss/lib/scss-syntax.js generated vendored Normal file
View File

@ -0,0 +1,4 @@
let stringify = require('./scss-stringify')
let parse = require('./scss-parse')
module.exports = { parse, stringify }

6
node_modules/postcss-scss/lib/scss-syntax.mjs generated vendored Normal file
View File

@ -0,0 +1,6 @@
import index from './scss-syntax.js'
export default index
export const stringify = index.stringify
export const parse = index.parse

335
node_modules/postcss-scss/lib/scss-tokenize.js generated vendored Normal file
View File

@ -0,0 +1,335 @@
'use strict'
const SINGLE_QUOTE = "'".charCodeAt(0)
const DOUBLE_QUOTE = '"'.charCodeAt(0)
const BACKSLASH = '\\'.charCodeAt(0)
const SLASH = '/'.charCodeAt(0)
const NEWLINE = '\n'.charCodeAt(0)
const SPACE = ' '.charCodeAt(0)
const FEED = '\f'.charCodeAt(0)
const TAB = '\t'.charCodeAt(0)
const CR = '\r'.charCodeAt(0)
const OPEN_SQUARE = '['.charCodeAt(0)
const CLOSE_SQUARE = ']'.charCodeAt(0)
const OPEN_PARENTHESES = '('.charCodeAt(0)
const CLOSE_PARENTHESES = ')'.charCodeAt(0)
const OPEN_CURLY = '{'.charCodeAt(0)
const CLOSE_CURLY = '}'.charCodeAt(0)
const SEMICOLON = ';'.charCodeAt(0)
const ASTERISK = '*'.charCodeAt(0)
const COLON = ':'.charCodeAt(0)
const AT = '@'.charCodeAt(0)
// SCSS PATCH {
const COMMA = ','.charCodeAt(0)
const HASH = '#'.charCodeAt(0)
// } SCSS PATCH
const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g
const RE_WORD_END = /[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g
const RE_BAD_BRACKET = /.[\r\n"'(/\\]/
const RE_HEX_ESCAPE = /[\da-f]/i
const RE_NEW_LINE = /[\n\f\r]/g // SCSS PATCH
// SCSS PATCH function name was changed
module.exports = function scssTokenize(input, options = {}) {
let css = input.css.valueOf()
let ignore = options.ignoreErrors
let code, next, quote, content, escape
let escaped, prev, n, currentToken
let length = css.length
let pos = 0
let buffer = []
let returned = []
let brackets // SCSS PATCH
function position() {
return pos
}
function unclosed(what) {
throw input.error('Unclosed ' + what, pos)
}
function endOfFile() {
return returned.length === 0 && pos >= length
}
// SCSS PATCH {
function interpolation() {
let deep = 1
let stringQuote = false
let stringEscaped = false
while (deep > 0) {
next += 1
if (css.length <= next) unclosed('interpolation')
code = css.charCodeAt(next)
n = css.charCodeAt(next + 1)
if (stringQuote) {
if (!stringEscaped && code === stringQuote) {
stringQuote = false
stringEscaped = false
} else if (code === BACKSLASH) {
stringEscaped = !stringEscaped
} else if (stringEscaped) {
stringEscaped = false
}
} else if (code === SINGLE_QUOTE || code === DOUBLE_QUOTE) {
stringQuote = code
} else if (code === CLOSE_CURLY) {
deep -= 1
} else if (code === HASH && n === OPEN_CURLY) {
deep += 1
}
}
}
// } SCSS PATCH
function nextToken(opts) {
if (returned.length) return returned.pop()
if (pos >= length) return undefined
let ignoreUnclosed = opts ? opts.ignoreUnclosed : false
code = css.charCodeAt(pos)
switch (code) {
case NEWLINE:
case SPACE:
case TAB:
case CR:
case FEED: {
next = pos
do {
next += 1
code = css.charCodeAt(next)
} while (
code === SPACE ||
code === NEWLINE ||
code === TAB ||
code === CR ||
code === FEED
)
currentToken = ['space', css.slice(pos, next)]
pos = next - 1
break
}
case OPEN_SQUARE:
case CLOSE_SQUARE:
case OPEN_CURLY:
case CLOSE_CURLY:
case COLON:
case SEMICOLON:
case CLOSE_PARENTHESES: {
let controlChar = String.fromCharCode(code)
currentToken = [controlChar, controlChar, pos]
break
}
// SCSS PATCH {
case COMMA: {
currentToken = ['word', ',', pos, pos + 1]
break
}
// } SCSS PATCH
case OPEN_PARENTHESES: {
prev = buffer.length ? buffer.pop()[1] : ''
n = css.charCodeAt(pos + 1)
// SCSS PATCH {
if (prev === 'url' && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE) {
brackets = 1
escaped = false
next = pos + 1
while (next <= css.length - 1) {
n = css.charCodeAt(next)
if (n === BACKSLASH) {
escaped = !escaped
} else if (n === OPEN_PARENTHESES) {
brackets += 1
} else if (n === CLOSE_PARENTHESES) {
brackets -= 1
if (brackets === 0) break
}
next += 1
}
content = css.slice(pos, next + 1)
currentToken = ['brackets', content, pos, next]
pos = next
// } SCSS PATCH
} else {
next = css.indexOf(')', pos + 1)
content = css.slice(pos, next + 1)
if (next === -1 || RE_BAD_BRACKET.test(content)) {
currentToken = ['(', '(', pos]
} else {
currentToken = ['brackets', content, pos, next]
pos = next
}
}
break
}
case SINGLE_QUOTE:
case DOUBLE_QUOTE: {
// SCSS PATCH {
quote = code
next = pos
escaped = false
while (next < length) {
next++
if (next === length) unclosed('string')
code = css.charCodeAt(next)
n = css.charCodeAt(next + 1)
if (!escaped && code === quote) {
break
} else if (code === BACKSLASH) {
escaped = !escaped
} else if (escaped) {
escaped = false
} else if (code === HASH && n === OPEN_CURLY) {
interpolation()
}
}
// } SCSS PATCH
currentToken = ['string', css.slice(pos, next + 1), pos, next]
pos = next
break
}
case AT: {
RE_AT_END.lastIndex = pos + 1
RE_AT_END.test(css)
if (RE_AT_END.lastIndex === 0) {
next = css.length - 1
} else {
next = RE_AT_END.lastIndex - 2
}
currentToken = ['at-word', css.slice(pos, next + 1), pos, next]
pos = next
break
}
case BACKSLASH: {
next = pos
escape = true
while (css.charCodeAt(next + 1) === BACKSLASH) {
next += 1
escape = !escape
}
code = css.charCodeAt(next + 1)
if (
escape &&
code !== SLASH &&
code !== SPACE &&
code !== NEWLINE &&
code !== TAB &&
code !== CR &&
code !== FEED
) {
next += 1
if (RE_HEX_ESCAPE.test(css.charAt(next))) {
while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {
next += 1
}
if (css.charCodeAt(next + 1) === SPACE) {
next += 1
}
}
}
currentToken = ['word', css.slice(pos, next + 1), pos, next]
pos = next
break
}
default:
// SCSS PATCH {
n = css.charCodeAt(pos + 1)
if (code === HASH && n === OPEN_CURLY) {
next = pos
interpolation()
content = css.slice(pos, next + 1)
currentToken = ['word', content, pos, next]
pos = next
} else if (code === SLASH && n === ASTERISK) {
// } SCSS PATCH
next = css.indexOf('*/', pos + 2) + 1
if (next === 0) {
if (ignore || ignoreUnclosed) {
next = css.length
} else {
unclosed('comment')
}
}
currentToken = ['comment', css.slice(pos, next + 1), pos, next]
pos = next
// SCSS PATCH {
} else if (code === SLASH && n === SLASH) {
RE_NEW_LINE.lastIndex = pos + 1
RE_NEW_LINE.test(css)
if (RE_NEW_LINE.lastIndex === 0) {
next = css.length - 1
} else {
next = RE_NEW_LINE.lastIndex - 2
}
content = css.slice(pos, next + 1)
currentToken = ['comment', content, pos, next, 'inline']
pos = next
// } SCSS PATCH
} else {
RE_WORD_END.lastIndex = pos + 1
RE_WORD_END.test(css)
if (RE_WORD_END.lastIndex === 0) {
next = css.length - 1
} else {
next = RE_WORD_END.lastIndex - 2
}
currentToken = ['word', css.slice(pos, next + 1), pos, next]
buffer.push(currentToken)
pos = next
}
break
}
pos++
return currentToken
}
function back(token) {
returned.push(token)
}
return {
back,
endOfFile,
nextToken,
position
}
}