From 7efef85b7df8a70b8acaf7d3ad0d2be8ffa7291b Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Wed, 2 Oct 2024 11:44:46 +1000 Subject: [PATCH] remove mistaken files --- .../languagepbconnect/language.connect.go | 276 ------- .../ftl/v1/language.go/language_connect.ts | 98 --- .../block/ftl/v1/language.go/language_pb.ts | 770 ------------------ 3 files changed, 1144 deletions(-) delete mode 100644 backend/protos/xyz/block/ftl/v1/language/languagepbconnect/language.connect.go delete mode 100644 frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_connect.ts delete mode 100644 frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_pb.ts diff --git a/backend/protos/xyz/block/ftl/v1/language/languagepbconnect/language.connect.go b/backend/protos/xyz/block/ftl/v1/language/languagepbconnect/language.connect.go deleted file mode 100644 index ca2b3445fe..0000000000 --- a/backend/protos/xyz/block/ftl/v1/language/languagepbconnect/language.connect.go +++ /dev/null @@ -1,276 +0,0 @@ -// Code generated by protoc-gen-connect-go. DO NOT EDIT. -// -// Source: xyz/block/ftl/v1/language.go/language.proto - -package languagepbconnect - -import ( - connect "connectrpc.com/connect" - context "context" - errors "errors" - v1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" - language "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/language" - http "net/http" - strings "strings" -) - -// This is a compile-time assertion to ensure that this generated file and the connect package are -// compatible. If you get a compiler error that this constant is not defined, this code was -// generated with a version of connect newer than the one compiled into your binary. You can fix the -// problem by either regenerating this code with an older version of connect or updating the connect -// version compiled into your binary. -const _ = connect.IsAtLeastVersion1_7_0 - -const ( - // LanguageServiceName is the fully-qualified name of the LanguageService service. - LanguageServiceName = "xyz.block.ftl.v1.language.LanguageService" -) - -// These constants are the fully-qualified names of the RPCs defined in this package. They're -// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. -// -// Note that these are different from the fully-qualified method names used by -// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to -// reflection-formatted method names, remove the leading slash and convert the remaining slash to a -// period. -const ( - // LanguageServicePingProcedure is the fully-qualified name of the LanguageService's Ping RPC. - LanguageServicePingProcedure = "/xyz.block.ftl.v1.language.LanguageService/Ping" - // LanguageServiceCreateModuleProcedure is the fully-qualified name of the LanguageService's - // CreateModule RPC. - LanguageServiceCreateModuleProcedure = "/xyz.block.ftl.v1.language.LanguageService/CreateModule" - // LanguageServiceGetDependenciesProcedure is the fully-qualified name of the LanguageService's - // GetDependencies RPC. - LanguageServiceGetDependenciesProcedure = "/xyz.block.ftl.v1.language.LanguageService/GetDependencies" - // LanguageServiceMetadataUpdatedProcedure is the fully-qualified name of the LanguageService's - // MetadataUpdated RPC. - LanguageServiceMetadataUpdatedProcedure = "/xyz.block.ftl.v1.language.LanguageService/MetadataUpdated" - // LanguageServiceSchemaUpdatedProcedure is the fully-qualified name of the LanguageService's - // SchemaUpdated RPC. - LanguageServiceSchemaUpdatedProcedure = "/xyz.block.ftl.v1.language.LanguageService/SchemaUpdated" - // LanguageServiceBuildProcedure is the fully-qualified name of the LanguageService's Build RPC. - LanguageServiceBuildProcedure = "/xyz.block.ftl.v1.language.LanguageService/Build" -) - -// LanguageServiceClient is a client for the xyz.block.ftl.v1.language.LanguageService service. -type LanguageServiceClient interface { - // Ping service for readiness. - Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) - // Generates files for a new empty module with the requested name - CreateModule(context.Context, *connect.Request[language.CreateModuleRequest]) (*connect.Response[language.CreateModuleResponse], error) - // Extract dependencies for a module - GetDependencies(context.Context, *connect.Request[language.DependenciesRequest]) (*connect.Response[language.DependenciesResponse], error) - // MetadataUpdated is called whenever the metadata for a module is updated. - MetadataUpdated(context.Context, *connect.Request[language.MetadataUpdatedRequest]) (*connect.Response[language.MetadataUpdatedResponse], error) - // SchemaUpdated is called whenever the relevant part of a schema is updated. - // - // The schema is not the full schema, rather it only modules in this module's dependency graph. - // It does not contain the schema for this plugin's module. - // - // Language plugins should hold on to the latest schema they have seen. - // SchemaUpdated is called: - // - after ExtractDependencies and before Build (if there are any dependencies) - // - when a dependant module is updated - // - when the module's dependancies change - SchemaUpdated(context.Context, *connect.Request[language.SchemaUpdatedRequest]) (*connect.Response[language.SchemaUpdatedResponse], error) - // Build the module - // The request can also indicate whether the plugin should watch for changes to the module and automatically rebuild - // The response stream can send LogMessages and BuildResults, and ends with a BuildResponse - Build(context.Context, *connect.Request[language.BuildRequest]) (*connect.ServerStreamForClient[language.BuildEvent], error) -} - -// NewLanguageServiceClient constructs a client for the xyz.block.ftl.v1.language.LanguageService -// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for -// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply -// the connect.WithGRPC() or connect.WithGRPCWeb() options. -// -// The URL supplied here should be the base URL for the Connect or gRPC server (for example, -// http://api.acme.com or https://acme.com/grpc). -func NewLanguageServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) LanguageServiceClient { - baseURL = strings.TrimRight(baseURL, "/") - return &languageServiceClient{ - ping: connect.NewClient[v1.PingRequest, v1.PingResponse]( - httpClient, - baseURL+LanguageServicePingProcedure, - connect.WithIdempotency(connect.IdempotencyNoSideEffects), - connect.WithClientOptions(opts...), - ), - createModule: connect.NewClient[language.CreateModuleRequest, language.CreateModuleResponse]( - httpClient, - baseURL+LanguageServiceCreateModuleProcedure, - opts..., - ), - getDependencies: connect.NewClient[language.DependenciesRequest, language.DependenciesResponse]( - httpClient, - baseURL+LanguageServiceGetDependenciesProcedure, - opts..., - ), - metadataUpdated: connect.NewClient[language.MetadataUpdatedRequest, language.MetadataUpdatedResponse]( - httpClient, - baseURL+LanguageServiceMetadataUpdatedProcedure, - opts..., - ), - schemaUpdated: connect.NewClient[language.SchemaUpdatedRequest, language.SchemaUpdatedResponse]( - httpClient, - baseURL+LanguageServiceSchemaUpdatedProcedure, - opts..., - ), - build: connect.NewClient[language.BuildRequest, language.BuildEvent]( - httpClient, - baseURL+LanguageServiceBuildProcedure, - opts..., - ), - } -} - -// languageServiceClient implements LanguageServiceClient. -type languageServiceClient struct { - ping *connect.Client[v1.PingRequest, v1.PingResponse] - createModule *connect.Client[language.CreateModuleRequest, language.CreateModuleResponse] - getDependencies *connect.Client[language.DependenciesRequest, language.DependenciesResponse] - metadataUpdated *connect.Client[language.MetadataUpdatedRequest, language.MetadataUpdatedResponse] - schemaUpdated *connect.Client[language.SchemaUpdatedRequest, language.SchemaUpdatedResponse] - build *connect.Client[language.BuildRequest, language.BuildEvent] -} - -// Ping calls xyz.block.ftl.v1.language.LanguageService.Ping. -func (c *languageServiceClient) Ping(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { - return c.ping.CallUnary(ctx, req) -} - -// CreateModule calls xyz.block.ftl.v1.language.LanguageService.CreateModule. -func (c *languageServiceClient) CreateModule(ctx context.Context, req *connect.Request[language.CreateModuleRequest]) (*connect.Response[language.CreateModuleResponse], error) { - return c.createModule.CallUnary(ctx, req) -} - -// GetDependencies calls xyz.block.ftl.v1.language.LanguageService.GetDependencies. -func (c *languageServiceClient) GetDependencies(ctx context.Context, req *connect.Request[language.DependenciesRequest]) (*connect.Response[language.DependenciesResponse], error) { - return c.getDependencies.CallUnary(ctx, req) -} - -// MetadataUpdated calls xyz.block.ftl.v1.language.LanguageService.MetadataUpdated. -func (c *languageServiceClient) MetadataUpdated(ctx context.Context, req *connect.Request[language.MetadataUpdatedRequest]) (*connect.Response[language.MetadataUpdatedResponse], error) { - return c.metadataUpdated.CallUnary(ctx, req) -} - -// SchemaUpdated calls xyz.block.ftl.v1.language.LanguageService.SchemaUpdated. -func (c *languageServiceClient) SchemaUpdated(ctx context.Context, req *connect.Request[language.SchemaUpdatedRequest]) (*connect.Response[language.SchemaUpdatedResponse], error) { - return c.schemaUpdated.CallUnary(ctx, req) -} - -// Build calls xyz.block.ftl.v1.language.LanguageService.Build. -func (c *languageServiceClient) Build(ctx context.Context, req *connect.Request[language.BuildRequest]) (*connect.ServerStreamForClient[language.BuildEvent], error) { - return c.build.CallServerStream(ctx, req) -} - -// LanguageServiceHandler is an implementation of the xyz.block.ftl.v1.language.LanguageService -// service. -type LanguageServiceHandler interface { - // Ping service for readiness. - Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) - // Generates files for a new empty module with the requested name - CreateModule(context.Context, *connect.Request[language.CreateModuleRequest]) (*connect.Response[language.CreateModuleResponse], error) - // Extract dependencies for a module - GetDependencies(context.Context, *connect.Request[language.DependenciesRequest]) (*connect.Response[language.DependenciesResponse], error) - // MetadataUpdated is called whenever the metadata for a module is updated. - MetadataUpdated(context.Context, *connect.Request[language.MetadataUpdatedRequest]) (*connect.Response[language.MetadataUpdatedResponse], error) - // SchemaUpdated is called whenever the relevant part of a schema is updated. - // - // The schema is not the full schema, rather it only modules in this module's dependency graph. - // It does not contain the schema for this plugin's module. - // - // Language plugins should hold on to the latest schema they have seen. - // SchemaUpdated is called: - // - after ExtractDependencies and before Build (if there are any dependencies) - // - when a dependant module is updated - // - when the module's dependancies change - SchemaUpdated(context.Context, *connect.Request[language.SchemaUpdatedRequest]) (*connect.Response[language.SchemaUpdatedResponse], error) - // Build the module - // The request can also indicate whether the plugin should watch for changes to the module and automatically rebuild - // The response stream can send LogMessages and BuildResults, and ends with a BuildResponse - Build(context.Context, *connect.Request[language.BuildRequest], *connect.ServerStream[language.BuildEvent]) error -} - -// NewLanguageServiceHandler builds an HTTP handler from the service implementation. It returns the -// path on which to mount the handler and the handler itself. -// -// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf -// and JSON codecs. They also support gzip compression. -func NewLanguageServiceHandler(svc LanguageServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { - languageServicePingHandler := connect.NewUnaryHandler( - LanguageServicePingProcedure, - svc.Ping, - connect.WithIdempotency(connect.IdempotencyNoSideEffects), - connect.WithHandlerOptions(opts...), - ) - languageServiceCreateModuleHandler := connect.NewUnaryHandler( - LanguageServiceCreateModuleProcedure, - svc.CreateModule, - opts..., - ) - languageServiceGetDependenciesHandler := connect.NewUnaryHandler( - LanguageServiceGetDependenciesProcedure, - svc.GetDependencies, - opts..., - ) - languageServiceMetadataUpdatedHandler := connect.NewUnaryHandler( - LanguageServiceMetadataUpdatedProcedure, - svc.MetadataUpdated, - opts..., - ) - languageServiceSchemaUpdatedHandler := connect.NewUnaryHandler( - LanguageServiceSchemaUpdatedProcedure, - svc.SchemaUpdated, - opts..., - ) - languageServiceBuildHandler := connect.NewServerStreamHandler( - LanguageServiceBuildProcedure, - svc.Build, - opts..., - ) - return "/xyz.block.ftl.v1.language.LanguageService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - switch r.URL.Path { - case LanguageServicePingProcedure: - languageServicePingHandler.ServeHTTP(w, r) - case LanguageServiceCreateModuleProcedure: - languageServiceCreateModuleHandler.ServeHTTP(w, r) - case LanguageServiceGetDependenciesProcedure: - languageServiceGetDependenciesHandler.ServeHTTP(w, r) - case LanguageServiceMetadataUpdatedProcedure: - languageServiceMetadataUpdatedHandler.ServeHTTP(w, r) - case LanguageServiceSchemaUpdatedProcedure: - languageServiceSchemaUpdatedHandler.ServeHTTP(w, r) - case LanguageServiceBuildProcedure: - languageServiceBuildHandler.ServeHTTP(w, r) - default: - http.NotFound(w, r) - } - }) -} - -// UnimplementedLanguageServiceHandler returns CodeUnimplemented from all methods. -type UnimplementedLanguageServiceHandler struct{} - -func (UnimplementedLanguageServiceHandler) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.Ping is not implemented")) -} - -func (UnimplementedLanguageServiceHandler) CreateModule(context.Context, *connect.Request[language.CreateModuleRequest]) (*connect.Response[language.CreateModuleResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.CreateModule is not implemented")) -} - -func (UnimplementedLanguageServiceHandler) GetDependencies(context.Context, *connect.Request[language.DependenciesRequest]) (*connect.Response[language.DependenciesResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.GetDependencies is not implemented")) -} - -func (UnimplementedLanguageServiceHandler) MetadataUpdated(context.Context, *connect.Request[language.MetadataUpdatedRequest]) (*connect.Response[language.MetadataUpdatedResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.MetadataUpdated is not implemented")) -} - -func (UnimplementedLanguageServiceHandler) SchemaUpdated(context.Context, *connect.Request[language.SchemaUpdatedRequest]) (*connect.Response[language.SchemaUpdatedResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.SchemaUpdated is not implemented")) -} - -func (UnimplementedLanguageServiceHandler) Build(context.Context, *connect.Request[language.BuildRequest], *connect.ServerStream[language.BuildEvent]) error { - return connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.Build is not implemented")) -} diff --git a/frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_connect.ts b/frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_connect.ts deleted file mode 100644 index da640cee3d..0000000000 --- a/frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_connect.ts +++ /dev/null @@ -1,98 +0,0 @@ -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" -// @generated from file xyz/block/ftl/v1/language.go/language.proto (package xyz.block.ftl.v1.language, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { PingRequest, PingResponse } from "../ftl_pb.js"; -import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; -import { BuildEvent, BuildRequest, CreateModuleRequest, CreateModuleResponse, DependenciesRequest, DependenciesResponse, MetadataUpdatedRequest, MetadataUpdatedResponse, SchemaUpdatedRequest, SchemaUpdatedResponse } from "./language_pb.js"; - -/** - * LanguageService allows a plugin to add support for a programming language. - * - * @generated from service xyz.block.ftl.v1.language.LanguageService - */ -export const LanguageService = { - typeName: "xyz.block.ftl.v1.language.LanguageService", - methods: { - /** - * Ping service for readiness. - * - * @generated from rpc xyz.block.ftl.v1.language.LanguageService.Ping - */ - ping: { - name: "Ping", - I: PingRequest, - O: PingResponse, - kind: MethodKind.Unary, - idempotency: MethodIdempotency.NoSideEffects, - }, - /** - * Generates files for a new empty module with the requested name - * - * @generated from rpc xyz.block.ftl.v1.language.LanguageService.CreateModule - */ - createModule: { - name: "CreateModule", - I: CreateModuleRequest, - O: CreateModuleResponse, - kind: MethodKind.Unary, - }, - /** - * Extract dependencies for a module - * - * @generated from rpc xyz.block.ftl.v1.language.LanguageService.GetDependencies - */ - getDependencies: { - name: "GetDependencies", - I: DependenciesRequest, - O: DependenciesResponse, - kind: MethodKind.Unary, - }, - /** - * MetadataUpdated is called whenever the metadata for a module is updated. - * - * @generated from rpc xyz.block.ftl.v1.language.LanguageService.MetadataUpdated - */ - metadataUpdated: { - name: "MetadataUpdated", - I: MetadataUpdatedRequest, - O: MetadataUpdatedResponse, - kind: MethodKind.Unary, - }, - /** - * SchemaUpdated is called whenever the relevant part of a schema is updated. - * - * The schema is not the full schema, rather it only modules in this module's dependency graph. - * It does not contain the schema for this plugin's module. - * - * Language plugins should hold on to the latest schema they have seen. - * SchemaUpdated is called: - * - after ExtractDependencies and before Build (if there are any dependencies) - * - when a dependant module is updated - * - when the module's dependancies change - * - * @generated from rpc xyz.block.ftl.v1.language.LanguageService.SchemaUpdated - */ - schemaUpdated: { - name: "SchemaUpdated", - I: SchemaUpdatedRequest, - O: SchemaUpdatedResponse, - kind: MethodKind.Unary, - }, - /** - * Build the module - * The request can also indicate whether the plugin should watch for changes to the module and automatically rebuild - * The response stream can send LogMessages and BuildResults, and ends with a BuildResponse - * - * @generated from rpc xyz.block.ftl.v1.language.LanguageService.Build - */ - build: { - name: "Build", - I: BuildRequest, - O: BuildEvent, - kind: MethodKind.ServerStreaming, - }, - } -} as const; - diff --git a/frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_pb.ts b/frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_pb.ts deleted file mode 100644 index ec78ef18ae..0000000000 --- a/frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_pb.ts +++ /dev/null @@ -1,770 +0,0 @@ -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts" -// @generated from file xyz/block/ftl/v1/language.go/language.proto (package xyz.block.ftl.v1.language, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Any, Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { Module, Position, Schema } from "../schema/schema_pb.js"; - -/** - * @generated from enum xyz.block.ftl.v1.language.LogLevel - */ -export enum LogLevel { - /** - * @generated from enum value: DEBUG = 0; - */ - DEBUG = 0, - - /** - * @generated from enum value: INFO = 1; - */ - INFO = 1, - - /** - * @generated from enum value: WARN = 2; - */ - WARN = 2, - - /** - * @generated from enum value: ERROR = 3; - */ - ERROR = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(LogLevel) -proto3.util.setEnumType(LogLevel, "xyz.block.ftl.v1.language.LogLevel", [ - { no: 0, name: "DEBUG" }, - { no: 1, name: "INFO" }, - { no: 2, name: "WARN" }, - { no: 3, name: "ERROR" }, -]); - -/** - * Log message from the language service. - * - * @generated from message xyz.block.ftl.v1.language.LogMessage - */ -export class LogMessage extends Message { - /** - * @generated from field: string message = 1; - */ - message = ""; - - /** - * @generated from field: xyz.block.ftl.v1.language.LogLevel level = 2; - */ - level = LogLevel.DEBUG; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.LogMessage"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "level", kind: "enum", T: proto3.getEnumType(LogLevel) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LogMessage { - return new LogMessage().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): LogMessage { - return new LogMessage().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LogMessage { - return new LogMessage().fromJsonString(jsonString, options); - } - - static equals(a: LogMessage | PlainMessage | undefined, b: LogMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(LogMessage, a, b); - } -} - -/** - * @generated from message xyz.block.ftl.v1.language.Metadata - */ -export class Metadata extends Message { - /** - * Universal metadata - * - * @generated from field: string name = 1; - */ - name = ""; - - /** - * Language metadata contains any metadata specific to a specific language. - * - * @generated from field: repeated google.protobuf.Any LanguageMetadata = 2; - */ - LanguageMetadata: Any[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.Metadata"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "LanguageMetadata", kind: "message", T: Any, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Metadata { - return new Metadata().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Metadata { - return new Metadata().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Metadata { - return new Metadata().fromJsonString(jsonString, options); - } - - static equals(a: Metadata | PlainMessage | undefined, b: Metadata | PlainMessage | undefined): boolean { - return proto3.util.equals(Metadata, a, b); - } -} - -/** - * Request to create a new module. - * - * @generated from message xyz.block.ftl.v1.language.CreateModuleRequest - */ -export class CreateModuleRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name = ""; - - /** - * @generated from field: string path = 2; - */ - path = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.CreateModuleRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateModuleRequest { - return new CreateModuleRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateModuleRequest { - return new CreateModuleRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateModuleRequest { - return new CreateModuleRequest().fromJsonString(jsonString, options); - } - - static equals(a: CreateModuleRequest | PlainMessage | undefined, b: CreateModuleRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateModuleRequest, a, b); - } -} - -/** - * Response to a create module request. - * - * @generated from message xyz.block.ftl.v1.language.CreateModuleResponse - */ -export class CreateModuleResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.CreateModuleResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateModuleResponse { - return new CreateModuleResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateModuleResponse { - return new CreateModuleResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateModuleResponse { - return new CreateModuleResponse().fromJsonString(jsonString, options); - } - - static equals(a: CreateModuleResponse | PlainMessage | undefined, b: CreateModuleResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateModuleResponse, a, b); - } -} - -/** - * @generated from message xyz.block.ftl.v1.language.DependenciesRequest - */ -export class DependenciesRequest extends Message { - /** - * @generated from field: string path = 1; - */ - path = ""; - - /** - * @generated from field: xyz.block.ftl.v1.language.Metadata metadata = 2; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.DependenciesRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "metadata", kind: "message", T: Metadata }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DependenciesRequest { - return new DependenciesRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DependenciesRequest { - return new DependenciesRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DependenciesRequest { - return new DependenciesRequest().fromJsonString(jsonString, options); - } - - static equals(a: DependenciesRequest | PlainMessage | undefined, b: DependenciesRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DependenciesRequest, a, b); - } -} - -/** - * @generated from message xyz.block.ftl.v1.language.DependenciesResponse - */ -export class DependenciesResponse extends Message { - /** - * @generated from field: repeated string modules = 1; - */ - modules: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.DependenciesResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "modules", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DependenciesResponse { - return new DependenciesResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DependenciesResponse { - return new DependenciesResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DependenciesResponse { - return new DependenciesResponse().fromJsonString(jsonString, options); - } - - static equals(a: DependenciesResponse | PlainMessage | undefined, b: DependenciesResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(DependenciesResponse, a, b); - } -} - -/** - * Response to a dependency extraction request. - * - * @generated from message xyz.block.ftl.v1.language.DependencyUpdate - */ -export class DependencyUpdate extends Message { - /** - * @generated from field: repeated string modules = 1; - */ - modules: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.DependencyUpdate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "modules", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DependencyUpdate { - return new DependencyUpdate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DependencyUpdate { - return new DependencyUpdate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DependencyUpdate { - return new DependencyUpdate().fromJsonString(jsonString, options); - } - - static equals(a: DependencyUpdate | PlainMessage | undefined, b: DependencyUpdate | PlainMessage | undefined): boolean { - return proto3.util.equals(DependencyUpdate, a, b); - } -} - -/** - * @generated from message xyz.block.ftl.v1.language.MetadataUpdatedRequest - */ -export class MetadataUpdatedRequest extends Message { - /** - * @generated from field: xyz.block.ftl.v1.language.Metadata metadata = 1; - */ - metadata?: Metadata; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.MetadataUpdatedRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: Metadata }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MetadataUpdatedRequest { - return new MetadataUpdatedRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MetadataUpdatedRequest { - return new MetadataUpdatedRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MetadataUpdatedRequest { - return new MetadataUpdatedRequest().fromJsonString(jsonString, options); - } - - static equals(a: MetadataUpdatedRequest | PlainMessage | undefined, b: MetadataUpdatedRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(MetadataUpdatedRequest, a, b); - } -} - -/** - * @generated from message xyz.block.ftl.v1.language.MetadataUpdatedResponse - */ -export class MetadataUpdatedResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.MetadataUpdatedResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MetadataUpdatedResponse { - return new MetadataUpdatedResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MetadataUpdatedResponse { - return new MetadataUpdatedResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MetadataUpdatedResponse { - return new MetadataUpdatedResponse().fromJsonString(jsonString, options); - } - - static equals(a: MetadataUpdatedResponse | PlainMessage | undefined, b: MetadataUpdatedResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(MetadataUpdatedResponse, a, b); - } -} - -/** - * @generated from message xyz.block.ftl.v1.language.SchemaUpdatedRequest - */ -export class SchemaUpdatedRequest extends Message { - /** - * @generated from field: xyz.block.ftl.v1.schema.Schema schema = 1; - */ - schema?: Schema; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.SchemaUpdatedRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "schema", kind: "message", T: Schema }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SchemaUpdatedRequest { - return new SchemaUpdatedRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SchemaUpdatedRequest { - return new SchemaUpdatedRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SchemaUpdatedRequest { - return new SchemaUpdatedRequest().fromJsonString(jsonString, options); - } - - static equals(a: SchemaUpdatedRequest | PlainMessage | undefined, b: SchemaUpdatedRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SchemaUpdatedRequest, a, b); - } -} - -/** - * @generated from message xyz.block.ftl.v1.language.SchemaUpdatedResponse - */ -export class SchemaUpdatedResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.SchemaUpdatedResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SchemaUpdatedResponse { - return new SchemaUpdatedResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SchemaUpdatedResponse { - return new SchemaUpdatedResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SchemaUpdatedResponse { - return new SchemaUpdatedResponse().fromJsonString(jsonString, options); - } - - static equals(a: SchemaUpdatedResponse | PlainMessage | undefined, b: SchemaUpdatedResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SchemaUpdatedResponse, a, b); - } -} - -/** - * @generated from message xyz.block.ftl.v1.language.Error - */ -export class Error extends Message { - /** - * @generated from field: string msg = 1; - */ - msg = ""; - - /** - * @generated from field: xyz.block.ftl.v1.schema.Position pos = 2; - */ - pos?: Position; - - /** - * @generated from field: int64 endColumn = 3; - */ - endColumn = protoInt64.zero; - - /** - * @generated from field: xyz.block.ftl.v1.language.Error.ErrorLevel level = 4; - */ - level = Error_ErrorLevel.INFO; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.Error"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "msg", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "pos", kind: "message", T: Position }, - { no: 3, name: "endColumn", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 4, name: "level", kind: "enum", T: proto3.getEnumType(Error_ErrorLevel) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Error { - return new Error().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Error { - return new Error().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Error { - return new Error().fromJsonString(jsonString, options); - } - - static equals(a: Error | PlainMessage | undefined, b: Error | PlainMessage | undefined): boolean { - return proto3.util.equals(Error, a, b); - } -} - -/** - * @generated from enum xyz.block.ftl.v1.language.Error.ErrorLevel - */ -export enum Error_ErrorLevel { - /** - * @generated from enum value: INFO = 0; - */ - INFO = 0, - - /** - * @generated from enum value: WARN = 1; - */ - WARN = 1, - - /** - * @generated from enum value: ERROR = 2; - */ - ERROR = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(Error_ErrorLevel) -proto3.util.setEnumType(Error_ErrorLevel, "xyz.block.ftl.v1.language.Error.ErrorLevel", [ - { no: 0, name: "INFO" }, - { no: 1, name: "WARN" }, - { no: 2, name: "ERROR" }, -]); - -/** - * @generated from message xyz.block.ftl.v1.language.ErrorList - */ -export class ErrorList extends Message { - /** - * @generated from field: repeated xyz.block.ftl.v1.language.Error errors = 1; - */ - errors: Error[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.ErrorList"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "errors", kind: "message", T: Error, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ErrorList { - return new ErrorList().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ErrorList { - return new ErrorList().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ErrorList { - return new ErrorList().fromJsonString(jsonString, options); - } - - static equals(a: ErrorList | PlainMessage | undefined, b: ErrorList | PlainMessage | undefined): boolean { - return proto3.util.equals(ErrorList, a, b); - } -} - -/** - * Request to build a module. - * - * @generated from message xyz.block.ftl.v1.language.BuildRequest - */ -export class BuildRequest extends Message { - /** - * the root path for the module - * - * @generated from field: string path = 1; - */ - path = ""; - - /** - * the root path for the FTL project - * - * @generated from field: string project_path = 2; - */ - projectPath = ""; - - /** - * indicates whether to watch for changes to the module - * - * @generated from field: bool watch = 3; - */ - watch = false; - - /** - * @generated from field: xyz.block.ftl.v1.language.Metadata metadata = 4; - */ - metadata?: Metadata; - - /** - * @generated from field: xyz.block.ftl.v1.schema.Schema schema = 5; - */ - schema?: Schema; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.BuildRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "project_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "watch", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 4, name: "metadata", kind: "message", T: Metadata }, - { no: 5, name: "schema", kind: "message", T: Schema }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): BuildRequest { - return new BuildRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): BuildRequest { - return new BuildRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): BuildRequest { - return new BuildRequest().fromJsonString(jsonString, options); - } - - static equals(a: BuildRequest | PlainMessage | undefined, b: BuildRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(BuildRequest, a, b); - } -} - -/** - * Response to a build request. - * - * @generated from message xyz.block.ftl.v1.language.BuildResult - */ -export class BuildResult extends Message { - /** - * module schema for the built module - * only set if the build was successful - * - * @generated from field: optional xyz.block.ftl.v1.schema.Module module = 1; - */ - module?: Module; - - /** - * paths for files/directories to be deployed - * - * @generated from field: repeated string deploy = 2; - */ - deploy: string[] = []; - - /** - * errors and warnings encountered during the build - * - * @generated from field: xyz.block.ftl.v1.language.ErrorList errors = 3; - */ - errors?: ErrorList; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.BuildResult"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "module", kind: "message", T: Module, opt: true }, - { no: 2, name: "deploy", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 3, name: "errors", kind: "message", T: ErrorList }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): BuildResult { - return new BuildResult().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): BuildResult { - return new BuildResult().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): BuildResult { - return new BuildResult().fromJsonString(jsonString, options); - } - - static equals(a: BuildResult | PlainMessage | undefined, b: BuildResult | PlainMessage | undefined): boolean { - return proto3.util.equals(BuildResult, a, b); - } -} - -/** - * Every type of message that can be streamed from the language service for a build. - * - * @generated from message xyz.block.ftl.v1.language.BuildEvent - */ -export class BuildEvent extends Message { - /** - * @generated from oneof xyz.block.ftl.v1.language.BuildEvent.event - */ - event: { - /** - * @generated from field: xyz.block.ftl.v1.language.DependencyUpdate dependency_update = 1; - */ - value: DependencyUpdate; - case: "dependencyUpdate"; - } | { - /** - * @generated from field: xyz.block.ftl.v1.language.BuildResult build_result = 2; - */ - value: BuildResult; - case: "buildResult"; - } | { - /** - * @generated from field: xyz.block.ftl.v1.language.LogMessage log_message = 3; - */ - value: LogMessage; - case: "logMessage"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "xyz.block.ftl.v1.language.BuildEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "dependency_update", kind: "message", T: DependencyUpdate, oneof: "event" }, - { no: 2, name: "build_result", kind: "message", T: BuildResult, oneof: "event" }, - { no: 3, name: "log_message", kind: "message", T: LogMessage, oneof: "event" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): BuildEvent { - return new BuildEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): BuildEvent { - return new BuildEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): BuildEvent { - return new BuildEvent().fromJsonString(jsonString, options); - } - - static equals(a: BuildEvent | PlainMessage | undefined, b: BuildEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(BuildEvent, a, b); - } -} -