@releasekit/publish 0.3.0-next.4 → 0.3.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/README.md +2 -0
- package/dist/{chunk-GOBII36Q.js → chunk-GIMIZS5B.js} +645 -129
- package/dist/cli.d.ts +5 -0
- package/dist/cli.js +70 -52
- package/dist/index.d.ts +9 -173
- package/dist/index.js +1 -1
- package/package.json +14 -13
- package/dist/cli.cjs +0 -1369
- package/dist/cli.d.cts +0 -1
- package/dist/index.cjs +0 -1380
- package/dist/index.d.cts +0 -173
package/dist/index.d.cts
DELETED
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { LoadOptions, CargoManifest } from '@releasekit/config';
|
|
2
|
-
export { CargoManifest, parseCargoToml } from '@releasekit/config';
|
|
3
|
-
import { VersionOutput, ReleaseKitError } from '@releasekit/core';
|
|
4
|
-
|
|
5
|
-
type PackageManager = 'pnpm' | 'npm' | 'yarn';
|
|
6
|
-
declare function detectPackageManager(cwd: string): PackageManager;
|
|
7
|
-
|
|
8
|
-
interface NpmConfig {
|
|
9
|
-
enabled: boolean;
|
|
10
|
-
auth: 'auto' | 'oidc' | 'token';
|
|
11
|
-
provenance: boolean;
|
|
12
|
-
access: 'public' | 'restricted';
|
|
13
|
-
registry: string;
|
|
14
|
-
copyFiles: string[];
|
|
15
|
-
tag: string;
|
|
16
|
-
}
|
|
17
|
-
interface CargoConfig {
|
|
18
|
-
enabled: boolean;
|
|
19
|
-
noVerify: boolean;
|
|
20
|
-
publishOrder: string[];
|
|
21
|
-
clean: boolean;
|
|
22
|
-
}
|
|
23
|
-
interface GitConfig {
|
|
24
|
-
push: boolean;
|
|
25
|
-
pushMethod: 'auto' | 'ssh' | 'https';
|
|
26
|
-
remote: string;
|
|
27
|
-
branch: string;
|
|
28
|
-
httpsTokenEnv?: string;
|
|
29
|
-
skipHooks?: boolean;
|
|
30
|
-
}
|
|
31
|
-
interface GitHubReleaseConfig {
|
|
32
|
-
enabled: boolean;
|
|
33
|
-
draft: boolean;
|
|
34
|
-
perPackage: boolean;
|
|
35
|
-
prerelease: 'auto' | boolean;
|
|
36
|
-
/** 'auto' | 'github' | 'none' | file path */
|
|
37
|
-
releaseNotes: string;
|
|
38
|
-
}
|
|
39
|
-
interface VerifyRegistryConfig {
|
|
40
|
-
enabled: boolean;
|
|
41
|
-
maxAttempts: number;
|
|
42
|
-
initialDelay: number;
|
|
43
|
-
backoffMultiplier: number;
|
|
44
|
-
}
|
|
45
|
-
interface VerifyConfig {
|
|
46
|
-
npm: VerifyRegistryConfig;
|
|
47
|
-
cargo: VerifyRegistryConfig;
|
|
48
|
-
}
|
|
49
|
-
interface PublishConfig {
|
|
50
|
-
npm: NpmConfig;
|
|
51
|
-
cargo: CargoConfig;
|
|
52
|
-
git: GitConfig;
|
|
53
|
-
githubRelease: GitHubReleaseConfig;
|
|
54
|
-
verify: VerifyConfig;
|
|
55
|
-
}
|
|
56
|
-
interface PublishCliOptions {
|
|
57
|
-
input?: string;
|
|
58
|
-
config?: string;
|
|
59
|
-
registry: 'npm' | 'cargo' | 'all';
|
|
60
|
-
npmAuth: 'auto' | 'oidc' | 'token';
|
|
61
|
-
dryRun: boolean;
|
|
62
|
-
skipGit: boolean;
|
|
63
|
-
skipGitCommit?: boolean;
|
|
64
|
-
skipPublish: boolean;
|
|
65
|
-
skipGithubRelease: boolean;
|
|
66
|
-
skipVerification: boolean;
|
|
67
|
-
json: boolean;
|
|
68
|
-
verbose: boolean;
|
|
69
|
-
/** Per-package release notes keyed by package name, from the notes pipeline. */
|
|
70
|
-
releaseNotes?: Record<string, string>;
|
|
71
|
-
/** Additional files to stage in the git commit (e.g., changelog files from the notes step). */
|
|
72
|
-
additionalFiles?: string[];
|
|
73
|
-
}
|
|
74
|
-
interface PublishResult {
|
|
75
|
-
packageName: string;
|
|
76
|
-
version: string;
|
|
77
|
-
registry: 'npm' | 'cargo';
|
|
78
|
-
success: boolean;
|
|
79
|
-
skipped: boolean;
|
|
80
|
-
reason?: string;
|
|
81
|
-
alreadyPublished?: boolean;
|
|
82
|
-
}
|
|
83
|
-
interface VerificationResult {
|
|
84
|
-
packageName: string;
|
|
85
|
-
version: string;
|
|
86
|
-
registry: 'npm' | 'cargo';
|
|
87
|
-
verified: boolean;
|
|
88
|
-
attempts: number;
|
|
89
|
-
}
|
|
90
|
-
interface GitHubReleaseResult {
|
|
91
|
-
tag: string;
|
|
92
|
-
url?: string;
|
|
93
|
-
draft: boolean;
|
|
94
|
-
prerelease: boolean;
|
|
95
|
-
success: boolean;
|
|
96
|
-
reason?: string;
|
|
97
|
-
}
|
|
98
|
-
interface GitResult {
|
|
99
|
-
committed: boolean;
|
|
100
|
-
tags: string[];
|
|
101
|
-
pushed: boolean;
|
|
102
|
-
}
|
|
103
|
-
interface PublishOutput {
|
|
104
|
-
dryRun: boolean;
|
|
105
|
-
git: GitResult;
|
|
106
|
-
npm: PublishResult[];
|
|
107
|
-
cargo: PublishResult[];
|
|
108
|
-
verification: VerificationResult[];
|
|
109
|
-
githubReleases: GitHubReleaseResult[];
|
|
110
|
-
}
|
|
111
|
-
interface PipelineContext {
|
|
112
|
-
input: VersionOutput;
|
|
113
|
-
config: PublishConfig;
|
|
114
|
-
cliOptions: PublishCliOptions;
|
|
115
|
-
packageManager: PackageManager;
|
|
116
|
-
output: PublishOutput;
|
|
117
|
-
cwd: string;
|
|
118
|
-
/** Per-package release notes keyed by package name, passed from the notes pipeline. */
|
|
119
|
-
releaseNotes?: Record<string, string>;
|
|
120
|
-
/** Additional files to stage in the git commit (e.g., changelog files from the notes step). */
|
|
121
|
-
additionalFiles?: string[];
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
declare function loadConfig(options?: LoadOptions): PublishConfig;
|
|
125
|
-
declare function getDefaultConfig(): PublishConfig;
|
|
126
|
-
|
|
127
|
-
declare class BasePublishError extends ReleaseKitError {
|
|
128
|
-
readonly code: string;
|
|
129
|
-
readonly suggestions: string[];
|
|
130
|
-
constructor(message: string, code: string, suggestions?: string[]);
|
|
131
|
-
static isPublishError(error: unknown): error is BasePublishError;
|
|
132
|
-
}
|
|
133
|
-
declare class PublishError extends BasePublishError {
|
|
134
|
-
}
|
|
135
|
-
declare class PipelineError extends BasePublishError {
|
|
136
|
-
readonly partialOutput: PublishOutput;
|
|
137
|
-
readonly failedStage: string;
|
|
138
|
-
readonly cause?: Error;
|
|
139
|
-
constructor(message: string, failedStage: string, partialOutput: PublishOutput, cause?: Error);
|
|
140
|
-
}
|
|
141
|
-
declare enum PublishErrorCode {
|
|
142
|
-
INPUT_PARSE_ERROR = "INPUT_PARSE_ERROR",
|
|
143
|
-
INPUT_VALIDATION_ERROR = "INPUT_VALIDATION_ERROR",
|
|
144
|
-
CONFIG_ERROR = "CONFIG_ERROR",
|
|
145
|
-
GIT_COMMIT_ERROR = "GIT_COMMIT_ERROR",
|
|
146
|
-
GIT_TAG_ERROR = "GIT_TAG_ERROR",
|
|
147
|
-
GIT_PUSH_ERROR = "GIT_PUSH_ERROR",
|
|
148
|
-
NPM_PUBLISH_ERROR = "NPM_PUBLISH_ERROR",
|
|
149
|
-
NPM_AUTH_ERROR = "NPM_AUTH_ERROR",
|
|
150
|
-
CARGO_PUBLISH_ERROR = "CARGO_PUBLISH_ERROR",
|
|
151
|
-
CARGO_AUTH_ERROR = "CARGO_AUTH_ERROR",
|
|
152
|
-
VERIFICATION_FAILED = "VERIFICATION_FAILED",
|
|
153
|
-
GITHUB_RELEASE_ERROR = "GITHUB_RELEASE_ERROR",
|
|
154
|
-
FILE_COPY_ERROR = "FILE_COPY_ERROR",
|
|
155
|
-
CARGO_TOML_ERROR = "CARGO_TOML_ERROR",
|
|
156
|
-
PIPELINE_STAGE_ERROR = "PIPELINE_STAGE_ERROR"
|
|
157
|
-
}
|
|
158
|
-
declare function createPublishError(code: PublishErrorCode, details?: string): PublishError;
|
|
159
|
-
|
|
160
|
-
declare function runPipeline(input: VersionOutput, config: PublishConfig, options: PublishCliOptions): Promise<PublishOutput>;
|
|
161
|
-
|
|
162
|
-
declare function parseInput(inputPath?: string): Promise<VersionOutput>;
|
|
163
|
-
|
|
164
|
-
declare function detectNpmAuth(): 'oidc' | 'token' | null;
|
|
165
|
-
declare function hasCargoAuth(): boolean;
|
|
166
|
-
|
|
167
|
-
declare function updateCargoVersion(cargoPath: string, newVersion: string): void;
|
|
168
|
-
declare function extractPathDeps(manifest: CargoManifest): string[];
|
|
169
|
-
|
|
170
|
-
declare function isPrerelease(version: string): boolean;
|
|
171
|
-
declare function getDistTag(version: string, defaultTag?: string): string;
|
|
172
|
-
|
|
173
|
-
export { BasePublishError, type CargoConfig, type GitConfig, type GitHubReleaseConfig, type GitHubReleaseResult, type GitResult, type NpmConfig, type PackageManager, type PipelineContext, PipelineError, type PublishCliOptions, type PublishConfig, PublishError, PublishErrorCode, type PublishOutput, type PublishResult, type VerificationResult, type VerifyConfig, createPublishError, detectNpmAuth, detectPackageManager, extractPathDeps, getDefaultConfig, getDistTag, hasCargoAuth, isPrerelease, loadConfig, parseInput, runPipeline, updateCargoVersion };
|