@git.zone/cli 12.2.0 → 12.3.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/assets/templates/npm/.package.json +1 -1
- package/assets/templates/service/.package.json +1 -1
- package/assets/templates/wcc/.package.json +1 -1
- package/assets/templates/website/.package.json +1 -1
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/helpers.versionsource.d.ts +23 -5
- package/dist_ts/helpers.versionsource.js +115 -37
- package/dist_ts/helpers.workflow.d.ts +60 -17
- package/dist_ts/helpers.workflow.js +156 -51
- package/dist_ts/mod_config/index.js +98 -31
- package/dist_ts/mod_release/classes.releasejournal.d.ts +63 -8
- package/dist_ts/mod_release/classes.releasejournal.js +283 -124
- package/dist_ts/mod_release/helpers.cargorelease.d.ts +4 -3
- package/dist_ts/mod_release/helpers.cargorelease.js +5 -4
- package/dist_ts/mod_release/helpers.fossglobalassets.d.ts +61 -0
- package/dist_ts/mod_release/helpers.fossglobalassets.js +580 -0
- package/dist_ts/mod_release/helpers.giteaassets.d.ts +15 -51
- package/dist_ts/mod_release/helpers.giteaassets.js +40 -507
- package/dist_ts/mod_release/helpers.releaseassets.d.ts +40 -0
- package/dist_ts/mod_release/helpers.releaseassets.js +349 -0
- package/dist_ts/mod_release/helpers.releaseassettransfer.d.ts +67 -0
- package/dist_ts/mod_release/helpers.releaseassettransfer.js +239 -0
- package/dist_ts/mod_release/helpers.releasecheck.js +3 -2
- package/dist_ts/mod_release/helpers.releasepreparation.d.ts +7 -6
- package/dist_ts/mod_release/helpers.releasepreparation.js +34 -7
- package/dist_ts/mod_release/helpers.releasepublication.d.ts +8 -2
- package/dist_ts/mod_release/helpers.releasepublication.js +218 -54
- package/dist_ts/mod_release/helpers.releaseversionsource.d.ts +7 -5
- package/dist_ts/mod_release/helpers.releaseversionsource.js +9 -7
- package/dist_ts/mod_release/index.d.ts +1 -1
- package/dist_ts/mod_release/index.js +109 -68
- package/dist_ts/mod_release/interfaces.fossglobalassets.d.ts +108 -0
- package/dist_ts/mod_release/interfaces.fossglobalassets.js +2 -0
- package/dist_ts/mod_release/interfaces.giteaassets.d.ts +9 -43
- package/dist_ts/mod_release/interfaces.releaseassets.d.ts +68 -0
- package/dist_ts/mod_release/interfaces.releaseassets.js +2 -0
- package/dist_ts/plugins.d.ts +1 -0
- package/dist_ts/plugins.js +1 -1
- package/package.json +3 -2
- package/readme.md +338 -40
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/helpers.versionsource.ts +176 -45
- package/ts/helpers.workflow.ts +288 -78
- package/ts/mod_config/index.ts +130 -38
- package/ts/mod_release/classes.releasejournal.ts +499 -180
- package/ts/mod_release/helpers.cargorelease.ts +8 -3
- package/ts/mod_release/helpers.fossglobalassets.ts +886 -0
- package/ts/mod_release/helpers.giteaassets.ts +127 -694
- package/ts/mod_release/helpers.releaseassets.ts +516 -0
- package/ts/mod_release/helpers.releaseassettransfer.ts +339 -0
- package/ts/mod_release/helpers.releasecheck.ts +3 -1
- package/ts/mod_release/helpers.releasepreparation.ts +55 -12
- package/ts/mod_release/helpers.releasepublication.ts +351 -69
- package/ts/mod_release/helpers.releaseversionsource.ts +11 -7
- package/ts/mod_release/index.ts +151 -90
- package/ts/mod_release/interfaces.fossglobalassets.ts +127 -0
- package/ts/mod_release/interfaces.giteaassets.ts +14 -47
- package/ts/mod_release/interfaces.releaseassets.ts +96 -0
- package/ts/plugins.ts +3 -0
|
@@ -1,25 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface IGiteaFrozenAsset {
|
|
8
|
-
name: string;
|
|
9
|
-
size: number;
|
|
10
|
-
sha256: string;
|
|
11
|
-
fileName: string;
|
|
12
|
-
publicUrl: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface IPrepareGiteaAssetsOptions {
|
|
16
|
-
repositoryRoot: string;
|
|
17
|
-
manifestPath: string;
|
|
18
|
-
version: string;
|
|
19
|
-
tag: string;
|
|
20
|
-
artifactDirectory: string;
|
|
21
|
-
destination: IGiteaAssetDestination;
|
|
22
|
-
}
|
|
1
|
+
import type {
|
|
2
|
+
IReleaseAssetDestination,
|
|
3
|
+
IReleaseAssetTransferLimits,
|
|
4
|
+
IReleaseFrozenAsset,
|
|
5
|
+
} from "./interfaces.releaseassets.js";
|
|
23
6
|
|
|
24
7
|
export interface IGiteaRelease {
|
|
25
8
|
id: number;
|
|
@@ -30,29 +13,13 @@ export interface IGiteaRelease {
|
|
|
30
13
|
}
|
|
31
14
|
|
|
32
15
|
export interface IGiteaAssetInspection {
|
|
33
|
-
present:
|
|
34
|
-
missing:
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Bounds for one Gitea request. A transfer that keeps moving bytes is never cut
|
|
39
|
-
* off by a fixed wall clock; only silence or a rate below the floor ends it.
|
|
40
|
-
*/
|
|
41
|
-
export interface IGiteaAssetTransferLimits {
|
|
42
|
-
/**
|
|
43
|
-
* Wait for response headers of a metadata request or download. An upload
|
|
44
|
-
* waits after its last byte for this or its size at the rate floor, whichever is longer.
|
|
45
|
-
*/
|
|
46
|
-
responseTimeoutMs: number;
|
|
47
|
-
/** Longest gap without a byte sent or received once the transfer runs. */
|
|
48
|
-
stallTimeoutMs: number;
|
|
49
|
-
/** Rate floor for the whole request's ceiling and an upload's acknowledgement wait. */
|
|
50
|
-
minimumBytesPerSecond: number;
|
|
16
|
+
present: IReleaseFrozenAsset[];
|
|
17
|
+
missing: IReleaseFrozenAsset[];
|
|
51
18
|
}
|
|
52
19
|
|
|
53
20
|
export interface IGiteaAssetsClientOptions
|
|
54
|
-
extends Partial<
|
|
55
|
-
destination:
|
|
21
|
+
extends Partial<IReleaseAssetTransferLimits> {
|
|
22
|
+
destination: IReleaseAssetDestination;
|
|
56
23
|
tag: string;
|
|
57
24
|
commit: string;
|
|
58
25
|
token: string;
|
|
@@ -87,8 +54,8 @@ export interface IGiteaAssetsClient {
|
|
|
87
54
|
/** Downloads and hashes only the present attachments named in `verify`. */
|
|
88
55
|
inspectAssets(
|
|
89
56
|
releaseId: number,
|
|
90
|
-
expected:
|
|
91
|
-
verify?: readonly
|
|
57
|
+
expected: IReleaseFrozenAsset[],
|
|
58
|
+
verify?: readonly IReleaseFrozenAsset[],
|
|
92
59
|
): Promise<IGiteaAssetInspection>;
|
|
93
60
|
/**
|
|
94
61
|
* Uploads one attachment, only while the release is still a draft exactly
|
|
@@ -97,7 +64,7 @@ export interface IGiteaAssetsClient {
|
|
|
97
64
|
*/
|
|
98
65
|
uploadAsset(
|
|
99
66
|
releaseId: number,
|
|
100
|
-
asset:
|
|
67
|
+
asset: IReleaseFrozenAsset,
|
|
101
68
|
artifactDirectory: string,
|
|
102
69
|
expectedDraft: boolean,
|
|
103
70
|
): Promise<void>;
|
|
@@ -109,7 +76,7 @@ export interface IGiteaAssetsClient {
|
|
|
109
76
|
*/
|
|
110
77
|
verifyComplete(
|
|
111
78
|
releaseId: number,
|
|
112
|
-
expected:
|
|
79
|
+
expected: IReleaseFrozenAsset[],
|
|
113
80
|
): Promise<void>;
|
|
114
81
|
/**
|
|
115
82
|
* Publishes a draft release (`draft: false`), then proves the release, its
|
|
@@ -123,7 +90,7 @@ export interface IGiteaAssetsClient {
|
|
|
123
90
|
*/
|
|
124
91
|
publishRelease(
|
|
125
92
|
releaseId: number,
|
|
126
|
-
expected:
|
|
93
|
+
expected: IReleaseFrozenAsset[],
|
|
127
94
|
expectedDraft: boolean,
|
|
128
95
|
): Promise<void>;
|
|
129
96
|
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/** A release target that publishes a manifest's frozen assets as one release of a code host. */
|
|
2
|
+
export type TReleaseAssetTargetName = "giteaAssets" | "fossglobalAssets";
|
|
3
|
+
|
|
4
|
+
/** What a release asset target fixes for the shared freeze and transfer machinery. */
|
|
5
|
+
export interface IReleaseAssetTarget {
|
|
6
|
+
/** The code host as messages name it. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** The host's word for a stored release file, where messages speak of the remote object. */
|
|
9
|
+
hostAssetNoun: string;
|
|
10
|
+
/** Most assets one release may carry. */
|
|
11
|
+
maximumAssets: number;
|
|
12
|
+
/** Largest asset, in bytes. */
|
|
13
|
+
maximumAssetBytes: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface IReleaseAssetDestination {
|
|
17
|
+
apiOrigin: string;
|
|
18
|
+
owner: string;
|
|
19
|
+
repository: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface IReleaseFrozenAsset {
|
|
23
|
+
name: string;
|
|
24
|
+
size: number;
|
|
25
|
+
sha256: string;
|
|
26
|
+
fileName: string;
|
|
27
|
+
publicUrl: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface IPrepareReleaseAssetsOptions {
|
|
31
|
+
repositoryRoot: string;
|
|
32
|
+
manifestPath: string;
|
|
33
|
+
version: string;
|
|
34
|
+
tag: string;
|
|
35
|
+
artifactDirectory: string;
|
|
36
|
+
destination: IReleaseAssetDestination;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Bounds for one request to a code host. A transfer that keeps moving bytes is
|
|
41
|
+
* never cut off by a fixed wall clock; only silence or a rate below the floor ends it.
|
|
42
|
+
*/
|
|
43
|
+
export interface IReleaseAssetTransferLimits {
|
|
44
|
+
/**
|
|
45
|
+
* Wait for response headers of a metadata request or download. An upload
|
|
46
|
+
* waits after its last byte for this or its size at the rate floor, whichever is longer.
|
|
47
|
+
*/
|
|
48
|
+
responseTimeoutMs: number;
|
|
49
|
+
/** Longest gap without a byte sent or received once the transfer runs. */
|
|
50
|
+
stallTimeoutMs: number;
|
|
51
|
+
/** Rate floor for the whole request's ceiling and an upload's acknowledgement wait. */
|
|
52
|
+
minimumBytesPerSecond: number;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type TReleaseAssetTransferDirection = "sent" | "received";
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Why a request failed when gitzone itself detected it, as opposed to an
|
|
59
|
+
* error fetch or the transport raised. Each reason has one fixed message.
|
|
60
|
+
*/
|
|
61
|
+
export type TReleaseAssetRequestFailureReason =
|
|
62
|
+
| "oversized-response"
|
|
63
|
+
| "missing-response-body"
|
|
64
|
+
| "asset-changed-during-upload"
|
|
65
|
+
| "asset-not-downloadable"
|
|
66
|
+
| "asset-not-anonymously-downloadable";
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The errors a target raises when a transfer bound ends a request, so each
|
|
70
|
+
* target keeps its own error types and wording. Messages carry no URL or credential.
|
|
71
|
+
*/
|
|
72
|
+
export interface IReleaseAssetTransferFailures<TFailure extends Error> {
|
|
73
|
+
/** No response headers arrived within the response bound. */
|
|
74
|
+
responseTimeout(operation: string, limitMs: number): TFailure;
|
|
75
|
+
/** The transfer moved no byte for the stall bound. */
|
|
76
|
+
stalled(
|
|
77
|
+
operation: string,
|
|
78
|
+
direction: TReleaseAssetTransferDirection,
|
|
79
|
+
limitMs: number,
|
|
80
|
+
bytes: number,
|
|
81
|
+
): TFailure;
|
|
82
|
+
/** Every upload byte was sent, but the server did not answer within the size allowance. */
|
|
83
|
+
notAcknowledged(
|
|
84
|
+
bytes: number,
|
|
85
|
+
limitMs: number,
|
|
86
|
+
minimumBytesPerSecond: number,
|
|
87
|
+
): TFailure;
|
|
88
|
+
/** The transfer kept moving but stayed below the configured rate floor. */
|
|
89
|
+
tooSlow(
|
|
90
|
+
operation: string,
|
|
91
|
+
elapsedMs: number,
|
|
92
|
+
bytes: number,
|
|
93
|
+
expectedBytes: number,
|
|
94
|
+
minimumBytesPerSecond: number,
|
|
95
|
+
): TFailure;
|
|
96
|
+
}
|
package/ts/plugins.ts
CHANGED
|
@@ -55,6 +55,9 @@ export const loadDcrouterApi = () => import('@serve.zone/dcrouter-apiclient');
|
|
|
55
55
|
export type { DcRouterApiClient, TestingApi } from '@serve.zone/dcrouter-apiclient';
|
|
56
56
|
export type { data as dcrouterData } from '@serve.zone/dcrouter-apiclient/interfaces';
|
|
57
57
|
|
|
58
|
+
// @foss.global scope: the code host's release API wire types; types only, nothing loads at run time
|
|
59
|
+
export type { data as fossglobalData } from '@foss.global/interfaces';
|
|
60
|
+
|
|
58
61
|
export {
|
|
59
62
|
smartlog,
|
|
60
63
|
smartlogDestinationLocal,
|