- Add .gitignore: exclude compiled binaries, build artifacts, and Helm values files containing real secrets (authentik, prometheus) - Add all Kubernetes deployment manifests (deployment/) - Add services source code: ha-sync, device-inventory, games-console, paperclip, parts-inventory - Add Ansible orchestration: playbooks, roles, inventory, cloud-init - Add hardware specs, execution plans, scripts, HOMELAB.md - Add skills/homelab/SKILL.md + skills/install.sh to preserve Copilot skill - Remove previously-tracked inventory-cli binary from git index Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
23 lines
784 B
JavaScript
23 lines
784 B
JavaScript
const { promisify } = require('util')
|
|
const fs = require('fs')
|
|
const optsArg = opts => {
|
|
if (!opts)
|
|
opts = { mode: 0o777, fs }
|
|
else if (typeof opts === 'object')
|
|
opts = { mode: 0o777, fs, ...opts }
|
|
else if (typeof opts === 'number')
|
|
opts = { mode: opts, fs }
|
|
else if (typeof opts === 'string')
|
|
opts = { mode: parseInt(opts, 8), fs }
|
|
else
|
|
throw new TypeError('invalid options argument')
|
|
|
|
opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir
|
|
opts.mkdirAsync = promisify(opts.mkdir)
|
|
opts.stat = opts.stat || opts.fs.stat || fs.stat
|
|
opts.statAsync = promisify(opts.stat)
|
|
opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync
|
|
opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync
|
|
return opts
|
|
}
|
|
module.exports = optsArg
|