vovk 3.0.0-draft.221 → 3.0.0-draft.223

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.
@@ -39,7 +39,7 @@ const createRPC = (schema, segmentName, rpcModuleName, fetcher = fetcher_js_1.fe
39
39
  ]
40
40
  .filter(Boolean)
41
41
  .join('/')
42
- .replace(/(?<!:\/)\/{2,}/g, '/');
42
+ .replace(/([^:])\/+/g, '$1/'); // replace // by / but not for protocols (http://, https://)
43
43
  return endpoint;
44
44
  };
45
45
  const handler = (input = {}) => {
@@ -76,7 +76,7 @@ const getNamesNestJS = (operationObject) => {
76
76
  };
77
77
  const normalizeGetModuleName = (getModuleName) => {
78
78
  if (getModuleName === 'nestjs-operation-id') {
79
- getModuleName = (operationObject) => getNamesNestJS(operationObject)[0];
79
+ getModuleName = ({ operationObject }) => getNamesNestJS(operationObject)[0];
80
80
  }
81
81
  else if (typeof getModuleName === 'string') {
82
82
  const moduleName = getModuleName;
@@ -89,7 +89,7 @@ const normalizeGetModuleName = (getModuleName) => {
89
89
  };
90
90
  const normalizeGetMethodName = (getMethodName) => {
91
91
  if (getMethodName === 'nestjs-operation-id') {
92
- getMethodName = (operationObject) => getNamesNestJS(operationObject)[1];
92
+ getMethodName = ({ operationObject }) => getNamesNestJS(operationObject)[1];
93
93
  }
94
94
  else if (getMethodName === 'camel-case-operation-id') {
95
95
  getMethodName = ({ operationObject }) => {
@@ -39,7 +39,7 @@ const createRPC = (schema, segmentName, rpcModuleName, fetcher = fetcher_js_1.fe
39
39
  ]
40
40
  .filter(Boolean)
41
41
  .join('/')
42
- .replace(/(?<!:\/)\/{2,}/g, '/');
42
+ .replace(/([^:])\/+/g, '$1/'); // replace // by / but not for protocols (http://, https://)
43
43
  return endpoint;
44
44
  };
45
45
  const handler = (input = {}) => {
@@ -76,7 +76,7 @@ const getNamesNestJS = (operationObject) => {
76
76
  };
77
77
  const normalizeGetModuleName = (getModuleName) => {
78
78
  if (getModuleName === 'nestjs-operation-id') {
79
- getModuleName = (operationObject) => getNamesNestJS(operationObject)[0];
79
+ getModuleName = ({ operationObject }) => getNamesNestJS(operationObject)[0];
80
80
  }
81
81
  else if (typeof getModuleName === 'string') {
82
82
  const moduleName = getModuleName;
@@ -89,7 +89,7 @@ const normalizeGetModuleName = (getModuleName) => {
89
89
  };
90
90
  const normalizeGetMethodName = (getMethodName) => {
91
91
  if (getMethodName === 'nestjs-operation-id') {
92
- getMethodName = (operationObject) => getNamesNestJS(operationObject)[1];
92
+ getMethodName = ({ operationObject }) => getNamesNestJS(operationObject)[1];
93
93
  }
94
94
  else if (getMethodName === 'camel-case-operation-id') {
95
95
  getMethodName = ({ operationObject }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "3.0.0-draft.221",
3
+ "version": "3.0.0-draft.223",
4
4
  "main": "./cjs/index.js",
5
5
  "module": "./mjs/index.js",
6
6
  "types": "./mjs/index.d.ts",