@kitsi/pack-github-release 0.0.2

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.
Files changed (69) hide show
  1. package/dist/checks/gh-auth.d.ts +6 -0
  2. package/dist/checks/gh-auth.d.ts.map +1 -0
  3. package/dist/checks/gh-auth.js +22 -0
  4. package/dist/checks/gh-auth.js.map +1 -0
  5. package/dist/checks/gh-cli.d.ts +6 -0
  6. package/dist/checks/gh-cli.d.ts.map +1 -0
  7. package/dist/checks/gh-cli.js +24 -0
  8. package/dist/checks/gh-cli.js.map +1 -0
  9. package/dist/checks/index.d.ts +18 -0
  10. package/dist/checks/index.d.ts.map +1 -0
  11. package/dist/checks/index.js +33 -0
  12. package/dist/checks/index.js.map +1 -0
  13. package/dist/checks/repository.d.ts +6 -0
  14. package/dist/checks/repository.d.ts.map +1 -0
  15. package/dist/checks/repository.js +25 -0
  16. package/dist/checks/repository.js.map +1 -0
  17. package/dist/checks/tags.d.ts +6 -0
  18. package/dist/checks/tags.d.ts.map +1 -0
  19. package/dist/checks/tags.js +27 -0
  20. package/dist/checks/tags.js.map +1 -0
  21. package/dist/index.d.ts +88 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +86 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/refs.d.ts +16 -0
  26. package/dist/refs.d.ts.map +1 -0
  27. package/dist/refs.js +16 -0
  28. package/dist/refs.js.map +1 -0
  29. package/dist/release.d.ts +49 -0
  30. package/dist/release.d.ts.map +1 -0
  31. package/dist/release.js +174 -0
  32. package/dist/release.js.map +1 -0
  33. package/dist/steps/create-release.d.ts +16 -0
  34. package/dist/steps/create-release.d.ts.map +1 -0
  35. package/dist/steps/create-release.js +79 -0
  36. package/dist/steps/create-release.js.map +1 -0
  37. package/dist/steps/detect-repository.d.ts +6 -0
  38. package/dist/steps/detect-repository.d.ts.map +1 -0
  39. package/dist/steps/detect-repository.js +32 -0
  40. package/dist/steps/detect-repository.js.map +1 -0
  41. package/dist/steps/index.d.ts +6 -0
  42. package/dist/steps/index.d.ts.map +1 -0
  43. package/dist/steps/index.js +5 -0
  44. package/dist/steps/index.js.map +1 -0
  45. package/dist/steps/preflight-checks.d.ts +26 -0
  46. package/dist/steps/preflight-checks.d.ts.map +1 -0
  47. package/dist/steps/preflight-checks.js +80 -0
  48. package/dist/steps/preflight-checks.js.map +1 -0
  49. package/dist/steps/upload-assets.d.ts +6 -0
  50. package/dist/steps/upload-assets.d.ts.map +1 -0
  51. package/dist/steps/upload-assets.js +35 -0
  52. package/dist/steps/upload-assets.js.map +1 -0
  53. package/dist/types/check-result.d.ts +18 -0
  54. package/dist/types/check-result.d.ts.map +1 -0
  55. package/dist/types/check-result.js +2 -0
  56. package/dist/types/check-result.js.map +1 -0
  57. package/dist/types/index.d.ts +4 -0
  58. package/dist/types/index.d.ts.map +1 -0
  59. package/dist/types/index.js +2 -0
  60. package/dist/types/index.js.map +1 -0
  61. package/dist/types/release-options.d.ts +84 -0
  62. package/dist/types/release-options.d.ts.map +1 -0
  63. package/dist/types/release-options.js +2 -0
  64. package/dist/types/release-options.js.map +1 -0
  65. package/dist/types/release-result.d.ts +22 -0
  66. package/dist/types/release-result.d.ts.map +1 -0
  67. package/dist/types/release-result.js +2 -0
  68. package/dist/types/release-result.js.map +1 -0
  69. package/package.json +54 -0
