@dxos/protobuf-compiler 2.33.9-dev.a78b0c94 → 2.33.9-dev.c5024091

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.
Files changed (56) hide show
  1. package/dist/src/generator/context.d.ts +6 -0
  2. package/dist/src/generator/context.d.ts.map +1 -0
  3. package/dist/src/generator/context.js +6 -0
  4. package/dist/src/generator/context.js.map +1 -0
  5. package/dist/src/generator/declaration-generator.d.ts +2 -2
  6. package/dist/src/generator/declaration-generator.d.ts.map +1 -1
  7. package/dist/src/generator/declaration-generator.js +6 -6
  8. package/dist/src/generator/declaration-generator.js.map +1 -1
  9. package/dist/src/generator/enum.d.ts +2 -1
  10. package/dist/src/generator/enum.d.ts.map +1 -1
  11. package/dist/src/generator/enum.js +13 -1
  12. package/dist/src/generator/enum.js.map +1 -1
  13. package/dist/src/generator/file-generator.d.ts.map +1 -1
  14. package/dist/src/generator/file-generator.js +5 -1
  15. package/dist/src/generator/file-generator.js.map +1 -1
  16. package/dist/src/generator/message.d.ts +5 -2
  17. package/dist/src/generator/message.d.ts.map +1 -1
  18. package/dist/src/generator/message.js +13 -4
  19. package/dist/src/generator/message.js.map +1 -1
  20. package/dist/src/generator/service.d.ts +2 -2
  21. package/dist/src/generator/service.d.ts.map +1 -1
  22. package/dist/src/generator/service.js +11 -3
  23. package/dist/src/generator/service.js.map +1 -1
  24. package/dist/src/namespaces.test.js +7 -2
  25. package/dist/src/namespaces.test.js.map +1 -1
  26. package/dist/test/proto/gen/dxos/test/another.d.ts +4 -0
  27. package/dist/test/proto/gen/dxos/test/another.d.ts.map +1 -1
  28. package/dist/test/proto/gen/dxos/test/any.d.ts +5 -1
  29. package/dist/test/proto/gen/dxos/test/any.d.ts.map +1 -1
  30. package/dist/test/proto/gen/dxos/test/extensions.d.ts +14 -2
  31. package/dist/test/proto/gen/dxos/test/extensions.d.ts.map +1 -1
  32. package/dist/test/proto/gen/dxos/test/testfoo.d.ts +6 -2
  33. package/dist/test/proto/gen/dxos/test/testfoo.d.ts.map +1 -1
  34. package/dist/test/proto/gen/dxos/test.d.ts +172 -14
  35. package/dist/test/proto/gen/dxos/test.d.ts.map +1 -1
  36. package/dist/test/proto/gen/dxos/test.js +8 -0
  37. package/dist/test/proto/gen/dxos/test.js.map +1 -1
  38. package/dist/test/proto/gen/google/protobuf.d.ts +82 -82
  39. package/dist/test/proto/gen/google/protobuf.d.ts.map +1 -1
  40. package/dist/test/proto/gen/index.d.ts +1 -0
  41. package/dist/test/proto/gen/index.d.ts.map +1 -1
  42. package/dist/test/proto/gen/index.js +1 -1
  43. package/dist/test/proto/gen/index.js.map +1 -1
  44. package/dist/test/schema.test.js +229 -135
  45. package/dist/test/schema.test.js.map +1 -1
  46. package/dist/test/service.test.js +8 -2
  47. package/dist/test/service.test.js.map +1 -1
  48. package/dist/tsconfig.tsbuildinfo +1 -1
  49. package/package.json +8 -15
  50. package/src/generator/context.ts +10 -0
  51. package/src/generator/declaration-generator.ts +7 -7
  52. package/src/generator/enum.ts +26 -9
  53. package/src/generator/file-generator.ts +7 -1
  54. package/src/generator/message.ts +17 -6
  55. package/src/generator/service.ts +14 -3
  56. package/src/namespaces.test.ts +2 -0
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.schema = exports.schemaJson = void 0;
7
7
  const codec_protobuf_1 = require("@dxos/codec-protobuf");
8
8
  const substitutions_1 = __importDefault(require("../substitutions"));
