gitverse-release 3.7.0 → 4.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/dist/types.d.ts CHANGED
@@ -114,6 +114,13 @@ export interface GitConfig {
114
114
  * Пушить ли изменения в remote
115
115
  */
116
116
  push: boolean;
117
+ /**
118
+ * Использовать GVR_TOKEN для git push через HTTPS.
119
+ * Полезно для CI/CD когда нужно пушить в protected branches.
120
+ * Токен должен иметь права на запись в репозиторий.
121
+ * @default false
122
+ */
123
+ useTokenForPush?: boolean;
117
124
  }
118
125
  /**
119
126
  * Конфигурация версионирования
@@ -372,7 +379,7 @@ export interface ReleaseResult {
372
379
  export interface GitVerseConfig {
373
380
  /**
374
381
  * Включить создание релиза через GitVerse API
375
- * Требует переменную окружения GITVERSE_TOKEN
382
+ * Требует переменную окружения GVR_TOKEN
376
383
  */
377
384
  enabled: boolean;
378
385
  /**
@@ -694,6 +701,13 @@ export interface BinariesConfig {
694
701
  * @default "directory"
695
702
  */
696
703
  inputFormat?: BinaryInputFormat;
704
+ /**
705
+ * Шаблон имени архива.
706
+ * Плейсхолдеры: {{name}}, {{platform}}
707
+ * Используется только при inputFormat: "tar.gz"
708
+ * @default "{{name}}-{{platform}}.tar.gz"
709
+ */
710
+ archiveNameTemplate?: string;
697
711
  /**
698
712
  * Имя бинарника внутри архива (если отличается от name)
699
713
  * Используется только при inputFormat: "tar.gz"
@@ -71,6 +71,14 @@ export declare function platformToNodeValues(platform: BinaryPlatform): {
71
71
  * Если platformMap не задан или платформа не найдена, возвращает платформу как есть.
72
72
  */
73
73
  export declare function getSourceKey(config: BinariesConfig, platform: BinaryPlatform): string;
74
+ /**
75
+ * Дефолтный шаблон имени архива
76
+ */
77
+ export declare const DEFAULT_ARCHIVE_NAME_TEMPLATE = "{{name}}-{{platform}}.tar.gz";
78
+ /**
79
+ * Возвращает имя архива для платформы с учётом шаблона.
80
+ */
81
+ export declare function getArchiveName(config: BinariesConfig, platform: BinaryPlatform): string;
74
82
  /**
75
83
  * Возвращает путь к tar.gz архиву для указанной платформы.
76
84
  */
@@ -53,10 +53,29 @@ export declare function createCommit(message: string, files: string[]): Promise<
53
53
  * Создает git тег
54
54
  */
55
55
  export declare function createTag(tag: string, message: string): Promise<void>;
56
+ /**
57
+ * Опции для push операции
58
+ */
59
+ export interface PushOptions {
60
+ /** Тег для пуша (опционально) */
61
+ tag?: string;
62
+ /** Использовать токен для push через HTTPS */
63
+ useToken?: boolean;
64
+ /** Токен для авторизации */
65
+ token?: string;
66
+ /** Информация о репозитории */
67
+ repoInfo?: GitRepoInfo;
68
+ }
69
+ /**
70
+ * Выполняет git команду с очисткой токенов из ошибок
71
+ * Используется для команд с токенами в URL
72
+ * Экспортируется для тестирования
73
+ */
74
+ export declare function gitCommandSilent(command: string): Promise<void>;
56
75
  /**
57
76
  * Пушит изменения и теги в remote
58
77
  */
59
- export declare function pushChanges(tag?: string): Promise<void>;
78
+ export declare function pushChanges(options?: PushOptions): Promise<void>;
60
79
  /**
61
80
  * Проверяет, что рабочая директория чистая
62
81
  *
@@ -20,6 +20,10 @@ export interface RetryOptions {
20
20
  */
21
21
  operationName?: string;
22
22
  }
23
+ /**
24
+ * Проверяет, является ли ошибка временной (можно retry)
25
+ */
26
+ export declare function isRetriableError(error: unknown): boolean;
23
27
  /**
24
28
  * Выполняет функцию с retry механизмом и экспоненциальным backoff
25
29
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitverse-release",
3
- "version": "3.7.0",
3
+ "version": "4.0.0",
4
4
  "description": "Conventional Commits release automation tool for GitVerse",
5
5
  "keywords": [
6
6
  "gitverse",
package/schema.json CHANGED
@@ -22,6 +22,12 @@
22
22
  },
23
23
  "description": "Binary distribution settings for publishing platform-specific npm packages",
24
24
  "properties": {
25
+ "archiveNameTemplate": {
26
+ "default": "{{name}}-{{platform}}.tar.gz",
27
+ "description": "Template for archive file names. Placeholders: {{name}}, {{platform}}. Used only with inputFormat: 'tar.gz'",
28
+ "examples": ["{{platform}}.tar.gz", "{{name}}-{{platform}}.tar.gz", "{{name}}_{{platform}}_release.tar.gz"],
29
+ "type": "string"
30
+ },
25
31
  "binName": {
26
32
  "description": "Binary name in $PATH. Defaults to 'name' value",
27
33
  "type": "string"
@@ -257,7 +263,8 @@
257
263
  "commitChanges": true,
258
264
  "commitMessage": "chore(release): {{package}} v{{version}} [skip ci]",
259
265
  "push": true,
260
- "tagMessage": "Release {{package}} v{{version}}"
266
+ "tagMessage": "Release {{package}} v{{version}}",
267
+ "useTokenForPush": false
261
268
  },
262
269
  "description": "Git operations configuration",
263
270
  "properties": {
@@ -285,6 +292,11 @@
285
292
  "default": "Release {{package}} v{{version}}",
286
293
  "description": "Git tag message template. Supports {{package}} and {{version}} placeholders",
287
294
  "type": "string"
295
+ },
296
+ "useTokenForPush": {
297
+ "default": false,
298
+ "description": "Use GVR_TOKEN for HTTPS push instead of default git credentials. Useful for CI/CD when pushing to protected branches",
299
+ "type": "boolean"
288
300
  }
289
301
  },
290
302
  "type": "object"
@@ -304,7 +316,7 @@
304
316
  },
305
317
  "enabled": {
306
318
  "default": true,
307
- "description": "Enable GitVerse release creation via API. Requires GITVERSE_TOKEN environment variable",
319
+ "description": "Enable GitVerse release creation via API. Requires GVR_TOKEN environment variable",
308
320
  "type": "boolean"
309
321
  },
310
322
  "failOnError": {