@@ -0,0 +1,6 @@
1
+ import type { CheckResult } from '../types/check-result.js';
2
+ /**
3
+ * Verifies that the GitHub CLI is authenticated.
4
+ */
5
+ export declare function checkGhAuth(authenticated: boolean): CheckResult;
6
+ //# sourceMappingURL=gh-auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gh-auth.d.ts","sourceRoot":"","sources":["../../src/checks/gh-auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;GAEG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,OAAO,GAAG,WAAW,CAkB/D"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Verifies that the GitHub CLI is authenticated.
3
+ */
4
+ export function checkGhAuth(authenticated) {
5
+ if (authenticated) {
6
+ return {
7
+ name: 'GitHub Authentication',
8
+ status: 'pass',
9
+ message: 'Authenticated with GitHub',
10
+ };
11
+ }
12
+ return {
13
+ name: 'GitHub Authentication',
14
+ status: 'fail',
15
+ message: 'Not authenticated with GitHub',
16
+ remediation: `The GitHub CLI must be authenticated. Run:
17
+ gh auth login
18
+
19
+ Or set the GH_TOKEN or GITHUB_TOKEN environment variable.`,
20
+ };
21
+ }
22
+ //# sourceMappingURL=gh-auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gh-auth.js","sourceRoot":"","sources":["../../src/checks/gh-auth.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,aAAsB;IAChD,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO;YACL,IAAI,EAAE,uBAAuB;YAC7B,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,2BAA2B;SACrC,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,uBAAuB;QAC7B,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,+BAA+B;QACxC,WAAW,EAAE;;;0DAGyC;KACvD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { CheckResult } from '../types/check-result.js';
2
+ /**
3
+ * Verifies that the GitHub CLI (gh) is installed and available.
4
+ */
5
+ export declare function checkGhCli(installed: boolean): CheckResult;
6
+ //# sourceMappingURL=gh-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gh-cli.d.ts","sourceRoot":"","sources":["../../src/checks/gh-cli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;GAEG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,OAAO,GAAG,WAAW,CAoB1D"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Verifies that the GitHub CLI (gh) is installed and available.
3
+ */
4
+ export function checkGhCli(installed) {
5
+ if (installed) {
6
+ return {
7
+ name: 'GitHub CLI',
8
+ status: 'pass',
9
+ message: 'GitHub CLI (gh) is installed',
10
+ };
11
+ }
12
+ return {
13
+ name: 'GitHub CLI',
14
+ status: 'fail',
15
+ message: 'GitHub CLI (gh) is not installed',
16
+ remediation: `This pack requires the GitHub CLI. Install it from:
17
+ https://cli.github.com/
18
+
19
+ On macOS: brew install gh
20
+ On Linux: See https://github.com/cli/cli/blob/trunk/docs/install_linux.md
21
+ On Windows: winget install --id GitHub.cli`,
22
+ };
23
+ }
24
+ //# sourceMappingURL=gh-cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gh-cli.js","sourceRoot":"","sources":["../../src/checks/gh-cli.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,SAAkB;IAC3C,IAAI,SAAS,EAAE,CAAC;QACd,OAAO;YACL,IAAI,EAAE,YAAY;YAClB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,8BAA8B;SACxC,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,kCAAkC;QAC3C,WAAW,EAAE;;;;;2CAK0B;KACxC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ export { checkGhCli } from './gh-cli.js';
2
+ export { checkGhAuth } from './gh-auth.js';
3
+ export { checkRepository } from './repository.js';
4
+ export { checkTags } from './tags.js';
5
+ import type { CheckResult } from '../types/check-result.js';
6
+ /**
7
+ * Formats check results for display.
8
+ */
9
+ export declare function formatCheckResults(results: CheckResult[]): string;
10
+ /**
11
+ * Checks if any result is a failure.
12
+ */
13
+ export declare function hasFailures(results: CheckResult[]): boolean;
14
+ /**
15
+ * Checks if any result is a warning.
16
+ */
17
+ export declare function hasWarnings(results: CheckResult[]): boolean;
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/checks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CAgBjE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAE3D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAE3D"}
@@ -0,0 +1,33 @@
1
+ export { checkGhCli } from './gh-cli.js';
2
+ export { checkGhAuth } from './gh-auth.js';
3
+ export { checkRepository } from './repository.js';
4
+ export { checkTags } from './tags.js';
5
+ /**
6
+ * Formats check results for display.
7
+ */
8
+ export function formatCheckResults(results) {
9
+ const lines = ['Preflight Checks', ''];
10
+ for (const result of results) {
11
+ const icon = result.status === 'pass' ? '\u2713' : result.status === 'warn' ? '\u26a0' : '\u2717';
12
+ lines.push(`${icon} ${result.name}: ${result.message}`);
13
+ if (result.remediation && result.status !== 'pass') {
14
+ lines.push('');
15
+ lines.push(result.remediation);
16
+ lines.push('');
17
+ }
18
+ }
19
+ return lines.join('\n');
20
+ }
21
+ /**
22
+ * Checks if any result is a failure.
23
+ */
24
+ export function hasFailures(results) {
25
+ return results.some((r) => r.status === 'fail');
26
+ }
27
+ /**
28
+ * Checks if any result is a warning.
29
+ */
30
+ export function hasWarnings(results) {
31
+ return results.some((r) => r.status === 'warn');
32
+ }
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/checks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAItC;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAsB;IACvD,MAAM,KAAK,GAAa,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IAEjD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;QACvF,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAExD,IAAI,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YACnD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YAC/B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,OAAsB;IAChD,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,OAAsB;IAChD,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;AAClD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { CheckResult } from '../types/check-result.js';
2
+ /**
3
+ * Verifies that the repository can be determined.
4
+ */
5
+ export declare function checkRepository(repository: string | null): CheckResult;
6
+ //# sourceMappingURL=repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../src/checks/repository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;GAEG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,WAAW,CAqBtE"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Verifies that the repository can be determined.
3
+ */
4
+ export function checkRepository(repository) {
5
+ if (repository) {
6
+ return {
7
+ name: 'GitHub Repository',
8
+ status: 'pass',
9
+ message: `Repository: ${repository}`,
10
+ };
11
+ }
12
+ return {
13
+ name: 'GitHub Repository',
14
+ status: 'fail',
15
+ message: 'Could not determine GitHub repository',
16
+ remediation: `The repository could not be detected from git remotes.
17
+ Either:
18
+ 1. Ensure you have a GitHub remote configured:
19
+ git remote add origin https://github.com/owner/repo.git
20
+
21
+ 2. Or specify the repository explicitly in options:
22
+ githubRelease.release({ repository: 'owner/repo' })`,
23
+ };
24
+ }
25
+ //# sourceMappingURL=repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository.js","sourceRoot":"","sources":["../../src/checks/repository.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,UAAyB;IACvD,IAAI,UAAU,EAAE,CAAC;QACf,OAAO;YACL,IAAI,EAAE,mBAAmB;YACzB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,eAAe,UAAU,EAAE;SACrC,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,mBAAmB;QACzB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,uCAAuC;QAChD,WAAW,EAAE;;;;;;yDAMwC;KACtD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { CheckResult } from '../types/check-result.js';
2
+ /**
3
+ * Verifies that tags exist for the releases to be created.
4
+ */
5
+ export declare function checkTags(tagsExist: boolean, tagNames: string[]): CheckResult;
6
+ //# sourceMappingURL=tags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../src/checks/tags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;GAEG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,WAAW,CAwB7E"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Verifies that tags exist for the releases to be created.
3
+ */
4
+ export function checkTags(tagsExist, tagNames) {
5
+ if (tagsExist) {
6
+ const tagList = tagNames.length <= 3
7
+ ? tagNames.join(', ')
8
+ : `${tagNames.slice(0, 3).join(', ')} and ${tagNames.length - 3} more`;
9
+ return {
10
+ name: 'Git Tags',
11
+ status: 'pass',
12
+ message: `Tags found: ${tagList}`,
13
+ };
14
+ }
15
+ return {
16
+ name: 'Git Tags',
17
+ status: 'fail',
18
+ message: 'No release tags found',
19
+ remediation: `No git tags were found for the releases.
20
+ Ensure tags have been created and pushed:
21
+ git tag <tag-name>
22
+ git push origin --tags
23
+
24
+ Or use pack-version to create version tags automatically.`,
25
+ };
26
+ }
27
+ //# sourceMappingURL=tags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.js","sourceRoot":"","sources":["../../src/checks/tags.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,SAAkB,EAAE,QAAkB;IAC9D,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,OAAO,GACX,QAAQ,CAAC,MAAM,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YACrB,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,QAAQ,CAAC,MAAM,GAAG,CAAC,OAAO,CAAC;QAC3E,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,eAAe,OAAO,EAAE;SAClC,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,uBAAuB;QAChC,WAAW,EAAE;;;;;0DAKyC;KACvD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @kitsi/pack-github-release
3
+ *
4
+ * Kitsi pack for publishing GitHub releases with auto-generated release notes.
5
+ * Supports monorepo workflows with per-package releases and integrates with
6
+ * pack-version for seamless release automation.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * import { githubRelease } from '@kitsi/pack-github-release';
11
+ *
12
+ * // Simple usage with explicit packages
13
+ * export const ci = registry(
14
+ * githubRelease.release({
15
+ * packages: [
16
+ * { name: '@kitsi/cli', tagName: '@kitsi/cli@1.0.0', version: '1.0.0' },
17
+ * ],
18
+ * }),
19
+ * );
20
+ *
21
+ * // Integration with pack-version
22
+ * import { version } from '@kitsi/pack-version';
23
+ *
24
+ * const { push: versionPush } = version.tasks({ packages: [...] });
25
+ * const { create: createRelease } = githubRelease.tasks({
26
+ * versionTask: versionPush,
27
+ * });
28
+ *
29
+ * export const ci = registry(
30
+ * plan('release').tasks([
31
+ * versionPush,
32
+ * createRelease,
33
+ * ]),
34
+ * );
35
+ * ```
36
+ */
37
+ import { release, tasks } from './release.js';
38
+ import * as steps from './steps/index.js';
39
+ export type { CheckResult, CheckStatus } from './types/check-result.js';
40
+ export type { PackageReleaseConfig, ReleaseOptions } from './types/release-options.js';
41
+ export type { ReleaseResult } from './types/release-result.js';
42
+ export { refs } from './refs.js';
43
+ export { release, tasks } from './release.js';
44
+ export * as steps from './steps/index.js';
45
+ export * as checks from './checks/index.js';
46
+ /**
47
+ * GitHub Release pack for publishing releases with auto-generated notes.
48
+ */
49
+ export declare const githubRelease: {
50
+ /**
51
+ * Creates a release plan that runs preflight checks, creates GitHub releases,
52
+ * and uploads assets.
53
+ */
54
+ readonly release: typeof release;
55
+ /**
56
+ * Creates individual release tasks that can be composed into other plans.
57
+ * Use this when you need to integrate release tasks with other workflows
58
+ * like version bumping or publishing.
59
+ *
60
+ * @example
61
+ * ```typescript
62
+ * const { preflight, create, upload } = githubRelease.tasks({ ... });
63
+ *
64
+ * plan('release').tasks(
65
+ * versionPush,
66
+ * preflight.needs(versionPush),
67
+ * create,
68
+ * upload,
69
+ * );
70
+ * ```
71
+ */
72
+ readonly tasks: typeof tasks;
73
+ /**
74
+ * Reusable step generators for custom workflows.
75
+ */
76
+ readonly steps: typeof steps;
77
+ /**
78
+ * Output references for accessing release results between tasks.
79
+ */
80
+ readonly refs: {
81
+ readonly Results: import("@kitsi/cli").ValueRef<import("./index.js").ReleaseResult[]>;
82
+ readonly HasReleases: import("@kitsi/cli").ValueRef<boolean>;
83
+ readonly ReleaseUrls: import("@kitsi/cli").ValueRef<Record<string, string>>;
84
+ readonly Repository: import("@kitsi/cli").ValueRef<string>;
85
+ };
86
+ };
87
+ export default githubRelease;
88
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAG1C,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACxE,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACvF,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG/D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAG1C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,aAAa;IACxB;;;OAGG;;IAGH;;;;;;;;;;;;;;;;OAgBG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;CAEK,CAAC;AAGX,eAAe,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,86 @@
1
+ /**
2
+ * @kitsi/pack-github-release
3
+ *
4
+ * Kitsi pack for publishing GitHub releases with auto-generated release notes.
5
+ * Supports monorepo workflows with per-package releases and integrates with
6
+ * pack-version for seamless release automation.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * import { githubRelease } from '@kitsi/pack-github-release';
11
+ *
12
+ * // Simple usage with explicit packages
13
+ * export const ci = registry(
14
+ * githubRelease.release({
15
+ * packages: [
16
+ * { name: '@kitsi/cli', tagName: '@kitsi/cli@1.0.0', version: '1.0.0' },
17
+ * ],
18
+ * }),
19
+ * );
20
+ *
21
+ * // Integration with pack-version
22
+ * import { version } from '@kitsi/pack-version';
23
+ *
24
+ * const { push: versionPush } = version.tasks({ packages: [...] });
25
+ * const { create: createRelease } = githubRelease.tasks({
26
+ * versionTask: versionPush,
27
+ * });
28
+ *
29
+ * export const ci = registry(
30
+ * plan('release').tasks([
31
+ * versionPush,
32
+ * createRelease,
33
+ * ]),
34
+ * );
35
+ * ```
36
+ */
37
+ import { refs } from './refs.js';
38
+ import { release, tasks } from './release.js';
39
+ import * as steps from './steps/index.js';
40
+ // Re-export refs
41
+ export { refs } from './refs.js';
42
+ // Re-export release and tasks for direct import
43
+ export { release, tasks } from './release.js';
44
+ // Re-export steps for custom workflows
45
+ export * as steps from './steps/index.js';
46
+ // Re-export checks for custom preflight
47
+ export * as checks from './checks/index.js';
48
+ /**
49
+ * GitHub Release pack for publishing releases with auto-generated notes.
50
+ */
51
+ export const githubRelease = {
52
+ /**
53
+ * Creates a release plan that runs preflight checks, creates GitHub releases,
54
+ * and uploads assets.
55
+ */
56
+ release,
57
+ /**
58
+ * Creates individual release tasks that can be composed into other plans.
59
+ * Use this when you need to integrate release tasks with other workflows
60
+ * like version bumping or publishing.
61
+ *
62
+ * @example
63
+ * ```typescript
64
+ * const { preflight, create, upload } = githubRelease.tasks({ ... });
65
+ *
66
+ * plan('release').tasks(
67
+ * versionPush,
68
+ * preflight.needs(versionPush),
69
+ * create,
70
+ * upload,
71
+ * );
72
+ * ```
73
+ */
74
+ tasks,
75
+ /**
76
+ * Reusable step generators for custom workflows.
77
+ */
78
+ steps,
79
+ /**
80
+ * Output references for accessing release results between tasks.
81
+ */
82
+ refs,
83
+ };
84
+ // Default export for convenience
85
+ export default githubRelease;
86
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAO1C,iBAAiB;AACjB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,gDAAgD;AAChD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE9C,uCAAuC;AACvC,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAE1C,wCAAwC;AACxC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAE5C;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B;;;OAGG;IACH,OAAO;IAEP;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK;IAEL;;OAEG;IACH,KAAK;IAEL;;OAEG;IACH,IAAI;CACI,CAAC;AAEX,iCAAiC;AACjC,eAAe,aAAa,CAAC"}
package/dist/refs.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import type { ReleaseResult } from './types/release-result.js';
2
+ /**
3
+ * Output references for the GitHub release pack.
4
+ * Use these with `emit()` and `use()` to pass data between tasks.
5
+ */
6
+ export declare const refs: {
7
+ /** Detailed results for each created release */
8
+ readonly Results: import("@kitsi/cli").ValueRef<ReleaseResult[]>;
9
+ /** Whether any releases were created */
10
+ readonly HasReleases: import("@kitsi/cli").ValueRef<boolean>;
11
+ /** Map of package name to release URL */
12
+ readonly ReleaseUrls: import("@kitsi/cli").ValueRef<Record<string, string>>;
13
+ /** Repository in 'owner/repo' format */
14
+ readonly Repository: import("@kitsi/cli").ValueRef<string>;
15
+ };
16
+ //# sourceMappingURL=refs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../src/refs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,IAAI;IACf,gDAAgD;;IAGhD,wCAAwC;;IAGxC,yCAAyC;;IAGzC,wCAAwC;;CAEhC,CAAC"}
package/dist/refs.js ADDED
@@ -0,0 +1,16 @@
1
+ import { out } from '@kitsi/cli';
2
+ /**
3
+ * Output references for the GitHub release pack.
4
+ * Use these with `emit()` and `use()` to pass data between tasks.
5
+ */
6
+ export const refs = {
7
+ /** Detailed results for each created release */
8
+ Results: out.json('github-release:results'),
9
+ /** Whether any releases were created */
10
+ HasReleases: out.boolean('github-release:has-releases'),
11
+ /** Map of package name to release URL */
12
+ ReleaseUrls: out.json('github-release:urls'),
13
+ /** Repository in 'owner/repo' format */
14
+ Repository: out.string('github-release:repository'),
15
+ };
16
+ //# sourceMappingURL=refs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refs.js","sourceRoot":"","sources":["../src/refs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGjC;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,gDAAgD;IAChD,OAAO,EAAE,GAAG,CAAC,IAAI,CAAkB,wBAAwB,CAAC;IAE5D,wCAAwC;IACxC,WAAW,EAAE,GAAG,CAAC,OAAO,CAAC,6BAA6B,CAAC;IAEvD,yCAAyC;IACzC,WAAW,EAAE,GAAG,CAAC,IAAI,CAAyB,qBAAqB,CAAC;IAEpE,wCAAwC;IACxC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,2BAA2B,CAAC;CAC3C,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { ReleaseOptions } from './types/release-options.js';
2
+ /**
3
+ * Creates a release plan for publishing GitHub releases.
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * import { githubRelease } from '@kitsi/pack-github-release';
8
+ *
9
+ * // Simple usage with explicit packages
10
+ * export const ci = registry(
11
+ * githubRelease.release({
12
+ * packages: [
13
+ * { name: '@kitsi/cli', tagName: '@kitsi/cli@1.0.0', version: '1.0.0' },
14
+ * ],
15
+ * }),
16
+ * );
17
+ *
18
+ * // Integration with pack-version
19
+ * const { push: versionPush } = version.tasks({ packages: [...] });
20
+ * export const ci = registry(
21
+ * githubRelease.release({
22
+ * versionTask: versionPush,
23
+ * }),
24
+ * );
25
+ * ```
26
+ */
27
+ export declare function release(opts?: ReleaseOptions): import("@kitsi/cli").PlanBuilder;
28
+ /**
29
+ * Creates individual GitHub release tasks that can be composed into other plans.
30
+ * Use this when you need to integrate release tasks with other workflows.
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * const { preflight, create, upload } = githubRelease.tasks({ ... });
35
+ *
36
+ * plan('release').tasks(
37
+ * versionPush,
38
+ * preflight.needs(versionPush),
39
+ * create,
40
+ * upload,
41
+ * );
42
+ * ```
43
+ */
44
+ export declare function tasks(opts?: ReleaseOptions): {
45
+ preflight: import("@kitsi/cli").TaskBuilder;
46
+ create: import("@kitsi/cli").TaskBuilder;
47
+ upload: import("@kitsi/cli").TaskBuilder;
48
+ };
49
+ //# sourceMappingURL=release.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../src/release.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAwB,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAmBvF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,OAAO,CAAC,IAAI,GAAE,cAAmB,oCAkBhD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,IAAI,GAAE,cAAmB;;;;EA4D9C"}