mock-config-server 3.1.0 → 3.2.0

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 (49) hide show
  1. package/README.md +21 -11
  2. package/dist/bin/validateMockServerConfig/validateMockServerConfig.js +2 -2
  3. package/dist/index.js +16 -0
  4. package/dist/src/core/database/createDatabaseRoutes/helpers/createNestedDatabaseRoutes/createNestedDatabaseRoutes.js +8 -2
  5. package/dist/src/core/database/createDatabaseRoutes/helpers/filter/filter.d.ts +1 -0
  6. package/dist/src/core/database/createDatabaseRoutes/helpers/filter/filter.js +17 -0
  7. package/dist/src/core/database/createDatabaseRoutes/helpers/index.d.ts +1 -1
  8. package/dist/src/core/database/createDatabaseRoutes/helpers/index.js +8 -8
  9. package/dist/src/core/database/createDatabaseRoutes/storages/File/FileStorage.d.ts +1 -2
  10. package/dist/src/core/database/createDatabaseRoutes/storages/Memory/MemoryStorage.d.ts +1 -2
  11. package/dist/src/core/middlewares/index.d.ts +4 -4
  12. package/dist/src/core/middlewares/index.js +28 -28
  13. package/dist/src/core/middlewares/notFoundMiddleware/helpers/getLevenshteinDistance/getLevenshteinDistance.js +1 -0
  14. package/dist/src/index.d.ts +1 -2
  15. package/dist/src/index.js +4 -15
  16. package/dist/src/server/createDatabaseMockServer/createDatabaseMockServer.d.ts +3 -0
  17. package/dist/src/server/createDatabaseMockServer/createDatabaseMockServer.js +55 -0
  18. package/dist/src/server/createGraphQLMockServer/createGraphQLMockServer.d.ts +3 -0
  19. package/dist/src/server/createGraphQLMockServer/createGraphQLMockServer.js +60 -0
  20. package/dist/src/server/createMockServer/createMockServer.d.ts +1 -1
  21. package/dist/src/server/createMockServer/createMockServer.js +1 -2
  22. package/dist/src/server/createRestMockServer/createRestMockServer.d.ts +3 -0
  23. package/dist/src/server/createRestMockServer/createRestMockServer.js +60 -0
  24. package/dist/src/server/index.d.ts +6 -0
  25. package/dist/src/server/index.js +66 -0
  26. package/dist/src/server/startDatabaseMockServer/startDatabaseMockServer.d.ts +5 -0
  27. package/dist/src/server/startDatabaseMockServer/startDatabaseMockServer.js +23 -0
  28. package/dist/src/server/startGraphQLMockServer/startGraphQLMockServer.d.ts +5 -0
  29. package/dist/src/server/startGraphQLMockServer/startGraphQLMockServer.js +23 -0
  30. package/dist/src/server/startRestMockServer/startRestMockServer.d.ts +5 -0
  31. package/dist/src/server/startRestMockServer/startRestMockServer.js +23 -0
  32. package/dist/src/static/views/assets/styles/global.css +2 -2
  33. package/dist/src/static/views/components/header/index.css +4 -4
  34. package/dist/src/static/views/components/header/index.ejs +6 -6
  35. package/dist/src/static/views/components/header/index.js +1 -1
  36. package/dist/src/static/views/features/scheme/dark.css +1 -0
  37. package/dist/src/static/views/features/scheme/index.js +31 -31
  38. package/dist/src/static/views/features/scheme/light.css +1 -0
  39. package/dist/src/static/views/features/tab/index.css +4 -4
  40. package/dist/src/static/views/features/tab/index.js +1 -1
  41. package/dist/src/static/views/pages/404/index.css +4 -4
  42. package/dist/src/static/views/pages/404/index.ejs +8 -8
  43. package/dist/src/utils/constants/checkModes.d.ts +1 -1
  44. package/dist/src/utils/helpers/graphql/index.d.ts +1 -1
  45. package/dist/src/utils/helpers/graphql/index.js +11 -11
  46. package/dist/src/utils/helpers/index.d.ts +5 -5
  47. package/dist/src/utils/helpers/index.js +40 -40
  48. package/dist/src/utils/types/server.d.ts +18 -4
  49. package/package.json +9 -19
@@ -14,6 +14,72 @@ Object.keys(_createMockServer).forEach(function (key) {
14
14
  }
15
15
  });
16
16
  });
