komplian 0.3.6 → 0.3.7
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/README.md +2 -1
- package/komplian-onboard.mjs +11 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
2. Browser login: `gh auth login -h github.com -s repo -s read:org -w`
|
|
7
7
|
3. `npx komplian onboard --yes`
|
|
8
8
|
|
|
9
|
-
No OAuth App registration — `gh` uses GitHub’s built-in flow. Default workspace
|
|
9
|
+
No OAuth App registration — `gh` uses GitHub’s built-in flow. **Default workspace:** current working directory (`process.cwd()`), not `~/komplian`. Pass a path as last argument to clone elsewhere.
|
|
10
|
+
**npm install** runs with `--no-audit --no-fund` unless `KOMPLIAN_NPM_AUDIT=1`. Run `npm audit` in each repo when you work on it.
|
|
10
11
|
|
|
11
12
|
**Maintainers:** publish from **`scripts/`** (folder with `package.json`), not the monorepo root:
|
|
12
13
|
|
package/komplian-onboard.mjs
CHANGED
|
@@ -311,13 +311,18 @@ function npmInstallEach(workspace) {
|
|
|
311
311
|
log(`${c.yellow}○${c.reset} npm no está en PATH — omito installs`);
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
|
+
const audit =
|
|
315
|
+
process.env.KOMPLIAN_NPM_AUDIT === "1" || process.env.KOMPLIAN_NPM_AUDIT === "true";
|
|
316
|
+
const installArgs = audit
|
|
317
|
+
? ["install"]
|
|
318
|
+
: ["install", "--no-audit", "--no-fund"];
|
|
314
319
|
for (const ent of readdirSync(workspace)) {
|
|
315
320
|
const d = join(workspace, ent);
|
|
316
321
|
if (!statSync(d).isDirectory()) continue;
|
|
317
322
|
const pkg = join(d, "package.json");
|
|
318
323
|
if (!existsSync(pkg)) continue;
|
|
319
324
|
log(`${c.dim}→${c.reset} ${ent}`);
|
|
320
|
-
const ir = spawnSync("npm",
|
|
325
|
+
const ir = spawnSync("npm", installArgs, spawnWin({ cwd: d, stdio: "inherit" }));
|
|
321
326
|
if (ir.status !== 0) {
|
|
322
327
|
log(`${c.yellow}○${c.reset} npm install con avisos en ${ent}`);
|
|
323
328
|
} else {
|
|
@@ -334,6 +339,7 @@ function usage() {
|
|
|
334
339
|
log(` Requisitos: Node 18+, git, GitHub CLI (gh)`);
|
|
335
340
|
log(``);
|
|
336
341
|
log(` onboard implica --install salvo --no-install`);
|
|
342
|
+
log(` [carpeta] Destino (por defecto: directorio actual, no ~/komplian)`);
|
|
337
343
|
log(` -y, --yes Sin menú interactivo (equipo por defecto del JSON)`);
|
|
338
344
|
log(` -t, --team <slug> Equipo en komplian-team-repos.json`);
|
|
339
345
|
log(` -i, --install npm install en cada repo con package.json`);
|
|
@@ -480,7 +486,7 @@ async function main() {
|
|
|
480
486
|
|
|
481
487
|
let workspace = args.workspace.trim();
|
|
482
488
|
if (!workspace) {
|
|
483
|
-
workspace =
|
|
489
|
+
workspace = process.cwd();
|
|
484
490
|
}
|
|
485
491
|
const abs = resolve(workspace.replace(/^~(?=$|[/\\])/, homedir()));
|
|
486
492
|
if (!isSafeTargetDir(abs)) {
|
|
@@ -514,6 +520,9 @@ async function main() {
|
|
|
514
520
|
log(`${c.yellow}○${c.reset} ${failed} repo(s) fallaron — revisa acceso y reintenta.`);
|
|
515
521
|
}
|
|
516
522
|
log(`${c.green}✓${c.reset} Cursor: ${c.bold}File → Open Folder → ${abs}${c.reset}`);
|
|
523
|
+
log(
|
|
524
|
+
`${c.dim} npm install usa --no-audit --no-fund (menos ruido). Auditoría: cd cada repo y npm audit. KOMPLIAN_NPM_AUDIT=1 para resumen completo.${c.reset}`
|
|
525
|
+
);
|
|
517
526
|
log(`${c.dim} .env.example → .env por proyecto; secretos en 1Password — nunca commit.${c.reset}`);
|
|
518
527
|
}
|
|
519
528
|
|
package/package.json
CHANGED