@dxos/config 2.16.3 → 2.16.7
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/src/config.d.ts +20 -4
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +26 -3
- package/dist/src/config.js.map +1 -1
- package/dist/src/config.test.d.ts.map +1 -1
- package/dist/src/config.test.js +30 -24
- package/dist/src/config.test.js.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +14 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/loaders/index.d.ts +5 -4
- package/dist/src/loaders/index.d.ts.map +1 -1
- package/dist/src/loaders/index.js +2 -2
- package/dist/src/loaders/index.js.map +1 -1
- package/dist/src/proto/gen/dxos/config.d.ts +238 -0
- package/dist/src/proto/gen/dxos/config.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/config.js +20 -0
- package/dist/src/proto/gen/dxos/config.js.map +1 -0
- package/dist/src/proto/gen/google/protobuf.d.ts +246 -0
- package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -0
- package/dist/src/proto/gen/google/protobuf.js +58 -0
- package/dist/src/proto/gen/google/protobuf.js.map +1 -0
- package/dist/src/proto/gen/index.d.ts +58 -0
- package/dist/src/proto/gen/index.d.ts.map +1 -0
- package/dist/src/proto/gen/index.js +7 -0
- package/dist/src/proto/gen/index.js.map +1 -0
- package/dist/src/sanitizer.d.ts +4 -0
- package/dist/src/sanitizer.d.ts.map +1 -0
- package/dist/src/sanitizer.js +40 -0
- package/dist/src/sanitizer.js.map +1 -0
- package/dist/src/types.d.ts +31 -30
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -4
- package/dist/src/schema-validator.d.ts +0 -2
- package/dist/src/schema-validator.d.ts.map +0 -1
- package/dist/src/schema-validator.js +0 -21
- package/dist/src/schema-validator.js.map +0 -1
- package/dist/src/schema.json +0 -110
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
export interface Timestamp {
|
|
2
|
+
seconds?: string;
|
|
3
|
+
nanos?: number;
|
|
4
|
+
}
|
|
5
|
+
export interface FileDescriptorSet {
|
|
6
|
+
file?: FileDescriptorProto[];
|
|
7
|
+
}
|
|
8
|
+
export interface FileDescriptorProto {
|
|
9
|
+
name?: string;
|
|
10
|
+
package?: string;
|
|
11
|
+
dependency?: string[];
|
|
12
|
+
/**
|
|
13
|
+
* Options:
|
|
14
|
+
* - packed = false
|
|
15
|
+
*/
|
|
16
|
+
publicDependency?: number[];
|
|
17
|
+
/**
|
|
18
|
+
* Options:
|
|
19
|
+
* - packed = false
|
|
20
|
+
*/
|
|
21
|
+
weakDependency?: number[];
|
|
22
|
+
messageType?: DescriptorProto[];
|
|
23
|
+
enumType?: EnumDescriptorProto[];
|
|
24
|
+
service?: ServiceDescriptorProto[];
|
|
25
|
+
extension?: FieldDescriptorProto[];
|
|
26
|
+
options?: FileOptions;
|
|
27
|
+
sourceCodeInfo?: SourceCodeInfo;
|
|
28
|
+
syntax?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface DescriptorProto {
|
|
31
|
+
name?: string;
|
|
32
|
+
field?: FieldDescriptorProto[];
|
|
33
|
+
extension?: FieldDescriptorProto[];
|
|
34
|
+
nestedType?: DescriptorProto[];
|
|
35
|
+
enumType?: EnumDescriptorProto[];
|
|
36
|
+
extensionRange?: DescriptorProto.ExtensionRange[];
|
|
37
|
+
oneofDecl?: OneofDescriptorProto[];
|
|
38
|
+
options?: MessageOptions;
|
|
39
|
+
reservedRange?: DescriptorProto.ReservedRange[];
|
|
40
|
+
reservedName?: string[];
|
|
41
|
+
}
|
|
42
|
+
export declare namespace DescriptorProto {
|
|
43
|
+
interface ExtensionRange {
|
|
44
|
+
start?: number;
|
|
45
|
+
end?: number;
|
|
46
|
+
}
|
|
47
|
+
interface ReservedRange {
|
|
48
|
+
start?: number;
|
|
49
|
+
end?: number;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export interface FieldDescriptorProto {
|
|
53
|
+
name?: string;
|
|
54
|
+
number?: number;
|
|
55
|
+
label?: FieldDescriptorProto.Label;
|
|
56
|
+
type?: FieldDescriptorProto.Type;
|
|
57
|
+
typeName?: string;
|
|
58
|
+
extendee?: string;
|
|
59
|
+
defaultValue?: string;
|
|
60
|
+
oneofIndex?: number;
|
|
61
|
+
jsonName?: string;
|
|
62
|
+
options?: FieldOptions;
|
|
63
|
+
}
|
|
64
|
+
export declare namespace FieldDescriptorProto {
|
|
65
|
+
enum Type {
|
|
66
|
+
TYPE_DOUBLE = 1,
|
|
67
|
+
TYPE_FLOAT = 2,
|
|
68
|
+
TYPE_INT64 = 3,
|
|
69
|
+
TYPE_UINT64 = 4,
|
|
70
|
+
TYPE_INT32 = 5,
|
|
71
|
+
TYPE_FIXED64 = 6,
|
|
72
|
+
TYPE_FIXED32 = 7,
|
|
73
|
+
TYPE_BOOL = 8,
|
|
74
|
+
TYPE_STRING = 9,
|
|
75
|
+
TYPE_GROUP = 10,
|
|
76
|
+
TYPE_MESSAGE = 11,
|
|
77
|
+
TYPE_BYTES = 12,
|
|
78
|
+
TYPE_UINT32 = 13,
|
|
79
|
+
TYPE_ENUM = 14,
|
|
80
|
+
TYPE_SFIXED32 = 15,
|
|
81
|
+
TYPE_SFIXED64 = 16,
|
|
82
|
+
TYPE_SINT32 = 17,
|
|
83
|
+
TYPE_SINT64 = 18
|
|
84
|
+
}
|
|
85
|
+
enum Label {
|
|
86
|
+
LABEL_OPTIONAL = 1,
|
|
87
|
+
LABEL_REQUIRED = 2,
|
|
88
|
+
LABEL_REPEATED = 3
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
export interface OneofDescriptorProto {
|
|
92
|
+
name?: string;
|
|
93
|
+
options?: OneofOptions;
|
|
94
|
+
}
|
|
95
|
+
export interface EnumDescriptorProto {
|
|
96
|
+
name?: string;
|
|
97
|
+
value?: EnumValueDescriptorProto[];
|
|
98
|
+
options?: EnumOptions;
|
|
99
|
+
}
|
|
100
|
+
export interface EnumValueDescriptorProto {
|
|
101
|
+
name?: string;
|
|
102
|
+
number?: number;
|
|
103
|
+
options?: EnumValueOptions;
|
|
104
|
+
}
|
|
105
|
+
export interface ServiceDescriptorProto {
|
|
106
|
+
name?: string;
|
|
107
|
+
method?: MethodDescriptorProto[];
|
|
108
|
+
options?: ServiceOptions;
|
|
109
|
+
}
|
|
110
|
+
export interface MethodDescriptorProto {
|
|
111
|
+
name?: string;
|
|
112
|
+
inputType?: string;
|
|
113
|
+
outputType?: string;
|
|
114
|
+
options?: MethodOptions;
|
|
115
|
+
clientStreaming?: boolean;
|
|
116
|
+
serverStreaming?: boolean;
|
|
117
|
+
}
|
|
118
|
+
export interface FileOptions {
|
|
119
|
+
javaPackage?: string;
|
|
120
|
+
javaOuterClassname?: string;
|
|
121
|
+
javaMultipleFiles?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Options:
|
|
124
|
+
* - deprecated = true
|
|
125
|
+
*/
|
|
126
|
+
javaGenerateEqualsAndHash?: boolean;
|
|
127
|
+
javaStringCheckUtf8?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Options:
|
|
130
|
+
* - default = "SPEED"
|
|
131
|
+
*/
|
|
132
|
+
optimizeFor?: FileOptions.OptimizeMode;
|
|
133
|
+
goPackage?: string;
|
|
134
|
+
ccGenericServices?: boolean;
|
|
135
|
+
javaGenericServices?: boolean;
|
|
136
|
+
pyGenericServices?: boolean;
|
|
137
|
+
deprecated?: boolean;
|
|
138
|
+
ccEnableArenas?: boolean;
|
|
139
|
+
objcClassPrefix?: string;
|
|
140
|
+
csharpNamespace?: string;
|
|
141
|
+
uninterpretedOption?: UninterpretedOption[];
|
|
142
|
+
}
|
|
143
|
+
export declare namespace FileOptions {
|
|
144
|
+
enum OptimizeMode {
|
|
145
|
+
SPEED = 1,
|
|
146
|
+
CODE_SIZE = 2,
|
|
147
|
+
LITE_RUNTIME = 3
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
export interface MessageOptions {
|
|
151
|
+
messageSetWireFormat?: boolean;
|
|
152
|
+
noStandardDescriptorAccessor?: boolean;
|
|
153
|
+
deprecated?: boolean;
|
|
154
|
+
mapEntry?: boolean;
|
|
155
|
+
uninterpretedOption?: UninterpretedOption[];
|
|
156
|
+
}
|
|
157
|
+
export interface FieldOptions {
|
|
158
|
+
/**
|
|
159
|
+
* Options:
|
|
160
|
+
* - default = "STRING"
|
|
161
|
+
*/
|
|
162
|
+
ctype?: FieldOptions.CType;
|
|
163
|
+
packed?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Options:
|
|
166
|
+
* - default = "JS_NORMAL"
|
|
167
|
+
*/
|
|
168
|
+
jstype?: FieldOptions.JSType;
|
|
169
|
+
lazy?: boolean;
|
|
170
|
+
deprecated?: boolean;
|
|
171
|
+
weak?: boolean;
|
|
172
|
+
uninterpretedOption?: UninterpretedOption[];
|
|
173
|
+
".dxos.config.env"?: string;
|
|
174
|
+
".dxos.config.regex"?: string;
|
|
175
|
+
}
|
|
176
|
+
export declare namespace FieldOptions {
|
|
177
|
+
enum CType {
|
|
178
|
+
STRING = 0,
|
|
179
|
+
CORD = 1,
|
|
180
|
+
STRING_PIECE = 2
|
|
181
|
+
}
|
|
182
|
+
enum JSType {
|
|
183
|
+
JS_NORMAL = 0,
|
|
184
|
+
JS_STRING = 1,
|
|
185
|
+
JS_NUMBER = 2
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
export interface OneofOptions {
|
|
189
|
+
uninterpretedOption?: UninterpretedOption[];
|
|
190
|
+
}
|
|
191
|
+
export interface EnumOptions {
|
|
192
|
+
allowAlias?: boolean;
|
|
193
|
+
deprecated?: boolean;
|
|
194
|
+
uninterpretedOption?: UninterpretedOption[];
|
|
195
|
+
}
|
|
196
|
+
export interface EnumValueOptions {
|
|
197
|
+
deprecated?: boolean;
|
|
198
|
+
uninterpretedOption?: UninterpretedOption[];
|
|
199
|
+
}
|
|
200
|
+
export interface ServiceOptions {
|
|
201
|
+
deprecated?: boolean;
|
|
202
|
+
uninterpretedOption?: UninterpretedOption[];
|
|
203
|
+
}
|
|
204
|
+
export interface MethodOptions {
|
|
205
|
+
deprecated?: boolean;
|
|
206
|
+
uninterpretedOption?: UninterpretedOption[];
|
|
207
|
+
}
|
|
208
|
+
export interface UninterpretedOption {
|
|
209
|
+
name?: UninterpretedOption.NamePart[];
|
|
210
|
+
identifierValue?: string;
|
|
211
|
+
positiveIntValue?: string;
|
|
212
|
+
negativeIntValue?: string;
|
|
213
|
+
doubleValue?: number;
|
|
214
|
+
stringValue?: Uint8Array;
|
|
215
|
+
aggregateValue?: string;
|
|
216
|
+
}
|
|
217
|
+
export declare namespace UninterpretedOption {
|
|
218
|
+
interface NamePart {
|
|
219
|
+
namePart: string;
|
|
220
|
+
isExtension: boolean;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
export interface SourceCodeInfo {
|
|
224
|
+
location?: SourceCodeInfo.Location[];
|
|
225
|
+
}
|
|
226
|
+
export declare namespace SourceCodeInfo {
|
|
227
|
+
interface Location {
|
|
228
|
+
path?: number[];
|
|
229
|
+
span?: number[];
|
|
230
|
+
leadingComments?: string;
|
|
231
|
+
trailingComments?: string;
|
|
232
|
+
leadingDetachedComments?: string[];
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
export interface GeneratedCodeInfo {
|
|
236
|
+
annotation?: GeneratedCodeInfo.Annotation[];
|
|
237
|
+
}
|
|
238
|
+
export declare namespace GeneratedCodeInfo {
|
|
239
|
+
interface Annotation {
|
|
240
|
+
path?: number[];
|
|
241
|
+
sourceFile?: string;
|
|
242
|
+
begin?: number;
|
|
243
|
+
end?: number;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=protobuf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protobuf.d.ts","sourceRoot":"","sources":["../../../../../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yBAAiB,iBAAiB,CAAC;IAC/B,UAAiB,UAAU;QACvB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,GAAG,CAAC,EAAE,MAAM,CAAC;KAChB;CACJ"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FieldOptions = exports.FileOptions = exports.FieldDescriptorProto = void 0;
|
|
4
|
+
var FieldDescriptorProto;
|
|
5
|
+
(function (FieldDescriptorProto) {
|
|
6
|
+
let Type;
|
|
7
|
+
(function (Type) {
|
|
8
|
+
Type[Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE";
|
|
9
|
+
Type[Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT";
|
|
10
|
+
Type[Type["TYPE_INT64"] = 3] = "TYPE_INT64";
|
|
11
|
+
Type[Type["TYPE_UINT64"] = 4] = "TYPE_UINT64";
|
|
12
|
+
Type[Type["TYPE_INT32"] = 5] = "TYPE_INT32";
|
|
13
|
+
Type[Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64";
|
|
14
|
+
Type[Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32";
|
|
15
|
+
Type[Type["TYPE_BOOL"] = 8] = "TYPE_BOOL";
|
|
16
|
+
Type[Type["TYPE_STRING"] = 9] = "TYPE_STRING";
|
|
17
|
+
Type[Type["TYPE_GROUP"] = 10] = "TYPE_GROUP";
|
|
18
|
+
Type[Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE";
|
|
19
|
+
Type[Type["TYPE_BYTES"] = 12] = "TYPE_BYTES";
|
|
20
|
+
Type[Type["TYPE_UINT32"] = 13] = "TYPE_UINT32";
|
|
21
|
+
Type[Type["TYPE_ENUM"] = 14] = "TYPE_ENUM";
|
|
22
|
+
Type[Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32";
|
|
23
|
+
Type[Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64";
|
|
24
|
+
Type[Type["TYPE_SINT32"] = 17] = "TYPE_SINT32";
|
|
25
|
+
Type[Type["TYPE_SINT64"] = 18] = "TYPE_SINT64";
|
|
26
|
+
})(Type = FieldDescriptorProto.Type || (FieldDescriptorProto.Type = {}));
|
|
27
|
+
let Label;
|
|
28
|
+
(function (Label) {
|
|
29
|
+
Label[Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL";
|
|
30
|
+
Label[Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED";
|
|
31
|
+
Label[Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED";
|
|
32
|
+
})(Label = FieldDescriptorProto.Label || (FieldDescriptorProto.Label = {}));
|
|
33
|
+
})(FieldDescriptorProto = exports.FieldDescriptorProto || (exports.FieldDescriptorProto = {}));
|
|
34
|
+
var FileOptions;
|
|
35
|
+
(function (FileOptions) {
|
|
36
|
+
let OptimizeMode;
|
|
37
|
+
(function (OptimizeMode) {
|
|
38
|
+
OptimizeMode[OptimizeMode["SPEED"] = 1] = "SPEED";
|
|
39
|
+
OptimizeMode[OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE";
|
|
40
|
+
OptimizeMode[OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME";
|
|
41
|
+
})(OptimizeMode = FileOptions.OptimizeMode || (FileOptions.OptimizeMode = {}));
|
|
42
|
+
})(FileOptions = exports.FileOptions || (exports.FileOptions = {}));
|
|
43
|
+
var FieldOptions;
|
|
44
|
+
(function (FieldOptions) {
|
|
45
|
+
let CType;
|
|
46
|
+
(function (CType) {
|
|
47
|
+
CType[CType["STRING"] = 0] = "STRING";
|
|
48
|
+
CType[CType["CORD"] = 1] = "CORD";
|
|
49
|
+
CType[CType["STRING_PIECE"] = 2] = "STRING_PIECE";
|
|
50
|
+
})(CType = FieldOptions.CType || (FieldOptions.CType = {}));
|
|
51
|
+
let JSType;
|
|
52
|
+
(function (JSType) {
|
|
53
|
+
JSType[JSType["JS_NORMAL"] = 0] = "JS_NORMAL";
|
|
54
|
+
JSType[JSType["JS_STRING"] = 1] = "JS_STRING";
|
|
55
|
+
JSType[JSType["JS_NUMBER"] = 2] = "JS_NUMBER";
|
|
56
|
+
})(JSType = FieldOptions.JSType || (FieldOptions.JSType = {}));
|
|
57
|
+
})(FieldOptions = exports.FieldOptions || (exports.FieldOptions = {}));
|
|
58
|
+
//# sourceMappingURL=protobuf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protobuf.js","sourceRoot":"","sources":["../../../../../src/proto/gen/google/protobuf.ts"],"names":[],"mappings":";;;AAiEA,IAAiB,oBAAoB,CA0BpC;AA1BD,WAAiB,oBAAoB;IACjC,IAAY,IAmBX;IAnBD,WAAY,IAAI;QACZ,6CAAe,CAAA;QACf,2CAAc,CAAA;QACd,2CAAc,CAAA;QACd,6CAAe,CAAA;QACf,2CAAc,CAAA;QACd,+CAAgB,CAAA;QAChB,+CAAgB,CAAA;QAChB,yCAAa,CAAA;QACb,6CAAe,CAAA;QACf,4CAAe,CAAA;QACf,gDAAiB,CAAA;QACjB,4CAAe,CAAA;QACf,8CAAgB,CAAA;QAChB,0CAAc,CAAA;QACd,kDAAkB,CAAA;QAClB,kDAAkB,CAAA;QAClB,8CAAgB,CAAA;QAChB,8CAAgB,CAAA;IACpB,CAAC,EAnBW,IAAI,GAAJ,yBAAI,KAAJ,yBAAI,QAmBf;IACD,IAAY,KAIX;IAJD,WAAY,KAAK;QACb,qDAAkB,CAAA;QAClB,qDAAkB,CAAA;QAClB,qDAAkB,CAAA;IACtB,CAAC,EAJW,KAAK,GAAL,0BAAK,KAAL,0BAAK,QAIhB;AACL,CAAC,EA1BgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QA0BpC;AAqDD,IAAiB,WAAW,CAM3B;AAND,WAAiB,WAAW;IACxB,IAAY,YAIX;IAJD,WAAY,YAAY;QACpB,iDAAS,CAAA;QACT,yDAAa,CAAA;QACb,+DAAgB,CAAA;IACpB,CAAC,EAJW,YAAY,GAAZ,wBAAY,KAAZ,wBAAY,QAIvB;AACL,CAAC,EANgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAM3B;AA2BD,IAAiB,YAAY,CAW5B;AAXD,WAAiB,YAAY;IACzB,IAAY,KAIX;IAJD,WAAY,KAAK;QACb,qCAAU,CAAA;QACV,iCAAQ,CAAA;QACR,iDAAgB,CAAA;IACpB,CAAC,EAJW,KAAK,GAAL,kBAAK,KAAL,kBAAK,QAIhB;IACD,IAAY,MAIX;IAJD,WAAY,MAAM;QACd,6CAAa,CAAA;QACb,6CAAa,CAAA;QACb,6CAAa,CAAA;IACjB,CAAC,EAJW,MAAM,GAAN,mBAAM,KAAN,mBAAM,QAIjB;AACL,CAAC,EAXgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAW5B"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Schema } from "@dxos/codec-protobuf";
|
|
2
|
+
import * as dxos_config from "./dxos/config";
|
|
3
|
+
import * as google_protobuf from "./google/protobuf";
|
|
4
|
+
export interface TYPES {
|
|
5
|
+
"dxos.config.App": dxos_config.App;
|
|
6
|
+
"dxos.config.Bot": dxos_config.Bot;
|
|
7
|
+
"dxos.config.Bot.Ipc": dxos_config.Bot.Ipc;
|
|
8
|
+
"dxos.config.Build": dxos_config.Build;
|
|
9
|
+
"dxos.config.CLI": dxos_config.CLI;
|
|
10
|
+
"dxos.config.Config": dxos_config.Config;
|
|
11
|
+
"dxos.config.Services": dxos_config.Services;
|
|
12
|
+
"dxos.config.Services.AppServer": dxos_config.Services.AppServer;
|
|
13
|
+
"dxos.config.Services.Dxns": dxos_config.Services.Dxns;
|
|
14
|
+
"dxos.config.Services.Ice": dxos_config.Services.Ice;
|
|
15
|
+
"dxos.config.Services.Ipfs": dxos_config.Services.Ipfs;
|
|
16
|
+
"dxos.config.Services.Kube": dxos_config.Services.Kube;
|
|
17
|
+
"dxos.config.Services.Kube.Endpoints": dxos_config.Services.Kube.Endpoints;
|
|
18
|
+
"dxos.config.Services.Signal": dxos_config.Services.Signal;
|
|
19
|
+
"dxos.config.System": dxos_config.System;
|
|
20
|
+
"dxos.config.System.Storage": dxos_config.System.Storage;
|
|
21
|
+
"dxos.config.System.Storage.StorageDriver": dxos_config.System.Storage.StorageDriver;
|
|
22
|
+
"google.protobuf.DescriptorProto": google_protobuf.DescriptorProto;
|
|
23
|
+
"google.protobuf.DescriptorProto.ExtensionRange": google_protobuf.DescriptorProto.ExtensionRange;
|
|
24
|
+
"google.protobuf.DescriptorProto.ReservedRange": google_protobuf.DescriptorProto.ReservedRange;
|
|
25
|
+
"google.protobuf.EnumDescriptorProto": google_protobuf.EnumDescriptorProto;
|
|
26
|
+
"google.protobuf.EnumOptions": google_protobuf.EnumOptions;
|
|
27
|
+
"google.protobuf.EnumValueDescriptorProto": google_protobuf.EnumValueDescriptorProto;
|
|
28
|
+
"google.protobuf.EnumValueOptions": google_protobuf.EnumValueOptions;
|
|
29
|
+
"google.protobuf.FieldDescriptorProto": google_protobuf.FieldDescriptorProto;
|
|
30
|
+
"google.protobuf.FieldDescriptorProto.Label": google_protobuf.FieldDescriptorProto.Label;
|
|
31
|
+
"google.protobuf.FieldDescriptorProto.Type": google_protobuf.FieldDescriptorProto.Type;
|
|
32
|
+
"google.protobuf.FieldOptions": google_protobuf.FieldOptions;
|
|
33
|
+
"google.protobuf.FieldOptions.CType": google_protobuf.FieldOptions.CType;
|
|
34
|
+
"google.protobuf.FieldOptions.JSType": google_protobuf.FieldOptions.JSType;
|
|
35
|
+
"google.protobuf.FileDescriptorProto": google_protobuf.FileDescriptorProto;
|
|
36
|
+
"google.protobuf.FileDescriptorSet": google_protobuf.FileDescriptorSet;
|
|
37
|
+
"google.protobuf.FileOptions": google_protobuf.FileOptions;
|
|
38
|
+
"google.protobuf.FileOptions.OptimizeMode": google_protobuf.FileOptions.OptimizeMode;
|
|
39
|
+
"google.protobuf.GeneratedCodeInfo": google_protobuf.GeneratedCodeInfo;
|
|
40
|
+
"google.protobuf.GeneratedCodeInfo.Annotation": google_protobuf.GeneratedCodeInfo.Annotation;
|
|
41
|
+
"google.protobuf.MessageOptions": google_protobuf.MessageOptions;
|
|
42
|
+
"google.protobuf.MethodDescriptorProto": google_protobuf.MethodDescriptorProto;
|
|
43
|
+
"google.protobuf.MethodOptions": google_protobuf.MethodOptions;
|
|
44
|
+
"google.protobuf.OneofDescriptorProto": google_protobuf.OneofDescriptorProto;
|
|
45
|
+
"google.protobuf.OneofOptions": google_protobuf.OneofOptions;
|
|
46
|
+
"google.protobuf.ServiceDescriptorProto": google_protobuf.ServiceDescriptorProto;
|
|
47
|
+
"google.protobuf.ServiceOptions": google_protobuf.ServiceOptions;
|
|
48
|
+
"google.protobuf.SourceCodeInfo": google_protobuf.SourceCodeInfo;
|
|
49
|
+
"google.protobuf.SourceCodeInfo.Location": google_protobuf.SourceCodeInfo.Location;
|
|
50
|
+
"google.protobuf.Timestamp": google_protobuf.Timestamp;
|
|
51
|
+
"google.protobuf.UninterpretedOption": google_protobuf.UninterpretedOption;
|
|
52
|
+
"google.protobuf.UninterpretedOption.NamePart": google_protobuf.UninterpretedOption.NamePart;
|
|
53
|
+
}
|
|
54
|
+
export interface SERVICES {
|
|
55
|
+
}
|
|
56
|
+
export declare const schemaJson: any;
|
|
57
|
+
export declare const schema: Schema<TYPES, SERVICES>;
|
|
58
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/proto/gen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AACrD,M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AmB,CAAC,QAAQ,CAAC;CAChG;AACD,MAAM,WAAW,QAAQ;CACxB;AACD,eAAO,MAAM,UAAU,KAAgre,CAAC;AACxse,eAAO,MAAM,MAAM,yBAA+C,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schema = exports.schemaJson = void 0;
|
|
4
|
+
const codec_protobuf_1 = require("@dxos/codec-protobuf");
|
|
5
|
+
exports.schemaJson = JSON.parse("{\"nested\":{\"dxos\":{\"nested\":{\"config\":{\"nested\":{\"App\":{\"fields\":{\"title\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"org\":{\"type\":\"string\",\"id\":2,\"comment\":null},\"theme\":{\"type\":\"string\",\"id\":3,\"comment\":null},\"website\":{\"type\":\"string\",\"id\":4,\"comment\":null},\"publicUrl\":{\"type\":\"string\",\"id\":5,\"options\":{\"(env)\":\"PUBLIC_URL\"},\"comment\":null}},\"comment\":\"App configuration\"},\"Bot\":{\"fields\":{\"uid\":{\"type\":\"string\",\"id\":1,\"options\":{\"(env)\":\"UID\"},\"comment\":null},\"name\":{\"type\":\"string\",\"id\":2,\"options\":{\"(env)\":\"NAME\"},\"comment\":null},\"cwd\":{\"type\":\"string\",\"id\":3,\"options\":{\"(env)\":\"CWD\"},\"comment\":null},\"restarted\":{\"type\":\"bool\",\"id\":4,\"options\":{\"(env)\":\"RESTARTED\"},\"comment\":null},\"reset\":{\"type\":\"bool\",\"id\":5,\"options\":{\"(env)\":\"RESET\"},\"comment\":null},\"peerId\":{\"type\":\"string\",\"id\":6,\"options\":{\"(env)\":\"PEER_ID\"},\"comment\":null},\"topic\":{\"type\":\"string\",\"id\":7,\"options\":{\"(env)\":\"TOPIC\"},\"comment\":null},\"secretKey\":{\"type\":\"string\",\"id\":8,\"options\":{\"(env)\":\"SECRET_KEY\"},\"comment\":null},\"localDev\":{\"type\":\"bool\",\"id\":9,\"options\":{\"(env)\":\"LOCAL_DEV\"},\"comment\":null},\"nodePath\":{\"type\":\"string\",\"id\":10,\"options\":{\"(env)\":\"NODE_PATH\"},\"comment\":null},\"controlTopic\":{\"type\":\"string\",\"id\":11,\"options\":{\"(env)\":\"CONTROL_TOPIC\"},\"comment\":null},\"dumpFile\":{\"type\":\"string\",\"id\":12,\"options\":{\"(env)\":\"DUMP_FILE\"},\"comment\":null},\"ipc\":{\"type\":\"Ipc\",\"id\":13,\"options\":{\"(env)\":\"IPC\"},\"comment\":null}},\"nested\":{\"Ipc\":{\"fields\":{\"portFrom\":{\"type\":\"int32\",\"id\":1,\"options\":{\"(env)\":\"PORT_FROM\"},\"comment\":null},\"portTo\":{\"type\":\"int32\",\"id\":2,\"options\":{\"(env)\":\"PORT_TO\"},\"comment\":null},\"serverId\":{\"type\":\"string\",\"id\":3,\"options\":{\"(env)\":\"SERVER_ID\"},\"comment\":null}},\"comment\":null}},\"comment\":\"Bot configuration\"},\"Build\":{\"fields\":{\"version\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"commitHash\":{\"type\":\"string\",\"id\":2,\"comment\":null},\"timestamp\":{\"type\":\"google.protobuf.Timestamp\",\"id\":3,\"comment\":null}},\"comment\":\"Build metadata\"},\"CLI\":{\"fields\":{\"nodePath\":{\"type\":\"string\",\"id\":1,\"comment\":null}},\"comment\":null},\"Config\":{\"fields\":{\"system\":{\"type\":\"System\",\"id\":1,\"options\":{\"(env)\":\"SYSTEM\"},\"comment\":null},\"services\":{\"type\":\"Services\",\"id\":2,\"comment\":null},\"build\":{\"type\":\"Build\",\"id\":11,\"comment\":\"Build metdata\"},\"app\":{\"type\":\"App\",\"id\":101,\"options\":{\"(env)\":\"APP\"},\"comment\":\"App configuration. Incuded if this configuration is for an app.\"},\"bot\":{\"type\":\"Bot\",\"id\":102,\"options\":{\"(env)\":\"BOT\"},\"comment\":\"App configuration. Incuded if this configuration is for a bot.\"},\"cli\":{\"type\":\"CLI\",\"id\":103,\"comment\":\"CLI configuration.\"},\"custom\":{\"keyType\":\"string\",\"type\":\"string\",\"id\":1001,\"comment\":\"Custom configuration as string key-value pairs.\"}},\"comment\":null},\"env\":{\"type\":\"string\",\"id\":5001,\"extend\":\"google.protobuf.FieldOptions\",\"comment\":\"Name of the system env variable this config option maps to.\\nFor nested defintions names are concatenated with underscores.\"},\"regex\":{\"type\":\"string\",\"id\":5002,\"extend\":\"google.protobuf.FieldOptions\",\"comment\":\"Regex to validate string options.\"},\"Services\":{\"fields\":{\"kube\":{\"type\":\"Kube\",\"id\":1,\"comment\":null},\"appServer\":{\"type\":\"AppServer\",\"id\":2,\"comment\":null},\"dxns\":{\"type\":\"Dxns\",\"id\":3,\"comment\":null},\"ipfs\":{\"type\":\"Ipfs\",\"id\":4,\"comment\":null},\"signal\":{\"type\":\"Signal\",\"id\":5,\"comment\":null},\"ice\":{\"rule\":\"repeated\",\"type\":\"Ice\",\"id\":6,\"comment\":null}},\"nested\":{\"AppServer\":{\"fields\":{\"prefix\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"server\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null},\"Dxns\":{\"fields\":{\"server\":{\"type\":\"string\",\"id\":1,\"comment\":\"DXNS endpoint.\"},\"accountUri\":{\"type\":\"string\",\"id\":2,\"comment\":\"Substrate account URI. This is a secret.\\nKUBEs do not serve this with the config but we store it in profile.yml.\\n\\nTODO(dmaretskyi): Deprecate this and move it to keyring.\"}},\"comment\":null},\"Ice\":{\"fields\":{\"urls\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"username\":{\"type\":\"string\",\"id\":2,\"comment\":null},\"credential\":{\"type\":\"string\",\"id\":3,\"comment\":null}},\"comment\":null},\"Ipfs\":{\"fields\":{\"server\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"gateway\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null},\"Kube\":{\"fields\":{\"endpoints\":{\"type\":\"Endpoints\",\"id\":1,\"comment\":null}},\"nested\":{\"Endpoints\":{\"fields\":{\"logs\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"services\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null}},\"comment\":null},\"Signal\":{\"fields\":{\"server\":{\"type\":\"string\",\"id\":1,\"comment\":null}},\"comment\":null}},\"comment\":\"Services provided to all DXOS agents\"},\"System\":{\"fields\":{\"certEndpoint\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"debug\":{\"type\":\"string\",\"id\":2,\"options\":{\"(env)\":\"DEBUG\"},\"comment\":null},\"storage\":{\"type\":\"Storage\",\"id\":3,\"comment\":null},\"enableSnapshots\":{\"type\":\"bool\",\"id\":4,\"comment\":null},\"snapshotInterval\":{\"type\":\"int32\",\"id\":5,\"comment\":\"Milliseconds\"},\"invitationExpiration\":{\"type\":\"int32\",\"id\":6,\"comment\":\"Milliseconds\"}},\"nested\":{\"Storage\":{\"fields\":{\"persistent\":{\"type\":\"bool\",\"id\":1,\"comment\":null},\"storageType\":{\"type\":\"StorageDriver\",\"id\":2,\"comment\":null},\"keyStorage\":{\"type\":\"StorageDriver\",\"id\":3,\"comment\":null},\"path\":{\"type\":\"string\",\"id\":4,\"comment\":null}},\"nested\":{\"StorageDriver\":{\"values\":{\"RAM\":0,\"IDB\":1,\"CHROME\":2,\"FIREFOX\":3,\"NODE\":4,\"LEVELJS\":11,\"JSONDOWN\":12},\"comment\":null,\"comments\":{\"RAM\":null,\"IDB\":null,\"CHROME\":null,\"FIREFOX\":null,\"NODE\":null,\"LEVELJS\":null,\"JSONDOWN\":null}}},\"comment\":null}},\"comment\":null}}}}},\"google\":{\"nested\":{\"protobuf\":{\"nested\":{\"DescriptorProto\":{\"fields\":{\"name\":{\"type\":\"string\",\"id\":1},\"field\":{\"rule\":\"repeated\",\"type\":\"FieldDescriptorProto\",\"id\":2},\"extension\":{\"rule\":\"repeated\",\"type\":\"FieldDescriptorProto\",\"id\":6},\"nestedType\":{\"rule\":\"repeated\",\"type\":\"DescriptorProto\",\"id\":3},\"enumType\":{\"rule\":\"repeated\",\"type\":\"EnumDescriptorProto\",\"id\":4},\"extensionRange\":{\"rule\":\"repeated\",\"type\":\"ExtensionRange\",\"id\":5},\"oneofDecl\":{\"rule\":\"repeated\",\"type\":\"OneofDescriptorProto\",\"id\":8},\"options\":{\"type\":\"MessageOptions\",\"id\":7},\"reservedRange\":{\"rule\":\"repeated\",\"type\":\"ReservedRange\",\"id\":9},\"reservedName\":{\"rule\":\"repeated\",\"type\":\"string\",\"id\":10}},\"nested\":{\"ExtensionRange\":{\"fields\":{\"start\":{\"type\":\"int32\",\"id\":1},\"end\":{\"type\":\"int32\",\"id\":2}},\"comment\":null},\"ReservedRange\":{\"fields\":{\"start\":{\"type\":\"int32\",\"id\":1},\"end\":{\"type\":\"int32\",\"id\":2}},\"comment\":null}},\"comment\":null},\"EnumDescriptorProto\":{\"fields\":{\"name\":{\"type\":\"string\",\"id\":1},\"value\":{\"rule\":\"repeated\",\"type\":\"EnumValueDescriptorProto\",\"id\":2},\"options\":{\"type\":\"EnumOptions\",\"id\":3}},\"comment\":null},\"EnumOptions\":{\"fields\":{\"allowAlias\":{\"type\":\"bool\",\"id\":2},\"deprecated\":{\"type\":\"bool\",\"id\":3},\"uninterpretedOption\":{\"rule\":\"repeated\",\"type\":\"UninterpretedOption\",\"id\":999}},\"extensions\":[[1000,536870911]],\"comment\":null},\"EnumValueDescriptorProto\":{\"fields\":{\"name\":{\"type\":\"string\",\"id\":1},\"number\":{\"type\":\"int32\",\"id\":2},\"options\":{\"type\":\"EnumValueOptions\",\"id\":3}},\"comment\":null},\"EnumValueOptions\":{\"fields\":{\"deprecated\":{\"type\":\"bool\",\"id\":1},\"uninterpretedOption\":{\"rule\":\"repeated\",\"type\":\"UninterpretedOption\",\"id\":999}},\"extensions\":[[1000,536870911]],\"comment\":null},\"FieldDescriptorProto\":{\"fields\":{\"name\":{\"type\":\"string\",\"id\":1},\"number\":{\"type\":\"int32\",\"id\":3},\"label\":{\"type\":\"Label\",\"id\":4},\"type\":{\"type\":\"Type\",\"id\":5},\"typeName\":{\"type\":\"string\",\"id\":6},\"extendee\":{\"type\":\"string\",\"id\":2},\"defaultValue\":{\"type\":\"string\",\"id\":7},\"oneofIndex\":{\"type\":\"int32\",\"id\":9},\"jsonName\":{\"type\":\"string\",\"id\":10},\"options\":{\"type\":\"FieldOptions\",\"id\":8}},\"nested\":{\"Label\":{\"values\":{\"LABEL_OPTIONAL\":1,\"LABEL_REQUIRED\":2,\"LABEL_REPEATED\":3},\"comments\":{}},\"Type\":{\"values\":{\"TYPE_DOUBLE\":1,\"TYPE_FLOAT\":2,\"TYPE_INT64\":3,\"TYPE_UINT64\":4,\"TYPE_INT32\":5,\"TYPE_FIXED64\":6,\"TYPE_FIXED32\":7,\"TYPE_BOOL\":8,\"TYPE_STRING\":9,\"TYPE_GROUP\":10,\"TYPE_MESSAGE\":11,\"TYPE_BYTES\":12,\"TYPE_UINT32\":13,\"TYPE_ENUM\":14,\"TYPE_SFIXED32\":15,\"TYPE_SFIXED64\":16,\"TYPE_SINT32\":17,\"TYPE_SINT64\":18},\"comments\":{}}},\"comment\":null},\"FieldOptions\":{\"fields\":{\"ctype\":{\"type\":\"CType\",\"id\":1,\"options\":{\"default\":\"STRING\"}},\"packed\":{\"type\":\"bool\",\"id\":2},\"jstype\":{\"type\":\"JSType\",\"id\":6,\"options\":{\"default\":\"JS_NORMAL\"}},\"lazy\":{\"type\":\"bool\",\"id\":5},\"deprecated\":{\"type\":\"bool\",\"id\":3},\"weak\":{\"type\":\"bool\",\"id\":10},\"uninterpretedOption\":{\"rule\":\"repeated\",\"type\":\"UninterpretedOption\",\"id\":999}},\"extensions\":[[1000,536870911]],\"reserved\":[[4,4]],\"nested\":{\"CType\":{\"values\":{\"STRING\":0,\"CORD\":1,\"STRING_PIECE\":2},\"comments\":{}},\"JSType\":{\"values\":{\"JS_NORMAL\":0,\"JS_STRING\":1,\"JS_NUMBER\":2},\"comments\":{}}},\"comment\":null},\"FileDescriptorProto\":{\"fields\":{\"name\":{\"type\":\"string\",\"id\":1},\"package\":{\"type\":\"string\",\"id\":2},\"dependency\":{\"rule\":\"repeated\",\"type\":\"string\",\"id\":3},\"publicDependency\":{\"rule\":\"repeated\",\"type\":\"int32\",\"id\":10,\"options\":{\"packed\":false}},\"weakDependency\":{\"rule\":\"repeated\",\"type\":\"int32\",\"id\":11,\"options\":{\"packed\":false}},\"messageType\":{\"rule\":\"repeated\",\"type\":\"DescriptorProto\",\"id\":4},\"enumType\":{\"rule\":\"repeated\",\"type\":\"EnumDescriptorProto\",\"id\":5},\"service\":{\"rule\":\"repeated\",\"type\":\"ServiceDescriptorProto\",\"id\":6},\"extension\":{\"rule\":\"repeated\",\"type\":\"FieldDescriptorProto\",\"id\":7},\"options\":{\"type\":\"FileOptions\",\"id\":8},\"sourceCodeInfo\":{\"type\":\"SourceCodeInfo\",\"id\":9},\"syntax\":{\"type\":\"string\",\"id\":12}},\"comment\":null},\"FileDescriptorSet\":{\"fields\":{\"file\":{\"rule\":\"repeated\",\"type\":\"FileDescriptorProto\",\"id\":1}},\"comment\":null},\"FileOptions\":{\"fields\":{\"javaPackage\":{\"type\":\"string\",\"id\":1},\"javaOuterClassname\":{\"type\":\"string\",\"id\":8},\"javaMultipleFiles\":{\"type\":\"bool\",\"id\":10},\"javaGenerateEqualsAndHash\":{\"type\":\"bool\",\"id\":20,\"options\":{\"deprecated\":true}},\"javaStringCheckUtf8\":{\"type\":\"bool\",\"id\":27},\"optimizeFor\":{\"type\":\"OptimizeMode\",\"id\":9,\"options\":{\"default\":\"SPEED\"}},\"goPackage\":{\"type\":\"string\",\"id\":11},\"ccGenericServices\":{\"type\":\"bool\",\"id\":16},\"javaGenericServices\":{\"type\":\"bool\",\"id\":17},\"pyGenericServices\":{\"type\":\"bool\",\"id\":18},\"deprecated\":{\"type\":\"bool\",\"id\":23},\"ccEnableArenas\":{\"type\":\"bool\",\"id\":31},\"objcClassPrefix\":{\"type\":\"string\",\"id\":36},\"csharpNamespace\":{\"type\":\"string\",\"id\":37},\"uninterpretedOption\":{\"rule\":\"repeated\",\"type\":\"UninterpretedOption\",\"id\":999}},\"extensions\":[[1000,536870911]],\"reserved\":[[38,38]],\"nested\":{\"OptimizeMode\":{\"values\":{\"SPEED\":1,\"CODE_SIZE\":2,\"LITE_RUNTIME\":3},\"comments\":{}}},\"comment\":null},\"GeneratedCodeInfo\":{\"fields\":{\"annotation\":{\"rule\":\"repeated\",\"type\":\"Annotation\",\"id\":1}},\"nested\":{\"Annotation\":{\"fields\":{\"path\":{\"rule\":\"repeated\",\"type\":\"int32\",\"id\":1},\"sourceFile\":{\"type\":\"string\",\"id\":2},\"begin\":{\"type\":\"int32\",\"id\":3},\"end\":{\"type\":\"int32\",\"id\":4}},\"comment\":null}},\"comment\":null},\"MessageOptions\":{\"fields\":{\"messageSetWireFormat\":{\"type\":\"bool\",\"id\":1},\"noStandardDescriptorAccessor\":{\"type\":\"bool\",\"id\":2},\"deprecated\":{\"type\":\"bool\",\"id\":3},\"mapEntry\":{\"type\":\"bool\",\"id\":7},\"uninterpretedOption\":{\"rule\":\"repeated\",\"type\":\"UninterpretedOption\",\"id\":999}},\"extensions\":[[1000,536870911]],\"reserved\":[[8,8]],\"comment\":null},\"MethodDescriptorProto\":{\"fields\":{\"name\":{\"type\":\"string\",\"id\":1},\"inputType\":{\"type\":\"string\",\"id\":2},\"outputType\":{\"type\":\"string\",\"id\":3},\"options\":{\"type\":\"MethodOptions\",\"id\":4},\"clientStreaming\":{\"type\":\"bool\",\"id\":5},\"serverStreaming\":{\"type\":\"bool\",\"id\":6}},\"comment\":null},\"MethodOptions\":{\"fields\":{\"deprecated\":{\"type\":\"bool\",\"id\":33},\"uninterpretedOption\":{\"rule\":\"repeated\",\"type\":\"UninterpretedOption\",\"id\":999}},\"extensions\":[[1000,536870911]],\"comment\":null},\"OneofDescriptorProto\":{\"fields\":{\"name\":{\"type\":\"string\",\"id\":1},\"options\":{\"type\":\"OneofOptions\",\"id\":2}},\"comment\":null},\"OneofOptions\":{\"fields\":{\"uninterpretedOption\":{\"rule\":\"repeated\",\"type\":\"UninterpretedOption\",\"id\":999}},\"extensions\":[[1000,536870911]],\"comment\":null},\"ServiceDescriptorProto\":{\"fields\":{\"name\":{\"type\":\"string\",\"id\":1},\"method\":{\"rule\":\"repeated\",\"type\":\"MethodDescriptorProto\",\"id\":2},\"options\":{\"type\":\"ServiceOptions\",\"id\":3}},\"comment\":null},\"ServiceOptions\":{\"fields\":{\"deprecated\":{\"type\":\"bool\",\"id\":33},\"uninterpretedOption\":{\"rule\":\"repeated\",\"type\":\"UninterpretedOption\",\"id\":999}},\"extensions\":[[1000,536870911]],\"comment\":null},\"SourceCodeInfo\":{\"fields\":{\"location\":{\"rule\":\"repeated\",\"type\":\"Location\",\"id\":1}},\"nested\":{\"Location\":{\"fields\":{\"path\":{\"rule\":\"repeated\",\"type\":\"int32\",\"id\":1},\"span\":{\"rule\":\"repeated\",\"type\":\"int32\",\"id\":2},\"leadingComments\":{\"type\":\"string\",\"id\":3},\"trailingComments\":{\"type\":\"string\",\"id\":4},\"leadingDetachedComments\":{\"rule\":\"repeated\",\"type\":\"string\",\"id\":6}},\"comment\":null}},\"comment\":null},\"Timestamp\":{\"fields\":{\"seconds\":{\"type\":\"int64\",\"id\":1},\"nanos\":{\"type\":\"int32\",\"id\":2}},\"comment\":null},\"UninterpretedOption\":{\"fields\":{\"name\":{\"rule\":\"repeated\",\"type\":\"NamePart\",\"id\":2},\"identifierValue\":{\"type\":\"string\",\"id\":3},\"positiveIntValue\":{\"type\":\"uint64\",\"id\":4},\"negativeIntValue\":{\"type\":\"int64\",\"id\":5},\"doubleValue\":{\"type\":\"double\",\"id\":6},\"stringValue\":{\"type\":\"bytes\",\"id\":7},\"aggregateValue\":{\"type\":\"string\",\"id\":8}},\"nested\":{\"NamePart\":{\"fields\":{\"namePart\":{\"rule\":\"required\",\"type\":\"string\",\"id\":1},\"isExtension\":{\"rule\":\"required\",\"type\":\"bool\",\"id\":2}},\"comment\":null}},\"comment\":null}}}}}}}");
|
|
6
|
+
exports.schema = codec_protobuf_1.Schema.fromJson(exports.schemaJson);
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/proto/gen/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8C;AAuDjC,QAAA,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,iqeAAiqe,CAAC,CAAC;AAC3re,QAAA,MAAM,GAAG,uBAAM,CAAC,QAAQ,CAAkB,kBAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitizer.d.ts","sourceRoot":"","sources":["../../src/sanitizer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEjE,YAAY,EAAE,YAAY,EAAE,CAAC;AAI7B,wBAAgB,cAAc,CAAE,KAAK,EAAE,GAAG,GAAG,YAAY,CAaxD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2021 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.sanitizeConfig = void 0;
|
|
7
|
+
const protobufjs_1 = require("protobufjs");
|
|
8
|
+
const gen_1 = require("./proto/gen");
|
|
9
|
+
const configRootType = gen_1.schema.getCodecForType('dxos.config.Config');
|
|
10
|
+
function sanitizeConfig(value) {
|
|
11
|
+
const error = configRootType.protoType.verify(value);
|
|
12
|
+
if (error) {
|
|
13
|
+
console.warn(`Invalid config: ${error}`);
|
|
14
|
+
}
|
|
15
|
+
const ctx = { errors: [] };
|
|
16
|
+
visitMessage(configRootType.protoType, value, '', ctx);
|
|
17
|
+
if (ctx.errors.length > 0) {
|
|
18
|
+
console.warn(`Invalid config:\n${ctx.errors.join('\n')}`);
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
exports.sanitizeConfig = sanitizeConfig;
|
|
23
|
+
function visitMessage(type, value, path, context) {
|
|
24
|
+
for (const key of Object.keys(value)) {
|
|
25
|
+
if (!type.fields[key]) {
|
|
26
|
+
context.errors.push(`Unexpected key: ${path}.${key}`);
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
const field = type.fields[key];
|
|
30
|
+
if (field.repeated) {
|
|
31
|
+
continue; // TODO(marik-d): Implement.
|
|
32
|
+
}
|
|
33
|
+
field.resolve();
|
|
34
|
+
if (!field.resolvedType || !(field.resolvedType instanceof protobufjs_1.Type)) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
visitMessage(field.resolvedType, value[key], `${path}.${key}`, context);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=sanitizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitizer.js","sourceRoot":"","sources":["../../src/sanitizer.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,2CAAkC;AAElC,qCAAqC;AAKrC,MAAM,cAAc,GAAG,YAAM,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC;AAEpE,SAAgB,cAAc,CAAE,KAAU;IACxC,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrD,IAAI,KAAK,EAAE;QACT,OAAO,CAAC,IAAI,CAAC,mBAAmB,KAAK,EAAE,CAAC,CAAC;KAC1C;IAED,MAAM,GAAG,GAAY,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IACpC,YAAY,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;IACvD,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAA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|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import type { Config as ConfigObject } from './proto/gen/dxos/config';
|
|
2
|
+
export type { ConfigObject };
|
|
3
|
+
declare type DotPrefix<T extends string> = T extends '' ? '' : `.${T}`;
|
|
4
|
+
/**
|
|
5
|
+
* Returns all dot-separated nested keys for an object.
|
|
6
|
+
*
|
|
7
|
+
* Read more: https://stackoverflow.com/a/68404823.
|
|
8
|
+
*/
|
|
9
|
+
declare type DotNestedKeys<T> = (T extends object ? {
|
|
10
|
+
[K in Exclude<keyof T, symbol>]: `${K}${DotPrefix<DotNestedKeys<T[K]>>}`;
|
|
11
|
+
}[Exclude<keyof T, symbol>] : '') extends infer D ? Extract<D, string> : never;
|
|
12
|
+
/**
|
|
13
|
+
* Parse a dot separated nested key into an array of keys.
|
|
14
|
+
*
|
|
15
|
+
* Example: 'services.signal.server' -> ['services', 'signal', 'server'].
|
|
16
|
+
*/
|
|
17
|
+
export declare type ParseKey<K extends string> = K extends `${infer L}.${infer Rest}` ? [L, ...ParseKey<Rest>] : [K];
|
|
18
|
+
/**
|
|
19
|
+
* Array of types that can act as an object key.
|
|
20
|
+
*/
|
|
21
|
+
declare type Keys = (keyof any)[];
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves a property type in a series of nested objects.
|
|
24
|
+
*
|
|
25
|
+
* Read more: https://stackoverflow.com/a/61648690.
|
|
26
|
+
*/
|
|
27
|
+
export declare type DeepIndex<T, KS extends Keys, Fail = undefined> = KS extends [infer F, ...infer R] ? F extends keyof Exclude<T, undefined> ? R extends Keys ? DeepIndex<Exclude<T, undefined>[F], R, Fail> : Fail : Fail : T;
|
|
28
|
+
/**
|
|
29
|
+
* Any nested dot separated key that can be in config.
|
|
30
|
+
*/
|
|
31
|
+
export declare type ConfigKey = DotNestedKeys<ConfigObject>;
|
|
31
32
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEtE,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,aAAK,SAAS,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,EAAE,CAAA;AAE9D;;;;GAIG;AACH,aAAK,aAAa,CAAC,CAAC,IAAI,CACtB,CAAC,SAAS,MAAM,GACZ;KACC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;CACzE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GACzB,EAAE,CACL,SAAS,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC;AAEjD;;;;GAIG;AACH,oBAAY,QAAQ,CAAC,CAAC,SAAS,MAAM,IACjC,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,MAAM,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,GAC3D,CAAC,CAAC,CAAC,CAAA;AAET;;GAEG;AACH,aAAK,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAA;AAEzB;;;;GAIG;AACH,oBAAY,SAAS,CAAC,CAAC,EAAE,EAAE,SAAS,IAAI,EAAE,IAAI,GAAG,SAAS,IACxD,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,GAAG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