17
+ var _createRestMockServer = require("./createRestMockServer/createRestMockServer");
18
+ Object.keys(_createRestMockServer).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _createRestMockServer[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _createRestMockServer[key];
25
+ }
26
+ });
27
+ });
28
+ var _createGraphQLMockServer = require("./createGraphQLMockServer/createGraphQLMockServer");
29
+ Object.keys(_createGraphQLMockServer).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _createGraphQLMockServer[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _createGraphQLMockServer[key];
36
+ }
37
+ });
38
+ });
39
+ var _createDatabaseMockServer = require("./createDatabaseMockServer/createDatabaseMockServer");
40
+ Object.keys(_createDatabaseMockServer).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (key in exports && exports[key] === _createDatabaseMockServer[key]) return;
43
+ Object.defineProperty(exports, key, {
44
+ enumerable: true,
45
+ get: function () {
46
+ return _createDatabaseMockServer[key];
47
+ }
48
+ });
49
+ });
50
+ var _startRestMockServer = require("./startRestMockServer/startRestMockServer");
51
+ Object.keys(_startRestMockServer).forEach(function (key) {
52
+ if (key === "default" || key === "__esModule") return;
53
+ if (key in exports && exports[key] === _startRestMockServer[key]) return;
54
+ Object.defineProperty(exports, key, {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _startRestMockServer[key];
58
+ }
59
+ });
60
+ });
61
+ var _startDatabaseMockServer = require("./startDatabaseMockServer/startDatabaseMockServer");
62
+ Object.keys(_startDatabaseMockServer).forEach(function (key) {
63
+ if (key === "default" || key === "__esModule") return;
64
+ if (key in exports && exports[key] === _startDatabaseMockServer[key]) return;
65
+ Object.defineProperty(exports, key, {
66
+ enumerable: true,
67
+ get: function () {
68
+ return _startDatabaseMockServer[key];
69
+ }
70
+ });
71
+ });
72
+ var _startGraphQLMockServer = require("./startGraphQLMockServer/startGraphQLMockServer");
73
+ Object.keys(_startGraphQLMockServer).forEach(function (key) {
74
+ if (key === "default" || key === "__esModule") return;
75
+ if (key in exports && exports[key] === _startGraphQLMockServer[key]) return;
76
+ Object.defineProperty(exports, key, {
77
+ enumerable: true,
78
+ get: function () {
79
+ return _startGraphQLMockServer[key];
80
+ }
81
+ });
82
+ });
17
83
  var _startMockServer = require("./startMockServer/startMockServer");
