gitverse-release 3.7.1 → 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
  /**
@@ -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.1",
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
@@ -263,7 +263,8 @@
263
263
  "commitChanges": true,
264
264
  "commitMessage": "chore(release): {{package}} v{{version}} [skip ci]",
265
265
  "push": true,
266
- "tagMessage": "Release {{package}} v{{version}}"
266
+ "tagMessage": "Release {{package}} v{{version}}",
267
+ "useTokenForPush": false
267
268
  },
268
269
  "description": "Git operations configuration",
269
270
  "properties": {
@@ -291,6 +292,11 @@
291
292
  "default": "Release {{package}} v{{version}}",
292
293
  "description": "Git tag message template. Supports {{package}} and {{version}} placeholders",
293
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"
294
300
  }
295
301
  },
296
302
  "type": "object"
@@ -310,7 +316,7 @@
310
316
  },
311
317
  "enabled": {
312
318
  "default": true,
313
- "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",
314
320
  "type": "boolean"
315
321
  },
316
322
  "failOnError": {