Add .gitignore to exclude all node packages and lock files

This commit is contained in:
Adolfo Reyna
2026-02-23 21:56:04 -05:00
parent faae96c9ed
commit dcc5c6c044
9747 changed files with 1555105 additions and 2 deletions
@@ -0,0 +1,30 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.validatePublicDir = void 0;
const node_fs_1 = __importDefault(require("node:fs"));
const node_path_1 = __importDefault(require("node:path"));
const validatePublicDir = (p) => {
const { root } = node_path_1.default.parse(process.cwd());
if (p === root) {
throw new Error(`The public directory was specified as "${p}", which is the root directory. This is not allowed.`);
}
try {
const stat = node_fs_1.default.lstatSync(p);
if (!stat.isDirectory()) {
throw new Error(`The public directory was specified as "${p}", and while this path exists on the filesystem, it is not a directory.`);
}
}
catch (_a) {
// Path does not exist
// Check if the parent path exists
const parentPath = node_path_1.default.dirname(p);
const exists = node_fs_1.default.existsSync(parentPath);
if (!exists) {
throw new Error(`The public directory was specified as "${p}", but this folder does not exist and the parent directory "${parentPath}" does also not exist. Create at least the parent directory.`);
}
}
};
exports.validatePublicDir = validatePublicDir;