relizy 0.3.0 → 1.0.0-beta.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 +111 -1093
- package/dist/cli.mjs +18 -3
- package/dist/index.d.mts +394 -23
- package/dist/index.d.ts +394 -23
- package/dist/index.mjs +2 -2
- package/dist/shared/{relizy.B4guss__.mjs → relizy.Bpj1yhpn.mjs} +2136 -1470
- package/package.json +20 -3
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,13 @@ import { LogLevel } from '@maz-ui/node';
|
|
|
2
2
|
import { GitCommit, ChangelogConfig as ChangelogConfig$1, SemverBumpType } from 'changelogen';
|
|
3
3
|
import { ReleaseType } from 'semver';
|
|
4
4
|
import { DeepPartial } from '@maz-ui/utils';
|
|
5
|
+
import * as _slack_web_api from '@slack/web-api';
|
|
6
|
+
import * as twitter_api_v2 from 'twitter-api-v2';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Generate changelog for a specific package
|
|
8
10
|
*/
|
|
9
|
-
declare function generateChangelog({ pkg, config, dryRun, newVersion, }: {
|
|
11
|
+
declare function generateChangelog({ pkg, config, dryRun, newVersion, minify, }: {
|
|
10
12
|
pkg: {
|
|
11
13
|
fromTag?: string;
|
|
12
14
|
name: string;
|
|
@@ -16,6 +18,7 @@ declare function generateChangelog({ pkg, config, dryRun, newVersion, }: {
|
|
|
16
18
|
config: ResolvedRelizyConfig;
|
|
17
19
|
dryRun: boolean;
|
|
18
20
|
newVersion: string;
|
|
21
|
+
minify?: boolean;
|
|
19
22
|
}): Promise<string>;
|
|
20
23
|
/**
|
|
21
24
|
* Write changelog to file
|
|
@@ -35,27 +38,46 @@ declare function getDefaultConfig(): {
|
|
|
35
38
|
tagMessage: string;
|
|
36
39
|
tagBody: string;
|
|
37
40
|
emptyChangelogContent: string;
|
|
41
|
+
twitterMessage: string;
|
|
42
|
+
slackMessage: undefined;
|
|
38
43
|
};
|
|
39
44
|
excludeAuthors: never[];
|
|
40
|
-
noAuthors:
|
|
45
|
+
noAuthors: boolean;
|
|
41
46
|
bump: Required<Omit<BumpConfig, "preid">>;
|
|
42
47
|
changelog: Required<ChangelogConfig>;
|
|
43
48
|
publish: {
|
|
44
|
-
private:
|
|
49
|
+
private: boolean;
|
|
45
50
|
args: never[];
|
|
46
51
|
token: string | undefined;
|
|
47
52
|
registry: string;
|
|
48
|
-
safetyCheck:
|
|
53
|
+
safetyCheck: boolean;
|
|
49
54
|
};
|
|
50
55
|
tokens: {
|
|
51
56
|
registry: string | undefined;
|
|
52
57
|
gitlab: string | undefined;
|
|
53
58
|
github: string | undefined;
|
|
59
|
+
twitter: {
|
|
60
|
+
apiKey: string | undefined;
|
|
61
|
+
apiKeySecret: string | undefined;
|
|
62
|
+
accessToken: string | undefined;
|
|
63
|
+
accessTokenSecret: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
slack: string | undefined;
|
|
54
66
|
};
|
|
55
67
|
scopeMap: {};
|
|
56
68
|
release: Required<ReleaseConfig>;
|
|
69
|
+
social: {
|
|
70
|
+
twitter: {
|
|
71
|
+
enabled: false;
|
|
72
|
+
onlyStable: true;
|
|
73
|
+
};
|
|
74
|
+
slack: {
|
|
75
|
+
enabled: boolean;
|
|
76
|
+
onlyStable: boolean;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
57
79
|
logLevel: LogLevel;
|
|
58
|
-
safetyCheck:
|
|
80
|
+
safetyCheck: boolean;
|
|
59
81
|
};
|
|
60
82
|
declare function loadRelizyConfig(options?: {
|
|
61
83
|
baseConfig?: ResolvedRelizyConfig;
|
|
@@ -211,8 +233,7 @@ declare function readPackages({ cwd, patterns, ignorePackageNames, }: {
|
|
|
211
233
|
patterns?: string[];
|
|
212
234
|
ignorePackageNames: NonNullable<ResolvedRelizyConfig['monorepo']>['ignorePackageNames'];
|
|
213
235
|
}): ReadPackage[];
|
|
214
|
-
declare function getPackages({
|
|
215
|
-
patterns?: string[];
|
|
236
|
+
declare function getPackages({ config, suffix, force, }: {
|
|
216
237
|
config: ResolvedRelizyConfig;
|
|
217
238
|
suffix: string | undefined;
|
|
218
239
|
force: boolean;
|
|
@@ -226,6 +247,43 @@ declare function getPackageCommits({ pkg, from, to, config, changelog, }: {
|
|
|
226
247
|
}): Promise<GitCommit[]>;
|
|
227
248
|
declare function hasLernaJson(rootDir: string): boolean;
|
|
228
249
|
|
|
250
|
+
/**
|
|
251
|
+
* Get Slack token from config
|
|
252
|
+
* Priority: social.slack.credentials > config.tokens.slack > environment variables (handled in config.ts)
|
|
253
|
+
*/
|
|
254
|
+
declare function getSlackToken(options: {
|
|
255
|
+
socialCredentials?: SlackCredentials;
|
|
256
|
+
tokenCredential?: string;
|
|
257
|
+
}): string | null;
|
|
258
|
+
/**
|
|
259
|
+
* Format changelog for Slack (convert markdown to Slack's mrkdwn format)
|
|
260
|
+
*/
|
|
261
|
+
declare function formatChangelogForSlack(changelog: string, maxLength?: number): string;
|
|
262
|
+
/**
|
|
263
|
+
* Format the Slack message using blocks
|
|
264
|
+
*/
|
|
265
|
+
declare function formatSlackMessage({ projectName, version, changelog, releaseUrl, changelogUrl, template }: {
|
|
266
|
+
template?: string;
|
|
267
|
+
projectName: string;
|
|
268
|
+
version: string;
|
|
269
|
+
changelog: string;
|
|
270
|
+
releaseUrl?: string;
|
|
271
|
+
changelogUrl?: string;
|
|
272
|
+
}): any[];
|
|
273
|
+
/**
|
|
274
|
+
* Post a release announcement to Slack
|
|
275
|
+
*/
|
|
276
|
+
declare function postReleaseToSlack({ version, projectName, changelog, releaseUrl, changelogUrl, channel, token, template, dryRun, }: SlackOptions): Promise<_slack_web_api.ChatPostMessageResponse | undefined>;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Extract a summary from changelog content
|
|
280
|
+
*/
|
|
281
|
+
declare function extractChangelogSummary(changelog: string, maxLength?: number): string;
|
|
282
|
+
/**
|
|
283
|
+
* Get the release URL from repo config and release tag
|
|
284
|
+
*/
|
|
285
|
+
declare function getReleaseUrl(config: ResolvedRelizyConfig, tag: string): string | undefined;
|
|
286
|
+
|
|
229
287
|
declare function getIndependentTag({ version, name }: {
|
|
230
288
|
version: string;
|
|
231
289
|
name: string;
|
|
@@ -251,7 +309,7 @@ declare function getLastPackageTag({ packageName, onlyStable, currentVersion, lo
|
|
|
251
309
|
logLevel?: LogLevel;
|
|
252
310
|
cwd?: string;
|
|
253
311
|
}): Promise<string | null>;
|
|
254
|
-
type Step = 'bump' | 'changelog' | 'publish' | 'provider-release';
|
|
312
|
+
type Step = 'bump' | 'changelog' | 'publish' | 'provider-release' | 'social';
|
|
255
313
|
interface ResolvedTags {
|
|
256
314
|
from: string;
|
|
257
315
|
to: string;
|
|
@@ -263,6 +321,26 @@ declare function resolveTags<S extends Step, NewVersion = S extends 'bump' ? und
|
|
|
263
321
|
newVersion: NewVersion;
|
|
264
322
|
}): Promise<ResolvedTags>;
|
|
265
323
|
|
|
324
|
+
interface ResolvedTwitterCredentials {
|
|
325
|
+
apiKey: string;
|
|
326
|
+
apiKeySecret: string;
|
|
327
|
+
accessToken: string;
|
|
328
|
+
accessTokenSecret: string;
|
|
329
|
+
}
|
|
330
|
+
declare function getTwitterCredentials({ socialCredentials, tokenCredentials }: {
|
|
331
|
+
socialCredentials?: TwitterCredentials;
|
|
332
|
+
tokenCredentials?: TwitterCredentials;
|
|
333
|
+
}): ResolvedTwitterCredentials | null;
|
|
334
|
+
declare function formatTweetMessage({ template, projectName, version, changelog, releaseUrl, changelogUrl }: {
|
|
335
|
+
template: string;
|
|
336
|
+
projectName: string;
|
|
337
|
+
version: string;
|
|
338
|
+
changelog: string;
|
|
339
|
+
releaseUrl?: string;
|
|
340
|
+
changelogUrl?: string;
|
|
341
|
+
}): string;
|
|
342
|
+
declare function postReleaseToTwitter({ version, projectName, changelog, releaseUrl, changelogUrl, credentials, template, dryRun, }: TwitterOptions): Promise<twitter_api_v2.TweetV2PostTweetResult | undefined>;
|
|
343
|
+
|
|
266
344
|
/**
|
|
267
345
|
* Execute a hook
|
|
268
346
|
*/
|
|
@@ -397,7 +475,7 @@ declare function extractVersionFromTag(tag: string, packageName?: string): strin
|
|
|
397
475
|
declare function isTagVersionCompatibleWithCurrent(tagVersion: string, currentVersion: string): boolean;
|
|
398
476
|
|
|
399
477
|
type VersionMode = 'unified' | 'independent' | 'selective';
|
|
400
|
-
type GitProvider = 'github' | 'gitlab';
|
|
478
|
+
type GitProvider = 'github' | 'gitlab' | 'bitbucket';
|
|
401
479
|
type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun';
|
|
402
480
|
/**
|
|
403
481
|
* PACAKGE TYPES
|
|
@@ -505,6 +583,44 @@ interface PostedRelease {
|
|
|
505
583
|
*/
|
|
506
584
|
version: string;
|
|
507
585
|
}
|
|
586
|
+
interface SocialNetworkResult {
|
|
587
|
+
/**
|
|
588
|
+
* Social platform name (e.g., 'twitter', 'slack')
|
|
589
|
+
*/
|
|
590
|
+
platform: string;
|
|
591
|
+
/**
|
|
592
|
+
* Whether the post was successful
|
|
593
|
+
*/
|
|
594
|
+
success: boolean;
|
|
595
|
+
/**
|
|
596
|
+
* Error message if the post failed
|
|
597
|
+
*/
|
|
598
|
+
error?: string;
|
|
599
|
+
}
|
|
600
|
+
interface SocialResult {
|
|
601
|
+
/**
|
|
602
|
+
* Results for each social platform
|
|
603
|
+
*/
|
|
604
|
+
results: SocialNetworkResult[];
|
|
605
|
+
/**
|
|
606
|
+
* Whether any of the social posts had errors
|
|
607
|
+
*/
|
|
608
|
+
hasErrors: boolean;
|
|
609
|
+
}
|
|
610
|
+
interface ProviderReleaseResult {
|
|
611
|
+
/**
|
|
612
|
+
* Detected Git provider
|
|
613
|
+
*/
|
|
614
|
+
detectedProvider: GitProvider;
|
|
615
|
+
/**
|
|
616
|
+
* Posted releases
|
|
617
|
+
*/
|
|
618
|
+
postedReleases: PostedRelease[];
|
|
619
|
+
/**
|
|
620
|
+
* Error message if provider release failed
|
|
621
|
+
*/
|
|
622
|
+
error?: string;
|
|
623
|
+
}
|
|
508
624
|
interface MonorepoConfig {
|
|
509
625
|
/**
|
|
510
626
|
* Version mode for the monorepo.
|
|
@@ -684,7 +800,7 @@ interface ProviderReleaseOptions {
|
|
|
684
800
|
dryRun?: boolean;
|
|
685
801
|
/**
|
|
686
802
|
* Skip safety check
|
|
687
|
-
* @default
|
|
803
|
+
* @default true
|
|
688
804
|
*/
|
|
689
805
|
safetyCheck?: boolean;
|
|
690
806
|
/**
|
|
@@ -697,6 +813,43 @@ interface ProviderReleaseOptions {
|
|
|
697
813
|
*/
|
|
698
814
|
suffix?: string;
|
|
699
815
|
}
|
|
816
|
+
interface SocialOptions {
|
|
817
|
+
/**
|
|
818
|
+
* Start tag
|
|
819
|
+
*/
|
|
820
|
+
from?: string;
|
|
821
|
+
/**
|
|
822
|
+
* End tag
|
|
823
|
+
*/
|
|
824
|
+
to?: string;
|
|
825
|
+
/**
|
|
826
|
+
* Use custom config
|
|
827
|
+
*/
|
|
828
|
+
config?: ResolvedRelizyConfig;
|
|
829
|
+
/**
|
|
830
|
+
* Custom config file name (e.g. `relizy.standalone` for `relizy.standalone.config.ts`)
|
|
831
|
+
* @default 'relizy'
|
|
832
|
+
*/
|
|
833
|
+
configName?: string;
|
|
834
|
+
/**
|
|
835
|
+
* Bump result (contains release information)
|
|
836
|
+
*/
|
|
837
|
+
bumpResult?: BumpResultTruthy;
|
|
838
|
+
/**
|
|
839
|
+
* Set log level
|
|
840
|
+
*/
|
|
841
|
+
logLevel?: LogLevel;
|
|
842
|
+
/**
|
|
843
|
+
* Run without side effects
|
|
844
|
+
* @default false
|
|
845
|
+
*/
|
|
846
|
+
dryRun?: boolean;
|
|
847
|
+
/**
|
|
848
|
+
* Skip safety check
|
|
849
|
+
* @default true
|
|
850
|
+
*/
|
|
851
|
+
safetyCheck?: boolean;
|
|
852
|
+
}
|
|
700
853
|
type PublishConfig = ChangelogConfig$1['publish'] & {
|
|
701
854
|
/**
|
|
702
855
|
* Package manager (e.g. `pnpm`, `npm`, `yarn` or `bun`)
|
|
@@ -732,7 +885,7 @@ type PublishConfig = ChangelogConfig$1['publish'] & {
|
|
|
732
885
|
token?: string;
|
|
733
886
|
/**
|
|
734
887
|
* Skip safety check
|
|
735
|
-
* @default
|
|
888
|
+
* @default true
|
|
736
889
|
*/
|
|
737
890
|
safetyCheck?: boolean;
|
|
738
891
|
};
|
|
@@ -810,6 +963,11 @@ interface ReleaseConfig {
|
|
|
810
963
|
* @default true
|
|
811
964
|
*/
|
|
812
965
|
gitTag?: boolean;
|
|
966
|
+
/**
|
|
967
|
+
* Post release announcements to social media platforms
|
|
968
|
+
* @default false
|
|
969
|
+
*/
|
|
970
|
+
social?: boolean;
|
|
813
971
|
}
|
|
814
972
|
interface ReleaseOptions extends ReleaseConfig, BumpConfig, ChangelogConfig, PublishConfig {
|
|
815
973
|
/**
|
|
@@ -857,6 +1015,174 @@ interface ReleaseOptions extends ReleaseConfig, BumpConfig, ChangelogConfig, Pub
|
|
|
857
1015
|
*/
|
|
858
1016
|
publishToken?: string;
|
|
859
1017
|
}
|
|
1018
|
+
interface TwitterCredentials {
|
|
1019
|
+
/**
|
|
1020
|
+
* Twitter API Key (Consumer Key)
|
|
1021
|
+
*/
|
|
1022
|
+
apiKey?: string;
|
|
1023
|
+
/**
|
|
1024
|
+
* Twitter API Secret (Consumer Secret)
|
|
1025
|
+
*/
|
|
1026
|
+
apiKeySecret?: string;
|
|
1027
|
+
/**
|
|
1028
|
+
* Twitter Access Token
|
|
1029
|
+
*/
|
|
1030
|
+
accessToken?: string;
|
|
1031
|
+
/**
|
|
1032
|
+
* Twitter Access Token Secret
|
|
1033
|
+
*/
|
|
1034
|
+
accessTokenSecret?: string;
|
|
1035
|
+
}
|
|
1036
|
+
interface TwitterSocialConfig {
|
|
1037
|
+
/**
|
|
1038
|
+
* Enable Twitter posting
|
|
1039
|
+
* @default false
|
|
1040
|
+
*/
|
|
1041
|
+
enabled?: boolean;
|
|
1042
|
+
/**
|
|
1043
|
+
* Skip Twitter posting for prerelease versions (alpha, beta, rc, etc.)
|
|
1044
|
+
* Only stable versions will be posted to Twitter
|
|
1045
|
+
* @default true
|
|
1046
|
+
*/
|
|
1047
|
+
onlyStable?: boolean;
|
|
1048
|
+
/**
|
|
1049
|
+
* Custom message template
|
|
1050
|
+
* Available variables: {{projectName}}, {{version}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
|
|
1051
|
+
* @default '🚀 {{projectName}} {{version}} is out!\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}'
|
|
1052
|
+
*/
|
|
1053
|
+
template?: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* Twitter credentials (optional - falls back to environment variables)
|
|
1056
|
+
*/
|
|
1057
|
+
credentials?: TwitterCredentials;
|
|
1058
|
+
}
|
|
1059
|
+
interface SlackCredentials {
|
|
1060
|
+
/**
|
|
1061
|
+
* Slack Bot Token or User OAuth Token
|
|
1062
|
+
* Required scopes: chat:write, chat:write.public (for public channels)
|
|
1063
|
+
*/
|
|
1064
|
+
token?: string;
|
|
1065
|
+
}
|
|
1066
|
+
interface SlackSocialConfig {
|
|
1067
|
+
/**
|
|
1068
|
+
* Enable Slack posting
|
|
1069
|
+
* @default false
|
|
1070
|
+
*/
|
|
1071
|
+
enabled?: boolean;
|
|
1072
|
+
/**
|
|
1073
|
+
* Skip Slack posting for prerelease versions (alpha, beta, rc, etc.)
|
|
1074
|
+
* Only stable versions will be posted to Slack
|
|
1075
|
+
* @default true
|
|
1076
|
+
*/
|
|
1077
|
+
onlyStable?: boolean;
|
|
1078
|
+
/**
|
|
1079
|
+
* Slack channel ID or name (e.g., "#releases" or "C1234567890")
|
|
1080
|
+
*/
|
|
1081
|
+
channel: string;
|
|
1082
|
+
/**
|
|
1083
|
+
* Custom message template
|
|
1084
|
+
* Available variables: {{projectName}}, {{version}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
|
|
1085
|
+
*/
|
|
1086
|
+
template?: string;
|
|
1087
|
+
/**
|
|
1088
|
+
* Slack credentials (optional - falls back to environment variables)
|
|
1089
|
+
*/
|
|
1090
|
+
credentials?: SlackCredentials;
|
|
1091
|
+
}
|
|
1092
|
+
interface SocialConfig {
|
|
1093
|
+
/**
|
|
1094
|
+
* Twitter configuration
|
|
1095
|
+
*/
|
|
1096
|
+
twitter?: TwitterSocialConfig;
|
|
1097
|
+
/**
|
|
1098
|
+
* Slack configuration
|
|
1099
|
+
*/
|
|
1100
|
+
slack?: SlackSocialConfig;
|
|
1101
|
+
/**
|
|
1102
|
+
* URL to full changelog (e.g., https://example.com/changelog)
|
|
1103
|
+
* This URL will be included in social media posts to allow users to view the complete changelog
|
|
1104
|
+
*/
|
|
1105
|
+
changelogUrl?: string;
|
|
1106
|
+
}
|
|
1107
|
+
interface TwitterOptions {
|
|
1108
|
+
/**
|
|
1109
|
+
* Release information
|
|
1110
|
+
*/
|
|
1111
|
+
version: string;
|
|
1112
|
+
/**
|
|
1113
|
+
* Project name
|
|
1114
|
+
*/
|
|
1115
|
+
projectName: string;
|
|
1116
|
+
/**
|
|
1117
|
+
* Changelog content
|
|
1118
|
+
*/
|
|
1119
|
+
changelog: string;
|
|
1120
|
+
/**
|
|
1121
|
+
* Release URL (GitHub/GitLab)
|
|
1122
|
+
*/
|
|
1123
|
+
releaseUrl?: string;
|
|
1124
|
+
/**
|
|
1125
|
+
* Full changelog URL (e.g., https://example.com/changelog)
|
|
1126
|
+
*/
|
|
1127
|
+
changelogUrl?: string;
|
|
1128
|
+
/**
|
|
1129
|
+
* Twitter credentials (all fields required)
|
|
1130
|
+
*/
|
|
1131
|
+
credentials: {
|
|
1132
|
+
apiKey: string;
|
|
1133
|
+
apiKeySecret: string;
|
|
1134
|
+
accessToken: string;
|
|
1135
|
+
accessTokenSecret: string;
|
|
1136
|
+
};
|
|
1137
|
+
/**
|
|
1138
|
+
* Custom Twitter message template
|
|
1139
|
+
*/
|
|
1140
|
+
template: string;
|
|
1141
|
+
/**
|
|
1142
|
+
* Run without side effects
|
|
1143
|
+
* @default false
|
|
1144
|
+
*/
|
|
1145
|
+
dryRun?: boolean;
|
|
1146
|
+
}
|
|
1147
|
+
interface SlackOptions {
|
|
1148
|
+
/**
|
|
1149
|
+
* Release information
|
|
1150
|
+
*/
|
|
1151
|
+
version: string;
|
|
1152
|
+
/**
|
|
1153
|
+
* Project name
|
|
1154
|
+
*/
|
|
1155
|
+
projectName: string;
|
|
1156
|
+
/**
|
|
1157
|
+
* Changelog content
|
|
1158
|
+
*/
|
|
1159
|
+
changelog: string;
|
|
1160
|
+
/**
|
|
1161
|
+
* Release URL (GitHub/GitLab)
|
|
1162
|
+
*/
|
|
1163
|
+
releaseUrl?: string;
|
|
1164
|
+
/**
|
|
1165
|
+
* Full changelog URL (e.g., https://example.com/changelog)
|
|
1166
|
+
*/
|
|
1167
|
+
changelogUrl?: string;
|
|
1168
|
+
/**
|
|
1169
|
+
* Slack channel ID or name
|
|
1170
|
+
*/
|
|
1171
|
+
channel: string;
|
|
1172
|
+
/**
|
|
1173
|
+
* Slack token (required)
|
|
1174
|
+
*/
|
|
1175
|
+
token: string;
|
|
1176
|
+
/**
|
|
1177
|
+
* Custom message template
|
|
1178
|
+
*/
|
|
1179
|
+
template?: string;
|
|
1180
|
+
/**
|
|
1181
|
+
* Run without side effects
|
|
1182
|
+
* @default false
|
|
1183
|
+
*/
|
|
1184
|
+
dryRun?: boolean;
|
|
1185
|
+
}
|
|
860
1186
|
interface TemplatesConfig {
|
|
861
1187
|
/**
|
|
862
1188
|
* Commit message template
|
|
@@ -874,6 +1200,18 @@ interface TemplatesConfig {
|
|
|
874
1200
|
* Empty changelog content
|
|
875
1201
|
*/
|
|
876
1202
|
emptyChangelogContent?: string;
|
|
1203
|
+
/**
|
|
1204
|
+
* Twitter message template
|
|
1205
|
+
* Available variables: {{projectName}}, {{version}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
|
|
1206
|
+
* @default '🚀 {{projectName}} {{version}} is out!\n\n{{changelog}}\n\n{{releaseUrl}}\n{{changelogUrl}}'
|
|
1207
|
+
*/
|
|
1208
|
+
twitterMessage?: string;
|
|
1209
|
+
/**
|
|
1210
|
+
* Slack message template (optional - if not provided, uses rich blocks format)
|
|
1211
|
+
* Available variables: {{projectName}}, {{version}}, {{changelog}}, {{releaseUrl}}, {{changelogUrl}}
|
|
1212
|
+
* @default undefined
|
|
1213
|
+
*/
|
|
1214
|
+
slackMessage?: string;
|
|
877
1215
|
}
|
|
878
1216
|
interface RepoConfig {
|
|
879
1217
|
/**
|
|
@@ -895,15 +1233,42 @@ interface RepoConfig {
|
|
|
895
1233
|
provider?: GitProvider;
|
|
896
1234
|
}
|
|
897
1235
|
type HookType = 'before' | 'success' | 'error';
|
|
898
|
-
type HookStep = 'bump' | 'changelog' | 'commit-and-tag' | 'provider-release' | 'publish' | 'push' | 'release';
|
|
1236
|
+
type HookStep = 'bump' | 'changelog' | 'commit-and-tag' | 'provider-release' | 'publish' | 'push' | 'release' | 'social' | 'twitter' | 'slack';
|
|
899
1237
|
/**
|
|
900
|
-
*
|
|
901
|
-
* @default {}
|
|
1238
|
+
* API tokens configuration
|
|
902
1239
|
*/
|
|
903
1240
|
interface TokensConfig {
|
|
1241
|
+
/**
|
|
1242
|
+
* registry token for publishing
|
|
1243
|
+
* Environment variables: NPM_TOKEN, RELIZY_NPM_TOKEN, NODE_AUTH_TOKEN
|
|
1244
|
+
*/
|
|
904
1245
|
registry?: string;
|
|
905
|
-
|
|
1246
|
+
/**
|
|
1247
|
+
* GitHub token for creating releases
|
|
1248
|
+
* Environment variables: GITHUB_TOKEN, GH_TOKEN, RELIZY_GITHUB_TOKEN
|
|
1249
|
+
*/
|
|
906
1250
|
github?: string;
|
|
1251
|
+
/**
|
|
1252
|
+
* GitLab token for creating releases
|
|
1253
|
+
* Environment variables: GITLAB_TOKEN, GITLAB_API_TOKEN, CI_JOB_TOKEN, RELIZY_GITLAB_TOKEN
|
|
1254
|
+
*/
|
|
1255
|
+
gitlab?: string;
|
|
1256
|
+
/**
|
|
1257
|
+
* Twitter API credentials for posting tweets
|
|
1258
|
+
* Environment variables: TWITTER_API_KEY, TWITTER_API_KEY_SECRET, TWITTER_ACCESS_TOKEN, TWITTER_ACCESS_TOKEN_SECRET
|
|
1259
|
+
* Or with RELIZY_ prefix: RELIZY_TWITTER_API_KEY, etc.
|
|
1260
|
+
*/
|
|
1261
|
+
twitter?: {
|
|
1262
|
+
apiKey?: string;
|
|
1263
|
+
apiKeySecret?: string;
|
|
1264
|
+
accessToken?: string;
|
|
1265
|
+
accessTokenSecret?: string;
|
|
1266
|
+
};
|
|
1267
|
+
/**
|
|
1268
|
+
* Slack bot token for posting messages
|
|
1269
|
+
* Environment variables: SLACK_TOKEN, RELIZY_SLACK_TOKEN
|
|
1270
|
+
*/
|
|
1271
|
+
slack?: string;
|
|
907
1272
|
}
|
|
908
1273
|
/**
|
|
909
1274
|
* Hooks configuration
|
|
@@ -968,7 +1333,11 @@ interface RelizyConfig extends Partial<Omit<ChangelogConfig$1, 'output' | 'templ
|
|
|
968
1333
|
*/
|
|
969
1334
|
release?: ReleaseConfig;
|
|
970
1335
|
/**
|
|
971
|
-
*
|
|
1336
|
+
* Social media configuration
|
|
1337
|
+
*/
|
|
1338
|
+
social?: SocialConfig;
|
|
1339
|
+
/**
|
|
1340
|
+
* API tokens configuration
|
|
972
1341
|
*/
|
|
973
1342
|
tokens?: TokensConfig;
|
|
974
1343
|
/**
|
|
@@ -981,7 +1350,7 @@ interface RelizyConfig extends Partial<Omit<ChangelogConfig$1, 'output' | 'templ
|
|
|
981
1350
|
*/
|
|
982
1351
|
logLevel?: LogLevel;
|
|
983
1352
|
/**
|
|
984
|
-
* The safety check will verify if tokens or others required for release are set (depends on the release options)
|
|
1353
|
+
* Global safety check. The safety check will verify if tokens or others required for release are set (depends on the release options)
|
|
985
1354
|
* @default true
|
|
986
1355
|
*/
|
|
987
1356
|
safetyCheck?: boolean;
|
|
@@ -995,10 +1364,7 @@ declare function providerReleaseSafetyCheck({ config, provider }: {
|
|
|
995
1364
|
config: ResolvedRelizyConfig;
|
|
996
1365
|
provider?: GitProvider | null;
|
|
997
1366
|
}): void;
|
|
998
|
-
declare function providerRelease(options?: Partial<ProviderReleaseOptions>): Promise<
|
|
999
|
-
detectedProvider: GitProvider;
|
|
1000
|
-
postedReleases: PostedRelease[];
|
|
1001
|
-
}>;
|
|
1367
|
+
declare function providerRelease(options?: Partial<ProviderReleaseOptions>): Promise<ProviderReleaseResult>;
|
|
1002
1368
|
|
|
1003
1369
|
declare function publishSafetyCheck({ config }: {
|
|
1004
1370
|
config: ResolvedRelizyConfig;
|
|
@@ -1009,5 +1375,10 @@ declare function publish(options?: Partial<PublishOptions>): Promise<{
|
|
|
1009
1375
|
|
|
1010
1376
|
declare function release(options?: Partial<ReleaseOptions>): Promise<void>;
|
|
1011
1377
|
|
|
1012
|
-
|
|
1013
|
-
|
|
1378
|
+
declare function socialSafetyCheck({ config }: {
|
|
1379
|
+
config: ResolvedRelizyConfig;
|
|
1380
|
+
}): void;
|
|
1381
|
+
declare function social(options?: Partial<SocialOptions>): Promise<SocialResult>;
|
|
1382
|
+
|
|
1383
|
+
export { bump, changelog, checkGitStatusIfDirty, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromTag, fetchGitTags, formatChangelogForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseUrl, getRootPackage, getSlackToken, getTwitterCredentials, github, gitlab, hasLernaJson, isBumpedPackage, isChangedPreid, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, loadRelizyConfig, parseGitRemoteUrl, postReleaseToSlack, postReleaseToTwitter, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, readPackageJson, readPackages, release, resolveTags, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
|
1384
|
+
export type { BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogOptions, ConfigType, GitProvider, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, PackageBase, PackageManager, PostedRelease, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, ReadPackage, ReleaseConfig, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, SlackCredentials, SlackOptions, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { b as bump, c as changelog,
|
|
1
|
+
export { b as bump, c as changelog, o as checkGitStatusIfDirty, ar as confirmBump, y as createCommitAndTags, F as createGitlabRelease, i as defineConfig, u as detectGitProvider, H as detectPackageManager, I as determinePublishTag, af as determineReleaseType, ae as determineSemverChange, aa as executeBuildCmd, a9 as executeFormatCmd, a6 as executeHook, m as expandPackagesToBumpWithDependents, X as extractChangelogSummary, aj as extractVersionFromPackageTag, au as extractVersionFromTag, q as fetchGitTags, U as formatChangelogForSlack, V as formatSlackMessage, a4 as formatTweetMessage, g as generateChangelog, L as getAuthCommand, as as getBumpedIndependentPackages, aq as getBumpedPackageIndependently, a8 as getCIName, C as getCurrentGitBranch, D as getCurrentGitRef, h as getDefaultConfig, k as getDependentsOf, B as getFirstCommit, n as getGitStatus, Z as getIndependentTag, a1 as getLastPackageTag, a0 as getLastRepoTag, _ as getLastStableTag, $ as getLastTag, x as getModifiedReleaseFilePatterns, R as getPackageCommits, j as getPackageDependencies, ah as getPackageNewVersion, Q as getPackages, ac as getPackagesOrBumpedPackages, K as getPackagesToPublishInIndependentMode, J as getPackagesToPublishInSelectiveMode, ao as getPreid, Y as getReleaseUrl, O as getRootPackage, T as getSlackToken, a3 as getTwitterCredentials, E as github, G as gitlab, S as hasLernaJson, ab as isBumpedPackage, ap as isChangedPreid, an as isGraduating, ad as isGraduatingToStableBetweenVersion, a7 as isInCI, ak as isPrerelease, am as isPrereleaseReleaseType, al as isStableReleaseType, av as isTagVersionCompatibleWithCurrent, l as loadRelizyConfig, v as parseGitRemoteUrl, W as postReleaseToSlack, a5 as postReleaseToTwitter, a as providerRelease, p as providerReleaseSafetyCheck, e as publish, M as publishPackage, d as publishSafetyCheck, z as pushCommitAndTags, N as readPackageJson, P as readPackages, r as release, a2 as resolveTags, A as rollbackModifiedFiles, at as shouldFilterPrereleaseTags, f as social, s as socialSafetyCheck, t as topologicalSort, ai as updateLernaVersion, w as writeChangelogToFile, ag as writeVersion } from './shared/relizy.Bpj1yhpn.mjs';
|
|
2
2
|
import '@maz-ui/node';
|
|
3
|
+
import 'node:process';
|
|
3
4
|
import 'node:fs';
|
|
4
5
|
import 'node:path';
|
|
5
6
|
import 'changelogen';
|
|
@@ -8,7 +9,6 @@ import '@inquirer/prompts';
|
|
|
8
9
|
import '@maz-ui/utils';
|
|
9
10
|
import 'semver';
|
|
10
11
|
import 'node:child_process';
|
|
11
|
-
import 'node:process';
|
|
12
12
|
import 'c12';
|
|
13
13
|
import 'defu';
|
|
14
14
|
import 'convert-gitmoji';
|