@git.zone/cli 6.0.1 → 6.1.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.
@@ -1,5 +1,8 @@
1
1
  import * as plugins from "./mod.plugins.js";
2
- export declare const releaseJournalSchemaVersion: 1;
2
+ import { type IReleaseCleanupResult, type IReleasePromotionContext, type IReleaseQualificationRequest, type IReleaseQualificationResult, type TReleasePromotionEvidence } from "./helpers.tsdockerprotocol.js";
3
+ export declare const releaseJournalStorageVersion: 1;
4
+ export declare const legacyReleaseJournalSchemaVersion: 1;
5
+ export declare const releaseJournalSchemaVersion: 2;
3
6
  export declare const releaseArtifactFileName: "package.tgz";
4
7
  export declare const releaseJournalFileName: "journal.json";
5
8
  export type TReleaseTargetState = "pending" | "publishing" | "verified" | "failed" | "conflict" | "skipped";
@@ -33,7 +36,47 @@ export interface IReleaseGitJournal extends IReleaseTargetStatus {
33
36
  export interface IReleaseNpmRegistryJournal extends IReleaseTargetStatus {
34
37
  registry: string;
35
38
  }
36
- export interface IReleaseJournal {
39
+ export interface IReleaseJournalV1 {
40
+ kind: "gitzone-release-journal";
41
+ schemaVersion: typeof legacyReleaseJournalSchemaVersion;
42
+ revision: number;
43
+ release: {
44
+ version: string;
45
+ tag: string;
46
+ mainOid: string;
47
+ tagOid: string;
48
+ };
49
+ artifact: IReleaseArtifact | null;
50
+ git: IReleaseGitJournal;
51
+ npm: {
52
+ access: "public";
53
+ tag: "latest";
54
+ alreadyPublished: "success" | "error";
55
+ registries: IReleaseNpmRegistryJournal[];
56
+ };
57
+ createdAt: string;
58
+ updatedAt: string;
59
+ completedAt: string | null;
60
+ }
61
+ export interface IReleaseDockerQualificationJournal extends IReleaseTargetStatus {
62
+ result: IReleaseQualificationResult | null;
63
+ }
64
+ export interface IReleaseDockerPromotionJournal extends IReleaseTargetStatus {
65
+ promotionId: string;
66
+ evidence: TReleasePromotionEvidence[];
67
+ }
68
+ export interface IReleaseDockerCleanupJournal extends IReleaseTargetStatus {
69
+ result: IReleaseCleanupResult | null;
70
+ }
71
+ export interface IReleaseDockerJournal {
72
+ engine: "tsdocker";
73
+ protocolVersion: 1;
74
+ request: IReleaseQualificationRequest;
75
+ qualification: IReleaseDockerQualificationJournal;
76
+ promotions: IReleaseDockerPromotionJournal[];
77
+ cleanup: IReleaseDockerCleanupJournal;
78
+ }
79
+ export interface IReleaseJournalV2 {
37
80
  kind: "gitzone-release-journal";
38
81
  schemaVersion: typeof releaseJournalSchemaVersion;
39
82
  revision: number;
@@ -51,15 +94,20 @@ export interface IReleaseJournal {
51
94
  alreadyPublished: "success" | "error";
52
95
  registries: IReleaseNpmRegistryJournal[];
53
96
  };
97
+ docker: IReleaseDockerJournal;
54
98
  createdAt: string;
55
99
  updatedAt: string;
56
100
  completedAt: string | null;
57
101
  }
102
+ export type TReleaseJournal = IReleaseJournalV1 | IReleaseJournalV2;
58
103
  export declare const normalizeReleaseVersion: (valueArg: string) => string;
59
104
  export declare const normalizeReleaseGitRemoteName: (valueArg: string) => string;
60
- export declare const assertReleaseJournal: (valueArg: unknown) => IReleaseJournal;
61
- export declare const serializeReleaseJournal: (journalArg: IReleaseJournal) => string;
62
- export declare const parseReleaseJournal: (contentArg: string) => IReleaseJournal;
105
+ export interface IReleaseDockerPromotionContext extends IReleasePromotionContext {
106
+ }
107
+ export declare const getReleaseDockerPromotionContext: (journalArg: IReleaseJournalV2, promotionIdArg: string) => IReleaseDockerPromotionContext;
108
+ export declare const assertReleaseJournal: (valueArg: unknown) => TReleaseJournal;
109
+ export declare const serializeReleaseJournal: (journalArg: TReleaseJournal) => string;
110
+ export declare const parseReleaseJournal: (contentArg: string) => TReleaseJournal;
63
111
  export declare const createReleaseAttempt: () => IReleaseAttempt;
64
112
  export declare const resolveGitCommonDirectory: (smartshellArg: plugins.smartshell.Smartshell, cwdArg: string) => Promise<string>;
65
113
  export declare class ReleaseJournalStore {
@@ -68,11 +116,13 @@ export declare class ReleaseJournalStore {
68
116
  getReleaseDirectory(versionArg: string): string;
69
117
  getArtifactPath(versionArg: string): string;
70
118
  createTemporaryDirectory(versionArg: string): Promise<string>;
71
- read(versionArg: string): Promise<IReleaseJournal>;
72
- list(): Promise<IReleaseJournal[]>;
73
- installPrepared(temporaryDirectoryArg: string, journalArg: IReleaseJournal): Promise<IReleaseJournal>;
74
- transact(versionArg: string, expectedRevisionArg: number, operationArg: (journalArg: IReleaseJournal) => IReleaseJournal): Promise<IReleaseJournal>;
119
+ read(versionArg: string): Promise<TReleaseJournal>;
120
+ list(): Promise<TReleaseJournal[]>;
121
+ installPrepared(temporaryDirectoryArg: string, journalArg: TReleaseJournal): Promise<TReleaseJournal>;
122
+ transact(versionArg: string, expectedRevisionArg: number, operationArg: (journalArg: TReleaseJournal) => TReleaseJournal): Promise<TReleaseJournal>;
75
123
  private writeAtomic;
76
124
  }
77
125
  export declare const createInitialTargetStatus: (enabledArg: boolean) => IReleaseTargetStatus;
78
- export declare const finalizeJournalCompletion: (journalArg: IReleaseJournal, completedAtArg?: string) => IReleaseJournal;
126
+ export declare const createInitialReleaseDockerJournal: (requestArg: IReleaseQualificationRequest) => IReleaseDockerJournal;
127
+ export declare const createReleaseDockerPromotions: (resultArg: IReleaseQualificationResult) => IReleaseDockerPromotionJournal[];
128
+ export declare const finalizeJournalCompletion: (journalArg: TReleaseJournal, completedAtArg?: string) => TReleaseJournal;