9
- exports.schemaJson = JSON.parse("{\"nested\":{\"dxos\":{\"nested\":{\"test\":{\"nested\":{\"another\":{\"nested\":{\"AnotherMessage\":{\"fields\":{},\"comment\":null}}},\"any\":{\"nested\":{\"Any\":{\"fields\":{\"bar\":{\"type\":\"int32\",\"id\":1,\"comment\":null}},\"comment\":null}}},\"Any\":{\"fields\":{\"foo\":{\"type\":\"string\",\"id\":1,\"comment\":null}},\"comment\":null},\"ComplexFields\":{\"fields\":{\"repeatedField\":{\"rule\":\"repeated\",\"type\":\"Key\",\"id\":16,\"comment\":null},\"requiredField\":{\"rule\":\"required\",\"type\":\"Key\",\"id\":17,\"comment\":null},\"mappedField\":{\"keyType\":\"string\",\"type\":\"Key\",\"id\":18,\"comment\":null},\"inner\":{\"type\":\"Inner\",\"id\":19,\"comment\":null},\"myAny\":{\"type\":\"Any\",\"id\":20,\"comment\":null},\"googleAny\":{\"type\":\"google.protobuf.Any\",\"id\":21,\"comment\":null},\"importedAny\":{\"type\":\"dxos.test.any.Any\",\"id\":22,\"comment\":null},\"fooTest\":{\"type\":\"TestFoo\",\"id\":23,\"comment\":null}},\"nested\":{\"Inner\":{\"fields\":{\"foo\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"bar\":{\"type\":\"InnerEnum\",\"id\":2,\"comment\":null}},\"comment\":null},\"InnerEnum\":{\"values\":{\"FOO\":1,\"BAR\":2},\"comment\":null,\"comments\":{\"FOO\":null,\"BAR\":null}}},\"comment\":null},\"extensions\":{\"nested\":{\"ContainingMessageWithExtensions\":{\"oneofs\":{\"kind\":{\"oneof\":[\"str\",\"msg\"],\"comment\":null}},\"fields\":{\"str\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"msg\":{\"type\":\"WithDefaultField\",\"id\":2,\"comment\":null}},\"comment\":null},\"defaultValue\":{\"type\":\"string\",\"id\":5001,\"extend\":\"google.protobuf.FieldOptions\",\"comment\":null},\"optionsObj\":{\"type\":\"OptionsObject\",\"id\":5002,\"extend\":\"google.protobuf.FieldOptions\",\"comment\":null},\"OptionsObject\":{\"fields\":{\"field\":{\"type\":\"int32\",\"id\":1,\"comment\":null}},\"comment\":null},\"WithDefaultField\":{\"fields\":{\"tag\":{\"type\":\"string\",\"id\":1,\"options\":{\"(defaultValue)\":\"latest\",\"(optionsObj).field\":3},\"comment\":\"Tag\"}},\"comment\":null}}},\"Key\":{\"fields\":{\"data\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":null},\"Outer\":{\"fields\":{\"inner\":{\"type\":\"ComplexFields.Inner\",\"id\":1,\"comment\":null}},\"nested\":{\"Inner\":{\"fields\":{\"inner\":{\"type\":\"ComplexFields.InnerEnum\",\"id\":1,\"comment\":null}},\"comment\":null}},\"comment\":null},\"Scalars\":{\"fields\":{\"doubleField\":{\"type\":\"double\",\"id\":1,\"comment\":null},\"floatField\":{\"type\":\"float\",\"id\":2,\"comment\":null},\"int32Field\":{\"type\":\"int32\",\"id\":3,\"comment\":null},\"int64Field\":{\"type\":\"int64\",\"id\":4,\"comment\":null},\"uint32Field\":{\"type\":\"uint32\",\"id\":5,\"comment\":null},\"uint64Field\":{\"type\":\"uint64\",\"id\":6,\"comment\":null},\"sint32Field\":{\"type\":\"sint32\",\"id\":7,\"comment\":null},\"sint64Field\":{\"type\":\"sint64\",\"id\":8,\"comment\":null},\"fixed32Field\":{\"type\":\"fixed32\",\"id\":9,\"comment\":null},\"fixed64Field\":{\"type\":\"fixed64\",\"id\":10,\"comment\":null},\"sfixed32Field\":{\"type\":\"sfixed32\",\"id\":11,\"comment\":null},\"sfixed64Field\":{\"type\":\"sfixed64\",\"id\":12,\"comment\":null},\"boolField\":{\"type\":\"bool\",\"id\":13,\"comment\":null},\"stringField\":{\"type\":\"string\",\"id\":14,\"comment\":null},\"bytesField\":{\"type\":\"bytes\",\"id\":15,\"comment\":null}},\"comment\":null},\"ServiceWithEmpty\":{\"methods\":{\"EmptyRpc\":{\"requestType\":\"google.protobuf.Empty\",\"responseType\":\"google.protobuf.Empty\",\"comment\":null},\"EmptyStreamRpc\":{\"requestType\":\"google.protobuf.Empty\",\"responseType\":\"google.protobuf.Empty\",\"responseStream\":true,\"comment\":null}},\"comment\":null},\"SubstitutedByInterface\":{\"fields\":{\"foo\":{\"type\":\"string\",\"id\":1,\"comment\":null}},\"comment\":null},\"Task\":{\"fields\":{\"id\":{\"type\":\"string\",\"id\":1,\"comment\":\"Task id\"},\"title\":{\"type\":\"string\",\"id\":2,\"comment\":\"Task title\"},\"key\":{\"rule\":\"required\",\"type\":\"Key\",\"id\":3,\"comment\":\"Task key.\\nMultiline field comment.\"},\"type\":{\"rule\":\"required\",\"type\":\"TaskType\",\"id\":4,\"comment\":null},\"googleAny\":{\"type\":\"google.protobuf.Any\",\"id\":5,\"comment\":null}},\"comment\":\"Task.\\nComments can be multiline.\"},\"TaskCount\":{\"fields\":{\"count\":{\"type\":\"int32\",\"id\":1,\"comment\":null}},\"comment\":null},\"TaskList\":{\"fields\":{\"tasks\":{\"rule\":\"repeated\",\"type\":\"Task\",\"id\":1,\"comment\":null}},\"comment\":null},\"TaskType\":{\"values\":{\"IN_PROGRESS\":1,\"COMPLETED\":2},\"comment\":null,\"comments\":{\"IN_PROGRESS\":null,\"COMPLETED\":null}},\"testfoo\":{\"nested\":{\"TestFoo\":{\"fields\":{\"fizz\":{\"type\":\"uint32\",\"id\":1,\"comment\":null},\"bazz\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"TestService\":{\"methods\":{\"CountTasks\":{\"requestType\":\"TaskList\",\"responseType\":\"TaskCount\",\"comment\":\"Count the tasks in the task list.\"},\"SubscribeTasks\":{\"requestType\":\"Key\",\"responseType\":\"Task\",\"responseStream\":true,\"comment\":\"Subscribe to task list updates.\"}},\"comment\":\"Test service definition.\"},\"WithEmptyField\":{\"fields\":{\"emptyField\":{\"type\":\"google.protobuf.Empty\",\"id\":1,\"comment\":null}},\"comment\":null},\"WithTimestamp\":{\"fields\":{\"timestamp\":{\"type\":\"google.protobuf.Timestamp\",\"id\":1,\"comment\":null}},\"comment\":null}}}}},\"google\":{\"nested\":{\"protobuf\":{\"nested\":{\"Any\":{\"fields\":{\"type_url\":{\"type\":\"string\",\"id\":1},\"value\":{\"type\":\"bytes\",\"id\":2}},\"comment\":null},\"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},\"Empty\":{\"fields\":{},\"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}}}}}}}");
9
+ exports.schemaJson = JSON.parse("{\"nested\":{\"dxos\":{\"nested\":{\"test\":{\"nested\":{\"another\":{\"nested\":{\"AnotherMessage\":{\"fields\":{},\"comment\":null}}},\"any\":{\"nested\":{\"Any\":{\"fields\":{\"bar\":{\"type\":\"int32\",\"id\":1,\"comment\":null}},\"comment\":null}}},\"Any\":{\"fields\":{\"foo\":{\"type\":\"string\",\"id\":1,\"comment\":null}},\"comment\":null},\"ComplexFields\":{\"oneofs\":{\"_fooTest\":{\"oneof\":[\"fooTest\"]}},\"fields\":{\"repeatedField\":{\"rule\":\"repeated\",\"type\":\"Key\",\"id\":16,\"comment\":null},\"requiredField\":{\"rule\":\"required\",\"type\":\"Key\",\"id\":17,\"comment\":null},\"mappedField\":{\"keyType\":\"string\",\"type\":\"Key\",\"id\":18,\"comment\":null},\"inner\":{\"type\":\"Inner\",\"id\":19,\"comment\":null},\"myAny\":{\"type\":\"Any\",\"id\":20,\"comment\":null},\"googleAny\":{\"type\":\"google.protobuf.Any\",\"id\":21,\"comment\":null},\"importedAny\":{\"type\":\"dxos.test.any.Any\",\"id\":22,\"comment\":null},\"fooTest\":{\"type\":\"TestFoo\",\"id\":23,\"options\":{\"proto3_optional\":true},\"comment\":null}},\"nested\":{\"Inner\":{\"fields\":{\"foo\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"bar\":{\"type\":\"InnerEnum\",\"id\":2,\"comment\":null}},\"comment\":null},\"InnerEnum\":{\"values\":{\"FOO\":1,\"BAR\":2},\"comment\":null,\"comments\":{\"FOO\":null,\"BAR\":null}}},\"comment\":null},\"extensions\":{\"nested\":{\"ContainingMessageWithExtensions\":{\"oneofs\":{\"kind\":{\"oneof\":[\"str\",\"msg\"],\"comment\":null}},\"fields\":{\"str\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"msg\":{\"type\":\"WithDefaultField\",\"id\":2,\"comment\":null}},\"comment\":null},\"defaultValue\":{\"type\":\"string\",\"id\":5001,\"extend\":\"google.protobuf.FieldOptions\",\"comment\":null},\"optionsObj\":{\"type\":\"OptionsObject\",\"id\":5002,\"extend\":\"google.protobuf.FieldOptions\",\"comment\":null},\"OptionsObject\":{\"fields\":{\"field\":{\"type\":\"int32\",\"id\":1,\"comment\":null}},\"comment\":null},\"WithDefaultField\":{\"fields\":{\"tag\":{\"type\":\"string\",\"id\":1,\"options\":{\"(defaultValue)\":\"latest\",\"(optionsObj).field\":3},\"comment\":\"Tag\"}},\"comment\":null}}},\"Key\":{\"fields\":{\"data\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":null},\"OptionalScalars\":{\"oneofs\":{\"_doubleField\":{\"oneof\":[\"doubleField\"]},\"_floatField\":{\"oneof\":[\"floatField\"]},\"_int32Field\":{\"oneof\":[\"int32Field\"]},\"_int64Field\":{\"oneof\":[\"int64Field\"]},\"_uint32Field\":{\"oneof\":[\"uint32Field\"]},\"_uint64Field\":{\"oneof\":[\"uint64Field\"]},\"_sint32Field\":{\"oneof\":[\"sint32Field\"]},\"_sint64Field\":{\"oneof\":[\"sint64Field\"]},\"_fixed32Field\":{\"oneof\":[\"fixed32Field\"]},\"_fixed64Field\":{\"oneof\":[\"fixed64Field\"]},\"_sfixed32Field\":{\"oneof\":[\"sfixed32Field\"]},\"_sfixed64Field\":{\"oneof\":[\"sfixed64Field\"]},\"_boolField\":{\"oneof\":[\"boolField\"]},\"_stringField\":{\"oneof\":[\"stringField\"]},\"_bytesField\":{\"oneof\":[\"bytesField\"]}},\"fields\":{\"doubleField\":{\"type\":\"double\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":null},\"floatField\":{\"type\":\"float\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":null},\"int32Field\":{\"type\":\"int32\",\"id\":3,\"options\":{\"proto3_optional\":true},\"comment\":null},\"int64Field\":{\"type\":\"int64\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":null},\"uint32Field\":{\"type\":\"uint32\",\"id\":5,\"options\":{\"proto3_optional\":true},\"comment\":null},\"uint64Field\":{\"type\":\"uint64\",\"id\":6,\"options\":{\"proto3_optional\":true},\"comment\":null},\"sint32Field\":{\"type\":\"sint32\",\"id\":7,\"options\":{\"proto3_optional\":true},\"comment\":null},\"sint64Field\":{\"type\":\"sint64\",\"id\":8,\"options\":{\"proto3_optional\":true},\"comment\":null},\"fixed32Field\":{\"type\":\"fixed32\",\"id\":9,\"options\":{\"proto3_optional\":true},\"comment\":null},\"fixed64Field\":{\"type\":\"fixed64\",\"id\":10,\"options\":{\"proto3_optional\":true},\"comment\":null},\"sfixed32Field\":{\"type\":\"sfixed32\",\"id\":11,\"options\":{\"proto3_optional\":true},\"comment\":null},\"sfixed64Field\":{\"type\":\"sfixed64\",\"id\":12,\"options\":{\"proto3_optional\":true},\"comment\":null},\"boolField\":{\"type\":\"bool\",\"id\":13,\"options\":{\"proto3_optional\":true},\"comment\":null},\"stringField\":{\"type\":\"string\",\"id\":14,\"options\":{\"proto3_optional\":true},\"comment\":null},\"bytesField\":{\"type\":\"bytes\",\"id\":15,\"options\":{\"proto3_optional\":true},\"comment\":null}},\"comment\":null},\"Outer\":{\"fields\":{\"inner\":{\"type\":\"Inner\",\"id\":1,\"comment\":null}},\"nested\":{\"Inner\":{\"fields\":{\"num\":{\"type\":\"int32\",\"id\":1,\"comment\":null}},\"comment\":null}},\"comment\":null},\"Scalars\":{\"fields\":{\"doubleField\":{\"type\":\"double\",\"id\":1,\"comment\":null},\"floatField\":{\"type\":\"float\",\"id\":2,\"comment\":null},\"int32Field\":{\"type\":\"int32\",\"id\":3,\"comment\":null},\"int64Field\":{\"type\":\"int64\",\"id\":4,\"comment\":null},\"uint32Field\":{\"type\":\"uint32\",\"id\":5,\"comment\":null},\"uint64Field\":{\"type\":\"uint64\",\"id\":6,\"comment\":null},\"sint32Field\":{\"type\":\"sint32\",\"id\":7,\"comment\":null},\"sint64Field\":{\"type\":\"sint64\",\"id\":8,\"comment\":null},\"fixed32Field\":{\"type\":\"fixed32\",\"id\":9,\"comment\":null},\"fixed64Field\":{\"type\":\"fixed64\",\"id\":10,\"comment\":null},\"sfixed32Field\":{\"type\":\"sfixed32\",\"id\":11,\"comment\":null},\"sfixed64Field\":{\"type\":\"sfixed64\",\"id\":12,\"comment\":null},\"boolField\":{\"type\":\"bool\",\"id\":13,\"comment\":null},\"stringField\":{\"type\":\"string\",\"id\":14,\"comment\":null},\"bytesField\":{\"type\":\"bytes\",\"id\":15,\"comment\":null}},\"comment\":null},\"ServiceWithEmpty\":{\"methods\":{\"EmptyRpc\":{\"requestType\":\"google.protobuf.Empty\",\"responseType\":\"google.protobuf.Empty\",\"comment\":null},\"EmptyStreamRpc\":{\"requestType\":\"google.protobuf.Empty\",\"responseType\":\"google.protobuf.Empty\",\"responseStream\":true,\"comment\":null}},\"comment\":null},\"SubstitutedByInterface\":{\"fields\":{\"foo\":{\"type\":\"string\",\"id\":1,\"comment\":null}},\"comment\":null},\"Task\":{\"oneofs\":{\"_title\":{\"oneof\":[\"title\"]},\"_googleAny\":{\"oneof\":[\"googleAny\"]}},\"fields\":{\"id\":{\"type\":\"string\",\"id\":1,\"comment\":\"Task id\"},\"title\":{\"type\":\"string\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":\"Task title\"},\"key\":{\"rule\":\"required\",\"type\":\"Key\",\"id\":3,\"comment\":\"Task key.\\nMultiline field comment.\"},\"type\":{\"rule\":\"required\",\"type\":\"TaskType\",\"id\":4,\"comment\":null},\"googleAny\":{\"type\":\"google.protobuf.Any\",\"id\":5,\"options\":{\"proto3_optional\":true},\"comment\":null}},\"comment\":\"Task.\\nComments can be multiline.\"},\"TaskCount\":{\"fields\":{\"count\":{\"type\":\"int32\",\"id\":1,\"comment\":null}},\"comment\":null},\"TaskList\":{\"fields\":{\"tasks\":{\"rule\":\"repeated\",\"type\":\"Task\",\"id\":1,\"comment\":null}},\"comment\":null},\"TaskType\":{\"values\":{\"IN_PROGRESS\":1,\"COMPLETED\":2},\"comment\":null,\"comments\":{\"IN_PROGRESS\":null,\"COMPLETED\":null}},\"testfoo\":{\"nested\":{\"TestFoo\":{\"fields\":{\"fizz\":{\"type\":\"uint32\",\"id\":1,\"comment\":null},\"bazz\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"TestService\":{\"methods\":{\"CountTasks\":{\"requestType\":\"TaskList\",\"responseType\":\"TaskCount\",\"comment\":\"Count the tasks in the task list.\"},\"SubscribeTasks\":{\"requestType\":\"Key\",\"responseType\":\"Task\",\"responseStream\":true,\"comment\":\"Subscribe to task list updates.\"}},\"comment\":\"Test service definition.\"},\"WithEmptyField\":{\"fields\":{\"emptyField\":{\"type\":\"google.protobuf.Empty\",\"id\":1,\"comment\":null}},\"comment\":null},\"WithTimestamp\":{\"fields\":{\"timestamp\":{\"type\":\"google.protobuf.Timestamp\",\"id\":1,\"comment\":null}},\"comment\":null}}}}},\"google\":{\"nested\":{\"protobuf\":{\"nested\":{\"Any\":{\"fields\":{\"type_url\":{\"type\":\"string\",\"id\":1},\"value\":{\"type\":\"bytes\",\"id\":2}},\"comment\":null},\"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},\"Empty\":{\"fields\":{},\"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}}}}}}}");
10
10
  exports.schema = codec_protobuf_1.Schema.fromJson(exports.schemaJson, substitutions_1.default);
