@arrirpc/codegen-dart 0.75.1 → 0.75.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -823,7 +823,7 @@ function dartRpcFromSchema(schema, context) {
823
823
  case "http":
824
824
  return dartHttpRpcFromSchema(schema, context);
825
825
  case "ws":
826
- return dartWsRpcFromSchema(schema, context);
826
+ return dartWsRpcFromSchema();
827
827
  default:
828
828
  console.warn(
829
829
  `[WARNING] unsupported transport "${schema.transport}". Skipping ${context.instancePath}.`
@@ -900,30 +900,8 @@ function getFunctionName(instancePath) {
900
900
  const parts = instancePath.split(".");
901
901
  return parts.pop() ?? "";
902
902
  }
903
- function dartWsRpcFromSchema(schema, context) {
904
- const metadata = {
905
- description: schema.description,
906
- isDeprecated: schema.isDeprecated
907
- };
908
- const functionName = getFunctionName(context.instancePath);
909
- let responseType;
910
- let paramsType;
911
- if (schema.response) {
912
- responseType = `${context.modelPrefix}${validDartClassName(schema.response, context.modelPrefix)}`;
913
- }
914
- if (schema.params) {
915
- paramsType = `${context.modelPrefix}${validDartClassName(schema.params, context.modelPrefix)}`;
916
- }
917
- return `${getCodeComments(metadata)}Future<ArriWebsocketController<${responseType ?? "void"}, ${paramsType ?? "void"}>> ${functionName}() {
918
- return arriWebsocketRequest(
919
- "$_baseUrl${schema.path}",
920
- headers: _headers,
921
- clientVersion: _clientVersion,
922
- parser: (msg) ${responseType ? `=> ${responseType}.fromJsonString(msg)` : "{}"},
923
- serializer: (msg) ${paramsType ? "=> msg.toJsonString()" : '=> ""'},
924
- onError: _onError,
925
- );
926
- }`;
903
+ function dartWsRpcFromSchema(_, __) {
904
+ return "";
927
905
  }
928
906
  function dartServiceFromSchema(schema, context) {
929
907
  const rpcParts = [];
package/dist/index.mjs CHANGED
@@ -816,7 +816,7 @@ function dartRpcFromSchema(schema, context) {
816
816
  case "http":
817
817
  return dartHttpRpcFromSchema(schema, context);
818
818
  case "ws":
819
- return dartWsRpcFromSchema(schema, context);
819
+ return dartWsRpcFromSchema();
820
820
  default:
821
821
  console.warn(
822
822
  `[WARNING] unsupported transport "${schema.transport}". Skipping ${context.instancePath}.`
@@ -893,30 +893,8 @@ function getFunctionName(instancePath) {
893
893
  const parts = instancePath.split(".");
894
894
  return parts.pop() ?? "";
895
895
  }
896
- function dartWsRpcFromSchema(schema, context) {
897
- const metadata = {
898
- description: schema.description,
899
- isDeprecated: schema.isDeprecated
900
- };
901
- const functionName = getFunctionName(context.instancePath);
902
- let responseType;
903
- let paramsType;
904
- if (schema.response) {
905
- responseType = `${context.modelPrefix}${validDartClassName(schema.response, context.modelPrefix)}`;
906
- }
907
- if (schema.params) {
908
- paramsType = `${context.modelPrefix}${validDartClassName(schema.params, context.modelPrefix)}`;
909
- }
910
- return `${getCodeComments(metadata)}Future<ArriWebsocketController<${responseType ?? "void"}, ${paramsType ?? "void"}>> ${functionName}() {
911
- return arriWebsocketRequest(
912
- "$_baseUrl${schema.path}",
913
- headers: _headers,
914
- clientVersion: _clientVersion,
915
- parser: (msg) ${responseType ? `=> ${responseType}.fromJsonString(msg)` : "{}"},
916
- serializer: (msg) ${paramsType ? "=> msg.toJsonString()" : '=> ""'},
917
- onError: _onError,
918
- );
919
- }`;
896
+ function dartWsRpcFromSchema(_, __) {
897
+ return "";
920
898
  }
921
899
  function dartServiceFromSchema(schema, context) {
922
900
  const rpcParts = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrirpc/codegen-dart",
3
- "version": "0.75.1",
3
+ "version": "0.75.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -23,6 +23,6 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "pathe": "^2.0.3",
26
- "@arrirpc/codegen-utils": "0.75.1"
26
+ "@arrirpc/codegen-utils": "0.75.2"
27
27
  }
28
28
  }