@icebreakers/monorepo 5.0.3 → 5.1.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.
- package/dist/cli.mjs +75 -38
- package/dist/{commands-KNarzvFs.mjs → commands-DwvtvWjz.mjs} +1260 -96
- package/dist/{create-flow-D2KdMg-m.mjs → create-flow-D-_VjRtz.mjs} +2 -2
- package/dist/{index-Ltm2Ry5E.d.mts → index-cBqxgIwY.d.mts} +7 -2
- package/dist/index.d.mts +177 -13
- package/dist/index.mjs +3 -3
- package/dist/tooling-entry.d.mts +1 -1
- package/dist/{types-DYEKpMcN.mjs → types-CLzhRYdV.mjs} +4 -4
- package/package.json +6 -6
- package/resources/skills/icebreakers-monorepo-cli/references/commands.md +21 -1
- package/resources/skills/icebreakers-monorepo-cli/references/config.md +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as logger, g as fs } from "./types-
|
|
1
|
+
import { A as getCreateChoices, M as resolveCreateNewProjectPlan, O as createNewProject, k as defaultTemplate } from "./commands-DwvtvWjz.mjs";
|
|
2
|
+
import { d as logger, g as fs } from "./types-CLzhRYdV.mjs";
|
|
3
3
|
import { s as resolveCommandConfig } from "./config-p842Knhq.mjs";
|
|
4
4
|
import path from "pathe";
|
|
5
5
|
import process from "node:process";
|
|
@@ -50,6 +50,11 @@ interface CliOpts {
|
|
|
50
50
|
* @default false
|
|
51
51
|
*/
|
|
52
52
|
noOverwrite?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* 是否允许覆盖未标记的自定义 release workflow。
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
overwriteRelease?: boolean;
|
|
53
58
|
}
|
|
54
59
|
//#endregion
|
|
55
60
|
//#region src/commands/ai.d.ts
|
|
@@ -338,7 +343,7 @@ interface UpgradeCommandConfig extends Partial<CliOpts> {
|
|
|
338
343
|
*/
|
|
339
344
|
scripts?: Record<string, string>;
|
|
340
345
|
/**
|
|
341
|
-
* 是否跳过生成
|
|
346
|
+
* 是否跳过生成 pnpm change intent markdown。
|
|
342
347
|
* @default true
|
|
343
348
|
*/
|
|
344
349
|
skipChangesetMarkdown?: boolean;
|
|
@@ -358,7 +363,7 @@ interface InitCommandConfig {
|
|
|
358
363
|
*/
|
|
359
364
|
skipPkgJson?: boolean;
|
|
360
365
|
/**
|
|
361
|
-
* 是否跳过
|
|
366
|
+
* 是否跳过 pnpm versioning 元数据的更新。
|
|
362
367
|
* @default false
|
|
363
368
|
*/
|
|
364
369
|
skipChangeset?: boolean;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as initTooling, A as loadMonorepoToolingConfig, B as HuskyToolingConfig, C as defineCommitlintConfig, D as defineTsconfigConfig, E as defineStylelintConfig, F as CleanCommandConfig, G as StylelintToolingConfig, H as LintStagedToolingConfig, I as CommitlintToolingConfig, J as UpgradeCommandConfig, K as ToolingConfig, L as CreateChoiceOption, M as SimpleGit, N as SimpleGitOptions, O as defineVitestConfig, P as AiCommandConfig, Q as initMetadata, R as CreateCommandConfig, S as createMonorepoVitestProjectConfig, T as defineLintStagedConfig, U as MirrorCommandConfig, V as InitCommandConfig, W as MonorepoConfig, X as VitestToolingConfig, Y as VitestProjectToolingConfig, Z as init, _ as createMonorepoEslintConfig, _t as CliOpts, a as MonorepoCommitlintConfig, at as getCreateChoices, b as createMonorepoTsconfig, c as MonorepoLintStagedConfigOptions, ct as templateMap, d as MonorepoVitestConfigOptions, dt as GenerateAgenticTemplateOptions, et as normalizeInitToolingTargets, f as MonorepoVitestConfigOverrides, ft as createTimestampFolderName, g as createMonorepoCommitlintConfig, gt as loadAgenticTasks, h as MonorepoVitestProjectConfigResult, ht as generateAgenticTemplates, i as DefineVitestProjectConfigOptions, it as CreateNewProjectPlan, j as ConfigValues, k as defineVitestProjectConfig, l as MonorepoStylelintConfig, lt as AgenticTemplateFormat, m as MonorepoVitestProjectConfigOptions, mt as generateAgenticTemplate, n as DefineEslintConfigOptions, nt as createNewProject, o as MonorepoEslintConfig, ot as getTemplateMap, p as MonorepoVitestConfigResult, pt as defaultAgenticBaseDir, q as TsconfigToolingConfig, r as DefineVitestConfigOptions, rt as CreateNewProjectOptions, s as MonorepoLintStagedConfig, st as resolveCreateNewProjectPlan, t as DefineConfigOptions, tt as initToolingTargets, u as MonorepoTsconfig, ut as AgenticTemplateTask, v as createMonorepoLintStagedConfig, w as defineEslintConfig, x as createMonorepoVitestConfig, y as createMonorepoStylelintConfig, z as EslintToolingConfig } from "./index-
|
|
1
|
+
import { $ as initTooling, A as loadMonorepoToolingConfig, B as HuskyToolingConfig, C as defineCommitlintConfig, D as defineTsconfigConfig, E as defineStylelintConfig, F as CleanCommandConfig, G as StylelintToolingConfig, H as LintStagedToolingConfig, I as CommitlintToolingConfig, J as UpgradeCommandConfig, K as ToolingConfig, L as CreateChoiceOption, M as SimpleGit, N as SimpleGitOptions, O as defineVitestConfig, P as AiCommandConfig, Q as initMetadata, R as CreateCommandConfig, S as createMonorepoVitestProjectConfig, T as defineLintStagedConfig, U as MirrorCommandConfig, V as InitCommandConfig, W as MonorepoConfig, X as VitestToolingConfig, Y as VitestProjectToolingConfig, Z as init, _ as createMonorepoEslintConfig, _t as CliOpts, a as MonorepoCommitlintConfig, at as getCreateChoices, b as createMonorepoTsconfig, c as MonorepoLintStagedConfigOptions, ct as templateMap, d as MonorepoVitestConfigOptions, dt as GenerateAgenticTemplateOptions, et as normalizeInitToolingTargets, f as MonorepoVitestConfigOverrides, ft as createTimestampFolderName, g as createMonorepoCommitlintConfig, gt as loadAgenticTasks, h as MonorepoVitestProjectConfigResult, ht as generateAgenticTemplates, i as DefineVitestProjectConfigOptions, it as CreateNewProjectPlan, j as ConfigValues, k as defineVitestProjectConfig, l as MonorepoStylelintConfig, lt as AgenticTemplateFormat, m as MonorepoVitestProjectConfigOptions, mt as generateAgenticTemplate, n as DefineEslintConfigOptions, nt as createNewProject, o as MonorepoEslintConfig, ot as getTemplateMap, p as MonorepoVitestConfigResult, pt as defaultAgenticBaseDir, q as TsconfigToolingConfig, r as DefineVitestConfigOptions, rt as CreateNewProjectOptions, s as MonorepoLintStagedConfig, st as resolveCreateNewProjectPlan, t as DefineConfigOptions, tt as initToolingTargets, u as MonorepoTsconfig, ut as AgenticTemplateTask, v as createMonorepoLintStagedConfig, w as defineEslintConfig, x as createMonorepoVitestConfig, y as createMonorepoStylelintConfig, z as EslintToolingConfig } from "./index-cBqxgIwY.mjs";
|
|
2
2
|
import gitUrlParse from "git-url-parse";
|
|
3
3
|
import { mkdtemp, readFile, readdir, stat, writeFile } from "node:fs/promises";
|
|
4
4
|
import { execFileSync, spawnSync } from "node:child_process";
|
|
@@ -231,6 +231,181 @@ declare function collectEnvPaths(cwd: string): Promise<EnvPaths>;
|
|
|
231
231
|
declare function collectEnvSnapshot(cwd: string, now?: Date): Promise<EnvSnapshot>;
|
|
232
232
|
declare function collectEnvSupportBundle(cwd: string, now?: Date): Promise<EnvSupportBundle>;
|
|
233
233
|
//#endregion
|
|
234
|
+
//#region src/commands/release/notes/model.d.ts
|
|
235
|
+
type ReleaseCategory = 'breaking' | 'features' | 'fixes' | 'performance' | 'docs' | 'maintenance' | 'other';
|
|
236
|
+
interface ReleaseCommit {
|
|
237
|
+
sha: string;
|
|
238
|
+
subject: string;
|
|
239
|
+
body?: string;
|
|
240
|
+
author?: string;
|
|
241
|
+
packages?: string[];
|
|
242
|
+
summary?: string;
|
|
243
|
+
summaries?: string[];
|
|
244
|
+
}
|
|
245
|
+
interface ReleaseNoteEntry {
|
|
246
|
+
packageName: string;
|
|
247
|
+
version: string;
|
|
248
|
+
npmUrl?: string;
|
|
249
|
+
category: ReleaseCategory;
|
|
250
|
+
summary: string;
|
|
251
|
+
commits: ReleaseCommit[];
|
|
252
|
+
pullRequests: number[];
|
|
253
|
+
issues: number[];
|
|
254
|
+
authors: string[];
|
|
255
|
+
}
|
|
256
|
+
interface ReleaseNotePackage {
|
|
257
|
+
name: string;
|
|
258
|
+
version: string;
|
|
259
|
+
previousVersion?: string;
|
|
260
|
+
npmUrl?: string;
|
|
261
|
+
previousNpmUrl?: string;
|
|
262
|
+
}
|
|
263
|
+
interface ReleaseNoteDocument {
|
|
264
|
+
packages: ReleaseNotePackage[];
|
|
265
|
+
entries: ReleaseNoteEntry[];
|
|
266
|
+
contributors: string[];
|
|
267
|
+
compareUrls: string[];
|
|
268
|
+
}
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region src/commands/release/errors.d.ts
|
|
271
|
+
declare class ReleaseCommandError extends Error {
|
|
272
|
+
readonly exitCode: number;
|
|
273
|
+
constructor(message: string, exitCode?: number);
|
|
274
|
+
}
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/commands/release/github.d.ts
|
|
277
|
+
interface GitHubPullRequest {
|
|
278
|
+
number: number;
|
|
279
|
+
html_url: string;
|
|
280
|
+
state: string;
|
|
281
|
+
title?: string;
|
|
282
|
+
body?: string | null;
|
|
283
|
+
head?: {
|
|
284
|
+
ref?: string;
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
interface GitHubRelease {
|
|
288
|
+
id: number;
|
|
289
|
+
html_url: string;
|
|
290
|
+
tag_name: string;
|
|
291
|
+
name?: string;
|
|
292
|
+
body?: string | null;
|
|
293
|
+
draft?: boolean;
|
|
294
|
+
prerelease?: boolean;
|
|
295
|
+
}
|
|
296
|
+
interface GitHubClientOptions {
|
|
297
|
+
token?: string;
|
|
298
|
+
repository?: string;
|
|
299
|
+
apiUrl?: string;
|
|
300
|
+
fetch?: typeof fetch;
|
|
301
|
+
}
|
|
302
|
+
interface EnsurePullRequestOptions {
|
|
303
|
+
head: string;
|
|
304
|
+
base: string;
|
|
305
|
+
title: string;
|
|
306
|
+
body: string;
|
|
307
|
+
}
|
|
308
|
+
interface CloseLegacyPullRequestsOptions {
|
|
309
|
+
head: string;
|
|
310
|
+
base: string;
|
|
311
|
+
}
|
|
312
|
+
interface EnsureReleaseOptions {
|
|
313
|
+
tag: string;
|
|
314
|
+
target: string;
|
|
315
|
+
prerelease?: boolean;
|
|
316
|
+
name?: string;
|
|
317
|
+
body?: string;
|
|
318
|
+
}
|
|
319
|
+
interface EnsureTagOptions {
|
|
320
|
+
tag: string;
|
|
321
|
+
target: string;
|
|
322
|
+
}
|
|
323
|
+
interface UpdateReleaseOptions {
|
|
324
|
+
id: number;
|
|
325
|
+
name: string;
|
|
326
|
+
body: string;
|
|
327
|
+
}
|
|
328
|
+
interface GitHubOperations {
|
|
329
|
+
ensurePullRequest: (options: EnsurePullRequestOptions) => Promise<GitHubPullRequest>;
|
|
330
|
+
closeLegacyReleasePullRequests?: (options: CloseLegacyPullRequestsOptions) => Promise<void>;
|
|
331
|
+
ensureRelease: (options: EnsureReleaseOptions) => Promise<GitHubRelease>;
|
|
332
|
+
ensureTag?: (options: EnsureTagOptions) => Promise<void>;
|
|
333
|
+
enrichReleaseNote?: (document: ReleaseNoteDocument) => Promise<ReleaseNoteDocument>;
|
|
334
|
+
listReleases?: () => Promise<GitHubRelease[]>;
|
|
335
|
+
updateRelease?: (options: UpdateReleaseOptions) => Promise<GitHubRelease>;
|
|
336
|
+
}
|
|
337
|
+
declare class GitHubApiError extends ReleaseCommandError {
|
|
338
|
+
readonly status: number;
|
|
339
|
+
readonly responseBody?: string | undefined;
|
|
340
|
+
constructor(message: string, status: number, responseBody?: string | undefined);
|
|
341
|
+
}
|
|
342
|
+
declare class GitHubClient implements GitHubOperations {
|
|
343
|
+
private readonly token;
|
|
344
|
+
private readonly repository;
|
|
345
|
+
private readonly apiUrl;
|
|
346
|
+
private readonly requestFetch;
|
|
347
|
+
constructor(options?: GitHubClientOptions);
|
|
348
|
+
private getRepository;
|
|
349
|
+
private request;
|
|
350
|
+
ensurePullRequest(options: EnsurePullRequestOptions): Promise<GitHubPullRequest>;
|
|
351
|
+
closeLegacyReleasePullRequests(options: CloseLegacyPullRequestsOptions): Promise<void>;
|
|
352
|
+
ensureRelease(options: EnsureReleaseOptions): Promise<GitHubRelease>;
|
|
353
|
+
listReleases(): Promise<GitHubRelease[]>;
|
|
354
|
+
updateRelease(options: UpdateReleaseOptions): Promise<GitHubRelease>;
|
|
355
|
+
enrichReleaseNote(document: ReleaseNoteDocument): Promise<ReleaseNoteDocument>;
|
|
356
|
+
ensureTag(options: EnsureTagOptions): Promise<void>;
|
|
357
|
+
}
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region src/commands/release/types.d.ts
|
|
360
|
+
type ReleaseMode = 'auto' | 'prepare' | 'publish' | 'publish-unpublished';
|
|
361
|
+
interface ReleaseOptions {
|
|
362
|
+
cwd: string;
|
|
363
|
+
branch?: string;
|
|
364
|
+
spawn?: typeof spawnSync;
|
|
365
|
+
env?: NodeJS.ProcessEnv;
|
|
366
|
+
}
|
|
367
|
+
interface ReleaseCiOptions extends ReleaseOptions {
|
|
368
|
+
mode?: ReleaseMode;
|
|
369
|
+
packageName?: string;
|
|
370
|
+
packageVersion?: string;
|
|
371
|
+
github?: GitHubOperations;
|
|
372
|
+
}
|
|
373
|
+
interface PublishedPackage {
|
|
374
|
+
name: string;
|
|
375
|
+
version: string;
|
|
376
|
+
}
|
|
377
|
+
//#endregion
|
|
378
|
+
//#region src/commands/release/ci.d.ts
|
|
379
|
+
declare function createReleasePullRequest(options: ReleaseCiOptions): Promise<boolean>;
|
|
380
|
+
declare function recoverUnpublished(options: ReleaseCiOptions): Promise<void>;
|
|
381
|
+
declare function releaseCi(options: ReleaseCiOptions): Promise<void>;
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region src/commands/release/prerelease.d.ts
|
|
384
|
+
declare function releasePrerelease(options: ReleaseOptions): Promise<void>;
|
|
385
|
+
declare function enterPrerelease(tag: string, options: ReleaseOptions): Promise<void>;
|
|
386
|
+
declare function exitPrerelease(options: ReleaseOptions): Promise<void>;
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region src/commands/release/repair.d.ts
|
|
389
|
+
interface RepairReleaseNotesOptions extends ReleaseOptions {
|
|
390
|
+
tag?: string;
|
|
391
|
+
all?: boolean;
|
|
392
|
+
dryRun?: boolean;
|
|
393
|
+
github?: Pick<GitHubOperations, 'listReleases' | 'updateRelease'>;
|
|
394
|
+
}
|
|
395
|
+
declare function repairReleaseNotes(options: RepairReleaseNotesOptions): Promise<{
|
|
396
|
+
repaired: string[];
|
|
397
|
+
skipped: string[];
|
|
398
|
+
}>;
|
|
399
|
+
//#endregion
|
|
400
|
+
//#region src/commands/release/shared.d.ts
|
|
401
|
+
declare function parsePublishSummary(content: string): PublishedPackage[];
|
|
402
|
+
//#endregion
|
|
403
|
+
//#region src/commands/release/stable.d.ts
|
|
404
|
+
declare function prepareStable(options: ReleaseOptions): Promise<boolean>;
|
|
405
|
+
declare function publishStable(options: ReleaseOptions): Promise<void>;
|
|
406
|
+
/** Compatibility entry point retained for existing generated repositories. */
|
|
407
|
+
declare function releaseStable(options: ReleaseOptions): Promise<void>;
|
|
408
|
+
//#endregion
|
|
234
409
|
//#region src/commands/skills.d.ts
|
|
235
410
|
/**
|
|
236
411
|
* 当前支持的 skills 同步目标。
|
|
@@ -475,17 +650,6 @@ declare function cleanProjects(cwd: string, overrides?: Partial<CleanCommandConf
|
|
|
475
650
|
*/
|
|
476
651
|
declare function setVscodeBinaryMirror(cwd: string): Promise<void>;
|
|
477
652
|
//#endregion
|
|
478
|
-
//#region src/commands/release.d.ts
|
|
479
|
-
interface ReleaseOptions {
|
|
480
|
-
cwd: string;
|
|
481
|
-
branch?: string;
|
|
482
|
-
spawn?: typeof spawnSync;
|
|
483
|
-
}
|
|
484
|
-
declare function releaseStable(options: ReleaseOptions): Promise<void>;
|
|
485
|
-
declare function releasePrerelease(options: ReleaseOptions): Promise<void>;
|
|
486
|
-
declare function enterPrerelease(tag: string, options: ReleaseOptions): void;
|
|
487
|
-
declare function exitPrerelease(options: ReleaseOptions): void;
|
|
488
|
-
//#endregion
|
|
489
653
|
//#region src/commands/upgrade/index.d.ts
|
|
490
654
|
/**
|
|
491
655
|
* 将 assets 目录的模版文件同步到工程中,实现一键升级脚手架能力。
|
|
@@ -702,4 +866,4 @@ declare function escapeStringRegexp(str: string): string;
|
|
|
702
866
|
*/
|
|
703
867
|
declare function isMatch(str: string, arr: RegExp[]): boolean;
|
|
704
868
|
//#endregion
|
|
705
|
-
export { type AgenticTemplateFormat, type AgenticTemplateTask, AiCommandConfig, type CheckTemplatesOptions, CleanCommandConfig, CliOpts, type CommitMsgVerifyOptions, CommitlintToolingConfig, type ConfigInspection, type ConfigValues, Context, CreateChoiceOption, CreateCommandConfig, type CreateNewProjectOptions, type CreateNewProjectPlan, DefineConfigOptions, DefineEslintConfigOptions, DefineVitestConfigOptions, DefineVitestProjectConfigOptions, type DoctorCheck, type DoctorReport, type DoctorStatus, type DoctorSummary, type EnvInfo, type EnvPathEntry, type EnvPaths, type EnvSnapshot, type EnvSupportBundle, EslintToolingConfig, type GenerateAgenticTemplateOptions, GetWorkspacePackagesOptions, GitClient, HuskyToolingConfig, InitCommandConfig, JsonWriteOptions, LintStagedToolingConfig, LoadedMonorepoConfig, MirrorCommandConfig, MonorepoCommitlintConfig, MonorepoConfig, MonorepoEslintConfig, MonorepoLintStagedConfig, MonorepoLintStagedConfigOptions, MonorepoStylelintConfig, MonorepoTsconfig, MonorepoVitestConfigOptions, MonorepoVitestConfigOverrides, MonorepoVitestConfigResult, MonorepoVitestProjectConfigOptions, MonorepoVitestProjectConfigResult, PackageJson, PackageJsonBugs, PackageJsonExports, PackageJsonPerson, PackageJsonRepository, type PreCommitVerifyOptions, type PrePushVerifyOptions, type RecommendedCheckMode, type RecommendedCheckOptions, type RecommendedCheckPlan, type RecommendedCheckPlanCommand, type SimpleGit, type SimpleGitOptions, type SkillTarget, type StagedTypecheckOptions, StylelintToolingConfig, type SyncSkillsOptions, type TemplateHealthCheck, type TemplateHealthReport, type TemplateHealthStatus, type TemplateHealthSummary, ToolingConfig, TsconfigToolingConfig, UpgradeCommandConfig, type VerifyCommandOptions, VitestProjectToolingConfig, VitestToolingConfig, WorkspaceData, WorkspacePackage, WorkspacePackageManifest, WorkspacePackageSummary, WorkspacePackageSummaryData, WorkspacePackageWithJsonPath, assetsDir, checkTemplates, cleanProjects, clearWorkspaceCache, cliName, collectEnvInfo, collectEnvPaths, collectEnvSnapshot, collectEnvSupportBundle, configExtensions, copy, createContext, createMonorepoCommitlintConfig, createMonorepoEslintConfig, createMonorepoLintStagedConfig, createMonorepoStylelintConfig, createMonorepoTsconfig, createMonorepoVitestConfig, createMonorepoVitestProjectConfig, createNewProject, createTimestampFolderName, defaultAgenticBaseDir, defineCommitlintConfig, defineEslintConfig, defineLintStagedConfig, defineMonorepoConfig, defineStylelintConfig, defineTsconfigConfig, defineVitestConfig, defineVitestProjectConfig, ensureDir, ensureFile, enterPrerelease, escapeStringRegexp, exists, exitPrerelease, generateAgenticTemplate, generateAgenticTemplates, getCreateChoices, getFileHash, getKnownRepoCheckCommands, getRepoctlConfigCandidates, getSkillTargetPaths, getTemplateMap, getWorkspaceData, getWorkspacePackageSummaries, getWorkspacePackages, init, initMetadata, initTooling, initToolingTargets, inspectMonorepoConfig, isFileChanged, isGitignoreFile, isIgnorableFsError, isMatch, loadAgenticTasks, loadMonorepoConfig, loadMonorepoConfigDetails, loadMonorepoToolingConfig, logger, normalizeInitToolingTargets, outputFile, outputJSON, outputJson, packageDir, name as packageName, pathExists, readJSON, readJson, releasePrerelease, releaseStable, remove, resolveCommandConfig, resolveCreateNewProjectPlan, resolveFullWorkspaceCheckPlan, resolveRecommendedCheckPlan, resolveToolingConfig, rootDir, runDoctor, runRecommendedCheck, setByPath, setVscodeBinaryMirror, skillTargets, syncSkills, templateMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath, updateIssueTemplateConfig, upgradeMonorepo, verifyCommitMsg, verifyPreCommit, verifyPrePush, verifyStagedTypecheck, version, writeJSON, writeJson };
|
|
869
|
+
export { type AgenticTemplateFormat, type AgenticTemplateTask, AiCommandConfig, type CheckTemplatesOptions, CleanCommandConfig, CliOpts, type CommitMsgVerifyOptions, CommitlintToolingConfig, type ConfigInspection, type ConfigValues, Context, CreateChoiceOption, CreateCommandConfig, type CreateNewProjectOptions, type CreateNewProjectPlan, DefineConfigOptions, DefineEslintConfigOptions, DefineVitestConfigOptions, DefineVitestProjectConfigOptions, type DoctorCheck, type DoctorReport, type DoctorStatus, type DoctorSummary, type EnsurePullRequestOptions, type EnsureReleaseOptions, type EnsureTagOptions, type EnvInfo, type EnvPathEntry, type EnvPaths, type EnvSnapshot, type EnvSupportBundle, EslintToolingConfig, type GenerateAgenticTemplateOptions, GetWorkspacePackagesOptions, GitClient, GitHubApiError, GitHubClient, type GitHubClientOptions, type GitHubOperations, HuskyToolingConfig, InitCommandConfig, JsonWriteOptions, LintStagedToolingConfig, LoadedMonorepoConfig, MirrorCommandConfig, MonorepoCommitlintConfig, MonorepoConfig, MonorepoEslintConfig, MonorepoLintStagedConfig, MonorepoLintStagedConfigOptions, MonorepoStylelintConfig, MonorepoTsconfig, MonorepoVitestConfigOptions, MonorepoVitestConfigOverrides, MonorepoVitestConfigResult, MonorepoVitestProjectConfigOptions, MonorepoVitestProjectConfigResult, PackageJson, PackageJsonBugs, PackageJsonExports, PackageJsonPerson, PackageJsonRepository, type PreCommitVerifyOptions, type PrePushVerifyOptions, type RecommendedCheckMode, type RecommendedCheckOptions, type RecommendedCheckPlan, type RecommendedCheckPlanCommand, type SimpleGit, type SimpleGitOptions, type SkillTarget, type StagedTypecheckOptions, StylelintToolingConfig, type SyncSkillsOptions, type TemplateHealthCheck, type TemplateHealthReport, type TemplateHealthStatus, type TemplateHealthSummary, ToolingConfig, TsconfigToolingConfig, UpgradeCommandConfig, type VerifyCommandOptions, VitestProjectToolingConfig, VitestToolingConfig, WorkspaceData, WorkspacePackage, WorkspacePackageManifest, WorkspacePackageSummary, WorkspacePackageSummaryData, WorkspacePackageWithJsonPath, assetsDir, checkTemplates, cleanProjects, clearWorkspaceCache, cliName, collectEnvInfo, collectEnvPaths, collectEnvSnapshot, collectEnvSupportBundle, configExtensions, copy, createContext, createMonorepoCommitlintConfig, createMonorepoEslintConfig, createMonorepoLintStagedConfig, createMonorepoStylelintConfig, createMonorepoTsconfig, createMonorepoVitestConfig, createMonorepoVitestProjectConfig, createNewProject, createReleasePullRequest, createTimestampFolderName, defaultAgenticBaseDir, defineCommitlintConfig, defineEslintConfig, defineLintStagedConfig, defineMonorepoConfig, defineStylelintConfig, defineTsconfigConfig, defineVitestConfig, defineVitestProjectConfig, ensureDir, ensureFile, enterPrerelease, escapeStringRegexp, exists, exitPrerelease, generateAgenticTemplate, generateAgenticTemplates, getCreateChoices, getFileHash, getKnownRepoCheckCommands, getRepoctlConfigCandidates, getSkillTargetPaths, getTemplateMap, getWorkspaceData, getWorkspacePackageSummaries, getWorkspacePackages, init, initMetadata, initTooling, initToolingTargets, inspectMonorepoConfig, isFileChanged, isGitignoreFile, isIgnorableFsError, isMatch, loadAgenticTasks, loadMonorepoConfig, loadMonorepoConfigDetails, loadMonorepoToolingConfig, logger, normalizeInitToolingTargets, outputFile, outputJSON, outputJson, packageDir, name as packageName, parsePublishSummary, pathExists, prepareStable, publishStable, readJSON, readJson, recoverUnpublished, releaseCi, releasePrerelease, releaseStable, remove, repairReleaseNotes, resolveCommandConfig, resolveCreateNewProjectPlan, resolveFullWorkspaceCheckPlan, resolveRecommendedCheckPlan, resolveToolingConfig, rootDir, runDoctor, runRecommendedCheck, setByPath, setVscodeBinaryMirror, skillTargets, syncSkills, templateMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath, updateIssueTemplateConfig, upgradeMonorepo, verifyCommitMsg, verifyPreCommit, verifyPrePush, verifyStagedTypecheck, version, writeJSON, writeJson };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { $ as verifyPreCommit, A as getCreateChoices, B as isMatch, C as collectEnvInfo, D as runDoctor, E as collectEnvSupportBundle, F as cleanProjects, G as toPublishGitignorePath, H as getFileHash, I as getSkillTargetPaths, J as getKnownRepoCheckCommands, K as toWorkspaceGitignorePath, L as skillTargets, M as resolveCreateNewProjectPlan, N as templateMap, O as createNewProject, P as inspectMonorepoConfig, Q as verifyCommitMsg, R as syncSkills, S as createContext, T as collectEnvSnapshot, U as isFileChanged, V as setByPath, W as isGitignoreFile, X as resolveRecommendedCheckPlan, Y as resolveFullWorkspaceCheckPlan, Z as runRecommendedCheck, _ as setVscodeBinaryMirror, a as createReleasePullRequest, at as generateAgenticTemplates, b as initTooling, c as prepareStable, d as enterPrerelease, et as verifyPrePush, f as exitPrerelease, g as parsePublishSummary, h as GitHubClient, i as repairReleaseNotes, it as generateAgenticTemplate, j as getTemplateMap, l as publishStable, m as GitHubApiError, n as upgradeMonorepo, nt as createTimestampFolderName, o as recoverUnpublished, ot as loadAgenticTasks, p as releasePrerelease, q as updateIssueTemplateConfig, r as checkTemplates, rt as defaultAgenticBaseDir, s as releaseCi, st as GitClient, tt as verifyStagedTypecheck, u as releaseStable, v as init, w as collectEnvPaths, x as normalizeInitToolingTargets, y as initMetadata, z as escapeStringRegexp } from "./commands-DwvtvWjz.mjs";
|
|
2
2
|
import { i as getWorkspacePackages, n as getWorkspaceData, r as getWorkspacePackageSummaries, t as clearWorkspaceCache } from "./workspace-MCKewElu.mjs";
|
|
3
|
-
import { C as readJson, E as writeJson, S as readJSON, T as writeJSON, _ as isIgnorableFsError, a as rootDir, b as outputJson, d as logger, f as copy, h as exists, i as packageDir, l as name, m as ensureFile, n as assetsDir, o as templatesDir, p as ensureDir, r as cliName, t as initToolingTargets, u as version, v as outputFile, w as remove, x as pathExists, y as outputJSON } from "./types-
|
|
3
|
+
import { C as readJson, E as writeJson, S as readJSON, T as writeJSON, _ as isIgnorableFsError, a as rootDir, b as outputJson, d as logger, f as copy, h as exists, i as packageDir, l as name, m as ensureFile, n as assetsDir, o as templatesDir, p as ensureDir, r as cliName, t as initToolingTargets, u as version, v as outputFile, w as remove, x as pathExists, y as outputJSON } from "./types-CLzhRYdV.mjs";
|
|
4
4
|
import { a as loadMonorepoConfig, c as resolveToolingConfig, i as getRepoctlConfigCandidates, o as loadMonorepoConfigDetails, r as defineMonorepoConfig, s as resolveCommandConfig, t as configExtensions } from "./config-p842Knhq.mjs";
|
|
5
5
|
import { a as createMonorepoTsconfig, c as defineCommitlintConfig, d as defineStylelintConfig, f as defineTsconfigConfig, h as loadMonorepoToolingConfig, i as createMonorepoStylelintConfig, l as defineEslintConfig, m as defineVitestProjectConfig, n as createMonorepoEslintConfig, o as createMonorepoVitestConfig, p as defineVitestConfig, r as createMonorepoLintStagedConfig, s as createMonorepoVitestProjectConfig, t as createMonorepoCommitlintConfig, u as defineLintStagedConfig } from "./tooling-Bn3XOfO0.mjs";
|
|
6
|
-
export { GitClient, assetsDir, checkTemplates, cleanProjects, clearWorkspaceCache, cliName, collectEnvInfo, collectEnvPaths, collectEnvSnapshot, collectEnvSupportBundle, configExtensions, copy, createContext, createMonorepoCommitlintConfig, createMonorepoEslintConfig, createMonorepoLintStagedConfig, createMonorepoStylelintConfig, createMonorepoTsconfig, createMonorepoVitestConfig, createMonorepoVitestProjectConfig, createNewProject, createTimestampFolderName, defaultAgenticBaseDir, defineCommitlintConfig, defineEslintConfig, defineLintStagedConfig, defineMonorepoConfig, defineStylelintConfig, defineTsconfigConfig, defineVitestConfig, defineVitestProjectConfig, ensureDir, ensureFile, enterPrerelease, escapeStringRegexp, exists, exitPrerelease, generateAgenticTemplate, generateAgenticTemplates, getCreateChoices, getFileHash, getKnownRepoCheckCommands, getRepoctlConfigCandidates, getSkillTargetPaths, getTemplateMap, getWorkspaceData, getWorkspacePackageSummaries, getWorkspacePackages, init, initMetadata, initTooling, initToolingTargets, inspectMonorepoConfig, isFileChanged, isGitignoreFile, isIgnorableFsError, isMatch, loadAgenticTasks, loadMonorepoConfig, loadMonorepoConfigDetails, loadMonorepoToolingConfig, logger, normalizeInitToolingTargets, outputFile, outputJSON, outputJson, packageDir, name as packageName, pathExists, readJSON, readJson, releasePrerelease, releaseStable, remove, resolveCommandConfig, resolveCreateNewProjectPlan, resolveFullWorkspaceCheckPlan, resolveRecommendedCheckPlan, resolveToolingConfig, rootDir, runDoctor, runRecommendedCheck, setByPath, setVscodeBinaryMirror, skillTargets, syncSkills, templateMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath, updateIssueTemplateConfig, upgradeMonorepo, verifyCommitMsg, verifyPreCommit, verifyPrePush, verifyStagedTypecheck, version, writeJSON, writeJson };
|
|
6
|
+
export { GitClient, GitHubApiError, GitHubClient, assetsDir, checkTemplates, cleanProjects, clearWorkspaceCache, cliName, collectEnvInfo, collectEnvPaths, collectEnvSnapshot, collectEnvSupportBundle, configExtensions, copy, createContext, createMonorepoCommitlintConfig, createMonorepoEslintConfig, createMonorepoLintStagedConfig, createMonorepoStylelintConfig, createMonorepoTsconfig, createMonorepoVitestConfig, createMonorepoVitestProjectConfig, createNewProject, createReleasePullRequest, createTimestampFolderName, defaultAgenticBaseDir, defineCommitlintConfig, defineEslintConfig, defineLintStagedConfig, defineMonorepoConfig, defineStylelintConfig, defineTsconfigConfig, defineVitestConfig, defineVitestProjectConfig, ensureDir, ensureFile, enterPrerelease, escapeStringRegexp, exists, exitPrerelease, generateAgenticTemplate, generateAgenticTemplates, getCreateChoices, getFileHash, getKnownRepoCheckCommands, getRepoctlConfigCandidates, getSkillTargetPaths, getTemplateMap, getWorkspaceData, getWorkspacePackageSummaries, getWorkspacePackages, init, initMetadata, initTooling, initToolingTargets, inspectMonorepoConfig, isFileChanged, isGitignoreFile, isIgnorableFsError, isMatch, loadAgenticTasks, loadMonorepoConfig, loadMonorepoConfigDetails, loadMonorepoToolingConfig, logger, normalizeInitToolingTargets, outputFile, outputJSON, outputJson, packageDir, name as packageName, parsePublishSummary, pathExists, prepareStable, publishStable, readJSON, readJson, recoverUnpublished, releaseCi, releasePrerelease, releaseStable, remove, repairReleaseNotes, resolveCommandConfig, resolveCreateNewProjectPlan, resolveFullWorkspaceCheckPlan, resolveRecommendedCheckPlan, resolveToolingConfig, rootDir, runDoctor, runRecommendedCheck, setByPath, setVscodeBinaryMirror, skillTargets, syncSkills, templateMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath, updateIssueTemplateConfig, upgradeMonorepo, verifyCommitMsg, verifyPreCommit, verifyPrePush, verifyStagedTypecheck, version, writeJSON, writeJson };
|
package/dist/tooling-entry.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as loadMonorepoToolingConfig, C as defineCommitlintConfig, D as defineTsconfigConfig, E as defineStylelintConfig, O as defineVitestConfig, S as createMonorepoVitestProjectConfig, T as defineLintStagedConfig, _ as createMonorepoEslintConfig, a as MonorepoCommitlintConfig, b as createMonorepoTsconfig, c as MonorepoLintStagedConfigOptions, d as MonorepoVitestConfigOptions, f as MonorepoVitestConfigOverrides, g as createMonorepoCommitlintConfig, h as MonorepoVitestProjectConfigResult, i as DefineVitestProjectConfigOptions, k as defineVitestProjectConfig, l as MonorepoStylelintConfig, m as MonorepoVitestProjectConfigOptions, n as DefineEslintConfigOptions, o as MonorepoEslintConfig, p as MonorepoVitestConfigResult, r as DefineVitestConfigOptions, s as MonorepoLintStagedConfig, t as DefineConfigOptions, u as MonorepoTsconfig, v as createMonorepoLintStagedConfig, w as defineEslintConfig, x as createMonorepoVitestConfig, y as createMonorepoStylelintConfig } from "./index-
|
|
1
|
+
import { A as loadMonorepoToolingConfig, C as defineCommitlintConfig, D as defineTsconfigConfig, E as defineStylelintConfig, O as defineVitestConfig, S as createMonorepoVitestProjectConfig, T as defineLintStagedConfig, _ as createMonorepoEslintConfig, a as MonorepoCommitlintConfig, b as createMonorepoTsconfig, c as MonorepoLintStagedConfigOptions, d as MonorepoVitestConfigOptions, f as MonorepoVitestConfigOverrides, g as createMonorepoCommitlintConfig, h as MonorepoVitestProjectConfigResult, i as DefineVitestProjectConfigOptions, k as defineVitestProjectConfig, l as MonorepoStylelintConfig, m as MonorepoVitestProjectConfigOptions, n as DefineEslintConfigOptions, o as MonorepoEslintConfig, p as MonorepoVitestConfigResult, r as DefineVitestConfigOptions, s as MonorepoLintStagedConfig, t as DefineConfigOptions, u as MonorepoTsconfig, v as createMonorepoLintStagedConfig, w as defineEslintConfig, x as createMonorepoVitestConfig, y as createMonorepoStylelintConfig } from "./index-cBqxgIwY.mjs";
|
|
2
2
|
export { DefineConfigOptions, DefineEslintConfigOptions, DefineVitestConfigOptions, DefineVitestProjectConfigOptions, MonorepoCommitlintConfig, MonorepoEslintConfig, MonorepoLintStagedConfig, MonorepoLintStagedConfigOptions, MonorepoStylelintConfig, MonorepoTsconfig, MonorepoVitestConfigOptions, MonorepoVitestConfigOverrides, MonorepoVitestConfigResult, MonorepoVitestProjectConfigOptions, MonorepoVitestProjectConfigResult, createMonorepoCommitlintConfig, createMonorepoEslintConfig, createMonorepoLintStagedConfig, createMonorepoStylelintConfig, createMonorepoTsconfig, createMonorepoVitestConfig, createMonorepoVitestProjectConfig, defineCommitlintConfig, defineEslintConfig, defineLintStagedConfig, defineStylelintConfig, defineTsconfigConfig, defineVitestConfig, defineVitestProjectConfig, loadMonorepoToolingConfig };
|
|
@@ -142,12 +142,12 @@ const logger = createConsola();
|
|
|
142
142
|
//#endregion
|
|
143
143
|
//#region package.json
|
|
144
144
|
var name = "@icebreakers/monorepo";
|
|
145
|
-
var version = "5.
|
|
145
|
+
var version = "5.1.1";
|
|
146
146
|
var dependencies = {
|
|
147
|
-
"@icebreakers/commitlint-config": "^4.0.
|
|
148
|
-
"@icebreakers/eslint-config": "^7.0.
|
|
147
|
+
"@icebreakers/commitlint-config": "^4.0.3",
|
|
148
|
+
"@icebreakers/eslint-config": "^7.0.3",
|
|
149
149
|
"@icebreakers/monorepo-templates": "workspace:*",
|
|
150
|
-
"@icebreakers/stylelint-config": "^5.0.
|
|
150
|
+
"@icebreakers/stylelint-config": "^5.0.4",
|
|
151
151
|
"@pnpm/find-workspace-dir": "^1000.1.5",
|
|
152
152
|
"@pnpm/logger": "^1100.0.0",
|
|
153
153
|
"@pnpm/types": "^1101.9.0",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/monorepo",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.1.1",
|
|
5
5
|
"description": "Core engine behind the repoctl monorepo CLI",
|
|
6
6
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"node": ">=22.12.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@commitlint/cli": "^21.2.
|
|
58
|
+
"@commitlint/cli": "^21.2.2",
|
|
59
59
|
"eslint": "^9.0.0 || ^10.0.0",
|
|
60
60
|
"stylelint": "^17.14.1",
|
|
61
61
|
"typescript": "^5.0.0 || ^6.0.0",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@icebreakers/commitlint-config": "^4.0.
|
|
83
|
-
"@icebreakers/eslint-config": "^7.0.
|
|
84
|
-
"@icebreakers/stylelint-config": "^5.0.
|
|
82
|
+
"@icebreakers/commitlint-config": "^4.0.3",
|
|
83
|
+
"@icebreakers/eslint-config": "^7.0.3",
|
|
84
|
+
"@icebreakers/stylelint-config": "^5.0.4",
|
|
85
85
|
"@pnpm/find-workspace-dir": "^1000.1.5",
|
|
86
86
|
"@pnpm/logger": "^1100.0.0",
|
|
87
87
|
"@pnpm/types": "^1101.9.0",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"simple-git": "^3.36.0",
|
|
103
103
|
"vitest": "^4.1.10",
|
|
104
104
|
"yaml": "^2.9.0",
|
|
105
|
-
"@icebreakers/monorepo-templates": "1.0
|
|
105
|
+
"@icebreakers/monorepo-templates": "1.1.0"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
108
|
"@types/klaw": "^3.0.7",
|
|
@@ -69,6 +69,26 @@ Usage:
|
|
|
69
69
|
- --core: sync core config only (skip GitHub assets)
|
|
70
70
|
- --outDir <dir>: write to another directory
|
|
71
71
|
- --skip-overwrite: never overwrite existing files
|
|
72
|
+
- --overwrite-release: explicitly replace an unmarked custom release workflow
|
|
73
|
+
|
|
74
|
+
For the first migration of an existing project, bootstrap with
|
|
75
|
+
`pnpm dlx repoctl@latest upgrade --yes`. Managed and official legacy release
|
|
76
|
+
workflows are migrated automatically; unmarked custom workflows are preserved
|
|
77
|
+
unless `--overwrite-release` is supplied.
|
|
78
|
+
|
|
79
|
+
## release ci
|
|
80
|
+
|
|
81
|
+
Purpose: provide the single GitHub Actions entrypoint for stable and prerelease orchestration.
|
|
82
|
+
Usage:
|
|
83
|
+
|
|
84
|
+
- `pnpm exec repo release ci`
|
|
85
|
+
- `pnpm exec repo release ci --mode prepare`
|
|
86
|
+
- `pnpm exec repo release ci --mode publish`
|
|
87
|
+
- `pnpm exec repo release ci --mode publish-unpublished --package <name> --version <version>`
|
|
88
|
+
|
|
89
|
+
The command uses `GITHUB_TOKEN`, `GITHUB_REPOSITORY`, `GITHUB_API_URL`, and
|
|
90
|
+
`GITHUB_SHA` to upsert the Release PR, package tags, and GitHub Releases. It
|
|
91
|
+
consumes `pnpm-publish-summary.json` and is safe to retry.
|
|
72
92
|
|
|
73
93
|
## workspace upgrade (alias: ws up)
|
|
74
94
|
|
|
@@ -85,7 +105,7 @@ Usage:
|
|
|
85
105
|
|
|
86
106
|
## workspace init (alias: ws init)
|
|
87
107
|
|
|
88
|
-
Purpose: initialize workspace metadata such as README, package.json,
|
|
108
|
+
Purpose: initialize workspace metadata such as README, package.json, pnpm change intent support, and issue template.
|
|
89
109
|
Usage:
|
|
90
110
|
|
|
91
111
|
- npx repoctl init
|
|
@@ -63,5 +63,5 @@ Key areas:
|
|
|
63
63
|
- create: default template and template directory
|
|
64
64
|
- clean: auto confirm and pinned version control
|
|
65
65
|
- upgrade: overwrite behavior and extra targets
|
|
66
|
-
- init: skip steps for README/package.json/
|
|
66
|
+
- init: skip steps for README/package.json/pnpm change intent setup
|
|
67
67
|
- mirror: add or override env mirrors
|