@warpgogol/repo-extract 1.4.6 → 1.6.0
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 +12 -0
- package/dist/changelog.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +6 -3
- package/dist/extract.d.ts.map +1 -1
- package/dist/extract.js +42 -8
- package/dist/fs/copy.js +1 -1
- package/dist/fs/discover.js +1 -1
- package/dist/fs/git.d.ts +8 -0
- package/dist/fs/git.d.ts.map +1 -1
- package/dist/fs/git.js +65 -3
- package/dist/fs/transform.d.ts +34 -0
- package/dist/fs/transform.d.ts.map +1 -1
- package/dist/fs/transform.js +107 -7
- package/dist/index.js +2 -2
- package/dist/log.d.ts.map +1 -1
- package/dist/log.js +2 -1
- package/dist/postprocess/index.js +1 -1
- package/dist/scan.js +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -198,3 +198,15 @@ This package originated from production engineering work at [Warpgogol](https://
|
|
|
198
198
|
We publish reusable parts of our infrastructure when they can be useful beyond our own projects. It is published independently of any Warpgogol commercial service. Using this package does not create any dependency on Warpgogol.
|
|
199
199
|
|
|
200
200
|
Built for real systems. Shared openly.
|
|
201
|
+
|
|
202
|
+
### Locked export placement
|
|
203
|
+
|
|
204
|
+
Set `lockDestination: true` with `destBase: packages` to require exports at `../packages/<destName>` relative to the source repository cwd. Both names must be single directory names. The exporter rejects a different CLI/API destination, symlink/file destinations or containers, and a leftover `../<destName>` copy. These checks run before any writes, including during `--dry-run`. Existing consumers without this option retain their destination override behavior.
|
|
205
|
+
|
|
206
|
+
The four pipeline SDK export configs enable this check. Run from the `pipelines` repository root (or its sibling session worktree), for example:
|
|
207
|
+
|
|
208
|
+
```sh
|
|
209
|
+
pnpm exec node --import tsx packages/repo-extract/src/cli.ts --config packages/pipeline/pipeline-core/extract.config.yaml --from-head --no-push --dry-run
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Omit `--dry-run` for an authorized local export. Publishing is a separate step; keep `--no-push` for local work. No superfolder launcher is required.
|
package/dist/changelog.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>Initial changelog integration for RFC-0070. Uses dynamic import to gracefully handle missing peer dep.</item>
|
|
10
9
|
<item>RFC-0073: consolidated getLastExportDate — removed local duplicate, imports from fs/git.js.</item>
|
|
11
10
|
<item>RFC-0075: removed dead tryAiCommitMessage() function and unused getLastExportDate import.</item>
|
|
11
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
12
12
|
</CHANGE_SUMMARY>
|
|
13
13
|
*/
|
|
14
14
|
import { existsSync } from "node:fs";
|
package/dist/cli.js
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
</non-goals>
|
|
8
8
|
</MODULE_CONTRACT>
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
|
-
<item>Initial CLI for RFC-0070. Supports --config, --dest, --dry-run, --verbose flags.</item>
|
|
11
10
|
<item>RFC-0074: Catch SecretScanError, GitOperationError, PackageManagerError and exit with code 1. Pass verbose: true.</item>
|
|
12
11
|
<item>RFC-0131: Added --from-head, --ref, --allow-dirty, --no-push flags.</item>
|
|
12
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
13
13
|
</CHANGE_SUMMARY>
|
|
14
14
|
*/
|
|
15
15
|
import { Command } from "commander";
|
package/dist/config.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ declare const ExtractConfigSchema: z.ZodObject<{
|
|
|
31
31
|
monorepoConfigFiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
32
|
onlyBuiltDependencies: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
33
33
|
destBase: z.ZodOptional<z.ZodString>;
|
|
34
|
+
lockDestination: z.ZodOptional<z.ZodBoolean>;
|
|
34
35
|
packageManager: z.ZodOptional<z.ZodEnum<{
|
|
35
36
|
pnpm: "pnpm";
|
|
36
37
|
npm: "npm";
|
|
@@ -58,6 +59,7 @@ declare const ExtractConfigSchema: z.ZodObject<{
|
|
|
58
59
|
}, z.core.$strip>>;
|
|
59
60
|
workspaceFilter: z.ZodOptional<z.ZodString>;
|
|
60
61
|
skipBuild: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
+
skipTests: z.ZodOptional<z.ZodBoolean>;
|
|
61
63
|
}, z.core.$strip>>;
|
|
62
64
|
gitignoreMode: z.ZodDefault<z.ZodEnum<{
|
|
63
65
|
minimal: "minimal";
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA6DhD,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmCvB,CAAC;AAEH,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAQ3E;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/config.js
CHANGED
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>Initial config schema and loader for RFC-0070.</item>
|
|
10
|
-
<item>RFC-0071: Added stripScopes, preservePackages, rootPackageName, customConditions, aiEcosystemFiles, monorepoConfigFiles, onlyBuiltDependencies, destBase, packageManager, gitignoreMode. Changed workspacePrefixes default to [] and copyDirs default to [].</item>
|
|
11
9
|
<item>RFC-0072: Changed packageManager from string to enum. Added CiConfigSchema and ci field.</item>
|
|
12
10
|
<item>RFC-0075: Added excludePathSegments and excludeExtensions fields.</item>
|
|
13
|
-
<item>ADR-0016: Config schema is the single source of truth — all org-specific values are config fields with org-neutral defaults, no behavioral assumptions baked into source code.</item>
|
|
11
|
+
<item>ADR-0016: Config schema is the single source of truth — all org-specific values are config fields with org-neutral defaults, no behavioral assumptions baked into source code; opt-in lockDestination placement policy.</item>
|
|
14
12
|
<item>RFC-0131: Added git.autoReconcile, source, allowDirty fields.</item>
|
|
13
|
+
<item>RFC-0175: Added ci.skipTests field.</item>
|
|
14
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
15
|
+
<history>RFC-0071</history>
|
|
15
16
|
</CHANGE_SUMMARY>
|
|
16
17
|
*/
|
|
17
18
|
import { readFile } from "node:fs/promises";
|
|
@@ -64,6 +65,7 @@ const CiConfigSchema = z.object({
|
|
|
64
65
|
deploy: CloudflarePagesDeploySchema.optional(),
|
|
65
66
|
workspaceFilter: z.string().optional(),
|
|
66
67
|
skipBuild: z.boolean().optional(),
|
|
68
|
+
skipTests: z.boolean().optional(),
|
|
67
69
|
});
|
|
68
70
|
const ExtractConfigSchema = z.object({
|
|
69
71
|
projectDir: z.string().min(1),
|
|
@@ -83,6 +85,7 @@ const ExtractConfigSchema = z.object({
|
|
|
83
85
|
monorepoConfigFiles: z.array(z.string()).optional(),
|
|
84
86
|
onlyBuiltDependencies: z.array(z.string()).default([]),
|
|
85
87
|
destBase: z.string().optional(),
|
|
88
|
+
lockDestination: z.boolean().optional(),
|
|
86
89
|
packageManager: z.enum(["pnpm", "npm", "yarn"]).optional(),
|
|
87
90
|
ci: CiConfigSchema.optional(),
|
|
88
91
|
gitignoreMode: z.enum(["minimal", "extended"]).default("extended"),
|
package/dist/extract.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../src/extract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../src/extract.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,aAAa,EAEb,cAAc,EACd,aAAa,EAGd,MAAM,YAAY,CAAC;AA2CpB,wBAAsB,cAAc,CAClC,MAAM,EAAE,aAAa,EACrB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,aAAa,CAAC,CAmMxB"}
|
package/dist/extract.js
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
|
-
<purpose>
|
|
3
|
+
<purpose>extract — core extraction orchestrator — monorepo and standalone modes. for reliable use by its direct callers and maintainers.</purpose>
|
|
4
4
|
<non-goals>
|
|
5
5
|
<item>Does not parse CLI args (see cli.ts).</item>
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>Initial extractProject orchestrator for RFC-0070. Ports main() and exportStandalonePackage() from scripts/export-clients.ts.</item>
|
|
10
|
-
<item>RFC-0071: Replaced hardcoded destBase, AI files, copyDirs defaults with config-driven options. Pass config to transform functions.</item>
|
|
11
|
-
<item>RFC-0072: Added detectPackageManager, parameterized install command, CI workflow, and all transform functions for pnpm/npm/yarn.</item>
|
|
12
9
|
<item>RFC-0073: replaced execSync with execFileSync (argument arrays) to eliminate shell injection.</item>
|
|
13
10
|
<item>RFC-0074: Replaced process.exit(1) with SecretScanError. Changed return type to Promise<ExtractResult>. Added progress events, logger, PackageManagerError wrapping.</item>
|
|
14
11
|
<item>RFC-0075: Consolidated all inline await import("node:fs*") to top-level static imports.</item>
|
|
15
|
-
<item>
|
|
16
|
-
<item>
|
|
12
|
+
<item>RFC-0131: Clean-source extraction — dirty preflight via assertCleanSource, --from-head/--ref via materializeHeadWorktree, versionBump×head conflict rejection, --no-push autoPush override; opt-in locked destination preflight.</item>
|
|
13
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
14
|
+
<history>RFC-0071, RFC-0072</history>
|
|
17
15
|
</CHANGE_SUMMARY>
|
|
18
16
|
*/
|
|
19
17
|
import { stat, cp, mkdir, writeFile, readFile } from "node:fs/promises";
|
|
20
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
18
|
+
import { existsSync, readFileSync, lstatSync } from "node:fs";
|
|
21
19
|
import { execFileSync } from "node:child_process";
|
|
22
20
|
import * as path from "node:path";
|
|
23
21
|
import { SecretScanError, PackageManagerError, GitOperationError } from "./errors.js";
|
|
@@ -26,7 +24,7 @@ import { getMonorepoConfigFiles, copyBatchSample, copyFiltered, copyStandalonePa
|
|
|
26
24
|
import { buildGitignore, cleanStrayArtifacts, findAppTsconfigs, findPackageJsonFiles, fixAppTsconfigs, fixPackageTsconfigs, fixStandalonePackageJson, fixStandaloneVitestConfig, generateCiWorkflow, generateRootFiles, bumpSourceVersion, regenerateTsconfigBase, transformPackageJson, } from "./fs/transform.js";
|
|
27
25
|
import { discoverPackageDeps } from "./fs/discover.js";
|
|
28
26
|
import { runPostProcess } from "./postprocess/index.js";
|
|
29
|
-
import { assertCleanSource, commitExport, materializeHeadWorktree, transferGitHistory, } from "./fs/git.js";
|
|
27
|
+
import { assertCleanSource, commitExport, ensureNpmTokenSecret, materializeHeadWorktree, transferGitHistory, } from "./fs/git.js";
|
|
30
28
|
import { tryGenerateChangelog } from "./changelog.js";
|
|
31
29
|
import { scanForSecrets } from "./scan.js";
|
|
32
30
|
import { detectPackageManager } from "./package-manager.js";
|
|
@@ -60,6 +58,33 @@ export async function extractProject(config, options = {}) {
|
|
|
60
58
|
}
|
|
61
59
|
const destBase = config.destBase ?? (config.projectDir.startsWith("packages/") ? "packages" : "exports");
|
|
62
60
|
const dest = options.dest ?? path.resolve(realRoot, "..", destBase, config.destName);
|
|
61
|
+
// Validate before dry-run, source materialization, or destination cleanup.
|
|
62
|
+
// Opt-in keeps other consumers' explicit destination workflows unchanged.
|
|
63
|
+
if (config.lockDestination) {
|
|
64
|
+
const segment = (value) => value.length > 0 &&
|
|
65
|
+
value !== "." &&
|
|
66
|
+
value !== ".." &&
|
|
67
|
+
!/[\\/]/.test(value) &&
|
|
68
|
+
!path.isAbsolute(value);
|
|
69
|
+
if (!segment(destBase) || !segment(config.destName)) {
|
|
70
|
+
fail(new GitOperationError("preflight", "Locked destination requires single directory names for destBase and destName"));
|
|
71
|
+
}
|
|
72
|
+
const container = path.resolve(realRoot, "..", destBase);
|
|
73
|
+
const expected = path.join(container, config.destName);
|
|
74
|
+
if (path.resolve(dest) !== expected) {
|
|
75
|
+
fail(new GitOperationError("preflight", `Destination is locked to ${expected}; remove the destination override`));
|
|
76
|
+
}
|
|
77
|
+
const legacy = path.resolve(realRoot, "..", config.destName);
|
|
78
|
+
if (lstatSync(legacy, { throwIfNoEntry: false })) {
|
|
79
|
+
fail(new GitOperationError("preflight", `Misplaced export exists at ${legacy}; relocate it to ${expected} before exporting`));
|
|
80
|
+
}
|
|
81
|
+
for (const candidate of [container, expected]) {
|
|
82
|
+
const entry = lstatSync(candidate, { throwIfNoEntry: false });
|
|
83
|
+
if (entry && (!entry.isDirectory() || entry.isSymbolicLink())) {
|
|
84
|
+
fail(new GitOperationError("preflight", `Export destination must be a real directory, not a symlink or file: ${candidate}`));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
63
88
|
// RFC-0131: the export reads more than projectDir — declared copy/app/package
|
|
64
89
|
// dirs, root-level config/ecosystem files (explicit or the pm-derived
|
|
65
90
|
// defaults), batch data, postProcess copy sources, and implicit root inputs
|
|
@@ -416,6 +441,11 @@ async function exportMonorepo(root, dest, config, logger, emit) {
|
|
|
416
441
|
else {
|
|
417
442
|
logger.log("Skipping git history transfer (git.history: false)");
|
|
418
443
|
}
|
|
444
|
+
// 15d. Publish-secret bootstrap — before the first push, so generated CI's
|
|
445
|
+
// publish job finds NPM_TOKEN on a fresh repo (RFC-0132, best-effort).
|
|
446
|
+
if (config.git?.autoPush && config.git?.remote && (config.ci?.publish ?? true)) {
|
|
447
|
+
ensureNpmTokenSecret(config.git.remote, logger);
|
|
448
|
+
}
|
|
419
449
|
// 16. Git commit + push
|
|
420
450
|
emit({ phase: "gitCommit", message: changelogCommitMessage });
|
|
421
451
|
const gitResult = await commitExport(dest, changelogCommitMessage, config.git, logger);
|
|
@@ -564,6 +594,10 @@ async function exportStandalonePackage(root, dest, config, logger, emit) {
|
|
|
564
594
|
const pathPrefixes = [config.projectDir];
|
|
565
595
|
emit({ phase: "gitHistory", pathPrefixes });
|
|
566
596
|
await transferGitHistory(root, dest, pathPrefixes, logger);
|
|
597
|
+
// 6d. Publish-secret bootstrap — before the first push (RFC-0132).
|
|
598
|
+
if (config.git?.autoPush && config.git?.remote && (config.ci?.publish ?? true)) {
|
|
599
|
+
ensureNpmTokenSecret(config.git.remote, logger);
|
|
600
|
+
}
|
|
567
601
|
// 7. Git commit + push
|
|
568
602
|
emit({ phase: "gitCommit", message: changelogCommitMessage });
|
|
569
603
|
const gitResult = await commitExport(dest, changelogCommitMessage, config.git, logger);
|
package/dist/fs/copy.js
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
</non-goals>
|
|
8
8
|
</MODULE_CONTRACT>
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
|
-
<item>Ported copyFiltered, copyStandalonePackage, removeDest from scripts/export-clients-helpers.ts for RFC-0070.</item>
|
|
11
10
|
<item>RFC-0071: Split IGNORE_DIRS into BASE_IGNORE_DIRS (org-neutral) and config-driven ignoreDirs. MONOREPO_CONFIG_FILES kept as auto-detect candidate list.</item>
|
|
12
11
|
<item>RFC-0072: Extended IGNORE_FILES with package-lock.json and yarn.lock. Added getMonorepoConfigFiles(pm) to filter pnpm-workspace.yaml for npm/yarn.</item>
|
|
13
12
|
<item>RFC-0075: Consolidated inline import in truncateCsv to top-level. Made isKeyMaterial/isDbFile configurable via excludePathSegments/excludeExtensions.</item>
|
|
13
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
14
14
|
</CHANGE_SUMMARY>
|
|
15
15
|
*/
|
|
16
16
|
import { cp, mkdir, readdir, rm, readFile, writeFile } from "node:fs/promises";
|
package/dist/fs/discover.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>Ported discoverPackageDeps from scripts/export-clients-helpers.ts for RFC-0070. Supports both @syrokomskyi/ and @warpgogol/ prefixes.</item>
|
|
10
9
|
<item>ADR-0082: added resolveSourceVersion — reads a workspace package's version from the source monorepo so preserved deps can be pinned to ^<sourceVersion>.</item>
|
|
10
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
11
11
|
</CHANGE_SUMMARY>
|
|
12
12
|
*/
|
|
13
13
|
import { readFile, readdir } from "node:fs/promises";
|
package/dist/fs/git.d.ts
CHANGED
|
@@ -25,6 +25,14 @@ export declare function materializeHeadWorktree(root: string, ref: string, logge
|
|
|
25
25
|
dir: string;
|
|
26
26
|
cleanup: () => Promise<void>;
|
|
27
27
|
}>;
|
|
28
|
+
/**
|
|
29
|
+
* RFC-0132: fresh extract repos ship no secrets, so the generated workflow's
|
|
30
|
+
* first `npm publish` fails ENEEDAUTH. When the remote is a GitHub repo and
|
|
31
|
+
* `gh` is available, ensure an NPM_TOKEN secret exists — sourced from the
|
|
32
|
+
* operator's own ~/.npmrc authToken. Fully best-effort: every failure mode
|
|
33
|
+
* degrades to a logged hint, never a failed export.
|
|
34
|
+
*/
|
|
35
|
+
export declare function ensureNpmTokenSecret(remote: string | undefined, logger?: Logger): void;
|
|
28
36
|
export declare function getLastExportDate(dest: string): string | null;
|
|
29
37
|
export declare function transferGitHistory(root: string, dest: string, pathPrefixes: string[], logger?: Logger): Promise<boolean>;
|
|
30
38
|
export declare function diffSummary(dest: string): string | null;
|
package/dist/fs/git.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/fs/git.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/fs/git.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGxC,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,SAAS,EACrB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC,CA0KlD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAsBrF;AAID;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAiBrF;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CAkCxD;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAuDtF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW7D;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EAAE,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,OAAO,CAAC,CAsGlB;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoCvD"}
|
package/dist/fs/git.js
CHANGED
|
@@ -6,14 +6,15 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>Initial git helpers for RFC-0070. Ported commitExport from scripts/export-clients.ts.</item>
|
|
10
|
-
<item>RFC-0073: replaced all execSync with execFileSync (argument arrays) to eliminate shell injection.</item>
|
|
11
9
|
<item>RFC-0074: Wrapped execFileSync calls with GitOperationError. Changed commitExport return to { committed, pushed }.</item>
|
|
12
10
|
<item>RFC-0075: Added Windows multi-prefix guard in transferGitHistory().</item>
|
|
13
11
|
<item>RFC-0131: Added assertCleanSource (dirty preflight), materializeHeadWorktree (--from-head), and git.autoReconcile ours-merge retry in commitExport.</item>
|
|
12
|
+
<item>RFC-0132: Added ensureNpmTokenSecret — best-effort NPM_TOKEN bootstrap on the extract repo before first push, sourced from ~/.npmrc.</item>
|
|
13
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
14
|
+
<history>RFC-0073</history>
|
|
14
15
|
</CHANGE_SUMMARY>
|
|
15
16
|
*/
|
|
16
|
-
import { existsSync, rmSync } from "node:fs";
|
|
17
|
+
import { existsSync, rmSync, readFileSync } from "node:fs";
|
|
17
18
|
import { cp, mkdtemp, rm } from "node:fs/promises";
|
|
18
19
|
import * as path from "node:path";
|
|
19
20
|
import * as os from "node:os";
|
|
@@ -274,6 +275,67 @@ export async function materializeHeadWorktree(root, ref, logger) {
|
|
|
274
275
|
},
|
|
275
276
|
};
|
|
276
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* RFC-0132: fresh extract repos ship no secrets, so the generated workflow's
|
|
280
|
+
* first `npm publish` fails ENEEDAUTH. When the remote is a GitHub repo and
|
|
281
|
+
* `gh` is available, ensure an NPM_TOKEN secret exists — sourced from the
|
|
282
|
+
* operator's own ~/.npmrc authToken. Fully best-effort: every failure mode
|
|
283
|
+
* degrades to a logged hint, never a failed export.
|
|
284
|
+
*/
|
|
285
|
+
export function ensureNpmTokenSecret(remote, logger) {
|
|
286
|
+
const log = logger?.log ?? console.log;
|
|
287
|
+
const error = logger?.error ?? console.error;
|
|
288
|
+
const slug = remote?.match(/^git@github\.com:([^/]+)\/(.+?)(?:\.git)?$/) ??
|
|
289
|
+
remote?.match(/^https?:\/\/github\.com\/([^/]+)\/(.+?)(?:\.git)?$/);
|
|
290
|
+
if (!remote || !slug) {
|
|
291
|
+
if (remote)
|
|
292
|
+
log(` npm-token: non-GitHub remote "${remote}" — set NPM_TOKEN manually`);
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
const repo = `${slug[1]}/${slug[2]}`;
|
|
296
|
+
try {
|
|
297
|
+
execFileSync("gh", ["--version"], { stdio: "pipe" });
|
|
298
|
+
}
|
|
299
|
+
catch {
|
|
300
|
+
log(` npm-token: gh CLI not available — set NPM_TOKEN on ${repo} manually before first publish`);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
try {
|
|
304
|
+
const out = execFileSync("gh", ["secret", "list", "--repo", repo], {
|
|
305
|
+
stdio: "pipe",
|
|
306
|
+
}).toString();
|
|
307
|
+
if (/\bNPM_TOKEN\b/.test(out)) {
|
|
308
|
+
log(` npm-token: NPM_TOKEN already set on ${repo}`);
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
catch (err) {
|
|
313
|
+
error(` npm-token: cannot list secrets on ${repo} (${err instanceof Error ? err.message.slice(0, 120) : err}) — set NPM_TOKEN manually`);
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
let token;
|
|
317
|
+
try {
|
|
318
|
+
const npmrc = readFileSync(path.join(os.homedir(), ".npmrc"), "utf-8");
|
|
319
|
+
token = npmrc.match(/^\/\/registry\.npmjs\.org\/:_authToken=(\S+)/m)?.[1];
|
|
320
|
+
}
|
|
321
|
+
catch {
|
|
322
|
+
/* no readable npmrc */
|
|
323
|
+
}
|
|
324
|
+
if (!token) {
|
|
325
|
+
log(` npm-token: no authToken in ~/.npmrc — set NPM_TOKEN on ${repo} manually`);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
try {
|
|
329
|
+
execFileSync("gh", ["secret", "set", "NPM_TOKEN", "--repo", repo], {
|
|
330
|
+
input: token,
|
|
331
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
332
|
+
});
|
|
333
|
+
log(` npm-token: NPM_TOKEN set on ${repo} from ~/.npmrc`);
|
|
334
|
+
}
|
|
335
|
+
catch (err) {
|
|
336
|
+
error(` npm-token: gh secret set failed on ${repo} (${err instanceof Error ? err.message.slice(0, 120) : err}) — set NPM_TOKEN manually`);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
277
339
|
export function getLastExportDate(dest) {
|
|
278
340
|
try {
|
|
279
341
|
const dateStr = execFileSync("git", ["log", "-1", "--format=%ad", "--date=format:%Y-%m-%d"], {
|
package/dist/fs/transform.d.ts
CHANGED
|
@@ -15,5 +15,39 @@ export declare function generateCiWorkflow(pm: PackageManager, ci?: CiConfig, op
|
|
|
15
15
|
}): string | null;
|
|
16
16
|
export declare function bumpSourceVersion(root: string, config: ExtractConfig, logger?: Logger): Promise<void>;
|
|
17
17
|
export declare function fixStandalonePackageJson(dest: string, config: ExtractConfig, pm: PackageManager, root?: string, logger?: Logger): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* RFC-0132: generated CI always runs `<pm> run typecheck`. When the source
|
|
20
|
+
* manifest has no typecheck script but builds via a single `tsc -p <file>`
|
|
21
|
+
* invocation, synthesize `typecheck` as the same command plus `--noEmit`.
|
|
22
|
+
* Only a single tsc invocation is rewritten — composed builds (`a && b`)
|
|
23
|
+
* would append the flag to the wrong segment and stay a human fix.
|
|
24
|
+
*/
|
|
25
|
+
export declare function ensureTypecheckScript(pkg: {
|
|
26
|
+
scripts?: Record<string, string>;
|
|
27
|
+
}, logger?: Logger): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* RFC-0132: `npm publish --provenance` verifies package.json repository.url
|
|
30
|
+
* against the Actions repo slug. Synthesize the field from git.remote when
|
|
31
|
+
* absent — accepting `git@host:owner/repo(.git)` and
|
|
32
|
+
* `https://host/owner/repo(.git)`. A declared-but-mismatched repository is
|
|
33
|
+
* left untouched: wrong data is a human decision, not a healing target.
|
|
34
|
+
*/
|
|
35
|
+
export declare function ensureRepositoryField(pkg: {
|
|
36
|
+
repository?: unknown;
|
|
37
|
+
}, remote: string | undefined, logger?: Logger): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* RFC-0132: scan the exported tree for test files. Exclusion rules can strip
|
|
40
|
+
* a package's whole test surface; the answer decides whether the test script
|
|
41
|
+
* needs --passWithNoTests.
|
|
42
|
+
*/
|
|
43
|
+
export declare function hasAnyTestFiles(dir: string): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* RFC-0132: vitest exits 1 on an empty suite, and generated CI always runs
|
|
46
|
+
* the test step. When the export ships no test files, make the script
|
|
47
|
+
* tolerate it — shipping a later test file restores real coverage.
|
|
48
|
+
*/
|
|
49
|
+
export declare function ensureTestScriptTolerant(pkg: {
|
|
50
|
+
scripts?: Record<string, string>;
|
|
51
|
+
}, logger?: Logger): boolean;
|
|
18
52
|
export declare function fixStandaloneVitestConfig(dest: string, logger?: Logger): Promise<void>;
|
|
19
53
|
//# sourceMappingURL=transform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/fs/transform.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAIxC,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CA2Df;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA0D5F;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAY7F;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CA8Bf;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAOzF;AAmBD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAO1F;AAmBD,wBAAgB,cAAc,CAAC,UAAU,GAAE,MAAM,EA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EAAE,MAAM,EACZ,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAmCf;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,cAAc,EAClB,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAkFf;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,EACzC,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAUT;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,EAC7B,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAUT;AAID;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAiBpD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,EACzC,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAST;AAmBD,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAe5F"}
|
package/dist/fs/transform.js
CHANGED
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>Ported transformPackageJson, fixPackageTsconfigs, fixAppTsconfigs, regenerateTsconfigBase, generateRootFiles from scripts/export-clients-helpers.ts for RFC-0070.</item>
|
|
10
|
-
<item>ADR-0010: added lint step, npm publish --provenance, and id-token: write to generateCiWorkflow()</item>
|
|
11
|
-
<item>RFC-0071: Replaced hardcoded org-specific values with config-driven options (stripScopes, preservePackages, rootPackageName, customConditions, onlyBuiltDependencies, packageManager, gitignoreMode).</item>
|
|
12
9
|
<item>RFC-0072: Parameterized buildRootPackageJson, generateRootFiles, generateCiWorkflow, fixStandalonePackageJson for pnpm/npm/yarn support.</item>
|
|
13
|
-
<item>Fix: Split generateCiWorkflow into ci + publish jobs — publish only on push to main, with registry-url for NODE_AUTH_TOKEN.</item>
|
|
14
10
|
<item>ADR-0082: preservePackages workspace:* deps now pin to ^<sourceVersion> instead of * — extracted lockfiles resolve the just-published sibling under pnpm minimumReleaseAge.</item>
|
|
15
11
|
<item>RFC-1081: Added gh release create step after npm publish with --generate-notes and || true for tag collision. Updated publish job permissions to contents: write. (Ported back from standalone repo — was committed there directly on 2026-09-13.)</item>
|
|
12
|
+
<item>RFC-0132: standalone manifest self-healing — ensureTypecheckScript (build+--noEmit), ensureRepositoryField (from git.remote), ensureTestScriptTolerant (--passWithNoTests when no test files ship).</item>
|
|
13
|
+
<item>RFC-0175: generateCiWorkflow honors ci.skipTests — no test step, no ~/.ssh provision.</item>
|
|
14
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
15
|
+
<history>ADR-0010, RFC-0071</history>
|
|
16
16
|
</CHANGE_SUMMARY>
|
|
17
17
|
*/
|
|
18
18
|
import { readFile, writeFile, rm, access, readdir } from "node:fs/promises";
|
|
19
|
-
import { readFileSync } from "node:fs";
|
|
19
|
+
import { readFileSync, readdirSync } from "node:fs";
|
|
20
20
|
import * as path from "node:path";
|
|
21
21
|
import { isIgnored } from "./copy.js";
|
|
22
22
|
import { resolveSourceVersion } from "./discover.js";
|
|
@@ -452,6 +452,9 @@ export function generateCiWorkflow(pm, ci, opts) {
|
|
|
452
452
|
: [];
|
|
453
453
|
const ciSetupSteps = [
|
|
454
454
|
" - uses: actions/checkout@v5",
|
|
455
|
+
" with:",
|
|
456
|
+
// Full history: exported packages' tests may clone the repo (shallow fails).
|
|
457
|
+
" fetch-depth: 0",
|
|
455
458
|
...pnpmSetup,
|
|
456
459
|
" - uses: actions/setup-node@v5",
|
|
457
460
|
" with:",
|
|
@@ -463,7 +466,14 @@ export function generateCiWorkflow(pm, ci, opts) {
|
|
|
463
466
|
if (!ci?.skipBuild) {
|
|
464
467
|
buildSteps.push(` - run: ${runPrefix} build`);
|
|
465
468
|
}
|
|
466
|
-
buildSteps.push(` - run: ${runPrefix} lint`, ` - run: ${runPrefix} typecheck
|
|
469
|
+
buildSteps.push(` - run: ${runPrefix} lint`, ` - run: ${runPrefix} typecheck`);
|
|
470
|
+
// RFC-0175: ci.skipTests omits the export-side test re-run (and its ~/.ssh
|
|
471
|
+
// provision) — heavyweight suites re-verify what monorepo gates already ran.
|
|
472
|
+
if (!ci?.skipTests) {
|
|
473
|
+
buildSteps.push(
|
|
474
|
+
// Exported tests may probe ~/.ssh/config; runners ship no ~/.ssh dir.
|
|
475
|
+
" - run: mkdir -p ~/.ssh", ` - run: ${testCmd}`);
|
|
476
|
+
}
|
|
467
477
|
const lines = [
|
|
468
478
|
"name: CI",
|
|
469
479
|
"",
|
|
@@ -479,7 +489,7 @@ export function generateCiWorkflow(pm, ci, opts) {
|
|
|
479
489
|
"jobs:",
|
|
480
490
|
" ci:",
|
|
481
491
|
" runs-on: ubuntu-latest",
|
|
482
|
-
" timeout-minutes:
|
|
492
|
+
" timeout-minutes: 30",
|
|
483
493
|
" steps:",
|
|
484
494
|
...ciSetupSteps,
|
|
485
495
|
...buildSteps,
|
|
@@ -589,11 +599,101 @@ export async function fixStandalonePackageJson(dest, config, pm, root, logger) {
|
|
|
589
599
|
changed = true;
|
|
590
600
|
}
|
|
591
601
|
}
|
|
602
|
+
// RFC-0132: heal the manifest against the generated-CI and npm-provenance
|
|
603
|
+
// contracts — see ensureTypecheckScript / ensureRepositoryField /
|
|
604
|
+
// ensureTestScriptTolerant for the exact shapes.
|
|
605
|
+
if (ensureTypecheckScript(pkg, logger))
|
|
606
|
+
changed = true;
|
|
607
|
+
if (ensureRepositoryField(pkg, config.git?.remote, logger))
|
|
608
|
+
changed = true;
|
|
609
|
+
if (!hasAnyTestFiles(dest) && ensureTestScriptTolerant(pkg, logger))
|
|
610
|
+
changed = true;
|
|
592
611
|
if (changed) {
|
|
593
612
|
await writeFile(pkgPath, JSON.stringify(pkg, null, 2) + "\n", "utf-8");
|
|
594
613
|
(logger?.log ?? console.log)(" fixed standalone package.json (test script, workspace deps, packageManager)");
|
|
595
614
|
}
|
|
596
615
|
}
|
|
616
|
+
/**
|
|
617
|
+
* RFC-0132: generated CI always runs `<pm> run typecheck`. When the source
|
|
618
|
+
* manifest has no typecheck script but builds via a single `tsc -p <file>`
|
|
619
|
+
* invocation, synthesize `typecheck` as the same command plus `--noEmit`.
|
|
620
|
+
* Only a single tsc invocation is rewritten — composed builds (`a && b`)
|
|
621
|
+
* would append the flag to the wrong segment and stay a human fix.
|
|
622
|
+
*/
|
|
623
|
+
export function ensureTypecheckScript(pkg, logger) {
|
|
624
|
+
const scripts = pkg.scripts;
|
|
625
|
+
if (!scripts || typeof scripts.typecheck === "string" || typeof scripts.build !== "string") {
|
|
626
|
+
return false;
|
|
627
|
+
}
|
|
628
|
+
const build = scripts.build.trim();
|
|
629
|
+
if (/&&|\|\||;/.test(build) || !/(pnpm exec )?tsc -p \S+/.test(build))
|
|
630
|
+
return false;
|
|
631
|
+
scripts.typecheck = `${build} --noEmit`;
|
|
632
|
+
(logger?.log ?? console.log)(` healed scripts.typecheck: "${scripts.typecheck}"`);
|
|
633
|
+
return true;
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* RFC-0132: `npm publish --provenance` verifies package.json repository.url
|
|
637
|
+
* against the Actions repo slug. Synthesize the field from git.remote when
|
|
638
|
+
* absent — accepting `git@host:owner/repo(.git)` and
|
|
639
|
+
* `https://host/owner/repo(.git)`. A declared-but-mismatched repository is
|
|
640
|
+
* left untouched: wrong data is a human decision, not a healing target.
|
|
641
|
+
*/
|
|
642
|
+
export function ensureRepositoryField(pkg, remote, logger) {
|
|
643
|
+
if (!remote || pkg.repository !== undefined)
|
|
644
|
+
return false;
|
|
645
|
+
const m = remote.match(/^[a-z]+@([^:/]+):([^/]+)\/(.+?)(?:\.git)?$/) ??
|
|
646
|
+
remote.match(/^https?:\/\/([^/]+)\/([^/]+)\/(.+?)(?:\.git)?$/);
|
|
647
|
+
if (!m)
|
|
648
|
+
return false;
|
|
649
|
+
const [, host, owner, repo] = m;
|
|
650
|
+
pkg.repository = { type: "git", url: `git+https://${host}/${owner}/${repo}.git` };
|
|
651
|
+
(logger?.log ?? console.log)(` healed repository: git+https://${host}/${owner}/${repo}.git`);
|
|
652
|
+
return true;
|
|
653
|
+
}
|
|
654
|
+
const TEST_FILE_RE = /\.(test|spec)\.(ts|tsx|js|jsx|mjs|cjs)$/;
|
|
655
|
+
/**
|
|
656
|
+
* RFC-0132: scan the exported tree for test files. Exclusion rules can strip
|
|
657
|
+
* a package's whole test surface; the answer decides whether the test script
|
|
658
|
+
* needs --passWithNoTests.
|
|
659
|
+
*/
|
|
660
|
+
export function hasAnyTestFiles(dir) {
|
|
661
|
+
let entries;
|
|
662
|
+
try {
|
|
663
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
664
|
+
}
|
|
665
|
+
catch {
|
|
666
|
+
return false;
|
|
667
|
+
}
|
|
668
|
+
for (const e of entries) {
|
|
669
|
+
if (e.name === "node_modules" || e.name === ".git")
|
|
670
|
+
continue;
|
|
671
|
+
const full = path.join(dir, e.name);
|
|
672
|
+
if (e.isDirectory()) {
|
|
673
|
+
if (hasAnyTestFiles(full))
|
|
674
|
+
return true;
|
|
675
|
+
}
|
|
676
|
+
else if (TEST_FILE_RE.test(e.name)) {
|
|
677
|
+
return true;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
return false;
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* RFC-0132: vitest exits 1 on an empty suite, and generated CI always runs
|
|
684
|
+
* the test step. When the export ships no test files, make the script
|
|
685
|
+
* tolerate it — shipping a later test file restores real coverage.
|
|
686
|
+
*/
|
|
687
|
+
export function ensureTestScriptTolerant(pkg, logger) {
|
|
688
|
+
const test = pkg.scripts?.test;
|
|
689
|
+
if (typeof test !== "string" || test.includes("passWithNoTests"))
|
|
690
|
+
return false;
|
|
691
|
+
if (!/vitest|jest/.test(test))
|
|
692
|
+
return false;
|
|
693
|
+
pkg.scripts.test = `${test} --passWithNoTests`;
|
|
694
|
+
(logger?.log ?? console.log)(` healed scripts.test: "${pkg.scripts.test}" (no test files in export)`);
|
|
695
|
+
return true;
|
|
696
|
+
}
|
|
597
697
|
async function rewriteWorkspaceSpecifier(depName, preservePackages, root, logger) {
|
|
598
698
|
if (!root || !preservePackages.includes(depName))
|
|
599
699
|
return "*";
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
|
-
<purpose>
|
|
3
|
+
<purpose>index — public API exports for @warpgogol/repo-extract. for reliable use by its direct callers and maintainers.</purpose>
|
|
4
4
|
<non-goals>
|
|
5
5
|
<item>Does not implement CLI parsing (see cli.ts).</item>
|
|
6
6
|
<item>Does not implement config loading (see config.ts).</item>
|
|
7
7
|
</non-goals>
|
|
8
8
|
</MODULE_CONTRACT>
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
|
-
<item>Initial scaffold for RFC-0070.</item>
|
|
11
10
|
<item>RFC-0074: Added diffSummary, buildGitignore, buildRootPackageJson, isIgnored, ExtractResult, ExtractProgressEvent, ProgressCallback, error class exports.</item>
|
|
12
11
|
<item>RFC-0131: Added assertCleanSource and materializeHeadWorktree exports.</item>
|
|
12
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
13
13
|
</CHANGE_SUMMARY>
|
|
14
14
|
*/
|
|
15
15
|
export { loadConfig, ExtractConfigSchema } from "./config.js";
|
package/dist/log.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,MAAM;IACrB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAStD"}
|
package/dist/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
|
-
<purpose>
|
|
3
|
+
<purpose>log — minimal logging abstraction — gates console output on verbose flag for library-grade use.</purpose>
|
|
4
4
|
<non-goals>
|
|
5
5
|
<item>Does not implement structured logging or log levels beyond log/error.</item>
|
|
6
6
|
<item>Does not depend on external logging libraries.</item>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
</MODULE_CONTRACT>
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
10
|
<item>RFC-0074: Initial logger — Logger interface and createLogger factory.</item>
|
|
11
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
11
12
|
</CHANGE_SUMMARY>
|
|
12
13
|
*/
|
|
13
14
|
export function createLogger(verbose) {
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>Initial post-process rule runner for RFC-0070.</item>
|
|
10
9
|
<item>RFC-0074: Added optional onProgress callback for per-rule progress events.</item>
|
|
10
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
11
11
|
</CHANGE_SUMMARY>
|
|
12
12
|
*/
|
|
13
13
|
import { readFile, writeFile, rm, cp, mkdir } from "node:fs/promises";
|
package/dist/scan.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>Initial secret scanner: AWS keys, private keys, generic tokens, pre-signed S3 URLs.</item>
|
|
10
9
|
<item>RFC-0075: removed duplicate SecretFinding interface (import from types.ts). Consolidated inline import to top-level.</item>
|
|
10
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
11
11
|
</CHANGE_SUMMARY>
|
|
12
12
|
*/
|
|
13
13
|
import { readdir, readFile, stat } from "node:fs/promises";
|
package/dist/types.d.ts
CHANGED
|
@@ -17,6 +17,13 @@ export interface CiConfig {
|
|
|
17
17
|
deploy?: DeployConfig;
|
|
18
18
|
workspaceFilter?: string;
|
|
19
19
|
skipBuild?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* RFC-0175: omit the test step (and its ~/.ssh provision) from the generated
|
|
22
|
+
* CI workflow. For heavyweight suites the export-side re-run re-verifies a
|
|
23
|
+
* tree the monorepo gates already tested pre-export — install/build/lint/
|
|
24
|
+
* typecheck stay as the extraction-fidelity gate. Default: off.
|
|
25
|
+
*/
|
|
26
|
+
skipTests?: boolean;
|
|
20
27
|
}
|
|
21
28
|
export type PostProcessAction = "copy" | "patch" | "delete";
|
|
22
29
|
export interface CopyRule {
|
|
@@ -71,6 +78,8 @@ export interface ExtractConfig {
|
|
|
71
78
|
monorepoConfigFiles?: string[];
|
|
72
79
|
onlyBuiltDependencies?: string[];
|
|
73
80
|
destBase?: string;
|
|
81
|
+
/** Require the configured sibling destination; reject overrides, symlinks and root duplicates. */
|
|
82
|
+
lockDestination?: boolean;
|
|
74
83
|
packageManager?: PackageManager;
|
|
75
84
|
ci?: CiConfig;
|
|
76
85
|
gitignoreMode?: "minimal" | "extended";
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,YAAY,GAAG,qBAAqB,CAAC;AAEjD,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAAC;IACpC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IAC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aAAa,CAAA;CAAE,GAC5C;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC;AAErC,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
</non-goals>
|
|
8
8
|
</MODULE_CONTRACT>
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
|
-
<item>Initial types for RFC-0070: ExtractConfig, ExtractContext, PostProcessRule.</item>
|
|
11
|
-
<item>RFC-0071: Added stripScopes, preservePackages, rootPackageName, customConditions, aiEcosystemFiles, monorepoConfigFiles, onlyBuiltDependencies, destBase, packageManager, gitignoreMode fields.</item>
|
|
12
10
|
<item>RFC-0072: Changed packageManager from string to PackageManager enum. Added CiConfig interface and ci field.</item>
|
|
13
11
|
<item>RFC-0074: Added ExtractResult, ExtractProgressEvent, ProgressCallback types. Added onProgress to ExtractOptions.</item>
|
|
14
|
-
<item>RFC-0075: Added excludePathSegments and excludeExtensions fields for config-driven file exclusion.</item>
|
|
12
|
+
<item>RFC-0075: Added excludePathSegments and excludeExtensions fields for config-driven file exclusion; optional lockDestination for export placement.</item>
|
|
15
13
|
<item>RFC-0131: Added source/allowDirty config fields, git.autoReconcile, and ExtractOptions fromHead/ref/allowDirty/noPush for clean-source extraction and push reconciliation.</item>
|
|
14
|
+
<item>RFC-0175: Added ci.skipTests — omit the export-side test re-run for trees the monorepo gates already verified.</item>
|
|
15
|
+
<item>ADR-0034: compass v2 baseline repair — CHANGE_SUMMARY trim and/or purpose token rewrite</item>
|
|
16
|
+
<history>RFC-0071</history>
|
|
16
17
|
</CHANGE_SUMMARY>
|
|
17
18
|
*/
|
|
18
19
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warpgogol/repo-extract",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Extract apps and packages from a TurboRepo monorepo into standalone public repositories",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Andrii Syrokomskyi <andrii@syrokomskyi.com> (https://syrokomskyi.com)",
|