bussing 0.0.1 → 0.0.3

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ari.dc.uba.ar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,100 @@
1
+ # bussing
2
+
3
+
4
+ Reviews the local development environment after a task (or at any time) and detects the repositories left untidy: uncommitted or unpushed changes, versions not bumped or not published, outdated cross dependencies and installations contaminated by `npm link` or `devel-sync`. It also tells in which order to clean them up.
5
+
6
+
7
+ [![npm-version](https://img.shields.io/npm/v/bussing.svg)](https://npmjs.org/package/bussing)
8
+ [![downloads](https://img.shields.io/npm/dm/bussing.svg)](https://npmjs.org/package/bussing)
9
+ [![build](https://github.com/ari-dc-uba-ar/bussing/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/ari-dc-uba-ar/bussing/actions/workflows/build-and-test.yml)
10
+ [![qa-control](https://github.com/ari-dc-uba-ar/bussing/actions/workflows/qa-control.yml/badge.svg)](https://github.com/ari-dc-uba-ar/bussing/actions/workflows/qa-control.yml)
11
+
12
+
13
+ language: ![English](https://raw.githubusercontent.com/codenautas/multilang/master/img/lang-en.png)
14
+ also available in:
15
+ [![Spanish](https://raw.githubusercontent.com/codenautas/multilang/master/img/lang-es.png)](LEEME.md)
16
+
17
+
18
+ ## Reviewed repositories
19
+
20
+ The root folders are set with `--path` (it can be repeated). Every subfolder of a root folder that has a `package.json` is a repository to review, except those named as one of the values of `--ignore` (it can be repeated too).
21
+
22
+ ## Default values
23
+
24
+ The optional file `~/.bussing.yaml` sets default values for the parameters; the keys are the parameter names (`bussing --help`). What is given in the command line takes precedence. Relative folders are relative to the current folder, as in the command line.
25
+
26
+ ```yaml
27
+ path:
28
+ - /path/to/repos
29
+ - /path/to/other-repos
30
+ ignore:
31
+ - old-repo
32
+ priority:
33
+ qa-control: 1
34
+ require-bro: -1
35
+ ```
36
+
37
+ ## Checks
38
+
39
+ ### 1. git
40
+
41
+ * There are uncommitted changes (including untracked files that are not ignored).
42
+ * There are unpushed commits.
43
+ * The current branch has no upstream.
44
+
45
+ ### 2. Publication
46
+
47
+ The local `package.json` is compared with the npm registry:
48
+
49
+ * **Unpublished version:** the local version is greater than the last published one.
50
+ * **Version not bumped:** the local version equals the published one, but the local `HEAD` differs from the `gitHead` npm recorded when that version was published (there are commits after the publication).
51
+ * **Not published:** the package does not exist in npm.
52
+
53
+ Packages with `"private": true` are not checked.
54
+
55
+ ### 3. Cross dependencies
56
+
57
+ If repository **A** depends on repository **B** (both reviewed) and A's `package.json` declares B with a version lower than B's local version, A has an outdated dependency. `dependencies`, `devDependencies`, `optionalDependencies` and `peerDependencies` are checked; the declared version is the minimum of the range (`^1.2.0` is lower than `1.3.0` even if the range allows it).
58
+
59
+ If a package name is in more than one reviewed repository, it is reported and that name is not used for cross dependencies nor for the order.
60
+
61
+ ### 4. Contaminated installation
62
+
63
+ For each dependency in `node_modules`:
64
+
65
+ * **`npm link`:** `node_modules/<package>` is a symbolic link.
66
+ * **Copy (`devel-sync` or other):** the content of `node_modules/<package>` does not match the published package of the version recorded in `package-lock.json`. Only packages that are reviewed repositories are checked (the only ones copied during development). It takes into account that, when installing, npm changes CRLF to LF in the shebang of the executables declared in `bin`.
67
+
68
+ ### 5. Cleanup order
69
+
70
+ With the untidy repositories and those that depend on them (even if they are clean) a topological order is built: first the ones that do not depend on any other repository of the list. For each repository the reason it is on the list is shown (its own problems, or which dependency forces it to be updated).
71
+
72
+ `dependencies`, `optionalDependencies` and `peerDependencies` are strong dependencies: they define which repositories enter the list and are always respected in the order. `devDependencies` are weak: they are respected unless they close a cycle, because among one's own packages they form cycles (for example, qa-control is a devDependency of libraries it depends on). Those that would close a cycle are deferred: the step shows it and that dependency stays outdated until a later review. With `--priority package=number` (it can be repeated; 0 by default) you decide which weak dependencies are respected first: higher numbers are respected earlier and lower numbers are the first to be deferred. If there is a cycle of strong dependencies, its members are placed in the same step and the cycle is shown.
73
+
74
+ Each step shows the most serious problem of the repository. From most to least serious: uncommitted changes, unpushed commits, altered node_modules, waiting for dependencies (it has outdated dependencies and some of them, with their own problems, come earlier in the order), outdated dependencies, version not bumped, not published. Those that enter only because of their dependencies are marked as such.
75
+
76
+ ## Usage
77
+
78
+ ### Command line
79
+
80
+ ```sh
81
+ bussing --path /path/to/repos --path /path/to/other-repos
82
+ bussing --json
83
+ ```
84
+
85
+ It shows a readable report; with `--json` it shows the full report as JSON. The parameters and the exit codes are described in `bussing --help`.
86
+
87
+ ### As a library
88
+
89
+ `bussing` can be included from another system. `reviewEnvironment` receives typed options and returns the typed report; it does not write to the output nor end the process.
90
+
91
+ ```ts
92
+ import { reviewEnvironment } from 'bussing';
93
+
94
+ const report = await reviewEnvironment({ roots: ['/path/to/repos'] });
95
+ ```
96
+
97
+
98
+ ## License
99
+
100
+ [MIT](LICENSE)
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env node
2
+ import { type GuaranteedType } from 'guarantee-type';
3
+ import type { ProblemCategory, BussingReport, Problem } from './bussing.js';
4
+ export declare const EXIT_CODE: {
5
+ readonly clean: 0;
6
+ readonly error: 1;
7
+ readonly problems: 2;
8
+ };
9
+ /** Cómo se nombra el archivo de valores por omisión en los mensajes y en la ayuda. */
10
+ export declare const DEFAULTS_FILE_LABEL = "~/.bussing.yaml";
11
+ export declare function defaultsPath(): string;
12
+ /** Interpreta `paquete=número` (el número puede ser negativo). */
13
+ export declare function parsePriority(value: string): [string, number];
14
+ declare const defaultsDescription: {
15
+ object: {
16
+ path: {
17
+ optional: {
18
+ union: ({
19
+ array: {
20
+ string: import("guarantee-type").Opts;
21
+ };
22
+ } | {
23
+ string: import("guarantee-type").Opts;
24
+ })[];
25
+ };
26
+ };
27
+ ignore: {
28
+ optional: {
29
+ union: ({
30
+ array: {
31
+ string: import("guarantee-type").Opts;
32
+ };
33
+ } | {
34
+ string: import("guarantee-type").Opts;
35
+ })[];
36
+ };
37
+ };
38
+ priority: {
39
+ optional: {
40
+ recordString: {
41
+ number: import("guarantee-type").Opts;
42
+ };
43
+ };
44
+ };
45
+ registry: {
46
+ optional: {
47
+ string: import("guarantee-type").Opts;
48
+ };
49
+ };
50
+ json: {
51
+ optional: {
52
+ boolean: import("guarantee-type").Opts;
53
+ };
54
+ };
55
+ };
56
+ };
57
+ type DefaultsFile = GuaranteedType<typeof defaultsDescription>;
58
+ /** Valores por omisión ya normalizados: `path` e `ignore` siempre son listas. */
59
+ export type Defaults = Omit<DefaultsFile, 'path' | 'ignore'> & {
60
+ path?: string[];
61
+ ignore?: string[];
62
+ };
63
+ export interface CliOptions {
64
+ roots: string[];
65
+ ignore: string[];
66
+ priority: Record<string, number>;
67
+ registry: string;
68
+ json: boolean;
69
+ }
70
+ /**
71
+ * Lee el archivo de valores por omisión. Si no existe o está vacío no hay valores por omisión.
72
+ * `label` es el nombre del archivo en los mensajes de error.
73
+ */
74
+ export declare function readDefaults(file: string, label: string): Defaults;
75
+ /** Interpreta los argumentos. cleye muestra la ayuda y termina el proceso ante `--help`, `--version` o un flag desconocido. */
76
+ export declare function parseArgs(argv: string[], defaults: Defaults): CliOptions;
77
+ export declare function describeProblem(problem: Problem): string;
78
+ export declare const CATEGORY_LABEL: Record<ProblemCategory, string>;
79
+ export declare function formatReport(report: BussingReport): string;
80
+ export declare function main(argv: string[]): Promise<number>;
81
+ export {};
@@ -0,0 +1,252 @@
1
+ #!/usr/bin/env node
2
+ // Línea de comandos de bussing. Es el único módulo que usa cleye y process.
3
+ import { existsSync, readFileSync } from 'node:fs';
4
+ import { homedir } from 'node:os';
5
+ import { basename, dirname, join, resolve } from 'node:path';
6
+ import { cli } from 'cleye';
7
+ import { guarantee, is } from 'guarantee-type';
8
+ import { load } from 'js-yaml';
9
+ import { DEFAULT_REGISTRY_URL, createNpmRegistry, reviewEnvironment } from './bussing.js';
10
+ export const EXIT_CODE = {
11
+ clean: 0,
12
+ error: 1,
13
+ problems: 2,
14
+ };
15
+ /** Archivo opcional, en la carpeta del usuario, con valores por omisión para los parámetros. */
16
+ const DEFAULTS_FILE_NAME = '.bussing.yaml';
17
+ /** Cómo se nombra el archivo de valores por omisión en los mensajes y en la ayuda. */
18
+ export const DEFAULTS_FILE_LABEL = `~/${DEFAULTS_FILE_NAME}`;
19
+ export function defaultsPath() {
20
+ return join(homedir(), DEFAULTS_FILE_NAME);
21
+ }
22
+ /** Interpreta `paquete=número` (el número puede ser negativo). */
23
+ export function parsePriority(value) {
24
+ const match = /^(.+)=(-?\d+)$/.exec(value);
25
+ if (match === null || match[1] === undefined || match[2] === undefined) {
26
+ throw new Error(`--priority ${value} no tiene la forma paquete=número`);
27
+ }
28
+ return [match[1], Number(match[2])];
29
+ }
30
+ /** Parámetros de la línea de comandos. Las mismas claves se pueden usar en el archivo de valores por omisión. */
31
+ const flags = {
32
+ path: {
33
+ type: [String],
34
+ alias: 'p',
35
+ description: 'Carpeta raíz a revisar; se puede repetir (cada subcarpeta con package.json es un repositorio)',
36
+ },
37
+ ignore: {
38
+ type: [String],
39
+ description: 'Nombre de una subcarpeta que no se revisa; se puede repetir',
40
+ },
41
+ priority: {
42
+ type: [parsePriority],
43
+ description: 'Prioridad de un paquete como devDependency al romper ciclos del orden de limpieza, como paquete=número ' +
44
+ '(por omisión 0; las de mayor número se respetan primero); se puede repetir',
45
+ },
46
+ registry: {
47
+ type: String,
48
+ description: `URL del registro de npm (por omisión ${DEFAULT_REGISTRY_URL})`,
49
+ },
50
+ json: {
51
+ type: Boolean,
52
+ description: 'Muestra el informe completo en JSON',
53
+ },
54
+ };
55
+ /** Tipo de cada clave del archivo de valores por omisión: una por parámetro (el compilador verifica que sean las mismas). */
56
+ const defaultsFields = {
57
+ // una carpeta sola o una lista
58
+ path: { optional: is.union([is.string, is.array.string]) },
59
+ ignore: { optional: is.union([is.string, is.array.string]) },
60
+ // en el archivo es un mapa paquete: número
61
+ priority: is.optional.recordString.number,
62
+ registry: is.optional.string,
63
+ json: is.optional.boolean,
64
+ };
65
+ const defaultsDescription = is.object(defaultsFields);
66
+ /** Versión del package.json del propio paquete: el primero que se encuentra subiendo desde la carpeta de este módulo. */
67
+ function packageVersion() {
68
+ let dir = import.meta.dirname;
69
+ while (!existsSync(join(dir, 'package.json'))) {
70
+ const parent = dirname(dir);
71
+ if (parent === dir)
72
+ throw new Error('No se encontró el package.json de bussing');
73
+ dir = parent;
74
+ }
75
+ return guarantee(is.object({ version: is.string }), JSON.parse(readFileSync(join(dir, 'package.json'), 'utf8'))).version;
76
+ }
77
+ /**
78
+ * Lee el archivo de valores por omisión. Si no existe o está vacío no hay valores por omisión.
79
+ * `label` es el nombre del archivo en los mensajes de error.
80
+ */
81
+ export function readDefaults(file, label) {
82
+ if (!existsSync(file))
83
+ return {};
84
+ const text = readFileSync(file, 'utf8');
85
+ if (text.trim() === '')
86
+ return {};
87
+ let content;
88
+ try {
89
+ content = load(text);
90
+ }
91
+ catch (err) {
92
+ throw new Error(`${label} no es un YAML válido (${err instanceof Error ? err.message : String(err)})`);
93
+ }
94
+ if (content === undefined || content === null)
95
+ return {};
96
+ if (typeof content !== 'object' || Array.isArray(content))
97
+ throw new Error(`${label} no contiene claves y valores`);
98
+ const unknownKeys = Object.keys(content).filter(function (key) { return !(key in flags); });
99
+ if (unknownKeys.length > 0) {
100
+ throw new Error(`${label} tiene claves desconocidas: ${unknownKeys.join(', ')} (las claves válidas son: ${Object.keys(flags).join(', ')})`);
101
+ }
102
+ let values;
103
+ try {
104
+ values = guarantee(defaultsDescription, content);
105
+ }
106
+ catch (err) {
107
+ throw new Error(`${label} tiene valores de tipo incorrecto (${err instanceof Error ? err.message : String(err)})`);
108
+ }
109
+ const { path, ignore, ...others } = values;
110
+ const defaults = others;
111
+ if (path !== undefined)
112
+ defaults.path = typeof path === 'string' ? [path] : path;
113
+ if (ignore !== undefined)
114
+ defaults.ignore = typeof ignore === 'string' ? [ignore] : ignore;
115
+ return defaults;
116
+ }
117
+ /** Interpreta los argumentos. cleye muestra la ayuda y termina el proceso ante `--help`, `--version` o un flag desconocido. */
118
+ export function parseArgs(argv, defaults) {
119
+ const parsed = cli({
120
+ name: 'bussing',
121
+ version: packageVersion(),
122
+ flags,
123
+ strictFlags: true,
124
+ help: {
125
+ description: 'Revisa los repositorios locales y muestra los que quedaron desprolijos y el orden en que conviene limpiarlos.\n' +
126
+ `Los valores por omisión de los parámetros se pueden definir en ${DEFAULTS_FILE_LABEL} (las claves son los nombres de los parámetros).\n` +
127
+ `Códigos de salida: ${EXIT_CODE.clean} sin problemas, ${EXIT_CODE.error} error, ${EXIT_CODE.problems} hay problemas.`,
128
+ examples: ['bussing --path ../repos --path ../otros-repos --ignore repo-viejo', 'bussing --priority qa-control=1 --priority require-bro=-1', 'bussing --json'],
129
+ },
130
+ }, undefined, argv);
131
+ // las carpetas relativas son relativas a la carpeta actual, vengan de la línea de comandos o del archivo
132
+ const roots = (parsed.flags.path.length > 0 ? parsed.flags.path : defaults.path ?? []).map(function (path) { return resolve(path); });
133
+ if (roots.length === 0) {
134
+ throw new Error(`Falta indicar la carpeta con --path o definir los parámetros predeterminados en ${DEFAULTS_FILE_LABEL}`);
135
+ }
136
+ return {
137
+ roots,
138
+ ignore: parsed.flags.ignore.length > 0 ? parsed.flags.ignore : defaults.ignore ?? [],
139
+ priority: parsed.flags.priority.length > 0 ? Object.fromEntries(parsed.flags.priority) : defaults.priority ?? {},
140
+ registry: parsed.flags.registry ?? defaults.registry ?? DEFAULT_REGISTRY_URL,
141
+ json: parsed.flags.json ?? defaults.json ?? false,
142
+ };
143
+ }
144
+ const MAX_LISTED = 5;
145
+ function listSome(items) {
146
+ return items.slice(0, MAX_LISTED).join(', ') + (items.length > MAX_LISTED ? `, … (${items.length - MAX_LISTED} más)` : '');
147
+ }
148
+ function plural(count, singular, pluralForm) {
149
+ return `${count} ${count === 1 ? singular : pluralForm}`;
150
+ }
151
+ export function describeProblem(problem) {
152
+ switch (problem.kind) {
153
+ case 'uncommitted':
154
+ return `${plural(problem.files.length, 'archivo sin commitear', 'archivos sin commitear')}: ${listSome(problem.files)}`;
155
+ case 'unpushed':
156
+ return plural(problem.commits, 'commit sin pushear', 'commits sin pushear');
157
+ case 'no-upstream':
158
+ return `la rama ${problem.branch} no tiene upstream`;
159
+ case 'not-published':
160
+ return `el paquete no está publicado en npm (versión local ${problem.version})`;
161
+ case 'unpublished-version':
162
+ return `versión ${problem.version} sin publicar (en npm: ${problem.latest ?? 'sin latest'})`;
163
+ case 'version-not-bumped':
164
+ return `versión ${problem.version} sin subir: ${plural(problem.commitsAfterPublish, 'commit posterior', 'commits posteriores')} a la publicación`;
165
+ case 'outdated-dependency':
166
+ return `dependencia desactualizada: ${problem.dependency} "${problem.declared}" (${problem.field}), versión local ${problem.local}`;
167
+ case 'linked-dependency':
168
+ return `node_modules/${problem.dependency} es un enlace a ${problem.target}`;
169
+ case 'copied-dependency':
170
+ return `node_modules/${problem.dependency} no coincide con la versión publicada ${problem.version}` +
171
+ (problem.installedVersion !== problem.version ? ` (el package.json instalado dice ${problem.installedVersion ?? '?'})` : '') + ': ' +
172
+ listSome(problem.differences.map(function (difference) { return `${difference.path} (${difference.kind})`; }));
173
+ }
174
+ }
175
+ function describeWarning(warning) {
176
+ return `advertencia (${warning.check}): ${warning.message}`;
177
+ }
178
+ function describeRepo(repo) {
179
+ const title = repo.name === null ? repo.dir : `${repo.name}${repo.version === null ? '' : '@' + repo.version} ${repo.dir}`;
180
+ return [
181
+ title,
182
+ ...repo.problems.map(function (problem) { return ' - ' + describeProblem(problem); }),
183
+ ...repo.warnings.map(function (warning) { return ' ? ' + describeWarning(warning); }),
184
+ ];
185
+ }
186
+ export const CATEGORY_LABEL = {
187
+ 'uncommitted': 'falta commitear',
188
+ 'unpushed': 'falta pushear',
189
+ 'altered-node-modules': 'node_modules alterado',
190
+ 'waiting-dependencies': 'espera dependencias',
191
+ 'outdated-dependencies': 'dependencias desactualizadas',
192
+ 'version-not-bumped': 'falta subir versión',
193
+ 'unpublished': 'falta publicar',
194
+ };
195
+ function describeStep(step) {
196
+ const details = [];
197
+ if (step.dependsOn.length > 0)
198
+ details.push('depende de ' + step.dependsOn.join(', '));
199
+ if (step.inCycleWith.length > 0)
200
+ details.push('ciclo con ' + step.inCycleWith.join(', '));
201
+ if (step.deferred.length > 0)
202
+ details.push(`ciclo: ${step.deferred.join(', ')} ${step.deferred.length === 1 ? 'se actualiza' : 'se actualizan'} después`);
203
+ const folder = basename(step.dir);
204
+ const label = step.mainProblem === null ? 'por dependencia' : CATEGORY_LABEL[step.mainProblem];
205
+ return ` ${step.level + 1}. ${step.name}${folder === step.name ? '' : ` [${folder}]`} ${label}` + (details.length > 0 ? ` (${details.join('; ')})` : '');
206
+ }
207
+ export function formatReport(report) {
208
+ const withProblems = report.repos.filter(function (repo) { return repo.problems.length > 0; });
209
+ const withWarningsOnly = report.repos.filter(function (repo) { return repo.problems.length === 0 && repo.warnings.length > 0; });
210
+ const lines = [`${plural(withProblems.length, 'repositorio con problemas', 'repositorios con problemas')} de ${report.repos.length} revisados` +
211
+ (report.ignored.length > 0 ? ` (${plural(report.ignored.length, 'ignorado', 'ignorados')}: ${report.ignored.map(function (dir) { return basename(dir); }).join(', ')})` : '')];
212
+ for (const repo of [...withProblems, ...withWarningsOnly])
213
+ lines.push('', ...describeRepo(repo));
214
+ if (report.cleanupOrder.length > 0) {
215
+ lines.push('', 'Orden de limpieza (los del mismo número no dependen entre sí):', ...report.cleanupOrder.map(describeStep));
216
+ }
217
+ if (report.warnings.length > 0)
218
+ lines.push('', ...report.warnings.map(describeWarning));
219
+ return lines.join('\n') + '\n';
220
+ }
221
+ export async function main(argv) {
222
+ try {
223
+ const options = parseArgs(argv, readDefaults(defaultsPath(), DEFAULTS_FILE_LABEL));
224
+ const reviewOptions = {
225
+ roots: options.roots,
226
+ ignore: options.ignore,
227
+ dependencyPriority: options.priority,
228
+ registry: createNpmRegistry(options.registry),
229
+ log: function (message) { if (process.stderr.isTTY)
230
+ process.stderr.write(`\r\u001b[K${message}`); },
231
+ };
232
+ const report = await reviewEnvironment(reviewOptions);
233
+ if (process.stderr.isTTY)
234
+ process.stderr.write('\r\u001b[K');
235
+ process.stdout.write(options.json ? JSON.stringify(report, null, 2) + '\n' : formatReport(report));
236
+ return report.repos.some(function (repo) { return repo.problems.length > 0; }) ? EXIT_CODE.problems : EXIT_CODE.clean;
237
+ }
238
+ catch (err) {
239
+ if (process.stderr.isTTY)
240
+ process.stderr.write('\r\u001b[K');
241
+ process.stderr.write(`bussing: ${err instanceof Error ? err.message : String(err)}\n`);
242
+ return EXIT_CODE.error;
243
+ }
244
+ }
245
+ // Solo se ejecuta al invocarlo como programa (no al importarlo desde los tests)
246
+ if (import.meta.main) {
247
+ main(process.argv.slice(2)).then(function (code) { process.exitCode = code; }, function (err) {
248
+ process.stderr.write(`${err instanceof Error ? err.stack ?? err.message : String(err)}\n`);
249
+ process.exitCode = EXIT_CODE.error;
250
+ });
251
+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AI,CAAC,CAAC;QACvF,OAAO,SAAS,CAAC,KAAK,CAAC;IAC3B,CAAC;AACL,CAAC;AAED,gFAAgF;AAChF,IAAI,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;IACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU,GAAY;QACjG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3F,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC;IACvC,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { BussingOptions, BussingReport } from './types.js';
2
+ export type * from './types.js';
3
+ export { createNpmRegistry, DEFAULT_REGISTRY_URL } from './registry.js';
4
+ export { mainCategory, PROBLEM_CATEGORIES, PROBLEM_CATEGORY } from './categories.js';
5
+ export declare function reviewEnvironment(options: BussingOptions): Promise<BussingReport>;
@@ -0,0 +1,134 @@
1
+ // bussing: revisa el ambiente local de repositorios y arma el orden de limpieza.
2
+ // Es la librería (el core): no lee process.argv, no escribe en la salida y no termina el proceso.
3
+ import { basename } from 'node:path';
4
+ import { mainCategory } from './categories.js';
5
+ import { checkCrossDependencies, checkGit, checkInstallation, checkPublication } from './checks.js';
6
+ import { computeCleanupOrder } from './order.js';
7
+ import { createNpmRegistry } from './registry.js';
8
+ import { declaredDependencies, findRepos, ORDER_DEPENDENCY_FIELDS, readPackageJson, WEAK_ORDER_DEPENDENCY_FIELDS } from './repos.js';
9
+ import { defined, mustGet } from './util.js';
10
+ export { createNpmRegistry, DEFAULT_REGISTRY_URL } from './registry.js';
11
+ export { mainCategory, PROBLEM_CATEGORIES, PROBLEM_CATEGORY } from './categories.js';
12
+ /** Cantidad de repositorios que se revisan en paralelo. */
13
+ const CONCURRENCY = 8;
14
+ async function mapWithConcurrency(items, limit, fn) {
15
+ const results = new Array(items.length);
16
+ let next = 0;
17
+ async function worker() {
18
+ while (next < items.length) {
19
+ const i = next++;
20
+ results[i] = await fn(defined(items[i], 'elemento'));
21
+ }
22
+ }
23
+ await Promise.all(Array.from({ length: Math.min(limit, items.length) }, worker));
24
+ return results;
25
+ }
26
+ function errorMessage(err) {
27
+ return err instanceof Error ? err.message : String(err);
28
+ }
29
+ /** Ejecuta un control; si falla, lo informa como advertencia del repositorio en lugar de interrumpir la revisión. */
30
+ async function runCheck(report, check, fn) {
31
+ try {
32
+ const result = await fn();
33
+ report.problems.push(...result.problems);
34
+ report.warnings.push(...result.warnings);
35
+ }
36
+ catch (err) {
37
+ report.warnings.push({ check, message: `falló el control: ${errorMessage(err)}` });
38
+ }
39
+ }
40
+ export async function reviewEnvironment(options) {
41
+ const registry = options.registry ?? createNpmRegistry();
42
+ const log = options.log ?? function () { };
43
+ const warnings = [];
44
+ const ignore = options.ignore ?? [];
45
+ const { repos: dirs, ignored } = await findRepos(options.roots, ignore);
46
+ for (const name of ignore) {
47
+ if (!ignored.some(function (dir) { return basename(dir) === name; })) {
48
+ warnings.push({ check: 'repo', message: `ninguna carpeta de repositorio se llama ${name} (ignore)` });
49
+ }
50
+ }
51
+ log(`${dirs.length} repositorios encontrados`);
52
+ // package.json de cada repositorio
53
+ const repos = await Promise.all(dirs.map(async function (dir) {
54
+ const report = { dir, name: null, version: null, problems: [], warnings: [] };
55
+ try {
56
+ const pkg = await readPackageJson(dir);
57
+ report.name = pkg.name ?? null;
58
+ report.version = pkg.version ?? null;
59
+ return { report, pkg };
60
+ }
61
+ catch (err) {
62
+ report.warnings.push({ check: 'repo', message: `no se pudo leer package.json: ${errorMessage(err)}` });
63
+ return { report, pkg: null };
64
+ }
65
+ }));
66
+ // Nombres locales: los que corresponden a más de un repositorio no se usan para dependencias cruzadas ni orden
67
+ const dirsByName = new Map();
68
+ for (const { report } of repos) {
69
+ if (report.name !== null)
70
+ dirsByName.set(report.name, [...(dirsByName.get(report.name) ?? []), report.dir]);
71
+ }
72
+ const uniqueDirByName = new Map();
73
+ const localVersions = new Map();
74
+ for (const [name, list] of dirsByName) {
75
+ if (list.length > 1) {
76
+ warnings.push({ check: 'cross-dependencies', message: `el paquete ${name} está en varios repositorios (${list.join(', ')}); no se usa para dependencias cruzadas ni para el orden` });
77
+ continue;
78
+ }
79
+ const dir = defined(list[0], 'carpeta del repositorio');
80
+ uniqueDirByName.set(name, dir);
81
+ const version = repos.find(function (repo) { return repo.report.dir === dir; })?.report.version;
82
+ if (version !== null && version !== undefined)
83
+ localVersions.set(name, version);
84
+ }
85
+ const localNames = new Set(dirsByName.keys());
86
+ await mapWithConcurrency(repos, CONCURRENCY, async function ({ report, pkg }) {
87
+ log(`revisando ${report.dir}`);
88
+ let gitState = null;
89
+ await runCheck(report, 'git', async function () {
90
+ const result = await checkGit(report.dir);
91
+ gitState = result.state;
92
+ return result;
93
+ });
94
+ if (pkg === null)
95
+ return;
96
+ await runCheck(report, 'publication', function () { return checkPublication(report.dir, pkg, gitState, registry); });
97
+ await runCheck(report, 'cross-dependencies', function () { return checkCrossDependencies(pkg, localVersions); });
98
+ await runCheck(report, 'installation', function () { return checkInstallation(report.dir, localNames, registry); });
99
+ });
100
+ function localDependencies(report, pkg, fields) {
101
+ const result = new Set();
102
+ for (const dep of pkg === null ? [] : declaredDependencies(pkg, fields)) {
103
+ const depDir = uniqueDirByName.get(dep.name);
104
+ if (depDir !== undefined && depDir !== report.dir)
105
+ result.add(depDir);
106
+ }
107
+ return [...result];
108
+ }
109
+ const priority = new Map(Object.entries(options.dependencyPriority ?? {}));
110
+ for (const name of priority.keys()) {
111
+ if (!uniqueDirByName.has(name))
112
+ warnings.push({ check: 'order', message: `ningún repositorio revisado tiene el paquete ${name} (prioridad de dependencia)` });
113
+ }
114
+ const nodes = repos.map(function ({ report, pkg }) {
115
+ return {
116
+ dir: report.dir,
117
+ name: report.name ?? basename(report.dir),
118
+ mainProblem: mainCategory(report.problems, function () { return false; }),
119
+ dependsOn: localDependencies(report, pkg, ORDER_DEPENDENCY_FIELDS),
120
+ weakDependsOn: localDependencies(report, pkg, WEAK_ORDER_DEPENDENCY_FIELDS),
121
+ };
122
+ });
123
+ const cleanupOrder = computeCleanupOrder(nodes, priority);
124
+ // "espera dependencias" solo si alguna dependencia desactualizada con problemas propios queda antes en el orden
125
+ const hasProblems = new Set(repos.filter(function (repo) { return repo.report.problems.length > 0; }).map(function (repo) { return repo.report.name; }));
126
+ const reportByDir = new Map(repos.map(function (repo) { return [repo.report.dir, repo.report]; }));
127
+ for (const step of cleanupOrder) {
128
+ step.mainProblem = mainCategory(mustGet(reportByDir, step.dir).problems, function (name) {
129
+ return hasProblems.has(name) && step.dependsOn.includes(name);
130
+ });
131
+ }
132
+ return { repos: repos.map(function (repo) { return repo.report; }), ignored, cleanupOrder, warnings };
133
+ }
134
+ //# sourceMappingURL=bussing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bussing.js","sourceRoot":"","sources":["../src/bussing.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,kGAAkG;AAElG,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,gBAAgB,EAAwC,MAAM,aAAa,CAAC;AAC1I,OAAO,EAAE,mBAAmB,EAAkB,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,uBAAuB,EAAE,eAAe,EAAE,4BAA4B,EAAoB,MAAM,YAAY,CAAC;AACv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AAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,UAAU,IAAI;YACnF,OAAO,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;AAC1G,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Problem, ProblemCategory, ProblemKind } from './types.js';
2
+ /**
3
+ * De la más grave a la menos grave. Primero lo que puede hacer perder trabajo, después lo que hace fallar en otros entornos.
4
+ * Las dependencias desactualizadas van antes de subir la versión porque al corregirlas cambia el package.json.
5
+ */
6
+ export declare const PROBLEM_CATEGORIES: readonly ProblemCategory[];
7
+ /** Categoría de cada tipo de problema. `waiting-dependencies` no corresponde a un tipo: la determina `mainCategory`. */
8
+ export declare const PROBLEM_CATEGORY: Record<ProblemKind, ProblemCategory>;
9
+ /**
10
+ * Categoría más grave entre los problemas; `null` si no hay problemas.
11
+ * Si la más grave es `outdated-dependencies` y hay que esperar a alguna de esas dependencias (`mustWait`),
12
+ * la categoría es `waiting-dependencies`.
13
+ */
14
+ export declare function mainCategory(problems: Problem[], mustWait: (name: string) => boolean): ProblemCategory | null;