mock-config-server 2.0.1 → 2.0.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.
@@ -8,13 +8,13 @@ const notFoundMiddleware = ({ server, mockServerConfig }) => {
8
8
  const operationNames = graphql?.configs.map(({ operationName }) => operationName) ?? [];
9
9
  const graphqlPatternUrlMeaningfulStrings = Array.from(operationNames.reduce((acc, operationName) => {
10
10
  if (typeof operationName === 'string')
11
- acc.add(`${serverBaseUrl}${graphql?.baseUrl}/${operationName}`);
11
+ acc.add(`${serverBaseUrl ?? ''}${graphql?.baseUrl ?? ''}/${operationName}`);
12
12
  return acc;
13
13
  }, new Set()));
14
14
  const restPaths = rest?.configs.map(({ path }) => path) ?? [];
15
15
  const patternUrls = Array.from(restPaths.reduce((acc, patternPath) => {
16
16
  if (typeof patternPath === 'string')
17
- acc.add(`${serverBaseUrl}${rest?.baseUrl}${patternPath}`);
17
+ acc.add(`${serverBaseUrl ?? ''}${rest?.baseUrl ?? ''}${patternPath}`);
18
18
  return acc;
19
19
  }, new Set()));
20
20
  server.use((request, response) => {
@@ -3,7 +3,7 @@
3
3
  <body class="container">
4
4
  <h1>404</h1>
5
5
  <div>
6
- Seems to be your config does not have data for '<%= requestMethod %>
6
+ Seems to be your config does not have data for <%= requestMethod %>
7
7
  <%= decodeURIComponent(url) %> request, or you have typo in it.
8
8
  </div>
9
9
 
@@ -1,4 +1,4 @@
1
+ export * from './convertWin32PathToUnix/convertWin32PathToUnix';
1
2
  export * from './getUrlParts/getUrlParts';
2
3
  export * from './removeLeadingAndTrailingSlashes/removeLeadingAndTrailingSlashes';
3
4
  export * from './urlJoin/urlJoin';
4
- export * from './convertWin32PathToUnix/convertWin32PathToUnix';
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./convertWin32PathToUnix/convertWin32PathToUnix"), exports);
17
18
  __exportStar(require("./getUrlParts/getUrlParts"), exports);
18
19
  __exportStar(require("./removeLeadingAndTrailingSlashes/removeLeadingAndTrailingSlashes"), exports);
19
20
  __exportStar(require("./urlJoin/urlJoin"), exports);
20
- __exportStar(require("./convertWin32PathToUnix/convertWin32PathToUnix"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mock-config-server",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Tool that easily and quickly imitates server operation, create full fake api in few steps",
5
5
  "author": {
6
6
  "name": "SIBERIA CAN CODE 🧊",