@docker/actions-toolkit 0.25.0 → 0.26.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/lib/buildx/build.d.ts +2 -0
- package/lib/buildx/build.js +15 -3
- package/lib/buildx/build.js.map +1 -1
- package/lib/github.d.ts +1 -1
- package/lib/github.js +5 -5
- package/lib/github.js.map +1 -1
- package/lib/types/buildkit/buildkit.d.ts +16 -0
- package/lib/types/buildkit/buildkit.js +21 -0
- package/lib/types/buildkit/buildkit.js.map +1 -0
- package/lib/types/buildkit/client.d.ts +61 -0
- package/lib/types/buildkit/client.js +18 -0
- package/lib/types/buildkit/client.js.map +1 -0
- package/lib/types/buildkit/control.d.ts +88 -0
- package/lib/types/buildkit/control.js +18 -0
- package/lib/types/buildkit/control.js.map +1 -0
- package/lib/types/buildkit/ops.d.ts +60 -0
- package/lib/types/buildkit/ops.js +18 -0
- package/lib/types/buildkit/ops.js.map +1 -0
- package/lib/types/buildkit/rpc.d.ts +24 -0
- package/lib/types/buildkit/rpc.js +18 -0
- package/lib/types/buildkit/rpc.js.map +1 -0
- package/lib/types/buildx/build.d.ts +1 -1
- package/lib/types/intoto/intoto.d.ts +17 -0
- package/lib/types/intoto/intoto.js +22 -0
- package/lib/types/intoto/intoto.js.map +1 -0
- package/lib/types/intoto/slsa_provenance/v0.2/provenance.d.ts +55 -0
- package/lib/types/intoto/slsa_provenance/v0.2/provenance.js +21 -0
- package/lib/types/intoto/slsa_provenance/v0.2/provenance.js.map +1 -0
- package/package.json +1 -1
package/lib/buildx/build.d.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Buildx } from './buildx';
|
|
17
17
|
import { BuildMetadata } from '../types/buildx/build';
|
|
18
|
+
import { ProvenancePredicate } from '../types/intoto/slsa_provenance/v0.2/provenance';
|
|
18
19
|
export interface BuildOpts {
|
|
19
20
|
buildx?: Buildx;
|
|
20
21
|
}
|
|
@@ -28,6 +29,7 @@ export declare class Build {
|
|
|
28
29
|
getMetadataFilePath(): string;
|
|
29
30
|
resolveMetadata(): BuildMetadata | undefined;
|
|
30
31
|
resolveRef(metadata?: BuildMetadata): string | undefined;
|
|
32
|
+
resolveProvenance(metadata?: BuildMetadata): ProvenancePredicate | undefined;
|
|
31
33
|
resolveDigest(metadata?: BuildMetadata): string | undefined;
|
|
32
34
|
static resolveSecretString(kvp: string): string;
|
|
33
35
|
static resolveSecretFile(kvp: string): string;
|
package/lib/buildx/build.js
CHANGED
|
@@ -92,6 +92,18 @@ class Build {
|
|
|
92
92
|
}
|
|
93
93
|
return undefined;
|
|
94
94
|
}
|
|
95
|
+
resolveProvenance(metadata) {
|
|
96
|
+
if (!metadata) {
|
|
97
|
+
metadata = this.resolveMetadata();
|
|
98
|
+
if (!metadata) {
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if ('buildx.build.provenance' in metadata) {
|
|
103
|
+
return metadata['buildx.build.provenance'];
|
|
104
|
+
}
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
95
107
|
resolveDigest(metadata) {
|
|
96
108
|
if (!metadata) {
|
|
97
109
|
metadata = this.resolveMetadata();
|
|
@@ -136,7 +148,7 @@ class Build {
|
|
|
136
148
|
return input;
|
|
137
149
|
}
|
|
138
150
|
try {
|
|
139
|
-
return core.getBooleanInput(name) ? `builder-id=${github_1.GitHub.workflowRunURL}` : 'false';
|
|
151
|
+
return core.getBooleanInput(name) ? `builder-id=${github_1.GitHub.workflowRunURL(true)}` : 'false';
|
|
140
152
|
}
|
|
141
153
|
catch (err) {
|
|
142
154
|
// not a valid boolean, so we assume it's a string
|
|
@@ -145,7 +157,7 @@ class Build {
|
|
|
145
157
|
}
|
|
146
158
|
static resolveProvenanceAttrs(input) {
|
|
147
159
|
if (!input) {
|
|
148
|
-
return `builder-id=${github_1.GitHub.workflowRunURL}`;
|
|
160
|
+
return `builder-id=${github_1.GitHub.workflowRunURL(true)}`;
|
|
149
161
|
}
|
|
150
162
|
// parse attributes from input
|
|
151
163
|
const fields = (0, sync_1.parse)(input, {
|
|
@@ -163,7 +175,7 @@ class Build {
|
|
|
163
175
|
}
|
|
164
176
|
}
|
|
165
177
|
// if not add builder-id attribute
|
|
166
|
-
return `${input},builder-id=${github_1.GitHub.workflowRunURL}`;
|
|
178
|
+
return `${input},builder-id=${github_1.GitHub.workflowRunURL(true)}`;
|
|
167
179
|
}
|
|
168
180
|
static resolveCacheToAttrs(input, githubToken) {
|
|
169
181
|
if (!input) {
|
package/lib/buildx/build.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/buildx/build.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAAoB;AACpB,gDAAwB;AACxB,oDAAsC;AACtC,yCAAqC;AAErC,qCAAgC;AAChC,wCAAmC;AACnC,sCAAiC;AACjC,kCAA6B;
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/buildx/build.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAAoB;AACpB,gDAAwB;AACxB,oDAAsC;AACtC,yCAAqC;AAErC,qCAAgC;AAChC,wCAAmC;AACnC,sCAAiC;AACjC,kCAA6B;AAS7B,MAAa,KAAK;IAKhB,YAAY,IAAgB;QAC1B,IAAI,CAAC,MAAM,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,KAAI,IAAI,eAAM,EAAE,CAAC;QAC3C,IAAI,CAAC,WAAW,GAAG,iBAAiB,WAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC;QACtE,IAAI,CAAC,gBAAgB,GAAG,kBAAkB,WAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC;IAC/E,CAAC;IAEM,kBA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O,KAAK,CAAC;IACf,CAAC;IAEO,MAAM,CAAC,cAAc,CAAC,GAAW;QACvC,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACxC,MAAM,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC7C,MAAM,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;QAChD,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,wBAAwB,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACtB,CAAC;CACF;AAlRD,sBAkRC"}
|
package/lib/github.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare class GitHub {
|
|
|
27
27
|
static get serverURL(): string;
|
|
28
28
|
static get apiURL(): string;
|
|
29
29
|
static get repository(): string;
|
|
30
|
-
static
|
|
30
|
+
static workflowRunURL(setAttempts?: boolean): string;
|
|
31
31
|
static get actionsRuntimeToken(): GitHubActionsRuntimeToken | undefined;
|
|
32
32
|
static printActionsRuntimeTokenACs(): Promise<void>;
|
|
33
33
|
static uploadArtifact(opts: UploadArtifactOpts): Promise<UploadArtifactResponse>;
|
package/lib/github.js
CHANGED
|
@@ -85,10 +85,10 @@ class GitHub {
|
|
|
85
85
|
static get repository() {
|
|
86
86
|
return `${github.context.repo.owner}/${github.context.repo.repo}`;
|
|
87
87
|
}
|
|
88
|
-
static
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return `${GitHub.serverURL}/${GitHub.repository}/actions/runs/${
|
|
88
|
+
static workflowRunURL(setAttempts) {
|
|
89
|
+
// TODO: runAttempt is not yet part of github.context but will be in a
|
|
90
|
+
// future release of @actions/github package: https://github.com/actions/toolkit/commit/faa425440f86f9c16587a19dfb59491253a2c92a
|
|
91
|
+
return `${GitHub.serverURL}/${GitHub.repository}/actions/runs/${github.context.runId}${setAttempts ? `/attempts/${process.env.GITHUB_RUN_ATTEMPT || 1}` : ''}`;
|
|
92
92
|
}
|
|
93
93
|
static get actionsRuntimeToken() {
|
|
94
94
|
const token = process.env['ACTIONS_RUNTIME_TOKEN'] || '';
|
|
@@ -197,7 +197,7 @@ class GitHub {
|
|
|
197
197
|
}
|
|
198
198
|
const artifactId = BigInt(finalizeArtifactResp.artifactId);
|
|
199
199
|
core.info(`Artifact successfully finalized (${artifactId})`);
|
|
200
|
-
const artifactURL = `${GitHub.workflowRunURL}/artifacts/${artifactId}`;
|
|
200
|
+
const artifactURL = `${GitHub.workflowRunURL()}/artifacts/${artifactId}`;
|
|
201
201
|
core.info(`Artifact download URL: ${artifactURL}`);
|
|
202
202
|
return {
|
|
203
203
|
id: Number(artifactId),
|
package/lib/github.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github.js","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAA4B;AAC5B,4CAAoB;AACpB,sDAA6B;AAC7B,4CAAoB;AACpB,gDAAwB;AACxB,+DAA4G;AAC5G,uGAAwG;AACxG,qEAAkF;AAClF,+EAA8E;AAC9E,gDAAqE;AACrE,oDAAsC;AAEtC,wDAA0C;AAI1C,sDAAgE;AAChE,2CAAiD;AAEjD,iCAA4B;AAQ5B,MAAa,MAAM;IAGjB,YAAY,IAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,EAAE,CAAC,CAAC;IACrD,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,mBAAK,M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E;oBACvB,MAAM,EAAE,CAAC;oBACT,SAAS,EAAE,CAAC,CAAC;iBACd,CAAC,EACF,MAAM,CACP,CAAC;YACJ,CAAC;YAED,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;gBACxB,GAAG,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;YAC1G,CAAC;YAED,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;YAC7B,MAAM,GAAG,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,CAAC;QACnC,CAAC;KAAA;CACF;AAhPD,wBAgPC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const MEDIATYPE_STATUS_V0 = "application/vnd.buildkit.status.v0";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2024 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.MEDIATYPE_STATUS_V0 = void 0;
|
|
19
|
+
// https://github.com/moby/buildkit/blob/v0.14.0/solver/llbsolver/history.go#L672
|
|
20
|
+
exports.MEDIATYPE_STATUS_V0 = 'application/vnd.buildkit.status.v0';
|
|
21
|
+
//# sourceMappingURL=buildkit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildkit.js","sourceRoot":"","sources":["../../../src/types/buildkit/buildkit.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,iFAAiF;AACpE,QAAA,mBAAmB,GAAG,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Digest } from '../oci/digest';
|
|
17
|
+
import { ProgressGroup, Range, SourceInfo } from './ops';
|
|
18
|
+
export interface Vertex {
|
|
19
|
+
digest?: Digest;
|
|
20
|
+
inputs?: Array<Digest>;
|
|
21
|
+
name?: string;
|
|
22
|
+
started?: Date;
|
|
23
|
+
completed?: Date;
|
|
24
|
+
cached?: boolean;
|
|
25
|
+
error?: string;
|
|
26
|
+
progressGroup?: ProgressGroup;
|
|
27
|
+
}
|
|
28
|
+
export interface VertexStatus {
|
|
29
|
+
id: string;
|
|
30
|
+
vertex?: Digest;
|
|
31
|
+
name?: string;
|
|
32
|
+
total?: number;
|
|
33
|
+
current: number;
|
|
34
|
+
timestamp?: Date;
|
|
35
|
+
started?: Date;
|
|
36
|
+
completed?: Date;
|
|
37
|
+
}
|
|
38
|
+
export interface VertexLog {
|
|
39
|
+
vertex?: Digest;
|
|
40
|
+
stream?: number;
|
|
41
|
+
data: any;
|
|
42
|
+
timestamp: Date;
|
|
43
|
+
}
|
|
44
|
+
export interface VertexWarning {
|
|
45
|
+
vertex?: Digest;
|
|
46
|
+
level?: number;
|
|
47
|
+
short?: any;
|
|
48
|
+
detail?: Array<any>;
|
|
49
|
+
url?: string;
|
|
50
|
+
sourceInfo?: SourceInfo;
|
|
51
|
+
range?: Array<Range>;
|
|
52
|
+
}
|
|
53
|
+
export interface SolveStatus {
|
|
54
|
+
vertexes?: Array<Vertex>;
|
|
55
|
+
statuses?: Array<VertexStatus>;
|
|
56
|
+
logs?: Array<VertexLog>;
|
|
57
|
+
warnings?: Array<VertexWarning>;
|
|
58
|
+
}
|
|
59
|
+
export interface SolveResponse {
|
|
60
|
+
exporterResponse: Record<string, string>;
|
|
61
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2024 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/types/buildkit/client.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Descriptor } from '../oci/descriptor';
|
|
17
|
+
import { Digest } from '../oci/digest';
|
|
18
|
+
import { ProgressGroup, Range, SourceInfo } from './ops';
|
|
19
|
+
import { RpcStatus } from './rpc';
|
|
20
|
+
export interface BuildHistoryRecord {
|
|
21
|
+
Ref: string;
|
|
22
|
+
Frontend: string;
|
|
23
|
+
FrontendAttrs: Record<string, string>;
|
|
24
|
+
Exporters: Array<Exporter>;
|
|
25
|
+
error?: RpcStatus;
|
|
26
|
+
CreatedAt?: Date;
|
|
27
|
+
CompletedAt?: Date;
|
|
28
|
+
logs?: Descriptor;
|
|
29
|
+
ExporterResponse: Record<string, string>;
|
|
30
|
+
Result?: BuildResultInfo;
|
|
31
|
+
Results: Record<string, BuildResultInfo>;
|
|
32
|
+
Generation: number;
|
|
33
|
+
trace?: Descriptor;
|
|
34
|
+
pinned: boolean;
|
|
35
|
+
numCachedSteps: number;
|
|
36
|
+
numTotalSteps: number;
|
|
37
|
+
numCompletedSteps: number;
|
|
38
|
+
}
|
|
39
|
+
export interface Exporter {
|
|
40
|
+
Type: string;
|
|
41
|
+
Attrs: Record<string, string>;
|
|
42
|
+
}
|
|
43
|
+
export interface BuildResultInfo {
|
|
44
|
+
ResultDeprecated?: Descriptor;
|
|
45
|
+
Attestations?: Array<Descriptor>;
|
|
46
|
+
Results?: Record<number, Descriptor>;
|
|
47
|
+
}
|
|
48
|
+
export interface StatusResponse {
|
|
49
|
+
vertexes?: Array<Vertex>;
|
|
50
|
+
statuses?: Array<VertexStatus>;
|
|
51
|
+
logs?: Array<VertexLog>;
|
|
52
|
+
warnings?: Array<VertexWarning>;
|
|
53
|
+
}
|
|
54
|
+
export interface Vertex {
|
|
55
|
+
digest: Digest;
|
|
56
|
+
inputs: Array<Digest>;
|
|
57
|
+
name?: string;
|
|
58
|
+
cached?: boolean;
|
|
59
|
+
started?: Date;
|
|
60
|
+
completed?: Date;
|
|
61
|
+
error?: string;
|
|
62
|
+
progressGroup?: ProgressGroup;
|
|
63
|
+
}
|
|
64
|
+
export interface VertexStatus {
|
|
65
|
+
ID?: string;
|
|
66
|
+
vertex: Digest;
|
|
67
|
+
name?: string;
|
|
68
|
+
current?: number;
|
|
69
|
+
total?: number;
|
|
70
|
+
timestamp: Date;
|
|
71
|
+
started?: Date;
|
|
72
|
+
completed?: Date;
|
|
73
|
+
}
|
|
74
|
+
export interface VertexLog {
|
|
75
|
+
vertex: Digest;
|
|
76
|
+
timestamp: Date;
|
|
77
|
+
stream?: number;
|
|
78
|
+
msg?: any;
|
|
79
|
+
}
|
|
80
|
+
export interface VertexWarning {
|
|
81
|
+
vertex: Digest;
|
|
82
|
+
level?: number;
|
|
83
|
+
short?: any;
|
|
84
|
+
detail?: Array<any>;
|
|
85
|
+
url?: string;
|
|
86
|
+
info?: SourceInfo;
|
|
87
|
+
ranges?: Array<Range>;
|
|
88
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2024 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
//# sourceMappingURL=control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control.js","sourceRoot":"","sources":["../../../src/types/buildkit/control.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export interface Definition {
|
|
17
|
+
def?: Array<any>;
|
|
18
|
+
metadata: Record<string, OpMetadata>;
|
|
19
|
+
Source?: Source;
|
|
20
|
+
}
|
|
21
|
+
export interface OpMetadata {
|
|
22
|
+
ignore_cache?: boolean;
|
|
23
|
+
description?: Record<string, string>;
|
|
24
|
+
export_cache?: ExportCache;
|
|
25
|
+
caps: Record<string, boolean>;
|
|
26
|
+
progress_group?: ProgressGroup;
|
|
27
|
+
}
|
|
28
|
+
export interface Source {
|
|
29
|
+
locations?: Record<string, Locations>;
|
|
30
|
+
infos?: Array<SourceInfo>;
|
|
31
|
+
}
|
|
32
|
+
export interface Locations {
|
|
33
|
+
locations?: Array<Location>;
|
|
34
|
+
}
|
|
35
|
+
export interface Location {
|
|
36
|
+
sourceIndex?: number;
|
|
37
|
+
ranges?: Array<Range>;
|
|
38
|
+
}
|
|
39
|
+
export interface Range {
|
|
40
|
+
start: Position;
|
|
41
|
+
end: Position;
|
|
42
|
+
}
|
|
43
|
+
export interface Position {
|
|
44
|
+
line: number;
|
|
45
|
+
character: number;
|
|
46
|
+
}
|
|
47
|
+
export interface SourceInfo {
|
|
48
|
+
filename?: string;
|
|
49
|
+
data?: any;
|
|
50
|
+
definition?: Definition;
|
|
51
|
+
language?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ExportCache {
|
|
54
|
+
Value?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface ProgressGroup {
|
|
57
|
+
id?: string;
|
|
58
|
+
name?: string;
|
|
59
|
+
weak?: boolean;
|
|
60
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2024 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
//# sourceMappingURL=ops.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ops.js","sourceRoot":"","sources":["../../../src/types/buildkit/ops.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export interface RpcStatus {
|
|
17
|
+
code: number;
|
|
18
|
+
message: string;
|
|
19
|
+
details: Array<RpcAny>;
|
|
20
|
+
}
|
|
21
|
+
export interface RpcAny {
|
|
22
|
+
type_url: string;
|
|
23
|
+
value: any;
|
|
24
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2024 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
//# sourceMappingURL=rpc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../src/types/buildkit/rpc.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const MEDIATYPE_PAYLOAD = "application/vnd.in-toto+json";
|
|
17
|
+
export declare const MEDIATYPE_PREDICATE = "in-toto.io/predicate-type";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2024 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.MEDIATYPE_PREDICATE = exports.MEDIATYPE_PAYLOAD = void 0;
|
|
19
|
+
// https://github.com/in-toto/in-toto-golang/blob/dd6278764ab1dae7301609c7510129888e2fd569/in_toto/envelope.go#L17
|
|
20
|
+
exports.MEDIATYPE_PAYLOAD = 'application/vnd.in-toto+json';
|
|
21
|
+
exports.MEDIATYPE_PREDICATE = 'in-toto.io/predicate-type';
|
|
22
|
+
//# sourceMappingURL=intoto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intoto.js","sourceRoot":"","sources":["../../../src/types/intoto/intoto.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,kHAAkH;AACrG,QAAA,iBAAiB,GAAG,8BAA8B,CAAC;AAEnD,QAAA,mBAAmB,GAAG,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024 actions-toolkit authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const PREDICATE_SLSA_PROVENANCE = "https://slsa.dev/provenance/v0.2";
|
|
17
|
+
export interface ProvenancePredicate {
|
|
18
|
+
builder: ProvenanceBuilder;
|
|
19
|
+
buildType: string;
|
|
20
|
+
invocation?: ProvenanceInvocation;
|
|
21
|
+
buildConfig?: any;
|
|
22
|
+
metadata: ProvenanceMetadata;
|
|
23
|
+
materials?: Material[];
|
|
24
|
+
}
|
|
25
|
+
export interface ProvenanceBuilder {
|
|
26
|
+
id: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ProvenanceInvocation {
|
|
29
|
+
configSource?: ConfigSource;
|
|
30
|
+
parameters?: any;
|
|
31
|
+
environment?: any;
|
|
32
|
+
}
|
|
33
|
+
export interface DigestSet {
|
|
34
|
+
[key: string]: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ConfigSource {
|
|
37
|
+
uri?: string;
|
|
38
|
+
digest?: DigestSet;
|
|
39
|
+
entryPoint?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface Completeness {
|
|
42
|
+
parameters?: boolean;
|
|
43
|
+
environment?: boolean;
|
|
44
|
+
materials?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface ProvenanceMetadata {
|
|
47
|
+
buildInvocationId?: string;
|
|
48
|
+
buildStartedOn?: string;
|
|
49
|
+
completeness?: Completeness;
|
|
50
|
+
reproducible?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface Material {
|
|
53
|
+
uri: string;
|
|
54
|
+
digest: DigestSet;
|
|
55
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2024 actions-toolkit authors
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PREDICATE_SLSA_PROVENANCE = void 0;
|
|
19
|
+
// https://github.com/in-toto/in-toto-golang/blob/master/in_toto/slsa_provenance/v0.2/provenance.go
|
|
20
|
+
exports.PREDICATE_SLSA_PROVENANCE = 'https://slsa.dev/provenance/v0.2';
|
|
21
|
+
//# sourceMappingURL=provenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provenance.js","sourceRoot":"","sources":["../../../../../src/types/intoto/slsa_provenance/v0.2/provenance.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,mGAAmG;AAEtF,QAAA,yBAAyB,GAAG,kCAAkC,CAAC"}
|