@songtonyli/dsh-cli 0.1.15 → 0.1.16
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/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@bufbuild/protobuf/README.md +41 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +244 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +58 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +74 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +296 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +209 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +168 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +45 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +415 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +1037 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +55 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.js +70 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +4 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.js +131 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +78 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +157 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +115 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +110 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +376 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +292 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +16 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +469 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +129 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +149 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +954 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +437 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +625 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +684 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +47 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +481 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +358 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +220 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +188 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +726 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +37 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +191 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +106 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +199 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +334 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +75 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +68 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.js +60 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.js +892 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.js +126 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.js +106 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.js +59 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.js +242 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +48 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +40 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +101 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/create.js +293 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +206 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +159 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +409 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +1029 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/index.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/merge.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/package.json +4 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +128 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +152 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +109 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +369 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +284 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +464 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +124 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +140 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +948 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +433 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +620 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +680 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +477 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +355 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +214 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +184 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +721 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +186 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +101 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +325 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +69 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +65 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +888 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +123 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +103 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +56 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +64 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +61 -0
- package/node_modules/@bufbuild/protobuf/package.json +136 -0
- package/node_modules/@deepseek-ai/dsh-base/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-base/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-base/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +9 -3
- package/node_modules/@deepseek-ai/dsh-base/package.json +1 -0
- package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +7 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +61 -61
- package/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/client.js +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +55 -55
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +182 -182
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +151 -151
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +74 -74
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +76 -76
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +39 -39
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +23 -23
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +27 -27
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +18 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +22 -22
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +115 -115
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +40 -40
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +97 -87
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +35 -35
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +61 -61
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/README.md +6 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/README.zh.md +6 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/lib/client.js +36 -35
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/lib/client.js +10 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +41 -41
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/lib/client.js +17 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +68 -68
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.pdf.js +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +21 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +24 -24
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.js +18 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.terminal.js +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +19 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +38 -38
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +25 -25
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +70 -70
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +198 -198
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +50 -50
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +24 -24
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +81 -81
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +25 -25
- package/node_modules/@deepseek-ai/dsh-llm/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm/README.md +2 -1
- package/node_modules/@deepseek-ai/dsh-llm/README.zh.md +2 -1
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.md +136 -0
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.zh.md +136 -0
- package/node_modules/@deepseek-ai/dsh-llm-cursor/lib/index.js +2511 -0
- package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +62 -0
- package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +3 -3
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-web-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-web-app/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-web-app/README.zh.md +1 -1
- package/package.json +5 -1
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/queue-mirror.js +0 -61
- package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/runner-launch-UEJ3Ntqn.js +0 -1511
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.qualifiedName = qualifiedName;
|
|
17
|
+
exports.protoCamelCase = protoCamelCase;
|
|
18
|
+
exports.protoSnakeCase = protoSnakeCase;
|
|
19
|
+
exports.safeObjectProperty = safeObjectProperty;
|
|
20
|
+
/**
|
|
21
|
+
* Return a fully-qualified name for a Protobuf descriptor.
|
|
22
|
+
* For a file descriptor, return the original file path.
|
|
23
|
+
*
|
|
24
|
+
* See https://protobuf.com/docs/language-spec#fully-qualified-names
|
|
25
|
+
*/
|
|
26
|
+
function qualifiedName(desc) {
|
|
27
|
+
switch (desc.kind) {
|
|
28
|
+
case "field":
|
|
29
|
+
case "oneof":
|
|
30
|
+
case "rpc":
|
|
31
|
+
return desc.parent.typeName + "." + desc.name;
|
|
32
|
+
case "enum_value": {
|
|
33
|
+
const p = desc.parent.parent
|
|
34
|
+
? desc.parent.parent.typeName
|
|
35
|
+
: desc.parent.file.proto.package;
|
|
36
|
+
return p + (p.length > 0 ? "." : "") + desc.name;
|
|
37
|
+
}
|
|
38
|
+
case "service":
|
|
39
|
+
case "message":
|
|
40
|
+
case "enum":
|
|
41
|
+
case "extension":
|
|
42
|
+
return desc.typeName;
|
|
43
|
+
case "file":
|
|
44
|
+
return desc.proto.name;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Converts snake_case to protoCamelCase according to the convention
|
|
49
|
+
* used by protoc to convert a field name to a JSON name.
|
|
50
|
+
*
|
|
51
|
+
* See https://protobuf.com/docs/language-spec#default-json-names
|
|
52
|
+
*
|
|
53
|
+
* The function protoSnakeCase provides the reverse.
|
|
54
|
+
*/
|
|
55
|
+
function protoCamelCase(snakeCase) {
|
|
56
|
+
let capNext = false;
|
|
57
|
+
const b = [];
|
|
58
|
+
for (let i = 0; i < snakeCase.length; i++) {
|
|
59
|
+
let c = snakeCase.charAt(i);
|
|
60
|
+
switch (c) {
|
|
61
|
+
case "_":
|
|
62
|
+
capNext = true;
|
|
63
|
+
break;
|
|
64
|
+
case "0":
|
|
65
|
+
case "1":
|
|
66
|
+
case "2":
|
|
67
|
+
case "3":
|
|
68
|
+
case "4":
|
|
69
|
+
case "5":
|
|
70
|
+
case "6":
|
|
71
|
+
case "7":
|
|
72
|
+
case "8":
|
|
73
|
+
case "9":
|
|
74
|
+
b.push(c);
|
|
75
|
+
capNext = false;
|
|
76
|
+
break;
|
|
77
|
+
default:
|
|
78
|
+
if (capNext) {
|
|
79
|
+
capNext = false;
|
|
80
|
+
c = c.toUpperCase();
|
|
81
|
+
}
|
|
82
|
+
b.push(c);
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return b.join("");
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Converts protoCamelCase to snake_case.
|
|
90
|
+
*
|
|
91
|
+
* This function is the reverse of function protoCamelCase. Note that some names
|
|
92
|
+
* are not reversible - for example, "foo__bar" -> "fooBar" -> "foo_bar".
|
|
93
|
+
*/
|
|
94
|
+
function protoSnakeCase(lowerCamelCase) {
|
|
95
|
+
return lowerCamelCase.replace(/[A-Z]/g, (letter) => "_" + letter.toLowerCase());
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Names that cannot be used for object properties because they are reserved
|
|
99
|
+
* by built-in JavaScript properties.
|
|
100
|
+
*/
|
|
101
|
+
const reservedObjectProperties = new Set([
|
|
102
|
+
// names reserved by JavaScript
|
|
103
|
+
"constructor",
|
|
104
|
+
"toString",
|
|
105
|
+
"toJSON",
|
|
106
|
+
"valueOf",
|
|
107
|
+
]);
|
|
108
|
+
/**
|
|
109
|
+
* Escapes names that are reserved for ECMAScript built-in object properties.
|
|
110
|
+
*
|
|
111
|
+
* Also see safeIdentifier() from @bufbuild/protoplugin.
|
|
112
|
+
*/
|
|
113
|
+
function safeObjectProperty(name) {
|
|
114
|
+
return reservedObjectProperties.has(name) ? name + "$" : name;
|
|
115
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.nestedTypes = nestedTypes;
|
|
17
|
+
exports.usedTypes = usedTypes;
|
|
18
|
+
exports.parentTypes = parentTypes;
|
|
19
|
+
/**
|
|
20
|
+
* Iterate over all types - enumerations, extensions, services, messages -
|
|
21
|
+
* and enumerations, extensions and messages nested in messages.
|
|
22
|
+
*/
|
|
23
|
+
function* nestedTypes(desc) {
|
|
24
|
+
switch (desc.kind) {
|
|
25
|
+
case "file":
|
|
26
|
+
for (const message of desc.messages) {
|
|
27
|
+
yield message;
|
|
28
|
+
yield* nestedTypes(message);
|
|
29
|
+
}
|
|
30
|
+
yield* desc.enums;
|
|
31
|
+
yield* desc.services;
|
|
32
|
+
yield* desc.extensions;
|
|
33
|
+
break;
|
|
34
|
+
case "message":
|
|
35
|
+
for (const message of desc.nestedMessages) {
|
|
36
|
+
yield message;
|
|
37
|
+
yield* nestedTypes(message);
|
|
38
|
+
}
|
|
39
|
+
yield* desc.nestedEnums;
|
|
40
|
+
yield* desc.nestedExtensions;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Iterate over types referenced by fields of the given message.
|
|
46
|
+
*
|
|
47
|
+
* For example:
|
|
48
|
+
*
|
|
49
|
+
* ```proto
|
|
50
|
+
* syntax="proto3";
|
|
51
|
+
*
|
|
52
|
+
* message Example {
|
|
53
|
+
* Msg singular = 1;
|
|
54
|
+
* repeated Level list = 2;
|
|
55
|
+
* }
|
|
56
|
+
*
|
|
57
|
+
* message Msg {}
|
|
58
|
+
*
|
|
59
|
+
* enum Level {
|
|
60
|
+
* LEVEL_UNSPECIFIED = 0;
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* The message Example references the message Msg, and the enum Level.
|
|
65
|
+
*/
|
|
66
|
+
function usedTypes(descMessage) {
|
|
67
|
+
return usedTypesInternal(descMessage, new Set());
|
|
68
|
+
}
|
|
69
|
+
function* usedTypesInternal(descMessage, seen) {
|
|
70
|
+
var _a, _b;
|
|
71
|
+
for (const field of descMessage.fields) {
|
|
72
|
+
const ref = (_b = (_a = field.enum) !== null && _a !== void 0 ? _a : field.message) !== null && _b !== void 0 ? _b : undefined;
|
|
73
|
+
if (!ref || seen.has(ref.typeName)) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
seen.add(ref.typeName);
|
|
77
|
+
yield ref;
|
|
78
|
+
if (ref.kind == "message") {
|
|
79
|
+
yield* usedTypesInternal(ref, seen);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Returns the ancestors of a given Protobuf element, up to the file.
|
|
85
|
+
*/
|
|
86
|
+
function parentTypes(desc) {
|
|
87
|
+
const parents = [];
|
|
88
|
+
while (desc.kind !== "file") {
|
|
89
|
+
const p = parent(desc);
|
|
90
|
+
desc = p;
|
|
91
|
+
parents.push(p);
|
|
92
|
+
}
|
|
93
|
+
return parents;
|
|
94
|
+
}
|
|
95
|
+
function parent(desc) {
|
|
96
|
+
var _a;
|
|
97
|
+
switch (desc.kind) {
|
|
98
|
+
case "enum_value":
|
|
99
|
+
case "field":
|
|
100
|
+
case "oneof":
|
|
101
|
+
case "rpc":
|
|
102
|
+
return desc.parent;
|
|
103
|
+
case "service":
|
|
104
|
+
return desc.file;
|
|
105
|
+
case "extension":
|
|
106
|
+
case "enum":
|
|
107
|
+
case "message":
|
|
108
|
+
return (_a = desc.parent) !== null && _a !== void 0 ? _a : desc.file;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.InvalidPathError = void 0;
|
|
17
|
+
exports.buildPath = buildPath;
|
|
18
|
+
exports.parsePath = parsePath;
|
|
19
|
+
exports.pathToString = pathToString;
|
|
20
|
+
const descriptors_js_1 = require("../descriptors.js");
|
|
21
|
+
/**
|
|
22
|
+
* Create a PathBuilder.
|
|
23
|
+
*/
|
|
24
|
+
function buildPath(schema) {
|
|
25
|
+
return new PathBuilderImpl(schema, schema, []);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Parse a Path from a string.
|
|
29
|
+
*
|
|
30
|
+
* Throws an InvalidPathError if the path is invalid.
|
|
31
|
+
*
|
|
32
|
+
* Note that a Registry must be provided via the options argument to parse
|
|
33
|
+
* paths that refer to an extension.
|
|
34
|
+
*/
|
|
35
|
+
function parsePath(schema, path, options) {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
const builder = new PathBuilderImpl(schema, schema, []);
|
|
38
|
+
const err = (message, i) => new InvalidPathError(schema, message + " at column " + (i + 1), path);
|
|
39
|
+
for (let i = 0; i < path.length;) {
|
|
40
|
+
const token = nextToken(i, path);
|
|
41
|
+
const left = builder.getLeft();
|
|
42
|
+
let right = undefined;
|
|
43
|
+
if ("field" in token) {
|
|
44
|
+
right =
|
|
45
|
+
(left === null || left === void 0 ? void 0 : left.kind) != "message"
|
|
46
|
+
? undefined
|
|
47
|
+
: ((_a = left.fields.find((field) => field.name === token.field)) !== null && _a !== void 0 ? _a : left.oneofs.find((oneof) => oneof.name === token.field));
|
|
48
|
+
if (!right) {
|
|
49
|
+
throw err(`Unknown field "${token.field}"`, i);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
else if ("ext" in token) {
|
|
53
|
+
right = (_b = options === null || options === void 0 ? void 0 : options.registry) === null || _b === void 0 ? void 0 : _b.getExtension(token.ext);
|
|
54
|
+
if (!right) {
|
|
55
|
+
throw err(`Unknown extension "${token.ext}"`, i);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else if ("val" in token) {
|
|
59
|
+
// list or map
|
|
60
|
+
right =
|
|
61
|
+
(left === null || left === void 0 ? void 0 : left.kind) == "field" &&
|
|
62
|
+
left.fieldKind == "list" &&
|
|
63
|
+
typeof token.val == "bigint"
|
|
64
|
+
? { kind: "list_sub", index: Number(token.val) }
|
|
65
|
+
: { kind: "map_sub", key: token.val };
|
|
66
|
+
}
|
|
67
|
+
else if ("err" in token) {
|
|
68
|
+
throw err(token.err, token.i);
|
|
69
|
+
}
|
|
70
|
+
if (right) {
|
|
71
|
+
try {
|
|
72
|
+
builder.add([right]);
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
throw err(e instanceof InvalidPathError ? e.message : String(e), i);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
i = token.i;
|
|
79
|
+
}
|
|
80
|
+
return builder.toPath();
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Stringify a path.
|
|
84
|
+
*/
|
|
85
|
+
function pathToString(path) {
|
|
86
|
+
const str = [];
|
|
87
|
+
for (const ele of path) {
|
|
88
|
+
switch (ele.kind) {
|
|
89
|
+
case "field":
|
|
90
|
+
case "oneof":
|
|
91
|
+
if (str.length > 0) {
|
|
92
|
+
str.push(".");
|
|
93
|
+
}
|
|
94
|
+
str.push(ele.name);
|
|
95
|
+
break;
|
|
96
|
+
case "extension":
|
|
97
|
+
str.push("[", ele.typeName, "]");
|
|
98
|
+
break;
|
|
99
|
+
case "list_sub":
|
|
100
|
+
str.push("[", ele.index, "]");
|
|
101
|
+
break;
|
|
102
|
+
case "map_sub":
|
|
103
|
+
if (typeof ele.key == "string") {
|
|
104
|
+
str.push('["', ele.key
|
|
105
|
+
.split("\\")
|
|
106
|
+
.join("\\\\")
|
|
107
|
+
.split('"')
|
|
108
|
+
.join('\\"')
|
|
109
|
+
.split("\r")
|
|
110
|
+
.join("\\r")
|
|
111
|
+
.split("\n")
|
|
112
|
+
.join("\\n"), '"]');
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
str.push("[", ele.key, "]");
|
|
116
|
+
}
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return str.join("");
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* InvalidPathError is thrown for invalid Paths, for example during parsing from
|
|
124
|
+
* a string, or when a new Path is built.
|
|
125
|
+
*/
|
|
126
|
+
class InvalidPathError extends Error {
|
|
127
|
+
constructor(schema, message, path) {
|
|
128
|
+
super(message);
|
|
129
|
+
this.name = "InvalidPathError";
|
|
130
|
+
this.schema = schema;
|
|
131
|
+
this.path = path;
|
|
132
|
+
// see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#example
|
|
133
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.InvalidPathError = InvalidPathError;
|
|
137
|
+
class PathBuilderImpl {
|
|
138
|
+
constructor(schema, left, path) {
|
|
139
|
+
this.schema = schema;
|
|
140
|
+
this.left = left;
|
|
141
|
+
this.path = path;
|
|
142
|
+
}
|
|
143
|
+
getLeft() {
|
|
144
|
+
return this.left;
|
|
145
|
+
}
|
|
146
|
+
field(field) {
|
|
147
|
+
return this.push(field);
|
|
148
|
+
}
|
|
149
|
+
oneof(oneof) {
|
|
150
|
+
return this.push(oneof);
|
|
151
|
+
}
|
|
152
|
+
extension(extension) {
|
|
153
|
+
return this.push(extension);
|
|
154
|
+
}
|
|
155
|
+
list(index) {
|
|
156
|
+
return this.push({ kind: "list_sub", index });
|
|
157
|
+
}
|
|
158
|
+
map(key) {
|
|
159
|
+
return this.push({ kind: "map_sub", key });
|
|
160
|
+
}
|
|
161
|
+
add(pathOrBuilder) {
|
|
162
|
+
const path = Array.isArray(pathOrBuilder)
|
|
163
|
+
? pathOrBuilder
|
|
164
|
+
: pathOrBuilder.toPath();
|
|
165
|
+
const l = this.path.length;
|
|
166
|
+
try {
|
|
167
|
+
for (const ele of path) {
|
|
168
|
+
this.push(ele);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
catch (e) {
|
|
172
|
+
// undo pushes
|
|
173
|
+
this.path.splice(l);
|
|
174
|
+
throw e;
|
|
175
|
+
}
|
|
176
|
+
return this;
|
|
177
|
+
}
|
|
178
|
+
toPath() {
|
|
179
|
+
return this.path.concat();
|
|
180
|
+
}
|
|
181
|
+
clone() {
|
|
182
|
+
return new PathBuilderImpl(this.schema, this.left, this.path.concat());
|
|
183
|
+
}
|
|
184
|
+
push(ele) {
|
|
185
|
+
switch (ele.kind) {
|
|
186
|
+
case "field":
|
|
187
|
+
if (!this.left ||
|
|
188
|
+
this.left.kind != "message" ||
|
|
189
|
+
this.left.typeName != ele.parent.typeName) {
|
|
190
|
+
throw this.err("field access");
|
|
191
|
+
}
|
|
192
|
+
this.path.push(ele);
|
|
193
|
+
this.left =
|
|
194
|
+
ele.fieldKind == "message"
|
|
195
|
+
? ele.message
|
|
196
|
+
: ele.fieldKind == "list" || ele.fieldKind == "map"
|
|
197
|
+
? ele
|
|
198
|
+
: undefined;
|
|
199
|
+
return this;
|
|
200
|
+
case "oneof":
|
|
201
|
+
if (!this.left ||
|
|
202
|
+
this.left.kind != "message" ||
|
|
203
|
+
this.left.typeName != ele.parent.typeName) {
|
|
204
|
+
throw this.err("oneof access");
|
|
205
|
+
}
|
|
206
|
+
this.path.push(ele);
|
|
207
|
+
this.left = undefined;
|
|
208
|
+
return this;
|
|
209
|
+
case "extension":
|
|
210
|
+
if (!this.left ||
|
|
211
|
+
this.left.kind != "message" ||
|
|
212
|
+
this.left.typeName != ele.extendee.typeName) {
|
|
213
|
+
throw this.err("extension access");
|
|
214
|
+
}
|
|
215
|
+
this.path.push(ele);
|
|
216
|
+
this.left = ele.fieldKind == "message" ? ele.message : undefined;
|
|
217
|
+
return this;
|
|
218
|
+
case "list_sub":
|
|
219
|
+
if (!this.left ||
|
|
220
|
+
this.left.kind != "field" ||
|
|
221
|
+
this.left.fieldKind != "list") {
|
|
222
|
+
throw this.err("list access");
|
|
223
|
+
}
|
|
224
|
+
if (ele.index < 0 || !Number.isInteger(ele.index)) {
|
|
225
|
+
throw this.err("list index");
|
|
226
|
+
}
|
|
227
|
+
this.path.push(ele);
|
|
228
|
+
this.left =
|
|
229
|
+
this.left.listKind == "message" ? this.left.message : undefined;
|
|
230
|
+
return this;
|
|
231
|
+
case "map_sub":
|
|
232
|
+
if (!this.left ||
|
|
233
|
+
this.left.kind != "field" ||
|
|
234
|
+
this.left.fieldKind != "map") {
|
|
235
|
+
throw this.err("map access");
|
|
236
|
+
}
|
|
237
|
+
if (!checkKeyType(ele.key, this.left.mapKey)) {
|
|
238
|
+
throw this.err("map key");
|
|
239
|
+
}
|
|
240
|
+
this.path.push(ele);
|
|
241
|
+
this.left =
|
|
242
|
+
this.left.mapKind == "message" ? this.left.message : undefined;
|
|
243
|
+
return this;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
err(what) {
|
|
247
|
+
return new InvalidPathError(this.schema, "Invalid " + what, this.path);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function checkKeyType(key, type) {
|
|
251
|
+
switch (type) {
|
|
252
|
+
case descriptors_js_1.ScalarType.STRING:
|
|
253
|
+
return typeof key == "string";
|
|
254
|
+
case descriptors_js_1.ScalarType.INT32:
|
|
255
|
+
case descriptors_js_1.ScalarType.UINT32:
|
|
256
|
+
case descriptors_js_1.ScalarType.SINT32:
|
|
257
|
+
case descriptors_js_1.ScalarType.SFIXED32:
|
|
258
|
+
case descriptors_js_1.ScalarType.FIXED32:
|
|
259
|
+
return typeof key == "number";
|
|
260
|
+
case descriptors_js_1.ScalarType.UINT64:
|
|
261
|
+
case descriptors_js_1.ScalarType.INT64:
|
|
262
|
+
case descriptors_js_1.ScalarType.FIXED64:
|
|
263
|
+
case descriptors_js_1.ScalarType.SFIXED64:
|
|
264
|
+
case descriptors_js_1.ScalarType.SINT64:
|
|
265
|
+
return typeof key == "bigint";
|
|
266
|
+
case descriptors_js_1.ScalarType.BOOL:
|
|
267
|
+
return typeof key == "boolean";
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function nextToken(i, path) {
|
|
271
|
+
const re_extension = /^[A-Za-z_][A-Za-z_0-9]*(?:\.[A-Za-z_][A-Za-z_0-9]*)*$/;
|
|
272
|
+
const re_field = /^[A-Za-z_][A-Za-z_0-9]*$/;
|
|
273
|
+
if (path[i] == "[") {
|
|
274
|
+
i++;
|
|
275
|
+
while (path[i] == " ") {
|
|
276
|
+
// skip leading whitespace
|
|
277
|
+
i++;
|
|
278
|
+
}
|
|
279
|
+
if (i >= path.length) {
|
|
280
|
+
return { err: "Premature end", i: path.length - 1 };
|
|
281
|
+
}
|
|
282
|
+
let token;
|
|
283
|
+
if (path[i] == `"`) {
|
|
284
|
+
// string literal
|
|
285
|
+
i++;
|
|
286
|
+
let val = "";
|
|
287
|
+
for (;;) {
|
|
288
|
+
if (path[i] == `"`) {
|
|
289
|
+
// end of string literal
|
|
290
|
+
i++;
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
if (path[i] == "\\") {
|
|
294
|
+
switch (path[i + 1]) {
|
|
295
|
+
case `"`:
|
|
296
|
+
case "\\":
|
|
297
|
+
val += path[i + 1];
|
|
298
|
+
break;
|
|
299
|
+
case "r":
|
|
300
|
+
val += "\r";
|
|
301
|
+
break;
|
|
302
|
+
case "n":
|
|
303
|
+
val += "\n";
|
|
304
|
+
break;
|
|
305
|
+
default:
|
|
306
|
+
return { err: "Invalid escape sequence", i };
|
|
307
|
+
}
|
|
308
|
+
i++;
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
val += path[i];
|
|
312
|
+
}
|
|
313
|
+
if (i >= path.length) {
|
|
314
|
+
return { err: "Premature end of string", i: path.length - 1 };
|
|
315
|
+
}
|
|
316
|
+
i++;
|
|
317
|
+
}
|
|
318
|
+
token = { val };
|
|
319
|
+
}
|
|
320
|
+
else if (path[i].match(/\d/)) {
|
|
321
|
+
// integer literal
|
|
322
|
+
const start = i;
|
|
323
|
+
while (i < path.length && /\d/.test(path[i])) {
|
|
324
|
+
i++;
|
|
325
|
+
}
|
|
326
|
+
token = { val: BigInt(path.substring(start, i)) };
|
|
327
|
+
}
|
|
328
|
+
else if (path[i] == "]") {
|
|
329
|
+
return { err: "Premature ]", i };
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
// extension identifier or bool literal
|
|
333
|
+
const start = i;
|
|
334
|
+
while (i < path.length && path[i] != " " && path[i] != "]") {
|
|
335
|
+
i++;
|
|
336
|
+
}
|
|
337
|
+
const name = path.substring(start, i);
|
|
338
|
+
if (name === "true") {
|
|
339
|
+
token = { val: true };
|
|
340
|
+
}
|
|
341
|
+
else if (name === "false") {
|
|
342
|
+
token = { val: false };
|
|
343
|
+
}
|
|
344
|
+
else if (re_extension.test(name)) {
|
|
345
|
+
token = { ext: name };
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
return { err: "Invalid ident", i: start };
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
while (path[i] == " ") {
|
|
352
|
+
// skip trailing whitespace
|
|
353
|
+
i++;
|
|
354
|
+
}
|
|
355
|
+
if (path[i] != "]") {
|
|
356
|
+
return { err: "Missing ]", i };
|
|
357
|
+
}
|
|
358
|
+
i++;
|
|
359
|
+
return Object.assign(Object.assign({}, token), { i });
|
|
360
|
+
}
|
|
361
|
+
// field identifier
|
|
362
|
+
if (i > 0) {
|
|
363
|
+
if (path[i] != ".") {
|
|
364
|
+
return { err: `Expected "."`, i };
|
|
365
|
+
}
|
|
366
|
+
i++;
|
|
367
|
+
}
|
|
368
|
+
const start = i;
|
|
369
|
+
while (i < path.length && path[i] != "." && path[i] != "[") {
|
|
370
|
+
i++;
|
|
371
|
+
}
|
|
372
|
+
const field = path.substring(start, i);
|
|
373
|
+
return re_field.test(field)
|
|
374
|
+
? { field, i }
|
|
375
|
+
: { err: "Invalid ident", i: start };
|
|
376
|
+
}
|