A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/cli/commit/2521c9ba18172c2ade525cbe9a675d293a0484d9 below:

@sigstore/protobuf-specs@0.4.1 · npm/cli@2521c9b · GitHub

2 2

// Code generated by protoc-gen-ts_proto. DO NOT EDIT.

3 3

// versions:

4 4

// protoc-gen-ts_proto v2.6.1

5 -

// protoc v5.29.3

5 +

// protoc v5.29.4

6 6

// source: sigstore_trustroot.proto

7 7

Object.defineProperty(exports, "__esModule", { value: true });

8 -

exports.ClientTrustConfig = exports.SigningConfig = exports.TrustedRoot = exports.CertificateAuthority = exports.TransparencyLogInstance = void 0;

8 +

exports.ClientTrustConfig = exports.ServiceConfiguration = exports.Service = exports.SigningConfig = exports.TrustedRoot = exports.CertificateAuthority = exports.TransparencyLogInstance = exports.ServiceSelector = void 0;

9 +

exports.serviceSelectorFromJSON = serviceSelectorFromJSON;

10 +

exports.serviceSelectorToJSON = serviceSelectorToJSON;

9 11

/* eslint-disable */

10 12

const sigstore_common_1 = require("./sigstore_common");

13 +

/**

14 +

* ServiceSelector specifies how a client SHOULD select a set of

15 +

* Services to connect to. A client SHOULD throw an error if

16 +

* the value is SERVICE_SELECTOR_UNDEFINED.

17 +

*/

18 +

var ServiceSelector;

19 +

(function (ServiceSelector) {

20 +

ServiceSelector[ServiceSelector["SERVICE_SELECTOR_UNDEFINED"] = 0] = "SERVICE_SELECTOR_UNDEFINED";

21 +

/**

22 +

* ALL - Clients SHOULD select all Services based on supported API version

23 +

* and validity window.

24 +

*/

25 +

ServiceSelector[ServiceSelector["ALL"] = 1] = "ALL";

26 +

/**

27 +

* ANY - Clients SHOULD select one Service based on supported API version

28 +

* and validity window. It is up to the client implementation to

29 +

* decide how to select the Service, e.g. random or round-robin.

30 +

*/

31 +

ServiceSelector[ServiceSelector["ANY"] = 2] = "ANY";

32 +

/**

33 +

* EXACT - Clients SHOULD select a specific number of Services based on

34 +

* supported API version and validity window, using the provided

35 +

* `count`. It is up to the client implementation to decide how to

36 +

* select the Service, e.g. random or round-robin.

37 +

*/

38 +

ServiceSelector[ServiceSelector["EXACT"] = 3] = "EXACT";

39 +

})(ServiceSelector || (exports.ServiceSelector = ServiceSelector = {}));

40 +

function serviceSelectorFromJSON(object) {

41 +

switch (object) {

42 +

case 0:

43 +

case "SERVICE_SELECTOR_UNDEFINED":

44 +

return ServiceSelector.SERVICE_SELECTOR_UNDEFINED;

45 +

case 1:

46 +

case "ALL":

47 +

return ServiceSelector.ALL;

48 +

case 2:

49 +

case "ANY":

50 +

return ServiceSelector.ANY;

51 +

case 3:

52 +

case "EXACT":

53 +

return ServiceSelector.EXACT;

54 +

default:

55 +

throw new globalThis.Error("Unrecognized enum value " + object + " for enum ServiceSelector");

56 +

}

57 +

}

58 +

function serviceSelectorToJSON(object) {

59 +

switch (object) {

60 +

case ServiceSelector.SERVICE_SELECTOR_UNDEFINED:

61 +

return "SERVICE_SELECTOR_UNDEFINED";

62 +

case ServiceSelector.ALL:

63 +

return "ALL";

64 +

case ServiceSelector.ANY:

65 +

return "ANY";

66 +

case ServiceSelector.EXACT:

67 +

return "EXACT";

68 +

default:

69 +

throw new globalThis.Error("Unrecognized enum value " + object + " for enum ServiceSelector");

70 +

}

71 +

}

11 72