18
84
  Object.keys(_startMockServer).forEach(function (key) {
19
85
  if (key === "default" || key === "__esModule") return;
@@ -0,0 +1,5 @@
1
+ /// <reference types="node" />
2
+ import type { DatabaseMockServerConfig } from '../../utils/types';
3
+ export declare const startDatabaseMockServer: (databaseMockServerConfig: DatabaseMockServerConfig) => import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> & {
4
+ destroy: (callback?: ((err?: Error | undefined) => void) | undefined) => import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
5
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.startDatabaseMockServer = void 0;
7
+ var _ansiColors = _interopRequireDefault(require("ansi-colors"));
8
+ var _middlewares = require("../../core/middlewares");
9
+ var _constants = require("../../utils/constants");
10
+ var _createDatabaseMockServer = require("../createDatabaseMockServer/createDatabaseMockServer");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ const startDatabaseMockServer = databaseMockServerConfig => {
13
+ var _databaseMockServerCo;
14
+ const mockServer = (0, _createDatabaseMockServer.createDatabaseMockServer)(databaseMockServerConfig);
15
+ const port = (_databaseMockServerCo = databaseMockServerConfig.port) !== null && _databaseMockServerCo !== void 0 ? _databaseMockServerCo : _constants.DEFAULT.PORT;
16
+ const server = mockServer.listen(port, () => {
17
+ console.log(_ansiColors.default.green(`🎉 Database Mock Server is running at http://localhost:${port}`));
18
+ });
19
+
20
+ // ✅ important: add destroy method for closing keep-alive connections after server shutdown
21
+ return (0, _middlewares.destroyerMiddleware)(server);
22
+ };
23
+ exports.startDatabaseMockServer = startDatabaseMockServer;
@@ -0,0 +1,5 @@
1
+ /// <reference types="node" />
2
+ import type { GraphQLMockServerConfig } from '../../utils/types';
3
+ export declare const startGraphQLMockServer: (graphQLMockServerConfig: GraphQLMockServerConfig) => import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> & {
4
+ destroy: (callback?: ((err?: Error | undefined) => void) | undefined) => import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
5
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.startGraphQLMockServer = void 0;
7
+ var _ansiColors = _interopRequireDefault(require("ansi-colors"));
8
+ var _middlewares = require("../../core/middlewares");
9
+ var _constants = require("../../utils/constants");
10
+ var _createGraphQLMockServer = require("../createGraphQLMockServer/createGraphQLMockServer");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ const startGraphQLMockServer = graphQLMockServerConfig => {
13
+ var _graphQLMockServerCon;
14
+ const mockServer = (0, _createGraphQLMockServer.createGraphQLMockServer)(graphQLMockServerConfig);
15
+ const port = (_graphQLMockServerCon = graphQLMockServerConfig.port) !== null && _graphQLMockServerCon !== void 0 ? _graphQLMockServerCon : _constants.DEFAULT.PORT;
16
+ const server = mockServer.listen(port, () => {
17
+ console.log(_ansiColors.default.green(`🎉 GraphQL Mock Server is running at http://localhost:${port}`));
18
+ });
19
+
20
+ // ✅ important: add destroy method for closing keep-alive connections after server shutdown
21
+ return (0, _middlewares.destroyerMiddleware)(server);
22
+ };
23
+ exports.startGraphQLMockServer = startGraphQLMockServer;
@@ -0,0 +1,5 @@
1
+ /// <reference types="node" />
2
+ import type { RestMockServerConfig } from '../../utils/types';
3
+ export declare const startRestMockServer: (restMockServerConfig: RestMockServerConfig) => import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> & {
4
+ destroy: (callback?: ((err?: Error | undefined) => void) | undefined) => import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
5
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.startRestMockServer = void 0;
7
+ var _ansiColors = _interopRequireDefault(require("ansi-colors"));
8
+ var _middlewares = require("../../core/middlewares");
9
+ var _constants = require("../../utils/constants");
10
+ var _createRestMockServer = require("../createRestMockServer/createRestMockServer");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ const startRestMockServer = restMockServerConfig => {
13
+ var _restMockServerConfig;
14
+ const mockServer = (0, _createRestMockServer.createRestMockServer)(restMockServerConfig);
15
+ const port = (_restMockServerConfig = restMockServerConfig.port) !== null && _restMockServerConfig !== void 0 ? _restMockServerConfig : _constants.DEFAULT.PORT;
16
+ const server = mockServer.listen(port, () => {
17
+ console.log(_ansiColors.default.green(`🎉 Rest Mock Server is running at http://localhost:${port}`));
18
+ });
19
+
20
+ // ✅ important: add destroy method for closing keep-alive connections after server shutdown
21
+ return (0, _middlewares.destroyerMiddleware)(server);
22
+ };
23
+ exports.startRestMockServer = startRestMockServer;
@@ -56,7 +56,7 @@ a {
56
56
  line-height: 17px;
57
57
  }
58
58
 
59
- .margin-container {
59
+ .margin_container {
60
60
  display: flex;
61
61
  width: 100%;
62
62
  justify-content: center;
@@ -80,7 +80,7 @@ a {
80
80
  padding-inline: 75px;
81
81
  }
82
82
 
83
- .content-head {
83
+ .content_head {
84
84
  display: flex;
85
85
  flex-direction: column;
86
86
  align-items: center;
@@ -6,7 +6,7 @@
6
6
  background-color: var(--background-container);
7
7
  }
8
8
 
9
- .header-content {
9
+ .header_content {
10
10
  display: flex;
11
11
  width: 800px;
12
12
  height: 60px;
@@ -17,13 +17,13 @@
17
17
  padding-inline: 75px;
18
18
  }
19
19
 
20
- .header-menu {
20
+ .header_menu {
21
21
  display: flex;
22
22
  flex-direction: row;
23
23
  gap: 25px;
24
24
  }
25
25
 
26
- .header-menu-item {
26
+ .header_menu_item {
27
27
  display: flex;
28
28
  height: 25px;
29
29
  flex-direction: row;
@@ -45,7 +45,7 @@ li {
45
45
  list-style-type: none;
46
46
  }
47
47
 
48
- .scheme-switcher {
48
+ .scheme_switcher {
49
49
  width: 22px;
50
50
  height: 22px;
51
51
  background-image: var(--image-scheme);
@@ -2,19 +2,19 @@
2
2
  <script defer src="/components/header/index.js"></script>
3
3
 
4
4
  <header class="header">
5
- <div class="header-content">
5
+ <div class="header_content">
6
6
  <a href="/">
7
- <div class="header-menu-item logo">
7
+ <div class="header_menu_item logo">
8
8
  <img src="/assets/images/logo.png" />
9
9
  <svg width="41" height="9" fill="none" xmlns="http://www.w3.org/2000/svg">
10
10
  <path d="M12.04 8.5C11.9067 8.5 11.7867 8.45333 11.68 8.36C11.5867 8.25333 11.54 8.13333 11.54 8V3.8C11.54 3.01333 11.38 2.46 11.06 2.14C10.7533 1.82 10.3533 1.66 9.86 1.66C9.36667 1.66 8.88667 1.8 8.42 2.08C7.95333 2.36 7.52667 2.71333 7.14 3.14V8C7.14 8.13333 7.09333 8.25333 7 8.36C6.90667 8.45333 6.78667 8.5 6.64 8.5C6.50667 8.5 6.38667 8.45333 6.28 8.36C6.18667 8.25333 6.14 8.13333 6.14 8V3.8C6.14 3.01333 5.98 2.46 5.66 2.14C5.35333 1.82 4.95333 1.66 4.46 1.66C3.96667 1.66 3.48 1.81333 3 2.12C2.52 2.41333 2.08667 2.77333 1.7 3.2V8C1.7 8.13333 1.65333 8.25333 1.56 8.36C1.46667 8.45333 1.34667 8.5 1.2 8.5C1.06667 8.5 0.946667 8.45333 0.84 8.36C0.746667 8.25333 0.7 8.13333 0.7 8V1.16C0.7 1.01333 0.746667 0.893333 0.84 0.8C0.946667 0.706666 1.06667 0.66 1.2 0.66C1.34667 0.66 1.46667 0.706666 1.56 0.8C1.65333 0.893333 1.7 1.01333 1.7 1.16V1.84C2.12667 1.49333 2.57333 1.21333 3.04 0.999999C3.50667 0.773333 3.98 0.66 4.46 0.66C4.98 0.66 5.45333 0.753333 5.88 0.94C6.30667 1.12667 6.63333 1.49333 6.86 2.04C7.31333 1.62667 7.79333 1.29333 8.3 1.04C8.82 0.786666 9.34 0.66 9.86 0.66C10.3533 0.66 10.8 0.746666 11.2 0.92C11.6 1.09333 11.92 1.40667 12.16 1.86C12.4133 2.3 12.54 2.94667 12.54 3.8V8C12.54 8.13333 12.4933 8.25333 12.4 8.36C12.3067 8.45333 12.1867 8.5 12.04 8.5ZM18.9791 0.579999C19.7924 0.579999 20.4924 0.766666 21.0791 1.14C21.6791 1.5 22.1391 1.99333 22.4591 2.62C22.7924 3.23333 22.9591 3.92 22.9591 4.68C22.9591 5.41333 22.7924 6.07333 22.4591 6.66C22.1391 7.24667 21.6791 7.71333 21.0791 8.06C20.4924 8.40667 19.7924 8.58 18.9791 8.58C18.1791 8.58 17.4791 8.40667 16.8791 8.06C16.2791 7.71333 15.8124 7.24 15.4791 6.64C15.1591 6.04 14.9991 5.37333 14.9991 4.64C14.9991 3.89333 15.1591 3.21333 15.4791 2.6C15.7991 1.98667 16.2591 1.5 16.8591 1.14C17.4591 0.766666 18.1657 0.579999 18.9791 0.579999ZM18.9791 1.58C18.3657 1.58 17.8324 1.72 17.3791 2C16.9391 2.28 16.5991 2.65333 16.3591 3.12C16.1191 3.57333 15.9991 4.08 15.9991 4.64C15.9991 5.46667 16.2657 6.16667 16.7991 6.74C17.3457 7.3 18.0724 7.58 18.9791 7.58C19.8857 7.58 20.6057 7.3 21.1391 6.74C21.6857 6.18 21.9591 5.49333 21.9591 4.68C21.9591 4.10667 21.8391 3.58667 21.5991 3.12C21.3591 2.65333 21.0124 2.28 20.5591 2C20.1191 1.72 19.5924 1.58 18.9791 1.58ZM30.6391 1.88C30.1591 1.73333 29.6924 1.66 29.2391 1.66C28.2257 1.66 27.4324 1.95333 26.8591 2.54C26.2991 3.11333 26.0191 3.85333 26.0191 4.76C26.0191 5.54667 26.2991 6.2 26.8591 6.72C27.4191 7.24 28.2057 7.5 29.2191 7.5C29.5924 7.5 29.9191 7.47333 30.1991 7.42C30.4791 7.35333 30.6991 7.29333 30.8591 7.24C31.0057 7.18667 31.0991 7.15333 31.1391 7.14C31.1924 7.12667 31.2324 7.12 31.2591 7.12C31.3924 7.12 31.5057 7.17333 31.5991 7.28C31.7057 7.37333 31.7591 7.48667 31.7591 7.62C31.7591 7.84667 31.6524 8 31.4391 8.08C31.1457 8.2 30.8124 8.3 30.4391 8.38C30.0791 8.46 29.6724 8.5 29.2191 8.5C28.3124 8.5 27.5457 8.33333 26.9191 8C26.2924 7.65333 25.8191 7.2 25.4991 6.64C25.1791 6.06667 25.0191 5.44 25.0191 4.76C25.0191 3.97333 25.1857 3.27333 25.5191 2.66C25.8524 2.03333 26.3324 1.54667 26.9591 1.2C27.5857 0.84 28.3457 0.66 29.2391 0.66C29.9191 0.66 30.5657 0.766666 31.1791 0.98C31.4057 1.06 31.5191 1.22667 31.5191 1.48C31.5191 1.6 31.4657 1.71333 31.3591 1.82C31.2524 1.91333 31.1324 1.96 30.9991 1.96C30.9591 1.96 30.8391 1.93333 30.6391 1.88ZM39.05 1.82C38.9167 1.78 38.6833 1.73333 38.35 1.68C38.03 1.62667 37.6767 1.6 37.29 1.6C36.6367 1.6 36.13 1.71333 35.77 1.94C35.41 2.16667 35.23 2.44667 35.23 2.78C35.23 3.07333 35.3767 3.31333 35.67 3.5C35.9767 3.67333 36.4767 3.79333 37.17 3.86L37.97 3.94C38.65 4.00667 39.1833 4.16 39.57 4.4C39.9567 4.64 40.23 4.92667 40.39 5.26C40.55 5.58 40.63 5.92 40.63 6.28C40.63 6.64 40.5367 7 40.35 7.36C40.1633 7.70667 39.8367 8 39.37 8.24C38.9167 8.46667 38.2633 8.58 37.41 8.58C36.9167 8.58 36.41 8.53333 35.89 8.44C35.37 8.33333 34.8767 8.18 34.41 7.98C34.21 7.88667 34.11 7.72667 34.11 7.5C34.11 7.38 34.1633 7.27333 34.27 7.18C34.3767 7.07333 34.4967 7.02 34.63 7.02C34.6567 7.02 34.7033 7.03333 34.77 7.06C34.8367 7.08667 34.9567 7.13333 35.13 7.2C35.3833 7.29333 35.7167 7.38 36.13 7.46C36.5433 7.54 36.97 7.58 37.41 7.58C38.13 7.58 38.6767 7.46 39.05 7.22C39.4367 6.96667 39.63 6.65333 39.63 6.28C39.63 5.93333 39.4967 5.64 39.23 5.4C38.9633 5.14667 38.5167 4.99333 37.89 4.94L37.09 4.86C36.3033 4.78 35.7033 4.63333 35.29 4.42C34.8767 4.19333 34.5967 3.93333 34.45 3.64C34.3033 3.34667 34.23 3.05333 34.23 2.76C34.23 2.42667 34.3167 2.1 34.49 1.78C34.6767 1.44667 34.99 1.16667 35.43 0.94C35.8833 0.713333 36.5033 0.6 37.29 0.6C37.7433 0.6 38.1633 0.633333 38.55 0.7C38.95 0.753333 39.3033 0.826667 39.61 0.92C39.7167 0.933333 39.8033 0.993333 39.87 1.1C39.9367 1.19333 39.97 1.29333 39.97 1.4C39.97 1.54667 39.9167 1.66667 39.81 1.76C39.7167 1.85333 39.6033 1.9 39.47 1.9C39.39 1.9 39.25 1.87333 39.05 1.82Z" fill="currentColor" />
11
11
  </svg>
12
12
  </div>
13
13
  </a>
14
- <ul class="header-menu">
14
+ <ul class="header_menu">
15
15
  <li>
16
16
  <a href="https://github.com/siberiacancode/mock-config-server" rel="noopener noreferrer" target="_blank">
17
- <div class="header-menu-item">
17
+ <div class="header_menu_item">
18
18
  <svg width="21" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">
19
19
  <path d="M10.5613 0C5.03628 0 0.561279 4.59118 0.561279 10.2539C0.561279 14.7853 3.42628 18.6279 7.39878 19.9823C7.89878 20.0788 8.08211 19.7618 8.08211 19.4892C8.08211 19.2457 8.07378 18.6006 8.06961 17.7461C5.28795 18.3647 4.70128 16.3703 4.70128 16.3703C4.24628 15.1869 3.58878 14.8707 3.58878 14.8707C2.68295 14.235 3.65878 14.2478 3.65878 14.2478C4.66295 14.3196 5.19045 15.3039 5.19045 15.3039C6.08211 16.8719 7.53128 16.4191 8.10295 16.1567C8.19295 15.4936 8.45045 15.0416 8.73628 14.7853C6.51545 14.5289 4.18128 13.6471 4.18128 9.71813C4.18128 8.59875 4.56878 7.68444 5.21045 6.96667C5.09795 6.70776 4.76045 5.66528 5.29795 4.2528C5.29795 4.2528 6.13545 3.97766 8.04795 5.30383C8.84795 5.07568 9.69795 4.96289 10.5479 4.95776C11.3979 4.96289 12.2479 5.07568 13.0479 5.30383C14.9479 3.97766 15.7854 4.2528 15.7854 4.2528C16.3229 5.66528 15.9854 6.70776 15.8854 6.96667C16.5229 7.68444 16.9104 8.59875 16.9104 9.71813C16.9104 13.6573 14.5729 14.5246 12.3479 14.7767C12.6979 15.0843 13.0229 15.7132 13.0229 16.6737C13.0229 18.046 13.0104 19.1483 13.0104 19.4816C13.0104 19.7507 13.1854 20.0711 13.6979 19.9686C17.6988 18.6236 20.5613 14.7784 20.5613 10.2539C20.5613 4.59118 16.0838 0 10.5613 0Z" fill="currentColor" />
20
20
  </svg>
@@ -24,7 +24,7 @@
24
24
  </li>
25
25
  <li>
26
26
  <a href="https://github.com/siberiacancode/mock-config-server/issues" rel="noopener noreferrer" target="_blank">
27
- <div class="header-menu-item">
27
+ <div class="header_menu_item">
28
28
  <svg width="17" height="17" fill="none" xmlns="http://www.w3.org/2000/svg">
29
29
  <path d="M14.9613 0.5H2.16128C1.28128 0.5 0.569279 1.22 0.569279 2.1L0.561279 16.5L3.76128 13.3H14.9613C15.8413 13.3 16.5613 12.58 16.5613 11.7V2.1C16.5613 1.22 15.8413 0.5 14.9613 0.5ZM6.16128 7.7H4.56128V6.1H6.16128V7.7ZM9.36128 7.7H7.76128V6.1H9.36128V7.7ZM12.5613 7.7H10.9613V6.1H12.5613V7.7Z" fill="currentColor" />
30
30
  </svg>
@@ -33,7 +33,7 @@
33
33
  </a>
34
34
  </li>
35
35
  <li>
36
- <div id="scheme-switcher" class="scheme-switcher"></div>
36
+ <div id="scheme_switcher" class="scheme_switcher"></div>
37
37
  </li>
38
38
  </ul>
39
39
  </div>
@@ -1 +1 @@
1
- document.getElementById('scheme-switcher').addEventListener('click', () => window.switchScheme());
1
+ document.getElementById('scheme_switcher').addEventListener('click', () => window.switchScheme());
@@ -1,5 +1,6 @@
1
1
  :root {
2
2
  color-scheme: dark;
3
+
3
4
  --accent: #6972ff;
4
5
  --accent-glass: rgb(105 114 255 / 50%);
5
6
  --primary: #fff;
@@ -1,31 +1,31 @@
1
- const lightStyles = document.querySelector(
2
- 'link[rel=stylesheet][media*=prefers-color-scheme][media*=light]'
3
- );
4
- const darkStyles = document.querySelector(
5
- 'link[rel=stylesheet][media*=prefers-color-scheme][media*=dark]'
6
- );
7
-
8
- function getSavedScheme() {
9
- return localStorage.getItem('color-scheme');
10
- }
11
-
12
- function setScheme(scheme) {
13
- const lightMedia = scheme === 'light' ? 'all' : 'not all';
14
- const darkMedia = scheme === 'dark' ? 'all' : 'not all';
15
-
16
- lightStyles.media = lightMedia;
17
- darkStyles.media = darkMedia;
18
-
19
- localStorage.setItem('color-scheme', scheme);
20
- }
21
-
22
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
- function switchScheme() {
24
- setScheme(getSavedScheme() === 'light' ? 'dark' : 'light');
25
- }
26
-
27
- function initScheme() {
28
- setScheme(getSavedScheme() ?? 'dark');
29
- }
30
-
31
- initScheme();
1
+ const lightStyles = document.querySelector(
2
+ 'link[rel=stylesheet][media*=prefers-color-scheme][media*=light]'
3
+ );
4
+ const darkStyles = document.querySelector(
5
+ 'link[rel=stylesheet][media*=prefers-color-scheme][media*=dark]'
6
+ );
7
+
8
+ function getSavedScheme() {
9
+ return localStorage.getItem('color-scheme');
10
+ }
11
+
12
+ function setScheme(scheme) {
13
+ const lightMedia = scheme === 'light' ? 'all' : 'not all';
14
+ const darkMedia = scheme === 'dark' ? 'all' : 'not all';
15
+
16
+ lightStyles.media = lightMedia;
17
+ darkStyles.media = darkMedia;
18
+
19
+ localStorage.setItem('color-scheme', scheme);
20
+ }
21
+
22
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
+ function switchScheme() {
24
+ setScheme(getSavedScheme() === 'light' ? 'dark' : 'light');
25
+ }
26
+
27
+ function initScheme() {
28
+ setScheme(getSavedScheme() ?? 'dark');
29
+ }
30
+
31
+ initScheme();
@@ -1,5 +1,6 @@
1
1
  :root {
2
2
  color-scheme: light;
3
+
3
4
  --accent: rgb(149 155 255);
4
5
  --accent-glass: rgb(149 155 255 / 50%);
5
6
  --primary: #343434;
@@ -1,4 +1,4 @@
1
- .tab-items {
1
+ .tab_items {
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  align-items: center;
@@ -11,7 +11,7 @@
11
11
  line-height: 17px;
12
12
  }
13
13
 
14
- .tab-item {
14
+ .tab_item {
15
15
  display: flex;
16
16
  width: 120px;
17
17
  height: 30px;
@@ -21,10 +21,10 @@
21
21
  cursor: pointer;
22
22
  }
23
23
 
24
- .tab-item:not(.tab-item-active):hover {
24
+ .tab_item:not(.tab_item_active):hover {
25
25
  background-color: var(--accent-glass);
26
26
  }
27
27
 
28
- .tab-content {
28
+ .tab_content {
29
29
  display: none;
30
30
  }
@@ -3,7 +3,7 @@ function switchTab(activeTabId) {
3
3
  }
4
4
 
5
5
  function initTab() {
6
- const tabItems = document.getElementsByClassName('tab-item');
6
+ const tabItems = document.getElementsByClassName('tab_item');
7
7
  for (let i = 0; i < tabItems.length; i += 1) {
8
8
  tabItems[i].addEventListener('click', () => switchTab(tabItems[i].id));
9
9
  }
@@ -1,10 +1,10 @@
1
1
  /* stylelint-disable */
2
- .tab-item-REST #tab-item-REST,
3
- .tab-item-GraphQL #tab-item-GraphQL {
2
+ .tab_item-REST #tab_item-REST,
3
+ .tab_item-GraphQL #tab_item-GraphQL {
4
4
  background: var(--accent);
5
5
  }
6
6
 
7
- .tab-item-REST #tab-content-REST,
8
- .tab-item-GraphQL #tab-content-GraphQL {
7
+ .tab_item-REST #tab_content-REST,
8
+ .tab_item-GraphQL #tab_content-GraphQL {
9
9
  display: unset;
10
10
  }
@@ -17,9 +17,9 @@
17
17
  <%- include(rootPath('features/tab/index')) -%>
18
18
  </head>
19
19
 
20
- <body class="tab-item-<%= graphqlRequestSuggestions.length ? api.graphql : api.rest %>">
20
+ <body class="tab_item-<%= graphqlRequestSuggestions.length ? api.graphql : api.rest %>">
21
21
  <%- include(rootPath('components/header/index')) -%>
22
- <div class="margin-container">
22
+ <div class="margin_container">
23
23
  <div class="hero">
24
24
  <div class="title">
25
25
  <img src="/assets/images/404.png" />
@@ -33,18 +33,18 @@
33
33
  </div>
34
34
  </div>
35
35
  </div>
36
- <div class="margin-container">
36
+ <div class="margin_container">
37
37
  <div class="content">
38
- <div class="content-head">
39
- <div class="tab-items">
38
+ <div class="content_head">
39
+ <div class="tab_items">
40
40
  <% Object.values(api).forEach((variant)=> { %>
41
- <div id="tab-item-<%=variant%>" class="tab-item">
41
+ <div id="tab_item-<%=variant%>" class="tab_item">
42
42
  <%=variant%>
43
43
  </div>
44
44
  <% }) %>
45
45
  </div>
46
46
  </div>
47
- <div id="tab-content-<%=api.rest%>" class="tab-content">
47
+ <div id="tab_content-<%=api.rest%>" class="tab_content">
48
48
  <div class="description">
49
49
  <% if (restRequestSuggestions.length) { %>
50
50
  <span>We searched a bit, maybe this will help you:</span>
@@ -61,7 +61,7 @@
61
61
  </div>
62
62
  </div>
63
63
 
64
- <div id="tab-content-<%=api.graphql%>" class="tab-content">
64
+ <div id="tab_content-<%=api.graphql%>" class="tab_content">
65
65
  <div class="description">
66
66
  <% if (graphqlRequestSuggestions.length) { %>
67
67
  <span>We searched a bit, maybe this will help you:</span>
@@ -1,4 +1,4 @@
1
- import type { CalculateByDescriptorValueCheckMode, CheckMode, CompareWithDescriptorValueCheckMode, CheckActualValueCheckMode, CompareWithDescriptorAnyValueCheckMode, CompareWithDescriptorStringValueCheckMode } from '../types';
1
+ import type { CalculateByDescriptorValueCheckMode, CheckActualValueCheckMode, CheckMode, CompareWithDescriptorAnyValueCheckMode, CompareWithDescriptorStringValueCheckMode, CompareWithDescriptorValueCheckMode } from '../types';
2
2
  export declare const CHECK_ACTUAL_VALUE_CHECK_MODES: CheckActualValueCheckMode[];
3
3
  export declare const COMPARE_WITH_DESCRIPTOR_ANY_VALUE_CHECK_MODES: CompareWithDescriptorAnyValueCheckMode[];
4
4
  export declare const COMPARE_WITH_DESCRIPTOR_STRING_VALUE_CHECK_MODES: CompareWithDescriptorStringValueCheckMode[];
@@ -1,3 +1,3 @@
1
+ export * from './getGraphQLInput/getGraphQLInput';
1
2
  export * from './parseGraphQLRequest/parseGraphQLRequest';
2
3
  export * from './parseQuery/parseQuery';
3
- export * from './getGraphQLInput/getGraphQLInput';
@@ -3,6 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _getGraphQLInput = require("./getGraphQLInput/getGraphQLInput");
7
+ Object.keys(_getGraphQLInput).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _getGraphQLInput[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _getGraphQLInput[key];
14
+ }
15
+ });
16
+ });
6
17
  var _parseGraphQLRequest = require("./parseGraphQLRequest/parseGraphQLRequest");
7
18
  Object.keys(_parseGraphQLRequest).forEach(function (key) {
8
19
  if (key === "default" || key === "__esModule") return;
@@ -24,15 +35,4 @@ Object.keys(_parseQuery).forEach(function (key) {
24
35
  return _parseQuery[key];
25
36
  }
26
37
  });
27
- });
28
- var _getGraphQLInput = require("./getGraphQLInput/getGraphQLInput");
29
- Object.keys(_getGraphQLInput).forEach(function (key) {
30
- if (key === "default" || key === "__esModule") return;
31
- if (key in exports && exports[key] === _getGraphQLInput[key]) return;
32
- Object.defineProperty(exports, key, {
33
- enumerable: true,
34
- get: function () {
35
- return _getGraphQLInput[key];
36
- }
37
- });
38
38
  });
@@ -1,10 +1,10 @@
1
+ export * from './asyncHandler';
2
+ export * from './config';
3
+ export * from './entities';
4
+ export * from './graphql';
5
+ export * from './interceptors';
1
6
  export * from './isPlainObject/isPlainObject';
2
7
  export * from './isPrimitive/isPrimitive';
3
8
  export * from './isRegExp/isRegExp';
4
9
  export * from './sleep';
5
10
  export * from './url';
6
- export * from './config';
7
- export * from './entities';
8
- export * from './interceptors';
9
- export * from './graphql';
10
- export * from './asyncHandler';