Releases: mocks-server/main
Releases · mocks-server/main
YAML support. Files API
core [3.9.0]
Changed
- refactor(#371): Separate logic about loading files from logic about loading routes and collections from files. Use the new
files.createLoader
method to create routes and collections loaders.
Added
- feat: Expose files API in core.
- feat: Add
createLoader
method to files. - feat: Add
reload
method to files.
Fixed
- fix: Debounce time in files reload was not working. Now it has 200ms of debounce, with a maximum time wait of 1000ms
main [3.9.0]
Changed
- feat: Log possible start errors
- chore(deps): Update
@mocks-server/core
dependency to 3.9.0
File and Status variant handlers. Cypress commands
main [3.8.0]
Changed
- chore(deps): Update core dependency to v3.8.0
core [3.8.0]
Added
cypress-commands [6.0.0]
Added
- feat(#229): Support managing multiple Mocks Servers allowing to create multiple ApiClients
- feat(#229): Export
MocksServerApiClient
class for creating api clients - feat(#230): Add Cypress logs when running commands and MOCKS_SERVER_LOGS environment variable for disabling them
Changed
- feat: BREAKING CHANGE. Export
register
method for registering commands. - refactor: Migrate to TypeScript
admin-api-client [6.1.0]
Added
- feat: Export AdminApiClient class allowing to create clients.
Changed
- refactor: Migrate to TypeScript
- refactor: Add class allowing to create multiple clients. Keep global client methods creating a default client and exporting its methods.
- refactor: Use default host and port values from
@mocks-server/admin-api-paths
admin-api-client-data-provider [6.0.1]
Changed
- refactor: Use default host and port values from
@mocks-server/admin-api-paths
admin-api-paths [4.1.0]
Added
- feat: Add DEFAULT_PORT, DEFAULT_HOST, DEFAULT_CLIENT_HOST and DEFAULT_PROTOCOL constants
- docs: Add installation chapter
Changed
- refactor: Migrate to TypeScript
plugin-admin-api [3.3.1]
Changed
- refactor: Use default host and port values from
@mocks-server/admin-api-paths
Static and Text Variant Handlers
core [3.7.0]
Added
- feat(#366): Add "text" Variant Handler
- feat: Add
check
option to collections.select method. When set totrue
, the method returns a promise that is resolved when the collection exists and it is used by the mock. Otherwise the promise is rejected. It has been implemented with an option to avoid breaking changes. - feat(#337): Add "static" Variant Handler
- feat: Support defining routes without method. In that case, the route will handle all HTTP methods
- feat: Support method "*" in routes. In that case, the route will handle all HTTP methods.
- feat: Add "disabled" property to variants. When it is true and the variant is selected, the route will be disabled.
- feat: Support property
router
in Variant Handlers. When defined, the router will be mounted using expressuse
instead of specific methods. - feat (#369): Add default content-type header to json Variant Handler
Changed
- feat: Return http methods in lowercase in plain routes. Return only valid http methods.
plugin-admin-api [3.3.0]
Added
- feat: Add new disabled property of variants to openapi.
- feat: Support undefined method in variants
main [3.7.0]
Changed
- chore(deps): Update core dependency to v3.7.0
- chore(deps): Update plugin-admin-api dependency to v3.3.0
Change concepts and APIs
core 3.6.0
Added
- feat(#334): Expose new
core.mock
API - feat(#334): Add new option
mock.routes.delay
. Deprecatemocks.delay
- feat(#334): Add new option
mock.collections.selected
. Deprecatemocks.selected
- feat(#334): Support
type
andoptions
properties in variants - feat(#334): Support
routes
androuteVariants
properties in collections. DeprecateroutesVariants
- feat: Add
core.version
getter - feat: Add
files.enabled
option
Changed
- refactor(#334): Reorganize files and folders
- feat(#334): Deprecate
core.restartServer
,core.addRouter
andcore.removeRouter
methods. Add alerts when used.core.server
methods must be used instead. - feat(#334): Deprecate
core.addRoutesHandler
method. Add alerts when used.core.variantHandlers.register
method must be used instead. - feat(#334): Deprecate
routesHandlers
option.variantHandlers.register
option must be used instead. - feat(#334): Deprecate
core.mocks.restoreRoutesVariants
method.core.mock.restoreRouteVariants
method must be used instead. - feat(#334): Deprecate
core.mocks.customRoutesVariants
method.core.mock.customRouteVariants
method must be used instead. - feat(#334): Deprecate
core.onChangeMocks
method.core.mock.onChange
method must be used instead. - feat(#334): Deprecate
core.loadMocks
method.core.mock.createLoaders
method must be used instead. - feat(#334): Deprecate
core.loadRoutes
method.core.mock.createLoaders
method must be used instead. - feat(#334): Deprecate
core.mocks.plainRoutes
getter.core.mock.routes.plain
getter must be used instead. - feat(#334): Deprecate
core.mocks.plainRoutesVariants
getter.core.mock.routes.plainVariants
getter must be used instead. The format of items has changed in the new getter. - feat(#334): Deprecate
core.mocks.current
getter.core.mock.collections.selected
getter must be used instead. - feat(#334): Deprecate
core.mocks.current
setter.core.mock.collections.select
method must be used instead. - feat(#334): Deprecate
core.mocks.ids
getter.core.mock.collections.ids
getter must be used instead. - feat(#334): Deprecate
core.mocks.plainMocks
getter.core.mock.collections.plain
getter must be used instead. The format of items has changed in the new getter. - feat(#334): Deprecate
core.onChangeAlerts
method.core.alerts.root.onChange
method must be used instead. - feat(#334): Deprecate
core.logs
getter.core.logger.globalStore
getter must be used instead. - feat(#334): Deprecate
core.onChangeLogs
method.core.logger.onChangeGlobalStore
method must be used instead. - feat(#334): Deprecate
core.alerts
when used out of plugins, because it is a getter returning a flat collection of alerts. In next major version, it will return the alerts API.
main 3.6.0
Added
- feat: Export createServer function returning a core instance with preinstalled plugins
admin-api-client 6.0.0
Changed
- feat: BREAKING CHANGE. Modify methods to adapt them to the new [email protected] REST API
admin-api-client-data-provider 6.0.0
Changed
- feat: BREAKING CHANGE. Modify methods to adapt them to the new [email protected] REST API
admin-api-paths 4.0.0
Added
- feat: Add new paths for admin-api-plugin
Changed
- feat: BREAKING CHANGE. Add
LEGACY_
prefix to all previous paths.
config 1.2.0
Added
- feat: Add
hasBeenSet
property to option - feat: Add
getValidationSchema
method to root config object. It returns a validation schema for all namespaces.
Fixed
- fix: Remove unused folder
cypress-commands 5.0.0
Changed
- feat: BREAKING CHANGE. Rename command
mocksSetMock
tosetCollection
- feat: BREAKING CHANGE. Rename command
mocksSetSettings
tomocksSetConfig
- feat: BREAKING CHANGE. Rename command
mocksRestoreRoutesVariants
tomocksRestoreRouteVariants
- feat: BREAKING CHANGE. Rename command
mocksConfig
tomocksConfigAdminApiClient
Removed
- feat: BREAKING CHANGE. Remove environment variable
MOCKS_SERVER_BASE_URL
- feat: BREAKING CHANGE. Remove environment variable
MOCKS_SERVER_ADMIN_API_PATH
Added
- feat: Add environment variable
MOCKS_SERVER_ADMIN_API_PORT
- feat: Add environment variable
MOCKS_SERVER_ADMIN_API_HOST
plugin-admin-api 3.2.0
Added
Changed
- feat: Use new core.server API
- feat: Use core.mock.restoreRouteVariants
- feat: Use core.mock.routes.plain getter
- feat: Use core.mock.routes.plainVariants getter
- feat: Use core.mock.customRouteVariants getter
- feat: Use core.mock.collections.plain getter
plugin-inquirer-cli 3.2.0
Added
- Add debounce to refresh menu function to avoid too much renders
Changed
- feat: Use core v3.6 new options
- feat: Use core.mock.restoreRouteVariants method
- feat: Use core.mock.customRouteVariants getter
- feat: Use core.server.restart method
- feat: Use core.mock.onChange method
- feat: Use core.mock.routes.plain getter
- feat: Use core.mock.routes.plainVariants getter
- feat: Use core.mock.collections.selected getter
- feat: Use core.mock.collections.ids getter
- feat: Use core.mock.collections.plain getter
- feat: Use core.alerts.onChange method
- feat: Rename concepts
plugin-proxy 3.1.0
Changed
- refactor: Use new core method
variantHandlers.register
instead of the deprecatedaddRoutesHandler
Variant handlers
core
[3.5.0]
Added
- feat(#335): Pass only response property from variants to route variant handlers having the "version" property defined as "4". If it has another value, pass the whole variant object (for backward compatibility)
- feat(#336): Add "Json" and "Middleware" variant handlers.
- feat: Support defining the response preview in the v4 handlers as "preview" property. Keep "plainResponsePreview" for backward compatibility in old handlers.
- feat: Support "deprecated" property in route handlers. Add an alert whenever any route variant uses a deprecated handler
Changed
- feat: Log requests in the middleware added by the Mock class, so it has not to be logged in every different handler.
main
[3.5.0]
Changed
- chore(deps): Update core dependency to v3.5.0
- chore(deps): Update plugin-proxy dependency to v3.0.0
plugin-proxy
[3.0.0]
Changed
- feat: Add routes handler "proxy-v4" using new handlers API released on @mocks-server/[email protected]. Keep old "legacy" handler for backward compatibility.
- chore(deps): Require @mocks-server/core >=3.5.0 in peerDependencies
logger
[1.1.0]
Changed
- feat: Increase winston-array-transport maxEventListeners
admin-api-client
[5.0.2]
Changed
- refactor: Rename fetch variable into crossFetch
cypress-commands
[4.0.2]
Changed
- chore(deps): Update @mocks-server/admin-api-client
Deprecate plugin formats
core
[3.4.0] - 2022-07-01
Added
- feat: Add an alert when plugins are defined as objects or functions. closes #351
main
[3.4.0] - 2022-07-01
Changed
- chore(deps): Update core dependency to v3.4.0
Update notifier
core
Added
- feat(#332): Add update notifier. Display an alert in case package is out of date. closes #332
- feat: Add
advancedOptions
parameter to Core constructor. Addpkg
option allowing to determine name and version for update notifier.
Fixed
- fix: Add Winston missing dependencies
main
Changed
- chore(deps): Update core dependency to v3.3.0
Added
- feat: Pass pkg advanced option to core for displaying update notifications of this package instead of core
Namespaced logger
core
[3.2.0]
Changed
- feat: Use new logger. Deprecate
tracer
in core API. Provide namespaced loggers to plugins. closes #339 - feat: Pass custom core to route variant middlewares and route handlers. The
alerts
andlogger
properties are namespaced for each different route variant. - feat: Pass new custom core API to plugins. All core methods are available in the first parameter. The
core
property is still available for backward compatibility, but using it produces an alert.
Added
- feat: Add
onChangeLogs
method, allowing to execute a callback whenever logs changes. - feat: Add
logs
getter, returning an array with all logs. - feat: Log configuration initial values. closes #333
config
[1.1.0]
Added
- feat: Add
root
getter returning root config object to namespaces. Add it also to root config as an alias in order to keep the same interface. - feat: Add
programmaticLoadedValues
getter returning initial values from programmatic config. Useful for debugging purposes - feat: Add
fileLoadedValues
getter returning initial values from file config. Useful for debugging purposes - feat: Add
envLoadedValues
getter returning initial values from environment config. Useful for debugging purposes - feat: Add
argsLoadedValues
getter returning initial values from args. Useful for debugging purposes
Changed
- refactor: Do not create empty namespaces in internal environment configuration
logger
[1.0.0]
Added
- feat: First release
main
[3.2.0]
Changed
- chore(deps): Update core dependency to v3.2.0
nested-collections
[2.0.0]
Changed
- feat: BREAKING CHANGE. Export NestedCollections as named export
Added
- feat: Export types
- feat: Add root getter
plugin-admin-api
[3.1.0]
Changed
- feat: Use new custom core API
plugin-inquirer-cli
[3.1.0]
Changed
- refactor: Remove unused property
Added
- feat: Display context in errors and warnings
plugin-proxy
[2.1.0]
Changed
- feat: Use new custom core API
New plugins alerts API
core
[3.1.0]
Changed
- feat: Pass new
alerts
API to plugins. Add an alert if oldaddAlert
orremoveAlerts
methods are used. closes #262 - chore(deps): Update devDependencies.
main
[3.1.0]
Changed
- chore(deps): Update core dependency to v3.1.0
admin-api-client
[5.0.1]
Changed
- chore(deps): Update devDependencies
admin-api-client-data-provider
[5.0.1]
Changed
- chore(deps): Update devDependencies
admin-api-paths
[3.0.1]
Changed
- chore(deps): Update devDependencies
cypress-commands
[4.0.1]
Changed
- chore(deps): Update devDependencies
plugin-admin-api
[3.0.1]
Changed
- chore(deps): Update devDependencies
config
[1.0.2]
Changed
- chore(deps): Update devDependencies
plugin-inquirer-cli
[3.0.1]
Changed
- chore(deps): Update devDependencies
plugin-proxy
[2.0.1]
Changed
- chore(deps): Update devDependencies
nested-collections
[1.0.0]
Added
- feat: First release
Fix scaffold
main
[3.0.1] - 2022-05-23
Changed
- feat: Update core dependency to 3.0.1