@angular/common 18.0.0-next.6 → 18.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/http/src/client.mjs +3 -3
- package/esm2022/http/src/fetch.mjs +3 -3
- package/esm2022/http/src/interceptor.mjs +4 -13
- package/esm2022/http/src/jsonp.mjs +6 -6
- package/esm2022/http/src/module.mjs +12 -12
- package/esm2022/http/src/private_export.mjs +2 -2
- package/esm2022/http/src/provider.mjs +8 -13
- package/esm2022/http/src/xhr.mjs +3 -3
- package/esm2022/http/src/xsrf.mjs +6 -6
- package/esm2022/http/testing/src/backend.mjs +3 -3
- package/esm2022/http/testing/src/module.mjs +4 -4
- package/esm2022/src/common_module.mjs +4 -4
- package/esm2022/src/directives/ng_class.mjs +3 -3
- package/esm2022/src/directives/ng_component_outlet.mjs +3 -3
- package/esm2022/src/directives/ng_for_of.mjs +3 -3
- package/esm2022/src/directives/ng_if.mjs +3 -3
- package/esm2022/src/directives/ng_optimized_image/lcp_image_observer.mjs +3 -3
- package/esm2022/src/directives/ng_optimized_image/ng_optimized_image.mjs +3 -3
- package/esm2022/src/directives/ng_optimized_image/preconnect_link_checker.mjs +3 -3
- package/esm2022/src/directives/ng_optimized_image/preload-link-creator.mjs +3 -3
- package/esm2022/src/directives/ng_plural.mjs +6 -6
- package/esm2022/src/directives/ng_style.mjs +3 -3
- package/esm2022/src/directives/ng_switch.mjs +9 -9
- package/esm2022/src/directives/ng_template_outlet.mjs +3 -3
- package/esm2022/src/i18n/localization.mjs +6 -6
- package/esm2022/src/location/hash_location_strategy.mjs +3 -3
- package/esm2022/src/location/location.mjs +3 -3
- package/esm2022/src/location/location_strategy.mjs +6 -6
- package/esm2022/src/location/platform_location.mjs +6 -6
- package/esm2022/src/navigation/platform_navigation.mjs +3 -3
- package/esm2022/src/pipes/async_pipe.mjs +3 -3
- package/esm2022/src/pipes/case_conversion_pipes.mjs +9 -9
- package/esm2022/src/pipes/date_pipe.mjs +3 -3
- package/esm2022/src/pipes/i18n_plural_pipe.mjs +3 -3
- package/esm2022/src/pipes/i18n_select_pipe.mjs +3 -3
- package/esm2022/src/pipes/json_pipe.mjs +3 -3
- package/esm2022/src/pipes/keyvalue_pipe.mjs +3 -3
- package/esm2022/src/pipes/number_pipe.mjs +9 -9
- package/esm2022/src/pipes/slice_pipe.mjs +3 -3
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/location_mock.mjs +3 -3
- package/esm2022/testing/src/mock_location_strategy.mjs +3 -3
- package/esm2022/testing/src/mock_platform_location.mjs +6 -6
- package/esm2022/upgrade/src/location_upgrade_module.mjs +4 -4
- package/fesm2022/common.mjs +117 -117
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/http/testing.mjs +8 -8
- package/fesm2022/http.mjs +44 -58
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/testing.mjs +16 -16
- package/fesm2022/upgrade.mjs +5 -5
- package/http/index.d.ts +1 -9
- package/http/testing/index.d.ts +1 -1
- package/index.d.ts +1 -1
- package/package.json +2 -2
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.0.0-
|
|
2
|
+
* @license Angular v18.0.0-rc.1
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -311,10 +311,10 @@ class HttpClientTestingBackend {
|
|
|
311
311
|
return `Match by function: ${matcher.name}`;
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
315
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-
|
|
314
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientTestingBackend, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
315
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientTestingBackend }); }
|
|
316
316
|
}
|
|
317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientTestingBackend, decorators: [{
|
|
318
318
|
type: Injectable
|
|
319
319
|
}] });
|
|
320
320
|
function describeRequest(testRequest) {
|
|
@@ -342,11 +342,11 @@ function provideHttpClientTesting() {
|
|
|
342
342
|
* @deprecated Add `provideHttpClientTesting()` to your providers instead.
|
|
343
343
|
*/
|
|
344
344
|
class HttpClientTestingModule {
|
|
345
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
346
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-
|
|
347
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-
|
|
345
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
346
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientTestingModule, imports: [HttpClientModule] }); }
|
|
347
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientTestingModule, providers: [provideHttpClientTesting()], imports: [HttpClientModule] }); }
|
|
348
348
|
}
|
|
349
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientTestingModule, decorators: [{
|
|
350
350
|
type: NgModule,
|
|
351
351
|
args: [{
|
|
352
352
|
imports: [HttpClientModule],
|
package/fesm2022/http.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.0.0-
|
|
2
|
+
* @license Angular v18.0.0-rc.1
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1454,10 +1454,10 @@ class HttpClient {
|
|
|
1454
1454
|
put(url, body, options = {}) {
|
|
1455
1455
|
return this.request('PUT', url, addBody(options, body));
|
|
1456
1456
|
}
|
|
1457
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
1458
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-
|
|
1457
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1458
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClient }); }
|
|
1459
1459
|
}
|
|
1460
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
1460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClient, decorators: [{
|
|
1461
1461
|
type: Injectable
|
|
1462
1462
|
}], ctorParameters: () => [{ type: HttpHandler }] });
|
|
1463
1463
|
|
|
@@ -1663,10 +1663,10 @@ class FetchBackend {
|
|
|
1663
1663
|
}
|
|
1664
1664
|
return chunksAll;
|
|
1665
1665
|
}
|
|
1666
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
1667
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-
|
|
1666
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: FetchBackend, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1667
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: FetchBackend }); }
|
|
1668
1668
|
}
|
|
1669
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
1669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: FetchBackend, decorators: [{
|
|
1670
1670
|
type: Injectable
|
|
1671
1671
|
}] });
|
|
1672
1672
|
/**
|
|
@@ -1721,10 +1721,6 @@ const HTTP_INTERCEPTOR_FNS = new InjectionToken(ngDevMode ? 'HTTP_INTERCEPTOR_FN
|
|
|
1721
1721
|
* A multi-provided token of `HttpInterceptorFn`s that are only set in root.
|
|
1722
1722
|
*/
|
|
1723
1723
|
const HTTP_ROOT_INTERCEPTOR_FNS = new InjectionToken(ngDevMode ? 'HTTP_ROOT_INTERCEPTOR_FNS' : '');
|
|
1724
|
-
/**
|
|
1725
|
-
* A provider to set a global primary http backend. If set, it will override the default one
|
|
1726
|
-
*/
|
|
1727
|
-
const PRIMARY_HTTP_BACKEND = new InjectionToken(ngDevMode ? 'PRIMARY_HTTP_BACKEND' : '');
|
|
1728
1724
|
// TODO(atscott): We need a larger discussion about stability and what should contribute to stability.
|
|
1729
1725
|
// Should the whole interceptor chain contribute to stability or just the backend request #55075?
|
|
1730
1726
|
// Should HttpClient contribute to stability automatically at all?
|
|
@@ -1768,11 +1764,6 @@ class HttpInterceptorHandler extends HttpHandler {
|
|
|
1768
1764
|
this.chain = null;
|
|
1769
1765
|
this.pendingTasks = inject(ɵPendingTasks);
|
|
1770
1766
|
this.contributeToStability = inject(REQUESTS_CONTRIBUTE_TO_STABILITY);
|
|
1771
|
-
// Check if there is a preferred HTTP backend configured and use it if that's the case.
|
|
1772
|
-
// This is needed to enable `FetchBackend` globally for all HttpClient's when `withFetch`
|
|
1773
|
-
// is used.
|
|
1774
|
-
const primaryHttpBackend = inject(PRIMARY_HTTP_BACKEND, { optional: true });
|
|
1775
|
-
this.backend = primaryHttpBackend ?? backend;
|
|
1776
1767
|
// We strongly recommend using fetch backend for HTTP calls when SSR is used
|
|
1777
1768
|
// for an application. The logic below checks if that's the case and produces
|
|
1778
1769
|
// a warning otherwise.
|
|
@@ -1811,10 +1802,10 @@ class HttpInterceptorHandler extends HttpHandler {
|
|
|
1811
1802
|
return this.chain(initialRequest, (downstreamRequest) => this.backend.handle(downstreamRequest));
|
|
1812
1803
|
}
|
|
1813
1804
|
}
|
|
1814
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
1815
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-
|
|
1805
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1806
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpInterceptorHandler }); }
|
|
1816
1807
|
}
|
|
1817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
1808
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpInterceptorHandler, decorators: [{
|
|
1818
1809
|
type: Injectable
|
|
1819
1810
|
}], ctorParameters: () => [{ type: HttpBackend }, { type: i0.EnvironmentInjector }] });
|
|
1820
1811
|
|
|
@@ -2014,10 +2005,10 @@ class JsonpClientBackend {
|
|
|
2014
2005
|
foreignDocument ??= this.document.implementation.createHTMLDocument();
|
|
2015
2006
|
foreignDocument.adoptNode(script);
|
|
2016
2007
|
}
|
|
2017
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
2018
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-
|
|
2008
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2009
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: JsonpClientBackend }); }
|
|
2019
2010
|
}
|
|
2020
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
2011
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: JsonpClientBackend, decorators: [{
|
|
2021
2012
|
type: Injectable
|
|
2022
2013
|
}], ctorParameters: () => [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{
|
|
2023
2014
|
type: Inject,
|
|
@@ -2055,10 +2046,10 @@ class JsonpInterceptor {
|
|
|
2055
2046
|
intercept(initialRequest, next) {
|
|
2056
2047
|
return runInInjectionContext(this.injector, () => jsonpInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)));
|
|
2057
2048
|
}
|
|
2058
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
2059
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-
|
|
2049
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2050
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: JsonpInterceptor }); }
|
|
2060
2051
|
}
|
|
2061
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
2052
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: JsonpInterceptor, decorators: [{
|
|
2062
2053
|
type: Injectable
|
|
2063
2054
|
}], ctorParameters: () => [{ type: i0.EnvironmentInjector }] });
|
|
2064
2055
|
|
|
@@ -2338,10 +2329,10 @@ class HttpXhrBackend {
|
|
|
2338
2329
|
});
|
|
2339
2330
|
}));
|
|
2340
2331
|
}
|
|
2341
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
2342
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-
|
|
2332
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2333
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpXhrBackend }); }
|
|
2343
2334
|
}
|
|
2344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
2335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpXhrBackend, decorators: [{
|
|
2345
2336
|
type: Injectable
|
|
2346
2337
|
}], ctorParameters: () => [{ type: i1.XhrFactory }] });
|
|
2347
2338
|
|
|
@@ -2390,10 +2381,10 @@ class HttpXsrfCookieExtractor {
|
|
|
2390
2381
|
}
|
|
2391
2382
|
return this.lastToken;
|
|
2392
2383
|
}
|
|
2393
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
2394
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-
|
|
2384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpXsrfCookieExtractor, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: XSRF_COOKIE_NAME }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2385
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpXsrfCookieExtractor }); }
|
|
2395
2386
|
}
|
|
2396
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
2387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{
|
|
2397
2388
|
type: Injectable
|
|
2398
2389
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2399
2390
|
type: Inject,
|
|
@@ -2436,10 +2427,10 @@ class HttpXsrfInterceptor {
|
|
|
2436
2427
|
intercept(initialRequest, next) {
|
|
2437
2428
|
return runInInjectionContext(this.injector, () => xsrfInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)));
|
|
2438
2429
|
}
|
|
2439
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
2440
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-
|
|
2430
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2431
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpXsrfInterceptor }); }
|
|
2441
2432
|
}
|
|
2442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
2433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{
|
|
2443
2434
|
type: Injectable
|
|
2444
2435
|
}], ctorParameters: () => [{ type: i0.EnvironmentInjector }] });
|
|
2445
2436
|
|
|
@@ -2508,7 +2499,12 @@ function provideHttpClient(...features) {
|
|
|
2508
2499
|
HttpXhrBackend,
|
|
2509
2500
|
HttpInterceptorHandler,
|
|
2510
2501
|
{ provide: HttpHandler, useExisting: HttpInterceptorHandler },
|
|
2511
|
-
{
|
|
2502
|
+
{
|
|
2503
|
+
provide: HttpBackend,
|
|
2504
|
+
useFactory: () => {
|
|
2505
|
+
return inject(FetchBackend, { optional: true }) ?? inject(HttpXhrBackend);
|
|
2506
|
+
},
|
|
2507
|
+
},
|
|
2512
2508
|
{
|
|
2513
2509
|
provide: HTTP_INTERCEPTOR_FNS,
|
|
2514
2510
|
useValue: xsrfInterceptorFn,
|
|
@@ -2650,24 +2646,14 @@ function withRequestsMadeViaParent() {
|
|
|
2650
2646
|
/**
|
|
2651
2647
|
* Configures the current `HttpClient` instance to make requests using the fetch API.
|
|
2652
2648
|
*
|
|
2653
|
-
* This `FetchBackend` requires the support of the Fetch API which is available on all evergreen
|
|
2654
|
-
* browsers and on NodeJS from v18 onward.
|
|
2655
|
-
*
|
|
2656
2649
|
* Note: The Fetch API doesn't support progress report on uploads.
|
|
2657
2650
|
*
|
|
2658
2651
|
* @publicApi
|
|
2659
2652
|
*/
|
|
2660
2653
|
function withFetch() {
|
|
2661
|
-
if ((typeof ngDevMode === 'undefined' || ngDevMode) && typeof fetch !== 'function') {
|
|
2662
|
-
// TODO: Create a runtime error
|
|
2663
|
-
// TODO: Use ENVIRONMENT_INITIALIZER to contextualize the error message (browser or server)
|
|
2664
|
-
throw new Error('The `withFetch` feature of HttpClient requires the `fetch` API to be available. ' +
|
|
2665
|
-
'If you run the code in a Node environment, make sure you use Node v18.10 or later.');
|
|
2666
|
-
}
|
|
2667
2654
|
return makeHttpFeature(HttpFeatureKind.Fetch, [
|
|
2668
2655
|
FetchBackend,
|
|
2669
2656
|
{ provide: HttpBackend, useExisting: FetchBackend },
|
|
2670
|
-
{ provide: PRIMARY_HTTP_BACKEND, useExisting: FetchBackend },
|
|
2671
2657
|
]);
|
|
2672
2658
|
}
|
|
2673
2659
|
|
|
@@ -2709,9 +2695,9 @@ class HttpClientXsrfModule {
|
|
|
2709
2695
|
providers: withXsrfConfiguration(options).ɵproviders,
|
|
2710
2696
|
};
|
|
2711
2697
|
}
|
|
2712
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
2713
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-
|
|
2714
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-
|
|
2698
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2699
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientXsrfModule }); }
|
|
2700
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientXsrfModule, providers: [
|
|
2715
2701
|
HttpXsrfInterceptor,
|
|
2716
2702
|
{ provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },
|
|
2717
2703
|
{ provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },
|
|
@@ -2722,7 +2708,7 @@ class HttpClientXsrfModule {
|
|
|
2722
2708
|
{ provide: XSRF_ENABLED, useValue: true },
|
|
2723
2709
|
] }); }
|
|
2724
2710
|
}
|
|
2725
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
2711
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientXsrfModule, decorators: [{
|
|
2726
2712
|
type: NgModule,
|
|
2727
2713
|
args: [{
|
|
2728
2714
|
providers: [
|
|
@@ -2748,11 +2734,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6",
|
|
|
2748
2734
|
* @deprecated use `provideHttpClient(withInterceptorsFromDi())` as providers instead
|
|
2749
2735
|
*/
|
|
2750
2736
|
class HttpClientModule {
|
|
2751
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
2752
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-
|
|
2753
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-
|
|
2737
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2738
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientModule }); }
|
|
2739
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientModule, providers: [provideHttpClient(withInterceptorsFromDi())] }); }
|
|
2754
2740
|
}
|
|
2755
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
2741
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientModule, decorators: [{
|
|
2756
2742
|
type: NgModule,
|
|
2757
2743
|
args: [{
|
|
2758
2744
|
/**
|
|
@@ -2772,11 +2758,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6",
|
|
|
2772
2758
|
* @deprecated `withJsonpSupport()` as providers instead
|
|
2773
2759
|
*/
|
|
2774
2760
|
class HttpClientJsonpModule {
|
|
2775
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-
|
|
2776
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-
|
|
2777
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-
|
|
2761
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2762
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientJsonpModule }); }
|
|
2763
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientJsonpModule, providers: [withJsonpSupport().ɵproviders] }); }
|
|
2778
2764
|
}
|
|
2779
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-
|
|
2765
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i0, type: HttpClientJsonpModule, decorators: [{
|
|
2780
2766
|
type: NgModule,
|
|
2781
2767
|
args: [{
|
|
2782
2768
|
providers: [withJsonpSupport().ɵproviders],
|
|
@@ -3055,5 +3041,5 @@ function verifyMappedOrigin(url) {
|
|
|
3055
3041
|
* Generated bundle index. Do not edit.
|
|
3056
3042
|
*/
|
|
3057
3043
|
|
|
3058
|
-
export { FetchBackend, HTTP_INTERCEPTORS, HTTP_TRANSFER_CACHE_ORIGIN_MAP, HttpBackend, HttpClient, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpContext, HttpContextToken, HttpErrorResponse, HttpEventType, HttpFeatureKind, HttpHandler, HttpHeaderResponse, HttpHeaders, HttpParams, HttpRequest, HttpResponse, HttpResponseBase, HttpStatusCode, HttpUrlEncodingCodec, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, provideHttpClient, withFetch, withInterceptors, withInterceptorsFromDi, withJsonpSupport, withNoXsrfProtection, withRequestsMadeViaParent, withXsrfConfiguration, HTTP_ROOT_INTERCEPTOR_FNS as ɵHTTP_ROOT_INTERCEPTOR_FNS, HttpInterceptorHandler as ɵHttpInterceptingHandler, HttpInterceptorHandler as ɵHttpInterceptorHandler,
|
|
3044
|
+
export { FetchBackend, HTTP_INTERCEPTORS, HTTP_TRANSFER_CACHE_ORIGIN_MAP, HttpBackend, HttpClient, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpContext, HttpContextToken, HttpErrorResponse, HttpEventType, HttpFeatureKind, HttpHandler, HttpHeaderResponse, HttpHeaders, HttpParams, HttpRequest, HttpResponse, HttpResponseBase, HttpStatusCode, HttpUrlEncodingCodec, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, provideHttpClient, withFetch, withInterceptors, withInterceptorsFromDi, withJsonpSupport, withNoXsrfProtection, withRequestsMadeViaParent, withXsrfConfiguration, HTTP_ROOT_INTERCEPTOR_FNS as ɵHTTP_ROOT_INTERCEPTOR_FNS, HttpInterceptorHandler as ɵHttpInterceptingHandler, HttpInterceptorHandler as ɵHttpInterceptorHandler, REQUESTS_CONTRIBUTE_TO_STABILITY as ɵREQUESTS_CONTRIBUTE_TO_STABILITY, withHttpTransferCache as ɵwithHttpTransferCache };
|
|
3059
3045
|
//# sourceMappingURL=http.mjs.map
|