1
0

add initial marp implementation with sample content and build configuration

This commit is contained in:
2025-09-13 18:13:22 +02:00
parent dcacc9b409
commit e5f219507f
10319 changed files with 1402023 additions and 0 deletions

61
node_modules/bare-fs/lib/errors.js generated vendored Normal file
View File

@@ -0,0 +1,61 @@
const os = require('bare-os')
module.exports = class FileError extends Error {
constructor(msg, opts = {}) {
const {
code,
operation = null,
path = null,
destination = null,
fd = -1
} = opts
if (operation !== null) msg += describe(operation, opts)
super(`${code}: ${msg}`)
this.code = code
if (operation !== null) this.operation = operation
if (path !== null) this.path = path
if (destination !== null) this.destination = destination
if (fd !== -1) this.fd = fd
}
get name() {
return 'FileError'
}
// For Node.js compatibility
get errno() {
return os.constants.errnos[this.code]
}
// For Node.js compatibility
get syscall() {
return this.operation
}
// For Node.js compatibility
get dest() {
return this.destination
}
}
function describe(operation, opts) {
const { path = null, destination = null, fd = -1 } = opts
let result = `, ${operation}`
if (path !== null) {
result += ` ${JSON.stringify(path)}`
if (destination !== null) {
result += ` -> ${JSON.stringify(destination)}`
}
} else if (fd !== -1) {
result += ` ${fd}`
}
return result
}