mockaton 5.0.0 → 5.0.1

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mockaton",
3
3
  "description": "A deterministic server-side for developing and testing frontend clients",
4
4
  "type": "module",
5
- "version": "5.0.0",
5
+ "version": "5.0.1",
6
6
  "main": "index.js",
7
7
  "types": "index.d.ts",
8
8
  "license": "MIT",
package/src/Dashboard.js CHANGED
@@ -132,8 +132,7 @@ function SectionByMethod({ method, brokers }) {
132
132
  r('tbody', null,
133
133
  r('th', null, method),
134
134
  Object.entries(brokers)
135
- .sort((a, b) => a[0].localeCompare(b[0]))
136
- .filter(([, broker]) => broker.mocks.length) // handles Markdown doc
135
+ .filter(([, broker]) => broker.mocks.length > 1) // Excludes Markdown only routes (>1 because of the autogen500)
137
136
  .map(([urlMask, broker]) =>
138
137
  r('tr', null,
139
138
  r('td', null, r(PreviewLink, { method, urlMask, documentation: broker.documentation })),
package/src/MockBroker.js CHANGED
@@ -78,7 +78,7 @@ export class MockBroker {
78
78
  }
79
79
 
80
80
  #registerTemp500() {
81
- const { urlMask, method } = Route.parseFilename(this.mocks[0])
81
+ const { urlMask, method } = Route.parseFilename(this.mocks[0] || this.documentation)
82
82
  let mask = urlMask
83
83
  const t = join(Config.mocksDir, urlMask)
84
84
  if (existsSync(t) && lstatSync(t).isDirectory())