mockaton 8.12.2 → 8.12.4
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/README.md +66 -41
- package/index.d.ts +5 -1
- package/package.json +2 -2
- package/src/Api.js +16 -12
- package/src/MockBroker.js +7 -4
- package/src/MockDispatcher.js +1 -1
- package/src/Mockaton.test.js +1 -0
- package/src/StaticDispatcher.js +2 -2
- package/src/config.js +56 -70
- package/src/mockBrokersCollection.js +7 -7
- package/src/utils/jwt.js +2 -2
- package/src/utils/validate.js +8 -0
- package/src/utils/validate.test.js +47 -0
- package/.coverage/lcov.info +0 -2267
- package/TODO.md +0 -11
- package/dev-mockaton.js +0 -17
package/TODO.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# TODO
|
|
2
|
-
|
|
3
|
-
- Refactor tests
|
|
4
|
-
- Group By Route/Method localstorage
|
|
5
|
-
- openapi
|
|
6
|
-
- parsing it for examples?
|
|
7
|
-
- displaying documentation (.openapi)
|
|
8
|
-
- perhaps instead using .js functions `export const doc`
|
|
9
|
-
- Preserve focus when refreshing dashboard `init()`
|
|
10
|
-
- More real-time updates. Currently, it's only for add/remove mock but not for
|
|
11
|
-
static files and changes from another client (Browser, or Commander).
|
package/dev-mockaton.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { join } from 'node:path'
|
|
2
|
-
import { Mockaton, jwtCookie } from './index.js'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Mockaton({
|
|
6
|
-
port: 2345,
|
|
7
|
-
mocksDir: join(import.meta.dirname, 'fixtures-mocks'),
|
|
8
|
-
staticDir: join(import.meta.dirname, 'fixtures-static-mocks'),
|
|
9
|
-
cookies: {
|
|
10
|
-
'My Admin User': 'my-cookie=1;Path=/;SameSite=strict',
|
|
11
|
-
'My Normal User': 'my-cookie=0;Path=/;SameSite=strict',
|
|
12
|
-
'My JWT': jwtCookie('my-cookie', {
|
|
13
|
-
email: 'john.doe@example.com',
|
|
14
|
-
picture: 'https://cdn.auth0.com/avatars/jd.png'
|
|
15
|
-
})
|
|
16
|
-
}
|
|
17
|
-
})
|