@vibgrate/cli 2026.618.1 → 2026.623.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,30 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
- mod
25
- ));
26
-
27
- export {
28
- __commonJS,
29
- __toESM
30
- };
@@ -1,103 +0,0 @@
1
- import {
2
- runScan
3
- } from "./chunk-BMLE722B.js";
4
-
5
- // src/commands/baseline.ts
6
- import * as path3 from "path";
7
- import { Command } from "commander";
8
- import chalk from "chalk";
9
-
10
- // src/utils/fs.ts
11
- import { execFile } from "child_process";
12
- import * as fs from "fs/promises";
13
- import * as os from "os";
14
- import * as path2 from "path";
15
- import { promisify } from "util";
16
-
17
- // src/utils/semaphore.ts
18
- var Semaphore = class {
19
- available;
20
- queue = [];
21
- constructor(max) {
22
- this.available = max;
23
- }
24
- async run(fn) {
25
- await this.acquire();
26
- try {
27
- return await fn();
28
- } finally {
29
- this.release();
30
- }
31
- }
32
- acquire() {
33
- if (this.available > 0) {
34
- this.available--;
35
- return Promise.resolve();
36
- }
37
- return new Promise((resolve3) => this.queue.push(resolve3));
38
- }
39
- release() {
40
- const next = this.queue.shift();
41
- if (next) next();
42
- else this.available++;
43
- }
44
- };
45
-
46
- // src/utils/glob.ts
47
- import * as path from "path";
48
-
49
- // src/utils/fs.ts
50
- var execFileAsync = promisify(execFile);
51
- function stripBom(text) {
52
- return text.charCodeAt(0) === 65279 ? text.slice(1) : text;
53
- }
54
- async function readJsonFile(filePath) {
55
- const txt = await fs.readFile(filePath, "utf8");
56
- return JSON.parse(stripBom(txt));
57
- }
58
- async function pathExists(p) {
59
- try {
60
- await fs.access(p);
61
- return true;
62
- } catch {
63
- return false;
64
- }
65
- }
66
- async function ensureDir(dir) {
67
- await fs.mkdir(dir, { recursive: true });
68
- }
69
- async function writeJsonFile(filePath, data) {
70
- await ensureDir(path2.dirname(filePath));
71
- await fs.writeFile(filePath, JSON.stringify(data, null, 2) + "\n", "utf8");
72
- }
73
- async function writeTextFile(filePath, content) {
74
- await ensureDir(path2.dirname(filePath));
75
- await fs.writeFile(filePath, content, "utf8");
76
- }
77
-
78
- // src/commands/baseline.ts
79
- async function runBaseline(rootDir) {
80
- console.log(chalk.dim("Creating baseline..."));
81
- const artifact = await runScan(rootDir, {
82
- format: "text",
83
- concurrency: 8
84
- });
85
- const baselinePath = path3.join(rootDir, ".vibgrate", "baseline.json");
86
- await writeJsonFile(baselinePath, artifact);
87
- console.log(chalk.green("\u2714") + ` Baseline saved to ${chalk.bold(".vibgrate/baseline.json")}`);
88
- console.log(chalk.dim(` Baseline score: ${artifact.drift.score}/100`));
89
- }
90
- var baselineCommand = new Command("baseline").description("Create a drift baseline snapshot").argument("[path]", "Path to baseline", ".").action(async (targetPath) => {
91
- const rootDir = path3.resolve(targetPath);
92
- await runBaseline(rootDir);
93
- });
94
-
95
- export {
96
- Semaphore,
97
- readJsonFile,
98
- pathExists,
99
- ensureDir,
100
- writeTextFile,
101
- runBaseline,
102
- baselineCommand
103
- };
@@ -1,37 +0,0 @@
1
- import {
2
- FileCache,
3
- bytesInDir,
4
- countFilesInDir,
5
- ensureDir,
6
- findCsprojFiles,
7
- findFiles,
8
- findPackageJsonFiles,
9
- findSolutionFiles,
10
- normalizeGlobForRipgrep,
11
- pathExists,
12
- quickTreeCount,
13
- readJsonFile,
14
- readTextFile,
15
- stripBom,
16
- writeJsonFile,
17
- writeTextFile
18
- } from "./chunk-C7LU6YIL.js";
19
- import "./chunk-JSBRDJBE.js";
20
- export {
21
- FileCache,
22
- bytesInDir,
23
- countFilesInDir,
24
- ensureDir,
25
- findCsprojFiles,
26
- findFiles,
27
- findPackageJsonFiles,
28
- findSolutionFiles,
29
- normalizeGlobForRipgrep,
30
- pathExists,
31
- quickTreeCount,
32
- readJsonFile,
33
- readTextFile,
34
- stripBom,
35
- writeJsonFile,
36
- writeTextFile
37
- };
@@ -1,5 +0,0 @@
1
- import {
2
- require_semver
3
- } from "./chunk-5IXVOEZN.js";
4
- import "./chunk-JSBRDJBE.js";
5
- export default require_semver();