@grunnverk/commands-publish 1.0.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/LICENSE +190 -0
- package/README.md +65 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2848 -0
- package/dist/index.js.map +1 -0
- package/dist/src/commands/development.d.ts +6 -0
- package/dist/src/commands/development.d.ts.map +1 -0
- package/dist/src/commands/dryRunReporter.d.ts +63 -0
- package/dist/src/commands/dryRunReporter.d.ts.map +1 -0
- package/dist/src/commands/publish.d.ts +3 -0
- package/dist/src/commands/publish.d.ts.map +1 -0
- package/dist/src/commands/release.d.ts +3 -0
- package/dist/src/commands/release.d.ts.map +1 -0
- package/dist/src/commands/validation.d.ts +25 -0
- package/dist/src/commands/validation.d.ts.map +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.d.ts.map +1 -0
- package/guide/index.md +57 -0
- package/package.json +78 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"development.d.ts","sourceRoot":"","sources":["../../../src/commands/development.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAmB,MAAM,EAAiH,MAAM,iBAAiB,CAAC;AAoGzK;;GAEG;AACH,eAAO,MAAM,OAAO,GAAU,WAAW,MAAM,KAAG,OAAO,CAAC,MAAM,CAgd/D,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dry-run reporting for publish operations
|
|
3
|
+
*
|
|
4
|
+
* Provides comprehensive preview of what would happen during publish
|
|
5
|
+
*/
|
|
6
|
+
export interface DryRunReport {
|
|
7
|
+
operations: Array<{
|
|
8
|
+
step: string;
|
|
9
|
+
command?: string;
|
|
10
|
+
files?: Array<{
|
|
11
|
+
path: string;
|
|
12
|
+
changes: string;
|
|
13
|
+
}>;
|
|
14
|
+
description: string;
|
|
15
|
+
}>;
|
|
16
|
+
versionChanges: {
|
|
17
|
+
current: string;
|
|
18
|
+
proposed: string;
|
|
19
|
+
};
|
|
20
|
+
tags: string[];
|
|
21
|
+
npmPublish: {
|
|
22
|
+
package: string;
|
|
23
|
+
version: string;
|
|
24
|
+
files: string[];
|
|
25
|
+
};
|
|
26
|
+
prDetails?: {
|
|
27
|
+
title: string;
|
|
28
|
+
targetBranch: string;
|
|
29
|
+
sourceBranch: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface TreeDryRunReport {
|
|
33
|
+
packages: Array<{
|
|
34
|
+
name: string;
|
|
35
|
+
order: number;
|
|
36
|
+
dependencies: string[];
|
|
37
|
+
operations: string[];
|
|
38
|
+
versionChange?: {
|
|
39
|
+
from: string;
|
|
40
|
+
to: string;
|
|
41
|
+
};
|
|
42
|
+
}>;
|
|
43
|
+
dependencyUpdates: Array<{
|
|
44
|
+
package: string;
|
|
45
|
+
dependency: string;
|
|
46
|
+
from: string;
|
|
47
|
+
to: string;
|
|
48
|
+
}>;
|
|
49
|
+
buildOrder: string[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Log dry-run report for single package publish
|
|
53
|
+
*/
|
|
54
|
+
export declare function logDryRunReport(report: DryRunReport): void;
|
|
55
|
+
/**
|
|
56
|
+
* Log dry-run report for tree operations
|
|
57
|
+
*/
|
|
58
|
+
export declare function logTreeDryRunReport(report: TreeDryRunReport): void;
|
|
59
|
+
/**
|
|
60
|
+
* Create a dry-run report for a single package publish
|
|
61
|
+
*/
|
|
62
|
+
export declare function createDryRunReport(currentVersion: string, proposedVersion: string, packageName: string, operations: DryRunReport['operations'], targetBranch?: string, sourceBranch?: string): DryRunReport;
|
|
63
|
+
//# sourceMappingURL=dryRunReporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dryRunReporter.d.ts","sourceRoot":"","sources":["../../../src/commands/dryRunReporter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,WAAW,YAAY;IACzB,UAAU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B,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAsDlE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAC9B,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC,EACtC,YAAY,CAAC,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,MAAM,GACtB,YAAY,CAmBd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../src/commands/publish.ts"],"names":[],"mappings":"AAMA,OAAO,EAA8B,MAAM,EAAgM,MAAM,iBAAiB,CAAC;AAolBnQ,eAAO,MAAM,OAAO,GAAU,WAAW,MAAM,KAAG,OAAO,CAAC,IAAI,CAkkC7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/commands/release.ts"],"names":[],"mappings":";AAEA,OAAO,eAAe,CAAC;AAGvB,OAAO,EACH,MAAM,EAiBN,cAAc,EAGjB,MAAM,iBAAiB,CAAC;AA+PzB,eAAO,MAAM,OAAO,GAAU,WAAW,MAAM,KAAG,OAAO,CAAC,cAAc,CAkNvE,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Config } from '@grunnverk/core';
|
|
2
|
+
export interface ValidationIssue {
|
|
3
|
+
check: string;
|
|
4
|
+
message: string;
|
|
5
|
+
files?: string[];
|
|
6
|
+
suggestion?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ValidationResult {
|
|
9
|
+
valid: boolean;
|
|
10
|
+
errors: ValidationIssue[];
|
|
11
|
+
warnings: ValidationIssue[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Run comprehensive pre-flight validation
|
|
15
|
+
*/
|
|
16
|
+
export declare function runPreflightValidation(runConfig: Config, targetBranch?: string): Promise<ValidationResult>;
|
|
17
|
+
/**
|
|
18
|
+
* Log validation results
|
|
19
|
+
*/
|
|
20
|
+
export declare function logValidationResults(result: ValidationResult): void;
|
|
21
|
+
/**
|
|
22
|
+
* Throw ValidationError if validation failed
|
|
23
|
+
*/
|
|
24
|
+
export declare function throwIfValidationFailed(result: ValidationResult): void;
|
|
25
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/commands/validation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CACxC,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,gBAAgB,CAAC,CAsB3B;AAuMD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAoCnE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAWtE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { execute as development } from './commands/development';
|
|
2
|
+
export { execute as publish } from './commands/publish';
|
|
3
|
+
export { execute as release } from './commands/release';
|
|
4
|
+
export * from './commands/validation';
|
|
5
|
+
export * from './commands/dryRunReporter';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC"}
|
package/guide/index.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# @grunnverk/commands-publish - Agentic Guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Publishing workflow commands for kodrdriv. Provides:
|
|
6
|
+
- Development version bumping
|
|
7
|
+
- NPM publish workflow with PR creation
|
|
8
|
+
- GitHub release creation
|
|
9
|
+
|
|
10
|
+
## Quick Reference
|
|
11
|
+
|
|
12
|
+
For AI agents working with this package:
|
|
13
|
+
- Development command: Bumps version with -dev suffix
|
|
14
|
+
- Publish command: Creates PR, publishes to npm
|
|
15
|
+
- Release command: Creates GitHub release
|
|
16
|
+
|
|
17
|
+
## Key Exports
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
// Publishing commands
|
|
21
|
+
import { development, publish, release } from '@grunnverk/commands-publish';
|
|
22
|
+
|
|
23
|
+
// Execute commands
|
|
24
|
+
await development(config);
|
|
25
|
+
await publish(config);
|
|
26
|
+
await release(config);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Dependencies
|
|
30
|
+
|
|
31
|
+
- @grunnverk/core - Core utilities
|
|
32
|
+
- @grunnverk/commands-git - Git workflow commands
|
|
33
|
+
- @grunnverk/git-tools - Git operations
|
|
34
|
+
- @grunnverk/github-tools - GitHub API
|
|
35
|
+
- @grunnverk/ai-service - AI content generation
|
|
36
|
+
|
|
37
|
+
## Command Workflows
|
|
38
|
+
|
|
39
|
+
### development
|
|
40
|
+
|
|
41
|
+
1. Check current branch
|
|
42
|
+
2. Bump version with -dev suffix
|
|
43
|
+
3. Create development branch
|
|
44
|
+
|
|
45
|
+
### publish
|
|
46
|
+
|
|
47
|
+
1. Run precommit checks
|
|
48
|
+
2. Bump version
|
|
49
|
+
3. Create PR
|
|
50
|
+
4. Publish to npm
|
|
51
|
+
|
|
52
|
+
### release
|
|
53
|
+
|
|
54
|
+
1. Generate changelog
|
|
55
|
+
2. Create GitHub release
|
|
56
|
+
3. Tag version
|
|
57
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@grunnverk/commands-publish",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Publishing workflow commands for kodrdriv (development, publish, release)",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"guide"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/grunnverk/commands-publish.git"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "npm run lint && tsc --noEmit && vite build",
|
|
23
|
+
"dev": "vite",
|
|
24
|
+
"watch": "vite build --watch",
|
|
25
|
+
"test": "vitest run --coverage",
|
|
26
|
+
"lint": "eslint . --ext .ts",
|
|
27
|
+
"lint:fix": "eslint . --ext .ts --fix",
|
|
28
|
+
"clean": "rm -rf dist",
|
|
29
|
+
"precommit": "npm run clean && npm run build && npm run lint && npm run test",
|
|
30
|
+
"prepublishOnly": "npm run clean && npm run lint && npm run build && npm run test"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"kodrdriv",
|
|
34
|
+
"publish",
|
|
35
|
+
"release",
|
|
36
|
+
"development",
|
|
37
|
+
"npm",
|
|
38
|
+
"commands"
|
|
39
|
+
],
|
|
40
|
+
"author": "Tim O'Brien <tobrien@discursive.com>",
|
|
41
|
+
"license": "Apache-2.0",
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=24.0.0"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@grunnverk/ai-service": "^1.0.1",
|
|
47
|
+
"@grunnverk/commands-git": "^1.0.0",
|
|
48
|
+
"@grunnverk/commands-tree": "^1.0.0",
|
|
49
|
+
"@grunnverk/core": "^1.0.0",
|
|
50
|
+
"@grunnverk/git-tools": "^1.0.1",
|
|
51
|
+
"@grunnverk/github-tools": "^1.0.0",
|
|
52
|
+
"@grunnverk/shared": "^0.1.11",
|
|
53
|
+
"@riotprompt/riotprompt": "^0.0.21",
|
|
54
|
+
"dotenv": "^17.2.1",
|
|
55
|
+
"openai": "^6.3.0",
|
|
56
|
+
"semver": "^7.6.0"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
60
|
+
"@eslint/js": "^9.33.0",
|
|
61
|
+
"@swc/core": "^1.13.3",
|
|
62
|
+
"@types/node": "^25.0.3",
|
|
63
|
+
"@types/semver": "^7.5.8",
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "^8.39.1",
|
|
65
|
+
"@typescript-eslint/parser": "^8.47.0",
|
|
66
|
+
"@vitest/coverage-v8": "^4.0.13",
|
|
67
|
+
"esbuild": "0.27.2",
|
|
68
|
+
"eslint": "^9.33.0",
|
|
69
|
+
"eslint-plugin-import": "^2.32.0",
|
|
70
|
+
"globals": "^16.3.0",
|
|
71
|
+
"mockdate": "^3.0.5",
|
|
72
|
+
"typescript": "^5.9.2",
|
|
73
|
+
"vite": "^7.2.4",
|
|
74
|
+
"vite-plugin-dts": "^4.3.0",
|
|
75
|
+
"vite-plugin-node": "^7.0.0",
|
|
76
|
+
"vitest": "^4.0.13"
|
|
77
|
+
}
|
|
78
|
+
}
|