Skip to content

Commit b74a2a7

Browse files
committed
separate fixup from conversion
1 parent b3ae74e commit b74a2a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4773
-755
lines changed

src/buf.gen.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ plugins:
1010
- plugin: buf.build/bufbuild/connect-go
1111
out: protos
1212
opt: paths=source_relative
13+
- plugin: buf.build/connectrpc/es:v1.4.0
14+
out: gen
15+
# dependencies
16+
- plugin: buf.build/bufbuild/es
17+
out: gen

src/gen/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

src/gen/index.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/gen/index.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/gen/index.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import * as pb from './io/defang/v1/fabric_pb.js';
2+
3+
const update = pb.ProjectUpdate.fromJsonString('{"compose":{"services":{"web":{"image":"nginx"}}}}');
4+
5+
interface Service {
6+
image: string;
7+
}
8+
9+
interface Project {
10+
name?: string;
11+
services: { [name: string]: Service };
12+
}
13+
14+
const project = update.compose?.toJson()?.valueOf() as Project;
15+
console.log(project);
Lines changed: 295 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,295 @@
1+
// protos/v1/fabric.proto
2+
3+
// @generated by protoc-gen-connect-es v1.4.0
4+
// @generated from file io/defang/v1/fabric.proto (package io.defang.v1, syntax proto3)
5+
/* eslint-disable */
6+
// @ts-nocheck
7+
8+
import { Empty, MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
9+
import { DebugRequest, DebugResponse, DelegateSubdomainZoneRequest, DelegateSubdomainZoneResponse, DeleteRequest, DeleteResponse, DeployRequest, DeployResponse, GenerateFilesRequest, GenerateFilesResponse, GenerateStatusRequest, ListServicesResponse, PublishRequest, RestartRequest, Secrets, SecretValue, Service, ServiceID, ServiceInfo, StartGenerateResponse, Status, SubscribeRequest, SubscribeResponse, TailRequest, TailResponse, TokenRequest, TokenResponse, TrackRequest, UploadURLRequest, UploadURLResponse, Version, WhoAmIResponse } from "./fabric_pb.js";
10+
11+
/**
12+
* @generated from service io.defang.v1.FabricController
13+
*/
14+
export declare const FabricController: {
15+
readonly typeName: "io.defang.v1.FabricController",
16+
readonly methods: {
17+
/**
18+
* @generated from rpc io.defang.v1.FabricController.GetStatus
19+
*/
20+
readonly getStatus: {
21+
readonly name: "GetStatus",
22+
readonly I: typeof Empty,
23+
readonly O: typeof Status,
24+
readonly kind: MethodKind.Unary,
25+
readonly idempotency: MethodIdempotency.NoSideEffects,
26+
},
27+
/**
28+
* @generated from rpc io.defang.v1.FabricController.GetVersion
29+
*/
30+
readonly getVersion: {
31+
readonly name: "GetVersion",
32+
readonly I: typeof Empty,
33+
readonly O: typeof Version,
34+
readonly kind: MethodKind.Unary,
35+
readonly idempotency: MethodIdempotency.NoSideEffects,
36+
},
37+
/**
38+
* public
39+
*
40+
* @generated from rpc io.defang.v1.FabricController.Token
41+
*/
42+
readonly token: {
43+
readonly name: "Token",
44+
readonly I: typeof TokenRequest,
45+
readonly O: typeof TokenResponse,
46+
readonly kind: MethodKind.Unary,
47+
},
48+
/**
49+
* @generated from rpc io.defang.v1.FabricController.RevokeToken
50+
*/
51+
readonly revokeToken: {
52+
readonly name: "RevokeToken",
53+
readonly I: typeof Empty,
54+
readonly O: typeof Empty,
55+
readonly kind: MethodKind.Unary,
56+
},
57+
/**
58+
* @generated from rpc io.defang.v1.FabricController.Tail
59+
*/
60+
readonly tail: {
61+
readonly name: "Tail",
62+
readonly I: typeof TailRequest,
63+
readonly O: typeof TailResponse,
64+
readonly kind: MethodKind.ServerStreaming,
65+
},
66+
/**
67+
* @generated from rpc io.defang.v1.FabricController.Update
68+
* @deprecated
69+
*/
70+
readonly update: {
71+
readonly name: "Update",
72+
readonly I: typeof Service,
73+
readonly O: typeof ServiceInfo,
74+
readonly kind: MethodKind.Unary,
75+
},
76+
/**
77+
* @generated from rpc io.defang.v1.FabricController.Deploy
78+
*/
79+
readonly deploy: {
80+
readonly name: "Deploy",
81+
readonly I: typeof DeployRequest,
82+
readonly O: typeof DeployResponse,
83+
readonly kind: MethodKind.Unary,
84+
},
85+
/**
86+
* @generated from rpc io.defang.v1.FabricController.Get
87+
*/
88+
readonly get: {
89+
readonly name: "Get",
90+
readonly I: typeof ServiceID,
91+
readonly O: typeof ServiceInfo,
92+
readonly kind: MethodKind.Unary,
93+
readonly idempotency: MethodIdempotency.NoSideEffects,
94+
},
95+
/**
96+
* @generated from rpc io.defang.v1.FabricController.Delete
97+
* @deprecated
98+
*/
99+
readonly delete: {
100+
readonly name: "Delete",
101+
readonly I: typeof DeleteRequest,
102+
readonly O: typeof DeleteResponse,
103+
readonly kind: MethodKind.Unary,
104+
},
105+
/**
106+
* @generated from rpc io.defang.v1.FabricController.Publish
107+
*/
108+
readonly publish: {
109+
readonly name: "Publish",
110+
readonly I: typeof PublishRequest,
111+
readonly O: typeof Empty,
112+
readonly kind: MethodKind.Unary,
113+
},
114+
/**
115+
* @generated from rpc io.defang.v1.FabricController.Subscribe
116+
*/
117+
readonly subscribe: {
118+
readonly name: "Subscribe",
119+
readonly I: typeof SubscribeRequest,
120+
readonly O: typeof SubscribeResponse,
121+
readonly kind: MethodKind.ServerStreaming,
122+
},
123+
/**
124+
* rpc Promote(google.protobuf.Empty) returns (google.protobuf.Empty);
125+
*
126+
* @generated from rpc io.defang.v1.FabricController.GetServices
127+
*/
128+
readonly getServices: {
129+
readonly name: "GetServices",
130+
readonly I: typeof Empty,
131+
readonly O: typeof ListServicesResponse,
132+
readonly kind: MethodKind.Unary,
133+
readonly idempotency: MethodIdempotency.NoSideEffects,
134+
},
135+
/**
136+
* rpc Start(ServiceID) returns (google.protobuf.Empty);
137+
* rpc Stop(ServiceID) returns (google.protobuf.Empty);
138+
*
139+
* @generated from rpc io.defang.v1.FabricController.Restart
140+
*/
141+
readonly restart: {
142+
readonly name: "Restart",
143+
readonly I: typeof RestartRequest,
144+
readonly O: typeof Empty,
145+
readonly kind: MethodKind.Unary,
146+
},
147+
/**
148+
* deprecated; use StartGenerate/GenerateStatus
149+
*
150+
* @generated from rpc io.defang.v1.FabricController.GenerateFiles
151+
*/
152+
readonly generateFiles: {
153+
readonly name: "GenerateFiles",
154+
readonly I: typeof GenerateFilesRequest,
155+
readonly O: typeof GenerateFilesResponse,
156+
readonly kind: MethodKind.Unary,
157+
},
158+
/**
159+
* @generated from rpc io.defang.v1.FabricController.StartGenerate
160+
*/
161+
readonly startGenerate: {
162+
readonly name: "StartGenerate",
163+
readonly I: typeof GenerateFilesRequest,
164+
readonly O: typeof StartGenerateResponse,
165+
readonly kind: MethodKind.Unary,
166+
},
167+
/**
168+
* @generated from rpc io.defang.v1.FabricController.GenerateStatus
169+
*/
170+
readonly generateStatus: {
171+
readonly name: "GenerateStatus",
172+
readonly I: typeof GenerateStatusRequest,
173+
readonly O: typeof GenerateFilesResponse,
174+
readonly kind: MethodKind.Unary,
175+
readonly idempotency: MethodIdempotency.NoSideEffects,
176+
},
177+
/**
178+
* TEST
179+
*
180+
* @generated from rpc io.defang.v1.FabricController.Debug
181+
*/
182+
readonly debug: {
183+
readonly name: "Debug",
184+
readonly I: typeof DebugRequest,
185+
readonly O: typeof DebugResponse,
186+
readonly kind: MethodKind.Unary,
187+
},
188+
/**
189+
* AgreeToS
190+
*
191+
* @generated from rpc io.defang.v1.FabricController.SignEULA
192+
*/
193+
readonly signEULA: {
194+
readonly name: "SignEULA",
195+
readonly I: typeof Empty,
196+
readonly O: typeof Empty,
197+
readonly kind: MethodKind.Unary,
198+
},
199+
/**
200+
* @generated from rpc io.defang.v1.FabricController.CheckToS
201+
*/
202+
readonly checkToS: {
203+
readonly name: "CheckToS",
204+
readonly I: typeof Empty,
205+
readonly O: typeof Empty,
206+
readonly kind: MethodKind.Unary,
207+
readonly idempotency: MethodIdempotency.NoSideEffects,
208+
},
209+
/**
210+
* @generated from rpc io.defang.v1.FabricController.PutSecret
211+
*/
212+
readonly putSecret: {
213+
readonly name: "PutSecret",
214+
readonly I: typeof SecretValue,
215+
readonly O: typeof Empty,
216+
readonly kind: MethodKind.Unary,
217+
},
218+
/**
219+
* @generated from rpc io.defang.v1.FabricController.DeleteSecrets
220+
*/
221+
readonly deleteSecrets: {
222+
readonly name: "DeleteSecrets",
223+
readonly I: typeof Secrets,
224+
readonly O: typeof Empty,
225+
readonly kind: MethodKind.Unary,
226+
},
227+
/**
228+
* @generated from rpc io.defang.v1.FabricController.ListSecrets
229+
*/
230+
readonly listSecrets: {
231+
readonly name: "ListSecrets",
232+
readonly I: typeof Empty,
233+
readonly O: typeof Secrets,
234+
readonly kind: MethodKind.Unary,
235+
readonly idempotency: MethodIdempotency.NoSideEffects,
236+
},
237+
/**
238+
* @generated from rpc io.defang.v1.FabricController.CreateUploadURL
239+
*/
240+
readonly createUploadURL: {
241+
readonly name: "CreateUploadURL",
242+
readonly I: typeof UploadURLRequest,
243+
readonly O: typeof UploadURLResponse,
244+
readonly kind: MethodKind.Unary,
245+
},
246+
/**
247+
* @generated from rpc io.defang.v1.FabricController.DelegateSubdomainZone
248+
*/
249+
readonly delegateSubdomainZone: {
250+
readonly name: "DelegateSubdomainZone",
251+
readonly I: typeof DelegateSubdomainZoneRequest,
252+
readonly O: typeof DelegateSubdomainZoneResponse,
253+
readonly kind: MethodKind.Unary,
254+
},
255+
/**
256+
* @generated from rpc io.defang.v1.FabricController.DeleteSubdomainZone
257+
*/
258+
readonly deleteSubdomainZone: {
259+
readonly name: "DeleteSubdomainZone",
260+
readonly I: typeof Empty,
261+
readonly O: typeof Empty,
262+
readonly kind: MethodKind.Unary,
263+
},
264+
/**
265+
* @generated from rpc io.defang.v1.FabricController.GetDelegateSubdomainZone
266+
*/
267+
readonly getDelegateSubdomainZone: {
268+
readonly name: "GetDelegateSubdomainZone",
269+
readonly I: typeof Empty,
270+
readonly O: typeof DelegateSubdomainZoneResponse,
271+
readonly kind: MethodKind.Unary,
272+
readonly idempotency: MethodIdempotency.NoSideEffects,
273+
},
274+
/**
275+
* @generated from rpc io.defang.v1.FabricController.WhoAmI
276+
*/
277+
readonly whoAmI: {
278+
readonly name: "WhoAmI",
279+
readonly I: typeof Empty,
280+
readonly O: typeof WhoAmIResponse,
281+
readonly kind: MethodKind.Unary,
282+
readonly idempotency: MethodIdempotency.NoSideEffects,
283+
},
284+
/**
285+
* @generated from rpc io.defang.v1.FabricController.Track
286+
*/
287+
readonly track: {
288+
readonly name: "Track",
289+
readonly I: typeof TrackRequest,
290+
readonly O: typeof Empty,
291+
readonly kind: MethodKind.Unary,
292+
},
293+
}
294+
};
295+

0 commit comments

Comments
 (0)