kuzzle 2.17.6 → 2.18.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.
- package/bin/start-kuzzle-server +1 -1
- package/lib/api/controllers/adminController.js +1 -1
- package/lib/api/controllers/authController.js +7 -2
- package/lib/api/controllers/baseController.js +1 -1
- package/lib/api/controllers/bulkController.js +1 -1
- package/lib/api/controllers/clusterController.js +1 -1
- package/lib/api/controllers/collectionController.js +1 -1
- package/lib/api/controllers/documentController.js +7 -2
- package/lib/api/controllers/index.js +1 -1
- package/lib/api/controllers/indexController.js +11 -7
- package/lib/api/controllers/memoryStorageController.js +1 -1
- package/lib/api/controllers/realtimeController.js +1 -1
- package/lib/api/controllers/securityController.js +55 -23
- package/lib/api/controllers/serverController.js +1 -1
- package/lib/api/documentExtractor.js +1 -1
- package/lib/api/funnel.js +1 -1
- package/lib/api/httpRoutes.js +7 -5
- package/lib/api/openapi/OpenApiManager.js +5 -1
- package/lib/api/openapi/components/document/get.yaml +1 -1
- package/lib/api/openapi/components/document/index.d.ts +2 -0
- package/lib/api/openapi/components/document/index.js +6 -1
- package/lib/api/openapi/components/document/mCreateOrReplace.yaml +93 -0
- package/lib/api/openapi/components/document/update.yaml +1 -1
- package/lib/api/openapi/components/index.d.ts +1 -0
- package/lib/api/openapi/components/index.js +1 -0
- package/lib/api/openapi/components/security/index.d.ts +2 -0
- package/lib/api/openapi/components/security/index.js +10 -0
- package/lib/api/openapi/components/security/upsertUser.yaml +59 -0
- package/lib/api/openapi/openApiGenerator.js +1 -1
- package/lib/api/rateLimiter.js +1 -1
- package/lib/api/request/kuzzleRequest.d.ts +21 -0
- package/lib/api/request/kuzzleRequest.js +49 -3
- package/lib/api/request/requestContext.js +1 -1
- package/lib/api/request/requestInput.js +1 -1
- package/lib/api/request/requestResponse.js +1 -1
- package/lib/cluster/command.js +1 -1
- package/lib/cluster/idCardHandler.js +1 -1
- package/lib/cluster/index.js +1 -1
- package/lib/cluster/node.js +8 -8
- package/lib/cluster/publisher.js +1 -1
- package/lib/cluster/state.js +1 -1
- package/lib/cluster/subscriber.js +4 -1
- package/lib/config/documentEventAliases.js +1 -1
- package/lib/config/index.js +1 -1
- package/lib/core/auth/formatProcessing.js +1 -1
- package/lib/core/auth/passportResponse.js +1 -1
- package/lib/core/auth/passportWrapper.js +1 -1
- package/lib/core/auth/tokenManager.js +1 -1
- package/lib/core/backend/applicationManager.js +1 -1
- package/lib/core/backend/backend.js +1 -1
- package/lib/core/backend/backendCluster.js +1 -1
- package/lib/core/backend/backendConfig.js +1 -1
- package/lib/core/backend/backendController.js +1 -1
- package/lib/core/backend/backendErrors.js +1 -1
- package/lib/core/backend/backendHook.js +1 -1
- package/lib/core/backend/backendImport.js +1 -1
- package/lib/core/backend/backendOpenApi.js +1 -1
- package/lib/core/backend/backendPipe.js +1 -1
- package/lib/core/backend/backendPlugin.js +1 -1
- package/lib/core/backend/backendStorage.js +1 -1
- package/lib/core/backend/backendVault.js +1 -1
- package/lib/core/backend/internalLogger.js +1 -1
- package/lib/core/cache/cacheDbEnum.js +1 -1
- package/lib/core/cache/cacheEngine.js +1 -1
- package/lib/core/network/accessLogger.js +12 -7
- package/lib/core/network/clientConnection.js +1 -1
- package/lib/core/network/context.js +1 -1
- package/lib/core/network/entryPoint.js +6 -6
- package/lib/core/network/httpRouter/index.js +1 -1
- package/lib/core/network/httpRouter/routeHandler.js +1 -1
- package/lib/core/network/httpRouter/routePart.js +1 -1
- package/lib/core/network/protocolManifest.js +1 -1
- package/lib/core/network/protocols/httpMessage.js +1 -1
- package/lib/core/network/protocols/httpwsProtocol.js +5 -10
- package/lib/core/network/protocols/internalProtocol.js +1 -1
- package/lib/core/network/protocols/mqttProtocol.js +4 -3
- package/lib/core/network/protocols/protocol.js +1 -1
- package/lib/core/network/router.js +11 -2
- package/lib/core/plugin/plugin.js +1 -1
- package/lib/core/plugin/pluginContext.js +1 -1
- package/lib/core/plugin/pluginManifest.js +1 -1
- package/lib/core/plugin/pluginRepository.js +1 -1
- package/lib/core/plugin/pluginsManager.js +1 -1
- package/lib/core/plugin/privilegedContext.js +1 -1
- package/lib/core/realtime/actionEnum.js +1 -1
- package/lib/core/realtime/channel.js +1 -1
- package/lib/core/realtime/connectionRooms.js +1 -1
- package/lib/core/realtime/hotelClerk.js +66 -24
- package/lib/core/realtime/index.js +1 -1
- package/lib/core/realtime/notification/document.js +1 -1
- package/lib/core/realtime/notification/index.js +1 -1
- package/lib/core/realtime/notification/server.js +1 -1
- package/lib/core/realtime/notification/user.js +1 -1
- package/lib/core/realtime/notifier.js +1 -1
- package/lib/core/realtime/room.js +1 -1
- package/lib/core/realtime/subscription.js +1 -1
- package/lib/core/security/index.js +1 -1
- package/lib/core/security/profileRepository.js +1 -1
- package/lib/core/security/roleRepository.js +1 -1
- package/lib/core/security/securityLoader.js +1 -1
- package/lib/core/security/tokenRepository.js +1 -1
- package/lib/core/security/userRepository.js +1 -1
- package/lib/core/shared/KoncordeWrapper.js +1 -1
- package/lib/core/shared/abstractManifest.js +1 -1
- package/lib/core/shared/repository.js +1 -1
- package/lib/core/shared/sdk/embeddedSdk.d.ts +2 -2
- package/lib/core/shared/sdk/embeddedSdk.js +4 -3
- package/lib/core/shared/sdk/funnelProtocol.d.ts +13 -0
- package/lib/core/shared/sdk/funnelProtocol.js +76 -81
- package/lib/core/shared/sdk/impersonatedSdk.js +1 -1
- package/lib/core/shared/store.js +1 -1
- package/lib/core/statistics/index.js +1 -1
- package/lib/core/statistics/statistics.js +1 -1
- package/lib/core/storage/clientAdapter.js +1 -1
- package/lib/core/storage/indexCache.js +1 -1
- package/lib/core/storage/storageEngine.js +1 -1
- package/lib/core/storage/storeScopeEnum.js +1 -1
- package/lib/core/validation/baseType.js +1 -1
- package/lib/core/validation/index.js +1 -1
- package/lib/core/validation/types/anything.js +1 -1
- package/lib/core/validation/types/boolean.js +1 -1
- package/lib/core/validation/types/date.js +1 -1
- package/lib/core/validation/types/email.js +1 -1
- package/lib/core/validation/types/enum.js +1 -1
- package/lib/core/validation/types/geoPoint.js +1 -1
- package/lib/core/validation/types/geoShape.js +1 -1
- package/lib/core/validation/types/integer.js +1 -1
- package/lib/core/validation/types/ipAddress.js +1 -1
- package/lib/core/validation/types/numeric.js +1 -1
- package/lib/core/validation/types/object.js +1 -1
- package/lib/core/validation/types/string.js +1 -1
- package/lib/core/validation/types/url.js +1 -1
- package/lib/core/validation/validation.js +1 -1
- package/lib/kerror/codes/1-services.json +1 -1
- package/lib/kerror/codes/index.js +1 -1
- package/lib/kerror/errors/badRequestError.js +1 -1
- package/lib/kerror/errors/externalServiceError.js +1 -1
- package/lib/kerror/errors/forbiddenError.js +1 -1
- package/lib/kerror/errors/gatewayTimeoutError.js +1 -1
- package/lib/kerror/errors/index.js +1 -1
- package/lib/kerror/errors/internalError.js +1 -1
- package/lib/kerror/errors/kuzzleError.d.ts +1 -1
- package/lib/kerror/errors/kuzzleError.js +1 -1
- package/lib/kerror/errors/multipleErrorsError.js +1 -1
- package/lib/kerror/errors/notFoundError.js +1 -1
- package/lib/kerror/errors/partialError.js +1 -1
- package/lib/kerror/errors/pluginImplementationError.js +1 -1
- package/lib/kerror/errors/preconditionError.js +1 -1
- package/lib/kerror/errors/serviceUnavailableError.js +1 -1
- package/lib/kerror/errors/sizeLimitError.js +1 -1
- package/lib/kerror/errors/tooManyRequestsError.js +1 -1
- package/lib/kerror/errors/unauthorizedError.js +1 -1
- package/lib/kerror/index.js +2 -4
- package/lib/kuzzle/dumpGenerator.js +1 -1
- package/lib/kuzzle/event/kuzzleEventEmitter.js +39 -1
- package/lib/kuzzle/event/pipeRunner.js +1 -1
- package/lib/kuzzle/event/waterfall.js +1 -1
- package/lib/kuzzle/index.js +1 -1
- package/lib/kuzzle/internalIndexHandler.js +1 -1
- package/lib/kuzzle/kuzzle.js +1 -1
- package/lib/kuzzle/kuzzleStateEnum.js +1 -1
- package/lib/kuzzle/log.js +1 -1
- package/lib/kuzzle/vault.js +1 -1
- package/lib/model/security/profile.js +1 -1
- package/lib/model/security/rights.js +1 -1
- package/lib/model/security/role.js +1 -1
- package/lib/model/security/token.js +1 -1
- package/lib/model/security/user.js +6 -7
- package/lib/model/storage/apiKey.js +1 -1
- package/lib/model/storage/baseModel.js +1 -1
- package/lib/service/cache/redis.js +1 -1
- package/lib/service/service.js +1 -1
- package/lib/service/storage/elasticsearch.js +108 -39
- package/lib/service/storage/esWrapper.js +1 -1
- package/lib/service/storage/queryTranslator.js +1 -1
- package/lib/types/Controller.js +1 -1
- package/lib/types/ControllerDefinition.js +1 -1
- package/lib/types/Deprecation.js +1 -1
- package/lib/types/EventHandler.js +1 -1
- package/lib/types/KuzzleDocument.d.ts +3 -0
- package/lib/types/Plugin.js +1 -1
- package/lib/types/PluginManifest.js +1 -1
- package/lib/types/RequestPayload.js +1 -1
- package/lib/types/ResponsePayload.js +1 -1
- package/lib/types/StrategyDefinition.js +1 -1
- package/lib/types/Token.js +1 -1
- package/lib/types/User.js +1 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/index.js +1 -2
- package/lib/util/array.js +1 -1
- package/lib/util/assertType.js +1 -1
- package/lib/util/asyncStore.js +1 -1
- package/lib/util/debug.js +1 -1
- package/lib/util/deprecate.js +1 -1
- package/lib/util/didYouMean.js +1 -1
- package/lib/util/dump-collection.d.ts +35 -0
- package/lib/util/dump-collection.js +11 -8
- package/lib/util/extractFields.js +1 -1
- package/lib/util/inflector.js +1 -1
- package/lib/util/koncordeCompat.js +1 -1
- package/lib/util/memoize.js +1 -1
- package/lib/util/mutex.js +1 -1
- package/lib/util/name-generator.js +1 -1
- package/lib/util/promback.js +1 -1
- package/lib/util/requestAssertions.js +1 -1
- package/lib/util/safeObject.js +1 -1
- package/lib/util/stackTrace.js +56 -17
- package/lib/util/wildcard.js +1 -1
- package/package-lock.json +102 -83
- package/package.json +18 -17
- package/lib/core/network/removeErrorStack.js +0 -56
package/package-lock.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kuzzle",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.0",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -669,9 +669,9 @@
|
|
|
669
669
|
}
|
|
670
670
|
},
|
|
671
671
|
"@sinonjs/fake-timers": {
|
|
672
|
-
"version": "
|
|
673
|
-
"resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-
|
|
674
|
-
"integrity": "sha512-
|
|
672
|
+
"version": "9.1.2",
|
|
673
|
+
"resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz",
|
|
674
|
+
"integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==",
|
|
675
675
|
"dev": true,
|
|
676
676
|
"requires": {
|
|
677
677
|
"@sinonjs/commons": "^1.7.0"
|
|
@@ -735,9 +735,9 @@
|
|
|
735
735
|
"dev": true
|
|
736
736
|
},
|
|
737
737
|
"@types/lodash": {
|
|
738
|
-
"version": "4.14.
|
|
739
|
-
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.
|
|
740
|
-
"integrity": "sha512
|
|
738
|
+
"version": "4.14.182",
|
|
739
|
+
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz",
|
|
740
|
+
"integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==",
|
|
741
741
|
"dev": true
|
|
742
742
|
},
|
|
743
743
|
"@types/long": {
|
|
@@ -757,14 +757,14 @@
|
|
|
757
757
|
"optional": true
|
|
758
758
|
},
|
|
759
759
|
"@typescript-eslint/eslint-plugin": {
|
|
760
|
-
"version": "5.
|
|
761
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.
|
|
762
|
-
"integrity": "sha512-
|
|
760
|
+
"version": "5.20.0",
|
|
761
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz",
|
|
762
|
+
"integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==",
|
|
763
763
|
"dev": true,
|
|
764
764
|
"requires": {
|
|
765
|
-
"@typescript-eslint/scope-manager": "5.
|
|
766
|
-
"@typescript-eslint/type-utils": "5.
|
|
767
|
-
"@typescript-eslint/utils": "5.
|
|
765
|
+
"@typescript-eslint/scope-manager": "5.20.0",
|
|
766
|
+
"@typescript-eslint/type-utils": "5.20.0",
|
|
767
|
+
"@typescript-eslint/utils": "5.20.0",
|
|
768
768
|
"debug": "^4.3.2",
|
|
769
769
|
"functional-red-black-tree": "^1.0.1",
|
|
770
770
|
"ignore": "^5.1.8",
|
|
@@ -774,52 +774,52 @@
|
|
|
774
774
|
}
|
|
775
775
|
},
|
|
776
776
|
"@typescript-eslint/parser": {
|
|
777
|
-
"version": "5.
|
|
778
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.
|
|
779
|
-
"integrity": "sha512-
|
|
777
|
+
"version": "5.20.0",
|
|
778
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz",
|
|
779
|
+
"integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==",
|
|
780
780
|
"dev": true,
|
|
781
781
|
"requires": {
|
|
782
|
-
"@typescript-eslint/scope-manager": "5.
|
|
783
|
-
"@typescript-eslint/types": "5.
|
|
784
|
-
"@typescript-eslint/typescript-estree": "5.
|
|
782
|
+
"@typescript-eslint/scope-manager": "5.20.0",
|
|
783
|
+
"@typescript-eslint/types": "5.20.0",
|
|
784
|
+
"@typescript-eslint/typescript-estree": "5.20.0",
|
|
785
785
|
"debug": "^4.3.2"
|
|
786
786
|
}
|
|
787
787
|
},
|
|
788
788
|
"@typescript-eslint/scope-manager": {
|
|
789
|
-
"version": "5.
|
|
790
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.
|
|
791
|
-
"integrity": "sha512-
|
|
789
|
+
"version": "5.20.0",
|
|
790
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz",
|
|
791
|
+
"integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==",
|
|
792
792
|
"dev": true,
|
|
793
793
|
"requires": {
|
|
794
|
-
"@typescript-eslint/types": "5.
|
|
795
|
-
"@typescript-eslint/visitor-keys": "5.
|
|
794
|
+
"@typescript-eslint/types": "5.20.0",
|
|
795
|
+
"@typescript-eslint/visitor-keys": "5.20.0"
|
|
796
796
|
}
|
|
797
797
|
},
|
|
798
798
|
"@typescript-eslint/type-utils": {
|
|
799
|
-
"version": "5.
|
|
800
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.
|
|
801
|
-
"integrity": "sha512-
|
|
799
|
+
"version": "5.20.0",
|
|
800
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz",
|
|
801
|
+
"integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==",
|
|
802
802
|
"dev": true,
|
|
803
803
|
"requires": {
|
|
804
|
-
"@typescript-eslint/utils": "5.
|
|
804
|
+
"@typescript-eslint/utils": "5.20.0",
|
|
805
805
|
"debug": "^4.3.2",
|
|
806
806
|
"tsutils": "^3.21.0"
|
|
807
807
|
}
|
|
808
808
|
},
|
|
809
809
|
"@typescript-eslint/types": {
|
|
810
|
-
"version": "5.
|
|
811
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.
|
|
812
|
-
"integrity": "sha512
|
|
810
|
+
"version": "5.20.0",
|
|
811
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz",
|
|
812
|
+
"integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==",
|
|
813
813
|
"dev": true
|
|
814
814
|
},
|
|
815
815
|
"@typescript-eslint/typescript-estree": {
|
|
816
|
-
"version": "5.
|
|
817
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.
|
|
818
|
-
"integrity": "sha512-
|
|
816
|
+
"version": "5.20.0",
|
|
817
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz",
|
|
818
|
+
"integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==",
|
|
819
819
|
"dev": true,
|
|
820
820
|
"requires": {
|
|
821
|
-
"@typescript-eslint/types": "5.
|
|
822
|
-
"@typescript-eslint/visitor-keys": "5.
|
|
821
|
+
"@typescript-eslint/types": "5.20.0",
|
|
822
|
+
"@typescript-eslint/visitor-keys": "5.20.0",
|
|
823
823
|
"debug": "^4.3.2",
|
|
824
824
|
"globby": "^11.0.4",
|
|
825
825
|
"is-glob": "^4.0.3",
|
|
@@ -839,26 +839,26 @@
|
|
|
839
839
|
}
|
|
840
840
|
},
|
|
841
841
|
"@typescript-eslint/utils": {
|
|
842
|
-
"version": "5.
|
|
843
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.
|
|
844
|
-
"integrity": "sha512-
|
|
842
|
+
"version": "5.20.0",
|
|
843
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz",
|
|
844
|
+
"integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==",
|
|
845
845
|
"dev": true,
|
|
846
846
|
"requires": {
|
|
847
847
|
"@types/json-schema": "^7.0.9",
|
|
848
|
-
"@typescript-eslint/scope-manager": "5.
|
|
849
|
-
"@typescript-eslint/types": "5.
|
|
850
|
-
"@typescript-eslint/typescript-estree": "5.
|
|
848
|
+
"@typescript-eslint/scope-manager": "5.20.0",
|
|
849
|
+
"@typescript-eslint/types": "5.20.0",
|
|
850
|
+
"@typescript-eslint/typescript-estree": "5.20.0",
|
|
851
851
|
"eslint-scope": "^5.1.1",
|
|
852
852
|
"eslint-utils": "^3.0.0"
|
|
853
853
|
}
|
|
854
854
|
},
|
|
855
855
|
"@typescript-eslint/visitor-keys": {
|
|
856
|
-
"version": "5.
|
|
857
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.
|
|
858
|
-
"integrity": "sha512-
|
|
856
|
+
"version": "5.20.0",
|
|
857
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz",
|
|
858
|
+
"integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==",
|
|
859
859
|
"dev": true,
|
|
860
860
|
"requires": {
|
|
861
|
-
"@typescript-eslint/types": "5.
|
|
861
|
+
"@typescript-eslint/types": "5.20.0",
|
|
862
862
|
"eslint-visitor-keys": "^3.0.0"
|
|
863
863
|
}
|
|
864
864
|
},
|
|
@@ -1924,9 +1924,9 @@
|
|
|
1924
1924
|
}
|
|
1925
1925
|
},
|
|
1926
1926
|
"cookie": {
|
|
1927
|
-
"version": "0.
|
|
1928
|
-
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.
|
|
1929
|
-
"integrity": "sha512-
|
|
1927
|
+
"version": "0.5.0",
|
|
1928
|
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
|
|
1929
|
+
"integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw=="
|
|
1930
1930
|
},
|
|
1931
1931
|
"cookie-signature": {
|
|
1932
1932
|
"version": "1.0.6",
|
|
@@ -2270,6 +2270,12 @@
|
|
|
2270
2270
|
"unicode-byte-truncate": "^1.0.0"
|
|
2271
2271
|
},
|
|
2272
2272
|
"dependencies": {
|
|
2273
|
+
"cookie": {
|
|
2274
|
+
"version": "0.4.2",
|
|
2275
|
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
|
|
2276
|
+
"integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==",
|
|
2277
|
+
"optional": true
|
|
2278
|
+
},
|
|
2273
2279
|
"escape-string-regexp": {
|
|
2274
2280
|
"version": "4.0.0",
|
|
2275
2281
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
|
@@ -2488,9 +2494,9 @@
|
|
|
2488
2494
|
"dev": true
|
|
2489
2495
|
},
|
|
2490
2496
|
"eslint": {
|
|
2491
|
-
"version": "8.
|
|
2492
|
-
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.
|
|
2493
|
-
"integrity": "sha512-
|
|
2497
|
+
"version": "8.13.0",
|
|
2498
|
+
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz",
|
|
2499
|
+
"integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==",
|
|
2494
2500
|
"dev": true,
|
|
2495
2501
|
"requires": {
|
|
2496
2502
|
"@eslint/eslintrc": "^1.2.1",
|
|
@@ -2776,6 +2782,11 @@
|
|
|
2776
2782
|
"vary": "~1.1.2"
|
|
2777
2783
|
},
|
|
2778
2784
|
"dependencies": {
|
|
2785
|
+
"cookie": {
|
|
2786
|
+
"version": "0.4.2",
|
|
2787
|
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
|
|
2788
|
+
"integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA=="
|
|
2789
|
+
},
|
|
2779
2790
|
"debug": {
|
|
2780
2791
|
"version": "2.6.9",
|
|
2781
2792
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
|
@@ -3673,9 +3684,9 @@
|
|
|
3673
3684
|
}
|
|
3674
3685
|
},
|
|
3675
3686
|
"ioredis": {
|
|
3676
|
-
"version": "5.0.
|
|
3677
|
-
"resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.0.
|
|
3678
|
-
"integrity": "sha512-
|
|
3687
|
+
"version": "5.0.4",
|
|
3688
|
+
"resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.0.4.tgz",
|
|
3689
|
+
"integrity": "sha512-qFJw3MnPNsJF1lcIOP3vztbsasOXK3nDdNAgjQj7t7/Bn/w10PGchTOpqylQNxjzPbLoYDu34LjeJtSWiKBntQ==",
|
|
3679
3690
|
"requires": {
|
|
3680
3691
|
"@ioredis/commands": "^1.1.1",
|
|
3681
3692
|
"cluster-key-slot": "^1.1.0",
|
|
@@ -4257,9 +4268,9 @@
|
|
|
4257
4268
|
}
|
|
4258
4269
|
},
|
|
4259
4270
|
"kuzzle-sdk": {
|
|
4260
|
-
"version": "7.
|
|
4261
|
-
"resolved": "https://registry.npmjs.org/kuzzle-sdk/-/kuzzle-sdk-7.
|
|
4262
|
-
"integrity": "sha512-
|
|
4271
|
+
"version": "7.10.0",
|
|
4272
|
+
"resolved": "https://registry.npmjs.org/kuzzle-sdk/-/kuzzle-sdk-7.10.0.tgz",
|
|
4273
|
+
"integrity": "sha512-bo21mWmCatOVpijONC0c/RYwCOLtURDxBM8wyEu8u4R8xtGLENbKE55AjNHYeyhI594dP3YfiQTOirBqeurEFQ==",
|
|
4263
4274
|
"requires": {
|
|
4264
4275
|
"min-req-promise": "^1.0.1",
|
|
4265
4276
|
"ws": "^8.4.2"
|
|
@@ -4278,6 +4289,13 @@
|
|
|
4278
4289
|
"integrity": "sha512-UxaGoIk4YNkHGWB0wnTDh8Mi5AM+ddUskreZ6VQU8VabPVOWYYc/Pmdg0KxjIj67fChzBi9ejMTYz5XTXeJyXw==",
|
|
4279
4290
|
"requires": {
|
|
4280
4291
|
"yaml": "^1.10.0"
|
|
4292
|
+
},
|
|
4293
|
+
"dependencies": {
|
|
4294
|
+
"yaml": {
|
|
4295
|
+
"version": "1.10.2",
|
|
4296
|
+
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
|
|
4297
|
+
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="
|
|
4298
|
+
}
|
|
4281
4299
|
}
|
|
4282
4300
|
},
|
|
4283
4301
|
"leven": {
|
|
@@ -4890,9 +4908,9 @@
|
|
|
4890
4908
|
"optional": true
|
|
4891
4909
|
},
|
|
4892
4910
|
"moment": {
|
|
4893
|
-
"version": "2.29.
|
|
4894
|
-
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.
|
|
4895
|
-
"integrity": "sha512-
|
|
4911
|
+
"version": "2.29.3",
|
|
4912
|
+
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz",
|
|
4913
|
+
"integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw=="
|
|
4896
4914
|
},
|
|
4897
4915
|
"monitor-event-loop-delay": {
|
|
4898
4916
|
"version": "1.0.0",
|
|
@@ -4993,9 +5011,9 @@
|
|
|
4993
5011
|
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ=="
|
|
4994
5012
|
},
|
|
4995
5013
|
"nanoid": {
|
|
4996
|
-
"version": "3.3.
|
|
4997
|
-
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.
|
|
4998
|
-
"integrity": "sha512-
|
|
5014
|
+
"version": "3.3.3",
|
|
5015
|
+
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz",
|
|
5016
|
+
"integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w=="
|
|
4999
5017
|
},
|
|
5000
5018
|
"natural-compare": {
|
|
5001
5019
|
"version": "1.4.0",
|
|
@@ -5771,7 +5789,7 @@
|
|
|
5771
5789
|
},
|
|
5772
5790
|
"passport-local": {
|
|
5773
5791
|
"version": "1.0.0",
|
|
5774
|
-
"resolved": "https://
|
|
5792
|
+
"resolved": "https://packages.app.kuzzle.io/passport-local/-/passport-local-1.0.0.tgz",
|
|
5775
5793
|
"integrity": "sha1-H+YyaMkudWBmJkN+O5BmYsFbpu4=",
|
|
5776
5794
|
"requires": {
|
|
5777
5795
|
"passport-strategy": "1.x.x"
|
|
@@ -6934,9 +6952,9 @@
|
|
|
6934
6952
|
"dev": true
|
|
6935
6953
|
},
|
|
6936
6954
|
"semver": {
|
|
6937
|
-
"version": "7.3.
|
|
6938
|
-
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.
|
|
6939
|
-
"integrity": "sha512-
|
|
6955
|
+
"version": "7.3.7",
|
|
6956
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
|
|
6957
|
+
"integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
|
|
6940
6958
|
"requires": {
|
|
6941
6959
|
"lru-cache": "^6.0.0"
|
|
6942
6960
|
}
|
|
@@ -7137,16 +7155,16 @@
|
|
|
7137
7155
|
}
|
|
7138
7156
|
},
|
|
7139
7157
|
"sinon": {
|
|
7140
|
-
"version": "
|
|
7141
|
-
"resolved": "https://registry.npmjs.org/sinon/-/sinon-
|
|
7142
|
-
"integrity": "sha512-
|
|
7158
|
+
"version": "13.0.2",
|
|
7159
|
+
"resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.2.tgz",
|
|
7160
|
+
"integrity": "sha512-KvOrztAVqzSJWMDoxM4vM+GPys1df2VBoXm+YciyB/OLMamfS3VXh3oGh5WtrAGSzrgczNWFFY22oKb7Fi5eeA==",
|
|
7143
7161
|
"dev": true,
|
|
7144
7162
|
"requires": {
|
|
7145
7163
|
"@sinonjs/commons": "^1.8.3",
|
|
7146
|
-
"@sinonjs/fake-timers": "^
|
|
7147
|
-
"@sinonjs/samsam": "^6.
|
|
7164
|
+
"@sinonjs/fake-timers": "^9.1.2",
|
|
7165
|
+
"@sinonjs/samsam": "^6.1.1",
|
|
7148
7166
|
"diff": "^5.0.0",
|
|
7149
|
-
"nise": "^5.1.
|
|
7167
|
+
"nise": "^5.1.1",
|
|
7150
7168
|
"supports-color": "^7.2.0"
|
|
7151
7169
|
},
|
|
7152
7170
|
"dependencies": {
|
|
@@ -8102,9 +8120,9 @@
|
|
|
8102
8120
|
}
|
|
8103
8121
|
},
|
|
8104
8122
|
"winston": {
|
|
8105
|
-
"version": "3.
|
|
8106
|
-
"resolved": "https://registry.npmjs.org/winston/-/winston-3.
|
|
8107
|
-
"integrity": "sha512-
|
|
8123
|
+
"version": "3.7.2",
|
|
8124
|
+
"resolved": "https://registry.npmjs.org/winston/-/winston-3.7.2.tgz",
|
|
8125
|
+
"integrity": "sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng==",
|
|
8108
8126
|
"requires": {
|
|
8109
8127
|
"@dabh/diagnostics": "^2.0.2",
|
|
8110
8128
|
"async": "^3.2.3",
|
|
@@ -8295,14 +8313,15 @@
|
|
|
8295
8313
|
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
|
8296
8314
|
},
|
|
8297
8315
|
"yaml": {
|
|
8298
|
-
"version": "
|
|
8299
|
-
"resolved": "https://registry.npmjs.org/yaml/-/yaml-
|
|
8300
|
-
"integrity": "sha512-
|
|
8316
|
+
"version": "2.0.1",
|
|
8317
|
+
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.0.1.tgz",
|
|
8318
|
+
"integrity": "sha512-1NpAYQ3wjzIlMs0mgdBmYzLkFgWBIWrzYVDYfrixhoFNNgJ444/jT2kUT2sicRbJES3oQYRZugjB6Ro8SjKeFg==",
|
|
8319
|
+
"dev": true
|
|
8301
8320
|
},
|
|
8302
8321
|
"yargs": {
|
|
8303
|
-
"version": "17.4.
|
|
8304
|
-
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.
|
|
8305
|
-
"integrity": "sha512-
|
|
8322
|
+
"version": "17.4.1",
|
|
8323
|
+
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz",
|
|
8324
|
+
"integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==",
|
|
8306
8325
|
"requires": {
|
|
8307
8326
|
"cliui": "^7.0.2",
|
|
8308
8327
|
"escalade": "^3.1.1",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kuzzle",
|
|
3
3
|
"author": "The Kuzzle Team <support@kuzzle.io>",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.18.0",
|
|
5
5
|
"description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
|
|
6
6
|
"bin": {
|
|
7
7
|
"kuzzle": "bin/start-kuzzle-server"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"services": "npx kourou app:start-services",
|
|
17
17
|
"dev": "npx ergol docker/scripts/start-kuzzle-dev.ts -c ./config/ergol.config.json",
|
|
18
18
|
"dev:test": "npm run dev -- docker/scripts/start-kuzzle-dev.ts --enable-plugins functional-test-plugin",
|
|
19
|
-
"test": "npm run --silent test:lint && npm run test:unit:coverage && npm run test:functional",
|
|
19
|
+
"test": "npm run clean && npm run --silent test:lint && npm run build && npm run test:unit:coverage && npm run test:functional",
|
|
20
20
|
"test:unit": "DEBUG= npx --node-arg=--trace-warnings mocha --exit",
|
|
21
21
|
"test:unit:coverage": "DEBUG= nyc --reporter=text-summary --reporter=lcov mocha --exit",
|
|
22
22
|
"test:functional": "npm run test:functional:http && npm run test:functional:websocket",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"test:lint:js:fix": "eslint --max-warnings=0 --fix ./lib ./test ./features-legacy ./bin ./features ./doc/build-error-codes.js",
|
|
36
36
|
"doc-error-codes": "node -r ts-node/register doc/build-error-codes",
|
|
37
37
|
"docker:install": "docker-compose run kuzzle_node_1 npm install",
|
|
38
|
-
"docker:test:unit": "docker-compose run kuzzle_node_1 npm run test:unit"
|
|
38
|
+
"docker:test:unit": "docker-compose run kuzzle_node_1 npm run test:unit",
|
|
39
|
+
"docker:npm": "docker-compose run kuzzle_node_1 npm run --"
|
|
39
40
|
},
|
|
40
41
|
"directories": {
|
|
41
42
|
"lib": "lib"
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
"aedes": "^0.46.3",
|
|
47
48
|
"bluebird": "^3.7.2",
|
|
48
49
|
"cli-color": "^2.0.2",
|
|
49
|
-
"cookie": "^0.
|
|
50
|
+
"cookie": "^0.5.0",
|
|
50
51
|
"debug": "^4.3.4",
|
|
51
52
|
"denque": "^2.0.1",
|
|
52
53
|
"didyoumean": "^1.2.2",
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
"eventemitter3": "^4.0.7",
|
|
55
56
|
"express": "^4.17.3",
|
|
56
57
|
"inquirer": "^8.2.2",
|
|
57
|
-
"ioredis": "^5.0.
|
|
58
|
+
"ioredis": "^5.0.4",
|
|
58
59
|
"js-yaml": "^4.1.0",
|
|
59
60
|
"json-stable-stringify": "^1.0.1",
|
|
60
61
|
"json2yaml": "^1.1.0",
|
|
@@ -62,29 +63,29 @@
|
|
|
62
63
|
"koncorde": "^4.0.2",
|
|
63
64
|
"kuzzle-plugin-auth-passport-local": "^6.3.6",
|
|
64
65
|
"kuzzle-plugin-logger": "^3.0.3",
|
|
65
|
-
"kuzzle-sdk": "7.
|
|
66
|
+
"kuzzle-sdk": "^7.10.0",
|
|
66
67
|
"kuzzle-vault": "^2.0.4",
|
|
67
68
|
"lodash": "4.17.21",
|
|
68
69
|
"long": "^5.2.0",
|
|
69
|
-
"moment": "^2.29.
|
|
70
|
+
"moment": "^2.29.3",
|
|
70
71
|
"ms": "^2.1.3",
|
|
71
72
|
"murmurhash-native": "^3.5.0",
|
|
72
|
-
"nanoid": "^3.3.
|
|
73
|
+
"nanoid": "^3.3.3",
|
|
73
74
|
"ndjson": "^2.0.0",
|
|
74
75
|
"node-segfault-handler": "^1.0.4",
|
|
75
76
|
"passport": "^0.5.2",
|
|
76
77
|
"protobufjs": "~6.11.2",
|
|
77
78
|
"rc": "1.2.8",
|
|
78
|
-
"semver": "^7.3.
|
|
79
|
+
"semver": "^7.3.7",
|
|
79
80
|
"sorted-array": "^2.0.4",
|
|
80
81
|
"uWebSockets.js": "https://github.com/uNetworking/uWebSockets.js/archive/refs/tags/v20.0.0.tar.gz",
|
|
81
82
|
"uuid": "^8.3.2",
|
|
82
83
|
"validator": "^13.7.0",
|
|
83
|
-
"winston": "^3.
|
|
84
|
+
"winston": "^3.7.2",
|
|
84
85
|
"winston-elasticsearch": "0.16.1",
|
|
85
86
|
"winston-syslog": "^2.5.0",
|
|
86
87
|
"winston-transport": "^4.5.0",
|
|
87
|
-
"yargs": "^17.4.
|
|
88
|
+
"yargs": "^17.4.1",
|
|
88
89
|
"zeromq": "^6.0.0-beta.6"
|
|
89
90
|
},
|
|
90
91
|
"repository": {
|
|
@@ -92,15 +93,15 @@
|
|
|
92
93
|
"url": "git://github.com/kuzzleio/kuzzle.git"
|
|
93
94
|
},
|
|
94
95
|
"devDependencies": {
|
|
95
|
-
"@types/lodash": "^4.14.
|
|
96
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
97
|
-
"@typescript-eslint/parser": "^5.
|
|
96
|
+
"@types/lodash": "^4.14.182",
|
|
97
|
+
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
|
98
|
+
"@typescript-eslint/parser": "^5.20.0",
|
|
98
99
|
"async": "^3.2.3",
|
|
99
100
|
"chokidar": "^3.5.3",
|
|
100
101
|
"codecov": "^3.8.3",
|
|
101
102
|
"cucumber": "^6.0.5",
|
|
102
103
|
"ergol": "^1.0.2",
|
|
103
|
-
"eslint": "^8.
|
|
104
|
+
"eslint": "^8.13.0",
|
|
104
105
|
"mocha": "^9.2.2",
|
|
105
106
|
"mock-require": "^3.0.3",
|
|
106
107
|
"mqtt": "^4.3.7",
|
|
@@ -110,11 +111,11 @@
|
|
|
110
111
|
"rewire": "^5.0.0",
|
|
111
112
|
"should": "13.2.3",
|
|
112
113
|
"should-sinon": "0.0.6",
|
|
113
|
-
"sinon": "^
|
|
114
|
+
"sinon": "^13.0.2",
|
|
114
115
|
"strip-json-comments": "https://github.com/sindresorhus/strip-json-comments/archive/refs/tags/v3.1.1.tar.gz",
|
|
115
116
|
"ts-node": "^10.7.0",
|
|
116
117
|
"typescript": "^4.6.3",
|
|
117
|
-
"yaml": "^
|
|
118
|
+
"yaml": "^2.0.1"
|
|
118
119
|
},
|
|
119
120
|
"engines": {
|
|
120
121
|
"node": ">= 12.13.0"
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Kuzzle, a backend software, self-hostable and ready to use
|
|
3
|
-
* to power modern apps
|
|
4
|
-
*
|
|
5
|
-
* Copyright 2015-2020 Kuzzle
|
|
6
|
-
* mailto: support AT kuzzle.io
|
|
7
|
-
* website: http://kuzzle.io
|
|
8
|
-
*
|
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
-
* you may not use this file except in compliance with the License.
|
|
11
|
-
* You may obtain a copy of the License at
|
|
12
|
-
*
|
|
13
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
-
*
|
|
15
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
-
* See the License for the specific language governing permissions and
|
|
19
|
-
* limitations under the License.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
'use strict';
|
|
23
|
-
|
|
24
|
-
const util = require('util');
|
|
25
|
-
|
|
26
|
-
const { hilightUserCode } = require('../../util/stackTrace');
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* utility method: must be invoked by all protocols to remove stack traces
|
|
30
|
-
* from payloads before sending them
|
|
31
|
-
* @param {Error|Object} data - expected: plain error object or serialized
|
|
32
|
-
* request response
|
|
33
|
-
* @returns {*} return the data minus the stack trace
|
|
34
|
-
*/
|
|
35
|
-
module.exports = data => {
|
|
36
|
-
if (util.isError(data)) {
|
|
37
|
-
if (global.NODE_ENV !== 'development') {
|
|
38
|
-
data.stack = undefined;
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
data.stack = data.stack.split('\n').map(hilightUserCode).join('\n');
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
else if (data && data.content && data.content.error) {
|
|
45
|
-
if (global.NODE_ENV !== 'development') {
|
|
46
|
-
data.content.error.stack = undefined;
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
data.content.error.stack = data.content.error.stack
|
|
50
|
-
? data.content.error.stack.split('\n').map(hilightUserCode).join('\n')
|
|
51
|
-
: undefined;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return data;
|
|
56
|
-
};
|