angular-toolbox 0.11.3 → 0.12.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/README.md +1 -1
- package/esm2022/lib/core/bridge/app-bridge.mjs +3 -3
- package/esm2022/lib/core/error/app-bridge-error.mjs +3 -3
- package/esm2022/lib/core/error/http-mock-service-error.mjs +3 -3
- package/esm2022/lib/core/error/integrity-error.mjs +3 -3
- package/esm2022/lib/core/error/subscription-error.mjs +3 -3
- package/esm2022/lib/core/impl/lang/identifiable-component.mjs +3 -3
- package/esm2022/lib/core/impl/version/version.impl.mjs +3 -3
- package/esm2022/lib/framework/index.mjs +3 -1
- package/esm2022/lib/framework/logging/connector/console-log-connector.mjs +48 -0
- package/esm2022/lib/framework/logging/connector/default-log-connector.mjs +34 -0
- package/esm2022/lib/framework/logging/connector/html-log-connector.mjs +177 -0
- package/esm2022/lib/framework/logging/connector/index.mjs +4 -0
- package/esm2022/lib/framework/logging/impl/abstract-logger.mjs +100 -0
- package/esm2022/lib/framework/logging/impl/index.mjs +3 -0
- package/esm2022/lib/framework/logging/impl/log-impl.mjs +28 -0
- package/esm2022/lib/framework/logging/index.mjs +4 -0
- package/esm2022/lib/framework/logging/util/index.mjs +4 -0
- package/esm2022/lib/framework/logging/util/log.builder.mjs +28 -0
- package/esm2022/lib/framework/logging/util/log.constant.mjs +24 -0
- package/esm2022/lib/framework/logging/util/log.util.mjs +142 -0
- package/esm2022/lib/framework/mock/http/core/data-storage.mjs +1 -1
- package/esm2022/lib/framework/mock/http/core/response-delay.mjs +9 -0
- package/esm2022/lib/framework/mock/http/event/event-target.impl.mjs +15 -1
- package/esm2022/lib/framework/mock/http/logging/http-mock-logger.mjs +15 -0
- package/esm2022/lib/framework/mock/http/logging/http-mock-logging-metadata.builder.mjs +35 -0
- package/esm2022/lib/framework/mock/http/path-to-regexp/escape-to-regexp-string.mjs +3 -3
- package/esm2022/lib/framework/mock/http/path-to-regexp/model/lex-token.mjs +3 -3
- package/esm2022/lib/framework/mock/http/util/data-storage.builder.mjs +5 -3
- package/esm2022/lib/framework/mock/http/util/http-headers.util.mjs +18 -3
- package/esm2022/lib/framework/mock/http/util/http-mock-max-delay.mjs +12 -0
- package/esm2022/lib/framework/mock/http/util/http-mock-response-delay.util.mjs +33 -0
- package/esm2022/lib/framework/mock/http/util/http-mock-response.builder.mjs +45 -9
- package/esm2022/lib/framework/mock/http/util/index.mjs +2 -1
- package/esm2022/lib/framework/mock/http/xhr/delegate-xhr.mjs +75 -41
- package/esm2022/lib/framework/mock/http/xhr/http-mock-factory.impl.mjs +4 -3
- package/esm2022/lib/framework/mock/http/xhr/http-mock-factory.mjs +3 -2
- package/esm2022/lib/framework/mock/http/xhr/xhr-proxy-impl.mjs +7 -6
- package/esm2022/lib/framework/mock/http-monitoring-console/component/console-footer/console-footer.component.mjs +30 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/component/console-menu/console-menu.component.mjs +30 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/component/http-monitoring-console/http-monitoring-console.component.mjs +140 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/component/renderer/icon-renderer/icon-renderer.component.mjs +37 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/component/renderer/json-viewer/json-viewer.component.mjs +34 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/component/renderer/json-viewer-panel/json-viewer-panel.component.mjs +27 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/component/renderer/payload-renderer/payload-renderer.component.mjs +50 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/component/renderer/response-body-renderer/response-body-renderer.component.mjs +50 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/component/renderer/response-preview-renderer/response-preview-renderer.component.mjs +71 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/component/renderer/timing-renderer/timing-renderer.component.mjs +55 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/component/request-details/request-details.component.mjs +67 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/connector/http-monitoring-console-log-connector.mjs +52 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/index.mjs +2 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/business/atx-console-action-type.mjs +14 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/business/atx-console-action.mjs +9 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/business/atx-console-json.mjs +9 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/business/atx-is-imported-log.mjs +10 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/business/io/atx-body-dto.mjs +9 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/business/io/atx-header-dto.mjs +9 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/business/io/atx-http-log-metadata.dto.mjs +9 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/business/io/atx-http-log.dto.mjs +9 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/business/io/atx-http-request-metadata.dto.ts.mjs +9 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/business/io/atx-http-request.dto.mjs +9 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/business/io/atx-http-response.dto.mjs +9 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/business/io/hmfl.mjs +9 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/service/atx-log-io.service.mjs +77 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/service/io/body-converter.mjs +22 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/service/io/body-serializer.mjs +47 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/service/io/http-request-converter.mjs +44 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/service/io/http-response-converter.mjs +32 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/service/io/log-converter.mjs +31 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/service/io/log-headers-converter.mjs +35 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/service/io/log-message.util.mjs +19 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/service/io/log-metadata-converter.mjs +27 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/model/service/io/request-metadata-converter.mjs +29 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/util/console-body-type.mjs +18 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/util/console-type-class.mjs +17 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/util/data.util.mjs +75 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/util/size.util.mjs +35 -0
- package/esm2022/lib/framework/mock/http-monitoring-console/util/url.util.mjs +26 -0
- package/esm2022/lib/model/business/index.mjs +2 -1
- package/esm2022/lib/model/business/lang/app-bridge-command.mjs +3 -3
- package/esm2022/lib/model/business/lang/destroyable.mjs +3 -3
- package/esm2022/lib/model/business/lang/identifiable.mjs +3 -3
- package/esm2022/lib/model/business/logging/http-mock-logging-constant.enum.mjs +34 -0
- package/esm2022/lib/model/business/logging/index.mjs +6 -0
- package/esm2022/lib/model/business/logging/log-connector.mjs +9 -0
- package/esm2022/lib/model/business/logging/log-level.enum.mjs +35 -0
- package/esm2022/lib/model/business/logging/log.mjs +9 -0
- package/esm2022/lib/model/business/logging/logger.mjs +2 -0
- package/esm2022/lib/model/business/logging/transactional-logger.mjs +9 -0
- package/esm2022/lib/model/business/mock/http/fetch-client.mjs +7 -2
- package/esm2022/lib/model/business/mock/http/http-method-mock.mjs +1 -1
- package/esm2022/lib/model/business/mock/http/http-mock-request-metadata.mjs +9 -0
- package/esm2022/lib/model/business/mock/http/index.mjs +3 -1
- package/esm2022/lib/model/business/mock/http/logging/http-mock-logging-metadata.mjs +9 -0
- package/esm2022/lib/model/business/mock/http/logging/http-mock-logging-prefetch-metadata.mjs +9 -0
- package/esm2022/lib/model/business/mock/http/logging/index.mjs +3 -0
- package/esm2022/lib/model/service/index.mjs +3 -2
- package/esm2022/lib/model/service/logging/index.mjs +2 -0
- package/esm2022/lib/model/service/logging/logger-service.mjs +24 -0
- package/esm2022/lib/model/service/mock/http/index.mjs +3 -0
- package/esm2022/lib/model/service/mock/http/logging/http-mock-logging-service.mjs +110 -0
- package/esm2022/lib/model/service/mock/http/logging/index.mjs +2 -0
- package/esm2022/lib/model/service/ui/app-bridge.service.mjs +3 -3
- package/esm2022/lib/model/service/ui/dark-mode.service.mjs +3 -3
- package/esm2022/lib/model/service/version/angular-toolbox-version.service.mjs +4 -4
- package/esm2022/lib/util/default-scroll-behavior.mjs +3 -3
- package/fesm2022/angular-toolbox.mjs +3099 -988
- package/fesm2022/angular-toolbox.mjs.map +1 -1
- package/lib/core/bridge/app-bridge.d.ts +2 -2
- package/lib/core/error/app-bridge-error.d.ts +2 -2
- package/lib/core/error/http-mock-service-error.d.ts +2 -2
- package/lib/core/error/integrity-error.d.ts +2 -2
- package/lib/core/error/subscription-error.d.ts +2 -2
- package/lib/core/impl/lang/identifiable-component.d.ts +2 -2
- package/lib/core/impl/version/version.impl.d.ts +2 -2
- package/lib/framework/index.d.ts +2 -0
- package/lib/framework/logging/connector/console-log-connector.d.ts +34 -0
- package/lib/framework/logging/connector/default-log-connector.d.ts +34 -0
- package/lib/framework/logging/connector/html-log-connector.d.ts +72 -0
- package/lib/framework/logging/connector/index.d.ts +3 -0
- package/lib/framework/logging/impl/abstract-logger.d.ts +69 -0
- package/lib/framework/logging/impl/index.d.ts +2 -0
- package/lib/framework/logging/impl/log-impl.d.ts +42 -0
- package/lib/framework/logging/index.d.ts +3 -0
- package/lib/framework/logging/util/index.d.ts +3 -0
- package/lib/framework/logging/util/log.builder.d.ts +24 -0
- package/lib/framework/logging/util/log.constant.d.ts +23 -0
- package/lib/framework/logging/util/log.util.d.ts +48 -0
- package/lib/framework/mock/http/core/data-storage.d.ts +6 -1
- package/lib/framework/mock/http/core/response-delay.d.ts +23 -0
- package/lib/framework/mock/http/event/event-target.impl.d.ts +8 -0
- package/lib/framework/mock/http/logging/http-mock-logger.d.ts +14 -0
- package/lib/framework/mock/http/logging/http-mock-logging-metadata.builder.d.ts +20 -0
- package/lib/framework/mock/http/path-to-regexp/escape-to-regexp-string.d.ts +2 -2
- package/lib/framework/mock/http/path-to-regexp/model/lex-token.d.ts +2 -2
- package/lib/framework/mock/http/util/data-storage.builder.d.ts +3 -2
- package/lib/framework/mock/http/util/http-headers.util.d.ts +10 -0
- package/lib/framework/mock/http/util/http-mock-max-delay.d.ts +11 -0
- package/lib/framework/mock/http/util/http-mock-response-delay.util.d.ts +22 -0
- package/lib/framework/mock/http/util/http-mock-response.builder.d.ts +16 -0
- package/lib/framework/mock/http/util/index.d.ts +1 -0
- package/lib/framework/mock/http/xhr/delegate-xhr.d.ts +11 -4
- package/lib/framework/mock/http/xhr/http-mock-factory.impl.d.ts +3 -1
- package/lib/framework/mock/http/xhr/xhr-proxy-impl.d.ts +6 -5
- package/lib/framework/mock/http-monitoring-console/component/console-footer/console-footer.component.d.ts +8 -0
- package/lib/framework/mock/http-monitoring-console/component/console-menu/console-menu.component.d.ts +21 -0
- package/lib/framework/mock/http-monitoring-console/component/http-monitoring-console/http-monitoring-console.component.d.ts +42 -0
- package/lib/framework/mock/http-monitoring-console/component/renderer/icon-renderer/icon-renderer.component.d.ts +12 -0
- package/lib/framework/mock/http-monitoring-console/component/renderer/json-viewer/json-viewer.component.d.ts +8 -0
- package/lib/framework/mock/http-monitoring-console/component/renderer/json-viewer-panel/json-viewer-panel.component.d.ts +7 -0
- package/lib/framework/mock/http-monitoring-console/component/renderer/payload-renderer/payload-renderer.component.d.ts +20 -0
- package/lib/framework/mock/http-monitoring-console/component/renderer/response-body-renderer/response-body-renderer.component.d.ts +20 -0
- package/lib/framework/mock/http-monitoring-console/component/renderer/response-preview-renderer/response-preview-renderer.component.d.ts +27 -0
- package/lib/framework/mock/http-monitoring-console/component/renderer/timing-renderer/timing-renderer.component.d.ts +13 -0
- package/lib/framework/mock/http-monitoring-console/component/request-details/request-details.component.d.ts +27 -0
- package/lib/framework/mock/http-monitoring-console/connector/http-monitoring-console-log-connector.d.ts +40 -0
- package/lib/framework/mock/http-monitoring-console/index.d.ts +1 -0
- package/lib/framework/mock/http-monitoring-console/model/business/atx-console-action-type.d.ts +12 -0
- package/lib/framework/mock/http-monitoring-console/model/business/atx-console-action.d.ts +12 -0
- package/lib/framework/mock/http-monitoring-console/model/business/atx-console-json.d.ts +14 -0
- package/lib/framework/mock/http-monitoring-console/model/business/atx-is-imported-log.d.ts +9 -0
- package/lib/framework/mock/http-monitoring-console/model/business/io/atx-body-dto.d.ts +11 -0
- package/lib/framework/mock/http-monitoring-console/model/business/io/atx-header-dto.d.ts +11 -0
- package/lib/framework/mock/http-monitoring-console/model/business/io/atx-http-log-metadata.dto.d.ts +18 -0
- package/lib/framework/mock/http-monitoring-console/model/business/io/atx-http-log.dto.d.ts +23 -0
- package/lib/framework/mock/http-monitoring-console/model/business/io/atx-http-request-metadata.dto.ts.d.ts +32 -0
- package/lib/framework/mock/http-monitoring-console/model/business/io/atx-http-request.dto.d.ts +18 -0
- package/lib/framework/mock/http-monitoring-console/model/business/io/atx-http-response.dto.d.ts +16 -0
- package/lib/framework/mock/http-monitoring-console/model/business/io/hmfl.d.ts +12 -0
- package/lib/framework/mock/http-monitoring-console/model/service/atx-log-io.service.d.ts +11 -0
- package/lib/framework/mock/http-monitoring-console/model/service/io/body-converter.d.ts +12 -0
- package/lib/framework/mock/http-monitoring-console/model/service/io/body-serializer.d.ts +13 -0
- package/lib/framework/mock/http-monitoring-console/model/service/io/http-request-converter.d.ts +13 -0
- package/lib/framework/mock/http-monitoring-console/model/service/io/http-response-converter.d.ts +13 -0
- package/lib/framework/mock/http-monitoring-console/model/service/io/log-converter.d.ts +13 -0
- package/lib/framework/mock/http-monitoring-console/model/service/io/log-headers-converter.d.ts +13 -0
- package/lib/framework/mock/http-monitoring-console/model/service/io/log-message.util.d.ts +12 -0
- package/lib/framework/mock/http-monitoring-console/model/service/io/log-metadata-converter.d.ts +13 -0
- package/lib/framework/mock/http-monitoring-console/model/service/io/request-metadata-converter.d.ts +13 -0
- package/lib/framework/mock/http-monitoring-console/util/console-body-type.d.ts +16 -0
- package/lib/framework/mock/http-monitoring-console/util/console-type-class.d.ts +15 -0
- package/lib/framework/mock/http-monitoring-console/util/data.util.d.ts +13 -0
- package/lib/framework/mock/http-monitoring-console/util/size.util.d.ts +11 -0
- package/lib/framework/mock/http-monitoring-console/util/url.util.d.ts +13 -0
- package/lib/model/business/index.d.ts +1 -0
- package/lib/model/business/lang/app-bridge-command.d.ts +2 -2
- package/lib/model/business/lang/destroyable.d.ts +2 -2
- package/lib/model/business/lang/identifiable.d.ts +2 -2
- package/lib/model/business/logging/http-mock-logging-constant.enum.d.ts +32 -0
- package/lib/model/business/logging/index.d.ts +5 -0
- package/lib/model/business/logging/log-connector.d.ts +36 -0
- package/lib/model/business/logging/log-level.enum.d.ts +33 -0
- package/lib/model/business/logging/log.d.ts +34 -0
- package/lib/model/business/logging/logger.d.ts +58 -0
- package/lib/model/business/logging/transactional-logger.d.ts +28 -0
- package/lib/model/business/mock/http/fetch-client.d.ts +1 -1
- package/lib/model/business/mock/http/http-method-mock.d.ts +1 -6
- package/lib/model/business/mock/http/http-mock-request-metadata.d.ts +33 -0
- package/lib/model/business/mock/http/index.d.ts +2 -0
- package/lib/model/business/mock/http/logging/http-mock-logging-metadata.d.ts +15 -0
- package/lib/model/business/mock/http/logging/http-mock-logging-prefetch-metadata.d.ts +16 -0
- package/lib/model/business/mock/http/logging/index.d.ts +2 -0
- package/lib/model/service/index.d.ts +2 -1
- package/lib/model/service/logging/index.d.ts +1 -0
- package/lib/model/service/logging/logger-service.d.ts +9 -0
- package/lib/model/service/mock/http/index.d.ts +2 -0
- package/lib/model/service/mock/http/logging/http-mock-logging-service.d.ts +78 -0
- package/lib/model/service/mock/http/logging/index.d.ts +1 -0
- package/lib/model/service/ui/dark-mode.service.d.ts +2 -2
- package/lib/util/default-scroll-behavior.d.ts +2 -2
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
4
|
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
7
|
*/
|
|
8
8
|
import { AppBridgeCommand } from "../../model/business/lang/app-bridge-command";
|
|
9
9
|
/**
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
4
|
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* Represents exceptions thrown by the `AppBridge` class.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
4
|
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* Represents errors thrown by `HttpMockService` instances.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
4
|
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* Represents a data integrity violation error.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
4
|
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* Represents errors thrown by `SubscriptionService` instances.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
4
|
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
7
|
*/
|
|
8
8
|
import { Identifiable } from "../../../model";
|
|
9
9
|
import { Uuid } from "../../../util";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
4
|
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
7
|
*/
|
|
8
8
|
import { Version } from "../../../model";
|
|
9
9
|
/**
|
package/lib/framework/index.d.ts
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { Log, LogConnector } from "../../../model";
|
|
9
|
+
/**
|
|
10
|
+
* An implementation of the `LogConnector` class that sends logs to the JavaScript
|
|
11
|
+
* native `console` object.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ConsoleLogConnector implements LogConnector {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritdoc
|
|
16
|
+
*/
|
|
17
|
+
destroy(): void;
|
|
18
|
+
/**
|
|
19
|
+
* @inheritdoc
|
|
20
|
+
*/
|
|
21
|
+
init(logList: Log[]): void;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritdoc
|
|
24
|
+
*/
|
|
25
|
+
sendLog(log: Log): void;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritdoc
|
|
28
|
+
*/
|
|
29
|
+
clearLogs(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Not supported.
|
|
32
|
+
*/
|
|
33
|
+
copyLogs(): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { Log, LogConnector } from "../../../model";
|
|
9
|
+
/**
|
|
10
|
+
* The default ATX log connector. Allows to process logs silently.
|
|
11
|
+
* This can be useful for removing logs from production environments, if needed.
|
|
12
|
+
*/
|
|
13
|
+
export declare class DefaultLogConnector implements LogConnector {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritdoc
|
|
16
|
+
*/
|
|
17
|
+
destroy(): void;
|
|
18
|
+
/**
|
|
19
|
+
* @inheritdoc
|
|
20
|
+
*/
|
|
21
|
+
init(logList: Log[]): void;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritdoc
|
|
24
|
+
*/
|
|
25
|
+
sendLog(log: Log): void;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritdoc
|
|
28
|
+
*/
|
|
29
|
+
clearLogs(): void;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritdoc
|
|
32
|
+
*/
|
|
33
|
+
copyLogs(): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { Log, LogConnector } from "../../../model";
|
|
9
|
+
/**
|
|
10
|
+
* An implementation of the `LogConnector` interface that processes logs as HTML renderable elements.
|
|
11
|
+
*/
|
|
12
|
+
export declare class HtmlLogConnector implements LogConnector {
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
private _logs;
|
|
17
|
+
/**
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
private _tgt;
|
|
21
|
+
/**
|
|
22
|
+
* Creates a new `HtmlLogConnector` instance.
|
|
23
|
+
*
|
|
24
|
+
* @param target The HTML element where the logs will be rendered.
|
|
25
|
+
* @param injectStyle Indicates whether the ATX default HTML styles are injected into the current document (`true`), or not (`false`).
|
|
26
|
+
*/
|
|
27
|
+
constructor(target: HTMLElement, injectStyle?: boolean);
|
|
28
|
+
/**
|
|
29
|
+
* @inheritdoc
|
|
30
|
+
*/
|
|
31
|
+
init(logList: Log[]): void;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritdoc
|
|
34
|
+
*/
|
|
35
|
+
sendLog(log: Log): void;
|
|
36
|
+
/**
|
|
37
|
+
* @inheritdoc
|
|
38
|
+
*/
|
|
39
|
+
destroy(): void;
|
|
40
|
+
/**
|
|
41
|
+
* @inheritdoc
|
|
42
|
+
*/
|
|
43
|
+
clearLogs(): void;
|
|
44
|
+
/**
|
|
45
|
+
* @inheritdoc
|
|
46
|
+
*/
|
|
47
|
+
copyLogs(): void;
|
|
48
|
+
/**
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
private buildLog;
|
|
52
|
+
/**
|
|
53
|
+
* @private
|
|
54
|
+
*/
|
|
55
|
+
private getCssClassName;
|
|
56
|
+
/**
|
|
57
|
+
* @private
|
|
58
|
+
*/
|
|
59
|
+
private getSpan;
|
|
60
|
+
/**
|
|
61
|
+
* @private
|
|
62
|
+
*/
|
|
63
|
+
private injectStyle;
|
|
64
|
+
/**
|
|
65
|
+
* @private
|
|
66
|
+
*/
|
|
67
|
+
private deleteStyle;
|
|
68
|
+
/**
|
|
69
|
+
* @private
|
|
70
|
+
*/
|
|
71
|
+
private getHead;
|
|
72
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { Log, LogConnector, Logger, TransactionalLogger, LogLevel } from "../../../model";
|
|
9
|
+
/**
|
|
10
|
+
* A convenient immutable instance of the `DefaultLogConnector` class.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_LOG_CONNECTOR: LogConnector;
|
|
13
|
+
/**
|
|
14
|
+
* The base class for all `Logger` objects.
|
|
15
|
+
*/
|
|
16
|
+
export declare abstract class AbstractLogger implements Logger, TransactionalLogger {
|
|
17
|
+
/**
|
|
18
|
+
* @inheritdoc
|
|
19
|
+
*/
|
|
20
|
+
minLogLevel: LogLevel;
|
|
21
|
+
/**
|
|
22
|
+
* The list of logs sent to this logger.
|
|
23
|
+
*/
|
|
24
|
+
protected logs: Log[];
|
|
25
|
+
/**
|
|
26
|
+
* The reference to the log connector associated with this logger.
|
|
27
|
+
*/
|
|
28
|
+
protected logConnector: LogConnector;
|
|
29
|
+
/**
|
|
30
|
+
* @inheritdoc
|
|
31
|
+
*/
|
|
32
|
+
setLogConnector(value: LogConnector | null): void;
|
|
33
|
+
/**
|
|
34
|
+
* @inheritdoc
|
|
35
|
+
*/
|
|
36
|
+
getLogConnector(): LogConnector;
|
|
37
|
+
/**
|
|
38
|
+
* @inheritdoc
|
|
39
|
+
*/
|
|
40
|
+
getLogs(): Log[];
|
|
41
|
+
/**
|
|
42
|
+
* @inheritdoc
|
|
43
|
+
*/
|
|
44
|
+
info(caller: string | any, msg: string, metadata?: any): void;
|
|
45
|
+
/**
|
|
46
|
+
* @inheritdoc
|
|
47
|
+
*/
|
|
48
|
+
config(caller: string | any, msg: string, metadata?: any): void;
|
|
49
|
+
/**
|
|
50
|
+
* @inheritdoc
|
|
51
|
+
*/
|
|
52
|
+
error(caller: string | any, msg: string, metadata?: any): void;
|
|
53
|
+
/**
|
|
54
|
+
* @inheritdoc
|
|
55
|
+
*/
|
|
56
|
+
warn(caller: string | any, msg: string, metadata?: any): void;
|
|
57
|
+
/**
|
|
58
|
+
* @inheritdoc
|
|
59
|
+
*/
|
|
60
|
+
destroy(): void;
|
|
61
|
+
/**
|
|
62
|
+
* @inheritdoc
|
|
63
|
+
*/
|
|
64
|
+
clearLogs(): void;
|
|
65
|
+
/**
|
|
66
|
+
* @private
|
|
67
|
+
*/
|
|
68
|
+
private addLog;
|
|
69
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { Log, LogLevel } from "../../../model";
|
|
9
|
+
/**
|
|
10
|
+
* The default implementation of the `Log` interface.
|
|
11
|
+
*/
|
|
12
|
+
export declare class LogImpl implements Log {
|
|
13
|
+
/**
|
|
14
|
+
* @inheritdoc
|
|
15
|
+
*/
|
|
16
|
+
readonly caller: string;
|
|
17
|
+
/**
|
|
18
|
+
* @inheritdoc
|
|
19
|
+
*/
|
|
20
|
+
readonly message: string;
|
|
21
|
+
/**
|
|
22
|
+
* @inheritdoc
|
|
23
|
+
*/
|
|
24
|
+
readonly level: LogLevel;
|
|
25
|
+
/**
|
|
26
|
+
* @inheritdoc
|
|
27
|
+
*/
|
|
28
|
+
readonly timestamp: number;
|
|
29
|
+
/**
|
|
30
|
+
* @inheritdoc
|
|
31
|
+
*/
|
|
32
|
+
readonly metadata: any;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new `LogImpl` instance.
|
|
35
|
+
*
|
|
36
|
+
* @param caller Ahuman readable reference for the invoker associated with this log.
|
|
37
|
+
* @param message The message associated with this log.
|
|
38
|
+
* @param level The criticality level of this log.
|
|
39
|
+
* @param metadata Optional metada associated with this log.
|
|
40
|
+
*/
|
|
41
|
+
constructor(caller: string, message: string, level: LogLevel, metadata?: any);
|
|
42
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { Log, LogLevel } from "../../../model";
|
|
9
|
+
/**
|
|
10
|
+
* A static builder that creates new `Log` objects.
|
|
11
|
+
*/
|
|
12
|
+
export declare class LogBuilder {
|
|
13
|
+
/**
|
|
14
|
+
* Builds and returns a new `Log` object initialized with the specified parameters.
|
|
15
|
+
*
|
|
16
|
+
* @param caller The reference to the object that sends the new log.
|
|
17
|
+
* @param message The message of the new log.
|
|
18
|
+
* @param level The level of the new log.
|
|
19
|
+
* @param metadata The optional metadata associated with the new log.
|
|
20
|
+
*
|
|
21
|
+
* @returns A new `Log` object
|
|
22
|
+
*/
|
|
23
|
+
static build(caller: string, message: string, level?: LogLevel, metadata?: any): Log;
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A convenient string used to identify logs of LogLevel.INFO.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LOG_INFO_STRING: string;
|
|
12
|
+
/**
|
|
13
|
+
* A convenient string used to identify logs of LogLevel.CONFIG.
|
|
14
|
+
*/
|
|
15
|
+
export declare const LOG_CONFIG_STRING: string;
|
|
16
|
+
/**
|
|
17
|
+
* A convenient string used to identify logs of LogLevel.WARNING.
|
|
18
|
+
*/
|
|
19
|
+
export declare const LOG_WARNING_STRING: string;
|
|
20
|
+
/**
|
|
21
|
+
* A convenient string used to identify logs of LogLevel.ERROR.
|
|
22
|
+
*/
|
|
23
|
+
export declare const LOG_ERROR_STRING: string;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { Log, LogLevel } from "../../../model";
|
|
9
|
+
/**
|
|
10
|
+
* A convenient utility class for formatting logs.
|
|
11
|
+
*/
|
|
12
|
+
export declare class LogUtil {
|
|
13
|
+
/**
|
|
14
|
+
* Turns the specified log list into a human redeable string.
|
|
15
|
+
*
|
|
16
|
+
* @param logList The list of logs to format.
|
|
17
|
+
* @returns The formatted log list.
|
|
18
|
+
*/
|
|
19
|
+
static logListToString(logList: Log[]): string;
|
|
20
|
+
/**
|
|
21
|
+
* Turns the specified log level into a human redeable string.
|
|
22
|
+
*
|
|
23
|
+
* @param level The log level to format.
|
|
24
|
+
* @returns The formatted log level.
|
|
25
|
+
*/
|
|
26
|
+
static getLevelString(level: LogLevel): string;
|
|
27
|
+
/**
|
|
28
|
+
* Return a string that represents the specified metadata object.
|
|
29
|
+
*
|
|
30
|
+
* @param obj The metadata object to format.
|
|
31
|
+
* @returns A string that represents the specified metadata object.
|
|
32
|
+
*/
|
|
33
|
+
static metadataToString(obj: any): string;
|
|
34
|
+
/**
|
|
35
|
+
* Returns a string that represents the specified timestamp in form `"HH:MM:SS"`.
|
|
36
|
+
*
|
|
37
|
+
* @param timestamp The timestamp to format.
|
|
38
|
+
* @returns A string that represents the specified timestamp in form `"HH:MM:SS"`.
|
|
39
|
+
*/
|
|
40
|
+
static dateToHHMMSS(timestamp: number): string;
|
|
41
|
+
/**
|
|
42
|
+
* Returns a string that represents the specified array.
|
|
43
|
+
*
|
|
44
|
+
* @param array The array to format.
|
|
45
|
+
* @returns A tring that represents the specified array.
|
|
46
|
+
*/
|
|
47
|
+
private static formatArray;
|
|
48
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
6
|
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
7
|
*/
|
|
8
|
-
import { HttpResponseMock } from "../../../../model";
|
|
8
|
+
import { HttpResponseMock, HttpMockRequestMetadata } from "../../../../model";
|
|
9
9
|
/**
|
|
10
10
|
* @private
|
|
11
11
|
* Utility interface used by the `DelegateXhr` class to store HTTP request information.
|
|
@@ -35,4 +35,9 @@ export interface DataStorage {
|
|
|
35
35
|
* The JSON string prepresentation of the loaded data.
|
|
36
36
|
*/
|
|
37
37
|
stringifiedData: string;
|
|
38
|
+
/**
|
|
39
|
+
* @private
|
|
40
|
+
* The metadata associated to the HTTP request.
|
|
41
|
+
*/
|
|
42
|
+
requestMetadata: HttpMockRequestMetadata;
|
|
38
43
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @private
|
|
10
|
+
* Utility interface used by the `DelegateXhr` class to manage the delay of an HTTP response.
|
|
11
|
+
*/
|
|
12
|
+
export interface ResponseDelay {
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
* The amount of time the HTTP resquest is stalled before sending the response, in milliseconds.
|
|
16
|
+
*/
|
|
17
|
+
stalled: number;
|
|
18
|
+
/**
|
|
19
|
+
* @private
|
|
20
|
+
* The complete duration of an HTTP request, in milliseconds.
|
|
21
|
+
*/
|
|
22
|
+
duration: number;
|
|
23
|
+
}
|
|
@@ -63,6 +63,14 @@ export declare class EventTargetImpl implements EventTarget {
|
|
|
63
63
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/dispatchEvent
|
|
64
64
|
*/
|
|
65
65
|
dispatchEvent(event: Event): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Checks whether the `EventTarget` object has any listeners registered for a specific type of event.
|
|
68
|
+
*
|
|
69
|
+
* @param type The type of event.
|
|
70
|
+
*
|
|
71
|
+
* @return A value of `true` if a listener of the specified type is registered; `false` otherwise.
|
|
72
|
+
*/
|
|
73
|
+
hasEventListener(type: string): boolean;
|
|
66
74
|
/**
|
|
67
75
|
* @private
|
|
68
76
|
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { AbstractLogger } from "../../../logging";
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
* The `Logger` implementation used by the `HttpMockLoggingService` class to manage logs.
|
|
12
|
+
*/
|
|
13
|
+
export declare class HttpMockLogger extends AbstractLogger {
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { HttpRequest } from "@angular/common/http";
|
|
9
|
+
import { XhrProxy, HttpMockLoggingMetadata, HttpMockRequestMetadata } from "../../../../model";
|
|
10
|
+
/**
|
|
11
|
+
* @private
|
|
12
|
+
* A static builder for creating `HttpMockLoggingMetadata` objects.
|
|
13
|
+
*/
|
|
14
|
+
export declare class HttpMockLoggingMetadataBuilder {
|
|
15
|
+
/**
|
|
16
|
+
* @private
|
|
17
|
+
* Creates and returns a new `HttpMockLoggingMetadata` object.
|
|
18
|
+
*/
|
|
19
|
+
static build(xhr: XhrProxy, request: HttpRequest<any>, requestMetadata: HttpMockRequestMetadata): HttpMockLoggingMetadata;
|
|
20
|
+
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
4
|
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
7
|
*
|
|
8
8
|
* This source code is derived from the following original source code:
|
|
9
9
|
* - https://github.com/pillarjs/path-to-regexp
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
4
|
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
7
|
*
|
|
8
8
|
* This source code is derived from the following original source code:
|
|
9
9
|
* - https://github.com/pillarjs/path-to-regexp
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
6
|
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
7
|
*/
|
|
8
|
-
import { HttpResponseMock } from "../../../../model";
|
|
8
|
+
import { HttpMockRequestMetadata, HttpResponseMock } from "../../../../model";
|
|
9
9
|
import { DataStorage } from "../core/data-storage";
|
|
10
10
|
/**
|
|
11
11
|
* @private
|
|
@@ -18,8 +18,9 @@ export declare class DataStorageBuilder {
|
|
|
18
18
|
*
|
|
19
19
|
* @param httpResponse The `HttpResponseMock` to be stored by the framework.
|
|
20
20
|
* @param data The data of the HTTP response to be stored by the framework.
|
|
21
|
+
* @param metadata The metadata of the HTTP mock request to be stored by the framework.
|
|
21
22
|
*
|
|
22
23
|
* @returns A new `DataStorage` object.
|
|
23
24
|
*/
|
|
24
|
-
static buildDataStorage(httpResponse: HttpResponseMock, data: any): DataStorage;
|
|
25
|
+
static buildDataStorage(httpResponse: HttpResponseMock, data: any, metadata: HttpMockRequestMetadata): DataStorage;
|
|
25
26
|
}
|
|
@@ -21,6 +21,16 @@ export declare class HttpHeadersUtil {
|
|
|
21
21
|
* @returns A string compatible with the format expected by the `XMLHttpRequest.getAllResponseHeaders()` method.
|
|
22
22
|
*/
|
|
23
23
|
static stringify(headers: HttpHeaders | undefined): string;
|
|
24
|
+
/**
|
|
25
|
+
* @private
|
|
26
|
+
* Returns a `HttpHeaders` object built from the string returns by the `XMLHttpRequest.getAllResponseHeaders()` method,
|
|
27
|
+
* or `null` wheher `XMLHttpRequest.getAllResponseHeaders()` return `null`.
|
|
28
|
+
*
|
|
29
|
+
* @param value The string to turn into a `HttpHeaders `object.
|
|
30
|
+
*
|
|
31
|
+
* @returns A `HttpHeaders` object, or `null`.
|
|
32
|
+
*/
|
|
33
|
+
static encode(value: string | null): HttpHeaders | null;
|
|
24
34
|
/**
|
|
25
35
|
* @private
|
|
26
36
|
* Creates the default `HttpHeaders` object for a mocked HTTP request.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A convenient constant that represents the maximum value for a delayed HTTP response.
|
|
10
|
+
*/
|
|
11
|
+
export declare const HTTP_MOCK_MAX_DELAY: number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7
|
+
*/
|
|
8
|
+
import { ResponseDelay } from "../core/response-delay";
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
* A utility for managing HTTP responses delay.
|
|
12
|
+
*/
|
|
13
|
+
export declare class HttpMockResponseDelayUtil {
|
|
14
|
+
/**
|
|
15
|
+
* @private
|
|
16
|
+
* A utility function that return a `ResponseDelay` object, depending on the timer parameters.
|
|
17
|
+
*
|
|
18
|
+
* @param timer The seed value used to create the `ResponseDelay` object.
|
|
19
|
+
* @returns A `ResponseDelay` object.
|
|
20
|
+
*/
|
|
21
|
+
static getResponseDelay(timer: number): ResponseDelay;
|
|
22
|
+
}
|