exports.TransparencyLogInstance = {

12 73

fromJSON(object) {

13 74

return {

@@ -106,28 +167,80 @@ exports.SigningConfig = {

106 167

fromJSON(object) {

107 168

return {

108 169

mediaType: isSet(object.mediaType) ? globalThis.String(object.mediaType) : "",

109 -

caUrl: isSet(object.caUrl) ? globalThis.String(object.caUrl) : "",

110 -

oidcUrl: isSet(object.oidcUrl) ? globalThis.String(object.oidcUrl) : "",

111 -

tlogUrls: globalThis.Array.isArray(object?.tlogUrls) ? object.tlogUrls.map((e) => globalThis.String(e)) : [],

112 -

tsaUrls: globalThis.Array.isArray(object?.tsaUrls) ? object.tsaUrls.map((e) => globalThis.String(e)) : [],

170 +

caUrls: globalThis.Array.isArray(object?.caUrls) ? object.caUrls.map((e) => exports.Service.fromJSON(e)) : [],

171 +

oidcUrls: globalThis.Array.isArray(object?.oidcUrls) ? object.oidcUrls.map((e) => exports.Service.fromJSON(e)) : [],

172 +

rekorTlogUrls: globalThis.Array.isArray(object?.rekorTlogUrls)

173 +

? object.rekorTlogUrls.map((e) => exports.Service.fromJSON(e))

174 +

: [],

175 +

rekorTlogConfig: isSet(object.rekorTlogConfig)

176 +

? exports.ServiceConfiguration.fromJSON(object.rekorTlogConfig)

177 +

: undefined,

178 +

tsaUrls: globalThis.Array.isArray(object?.tsaUrls) ? object.tsaUrls.map((e) => exports.Service.fromJSON(e)) : [],

179 +

tsaConfig: isSet(object.tsaConfig) ? exports.ServiceConfiguration.fromJSON(object.tsaConfig) : undefined,

113 180

};

114 181

},

115 182

toJSON(message) {

116 183

const obj = {};

117 184

if (message.mediaType !== "") {

118 185

obj.mediaType = message.mediaType;

119 186

}

120 -

if (message.caUrl !== "") {

121 -

obj.caUrl = message.caUrl;

187 +

if (message.caUrls?.length) {

188 +

obj.caUrls = message.caUrls.map((e) => exports.Service.toJSON(e));

189 +

}

190 +

if (message.oidcUrls?.length) {

191 +

obj.oidcUrls = message.oidcUrls.map((e) => exports.Service.toJSON(e));

122 192

}

123 -

if (message.oidcUrl !== "") {

124 -

obj.oidcUrl = message.oidcUrl;

193 +

if (message.rekorTlogUrls?.length) {

194 +

obj.rekorTlogUrls = message.rekorTlogUrls.map((e) => exports.Service.toJSON(e));

125 195

}

126 -

if (message.tlogUrls?.length) {

127 -

obj.tlogUrls = message.tlogUrls;

196 +

if (message.rekorTlogConfig !== undefined) {

197 +

obj.rekorTlogConfig = exports.ServiceConfiguration.toJSON(message.rekorTlogConfig);

128 198

}

129 199

if (message.tsaUrls?.length) {

130 -

obj.tsaUrls = message.tsaUrls;

200 +

obj.tsaUrls = message.tsaUrls.map((e) => exports.Service.toJSON(e));

201 +

}

202 +

if (message.tsaConfig !== undefined) {

203 +

obj.tsaConfig = exports.ServiceConfiguration.toJSON(message.tsaConfig);

204 +

}

205 +

return obj;

206 +

},

207 +

};

208 +

exports.Service = {

209 +

fromJSON(object) {

210 +

return {

211 +

url: isSet(object.url) ? globalThis.String(object.url) : "",

212 +

majorApiVersion: isSet(object.majorApiVersion) ? globalThis.Number(object.majorApiVersion) : 0,

213 +

validFor: isSet(object.validFor) ? sigstore_common_1.TimeRange.fromJSON(object.validFor) : undefined,

214 +

};

215 +

},

216 +

toJSON(message) {

217 +

const obj = {};

218 +

if (message.url !== "") {

219 +

obj.url = message.url;

220 +

}

221 +

if (message.majorApiVersion !== 0) {

222 +

obj.majorApiVersion = Math.round(message.majorApiVersion);

223 +

}

224 +

if (message.validFor !== undefined) {

225 +

obj.validFor = sigstore_common_1.TimeRange.toJSON(message.validFor);

226 +

}

227 +

return obj;

228 +

},

229 +

};

230 +

exports.ServiceConfiguration = {

231 +

fromJSON(object) {

232 +

return {

233 +

selector: isSet(object.selector) ? serviceSelectorFromJSON(object.selector) : 0,

234 +

count: isSet(object.count) ? globalThis.Number(object.count) : 0,

235 +

};

236 +

},

237 +

toJSON(message) {

238 +

const obj = {};

239 +

if (message.selector !== 0) {

240 +

obj.selector = serviceSelectorToJSON(message.selector);

241 +

}

242 +

if (message.count !== 0) {

243 +

obj.count = Math.round(message.count);

131 244

}

132 245

return obj;

133 246

},


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4