Skip to content

Commit e224ebd

Browse files
authored
Merge pull request #59 from gtardif/sync_v1.0.9
Sync with compose-cli v1.0.9.
2 parents e20ba7c + 09d6d3a commit e224ebd

File tree

10 files changed

+82
-11
lines changed

10 files changed

+82
-11
lines changed

scripts/download-protos.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,19 @@ const get = async (p: string) => {
3636
}
3737

3838
if (p.endsWith('.proto')) {
39-
console.log(`Downloading ${response.data.path}`);
40-
const dir = path.dirname(response.data.path);
39+
const targetFile = response.data.path.replace("cli/server/protos", "protos")
40+
console.log(`Downloading ${response.data.path} to ${targetFile}`);
41+
const dir = path.dirname(targetFile);
4142
fs.mkdirSync(`src/${dir}`, { recursive: true });
4243
const buffer = Buffer.from(response.data.content, 'base64');
4344
const data = Readable.from(buffer.toString('ascii'));
44-
data.pipe(fs.createWriteStream(`src/${p}`));
45+
data.pipe(fs.createWriteStream(`src/${targetFile}`));
4546
}
4647
} catch (e) {
4748
console.error(e);
4849
}
4950
};
5051

5152
(async function () {
52-
get('protos');
53+
get('cli/server/protos');
5354
})();

src/protos/compose/v1/compose.proto

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ syntax = "proto3";
1717

1818
package com.docker.api.protos.compose.v1;
1919

20-
option go_package = "github.com/docker/compose-cli/protos/compose/v1;v1";
20+
option go_package = "github.com/docker/compose-cli/cli/server/protos/compose/v1;v1";
2121

2222
service Compose {
2323
rpc Up(ComposeUpRequest) returns (ComposeUpResponse);
@@ -48,6 +48,7 @@ message ComposeDownResponse {
4848

4949
message ComposeStacksRequest {
5050
string projectName = 1;
51+
bool all = 2;
5152
}
5253

5354
message ComposeStacksResponse {

src/protos/compose/v1/compose_pb.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ export class ComposeStacksRequest extends jspb.Message {
114114
getProjectname(): string;
115115
setProjectname(value: string): ComposeStacksRequest;
116116

117+
getAll(): boolean;
118+
setAll(value: boolean): ComposeStacksRequest;
119+
117120

118121
serializeBinary(): Uint8Array;
119122
toObject(includeInstance?: boolean): ComposeStacksRequest.AsObject;
@@ -128,6 +131,7 @@ export class ComposeStacksRequest extends jspb.Message {
128131
export namespace ComposeStacksRequest {
129132
export type AsObject = {
130133
projectname: string,
134+
all: boolean,
131135
}
132136
}
133137

src/protos/compose/v1/compose_pb.js

+31-1
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,8 @@ proto.com.docker.api.protos.compose.v1.ComposeStacksRequest.prototype.toObject =
956956
*/
957957
proto.com.docker.api.protos.compose.v1.ComposeStacksRequest.toObject = function(includeInstance, msg) {
958958
var f, obj = {
959-
projectname: jspb.Message.getFieldWithDefault(msg, 1, "")
959+
projectname: jspb.Message.getFieldWithDefault(msg, 1, ""),
960+
all: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
960961
};
961962

962963
if (includeInstance) {
@@ -997,6 +998,10 @@ proto.com.docker.api.protos.compose.v1.ComposeStacksRequest.deserializeBinaryFro
997998
var value = /** @type {string} */ (reader.readString());
998999
msg.setProjectname(value);
9991000
break;
1001+
case 2:
1002+
var value = /** @type {boolean} */ (reader.readBool());
1003+
msg.setAll(value);
1004+
break;
10001005
default:
10011006
reader.skipField();
10021007
break;
@@ -1033,6 +1038,13 @@ proto.com.docker.api.protos.compose.v1.ComposeStacksRequest.serializeBinaryToWri
10331038
f
10341039
);
10351040
}
1041+
f = message.getAll();
1042+
if (f) {
1043+
writer.writeBool(
1044+
2,
1045+
f
1046+
);
1047+
}
10361048
};
10371049

10381050

@@ -1054,6 +1066,24 @@ proto.com.docker.api.protos.compose.v1.ComposeStacksRequest.prototype.setProject
10541066
};
10551067

10561068

1069+
/**
1070+
* optional bool all = 2;
1071+
* @return {boolean}
1072+
*/
1073+
proto.com.docker.api.protos.compose.v1.ComposeStacksRequest.prototype.getAll = function() {
1074+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
1075+
};
1076+
1077+
1078+
/**
1079+
* @param {boolean} value
1080+
* @return {!proto.com.docker.api.protos.compose.v1.ComposeStacksRequest} returns this
1081+
*/
1082+
proto.com.docker.api.protos.compose.v1.ComposeStacksRequest.prototype.setAll = function(value) {
1083+
return jspb.Message.setProto3BooleanField(this, 2, value);
1084+
};
1085+
1086+
10571087

10581088
/**
10591089
* List of repeated fields within this message type.

src/protos/containers/v1/containers.proto

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ syntax = "proto3";
1717

1818
package com.docker.api.protos.containers.v1;
1919

20-
option go_package = "github.com/docker/compose-cli/protos/containers/v1;v1";
20+
option go_package = "github.com/docker/compose-cli/cli/server/protos/containers/v1;v1";
2121

2222
service Containers {
2323
rpc List(ListRequest) returns (ListResponse);
@@ -121,6 +121,7 @@ message RunRequest {
121121
repeated string environment = 10;
122122
bool auto_remove = 11;
123123
Healthcheck healthcheck = 12;
124+
string platform = 13;
124125
}
125126

126127
message RunResponse {

src/protos/containers/v1/containers_pb.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,9 @@ export class RunRequest extends jspb.Message {
448448
getHealthcheck(): Healthcheck | undefined;
449449
setHealthcheck(value?: Healthcheck): RunRequest;
450450

451+
getPlatform(): string;
452+
setPlatform(value: string): RunRequest;
453+
451454

452455
serializeBinary(): Uint8Array;
453456
toObject(includeInstance?: boolean): RunRequest.AsObject;
@@ -474,6 +477,7 @@ export namespace RunRequest {
474477
environmentList: Array<string>,
475478
autoRemove: boolean,
476479
healthcheck?: Healthcheck.AsObject,
480+
platform: string,
477481
}
478482
}
479483

src/protos/containers/v1/containers_pb.js

+31-1
Original file line numberDiff line numberDiff line change
@@ -3139,7 +3139,8 @@ proto.com.docker.api.protos.containers.v1.RunRequest.toObject = function(include
31393139
commandList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f,
31403140
environmentList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f,
31413141
autoRemove: jspb.Message.getBooleanFieldWithDefault(msg, 11, false),
3142-
healthcheck: (f = msg.getHealthcheck()) && proto.com.docker.api.protos.containers.v1.Healthcheck.toObject(includeInstance, f)
3142+
healthcheck: (f = msg.getHealthcheck()) && proto.com.docker.api.protos.containers.v1.Healthcheck.toObject(includeInstance, f),
3143+
platform: jspb.Message.getFieldWithDefault(msg, 13, "")
31433144
};
31443145

31453146
if (includeInstance) {
@@ -3228,6 +3229,10 @@ proto.com.docker.api.protos.containers.v1.RunRequest.deserializeBinaryFromReader
32283229
reader.readMessage(value,proto.com.docker.api.protos.containers.v1.Healthcheck.deserializeBinaryFromReader);
32293230
msg.setHealthcheck(value);
32303231
break;
3232+
case 13:
3233+
var value = /** @type {string} */ (reader.readString());
3234+
msg.setPlatform(value);
3235+
break;
32313236
default:
32323237
reader.skipField();
32333238
break;
@@ -3340,6 +3345,13 @@ proto.com.docker.api.protos.containers.v1.RunRequest.serializeBinaryToWriter = f
33403345
proto.com.docker.api.protos.containers.v1.Healthcheck.serializeBinaryToWriter
33413346
);
33423347
}
3348+
f = message.getPlatform();
3349+
if (f.length > 0) {
3350+
writer.writeString(
3351+
13,
3352+
f
3353+
);
3354+
}
33433355
};
33443356

