@releasekit/publish 0.2.0 → 0.2.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-H7AKSLZP.js → chunk-PJUNQA6B.js} +634 -137
- package/dist/cli.d.ts +9 -0
- package/dist/cli.js +5 -3
- package/dist/index.d.ts +9 -165
- package/dist/index.js +1 -1
- package/package.json +7 -12
- package/dist/cli.cjs +0 -1311
- package/dist/cli.d.cts +0 -1
- package/dist/index.cjs +0 -1322
- package/dist/index.d.cts +0 -165
package/dist/index.d.cts
DELETED
|
@@ -1,165 +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
|
-
generateNotes: boolean;
|
|
35
|
-
perPackage: boolean;
|
|
36
|
-
prerelease: 'auto' | boolean;
|
|
37
|
-
notesFile?: 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
|
-
}
|
|
70
|
-
interface PublishResult {
|
|
71
|
-
packageName: string;
|
|
72
|
-
version: string;
|
|
73
|
-
registry: 'npm' | 'cargo';
|
|
74
|
-
success: boolean;
|
|
75
|
-
skipped: boolean;
|
|
76
|
-
reason?: string;
|
|
77
|
-
alreadyPublished?: boolean;
|
|
78
|
-
}
|
|
79
|
-
interface VerificationResult {
|
|
80
|
-
packageName: string;
|
|
81
|
-
version: string;
|
|
82
|
-
registry: 'npm' | 'cargo';
|
|
83
|
-
verified: boolean;
|
|
84
|
-
attempts: number;
|
|
85
|
-
}
|
|
86
|
-
interface GitHubReleaseResult {
|
|
87
|
-
tag: string;
|
|
88
|
-
url?: string;
|
|
89
|
-
draft: boolean;
|
|
90
|
-
prerelease: boolean;
|
|
91
|
-
success: boolean;
|
|
92
|
-
reason?: string;
|
|
93
|
-
}
|
|
94
|
-
interface GitResult {
|
|
95
|
-
committed: boolean;
|
|
96
|
-
tags: string[];
|
|
97
|
-
pushed: boolean;
|
|
98
|
-
}
|
|
99
|
-
interface PublishOutput {
|
|
100
|
-
dryRun: boolean;
|
|
101
|
-
git: GitResult;
|
|
102
|
-
npm: PublishResult[];
|
|
103
|
-
cargo: PublishResult[];
|
|
104
|
-
verification: VerificationResult[];
|
|
105
|
-
githubReleases: GitHubReleaseResult[];
|
|
106
|
-
}
|
|
107
|
-
interface PipelineContext {
|
|
108
|
-
input: VersionOutput;
|
|
109
|
-
config: PublishConfig;
|
|
110
|
-
cliOptions: PublishCliOptions;
|
|
111
|
-
packageManager: PackageManager;
|
|
112
|
-
output: PublishOutput;
|
|
113
|
-
cwd: string;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
declare function loadConfig(options?: LoadOptions): PublishConfig;
|
|
117
|
-
declare function getDefaultConfig(): PublishConfig;
|
|
118
|
-
|
|
119
|
-
declare class BasePublishError extends ReleaseKitError {
|
|
120
|
-
readonly code: string;
|
|
121
|
-
readonly suggestions: string[];
|
|
122
|
-
constructor(message: string, code: string, suggestions?: string[]);
|
|
123
|
-
static isPublishError(error: unknown): error is BasePublishError;
|
|
124
|
-
}
|
|
125
|
-
declare class PublishError extends BasePublishError {
|
|
126
|
-
}
|
|
127
|
-
declare class PipelineError extends BasePublishError {
|
|
128
|
-
readonly partialOutput: PublishOutput;
|
|
129
|
-
readonly failedStage: string;
|
|
130
|
-
readonly cause?: Error;
|
|
131
|
-
constructor(message: string, failedStage: string, partialOutput: PublishOutput, cause?: Error);
|
|
132
|
-
}
|
|
133
|
-
declare enum PublishErrorCode {
|
|
134
|
-
INPUT_PARSE_ERROR = "INPUT_PARSE_ERROR",
|
|
135
|
-
INPUT_VALIDATION_ERROR = "INPUT_VALIDATION_ERROR",
|
|
136
|
-
CONFIG_ERROR = "CONFIG_ERROR",
|
|
137
|
-
GIT_COMMIT_ERROR = "GIT_COMMIT_ERROR",
|
|
138
|
-
GIT_TAG_ERROR = "GIT_TAG_ERROR",
|
|
139
|
-
GIT_PUSH_ERROR = "GIT_PUSH_ERROR",
|
|
140
|
-
NPM_PUBLISH_ERROR = "NPM_PUBLISH_ERROR",
|
|
141
|
-
NPM_AUTH_ERROR = "NPM_AUTH_ERROR",
|
|
142
|
-
CARGO_PUBLISH_ERROR = "CARGO_PUBLISH_ERROR",
|
|
143
|
-
CARGO_AUTH_ERROR = "CARGO_AUTH_ERROR",
|
|
144
|
-
VERIFICATION_FAILED = "VERIFICATION_FAILED",
|
|
145
|
-
GITHUB_RELEASE_ERROR = "GITHUB_RELEASE_ERROR",
|
|
146
|
-
FILE_COPY_ERROR = "FILE_COPY_ERROR",
|
|
147
|
-
CARGO_TOML_ERROR = "CARGO_TOML_ERROR",
|
|
148
|
-
PIPELINE_STAGE_ERROR = "PIPELINE_STAGE_ERROR"
|
|
149
|
-
}
|
|
150
|
-
declare function createPublishError(code: PublishErrorCode, details?: string): PublishError;
|
|
151
|
-
|
|
152
|
-
declare function runPipeline(input: VersionOutput, config: PublishConfig, options: PublishCliOptions): Promise<PublishOutput>;
|
|
153
|
-
|
|
154
|
-
declare function parseInput(inputPath?: string): Promise<VersionOutput>;
|
|
155
|
-
|
|
156
|
-
declare function detectNpmAuth(): 'oidc' | 'token' | null;
|
|
157
|
-
declare function hasCargoAuth(): boolean;
|
|
158
|
-
|
|
159
|
-
declare function updateCargoVersion(cargoPath: string, newVersion: string): void;
|
|
160
|
-
declare function extractPathDeps(manifest: CargoManifest): string[];
|
|
161
|
-
|
|
162
|
-
declare function isPrerelease(version: string): boolean;
|
|
163
|
-
declare function getDistTag(version: string, defaultTag?: string): string;
|
|
164
|
-
|
|
165
|
-
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 };
|