@icebreakers/monorepo 5.4.9 → 5.5.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 +47 -37
- package/dist/{commands-ChVgQ-MD.mjs → commands-CtYIB-DG.mjs} +295 -179
- package/dist/{create-flow-BiiHvQTm.mjs → create-flow-Bj8v-mjF.mjs} +2 -2
- package/dist/index.d.mts +27 -3
- package/dist/index.mjs +3 -3
- package/dist/{types-C-aVvG6i.mjs → types-B7zNkQpy.mjs} +116 -33
- package/package.json +14 -7
- package/resources/skills/repoctl/SKILL.md +63 -0
- package/resources/skills/{icebreakers-monorepo-cli → repoctl}/references/commands.md +10 -7
- package/resources/skills/{icebreakers-monorepo-cli → repoctl}/references/templates.md +2 -2
- package/resources/skills/icebreakers-monorepo-cli/SKILL.md +0 -45
- /package/resources/skills/{icebreakers-monorepo-cli → repoctl}/references/config.md +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -300,6 +300,9 @@ interface GitHubClientOptions {
|
|
|
300
300
|
repository?: string;
|
|
301
301
|
apiUrl?: string;
|
|
302
302
|
fetch?: typeof fetch;
|
|
303
|
+
retryAttempts?: number;
|
|
304
|
+
retryDelay?: number;
|
|
305
|
+
sleep?: (milliseconds: number) => Promise<void>;
|
|
303
306
|
}
|
|
304
307
|
interface EnsurePullRequestOptions {
|
|
305
308
|
head: string;
|
|
@@ -355,6 +358,9 @@ export declare class GitHubClient implements GitHubOperations {
|
|
|
355
358
|
private readonly repository;
|
|
356
359
|
private readonly apiUrl;
|
|
357
360
|
private readonly requestFetch;
|
|
361
|
+
private readonly retryAttempts;
|
|
362
|
+
private readonly retryDelay;
|
|
363
|
+
private readonly sleep;
|
|
358
364
|
constructor(options?: GitHubClientOptions);
|
|
359
365
|
private getRepository;
|
|
360
366
|
private request;
|
|
@@ -370,7 +376,7 @@ export declare class GitHubClient implements GitHubOperations {
|
|
|
370
376
|
}
|
|
371
377
|
//#endregion
|
|
372
378
|
//#region src/commands/release/types.d.ts
|
|
373
|
-
type ReleaseMode = 'auto' | 'prepare' | 'publish' | 'publish-unpublished';
|
|
379
|
+
type ReleaseMode = 'auto' | 'prepare' | 'publish' | 'publish-unpublished' | 'reconcile';
|
|
374
380
|
interface ReleaseOptions {
|
|
375
381
|
cwd: string;
|
|
376
382
|
branch?: string;
|
|
@@ -384,6 +390,7 @@ interface ReleaseCiOptions extends ReleaseOptions {
|
|
|
384
390
|
mode?: ReleaseMode;
|
|
385
391
|
packageName?: string;
|
|
386
392
|
packageVersion?: string;
|
|
393
|
+
dryRun?: boolean;
|
|
387
394
|
github?: GitHubOperations;
|
|
388
395
|
}
|
|
389
396
|
interface PublishedPackage {
|
|
@@ -394,13 +401,30 @@ interface PublishedPackage {
|
|
|
394
401
|
//#region src/commands/release/ci.d.ts
|
|
395
402
|
declare function createReleasePullRequest(options: ReleaseCiOptions): Promise<boolean>;
|
|
396
403
|
declare function recoverUnpublished(options: ReleaseCiOptions): Promise<PublishedPackage[]>;
|
|
397
|
-
export declare function releaseCi(options: ReleaseCiOptions): Promise<PublishedPackage[] |
|
|
404
|
+
export declare function releaseCi(options: ReleaseCiOptions): Promise<PublishedPackage[] | {
|
|
405
|
+
repaired: string[];
|
|
406
|
+
pending: string[];
|
|
407
|
+
skipped: string[];
|
|
408
|
+
} | undefined>;
|
|
398
409
|
//#endregion
|
|
399
410
|
//#region src/commands/release/prerelease.d.ts
|
|
400
411
|
export declare function releasePrerelease(options: ReleaseOptions): Promise<PublishedPackage[] | undefined>;
|
|
401
412
|
export declare function enterPrerelease(tag: string, options: ReleaseOptions): Promise<void>;
|
|
402
413
|
export declare function exitPrerelease(options: ReleaseOptions): Promise<void>;
|
|
403
414
|
//#endregion
|
|
415
|
+
//#region src/commands/release/reconcile.d.ts
|
|
416
|
+
interface ReleaseReconcileOptions extends ReleaseOptions {
|
|
417
|
+
packageName?: string;
|
|
418
|
+
packageVersion?: string;
|
|
419
|
+
dryRun?: boolean;
|
|
420
|
+
github?: Pick<GitHubOperations, 'listReleases' | 'ensureRelease' | 'ensureTag' | 'enrichReleaseNote' | 'readReleasePullRequestContributors'>;
|
|
421
|
+
}
|
|
422
|
+
export declare function reconcileRelease(options: ReleaseReconcileOptions): Promise<{
|
|
423
|
+
repaired: string[];
|
|
424
|
+
pending: string[];
|
|
425
|
+
skipped: string[];
|
|
426
|
+
}>;
|
|
427
|
+
//#endregion
|
|
404
428
|
//#region src/commands/release/repair.d.ts
|
|
405
429
|
interface RepairReleaseNotesOptions extends ReleaseOptions {
|
|
406
430
|
tag?: string;
|
|
@@ -426,7 +450,7 @@ export declare function releaseStable(options: ReleaseOptions): Promise<Publishe
|
|
|
426
450
|
/**
|
|
427
451
|
* 当前支持的 skills 同步目标。
|
|
428
452
|
*/
|
|
429
|
-
export declare const skillTargets: readonly ["codex", "claude"];
|
|
453
|
+
export declare const skillTargets: readonly ["codex", "claude", "cursor", "agents", "grok"];
|
|
430
454
|
type SkillTarget = typeof skillTargets[number];
|
|
431
455
|
interface SyncSkillsOptions {
|
|
432
456
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as verifyCommitMsg, B as escapeStringRegexp, C as createContext, D as collectEnvSupportBundle, E as collectEnvSnapshot, F as inspectMonorepoConfig, G as isGitignoreFile, H as setByPath, I as cleanProjects, J as updateIssueTemplateConfig, K as toPublishGitignorePath, L as getSkillTargetPaths, M as getTemplateMap, N as resolveCreateNewProjectPlan, O as runDoctor, P as templateMap, Q as runRecommendedCheck, R as skillTargets, S as normalizeInitToolingTargets, T as collectEnvPaths, U as getFileHash, V as isMatch, W as isFileChanged, X as resolveFullWorkspaceCheckPlan, Y as getKnownRepoCheckCommands, Z as resolveRecommendedCheckPlan, _ as parsePublishSummary, a as createReleasePullRequest, at as generateAgenticTemplate, b as initMetadata, c as prepareStable, ct as GitClient, d as reconcileRelease, et as verifyPreCommit, f as enterPrerelease, g as GitHubClient, h as GitHubApiError, i as repairReleaseNotes, it as defaultAgenticBaseDir, j as getCreateChoices, k as createNewProject, l as publishStable, m as releasePrerelease, n as upgradeMonorepo, nt as verifyStagedTypecheck, o as recoverUnpublished, ot as generateAgenticTemplates, p as exitPrerelease, q as toWorkspaceGitignorePath, r as checkTemplates, rt as createTimestampFolderName, s as releaseCi, st as loadAgenticTasks, tt as verifyPrePush, u as releaseStable, v as setVscodeBinaryMirror, w as collectEnvInfo, x as initTooling, y as init, z as syncSkills } from "./commands-CtYIB-DG.mjs";
|
|
2
2
|
import { i as getWorkspacePackages, n as getWorkspaceData, r as getWorkspacePackageSummaries, t as clearWorkspaceCache } from "./workspace-MCKewElu.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { C as outputJson, D as remove, E as readJson, O as writeJSON, S as outputJSON, T as readJSON, _ as ensureFile, a as rootDir, b as isIgnorableFsError, g as ensureDir, h as copy, i as packageDir, k as writeJson, l as version, m as logger, n as assetsDir, o as templatesDir, r as cliName, s as name, t as initToolingTargets, v as exists, w as pathExists, x as outputFile } from "./types-B7zNkQpy.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-BfXlmCi-.mjs";
|
|
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 };
|
|
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, reconcileRelease, 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 };
|
|
@@ -343,38 +343,121 @@ function message(key, values = {}) {
|
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region package.json
|
|
345
345
|
var name = "@icebreakers/monorepo";
|
|
346
|
-
var version = "5.
|
|
347
|
-
var
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
"
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
346
|
+
var version = "5.5.1";
|
|
347
|
+
var package_default = {
|
|
348
|
+
name,
|
|
349
|
+
type: "module",
|
|
350
|
+
version,
|
|
351
|
+
description: "Core engine and programmatic APIs for repoctl",
|
|
352
|
+
author: "ice breaker <hi@sonofmagic.top>",
|
|
353
|
+
license: "MIT",
|
|
354
|
+
homepage: "https://repoctl.icebreaker.top",
|
|
355
|
+
repository: {
|
|
356
|
+
"type": "git",
|
|
357
|
+
"url": "git+https://github.com/sonofmagic/repoctl.git",
|
|
358
|
+
"directory": "packages/monorepo"
|
|
359
|
+
},
|
|
360
|
+
bugs: { "url": "https://github.com/sonofmagic/repoctl/issues" },
|
|
361
|
+
keywords: [
|
|
362
|
+
"monorepo",
|
|
363
|
+
"repoctl",
|
|
364
|
+
"tooling",
|
|
365
|
+
"icebreaker"
|
|
366
|
+
],
|
|
367
|
+
sideEffects: false,
|
|
368
|
+
exports: {
|
|
369
|
+
".": {
|
|
370
|
+
"types": "./dist/index.d.mts",
|
|
371
|
+
"default": "./dist/index.mjs"
|
|
372
|
+
},
|
|
373
|
+
"./cli": {
|
|
374
|
+
"types": "./dist/cli.d.mts",
|
|
375
|
+
"default": "./dist/cli.mjs"
|
|
376
|
+
},
|
|
377
|
+
"./tooling": {
|
|
378
|
+
"types": "./dist/tooling-entry.d.mts",
|
|
379
|
+
"default": "./dist/tooling-entry.mjs"
|
|
380
|
+
},
|
|
381
|
+
"./tsconfig": "./tsconfig.base.json",
|
|
382
|
+
"./tsconfig.json": "./tsconfig.base.json",
|
|
383
|
+
"./package.json": "./package.json"
|
|
384
|
+
},
|
|
385
|
+
main: "./dist/index.mjs",
|
|
386
|
+
module: "./dist/index.mjs",
|
|
387
|
+
types: "./dist/index.d.mts",
|
|
388
|
+
bin: {
|
|
389
|
+
"repo": "bin/repo.js",
|
|
390
|
+
"repoctl": "bin/repoctl.js"
|
|
391
|
+
},
|
|
392
|
+
files: [
|
|
393
|
+
"README.md",
|
|
394
|
+
"bin",
|
|
395
|
+
"dist",
|
|
396
|
+
"resources",
|
|
397
|
+
"tsconfig.base.json"
|
|
398
|
+
],
|
|
399
|
+
engines: { "node": ">=22.13.0" },
|
|
400
|
+
scripts: {
|
|
401
|
+
"dev": "tsdown --watch --sourcemap",
|
|
402
|
+
"build": "tsdown",
|
|
403
|
+
"test": "vitest run",
|
|
404
|
+
"test:dev": "vitest",
|
|
405
|
+
"typecheck": "pnpm --filter @icebreakers/monorepo-templates build && node ../../node_modules/typescript/bin/tsc -p tsconfig.json",
|
|
406
|
+
"tsd": "pnpm build && tsd --files test-d/**/*.test-d.ts",
|
|
407
|
+
"release": "pnpm publish",
|
|
408
|
+
"lint": "eslint .",
|
|
409
|
+
"lint:fix": "eslint . --fix"
|
|
410
|
+
},
|
|
411
|
+
peerDependencies: {
|
|
412
|
+
"@commitlint/cli": "catalog:",
|
|
413
|
+
"eslint": "^9.0.0 || ^10.0.0",
|
|
414
|
+
"stylelint": "catalog:",
|
|
415
|
+
"typescript": "^5.0.0 || ^6.0.0"
|
|
416
|
+
},
|
|
417
|
+
peerDependenciesMeta: {
|
|
418
|
+
"@commitlint/cli": { "optional": true },
|
|
419
|
+
"eslint": { "optional": true },
|
|
420
|
+
"stylelint": { "optional": true },
|
|
421
|
+
"typescript": { "optional": true }
|
|
422
|
+
},
|
|
423
|
+
dependencies: {
|
|
424
|
+
"@icebreakers/commitlint-config": "workspace:*",
|
|
425
|
+
"@icebreakers/eslint-config": "workspace:*",
|
|
426
|
+
"@icebreakers/monorepo-templates": "workspace:*",
|
|
427
|
+
"@icebreakers/stylelint-config": "workspace:*",
|
|
428
|
+
"@pnpm/find-workspace-dir": "^1000.1.5",
|
|
429
|
+
"@pnpm/logger": "^1100.0.0",
|
|
430
|
+
"@pnpm/types": "^1102.1.0",
|
|
431
|
+
"@pnpm/worker": "^1100.4.1",
|
|
432
|
+
"@pnpm/workspace.find-packages": "^1000.0.65",
|
|
433
|
+
"@pnpm/workspace.read-manifest": "^1000.3.1",
|
|
434
|
+
"c12": "^3.3.4",
|
|
435
|
+
"commander": "catalog:",
|
|
436
|
+
"comment-json": "catalog:",
|
|
437
|
+
"consola": "^3.4.2",
|
|
438
|
+
"git-url-parse": "^16.1.0",
|
|
439
|
+
"klaw": "^4.1.0",
|
|
440
|
+
"lint-staged": "^17.5.1",
|
|
441
|
+
"p-queue": "^9.3.3",
|
|
442
|
+
"pathe": "^2.0.3",
|
|
443
|
+
"picocolors": "^1.1.1",
|
|
444
|
+
"semver": "catalog:",
|
|
445
|
+
"simple-git": "^3.36.0",
|
|
446
|
+
"vitest": "catalog:",
|
|
447
|
+
"yaml": "catalog:"
|
|
448
|
+
},
|
|
449
|
+
devDependencies: {
|
|
450
|
+
"@types/klaw": "^3.0.7",
|
|
451
|
+
"@types/micromatch": "^4.0.10",
|
|
452
|
+
"@types/semver": "catalog:",
|
|
453
|
+
"ci-info": "^4.4.0",
|
|
454
|
+
"fdir": "^6.5.0",
|
|
455
|
+
"micromatch": "^4.0.8"
|
|
456
|
+
},
|
|
457
|
+
publishConfig: {
|
|
458
|
+
"access": "public",
|
|
459
|
+
"registry": "https://registry.npmjs.org"
|
|
460
|
+
}
|
|
378
461
|
};
|
|
379
462
|
//#endregion
|
|
380
463
|
//#region src/constants.ts
|
|
@@ -413,4 +496,4 @@ const initToolingTargets = [
|
|
|
413
496
|
"vitest"
|
|
414
497
|
];
|
|
415
498
|
//#endregion
|
|
416
|
-
export {
|
|
499
|
+
export { outputJson as C, remove as D, readJson as E, writeJSON as O, outputJSON as S, readJSON as T, ensureFile as _, rootDir as a, isIgnorableFsError as b, package_default as c, message as d, resolveRepoctlLocale as f, ensureDir as g, copy as h, packageDir as i, writeJson as k, version as l, logger as m, assetsDir as n, templatesDir as o, supportedLocales as p, cliName as r, name as s, initToolingTargets as t, localize as u, exists as v, pathExists as w, outputFile as x, fs as y };
|
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.5.1",
|
|
5
5
|
"description": "Core engine and programmatic APIs for repoctl",
|
|
6
6
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -46,13 +46,14 @@
|
|
|
46
46
|
"repoctl": "bin/repoctl.js"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
|
+
"README.md",
|
|
49
50
|
"bin",
|
|
50
51
|
"dist",
|
|
51
52
|
"resources",
|
|
52
53
|
"tsconfig.base.json"
|
|
53
54
|
],
|
|
54
55
|
"engines": {
|
|
55
|
-
"node": ">=22.
|
|
56
|
+
"node": ">=22.13.0"
|
|
56
57
|
},
|
|
57
58
|
"peerDependencies": {
|
|
58
59
|
"@commitlint/cli": "^21.2.2",
|
|
@@ -75,10 +76,10 @@
|
|
|
75
76
|
}
|
|
76
77
|
},
|
|
77
78
|
"dependencies": {
|
|
78
|
-
"@icebreakers/commitlint-config": "4.0
|
|
79
|
-
"@icebreakers/eslint-config": "
|
|
80
|
-
"@icebreakers/monorepo-templates": "
|
|
81
|
-
"@icebreakers/stylelint-config": "5.0
|
|
79
|
+
"@icebreakers/commitlint-config": "4.1.0",
|
|
80
|
+
"@icebreakers/eslint-config": "8.0.0",
|
|
81
|
+
"@icebreakers/monorepo-templates": "2.0.0",
|
|
82
|
+
"@icebreakers/stylelint-config": "5.1.0",
|
|
82
83
|
"@pnpm/find-workspace-dir": "^1000.1.5",
|
|
83
84
|
"@pnpm/logger": "^1100.0.0",
|
|
84
85
|
"@pnpm/types": "^1102.1.0",
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
"consola": "^3.4.2",
|
|
92
93
|
"git-url-parse": "^16.1.0",
|
|
93
94
|
"klaw": "^4.1.0",
|
|
94
|
-
"lint-staged": "^17.5.
|
|
95
|
+
"lint-staged": "^17.5.1",
|
|
95
96
|
"p-queue": "^9.3.3",
|
|
96
97
|
"pathe": "^2.0.3",
|
|
97
98
|
"picocolors": "^1.1.1",
|
|
@@ -103,9 +104,15 @@
|
|
|
103
104
|
"devDependencies": {
|
|
104
105
|
"@types/klaw": "^3.0.7",
|
|
105
106
|
"@types/micromatch": "^4.0.10",
|
|
107
|
+
"@types/semver": "^7.8.0",
|
|
108
|
+
"ci-info": "^4.4.0",
|
|
106
109
|
"fdir": "^6.5.0",
|
|
107
110
|
"micromatch": "^4.0.8"
|
|
108
111
|
},
|
|
112
|
+
"publishConfig": {
|
|
113
|
+
"access": "public",
|
|
114
|
+
"registry": "https://registry.npmjs.org"
|
|
115
|
+
},
|
|
109
116
|
"scripts": {
|
|
110
117
|
"dev": "tsdown --watch --sourcemap",
|
|
111
118
|
"build": "tsdown",
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: repoctl
|
|
3
|
+
description: Create and maintain pnpm/Turborepo workspaces with repoctl. Use when the user says 使用 repoctl 创建项目, create a monorepo, pnpm create repoctl, scaffold Vue/Hono/tsdown/vitepress, or run repo init/doctor/new/check.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# repoctl
|
|
7
|
+
|
|
8
|
+
The package name is `repoctl`. The command is `repo`.
|
|
9
|
+
|
|
10
|
+
## Empty directory
|
|
11
|
+
|
|
12
|
+
Do not prompt. Map the request to template keys, then:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pnpm create repoctl <dir> -- --yes --templates <keys>
|
|
16
|
+
cd <dir>
|
|
17
|
+
pnpm install
|
|
18
|
+
pnpm exec repo init
|
|
19
|
+
pnpm exec repo doctor
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`npm create` and `pnpm create` need the extra `--` before flags. `npx create-repoctl <dir> --yes --templates <keys>` does not.
|
|
23
|
+
|
|
24
|
+
| User intent | `--templates` key |
|
|
25
|
+
| ------------------------ | ------------------ |
|
|
26
|
+
| Vue / full-stack web app | `vue-hono` |
|
|
27
|
+
| API / Hono service | `hono-server` |
|
|
28
|
+
| TypeScript library / SDK | `tsdown` |
|
|
29
|
+
| Vue component library | `vue-lib` |
|
|
30
|
+
| Documentation site | `vitepress` |
|
|
31
|
+
| CLI | `cli` |
|
|
32
|
+
| Unspecified | omit `--templates` |
|
|
33
|
+
|
|
34
|
+
Then implement the requested feature in the generated workspace.
|
|
35
|
+
|
|
36
|
+
## Existing repoctl workspace
|
|
37
|
+
|
|
38
|
+
Look for `pnpm-workspace.yaml` and a `repoctl` / `repo` dependency.
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pnpm exec repo templates
|
|
42
|
+
pnpm exec repo new <name> --template <key>
|
|
43
|
+
pnpm exec repo check
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Verify
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pnpm exec repo doctor
|
|
50
|
+
pnpm exec repo check
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Do not
|
|
54
|
+
|
|
55
|
+
- Do not add packages by copying folders.
|
|
56
|
+
- Do not hang on create prompts; pass `--yes`.
|
|
57
|
+
- Do not create business apps inside the `sonofmagic/repoctl` source repository.
|
|
58
|
+
|
|
59
|
+
## References
|
|
60
|
+
|
|
61
|
+
- `references/templates.md` for template keys and `repo new` flags.
|
|
62
|
+
- `references/commands.md` for other CLI commands.
|
|
63
|
+
- `references/config.md` for `repoctl.config.ts`.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Purpose: bootstrap workspace metadata plus recommended tooling defaults.
|
|
6
6
|
Usage:
|
|
7
7
|
|
|
8
|
-
-
|
|
8
|
+
- pnpm exec repo init
|
|
9
9
|
Options:
|
|
10
10
|
- --preset <minimal|standard>: choose a lighter or fuller setup
|
|
11
11
|
- --force: overwrite existing tooling config files
|
|
@@ -108,7 +108,7 @@ Usage:
|
|
|
108
108
|
Purpose: initialize workspace metadata such as README, package.json, pnpm change intent support, and issue template.
|
|
109
109
|
Usage:
|
|
110
110
|
|
|
111
|
-
-
|
|
111
|
+
- pnpm exec repo init
|
|
112
112
|
- npx repoctl workspace init
|
|
113
113
|
- npx repoctl ws init
|
|
114
114
|
|
|
@@ -193,13 +193,16 @@ Usage:
|
|
|
193
193
|
|
|
194
194
|
## skills sync
|
|
195
195
|
|
|
196
|
-
Purpose: sync
|
|
196
|
+
Purpose: sync the `repoctl` skill into global agent skill directories.
|
|
197
197
|
Usage:
|
|
198
198
|
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
-
|
|
202
|
-
-
|
|
199
|
+
- pnpm exec repo skills sync
|
|
200
|
+
- pnpm exec repo skills sync --codex
|
|
201
|
+
- pnpm exec repo skills sync --claude
|
|
202
|
+
- pnpm exec repo skills sync --cursor
|
|
203
|
+
- pnpm exec repo skills sync --agents
|
|
204
|
+
- pnpm exec repo skills sync --grok
|
|
205
|
+
- pnpm exec repo skills sync --all
|
|
203
206
|
|
|
204
207
|
## ai prompt create (aliases: ai p create, ai p new)
|
|
205
208
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Templates
|
|
2
2
|
|
|
3
|
-
Prefer `repo new [name]` for the guided flow.
|
|
4
|
-
|
|
3
|
+
Prefer `repo new [name]` for the guided flow. For agents, pass `--template`
|
|
4
|
+
explicitly so the command does not prompt.
|
|
5
5
|
|
|
6
6
|
Intent defaults:
|
|
7
7
|
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: icebreakers-monorepo-cli
|
|
3
|
-
description: Use when working with repoctl or @icebreakers/monorepo in this pnpm/turbo monorepo. Covers CLI tasks like workspace upgrade/ws up, init, clean, mirror, skills sync, creating new template packages (tsdown/vitepress/etc), generating agentic prompt templates (repoctl ai prompt create / ai p new), and editing repoctl.config.ts or monorepo.config.ts defaults.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Icebreakers Monorepo Cli
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
Map user requests to the correct `repoctl` CLI command, templates, and configuration defaults.
|
|
11
|
-
Prefer `repoctl` in examples, allow `repo` as the short alias, and treat `rc` as a compatibility alias rather than the primary recommendation.
|
|
12
|
-
|
|
13
|
-
## Quick Workflow
|
|
14
|
-
|
|
15
|
-
1. Confirm the workspace root (look for `pnpm-workspace.yaml` and `package.json`).
|
|
16
|
-
2. Check `repoctl.config.ts` first, then `monorepo.config.ts` for command defaults or overrides.
|
|
17
|
-
3. Select the task below and follow the linked reference.
|
|
18
|
-
|
|
19
|
-
## Tasks
|
|
20
|
-
|
|
21
|
-
### Create a template package
|
|
22
|
-
|
|
23
|
-
- Prefer `repoctl new [name]` for the guided flow and use `references/templates.md` for intent-to-template mapping.
|
|
24
|
-
- Use `repoctl package create [path]` (alias `pkg new`) when the user explicitly wants direct template selection.
|
|
25
|
-
- Example: for "create a tsdown app in apps/my-app", run `npx repoctl new my-app`, choose `library`, then choose `tsdown`.
|
|
26
|
-
- For non-interactive defaults, set `commands.create.defaultTemplate` in `repoctl.config.ts` or `monorepo.config.ts`.
|
|
27
|
-
|
|
28
|
-
### Upgrade or sync monorepo assets
|
|
29
|
-
|
|
30
|
-
- Prefer `repoctl upgrade`; use `repoctl workspace upgrade` (`ws up`) when matching existing scripts or user wording.
|
|
31
|
-
|
|
32
|
-
### Generate agentic prompt templates
|
|
33
|
-
|
|
34
|
-
- Use `repoctl ai prompt create` (`ai p new`) and options from `references/commands.md`.
|
|
35
|
-
|
|
36
|
-
### Maintenance tasks
|
|
37
|
-
|
|
38
|
-
- Use `repoctl init`, `check`, `clean`, `mirror`, or `skills sync` from `references/commands.md`.
|
|
39
|
-
- Confirm destructive actions (clean) and note repo-wide effects.
|
|
40
|
-
|
|
41
|
-
## References
|
|
42
|
-
|
|
43
|
-
- `references/commands.md` for CLI options and flags.
|
|
44
|
-
- `references/templates.md` for template mapping and placement.
|
|
45
|
-
- `references/config.md` for `repoctl.config.ts` / `monorepo.config.ts` defaults.
|
|
File without changes
|