11
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../test/proto/gen/index.ts"],"names":[],"mappings":";;;;;;AAAA,yDAA8C;AAO9C,qEAA6C;AA6DhC,QAAA,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,q7cAAq7c,CAAC,CAAC;AAC/8c,QAAA,MAAM,GAAG,uBAAM,CAAC,QAAQ,CAAkB,kBAAU,EAAE,uBAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../test/proto/gen/index.ts"],"names":[],"mappings":";;;;;;AAAA,yDAA8C;AAO9C,qEAA6C;AA8DhC,QAAA,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,w6hBAAw6hB,CAAC,CAAC;AACl8hB,QAAA,MAAM,GAAG,uBAAM,CAAC,QAAQ,CAAkB,kBAAU,EAAE,uBAAa,CAAC,CAAC"}
@@ -2,152 +2,246 @@
2
2
  //
3
3
  // Copyright 2022 DXOS.org
4
4
  //
5
+ var __importDefault = (this && this.__importDefault) || function (mod) {
6
+ return (mod && mod.__esModule) ? mod : { "default": mod };
7
+ };
5
8
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const fs_1 = require("fs");
7
- const path_1 = require("path");
9
+ const mocha_1 = require("mocha");
10
+ const expect_1 = __importDefault(require("expect"));
8
11
  const my_key_1 = require("./my-key");
