infra-kit 0.1.102 → 0.1.105
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/.eslintcache +1 -1
- package/.omc/state/agent-replay-0a58307d-2a37-4c69-851c-83a646502d62.jsonl +1 -0
- package/.omc/state/agent-replay-11c41aa0-51fa-49e1-a1dc-26dcd6ac26cc.jsonl +16 -0
- package/.omc/state/agent-replay-4cf1c186-81b2-497c-b002-d7f84e7839f3.jsonl +9 -0
- package/.omc/state/agent-replay-5c4ab554-64f1-42ae-83e3-21e0237e955c.jsonl +11 -0
- package/.omc/state/agent-replay-a60ac2ec-afbd-449f-a540-6df287392fc2.jsonl +1 -0
- package/.omc/state/agent-replay-be37e426-6fc8-47f4-8178-221c8494551c.jsonl +3 -0
- package/.omc/state/agent-replay-c967c819-3d1c-447b-ab48-56a8448ef9f8.jsonl +2 -0
- package/.omc/state/idle-notif-cooldown.json +3 -0
- package/.omc/state/last-tool-error.json +4 -4
- package/.omc/state/mission-state.json +53 -0
- package/.omc/state/sessions/0a58307d-2a37-4c69-851c-83a646502d62/pre-tool-advisory-throttle.json +18 -0
- package/.omc/state/sessions/0a58307d-2a37-4c69-851c-83a646502d62/subagent-tracking-state.json +7 -0
- package/.omc/state/sessions/11c41aa0-51fa-49e1-a1dc-26dcd6ac26cc/last-tool-error-state.json +7 -0
- package/.omc/state/sessions/11c41aa0-51fa-49e1-a1dc-26dcd6ac26cc/mission-state.json +117 -0
- package/.omc/state/sessions/11c41aa0-51fa-49e1-a1dc-26dcd6ac26cc/pre-tool-advisory-throttle.json +42 -0
- package/.omc/state/sessions/11c41aa0-51fa-49e1-a1dc-26dcd6ac26cc/subagent-tracking-state.json +53 -0
- package/.omc/state/sessions/4cf1c186-81b2-497c-b002-d7f84e7839f3/last-tool-error-state.json +7 -0
- package/.omc/state/sessions/4cf1c186-81b2-497c-b002-d7f84e7839f3/pre-tool-advisory-throttle.json +18 -0
- package/.omc/state/sessions/4cf1c186-81b2-497c-b002-d7f84e7839f3/subagent-tracking-state.json +7 -0
- package/.omc/state/sessions/5c4ab554-64f1-42ae-83e3-21e0237e955c/mission-state.json +117 -0
- package/.omc/state/sessions/5c4ab554-64f1-42ae-83e3-21e0237e955c/pre-tool-advisory-throttle.json +18 -0
- package/.omc/state/sessions/5c4ab554-64f1-42ae-83e3-21e0237e955c/subagent-tracking-state.json +17 -0
- package/.omc/state/sessions/a60ac2ec-afbd-449f-a540-6df287392fc2/pre-tool-advisory-throttle.json +18 -0
- package/.omc/state/sessions/a60ac2ec-afbd-449f-a540-6df287392fc2/subagent-tracking-state.json +7 -0
- package/.omc/state/sessions/c967c819-3d1c-447b-ab48-56a8448ef9f8/pre-tool-advisory-throttle.json +10 -0
- package/.omc/state/sessions/c967c819-3d1c-447b-ab48-56a8448ef9f8/subagent-tracking-state.json +7 -0
- package/.omc/state/subagent-tracking.json +14 -4
- package/.turbo/turbo-build.log +7 -0
- package/.turbo/turbo-check.log +14 -0
- package/.turbo/turbo-prettier-fix.log +2 -1
- package/.turbo/turbo-test.log +28 -5
- package/.turbo/turbo-validate.log +14 -0
- package/dist/cli.js +81 -74
- package/dist/cli.js.map +4 -4
- package/dist/entry/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +7 -0
- package/dist/lib/package-config/package-config.d.ts +71 -0
- package/dist/mcp.js +43 -41
- package/dist/mcp.js.map +4 -4
- package/eslint.config.js +1 -1
- package/infra-kit.config.ts +5 -0
- package/package.json +20 -13
- package/scripts/build.js +32 -3
- package/src/.omc/state/sessions/0a58307d-2a37-4c69-851c-83a646502d62/pre-tool-advisory-throttle.json +18 -0
- package/src/commands/.omc/state/sessions/c967c819-3d1c-447b-ab48-56a8448ef9f8/pre-tool-advisory-throttle.json +18 -0
- package/src/commands/audit/__tests__/audit.test.ts +59 -0
- package/src/commands/audit/audit.ts +177 -0
- package/src/commands/audit/index.ts +1 -0
- package/src/commands/config/config.ts +49 -7
- package/src/commands/doctor/doctor.ts +3 -3
- package/src/commands/env-clear/env-clear.ts +1 -1
- package/src/commands/env-list/env-list.ts +3 -3
- package/src/commands/env-load/env-load.ts +1 -1
- package/src/commands/env-status/env-status.ts +1 -1
- package/src/commands/gh-merge-dev/gh-merge-dev.ts +3 -8
- package/src/commands/gh-release-deliver/gh-release-deliver.ts +47 -21
- package/src/commands/gh-release-deploy-all/gh-release-deploy-all.ts +13 -7
- package/src/commands/gh-release-deploy-selected/gh-release-deploy-selected.ts +12 -6
- package/src/commands/gh-release-list/gh-release-list.ts +19 -8
- package/src/commands/init/__tests__/migrate-config.test.ts +160 -0
- package/src/commands/init/init.ts +48 -35
- package/src/commands/init/migrate-config.ts +146 -0
- package/src/commands/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/src/commands/release-create/__tests__/release-create.test.ts +55 -0
- package/src/commands/release-create/release-create.ts +142 -38
- package/src/commands/release-desc-edit/release-desc-edit.ts +28 -8
- package/src/commands/version/version.ts +1 -1
- package/src/commands/worktrees-add/worktrees-add.ts +7 -12
- package/src/commands/worktrees-list/worktrees-list.ts +13 -5
- package/src/commands/worktrees-open/worktrees-open.ts +1 -1
- package/src/commands/worktrees-remove/worktrees-remove.ts +6 -10
- package/src/commands/worktrees-sync/worktrees-sync.ts +3 -5
- package/src/entry/cli.ts +49 -6
- package/src/entry/index.ts +5 -0
- package/src/integrations/cmux/open-workspace-with-layout.ts +4 -4
- package/src/integrations/cmux/workspace-title.ts +10 -4
- package/src/integrations/doppler/doppler-project.ts +1 -1
- package/src/integrations/gh/gh-release-prs/__tests__/gh-release-prs.test.ts +115 -0
- package/src/integrations/gh/gh-release-prs/gh-release-prs.ts +49 -32
- package/src/lib/.omc/state/sessions/a60ac2ec-afbd-449f-a540-6df287392fc2/pre-tool-advisory-throttle.json +14 -0
- package/src/lib/constants/index.ts +15 -0
- package/src/lib/git-utils/__tests__/git-utils.test.ts +49 -0
- package/src/lib/git-utils/git-utils.ts +3 -1
- package/src/lib/infra-kit-config/__tests__/infra-kit-config.test.ts +270 -0
- package/src/lib/infra-kit-config/index.ts +7 -1
- package/src/lib/infra-kit-config/infra-kit-config.ts +46 -28
- package/src/lib/package-config/__tests__/package-config.test.ts +95 -0
- package/src/lib/package-config/index.ts +3 -0
- package/src/lib/package-config/package-config-schema.ts +19 -0
- package/src/lib/package-config/package-config.ts +99 -0
- package/src/lib/package-validator/__tests__/package-validator.test.ts +263 -0
- package/src/lib/package-validator/checks/__tests__/checks.test.ts +130 -0
- package/src/lib/package-validator/checks/config-check.ts +30 -0
- package/src/lib/package-validator/checks/files-check.ts +29 -0
- package/src/lib/package-validator/checks/index.ts +4 -0
- package/src/lib/package-validator/checks/scripts-check.ts +23 -0
- package/src/lib/package-validator/checks/turbo-check.ts +47 -0
- package/src/lib/package-validator/fs-utils.ts +18 -0
- package/src/lib/package-validator/index.ts +3 -0
- package/src/lib/package-validator/loader/config-loader.ts +77 -0
- package/src/lib/package-validator/loader/index.ts +2 -0
- package/src/lib/package-validator/loader/package-discovery.ts +98 -0
- package/src/lib/package-validator/package-validator.ts +48 -0
- package/src/lib/package-validator/types.ts +15 -0
- package/src/lib/release-id/__tests__/release-id.test.ts +351 -0
- package/src/lib/release-id/__tests__/versioned-regression.test.ts +69 -0
- package/src/lib/release-id/index.ts +15 -0
- package/src/lib/release-id/release-id.ts +257 -0
- package/src/lib/release-utils/__tests__/release-utils.test.ts +122 -0
- package/src/lib/release-utils/index.ts +4 -0
- package/src/lib/release-utils/release-utils.ts +85 -17
- package/src/lib/version-utils/__tests__/load-existing-versions.test.ts +37 -0
- package/src/lib/version-utils/__tests__/next-version.test.ts +119 -13
- package/src/lib/version-utils/index.ts +3 -0
- package/src/lib/version-utils/load-existing-versions.ts +29 -10
- package/src/lib/version-utils/next-version.ts +67 -12
- package/src/lib/version-utils/version-utils.ts +13 -4
- package/src/mcp/tools/index.ts +2 -0
- package/src/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/src/types.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/src/lib/__tests__/infra-kit-config.test.ts +0 -231
- /package/src/integrations/{clickup → linear}/.gitkeep +0 -0
- /package/src/lib/{__tests__ → constants/__tests__}/constants.test.ts +0 -0
- /package/src/lib/{constants.ts → constants/constants.ts} +0 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/lib/package-config/package-config.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Validation rules for a single workspace package, declared in its\n * `infra-kit.config.js`. Every field is optional: a key left unset falls back to\n * the active baseline ({@link DEFAULT_RULES} for packages, {@link ROOT_DEFAULT_RULES}\n * for the monorepo root), and a key set replaces that default wholesale (per-key,\n * no array concatenation) so a package can opt out with an explicit empty array.\n *\n * Most packages need none of these \u2014 the standard rules live in the baseline, so\n * a typical config is just `defineConfig(() => ({}))`.\n *\n * @example\n * // infra-kit.config.js\n * import { defineConfig } from 'infra-kit'\n *\n * export default defineConfig(() => ({}))\n */\nexport interface InfraKitPackageConfig {\n /** Scripts that must be present in the package's package.json `scripts` map. */\n requiredScripts?: string[]\n /** Files (relative to the package root) that must exist on disk. */\n requiredFiles?: string[]\n /** Turborepo expectations \u2014 only meaningful where a turbo.json lives (the root). */\n turbo?: {\n /** Tasks that must be defined in turbo.json `tasks`. */\n requiredTasks?: string[]\n }\n}\n\n/**\n * Accepted shapes for a package config's default export \u2014 mirrors Vite's\n * `defineConfig` input: a plain object, a sync factory, or an async factory.\n */\nexport type InfraKitPackageConfigInput =\n | InfraKitPackageConfig\n | (() => InfraKitPackageConfig)\n | (() => Promise<InfraKitPackageConfig>)\n\n/**\n * Identity helper that gives `infra-kit.config.js` authors full type inference\n * and editor autocomplete without changing the value \u2014 exactly like Vite's\n * `defineConfig`. Resolution of the factory form happens in the loader, not here.\n *\n * @example\n * export default defineConfig(() => ({}))\n *\n * @example\n * export default defineConfig(() => ({ requiredScripts: [] }))\n */\nexport const defineConfig = (config: InfraKitPackageConfigInput): InfraKitPackageConfigInput => {\n return config\n}\n\n/** Fully-resolved rules with every defaultable field present. */\nexport interface ResolvedPackageRules {\n requiredScripts: string[]\n requiredFiles: string[]\n turboTasks: string[]\n}\n\n/**\n * Baseline rules for a standard TypeScript workspace package, applied to any key\n * a package leaves unset. These are the \"under the hood\" defaults so a conforming\n * package's config can stay empty; non-standard packages override the relevant key.\n */\nexport const DEFAULT_RULES: Readonly<ResolvedPackageRules> = {\n requiredScripts: ['build', 'ts-check', 'eslint-check', 'prettier-check', 'test'],\n requiredFiles: ['tsconfig.json', 'eslint.config.js', 'readme.md'],\n turboTasks: [],\n}\n\n/**\n * Baseline rules for the monorepo root (`infra-kit audit --root`). Checks the\n * root commands, the workspace/turbo files, and that the turbo pipeline defines\n * the expected tasks \u2014 so the root's own config can also stay empty.\n */\nexport const ROOT_DEFAULT_RULES: Readonly<ResolvedPackageRules> = {\n requiredScripts: ['build', 'dev', 'test', 'qa', 'check', 'fix'],\n requiredFiles: ['turbo.json', 'pnpm-workspace.yaml'],\n turboTasks: ['build', 'test', 'ts-check', 'eslint-check', 'prettier-check', 'check'],\n}\n\n/**\n * Merge a parsed package config over a baseline. Each key is replaced wholesale\n * when the package provides it, otherwise the baseline value is used.\n *\n * @example\n * resolvePackageConfig({ requiredScripts: [] })\n * // => { requiredScripts: [], requiredFiles: [...DEFAULT_RULES.requiredFiles], turboTasks: [] }\n */\nexport const resolvePackageConfig = (\n config: InfraKitPackageConfig,\n baseline: Readonly<ResolvedPackageRules> = DEFAULT_RULES,\n): ResolvedPackageRules => {\n return {\n requiredScripts: config.requiredScripts ?? [...baseline.requiredScripts],\n requiredFiles: config.requiredFiles ?? [...baseline.requiredFiles],\n turboTasks: config.turbo?.requiredTasks ?? [...baseline.turboTasks],\n }\n}\n"],
|
|
5
|
+
"mappings": "AAgDO,IAAMA,EAAgBC,GACpBA",
|
|
6
|
+
"names": ["defineConfig", "config"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation rules for a single workspace package, declared in its
|
|
3
|
+
* `infra-kit.config.js`. Every field is optional: a key left unset falls back to
|
|
4
|
+
* the active baseline ({@link DEFAULT_RULES} for packages, {@link ROOT_DEFAULT_RULES}
|
|
5
|
+
* for the monorepo root), and a key set replaces that default wholesale (per-key,
|
|
6
|
+
* no array concatenation) so a package can opt out with an explicit empty array.
|
|
7
|
+
*
|
|
8
|
+
* Most packages need none of these — the standard rules live in the baseline, so
|
|
9
|
+
* a typical config is just `defineConfig(() => ({}))`.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // infra-kit.config.js
|
|
13
|
+
* import { defineConfig } from 'infra-kit'
|
|
14
|
+
*
|
|
15
|
+
* export default defineConfig(() => ({}))
|
|
16
|
+
*/
|
|
17
|
+
export interface InfraKitPackageConfig {
|
|
18
|
+
/** Scripts that must be present in the package's package.json `scripts` map. */
|
|
19
|
+
requiredScripts?: string[];
|
|
20
|
+
/** Files (relative to the package root) that must exist on disk. */
|
|
21
|
+
requiredFiles?: string[];
|
|
22
|
+
/** Turborepo expectations — only meaningful where a turbo.json lives (the root). */
|
|
23
|
+
turbo?: {
|
|
24
|
+
/** Tasks that must be defined in turbo.json `tasks`. */
|
|
25
|
+
requiredTasks?: string[];
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Accepted shapes for a package config's default export — mirrors Vite's
|
|
30
|
+
* `defineConfig` input: a plain object, a sync factory, or an async factory.
|
|
31
|
+
*/
|
|
32
|
+
export type InfraKitPackageConfigInput = InfraKitPackageConfig | (() => InfraKitPackageConfig) | (() => Promise<InfraKitPackageConfig>);
|
|
33
|
+
/**
|
|
34
|
+
* Identity helper that gives `infra-kit.config.js` authors full type inference
|
|
35
|
+
* and editor autocomplete without changing the value — exactly like Vite's
|
|
36
|
+
* `defineConfig`. Resolution of the factory form happens in the loader, not here.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* export default defineConfig(() => ({}))
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* export default defineConfig(() => ({ requiredScripts: [] }))
|
|
43
|
+
*/
|
|
44
|
+
export declare const defineConfig: (config: InfraKitPackageConfigInput) => InfraKitPackageConfigInput;
|
|
45
|
+
/** Fully-resolved rules with every defaultable field present. */
|
|
46
|
+
export interface ResolvedPackageRules {
|
|
47
|
+
requiredScripts: string[];
|
|
48
|
+
requiredFiles: string[];
|
|
49
|
+
turboTasks: string[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Baseline rules for a standard TypeScript workspace package, applied to any key
|
|
53
|
+
* a package leaves unset. These are the "under the hood" defaults so a conforming
|
|
54
|
+
* package's config can stay empty; non-standard packages override the relevant key.
|
|
55
|
+
*/
|
|
56
|
+
export declare const DEFAULT_RULES: Readonly<ResolvedPackageRules>;
|
|
57
|
+
/**
|
|
58
|
+
* Baseline rules for the monorepo root (`infra-kit audit --root`). Checks the
|
|
59
|
+
* root commands, the workspace/turbo files, and that the turbo pipeline defines
|
|
60
|
+
* the expected tasks — so the root's own config can also stay empty.
|
|
61
|
+
*/
|
|
62
|
+
export declare const ROOT_DEFAULT_RULES: Readonly<ResolvedPackageRules>;
|
|
63
|
+
/**
|
|
64
|
+
* Merge a parsed package config over a baseline. Each key is replaced wholesale
|
|
65
|
+
* when the package provides it, otherwise the baseline value is used.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* resolvePackageConfig({ requiredScripts: [] })
|
|
69
|
+
* // => { requiredScripts: [], requiredFiles: [...DEFAULT_RULES.requiredFiles], turboTasks: [] }
|
|
70
|
+
*/
|
|
71
|
+
export declare const resolvePackageConfig: (config: InfraKitPackageConfig, baseline?: Readonly<ResolvedPackageRules>) => ResolvedPackageRules;
|