Fix bin/publish: copy docs.dist from project root

Fix bin/publish: use correct .env path for rspade_system
Fix bin/publish script: prevent grep exit code 1 from terminating script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-21 02:08:33 +00:00
commit f6fac6c4bc
79758 changed files with 10547827 additions and 0 deletions

37
node_modules/consola/src/utils/chalk.js generated vendored Executable file
View File

@@ -0,0 +1,37 @@
import chalk from 'chalk'
const _colorCache = {}
export function chalkColor (name) {
let color = _colorCache[name]
if (color) {
return color
}
if (name[0] === '#') {
color = chalk.hex(name)
} else {
color = chalk[name] || chalk.keyword(name)
}
_colorCache[name] = color
return color
}
const _bgColorCache = {}
export function chalkBgColor (name) {
let color = _bgColorCache[name]
if (color) {
return color
}
if (name[0] === '#') {
color = chalk.bgHex(name)
} else {
color = chalk['bg' + name[0].toUpperCase() + name.slice(1)] || chalk.bgKeyword(name)
}
_bgColorCache[name] = color
return color
}

5
node_modules/consola/src/utils/date.js generated vendored Executable file
View File

@@ -0,0 +1,5 @@
import dayjs from 'dayjs'
export function formatDate (timeFormat, date) {
return dayjs(date).format(timeFormat)
}

16
node_modules/consola/src/utils/error.js generated vendored Executable file
View File

@@ -0,0 +1,16 @@
import { sep } from 'path'
export function parseStack (stack) {
const cwd = process.cwd() + sep
const lines = stack
.split('\n')
.splice(1)
.map(l => l
.trim()
.replace('file://', '')
.replace(cwd, '')
)
return lines
}

10
node_modules/consola/src/utils/fancy.js generated vendored Executable file
View File

@@ -0,0 +1,10 @@
export const TYPE_COLOR_MAP = {
info: 'cyan'
}
export const LEVEL_COLOR_MAP = {
0: 'red',
1: 'yellow',
2: 'white',
3: 'green'
}

30
node_modules/consola/src/utils/format.js generated vendored Executable file
View File

@@ -0,0 +1,30 @@
import { vsprintf } from 'printj'
const FORMAT_ARGS = [
['additional', 5],
['message', 4],
['type', 2],
['date', 1],
['tag', 3]
] // .sort((a, b) => b[0].length - a[0].length)
const _compileCache = {}
// process.on('beforeExit', () => { console.log(_compileCache) })
export function compileFormat (format) {
if (_compileCache[format]) {
return _compileCache[format]
}
let _format = format
for (const arg of FORMAT_ARGS) {
_format = _format.replace(new RegExp('([%-])' + arg[0], 'g'), '$1' + arg[1])
}
_compileCache[format] = _format
return _format
}
export function formatString (format, argv) {
return vsprintf(compileFormat(format), argv)
}

38
node_modules/consola/src/utils/global.js generated vendored Executable file
View File

@@ -0,0 +1,38 @@
export function assignGlobalReference (newInstance, referenceKey) {
if (!newInstance.constructor || (global[referenceKey] && !global[referenceKey].constructor)) {
throw new Error('Assigning to global reference is only supported for class instances')
} else if (newInstance.constructor && !global[referenceKey]) {
global[referenceKey] = newInstance
} else if (!(
newInstance instanceof global[referenceKey].constructor ||
global[referenceKey] instanceof newInstance.constructor
)) {
throw new Error(`Not a ${global[referenceKey].constructor.name} instance`)
}
const oldInstance = Object.create(global[referenceKey])
for (const prop in global[referenceKey]) {
oldInstance[prop] = global[referenceKey][prop]
delete global[referenceKey][prop]
}
for (const prop of Object.getOwnPropertySymbols(global[referenceKey])) {
oldInstance[prop] = global[referenceKey][prop]
delete global[referenceKey][prop]
}
for (const prop in newInstance) {
global[referenceKey][prop] = newInstance[prop]
}
for (const prop of Object.getOwnPropertySymbols(newInstance)) {
global[referenceKey][prop] = newInstance[prop]
}
return oldInstance
}
export function assignGlobalConsola (newConsola) {
return assignGlobalReference(newConsola, 'consola')
}

23
node_modules/consola/src/utils/index.js generated vendored Executable file
View File

@@ -0,0 +1,23 @@
export function isPlainObject (obj) {
return Object.prototype.toString.call(obj) === '[object Object]'
}
// TODO: remove for consola@3
export function isLogObj (arg) {
// Should be plain object
if (!isPlainObject(arg)) {
return false
}
// Should contains either 'message' or 'args' field
if (!arg.message && !arg.args) {
return false
}
// Handle non-standard error objects
if (arg.stack) {
return false
}
return true
}

20
node_modules/consola/src/utils/stream.js generated vendored Executable file
View File

@@ -0,0 +1,20 @@
import { writeSync } from 'fs'
export function writeStream (data, stream, mode = 'default') {
const write = stream.__write || stream.write
switch (mode) {
case 'async':
return new Promise((resolve) => {
if (write.call(stream, data) === true) {
resolve()
} else {
stream.once('drain', () => { resolve() })
}
})
case 'sync':
return writeSync(stream.fd, data)
default:
return write.call(stream, data)
}
}

41
node_modules/consola/src/utils/string.js generated vendored Executable file
View File

@@ -0,0 +1,41 @@
export function centerAlign (str, len, space = ' ') {
const free = len - str.length
if (free <= 0) {
return str
}
const freeLeft = Math.floor(free / 2)
let _str = ''
for (let i = 0; i < len; i++) {
_str += (i < freeLeft || i >= freeLeft + str.length) ? space : str[i - freeLeft]
}
return _str
}
export function rightAlign (str, len, space = ' ') {
const free = len - str.length
if (free <= 0) {
return str
}
let _str = ''
for (let i = 0; i < len; i++) {
_str += i < free ? space : str[i - free]
}
return _str
}
export function leftAlign (str, len, space = ' ') {
let _str = ''
for (let i = 0; i < len; i++) {
_str += i < str.length ? str[i] : space
}
return _str
}
export function align (alignment, str, len, space = ' ') {
switch (alignment) {
case 'left': return leftAlign(str, len, space)
case 'right': return rightAlign(str, len, space)
case 'center': return centerAlign(str, len, space)
default: return str
}
}