9
12
  const gen_1 = require("./proto/gen");
10
13
  const test_1 = require("./proto/gen/dxos/test");
11
- test('encode and decode', async () => {
12
- const codec = gen_1.schema.getCodecForType('dxos.test.TaskList');
13
- const initial = {
14
- tasks: [
15
- {
16
- id: 'foo',
17
- title: 'Bar',
18
- key: new my_key_1.MyKey(Buffer.from('foo')),
19
- type: test_1.TaskType.COMPLETED,
20
- googleAny: {
21
- '@type': 'dxos.test.SubstitutedByInterface',
22
- foo: 'foo'
14
+ describe('Schema', () => {
15
+ (0, mocha_1.it)('encode and decode', async () => {
16
+ const codec = gen_1.schema.getCodecForType('dxos.test.TaskList');
17
+ const initial = {
18
+ tasks: [
19
+ {
20
+ id: 'foo',
21
+ title: 'Bar',
22
+ key: new my_key_1.MyKey(Buffer.from('foo')),
23
+ type: test_1.TaskType.COMPLETED,
24
+ googleAny: {
25
+ '@type': 'dxos.test.SubstitutedByInterface',
26
+ foo: 'foo'
27
+ }
28
+ },
29
+ {
30
+ id: 'baz',
31
+ title: 'Baz',
32
+ key: new my_key_1.MyKey(Buffer.from('foo')),
33
+ type: test_1.TaskType.IN_PROGRESS
23
34
  }
35
+ ]
36
+ };
37
+ const encoded = codec.encode(initial);
38
+ (0, expect_1.default)(encoded).toBeInstanceOf(Uint8Array);
39
+ const decoded = codec.decode(encoded);
40
+ (0, expect_1.default)(decoded).toEqual(initial);
41
+ });
42
+ (0, mocha_1.it)('encode and decode external package message', async () => {
43
+ const codec = gen_1.schema.getCodecForType('dxos.test.testfoo.TestFoo');
44
+ const initial = { fizz: 3, bazz: '5' };
45
+ const encoded = codec.encode(initial);
46
+ (0, expect_1.default)(encoded).toBeInstanceOf(Uint8Array);
47
+ const decoded = codec.decode(encoded);
48
+ (0, expect_1.default)(decoded).toEqual(initial);
49
+ (0, expect_1.default)(() => {
50
+ const encoded = codec.encode({ badname: 'badvalue' });
51
+ (0, expect_1.default)(encoded).toBeInstanceOf(Uint8Array);
52
+ const decoded = codec.decode(encoded);
53
+ (0, expect_1.default)(decoded).toEqual(initial);
54
+ }).toThrow();
55
+ });
56
+ (0, mocha_1.it)('complex fields round trip', () => {
57
+ const codec = gen_1.schema.getCodecForType('dxos.test.ComplexFields');
58
+ const initial = {
59
+ repeatedField: [new my_key_1.MyKey(Buffer.from('foo')), new my_key_1.MyKey(Buffer.from('bar'))],
60
+ requiredField: new my_key_1.MyKey(Buffer.from('foo')),
61
+ mappedField: {
62
+ foo: new my_key_1.MyKey(Buffer.from('foo')),
63
+ bar: new my_key_1.MyKey(Buffer.from('foo'))
24
64
  },
25
- {
65
+ inner: {
66
+ bar: test_1.ComplexFields.InnerEnum.BAR,
67
+ foo: 'foo'
68
+ },
69
+ myAny: {
70
+ foo: 'foo'
71
+ },
72
+ googleAny: {
73
+ '@type': 'dxos.test.Task',
26
74
  id: 'baz',
27
75
  title: 'Baz',
28
76
  key: new my_key_1.MyKey(Buffer.from('foo')),
29
77
  type: test_1.TaskType.IN_PROGRESS
78
+ },
79
+ importedAny: {
80
+ bar: 123
30
81
  }
31
- ]
32
- };
33
- const encoded = codec.encode(initial);
34
- expect(encoded).toBeInstanceOf(Uint8Array);
35
- const decoded = codec.decode(encoded);
36
- expect(decoded).toEqual(initial);
37
- });
38
- test('encode and decode external package message', async () => {
39
- const codec = gen_1.schema.getCodecForType('dxos.test.testfoo.TestFoo');
40
- const initial = { fizz: 3, bazz: '5' };
41
- const encoded = codec.encode(initial);
42
- expect(encoded).toBeInstanceOf(Uint8Array);
43
- const decoded = codec.decode(encoded);
44
- expect(decoded).toEqual(initial);
45
- expect(() => {
46
- const encoded = codec.encode({ badname: 'badvalue' });
47
- expect(encoded).toBeInstanceOf(Uint8Array);
82
+ };
83
+ const encoded = codec.encode(initial);
84
+ (0, expect_1.default)(encoded).toBeInstanceOf(Uint8Array);
48
85
  const decoded = codec.decode(encoded);
49
- expect(decoded).toEqual(initial);
50
- }).toThrow();
51
- });
52
- test('complex fields round trip', () => {
53
- const codec = gen_1.schema.getCodecForType('dxos.test.ComplexFields');
54
- const initial = {
55
- repeatedField: [new my_key_1.MyKey(Buffer.from('foo')), new my_key_1.MyKey(Buffer.from('bar'))],
56
- requiredField: new my_key_1.MyKey(Buffer.from('foo')),
57
- mappedField: {
58
- foo: new my_key_1.MyKey(Buffer.from('foo')),
59
- bar: new my_key_1.MyKey(Buffer.from('foo'))
60
- },
61
- inner: {
62
- bar: test_1.ComplexFields.InnerEnum.BAR,
63
- foo: 'foo'
64
- },
65
- myAny: {
66
- foo: 'foo'
67
- },
68
- googleAny: {
69
- '@type': 'dxos.test.Task',
70
- id: 'baz',
71
- title: 'Baz',
72
- key: new my_key_1.MyKey(Buffer.from('foo')),
73
- type: test_1.TaskType.IN_PROGRESS
74
- },
75
- importedAny: {
76
- bar: 123
77
- }
78
- };
79
- const encoded = codec.encode(initial);
80
- expect(encoded).toBeInstanceOf(Uint8Array);
81
- const decoded = codec.decode(encoded);
82
- expect(decoded).toEqual(initial);
83
- });
84
- test('encodes empty repeated fields as empty arrays', () => {
85
- const codec = gen_1.schema.getCodecForType('dxos.test.ComplexFields');
86
- const initial = {
87
- repeatedField: [],
88
- requiredField: new my_key_1.MyKey(Buffer.from('foo'))
89
- };
90
- const encoded = codec.encode(initial);
91
- expect(encoded).toBeInstanceOf(Uint8Array);
92
- const decoded = codec.decode(encoded);
93
- expect(decoded).toEqual(initial);
94
- });
95
- test('scalars', () => {
96
- const codec = gen_1.schema.getCodecForType('dxos.test.Scalars');
97
- const initial = {
98
- doubleField: 0.52,
99
- floatField: 1.5,
100
- int32Field: -54,
101
- int64Field: '-55',
102
- uint32Field: 314,
103
- uint64Field: '34',
104
- sint32Field: 3123,
105
- sint64Field: '3123',
106
- fixed32Field: 22,
107
- fixed64Field: '312312312',
108
- sfixed32Field: 45,
109
- sfixed64Field: '312313123',
110
- boolField: true,
111
- stringField: 'hello',
112
- bytesField: Buffer.from('world')
113
- };
114
- const encoded = codec.encode(initial);
115
- expect(encoded).toBeInstanceOf(Uint8Array);
116
- const decoded = codec.decode(encoded);
117
- expect(decoded).toEqual(initial);
118
- });
119
- test('timestamp', () => {
120
- const codec = gen_1.schema.getCodecForType('dxos.test.WithTimestamp');
121
- const initial = {
122
- timestamp: new Date('2021-09-17T09:46:04Z')
123
- };
124
- const encoded = codec.encode(initial);
125
- expect(encoded).toBeInstanceOf(Uint8Array);
126
- const decoded = codec.decode(encoded);
127
- expect(decoded).toEqual(initial);
128
- });
129
- test('definitions', () => {
130
- expect(readDirectoryFiles((0, path_1.join)(__dirname, 'proto/gen'))).toMatchSnapshot();
131
- });
132
- function readDirectoryFiles(dir) {
133
- let res = '';
134
- for (const file of listFilesRecursive(dir)) {
135
- res += `${file}:\n`;
136
- res += (0, fs_1.readFileSync)((0, path_1.join)(dir, file), { encoding: 'utf-8' });
137
- res += '\n';
138
- }
139
- return res;
140
- }
141
- function* listFilesRecursive(dir) {
142
- for (const file of (0, fs_1.readdirSync)(dir)) {
143
- if ((0, fs_1.lstatSync)((0, path_1.join)(dir, file)).isDirectory()) {
144
- for (const sub of listFilesRecursive((0, path_1.join)(dir, file))) {
145
- yield (0, path_1.join)(file, sub);
86
+ (0, expect_1.default)(decoded).toEqual(initial);
87
+ });
88
+ (0, mocha_1.it)('encodes empty repeated fields as empty arrays', () => {
89
+ const codec = gen_1.schema.getCodecForType('dxos.test.ComplexFields');
90
+ const initial = {
91
+ repeatedField: [],
92
+ requiredField: new my_key_1.MyKey(Buffer.from('foo')),
93
+ inner: {
94
+ bar: test_1.ComplexFields.InnerEnum.BAR,
95
+ foo: 'foo'
96
+ },
97
+ myAny: {
98
+ foo: 'foo'
99
+ },
100
+ googleAny: {
101
+ '@type': 'dxos.test.Task',
102
+ id: 'baz',
103
+ title: 'Baz',
104
+ key: new my_key_1.MyKey(Buffer.from('foo')),
105
+ type: test_1.TaskType.IN_PROGRESS
106
+ },
107
+ importedAny: {
108
+ bar: 123
109
+ }
110
+ };
111
+ const encoded = codec.encode(initial);
112
+ (0, expect_1.default)(encoded).toBeInstanceOf(Uint8Array);
113
+ const decoded = codec.decode(encoded);
114
+ (0, expect_1.default)(decoded).toEqual(initial);
115
+ });
116
+ describe('Scalars', () => {
117
+ (0, mocha_1.it)('required', () => {
118
+ const codec = gen_1.schema.getCodecForType('dxos.test.Scalars');
119
+ const initial = {
120
+ doubleField: 0.52,
121
+ floatField: 1.5,
122
+ int32Field: -54,
123
+ int64Field: '-55',
124
+ uint32Field: 314,
125
+ uint64Field: '34',
126
+ sint32Field: 3123,
127
+ sint64Field: '3123',
128
+ fixed32Field: 22,
129
+ fixed64Field: '312312312',
130
+ sfixed32Field: 45,
131
+ sfixed64Field: '312313123',
132
+ boolField: true,
133
+ stringField: 'hello',
134
+ bytesField: Buffer.from('world')
135
+ };
136
+ const encoded = codec.encode(initial);
137
+ (0, expect_1.default)(encoded).toBeInstanceOf(Uint8Array);
138
+ const decoded = codec.decode(encoded);
139
+ (0, expect_1.default)(decoded).toEqual(initial);
140
+ });
141
+ (0, mocha_1.it)('default values on required', () => {
142
+ const codec = gen_1.schema.getCodecForType('dxos.test.Scalars');
143
+ const initial = {
144
+ doubleField: 0.0,
145
+ floatField: 0.0,
146
+ int32Field: 0,
147
+ int64Field: '0',
148
+ uint32Field: 0,
149
+ uint64Field: '0',
150
+ sint32Field: 0,
151
+ sint64Field: '0',
152
+ fixed32Field: 0,
153
+ fixed64Field: '0',
154
+ sfixed32Field: 0,
155
+ sfixed64Field: '0',
156
+ boolField: false,
157
+ stringField: '',
158
+ bytesField: Buffer.from('')
159
+ };
160
+ const encoded = codec.encode(initial);
161
+ (0, expect_1.default)(encoded).toBeInstanceOf(Uint8Array);
162
+ const decoded = codec.decode(encoded);
163
+ (0, expect_1.default)(decoded).toEqual(initial);
164
+ });
165
+ (0, mocha_1.it)('required fields are assigned their default values when missing on the wire', () => {
166
+ const codec = gen_1.schema.getCodecForType('dxos.test.Scalars');
167
+ const expected = {
168
+ doubleField: 0.0,
169
+ floatField: 0.0,
170
+ int32Field: 0,
171
+ int64Field: '0',
172
+ uint32Field: 0,
173
+ uint64Field: '0',
174
+ sint32Field: 0,
175
+ sint64Field: '0',
176
+ fixed32Field: 0,
177
+ fixed64Field: '0',
178
+ sfixed32Field: 0,
179
+ sfixed64Field: '0',
180
+ boolField: false,
181
+ stringField: '',
182
+ bytesField: new Uint8Array()
183
+ };
184
+ const decoded = codec.decode(Buffer.from(''));
185
+ (0, expect_1.default)(decoded).toEqual(expected);
186
+ });
187
+ (0, mocha_1.it)('optional', () => {
188
+ const codec = gen_1.schema.getCodecForType('dxos.test.OptionalScalars');
189
+ const initial = {
190
+ doubleField: 0.52,
191
+ floatField: 1.5,
192
+ int32Field: -54,
193
+ int64Field: '-55',
194
+ uint32Field: 314,
195
+ uint64Field: '34',
196
+ sint32Field: 3123,
197
+ sint64Field: '3123',
198
+ fixed32Field: 22,
199
+ fixed64Field: '312312312',
200
+ sfixed32Field: 45,
201
+ sfixed64Field: '312313123',
202
+ boolField: true,
203
+ stringField: 'hello',
204
+ bytesField: Buffer.from('world')
205
+ };
206
+ const encoded = codec.encode(initial);
207
+ (0, expect_1.default)(encoded).toBeInstanceOf(Uint8Array);
208
+ const decoded = codec.decode(encoded);
209
+ (0, expect_1.default)(decoded).toEqual(initial);
210
+ });
211
+ (0, mocha_1.it)('empty optional', () => {
212
+ const codec = gen_1.schema.getCodecForType('dxos.test.OptionalScalars');
213
+ const initial = {};
214
+ const encoded = codec.encode(initial);
215
+ (0, expect_1.default)(encoded).toBeInstanceOf(Uint8Array);
216
+ const decoded = codec.decode(encoded);
217
+ (0, expect_1.default)(decoded).toEqual(initial);
218
+ });
219
+ describe('optional fields are assigned undefined when missing on the wire', () => {
220
+ const codec = gen_1.schema.getCodecForType('dxos.test.OptionalScalars');
221
+ const expected = {};
222
+ const decoded = codec.decode(Buffer.from(''));
223
+ (0, expect_1.default)(decoded).toEqual(expected);
224
+ });
225
+ });
226
+ (0, mocha_1.it)('default values for missing message-typed fields', () => {
227
+ const codec = gen_1.schema.getCodecForType('dxos.test.Outer');
228
+ const expected = {
229
+ inner: {
230
+ num: 0,
146
231
  }
147
- }
148
- else {
149
- yield file;
150
- }
151
- }
152
- }
232
+ };
233
+ const decoded = codec.decode(Buffer.from(''));
234
+ (0, expect_1.default)(decoded).toEqual(expected);
235
+ });
236
+ (0, mocha_1.it)('timestamp', () => {
237
+ const codec = gen_1.schema.getCodecForType('dxos.test.WithTimestamp');
238
+ const initial = {
239
+ timestamp: new Date('2021-09-17T09:46:04Z')
240
+ };
241
+ const encoded = codec.encode(initial);
242
+ (0, expect_1.default)(encoded).toBeInstanceOf(Uint8Array);
243
+ const decoded = codec.decode(encoded);
244
+ (0, expect_1.default)(decoded).toEqual(initial);
245
+ });
246
+ });
153
247
  //# sourceMappingURL=schema.test.js.map
@@ -1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,GAAG,EAAE,CAAC;aACP;SACF,CAAC;QACF,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9C,IAAA,gBAAM,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC,CAAC,CAAA;IAGF,IAAA,UAAI,EAAC,WAAW,EAAE,GAAG,EAAE;QACrB,MAAM,KAAK,GAAG,YAAM,CAAC,eAAe,CAAC,yBAAyB,CAAC,CAAC;QAEhE,MAAM,OAAO,GAAkB;YAC7B,SAAS,EAAE,IAAI,IAAI,CAAC,sBAAsB,CAAC;SAC5C,CAAC;QAEF,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAEtC,IAAA,gBAAM,EAAC,OAAO,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QAE3C,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAEtC,IAAA,gBAAM,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AAEL,CAAC,CAAC,CAAC"}
@@ -1,10 +1,15 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  const codec_protobuf_1 = require("@dxos/codec-protobuf");
4
7
  const gen_1 = require("./proto/gen");
5
8
  const test_1 = require("./proto/gen/dxos/test");
6
9
  const my_key_1 = require("./my-key");
7
- test('services', async () => {
10
+ const mocha_1 = require("mocha");
11
+ const expect_1 = __importDefault(require("expect"));
12
+ (0, mocha_1.it)('services', async () => {
8
13
  const service = gen_1.schema.getService('dxos.test.TestService');
9
14
  const server = service.createServer({
10
15
  async countTasks(tasks) {
@@ -20,10 +25,11 @@ test('services', async () => {
20
25
  const client = service.createClient(server);
21
26
  const response = await client.countTasks({
22
27
  tasks: [{
28
+ id: 'foo',
23
29
  key: new my_key_1.MyKey(new Uint8Array([1, 2, 3])),
24
30
  type: test_1.TaskType.COMPLETED
25
31
  }]
26
32
  });
27
- expect(response.count).toEqual(1);
33
+ (0, expect_1.default)(response.count).toEqual(1);
28
34
  });
29
35
  //# sourceMappingURL=service.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"service.test.js","sourceRoot":"","sources":["../../test/service.test.ts"],"names":[],"mappings":";;AAAA,yDAA8C;AAC9C,qCAAoC;AACpC,gDAAiD;AACjD,qCAAiC;AAEjC,IAAI,CAAC,UAAU,EAAE,KAAK,IAAI,EAAE;IAC1B,MAAM,OAAO,GAAG,YAAM,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;IAE3D,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;QAClC,KAAK,CAAC,UAAU,CAAC,KAAK;;YACpB,OAAO;gBACL,KAAK,EAAE,MAAA,MAAA,KAAK,CAAC,KAAK,0CAAE,MAAM,mCAAI,CAAC;aAChC,CAAA;QACH,CAAC;QACD,cAAc;YACZ,OAAO,IAAI,uBAAM,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;QAC7B,CAAC;KACF,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;IAE3C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC;QACvC,KAAK,EAAE,CAAC;gBACN,GAAG,EAAE,IAAI,cAAK,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;gBACzC,IAAI,EAAE,eAAQ,CAAC,SAAS;aACzB,CAAC;KACH,CAAC,CAAA;IAEF,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AACnC,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