@liquidmetal-ai/drizzle 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/appify/parse.d.ts.map +1 -1
- package/dist/appify/parse.js +7 -1
- package/dist/appify/parse.test.js +1 -1
- package/dist/appify/validate.d.ts.map +1 -1
- package/dist/appify/validate.js +15 -4
- package/dist/appify/validate.test.js +29 -32
- package/dist/liquidmetal/v1alpha1/catalog_connect.d.ts +19 -1
- package/dist/liquidmetal/v1alpha1/catalog_connect.d.ts.map +1 -1
- package/dist/liquidmetal/v1alpha1/catalog_connect.js +19 -1
- package/dist/liquidmetal/v1alpha1/catalog_pb.d.ts +194 -6
- package/dist/liquidmetal/v1alpha1/catalog_pb.d.ts.map +1 -1
- package/dist/liquidmetal/v1alpha1/catalog_pb.js +315 -10
- package/dist/unsafe/codestore.d.ts.map +1 -1
- package/dist/unsafe/codestore.js +11 -2
- package/package.json +1 -1
- package/src/appify/parse.test.ts +1 -1
- package/src/appify/parse.ts +8 -2
- package/src/appify/validate.test.ts +29 -32
- package/src/appify/validate.ts +16 -4
- package/src/liquidmetal/v1alpha1/catalog_connect.ts +19 -1
- package/src/liquidmetal/v1alpha1/catalog_pb.ts +384 -10
- package/src/unsafe/codestore.ts +11 -2
|
@@ -55,32 +55,32 @@ application "my-app" {
|
|
|
55
55
|
]);
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
-
test('domainValidator', async () => {
|
|
59
|
-
|
|
60
|
-
application "my-app" {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
`;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
});
|
|
58
|
+
// test('domainValidator', async () => {
|
|
59
|
+
// const manifest = `
|
|
60
|
+
// application "my-app" {
|
|
61
|
+
// service "my-service" {
|
|
62
|
+
// domain {
|
|
63
|
+
// fqdn = "not-valid.com_foo"
|
|
64
|
+
// }
|
|
65
|
+
// }
|
|
66
|
+
// }
|
|
67
|
+
// `;
|
|
68
|
+
// const tokenizer = new Tokenizer(manifest);
|
|
69
|
+
// const parser = new Parser(tokenizer);
|
|
70
|
+
// const parsedManifest = parser.parse();
|
|
71
|
+
// const [builtApps] = buildManifest(parsedManifest);
|
|
72
|
+
// const validateErrors = await validate(builtApps, VALIDATORS);
|
|
73
|
+
// expect(validateErrors).toMatchObject([
|
|
74
|
+
// {
|
|
75
|
+
// message: 'domain "not-valid.com_foo" is an invalid domain name',
|
|
76
|
+
// line: 5,
|
|
77
|
+
// column: 14,
|
|
78
|
+
// start: 75,
|
|
79
|
+
// end: 94,
|
|
80
|
+
// severity: 'warning',
|
|
81
|
+
// },
|
|
82
|
+
// ]);
|
|
83
|
+
// });
|
|
84
84
|
|
|
85
85
|
test('visibilityValidator', async () => {
|
|
86
86
|
const manifest = `
|
|
@@ -109,8 +109,8 @@ application "my-app" {
|
|
|
109
109
|
|
|
110
110
|
test('nameValidator', async () => {
|
|
111
111
|
const manifest = `
|
|
112
|
-
application "
|
|
113
|
-
service "
|
|
112
|
+
application "My_App" {
|
|
113
|
+
service "my_service" {}
|
|
114
114
|
}
|
|
115
115
|
`;
|
|
116
116
|
const tokenizer = new Tokenizer(manifest);
|
|
@@ -121,10 +121,7 @@ application "MyApp" {
|
|
|
121
121
|
expect(validateErrors).toMatchObject([
|
|
122
122
|
{
|
|
123
123
|
message: 'name must be lowercase and dash-separated',
|
|
124
|
-
line:
|
|
125
|
-
column: 13,
|
|
126
|
-
start: 13,
|
|
127
|
-
end: 20,
|
|
124
|
+
line: 3,
|
|
128
125
|
severity: 'error',
|
|
129
126
|
},
|
|
130
127
|
]);
|
package/src/appify/validate.ts
CHANGED
|
@@ -203,7 +203,8 @@ const bindingValueValidator: Validator = {
|
|
|
203
203
|
},
|
|
204
204
|
};
|
|
205
205
|
|
|
206
|
-
|
|
206
|
+
// Disabled for now.
|
|
207
|
+
const _domainValidator: Validator = {
|
|
207
208
|
onDomain: async (app: Application, domain: Domain): Promise<ValidationError[]> => {
|
|
208
209
|
const errors: ValidationError[] = [];
|
|
209
210
|
if (domain.fqdn === undefined) {
|
|
@@ -325,7 +326,7 @@ const visibilityValidator: Validator = {
|
|
|
325
326
|
onBucket: visibilityValidatorFn,
|
|
326
327
|
};
|
|
327
328
|
|
|
328
|
-
async function nameValidatorFn(
|
|
329
|
+
async function nameValidatorFn(_app: Application, obj: { name: TokenString }): Promise<ValidationError[]> {
|
|
329
330
|
const errors: ValidationError[] = [];
|
|
330
331
|
if (!valueOf(obj.name).match(/^[a-z][a-z0-9-]*$/)) {
|
|
331
332
|
errors.push({
|
|
@@ -337,8 +338,20 @@ async function nameValidatorFn(app: Application, obj: { name: TokenString }): Pr
|
|
|
337
338
|
return errors;
|
|
338
339
|
}
|
|
339
340
|
|
|
341
|
+
async function applicationNameValidator(_app: Application, obj: { name: TokenString }): Promise<ValidationError[]> {
|
|
342
|
+
const errors: ValidationError[] = [];
|
|
343
|
+
if (!valueOf(obj.name).match(/^[a-zA-Z][a-zA-Z0-9-_]*$/)) {
|
|
344
|
+
errors.push({
|
|
345
|
+
message: `name must be alphanumeric or _, -, and start with a letter`,
|
|
346
|
+
severity: 'error',
|
|
347
|
+
...obj.name,
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
return errors;
|
|
351
|
+
}
|
|
352
|
+
|
|
340
353
|
const nameValidator: Validator = {
|
|
341
|
-
onApplication:
|
|
354
|
+
onApplication: applicationNameValidator,
|
|
342
355
|
onService: nameValidatorFn,
|
|
343
356
|
onObserver: nameValidatorFn,
|
|
344
357
|
onBucket: nameValidatorFn,
|
|
@@ -425,7 +438,6 @@ const duplicateModuleValidator: Validator = {
|
|
|
425
438
|
export const VALIDATORS: Validator[] = [
|
|
426
439
|
bindingNameValidator,
|
|
427
440
|
bindingValueValidator,
|
|
428
|
-
domainValidator,
|
|
429
441
|
envValidator,
|
|
430
442
|
observerSourceValidator,
|
|
431
443
|
visibilityValidator,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
// @ts-nocheck
|
|
5
5
|
|
|
6
|
-
import { ApplicationsRequest, ApplicationsResponse, BootstrapRequest, BootstrapResponse, CreateApplicationsRequest, CreateApplicationsResponse, CreateVersionRequest, CreateVersionResponse, DeleteApplicationsRequest, DeleteApplicationsResponse, GetEnvRequest, GetEnvResponse, QueryResourcesRequest, QueryResourcesResponse, SetApplicationActiveStatesRequest, SetApplicationActiveStatesResponse, SetEnvRequest, SetEnvResponse, StatBundleRequest, StatBundleResponse, UploadBundleRequest, UploadBundleResponse, VersionsRequest, VersionsResponse } from "./catalog_pb.js";
|
|
6
|
+
import { ApplicationsRequest, ApplicationsResponse, BootstrapRequest, BootstrapResponse, CreateApplicationsRequest, CreateApplicationsResponse, CreateVersionRequest, CreateVersionResponse, DeleteApplicationsRequest, DeleteApplicationsResponse, GetEnvRequest, GetEnvResponse, QueryResourcesRequest, QueryResourcesResponse, SetApplicationActiveStatesRequest, SetApplicationActiveStatesResponse, SetApplicationManifestsRequest, SetApplicationManifestsResponse, SetEnvRequest, SetEnvResponse, SetVersionSandboxStatesRequest, SetVersionSandboxStatesResponse, StatBundleRequest, StatBundleResponse, UploadBundleRequest, UploadBundleResponse, VersionsRequest, VersionsResponse } from "./catalog_pb.js";
|
|
7
7
|
import { MethodKind } from "@bufbuild/protobuf";
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -41,6 +41,15 @@ export const CatalogService = {
|
|
|
41
41
|
O: CreateVersionResponse,
|
|
42
42
|
kind: MethodKind.Unary,
|
|
43
43
|
},
|
|
44
|
+
/**
|
|
45
|
+
* @generated from rpc liquidmetal.v1alpha1.CatalogService.SetVersionSandboxStates
|
|
46
|
+
*/
|
|
47
|
+
setVersionSandboxStates: {
|
|
48
|
+
name: "SetVersionSandboxStates",
|
|
49
|
+
I: SetVersionSandboxStatesRequest,
|
|
50
|
+
O: SetVersionSandboxStatesResponse,
|
|
51
|
+
kind: MethodKind.Unary,
|
|
52
|
+
},
|
|
44
53
|
/**
|
|
45
54
|
* Applications fetches a list of applications for an organization.
|
|
46
55
|
* This list follows best practices for pagination.
|
|
@@ -81,6 +90,15 @@ export const CatalogService = {
|
|
|
81
90
|
O: DeleteApplicationsResponse,
|
|
82
91
|
kind: MethodKind.Unary,
|
|
83
92
|
},
|
|
93
|
+
/**
|
|
94
|
+
* @generated from rpc liquidmetal.v1alpha1.CatalogService.SetApplicationManifests
|
|
95
|
+
*/
|
|
96
|
+
setApplicationManifests: {
|
|
97
|
+
name: "SetApplicationManifests",
|
|
98
|
+
I: SetApplicationManifestsRequest,
|
|
99
|
+
O: SetApplicationManifestsResponse,
|
|
100
|
+
kind: MethodKind.Unary,
|
|
101
|
+
},
|
|
84
102
|
/**
|
|
85
103
|
* UploadBundle uploads a bundle for a specific application version.
|
|
86
104
|
*
|
|
@@ -562,12 +562,17 @@ export class VersionsResponse_Version extends Message<VersionsResponse_Version>
|
|
|
562
562
|
previousVersionId = "";
|
|
563
563
|
|
|
564
564
|
/**
|
|
565
|
-
* @generated from field:
|
|
565
|
+
* @generated from field: bool is_sandboxed = 3;
|
|
566
|
+
*/
|
|
567
|
+
isSandboxed = false;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* @generated from field: google.protobuf.Timestamp created_at = 4;
|
|
566
571
|
*/
|
|
567
572
|
createdAt?: Timestamp;
|
|
568
573
|
|
|
569
574
|
/**
|
|
570
|
-
* @generated from field: google.protobuf.Timestamp updated_at =
|
|
575
|
+
* @generated from field: google.protobuf.Timestamp updated_at = 5;
|
|
571
576
|
*/
|
|
572
577
|
updatedAt?: Timestamp;
|
|
573
578
|
|
|
@@ -581,8 +586,9 @@ export class VersionsResponse_Version extends Message<VersionsResponse_Version>
|
|
|
581
586
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
582
587
|
{ no: 1, name: "version_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
583
588
|
{ no: 2, name: "previous_version_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
584
|
-
{ no: 3, name: "
|
|
585
|
-
{ no: 4, name: "
|
|
589
|
+
{ no: 3, name: "is_sandboxed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
590
|
+
{ no: 4, name: "created_at", kind: "message", T: Timestamp },
|
|
591
|
+
{ no: 5, name: "updated_at", kind: "message", T: Timestamp },
|
|
586
592
|
]);
|
|
587
593
|
|
|
588
594
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VersionsResponse_Version {
|
|
@@ -621,6 +627,11 @@ export class CreateVersionRequest extends Message<CreateVersionRequest> {
|
|
|
621
627
|
*/
|
|
622
628
|
previousVersionId = "";
|
|
623
629
|
|
|
630
|
+
/**
|
|
631
|
+
* @generated from field: optional bool is_sandboxed = 4;
|
|
632
|
+
*/
|
|
633
|
+
isSandboxed?: boolean;
|
|
634
|
+
|
|
624
635
|
constructor(data?: PartialMessage<CreateVersionRequest>) {
|
|
625
636
|
super();
|
|
626
637
|
proto3.util.initPartial(data, this);
|
|
@@ -632,6 +643,7 @@ export class CreateVersionRequest extends Message<CreateVersionRequest> {
|
|
|
632
643
|
{ no: 1, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
633
644
|
{ no: 2, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
634
645
|
{ no: 3, name: "previous_version_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
646
|
+
{ no: 4, name: "is_sandboxed", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
635
647
|
]);
|
|
636
648
|
|
|
637
649
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateVersionRequest {
|
|
@@ -665,6 +677,11 @@ export class CreateVersionResponse extends Message<CreateVersionResponse> {
|
|
|
665
677
|
*/
|
|
666
678
|
previousVersionId = "";
|
|
667
679
|
|
|
680
|
+
/**
|
|
681
|
+
* @generated from field: bool is_sandboxed = 3;
|
|
682
|
+
*/
|
|
683
|
+
isSandboxed = false;
|
|
684
|
+
|
|
668
685
|
constructor(data?: PartialMessage<CreateVersionResponse>) {
|
|
669
686
|
super();
|
|
670
687
|
proto3.util.initPartial(data, this);
|
|
@@ -675,6 +692,7 @@ export class CreateVersionResponse extends Message<CreateVersionResponse> {
|
|
|
675
692
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
676
693
|
{ no: 1, name: "version_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
677
694
|
{ no: 2, name: "previous_version_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
695
|
+
{ no: 3, name: "is_sandboxed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
678
696
|
]);
|
|
679
697
|
|
|
680
698
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateVersionResponse {
|
|
@@ -694,6 +712,178 @@ export class CreateVersionResponse extends Message<CreateVersionResponse> {
|
|
|
694
712
|
}
|
|
695
713
|
}
|
|
696
714
|
|
|
715
|
+
/**
|
|
716
|
+
* @generated from message liquidmetal.v1alpha1.SetVersionSandboxStatesRequest
|
|
717
|
+
*/
|
|
718
|
+
export class SetVersionSandboxStatesRequest extends Message<SetVersionSandboxStatesRequest> {
|
|
719
|
+
/**
|
|
720
|
+
* @generated from field: repeated liquidmetal.v1alpha1.SetVersionSandboxStatesRequest.Version versions = 1;
|
|
721
|
+
*/
|
|
722
|
+
versions: SetVersionSandboxStatesRequest_Version[] = [];
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* @generated from field: string user_id = 2;
|
|
726
|
+
*/
|
|
727
|
+
userId = "";
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* @generated from field: string organization_id = 3;
|
|
731
|
+
*/
|
|
732
|
+
organizationId = "";
|
|
733
|
+
|
|
734
|
+
constructor(data?: PartialMessage<SetVersionSandboxStatesRequest>) {
|
|
735
|
+
super();
|
|
736
|
+
proto3.util.initPartial(data, this);
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
740
|
+
static readonly typeName = "liquidmetal.v1alpha1.SetVersionSandboxStatesRequest";
|
|
741
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
742
|
+
{ no: 1, name: "versions", kind: "message", T: SetVersionSandboxStatesRequest_Version, repeated: true },
|
|
743
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
744
|
+
{ no: 3, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
745
|
+
]);
|
|
746
|
+
|
|
747
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetVersionSandboxStatesRequest {
|
|
748
|
+
return new SetVersionSandboxStatesRequest().fromBinary(bytes, options);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetVersionSandboxStatesRequest {
|
|
752
|
+
return new SetVersionSandboxStatesRequest().fromJson(jsonValue, options);
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetVersionSandboxStatesRequest {
|
|
756
|
+
return new SetVersionSandboxStatesRequest().fromJsonString(jsonString, options);
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
static equals(a: SetVersionSandboxStatesRequest | PlainMessage<SetVersionSandboxStatesRequest> | undefined, b: SetVersionSandboxStatesRequest | PlainMessage<SetVersionSandboxStatesRequest> | undefined): boolean {
|
|
760
|
+
return proto3.util.equals(SetVersionSandboxStatesRequest, a, b);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* @generated from message liquidmetal.v1alpha1.SetVersionSandboxStatesRequest.Version
|
|
766
|
+
*/
|
|
767
|
+
export class SetVersionSandboxStatesRequest_Version extends Message<SetVersionSandboxStatesRequest_Version> {
|
|
768
|
+
/**
|
|
769
|
+
* @generated from field: string version_id = 1;
|
|
770
|
+
*/
|
|
771
|
+
versionId = "";
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* @generated from field: bool is_sandboxed = 2;
|
|
775
|
+
*/
|
|
776
|
+
isSandboxed = false;
|
|
777
|
+
|
|
778
|
+
constructor(data?: PartialMessage<SetVersionSandboxStatesRequest_Version>) {
|
|
779
|
+
super();
|
|
780
|
+
proto3.util.initPartial(data, this);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
784
|
+
static readonly typeName = "liquidmetal.v1alpha1.SetVersionSandboxStatesRequest.Version";
|
|
785
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
786
|
+
{ no: 1, name: "version_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
787
|
+
{ no: 2, name: "is_sandboxed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
788
|
+
]);
|
|
789
|
+
|
|
790
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetVersionSandboxStatesRequest_Version {
|
|
791
|
+
return new SetVersionSandboxStatesRequest_Version().fromBinary(bytes, options);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetVersionSandboxStatesRequest_Version {
|
|
795
|
+
return new SetVersionSandboxStatesRequest_Version().fromJson(jsonValue, options);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetVersionSandboxStatesRequest_Version {
|
|
799
|
+
return new SetVersionSandboxStatesRequest_Version().fromJsonString(jsonString, options);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
static equals(a: SetVersionSandboxStatesRequest_Version | PlainMessage<SetVersionSandboxStatesRequest_Version> | undefined, b: SetVersionSandboxStatesRequest_Version | PlainMessage<SetVersionSandboxStatesRequest_Version> | undefined): boolean {
|
|
803
|
+
return proto3.util.equals(SetVersionSandboxStatesRequest_Version, a, b);
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* @generated from message liquidmetal.v1alpha1.SetVersionSandboxStatesResponse
|
|
809
|
+
*/
|
|
810
|
+
export class SetVersionSandboxStatesResponse extends Message<SetVersionSandboxStatesResponse> {
|
|
811
|
+
/**
|
|
812
|
+
* @generated from field: repeated liquidmetal.v1alpha1.SetVersionSandboxStatesResponse.Version success = 1;
|
|
813
|
+
*/
|
|
814
|
+
success: SetVersionSandboxStatesResponse_Version[] = [];
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* @generated from field: repeated liquidmetal.v1alpha1.SetVersionSandboxStatesResponse.Version failure = 2;
|
|
818
|
+
*/
|
|
819
|
+
failure: SetVersionSandboxStatesResponse_Version[] = [];
|
|
820
|
+
|
|
821
|
+
constructor(data?: PartialMessage<SetVersionSandboxStatesResponse>) {
|
|
822
|
+
super();
|
|
823
|
+
proto3.util.initPartial(data, this);
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
827
|
+
static readonly typeName = "liquidmetal.v1alpha1.SetVersionSandboxStatesResponse";
|
|
828
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
829
|
+
{ no: 1, name: "success", kind: "message", T: SetVersionSandboxStatesResponse_Version, repeated: true },
|
|
830
|
+
{ no: 2, name: "failure", kind: "message", T: SetVersionSandboxStatesResponse_Version, repeated: true },
|
|
831
|
+
]);
|
|
832
|
+
|
|
833
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetVersionSandboxStatesResponse {
|
|
834
|
+
return new SetVersionSandboxStatesResponse().fromBinary(bytes, options);
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetVersionSandboxStatesResponse {
|
|
838
|
+
return new SetVersionSandboxStatesResponse().fromJson(jsonValue, options);
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetVersionSandboxStatesResponse {
|
|
842
|
+
return new SetVersionSandboxStatesResponse().fromJsonString(jsonString, options);
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
static equals(a: SetVersionSandboxStatesResponse | PlainMessage<SetVersionSandboxStatesResponse> | undefined, b: SetVersionSandboxStatesResponse | PlainMessage<SetVersionSandboxStatesResponse> | undefined): boolean {
|
|
846
|
+
return proto3.util.equals(SetVersionSandboxStatesResponse, a, b);
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* @generated from message liquidmetal.v1alpha1.SetVersionSandboxStatesResponse.Version
|
|
852
|
+
*/
|
|
853
|
+
export class SetVersionSandboxStatesResponse_Version extends Message<SetVersionSandboxStatesResponse_Version> {
|
|
854
|
+
/**
|
|
855
|
+
* @generated from field: string version_id = 1;
|
|
856
|
+
*/
|
|
857
|
+
versionId = "";
|
|
858
|
+
|
|
859
|
+
constructor(data?: PartialMessage<SetVersionSandboxStatesResponse_Version>) {
|
|
860
|
+
super();
|
|
861
|
+
proto3.util.initPartial(data, this);
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
865
|
+
static readonly typeName = "liquidmetal.v1alpha1.SetVersionSandboxStatesResponse.Version";
|
|
866
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
867
|
+
{ no: 1, name: "version_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
868
|
+
]);
|
|
869
|
+
|
|
870
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetVersionSandboxStatesResponse_Version {
|
|
871
|
+
return new SetVersionSandboxStatesResponse_Version().fromBinary(bytes, options);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetVersionSandboxStatesResponse_Version {
|
|
875
|
+
return new SetVersionSandboxStatesResponse_Version().fromJson(jsonValue, options);
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetVersionSandboxStatesResponse_Version {
|
|
879
|
+
return new SetVersionSandboxStatesResponse_Version().fromJsonString(jsonString, options);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
static equals(a: SetVersionSandboxStatesResponse_Version | PlainMessage<SetVersionSandboxStatesResponse_Version> | undefined, b: SetVersionSandboxStatesResponse_Version | PlainMessage<SetVersionSandboxStatesResponse_Version> | undefined): boolean {
|
|
883
|
+
return proto3.util.equals(SetVersionSandboxStatesResponse_Version, a, b);
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
|
|
697
887
|
/**
|
|
698
888
|
* @generated from message liquidmetal.v1alpha1.UploadBundleRequest
|
|
699
889
|
*/
|
|
@@ -1334,14 +1524,14 @@ export class SetApplicationActiveStatesRequest extends Message<SetApplicationAct
|
|
|
1334
1524
|
*/
|
|
1335
1525
|
export class SetApplicationActiveStatesRequest_State extends Message<SetApplicationActiveStatesRequest_State> {
|
|
1336
1526
|
/**
|
|
1337
|
-
* @generated from field: string
|
|
1527
|
+
* @generated from field: string name = 1;
|
|
1338
1528
|
*/
|
|
1339
|
-
|
|
1529
|
+
name = "";
|
|
1340
1530
|
|
|
1341
1531
|
/**
|
|
1342
|
-
* @generated from field: string
|
|
1532
|
+
* @generated from field: string version_id = 2;
|
|
1343
1533
|
*/
|
|
1344
|
-
|
|
1534
|
+
versionId = "";
|
|
1345
1535
|
|
|
1346
1536
|
/**
|
|
1347
1537
|
* @generated from field: bool is_active = 3;
|
|
@@ -1356,8 +1546,8 @@ export class SetApplicationActiveStatesRequest_State extends Message<SetApplicat
|
|
|
1356
1546
|
static readonly runtime: typeof proto3 = proto3;
|
|
1357
1547
|
static readonly typeName = "liquidmetal.v1alpha1.SetApplicationActiveStatesRequest.State";
|
|
1358
1548
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1359
|
-
{ no: 1, name: "
|
|
1360
|
-
{ no: 2, name: "
|
|
1549
|
+
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1550
|
+
{ no: 2, name: "version_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1361
1551
|
{ no: 3, name: "is_active", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
1362
1552
|
]);
|
|
1363
1553
|
|
|
@@ -1464,6 +1654,190 @@ export class SetApplicationActiveStatesResponse_Application extends Message<SetA
|
|
|
1464
1654
|
}
|
|
1465
1655
|
}
|
|
1466
1656
|
|
|
1657
|
+
/**
|
|
1658
|
+
* @generated from message liquidmetal.v1alpha1.SetApplicationManifestsRequest
|
|
1659
|
+
*/
|
|
1660
|
+
export class SetApplicationManifestsRequest extends Message<SetApplicationManifestsRequest> {
|
|
1661
|
+
/**
|
|
1662
|
+
* @generated from field: repeated liquidmetal.v1alpha1.SetApplicationManifestsRequest.Manifest manifests = 1;
|
|
1663
|
+
*/
|
|
1664
|
+
manifests: SetApplicationManifestsRequest_Manifest[] = [];
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* @generated from field: string user_id = 2;
|
|
1668
|
+
*/
|
|
1669
|
+
userId = "";
|
|
1670
|
+
|
|
1671
|
+
/**
|
|
1672
|
+
* @generated from field: string organization_id = 3;
|
|
1673
|
+
*/
|
|
1674
|
+
organizationId = "";
|
|
1675
|
+
|
|
1676
|
+
constructor(data?: PartialMessage<SetApplicationManifestsRequest>) {
|
|
1677
|
+
super();
|
|
1678
|
+
proto3.util.initPartial(data, this);
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1682
|
+
static readonly typeName = "liquidmetal.v1alpha1.SetApplicationManifestsRequest";
|
|
1683
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1684
|
+
{ no: 1, name: "manifests", kind: "message", T: SetApplicationManifestsRequest_Manifest, repeated: true },
|
|
1685
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1686
|
+
{ no: 3, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1687
|
+
]);
|
|
1688
|
+
|
|
1689
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetApplicationManifestsRequest {
|
|
1690
|
+
return new SetApplicationManifestsRequest().fromBinary(bytes, options);
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetApplicationManifestsRequest {
|
|
1694
|
+
return new SetApplicationManifestsRequest().fromJson(jsonValue, options);
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetApplicationManifestsRequest {
|
|
1698
|
+
return new SetApplicationManifestsRequest().fromJsonString(jsonString, options);
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
static equals(a: SetApplicationManifestsRequest | PlainMessage<SetApplicationManifestsRequest> | undefined, b: SetApplicationManifestsRequest | PlainMessage<SetApplicationManifestsRequest> | undefined): boolean {
|
|
1702
|
+
return proto3.util.equals(SetApplicationManifestsRequest, a, b);
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* @generated from message liquidmetal.v1alpha1.SetApplicationManifestsRequest.Manifest
|
|
1708
|
+
*/
|
|
1709
|
+
export class SetApplicationManifestsRequest_Manifest extends Message<SetApplicationManifestsRequest_Manifest> {
|
|
1710
|
+
/**
|
|
1711
|
+
* @generated from field: string name = 1;
|
|
1712
|
+
*/
|
|
1713
|
+
name = "";
|
|
1714
|
+
|
|
1715
|
+
/**
|
|
1716
|
+
* @generated from field: string version_id = 2;
|
|
1717
|
+
*/
|
|
1718
|
+
versionId = "";
|
|
1719
|
+
|
|
1720
|
+
/**
|
|
1721
|
+
* @generated from field: string manifest = 3;
|
|
1722
|
+
*/
|
|
1723
|
+
manifest = "";
|
|
1724
|
+
|
|
1725
|
+
constructor(data?: PartialMessage<SetApplicationManifestsRequest_Manifest>) {
|
|
1726
|
+
super();
|
|
1727
|
+
proto3.util.initPartial(data, this);
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1731
|
+
static readonly typeName = "liquidmetal.v1alpha1.SetApplicationManifestsRequest.Manifest";
|
|
1732
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1733
|
+
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1734
|
+
{ no: 2, name: "version_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1735
|
+
{ no: 3, name: "manifest", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1736
|
+
]);
|
|
1737
|
+
|
|
1738
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetApplicationManifestsRequest_Manifest {
|
|
1739
|
+
return new SetApplicationManifestsRequest_Manifest().fromBinary(bytes, options);
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetApplicationManifestsRequest_Manifest {
|
|
1743
|
+
return new SetApplicationManifestsRequest_Manifest().fromJson(jsonValue, options);
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetApplicationManifestsRequest_Manifest {
|
|
1747
|
+
return new SetApplicationManifestsRequest_Manifest().fromJsonString(jsonString, options);
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
static equals(a: SetApplicationManifestsRequest_Manifest | PlainMessage<SetApplicationManifestsRequest_Manifest> | undefined, b: SetApplicationManifestsRequest_Manifest | PlainMessage<SetApplicationManifestsRequest_Manifest> | undefined): boolean {
|
|
1751
|
+
return proto3.util.equals(SetApplicationManifestsRequest_Manifest, a, b);
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
/**
|
|
1756
|
+
* @generated from message liquidmetal.v1alpha1.SetApplicationManifestsResponse
|
|
1757
|
+
*/
|
|
1758
|
+
export class SetApplicationManifestsResponse extends Message<SetApplicationManifestsResponse> {
|
|
1759
|
+
/**
|
|
1760
|
+
* @generated from field: repeated liquidmetal.v1alpha1.SetApplicationManifestsResponse.Application success = 1;
|
|
1761
|
+
*/
|
|
1762
|
+
success: SetApplicationManifestsResponse_Application[] = [];
|
|
1763
|
+
|
|
1764
|
+
/**
|
|
1765
|
+
* @generated from field: repeated liquidmetal.v1alpha1.SetApplicationManifestsResponse.Application failure = 2;
|
|
1766
|
+
*/
|
|
1767
|
+
failure: SetApplicationManifestsResponse_Application[] = [];
|
|
1768
|
+
|
|
1769
|
+
constructor(data?: PartialMessage<SetApplicationManifestsResponse>) {
|
|
1770
|
+
super();
|
|
1771
|
+
proto3.util.initPartial(data, this);
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1775
|
+
static readonly typeName = "liquidmetal.v1alpha1.SetApplicationManifestsResponse";
|
|
1776
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1777
|
+
{ no: 1, name: "success", kind: "message", T: SetApplicationManifestsResponse_Application, repeated: true },
|
|
1778
|
+
{ no: 2, name: "failure", kind: "message", T: SetApplicationManifestsResponse_Application, repeated: true },
|
|
1779
|
+
]);
|
|
1780
|
+
|
|
1781
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetApplicationManifestsResponse {
|
|
1782
|
+
return new SetApplicationManifestsResponse().fromBinary(bytes, options);
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetApplicationManifestsResponse {
|
|
1786
|
+
return new SetApplicationManifestsResponse().fromJson(jsonValue, options);
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetApplicationManifestsResponse {
|
|
1790
|
+
return new SetApplicationManifestsResponse().fromJsonString(jsonString, options);
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
static equals(a: SetApplicationManifestsResponse | PlainMessage<SetApplicationManifestsResponse> | undefined, b: SetApplicationManifestsResponse | PlainMessage<SetApplicationManifestsResponse> | undefined): boolean {
|
|
1794
|
+
return proto3.util.equals(SetApplicationManifestsResponse, a, b);
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
/**
|
|
1799
|
+
* @generated from message liquidmetal.v1alpha1.SetApplicationManifestsResponse.Application
|
|
1800
|
+
*/
|
|
1801
|
+
export class SetApplicationManifestsResponse_Application extends Message<SetApplicationManifestsResponse_Application> {
|
|
1802
|
+
/**
|
|
1803
|
+
* @generated from field: string name = 1;
|
|
1804
|
+
*/
|
|
1805
|
+
name = "";
|
|
1806
|
+
|
|
1807
|
+
/**
|
|
1808
|
+
* @generated from field: string version_id = 2;
|
|
1809
|
+
*/
|
|
1810
|
+
versionId = "";
|
|
1811
|
+
|
|
1812
|
+
constructor(data?: PartialMessage<SetApplicationManifestsResponse_Application>) {
|
|
1813
|
+
super();
|
|
1814
|
+
proto3.util.initPartial(data, this);
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1818
|
+
static readonly typeName = "liquidmetal.v1alpha1.SetApplicationManifestsResponse.Application";
|
|
1819
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1820
|
+
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1821
|
+
{ no: 2, name: "version_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1822
|
+
]);
|
|
1823
|
+
|
|
1824
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetApplicationManifestsResponse_Application {
|
|
1825
|
+
return new SetApplicationManifestsResponse_Application().fromBinary(bytes, options);
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetApplicationManifestsResponse_Application {
|
|
1829
|
+
return new SetApplicationManifestsResponse_Application().fromJson(jsonValue, options);
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetApplicationManifestsResponse_Application {
|
|
1833
|
+
return new SetApplicationManifestsResponse_Application().fromJsonString(jsonString, options);
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
static equals(a: SetApplicationManifestsResponse_Application | PlainMessage<SetApplicationManifestsResponse_Application> | undefined, b: SetApplicationManifestsResponse_Application | PlainMessage<SetApplicationManifestsResponse_Application> | undefined): boolean {
|
|
1837
|
+
return proto3.util.equals(SetApplicationManifestsResponse_Application, a, b);
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1467
1841
|
/**
|
|
1468
1842
|
* @generated from message liquidmetal.v1alpha1.DeleteApplicationsRequest
|
|
1469
1843
|
*/
|
package/src/unsafe/codestore.ts
CHANGED
|
@@ -12,11 +12,20 @@ export class FileSystemBundle extends BundleBase implements Bundle {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
async list(): Promise<string[]> {
|
|
15
|
-
|
|
15
|
+
// readdir is fine but we have to filter out the directories
|
|
16
|
+
const flatList = await fs.readdir(this.root, { recursive: true })
|
|
17
|
+
const files = []
|
|
18
|
+
for (const ent of flatList) {
|
|
19
|
+
const stat = await fs.stat(path.join(this.root, ent));
|
|
20
|
+
if (stat.isFile()) {
|
|
21
|
+
files.push(ent);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return files;
|
|
16
25
|
}
|
|
17
26
|
|
|
18
27
|
async read(name: string): Promise<Buffer> {
|
|
19
|
-
return fs.readFile(path.join(this.root, name));
|
|
28
|
+
return await fs.readFile(path.join(this.root, name));
|
|
20
29
|
}
|
|
21
30
|
|
|
22
31
|
async write(name: string, content: Buffer): Promise<void> {
|