Lines 1-36javascript
1import { existsSync, readFileSync, statSync } from "node:fs";
2import process from "node:process";
3import { runCommand, spinner } from "@stacksjs/cli";
4import { config } from "@stacksjs/config";
5import { path as p } from "@stacksjs/path";
6import { storage } from "@stacksjs/storage";
7import { ExitCode } from "@stacksjs/types";
10 if (process.argv.includes("--verbose") || process.argv.includes("-v"))
11 console.log("\uD83D\uDD0D", ...args);
13 success: (...args) => console.log("\u2713", ...args),
14 error: (...args) => console.error("\u2717", ...args)
15}, MAIL_PACKAGE_DOMAIN = "github.com/mail-os/mail", MAIL_PACKAGE_SPEC = `${MAIL_PACKAGE_DOMAIN}@0.1.0`, MAIL_TARGET_PLATFORM = "linux-x86_64", MAIL_BINARY_NAMES = ["mail", "mail-x86_64-linux", "mail-x86_64-linux-gnu"], isVerbose = process.argv.
16async function collectMatchingFiles(root, names, maxDepth = 8) {
17 const { existsSync, readdirSync, statSync } = await import("node:fs"), { join, basename } = await import("node:path"), nameSet = new Set
18 if (!existsSync(root))
MediumDynamic Require
Package source references dynamic require/import behavior.
dist/deploy/index.jsView on unpkg · L16 20 function walk(dir, depth) {
23 for (const entry of readdirSync(dir)) {
24 if (entry === ".git" || entry === "node_modules")
26 const fullPath = join(dir, entry), stat = statSync(fullPath);
27 if (stat.isDirectory())
28 walk(fullPath, depth + 1);
29 else if (stat.isFile() && nameSet.has(basename(fullPath)))
30 matches.push(fullPath);
36async function isElfBinary(filePath) {