@docker/actions-toolkit 0.76.0 → 0.78.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/buildkit/buildkit.d.ts +3 -3
- package/lib/buildkit/buildkit.js +67 -117
- package/lib/buildkit/buildkit.js.map +1 -1
- package/lib/buildkit/config.js +7 -14
- package/lib/buildkit/config.js.map +1 -1
- package/lib/buildkit/git.d.ts +1 -1
- package/lib/buildkit/git.js +8 -12
- package/lib/buildkit/git.js.map +1 -1
- package/lib/buildx/bake.d.ts +4 -4
- package/lib/buildx/bake.js +76 -93
- package/lib/buildx/bake.js.map +1 -1
- package/lib/buildx/build.d.ts +5 -5
- package/lib/buildx/build.js +44 -78
- package/lib/buildx/build.js.map +1 -1
- package/lib/buildx/builder.d.ts +2 -2
- package/lib/buildx/builder.js +42 -91
- package/lib/buildx/builder.js.map +1 -1
- package/lib/buildx/buildx.d.ts +3 -3
- package/lib/buildx/buildx.js +212 -274
- package/lib/buildx/buildx.js.map +1 -1
- package/lib/buildx/history.d.ts +2 -3
- package/lib/buildx/history.js +101 -296
- package/lib/buildx/history.js.map +1 -1
- package/lib/buildx/imagetools.d.ts +5 -5
- package/lib/buildx/imagetools.js +67 -92
- package/lib/buildx/imagetools.js.map +1 -1
- package/lib/buildx/install.d.ts +14 -3
- package/lib/buildx/install.js +239 -276
- package/lib/buildx/install.js.map +1 -1
- package/lib/cache.js +88 -138
- package/lib/cache.js.map +1 -1
- package/lib/compose/compose.js +53 -107
- package/lib/compose/compose.js.map +1 -1
- package/lib/compose/install.d.ts +2 -2
- package/lib/compose/install.js +129 -191
- package/lib/compose/install.js.map +1 -1
- package/lib/context.js +10 -50
- package/lib/context.js.map +1 -1
- package/lib/cosign/cosign.js +55 -106
- package/lib/cosign/cosign.js.map +1 -1
- package/lib/cosign/dockerfile.js +1 -4
- package/lib/cosign/dockerfile.js.map +1 -1
- package/lib/cosign/install.d.ts +6 -3
- package/lib/cosign/install.js +183 -261
- package/lib/cosign/install.js.map +1 -1
- package/lib/docker/assets.js +15 -24
- package/lib/docker/assets.js.map +1 -1
- package/lib/docker/docker.d.ts +1 -1
- package/lib/docker/docker.js +112 -182
- package/lib/docker/docker.js.map +1 -1
- package/lib/docker/install.d.ts +3 -3
- package/lib/docker/install.js +543 -617
- package/lib/docker/install.js.map +1 -1
- package/lib/dockerhub.d.ts +1 -1
- package/lib/dockerhub.js +67 -125
- package/lib/dockerhub.js.map +1 -1
- package/lib/exec.js +9 -59
- package/lib/exec.js.map +1 -1
- package/lib/git.d.ts +2 -1
- package/lib/git.js +144 -220
- package/lib/git.js.map +1 -1
- package/lib/github/artifact.d.ts +19 -0
- package/lib/github/artifact.js +49 -0
- package/lib/github/artifact.js.map +1 -0
- package/lib/{github.d.ts → github/github.d.ts} +4 -8
- package/lib/github/github.js +135 -0
- package/lib/github/github.js.map +1 -0
- package/lib/github/summary.d.ts +20 -0
- package/lib/github/summary.js +166 -0
- package/lib/github/summary.js.map +1 -0
- package/lib/index.js +17 -64
- package/lib/index.js.map +1 -1
- package/lib/oci/oci.d.ts +2 -2
- package/lib/oci/oci.js +52 -104
- package/lib/oci/oci.js.map +1 -1
- package/lib/regclient/install.d.ts +2 -2
- package/lib/regclient/install.js +83 -141
- package/lib/regclient/install.js.map +1 -1
- package/lib/regclient/regctl.d.ts +1 -1
- package/lib/regclient/regctl.js +67 -123
- package/lib/regclient/regctl.js.map +1 -1
- package/lib/sigstore/sigstore.d.ts +5 -3
- package/lib/sigstore/sigstore.js +355 -368
- package/lib/sigstore/sigstore.js.map +1 -1
- package/lib/toolkit.d.ts +16 -16
- package/lib/toolkit.js +49 -37
- package/lib/toolkit.js.map +1 -1
- package/lib/types/buildkit/buildkit.js +1 -4
- package/lib/types/buildkit/buildkit.js.map +1 -1
- package/lib/types/buildkit/client.d.ts +2 -2
- package/lib/types/buildkit/client.js +1 -2
- package/lib/types/buildkit/client.js.map +1 -1
- package/lib/types/buildkit/control.d.ts +4 -4
- package/lib/types/buildkit/control.js +1 -2
- package/lib/types/buildkit/control.js.map +1 -1
- package/lib/types/buildkit/git.js +1 -2
- package/lib/types/buildkit/git.js.map +1 -1
- package/lib/types/buildkit/ops.js +1 -2
- package/lib/types/buildkit/ops.js.map +1 -1
- package/lib/types/buildkit/rpc.js +1 -2
- package/lib/types/buildkit/rpc.js.map +1 -1
- package/lib/types/buildx/bake.js +1 -2
- package/lib/types/buildx/bake.js.map +1 -1
- package/lib/types/buildx/build.js +1 -2
- package/lib/types/buildx/build.js.map +1 -1
- package/lib/types/buildx/builder.js +1 -2
- package/lib/types/buildx/builder.js.map +1 -1
- package/lib/types/buildx/buildx.d.ts +1 -1
- package/lib/types/buildx/buildx.js +1 -2
- package/lib/types/buildx/buildx.js.map +1 -1
- package/lib/types/buildx/history.js +1 -2
- package/lib/types/buildx/history.js.map +1 -1
- package/lib/types/buildx/imagetools.d.ts +3 -3
- package/lib/types/buildx/imagetools.js +1 -2
- package/lib/types/buildx/imagetools.js.map +1 -1
- package/lib/types/compose/compose.d.ts +1 -1
- package/lib/types/compose/compose.js +1 -2
- package/lib/types/compose/compose.js.map +1 -1
- package/lib/types/cosign/cosign.d.ts +1 -1
- package/lib/types/cosign/cosign.js +1 -2
- package/lib/types/cosign/cosign.js.map +1 -1
- package/lib/types/docker/docker.js +1 -2
- package/lib/types/docker/docker.js.map +1 -1
- package/lib/types/docker/mediatype.js +3 -6
- package/lib/types/docker/mediatype.js.map +1 -1
- package/lib/types/dockerhub.js +1 -2
- package/lib/types/dockerhub.js.map +1 -1
- package/lib/types/github/artifact.d.ts +26 -0
- package/lib/types/{git.d.ts → github/artifact.js} +3 -3
- package/lib/types/github/artifact.js.map +1 -0
- package/lib/types/{github.d.ts → github/github.d.ts} +4 -23
- package/lib/types/{git.js → github/github.js} +2 -3
- package/lib/types/github/github.js.map +1 -0
- package/lib/types/github/summary.d.ts +29 -0
- package/lib/types/{github.js → github/summary.js} +3 -4
- package/lib/types/github/summary.js.map +1 -0
- package/lib/types/intoto/intoto.js +2 -5
- package/lib/types/intoto/intoto.js.map +1 -1
- package/lib/types/intoto/slsa_provenance/v0.2/provenance.js +1 -4
- package/lib/types/intoto/slsa_provenance/v0.2/provenance.js.map +1 -1
- package/lib/types/oci/config.d.ts +2 -2
- package/lib/types/oci/config.js +1 -2
- package/lib/types/oci/config.js.map +1 -1
- package/lib/types/oci/descriptor.d.ts +1 -1
- package/lib/types/oci/descriptor.js +3 -6
- package/lib/types/oci/descriptor.js.map +1 -1
- package/lib/types/oci/digest.js +1 -2
- package/lib/types/oci/digest.js.map +1 -1
- package/lib/types/oci/index.d.ts +2 -2
- package/lib/types/oci/index.js +1 -2
- package/lib/types/oci/index.js.map +1 -1
- package/lib/types/oci/layout.js +4 -7
- package/lib/types/oci/layout.js.map +1 -1
- package/lib/types/oci/manifest.d.ts +2 -2
- package/lib/types/oci/manifest.js +1 -2
- package/lib/types/oci/manifest.js.map +1 -1
- package/lib/types/oci/mediatype.js +6 -9
- package/lib/types/oci/mediatype.js.map +1 -1
- package/lib/types/oci/oci.d.ts +4 -4
- package/lib/types/oci/oci.js +1 -2
- package/lib/types/oci/oci.js.map +1 -1
- package/lib/types/oci/versioned.js +1 -2
- package/lib/types/oci/versioned.js.map +1 -1
- package/lib/types/regclient/regclient.d.ts +1 -1
- package/lib/types/regclient/regclient.js +1 -2
- package/lib/types/regclient/regclient.js.map +1 -1
- package/lib/types/sigstore/sigstore.d.ts +11 -2
- package/lib/types/sigstore/sigstore.js +4 -7
- package/lib/types/sigstore/sigstore.js.map +1 -1
- package/lib/types/undock/undock.d.ts +1 -1
- package/lib/types/undock/undock.js +1 -2
- package/lib/types/undock/undock.js.map +1 -1
- package/lib/undock/install.d.ts +2 -2
- package/lib/undock/install.js +93 -151
- package/lib/undock/install.js.map +1 -1
- package/lib/undock/undock.js +88 -141
- package/lib/undock/undock.js.map +1 -1
- package/lib/util.js +36 -89
- package/lib/util.js.map +1 -1
- package/package.json +31 -42
- package/lib/github.js +0 -421
- package/lib/github.js.map +0 -1
- package/lib/types/git.js.map +0 -1
- package/lib/types/github.js.map +0 -1
package/lib/buildx/imagetools.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* Copyright 2025 actions-toolkit authors
|
|
4
3
|
*
|
|
@@ -14,114 +13,90 @@
|
|
|
14
13
|
* See the License for the specific language governing permissions and
|
|
15
14
|
* limitations under the License.
|
|
16
15
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.ImageTools = void 0;
|
|
28
|
-
const buildx_1 = require("./buildx");
|
|
29
|
-
const exec_1 = require("../exec");
|
|
30
|
-
class ImageTools {
|
|
16
|
+
import { Buildx } from './buildx.js';
|
|
17
|
+
import { Exec } from '../exec.js';
|
|
18
|
+
export class ImageTools {
|
|
19
|
+
buildx;
|
|
31
20
|
constructor(opts) {
|
|
32
|
-
this.buildx =
|
|
21
|
+
this.buildx = opts?.buildx || new Buildx();
|
|
33
22
|
}
|
|
34
|
-
getCommand(args) {
|
|
35
|
-
return
|
|
36
|
-
return yield this.buildx.getCommand(['imagetools', ...args]);
|
|
37
|
-
});
|
|
23
|
+
async getCommand(args) {
|
|
24
|
+
return await this.buildx.getCommand(['imagetools', ...args]);
|
|
38
25
|
}
|
|
39
|
-
getInspectCommand(args) {
|
|
40
|
-
return
|
|
41
|
-
return yield this.getCommand(['inspect', ...args]);
|
|
42
|
-
});
|
|
26
|
+
async getInspectCommand(args) {
|
|
27
|
+
return await this.getCommand(['inspect', ...args]);
|
|
43
28
|
}
|
|
44
|
-
inspectImage(name) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
29
|
+
async inspectImage(name) {
|
|
30
|
+
const cmd = await this.getInspectCommand([name, '--format', '{{json .Image}}']);
|
|
31
|
+
return await Exec.getExecOutput(cmd.command, cmd.args, {
|
|
32
|
+
ignoreReturnCode: true,
|
|
33
|
+
silent: true
|
|
34
|
+
}).then(res => {
|
|
35
|
+
if (res.stderr.length > 0 && res.exitCode != 0) {
|
|
36
|
+
throw new Error(res.stderr.trim());
|
|
37
|
+
}
|
|
38
|
+
const parsedOutput = JSON.parse(res.stdout);
|
|
39
|
+
if (typeof parsedOutput === 'object' && !Array.isArray(parsedOutput) && parsedOutput !== null) {
|
|
40
|
+
if (Object.prototype.hasOwnProperty.call(parsedOutput, 'config')) {
|
|
41
|
+
return parsedOutput;
|
|
53
42
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if (Object.prototype.hasOwnProperty.call(parsedOutput, 'config')) {
|
|
57
|
-
return parsedOutput;
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
return parsedOutput;
|
|
61
|
-
}
|
|
43
|
+
else {
|
|
44
|
+
return parsedOutput;
|
|
62
45
|
}
|
|
63
|
-
|
|
64
|
-
|
|
46
|
+
}
|
|
47
|
+
throw new Error('Unexpected output format');
|
|
65
48
|
});
|
|
66
49
|
}
|
|
67
|
-
inspectManifest(name) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
50
|
+
async inspectManifest(name) {
|
|
51
|
+
const cmd = await this.getInspectCommand([name, '--format', '{{json .Manifest}}']);
|
|
52
|
+
return await Exec.getExecOutput(cmd.command, cmd.args, {
|
|
53
|
+
ignoreReturnCode: true,
|
|
54
|
+
silent: true
|
|
55
|
+
}).then(res => {
|
|
56
|
+
if (res.stderr.length > 0 && res.exitCode != 0) {
|
|
57
|
+
throw new Error(res.stderr.trim());
|
|
58
|
+
}
|
|
59
|
+
const parsedOutput = JSON.parse(res.stdout);
|
|
60
|
+
if (typeof parsedOutput === 'object' && !Array.isArray(parsedOutput) && parsedOutput !== null) {
|
|
61
|
+
if (Object.prototype.hasOwnProperty.call(parsedOutput, 'manifests')) {
|
|
62
|
+
return parsedOutput;
|
|
76
63
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (Object.prototype.hasOwnProperty.call(parsedOutput, 'manifests')) {
|
|
80
|
-
return parsedOutput;
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
return parsedOutput;
|
|
84
|
-
}
|
|
64
|
+
else {
|
|
65
|
+
return parsedOutput;
|
|
85
66
|
}
|
|
86
|
-
|
|
87
|
-
|
|
67
|
+
}
|
|
68
|
+
throw new Error('Unexpected output format');
|
|
88
69
|
});
|
|
89
70
|
}
|
|
90
|
-
attestationDescriptors(name, platform) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
71
|
+
async attestationDescriptors(name, platform) {
|
|
72
|
+
const manifest = await this.inspectManifest(name);
|
|
73
|
+
if (typeof manifest !== 'object' || manifest === null || !('manifests' in manifest) || !Array.isArray(manifest.manifests)) {
|
|
74
|
+
throw new Error(`No descriptor found for ${name}`);
|
|
75
|
+
}
|
|
76
|
+
const attestations = manifest.manifests.filter(m => m.annotations?.['vnd.docker.reference.type'] === 'attestation-manifest');
|
|
77
|
+
if (!platform) {
|
|
78
|
+
return attestations;
|
|
79
|
+
}
|
|
80
|
+
const manifestByDigest = new Map();
|
|
81
|
+
for (const m of manifest.manifests) {
|
|
82
|
+
if (m.digest) {
|
|
83
|
+
manifestByDigest.set(m.digest, m);
|
|
95
84
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
85
|
+
}
|
|
86
|
+
return attestations.filter(attestation => {
|
|
87
|
+
const refDigest = attestation.annotations?.['vnd.docker.reference.digest'];
|
|
88
|
+
if (!refDigest) {
|
|
89
|
+
return false;
|
|
99
90
|
}
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
manifestByDigest.set(m.digest, m);
|
|
104
|
-
}
|
|
91
|
+
const referencedManifest = manifestByDigest.get(refDigest);
|
|
92
|
+
if (!referencedManifest) {
|
|
93
|
+
return false;
|
|
105
94
|
}
|
|
106
|
-
return
|
|
107
|
-
var _a, _b, _c, _d, _e, _f;
|
|
108
|
-
const refDigest = (_a = attestation.annotations) === null || _a === void 0 ? void 0 : _a['vnd.docker.reference.digest'];
|
|
109
|
-
if (!refDigest) {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
const referencedManifest = manifestByDigest.get(refDigest);
|
|
113
|
-
if (!referencedManifest) {
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
return ((_b = referencedManifest.platform) === null || _b === void 0 ? void 0 : _b.os) === platform.os && ((_c = referencedManifest.platform) === null || _c === void 0 ? void 0 : _c.architecture) === platform.architecture && ((_e = (_d = referencedManifest.platform) === null || _d === void 0 ? void 0 : _d.variant) !== null && _e !== void 0 ? _e : '') === ((_f = platform.variant) !== null && _f !== void 0 ? _f : '');
|
|
117
|
-
});
|
|
95
|
+
return referencedManifest.platform?.os === platform.os && referencedManifest.platform?.architecture === platform.architecture && (referencedManifest.platform?.variant ?? '') === (platform.variant ?? '');
|
|
118
96
|
});
|
|
119
97
|
}
|
|
120
|
-
attestationDigests(name, platform) {
|
|
121
|
-
return
|
|
122
|
-
return (yield this.attestationDescriptors(name, platform)).map(attestation => attestation.digest);
|
|
123
|
-
});
|
|
98
|
+
async attestationDigests(name, platform) {
|
|
99
|
+
return (await this.attestationDescriptors(name, platform)).map(attestation => attestation.digest);
|
|
124
100
|
}
|
|
125
101
|
}
|
|
126
|
-
exports.ImageTools = ImageTools;
|
|
127
102
|
//# sourceMappingURL=imagetools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imagetools.js","sourceRoot":"","sources":["../../src/buildx/imagetools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"imagetools.js","sourceRoot":"","sources":["../../src/buildx/imagetools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAWhC,MAAM,OAAO,UAAU;IACJ,MAAM,CAAS;IAEhC,YAAY,IAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,IAAmB;QACzC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAC/D,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,IAAmB;QAChD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IACrD,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,IAAY;QACpC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,CAAC,IAAI,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC;QAChF,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,EAAE;YACrD,gBAAgB,EAAE,IAAI;YACtB,MAAM,EAAE,IAAI;SACb,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YACZ,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC;gBAC/C,MAAM,IAAI,KAAK,CAAC,GAAG,C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CAAC,EAAE;YACvC,MAAM,SAAS,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC,6BAA6B,CAAC,CAAC;YAC3E,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,OAAO,KAAK,CAAC;YACf,CAAC;YACD,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAC3D,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBACxB,OAAO,KAAK,CAAC;YACf,CAAC;YACD,OAAO,kBAAkB,CAAC,QAAQ,EAAE,EAAE,KAAK,QAAQ,CAAC,EAAE,IAAI,kBAAkB,CAAC,QAAQ,EAAE,YAAY,KAAK,QAAQ,CAAC,YAAY,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,OAAO,IAAI,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;QAC7M,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,IAAY,EAAE,QAAmB;QAC/D,OAAO,CAAC,MAAM,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACpG,CAAC;CACF"}
|
package/lib/buildx/install.d.ts
CHANGED
|
@@ -13,22 +13,33 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { Sigstore } from '../sigstore/sigstore.js';
|
|
17
|
+
import { DownloadVersion } from '../types/buildx/buildx.js';
|
|
18
|
+
import { GitHubRelease } from '../types/github/github.js';
|
|
19
|
+
export interface DownloadOpts {
|
|
20
|
+
version: string;
|
|
21
|
+
ghaNoCache?: boolean;
|
|
22
|
+
disableHtc?: boolean;
|
|
23
|
+
skipState?: boolean;
|
|
24
|
+
verifySignature?: boolean;
|
|
25
|
+
}
|
|
18
26
|
export interface InstallOpts {
|
|
19
27
|
standalone?: boolean;
|
|
20
28
|
githubToken?: string;
|
|
29
|
+
sigstore?: Sigstore;
|
|
21
30
|
}
|
|
22
31
|
export declare class Install {
|
|
23
32
|
private readonly standalone;
|
|
24
33
|
private readonly githubToken;
|
|
34
|
+
private readonly sigstore;
|
|
25
35
|
constructor(opts?: InstallOpts);
|
|
26
|
-
download(
|
|
36
|
+
download(opts: DownloadOpts): Promise<string>;
|
|
27
37
|
build(gitContext: string, ghaNoCache?: boolean): Promise<string>;
|
|
28
38
|
installStandalone(binPath: string, dest?: string): Promise<string>;
|
|
29
39
|
installPlugin(binPath: string, dest?: string): Promise<string>;
|
|
30
40
|
private buildCommand;
|
|
31
41
|
private isStandalone;
|
|
42
|
+
private verifySignature;
|
|
32
43
|
private filename;
|
|
33
44
|
private vspec;
|
|
34
45
|
static getDownloadVersion(v: string): Promise<DownloadVersion>;
|