33453357

@@ -3659,6 +3671,24 @@ proto.com.docker.api.protos.containers.v1.RunRequest.prototype.hasHealthcheck =
36593671
};
36603672

36613673

3674+
/**
3675+
* optional string platform = 13;
3676+
* @return {string}
3677+
*/
3678+
proto.com.docker.api.protos.containers.v1.RunRequest.prototype.getPlatform = function() {
3679+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
3680+
};
3681+
3682+
3683+
/**
3684+
* @param {string} value
3685+
* @return {!proto.com.docker.api.protos.containers.v1.RunRequest} returns this
3686+
*/
3687+
proto.com.docker.api.protos.containers.v1.RunRequest.prototype.setPlatform = function(value) {
3688+
return jspb.Message.setProto3StringField(this, 13, value);
3689+
};
3690+
3691+
36623692

36633693

36643694

src/protos/contexts/v1/contexts.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ syntax = "proto3";
1717

1818
package com.docker.api.protos.context.v1;
1919

20-
option go_package = "github.com/docker/compose-cli/protos/context/v1;v1";
20+
option go_package = "github.com/docker/compose-cli/cli/server/protos/context/v1;v1";
2121

2222
service Contexts {
2323
// Sets the current request for all calls

src/protos/streams/v1/streams.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package com.docker.api.protos.streams.v1;
1919

2020
import "google/protobuf/any.proto";
2121

22-
option go_package = "github.com/docker/compose-cli/protos/streams/v1;v1";
22+
option go_package = "github.com/docker/compose-cli/cli/server/protos/streams/v1;v1";
2323

2424
service Streaming {
2525
rpc NewStream(stream google.protobuf.Any) returns (stream google.protobuf.Any);

src/protos/volumes/v1/volumes.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package com.docker.api.protos.volumes.v1;
1919

2020
import "google/protobuf/any.proto";
2121

22-
option go_package = "github.com/docker/compose-cli/protos/volumes/v1;v1";
22+
option go_package = "github.com/docker/compose-cli/cli/server/protos/volumes/v1;v1";
2323

2424
service Volumes {
2525
rpc VolumesCreate(VolumesCreateRequest) returns (VolumesCreateResponse);

0 commit comments

Comments
 (0)