Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
PROTOS := $(shell cd proto; find . -path './celest/*' -name '*.proto')
AST_PROTOS := $(PWD)/packages/celest_ast/proto

protos:
@go install github.com/googleapis/api-linter/cmd/api-linter@latest

buf lint
cd proto && \
api-linter --set-exit-status \
-I $(HOME)/.cache/buf/v3/modules/b5/buf.build/googleapis/googleapis/$(shell yq '.deps[] | select(.name == "buf.build/googleapis/googleapis") | .commit' buf.lock)/files \
-I $(HOME)/.cache/buf/v3/modules/b5/buf.build/bufbuild/protovalidate/$(shell yq '.deps[] | select(.name == "buf.build/bufbuild/protovalidate") | .commit' buf.lock)/files \
-I $(HOME)/.cache/buf/v3/modules/b5/buf.build/celest-dev/cedar/$(shell yq '.deps[] | select(.name == "buf.build/celest-dev/cedar") | .commit' buf.lock)/files \
-I $(AST_PROTOS) \
-I . \
--config=aip.yaml \
$(PROTOS)
buf generate
(cd packages/celest_cloud && dart format .)
(cd packages/celest_ast && buf generate && dart format .)
12 changes: 12 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: v2
managed:
enabled: true
inputs:
- directory: proto
- module: buf.build/celest-dev/ast
plugins:
# TODO: Bump when issues are fixed in generator
- remote: buf.build/protocolbuffers/dart:v21.1.2
out: packages/celest_cloud/lib/src/proto
opt:
- grpc
12 changes: 12 additions & 0 deletions buf.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/bufbuild/protovalidate
commit: 0409229c37804d6187ee0806eb4eebce
digest: b5:795db9d3a6e066dc61d99ac651fa7f136171869abe2211ca272dd84aada7bc4583b9508249fa5b61300a5b1fe8b6dbf6edbc088aa0345d1ccb9fff705e3d48e9
- name: buf.build/celest-dev/cedar
commit: 37266fb8032240bc887fea377784e864
digest: b5:d69e51c2a8a2e037c1f5fceb96f0420c4f6e8ae8d44d1de427380070d5f6119175dcaf2eb7c7d5385ebde266d60d500744953a8bf81881bbb02d9c0237766462
- name: buf.build/googleapis/googleapis
commit: 751cbe31638d43a9bfb6162cd2352e67
digest: b5:51ba5c31f244fd74420f0e66d13f2b5dd6024dcfe1a29dc45bd8f6e61c1444c828b9add9e7dd25a4513ebbee8097a970e0712a2e2cd955c2d60cf8905204f51a
2 changes: 2 additions & 0 deletions packages/celest_ast/buf.yaml → buf.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
version: v2
deps:
- buf.build/bufbuild/protovalidate
- buf.build/celest-dev/cedar
- buf.build/googleapis/googleapis
modules:
- path: proto
- path: packages/celest_ast/proto
name: buf.build/celest-dev/ast
breaking:
use:
Expand Down
1 change: 1 addition & 0 deletions packages/celest_ast/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- chore: Add `version` field to `DatabaseSchema`
- chore: Update license
- chore: Update protobufs

## 0.1.5

Expand Down
9 changes: 0 additions & 9 deletions packages/celest_ast/buf.lock

This file was deleted.

1 change: 1 addition & 0 deletions packages/celest_cloud/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- feat: Add `Operations.waitOperation`
- chore: Update license
- chore: Improve gRPC interface
- chore: Update protobufs

# 0.1.4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:celest_cloud/src/cloud/project_environments/project_environments
import 'package:celest_cloud/src/proto.dart' hide OperationState;
import 'package:celest_cloud/src/util/operations.dart';
import 'package:celest_core/celest_core.dart';
import 'package:celest_core/src/util/let.dart';
import 'package:logging/logging.dart';

final class ProjectEnvironments with BaseService {
Expand All @@ -29,10 +30,15 @@ final class ProjectEnvironments with BaseService {
final request = CreateProjectEnvironmentRequest(
parent: parent,
projectEnvironmentId: projectEnvironmentId,
projectEnvironment: ProjectEnvironment(
displayName: displayName,
annotations: annotations,
),
projectEnvironment: ProjectEnvironment().let((env) {
if (displayName != null) {
env.displayName = displayName;
}
if (annotations != null) {
env.annotations.addAll(annotations);
}
return env;
}),
validateOnly: validateOnly,
);
final operation = await run(
Expand Down
18 changes: 13 additions & 5 deletions packages/celest_cloud/lib/src/cloud/projects/projects.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:celest_cloud/src/cloud/projects/projects_protocol.dart';
import 'package:celest_cloud/src/proto.dart' hide OperationState;
import 'package:celest_cloud/src/util/operations.dart';
import 'package:celest_core/celest_core.dart';
import 'package:celest_core/src/util/let.dart';
import 'package:logging/logging.dart';

final class Projects with BaseService {
Expand Down Expand Up @@ -37,11 +38,18 @@ final class Projects with BaseService {
final request = CreateProjectRequest(
parent: parent,
projectId: projectId,
project: Project(
displayName: displayName,
regions: regions,
annotations: annotations,
),
project: Project().let((prj) {
if (displayName != null) {
prj.displayName = displayName;
}
if (regions != null) {
prj.regions.addAll(regions);
}
if (annotations != null) {
prj.annotations.addAll(annotations);
}
return prj;
}),
validateOnly: validateOnly,
);
final operation = await run(
Expand Down
Loading