@maplibre/maplibre-react-native 11.0.0-beta.19 → 11.0.0-beta.20
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/android/src/main/java/org/maplibre/reactnative/MLRNPackage.kt +13 -0
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNLogModule.kt +2 -0
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNNetworkModule.kt +0 -42
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNTransformRequestModule.kt +144 -0
- package/android/src/main/java/org/maplibre/reactnative/modules/TransformRequestInterceptor.kt +184 -0
- package/ios/modules/logging/MLRNLogging.h +4 -0
- package/ios/modules/logging/MLRNLogging.m +8 -0
- package/ios/modules/network/MLRNNetworkModule.mm +0 -10
- package/ios/modules/transform-request/MLRNTransformRequest.h +38 -0
- package/ios/modules/transform-request/MLRNTransformRequest.m +413 -0
- package/ios/modules/transform-request/MLRNTransformRequestModule.h +9 -0
- package/ios/modules/transform-request/MLRNTransformRequestModule.mm +72 -0
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/network/NativeNetworkModule.js.map +1 -1
- package/lib/commonjs/modules/network/NetworkManager.js +1 -39
- package/lib/commonjs/modules/network/NetworkManager.js.map +1 -1
- package/lib/commonjs/modules/transform-request/NativeTransformRequestModule.js +9 -0
- package/lib/commonjs/modules/transform-request/NativeTransformRequestModule.js.map +1 -0
- package/lib/commonjs/modules/transform-request/TransformRequestManager.js +223 -0
- package/lib/commonjs/modules/transform-request/TransformRequestManager.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/network/NativeNetworkModule.js.map +1 -1
- package/lib/module/modules/network/NetworkManager.js +1 -39
- package/lib/module/modules/network/NetworkManager.js.map +1 -1
- package/lib/module/modules/transform-request/NativeTransformRequestModule.js +5 -0
- package/lib/module/modules/transform-request/NativeTransformRequestModule.js.map +1 -0
- package/lib/module/modules/transform-request/TransformRequestManager.js +220 -0
- package/lib/module/modules/transform-request/TransformRequestManager.js.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +1 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/modules/network/NativeNetworkModule.d.ts +0 -2
- package/lib/typescript/commonjs/modules/network/NativeNetworkModule.d.ts.map +1 -1
- package/lib/typescript/commonjs/modules/network/NetworkManager.d.ts +1 -33
- package/lib/typescript/commonjs/modules/network/NetworkManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/modules/transform-request/NativeTransformRequestModule.d.ts +15 -0
- package/lib/typescript/commonjs/modules/transform-request/NativeTransformRequestModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts +201 -0
- package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/modules/network/NativeNetworkModule.d.ts +0 -2
- package/lib/typescript/module/modules/network/NativeNetworkModule.d.ts.map +1 -1
- package/lib/typescript/module/modules/network/NetworkManager.d.ts +1 -33
- package/lib/typescript/module/modules/network/NetworkManager.d.ts.map +1 -1
- package/lib/typescript/module/modules/transform-request/NativeTransformRequestModule.d.ts +15 -0
- package/lib/typescript/module/modules/transform-request/NativeTransformRequestModule.d.ts.map +1 -0
- package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts +201 -0
- package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts.map +1 -0
- package/package.json +1 -12
- package/src/index.ts +8 -0
- package/src/modules/network/NativeNetworkModule.ts +0 -4
- package/src/modules/network/NetworkManager.ts +1 -47
- package/src/modules/transform-request/NativeTransformRequestModule.ts +41 -0
- package/src/modules/transform-request/TransformRequestManager.ts +292 -0
- package/android/src/main/java/org/maplibre/reactnative/http/RequestHeadersInterceptor.kt +0 -65
- package/ios/modules/network/MLRNNetworkHTTPHeaders.h +0 -14
- package/ios/modules/network/MLRNNetworkHTTPHeaders.m +0 -97
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TransformRequestManager = void 0;
|
|
7
|
+
var _NativeTransformRequestModule = _interopRequireDefault(require("./NativeTransformRequestModule.js"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
/**
|
|
10
|
+
* A serializable transform for rewriting MapLibre request URLs.
|
|
11
|
+
*
|
|
12
|
+
* Transforms are applied as a pipeline in the order they were added: transform N+1 sees
|
|
13
|
+
* the URL *after* transform N has possibly changed it.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A URL query parameter to append to matching map resource requests.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A HTTP header to send with matching map resource requests.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* TransformRequestManager provides methods for managing HTTP requests made by MapLibre.
|
|
26
|
+
*
|
|
27
|
+
* Transformations are possible in three ways:
|
|
28
|
+
*
|
|
29
|
+
* 1. Transforming the URL with search and replace
|
|
30
|
+
* 2. Adding URL search params
|
|
31
|
+
* 3. Adding HTTP headers
|
|
32
|
+
*
|
|
33
|
+
* Transforms are applied in this order. The `match` conditions are applied to
|
|
34
|
+
* possibly already transformed URLs.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* To gain insight into which transforms are applied set the log level to
|
|
38
|
+
* `"debug"` via {@link LogManager}:
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* LogManager.setLogLevel("debug");
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
class TransformRequestManager {
|
|
45
|
+
/**
|
|
46
|
+
* Adds or updates a URL transform identified by `id`.
|
|
47
|
+
*
|
|
48
|
+
* Transforms execute in insertion order. Therefore `match` and `find` regexes
|
|
49
|
+
* are matched against possibly already modified URL by previous transforms.
|
|
50
|
+
*
|
|
51
|
+
* Re-adding an existing `id` updates the transform
|
|
52
|
+
* **in-place**, preserving its position in the pipeline. This makes it safe to
|
|
53
|
+
* refresh tokens or swap domains without disrupting the order of other transforms.
|
|
54
|
+
*
|
|
55
|
+
* URL transforms are applied before `addUrlSearchParam` and `addHeader`.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* // Upgrade all requests to HTTPS
|
|
59
|
+
* TransformRequestManager.addUrlTransform({
|
|
60
|
+
* id: "force-https",
|
|
61
|
+
* find: "^http://",
|
|
62
|
+
* replace: "https://",
|
|
63
|
+
* });
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* // Redirect a specific domain through a proxy
|
|
67
|
+
* TransformRequestManager.addUrlTransform({
|
|
68
|
+
* id: "proxy",
|
|
69
|
+
* match: "tiles\\.example\\.com",
|
|
70
|
+
* find: "tiles\\.example\\.com",
|
|
71
|
+
* replace: "proxy.example.com",
|
|
72
|
+
* });
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* // Inject an API key into the path using a capture group
|
|
76
|
+
* TransformRequestManager.addUrlTransform({
|
|
77
|
+
* id: "api-key",
|
|
78
|
+
* match: "api\\.example\\.com",
|
|
79
|
+
* find: "(https://api\\.example\\.com/)(.*)",
|
|
80
|
+
* replace: "$1mySecretKey/$2",
|
|
81
|
+
* });
|
|
82
|
+
*
|
|
83
|
+
* @param options The transform. Set {@link TransformOptions.id} to a stable string to
|
|
84
|
+
* enable in-place updates; if omitted an id is auto-generated and returned.
|
|
85
|
+
*
|
|
86
|
+
* @returns The id of the transform (the value of `transform.id` when provided, otherwise
|
|
87
|
+
* the auto-generated one). Pass it to {@link removeUrlTransform} to remove it later.
|
|
88
|
+
*/
|
|
89
|
+
addUrlTransform(options) {
|
|
90
|
+
const id = options.id ?? this.getId();
|
|
91
|
+
_NativeTransformRequestModule.default.addUrlTransform(id, TransformRequestManager.toRegexString(options.match), TransformRequestManager.toRegexString(options.find) ?? "", options.replace);
|
|
92
|
+
return id;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Removes the URL transform with the given `id`.
|
|
97
|
+
* No-op if the id is not registered.
|
|
98
|
+
*
|
|
99
|
+
* @param id The identifier passed to/returned from {@link addUrlTransform}.
|
|
100
|
+
*/
|
|
101
|
+
removeUrlTransform(id) {
|
|
102
|
+
_NativeTransformRequestModule.default.removeUrlTransform(id);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Removes all registered URL transforms
|
|
107
|
+
*/
|
|
108
|
+
clearUrlTransforms() {
|
|
109
|
+
_NativeTransformRequestModule.default.clearUrlTransforms();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Adds or updates a URL query parameter identified by `id` that will be appended to all
|
|
114
|
+
* matching map resource requests. Re-adding an existing `id` updates the param in-place.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* // Add apiKey to for a specific domain
|
|
118
|
+
* TransformRequestManager.addUrlSearchParam({
|
|
119
|
+
* match: /tiles\.example\.com/,
|
|
120
|
+
* name: "apiKey",
|
|
121
|
+
* value: "your-api-key",
|
|
122
|
+
* });
|
|
123
|
+
*
|
|
124
|
+
* // Add apiKey to all requests (no match = applies to all)
|
|
125
|
+
* TransformRequestManager.addUrlSearchParam({ name: "apiKey", value: "your-api-key" });
|
|
126
|
+
*
|
|
127
|
+
* @param options The options. Set {@link TransformOptions.id} to a stable string to
|
|
128
|
+
* enable in-place updates; if omitted an id is auto-generated and returned.
|
|
129
|
+
*
|
|
130
|
+
* @returns The id of the options. Pass it to {@link removeUrlSearchParam} to remove it later.
|
|
131
|
+
*/
|
|
132
|
+
addUrlSearchParam(options) {
|
|
133
|
+
const id = options.id ?? this.getId();
|
|
134
|
+
_NativeTransformRequestModule.default.addUrlSearchParam(id, TransformRequestManager.toRegexString(options.match), options.name, options.value);
|
|
135
|
+
return id;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Removes a previously added URL query parameter by its `id`.
|
|
140
|
+
*
|
|
141
|
+
* @param id The identifier passed to/returned from {@link addUrlSearchParam}.
|
|
142
|
+
*/
|
|
143
|
+
removeUrlSearchParam(id) {
|
|
144
|
+
_NativeTransformRequestModule.default.removeUrlSearchParam(id);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Adds or updates an HTTP header identified by `id` that will be sent with all
|
|
149
|
+
* matching map resource requests. Re-adding an existing `id` updates the header in-place.
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* // Add header to all requests
|
|
153
|
+
* TransformRequestManager.addHeader({ name: "Authorization", value: "Bearer token123" });
|
|
154
|
+
*
|
|
155
|
+
* // Add header only to requests matching a pattern
|
|
156
|
+
* TransformRequestManager.addHeader({
|
|
157
|
+
* name: "X-API-Key",
|
|
158
|
+
* value: "key123",
|
|
159
|
+
* match: /https:\/\/api\.example\.com\/tiles\//,
|
|
160
|
+
* });
|
|
161
|
+
*
|
|
162
|
+
* @param options The options. Set {@link TransformOptions.id} to a stable string to
|
|
163
|
+
* enable in-place updates; if omitted an id is auto-generated and returned.
|
|
164
|
+
*
|
|
165
|
+
* @returns The id of the options. Pass it to {@link removeHeader} to remove it later.
|
|
166
|
+
*/
|
|
167
|
+
addHeader(options) {
|
|
168
|
+
const id = options.id ?? this.getId();
|
|
169
|
+
_NativeTransformRequestModule.default.addHeader(id, TransformRequestManager.toRegexString(options.match), options.name, options.value);
|
|
170
|
+
return id;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Removes all registered URL search params.
|
|
175
|
+
*/
|
|
176
|
+
clearUrlSearchParams() {
|
|
177
|
+
_NativeTransformRequestModule.default.clearUrlSearchParams();
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Removes a previously added HTTP header by its `id`.
|
|
182
|
+
*
|
|
183
|
+
* @param id The identifier passed to/returned from {@link addHeader}.
|
|
184
|
+
*/
|
|
185
|
+
removeHeader(id) {
|
|
186
|
+
_NativeTransformRequestModule.default.removeHeader(id);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Removes all registered HTTP headers.
|
|
191
|
+
*/
|
|
192
|
+
clearHeaders() {
|
|
193
|
+
_NativeTransformRequestModule.default.clearHeaders();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Removes all registered URL transforms, URL search params and HTTP headers.
|
|
198
|
+
*/
|
|
199
|
+
clear() {
|
|
200
|
+
this.clearUrlTransforms();
|
|
201
|
+
this.clearUrlSearchParams();
|
|
202
|
+
this.clearHeaders();
|
|
203
|
+
}
|
|
204
|
+
lastId = -1;
|
|
205
|
+
getId() {
|
|
206
|
+
this.lastId++;
|
|
207
|
+
return "transform-request-" + this.lastId;
|
|
208
|
+
}
|
|
209
|
+
static toRegexString(value) {
|
|
210
|
+
let result = undefined;
|
|
211
|
+
if (value instanceof RegExp) {
|
|
212
|
+
if (value.flags) {
|
|
213
|
+
throw new Error("Regex flags are not supported");
|
|
214
|
+
}
|
|
215
|
+
result = value.source;
|
|
216
|
+
} else {
|
|
217
|
+
result = value;
|
|
218
|
+
}
|
|
219
|
+
return result || null;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
const transformRequestManager = exports.TransformRequestManager = new TransformRequestManager();
|
|
223
|
+
//# sourceMappingURL=TransformRequestManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_NativeTransformRequestModule","_interopRequireDefault","require","e","__esModule","default","TransformRequestManager","addUrlTransform","options","id","getId","NativeTransformRequestModule","toRegexString","match","find","replace","removeUrlTransform","clearUrlTransforms","addUrlSearchParam","name","value","removeUrlSearchParam","addHeader","clearUrlSearchParams","removeHeader","clearHeaders","clear","lastId","result","undefined","RegExp","flags","Error","source","transformRequestManager","exports"],"sourceRoot":"../../../../src","sources":["modules/transform-request/TransformRequestManager.ts"],"mappings":";;;;;;AAAA,IAAAA,6BAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0E,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAkB1E;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;;AASA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,uBAAuB,CAAC;EAC5B;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,eAAeA,CAACC,OAA4B,EAAU;IACpD,MAAMC,EAAE,GAAGD,OAAO,CAACC,EAAE,IAAI,IAAI,CAACC,KAAK,CAAC,CAAC;IAErCC,qCAA4B,CAACJ,eAAe,CAC1CE,EAAE,EACFH,uBAAuB,CAACM,aAAa,CAACJ,OAAO,CAACK,KAAK,CAAC,EACpDP,uBAAuB,CAACM,aAAa,CAACJ,OAAO,CAACM,IAAI,CAAC,IAAI,EAAE,EACzDN,OAAO,CAACO,OACV,CAAC;IAED,OAAON,EAAE;EACX;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEO,kBAAkBA,CAACP,EAAU,EAAQ;IACnCE,qCAA4B,CAACK,kBAAkB,CAACP,EAAE,CAAC;EACrD;;EAEA;AACF;AACA;EACEQ,kBAAkBA,C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AY,CAAC,CAAC;EAC7C;;EAEA;AACF;AACA;EACEC,KAAKA,CAAA,EAAS;IACZ,IAAI,CAACT,kBAAkB,CAAC,CAAC;IACzB,IAAI,CAACM,oBAAoB,CAAC,CAAC;IAC3B,IAAI,CAACE,YAAY,CAAC,CAAC;EACrB;EAEQE,MAAM,GAAW,CAAC,CAAC;EAEnBjB,KAAKA,CAAA,EAAG;IACd,IAAI,CAACiB,MAAM,EAAE;IAEb,OAAO,oBAAoB,GAAG,IAAI,CAACA,MAAM;EAC3C;EAEA,OAAef,aAAaA,CAC1BQ,KAAkC,EACnB;IACf,IAAIQ,MAA0B,GAAGC,SAAS;IAC1C,IAAIT,KAAK,YAAYU,MAAM,EAAE;MAC3B,IAAIV,KAAK,CAACW,KAAK,EAAE;QACf,MAAM,IAAIC,KAAK,CAAC,+BAA+B,CAAC;MAClD;MAEAJ,MAAM,GAAGR,KAAK,CAACa,MAAM;IACvB,CAAC,MAAM;MACLL,MAAM,GAAGR,KAAK;IAChB;IAEA,OAAOQ,MAAM,IAAI,IAAI;EACvB;AACF;AAEA,MAAMM,uBAAuB,GAAAC,OAAA,CAAA7B,uBAAA,GAAG,IAAIA,uBAAuB,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -21,5 +21,6 @@ export { NetworkManager } from "./modules/network/NetworkManager.js";
|
|
|
21
21
|
export { OfflineManager } from "./modules/offline/OfflineManager.js";
|
|
22
22
|
export { OfflinePack } from "./modules/offline/OfflinePack.js";
|
|
23
23
|
export { StaticMapImageManager } from "./modules/static-map/StaticMapManager.js";
|
|
24
|
+
export { TransformRequestManager } from "./modules/transform-request/TransformRequestManager.js";
|
|
24
25
|
export { Animated } from "./utils/animated/Animated.js";
|
|
25
26
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Camera","Map","ViewAnnotation","LayerAnnotation","Callout","UserLocation","NativeUserLocation","useCurrentPosition","ImageSource","GeoJSONSource","RasterSource","VectorSource","Layer","Images","Marker","LocationManager","LogManager","NetworkManager","OfflineManager","OfflinePack","StaticMapImageManager","Animated"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAcEA,MAAM,QACD,+BAA4B;AAEnC,SAKEC,GAAG,QACE,yBAAsB;AAE7B,SAKEC,cAAc,QACT,4DAAyD;AAEhE,SAEEC,eAAe,QACV,6CAA0C;AAEjD,SAEEC,OAAO,QACF,6CAA0C;AAEjD,SAASC,YAAY,QAAQ,4CAAyC;AACtE,SAASC,kBAAkB,QAAQ,kDAA+C;AAClF,SAASC,kBAAkB,QAAQ,+BAA4B;AAE/D,SAEEC,WAAW,QACN,kDAA+C;AAEtD,SAGEC,aAAa,QACR,sDAAmD;AAE1D,SAEEC,YAAY,QACP,oDAAiD;AAExD,SAGEC,YAAY,QACP,oDAAiD;AAExD,SACEC,KAAK,QAWA,6BAA0B;AAmCjC,SAIEC,MAAM,QACD,+BAA4B;AAEnC,SAIEC,MAAM,QACD,2CAAwC;AAE/C,SACEC,eAAe,QAEV,uCAAoC;AAE3C,SAASC,UAAU,QAAuB,6BAA0B;AAEpE,SAASC,cAAc,QAAQ,qCAAkC;AAEjE,SACEC,cAAc,QAMT,qCAAkC;AACzC,SACEC,WAAW,QAEN,kCAA+B;AAEtC,SACEC,qBAAqB,QAKhB,0CAAuC;
|
|
1
|
+
{"version":3,"names":["Camera","Map","ViewAnnotation","LayerAnnotation","Callout","UserLocation","NativeUserLocation","useCurrentPosition","ImageSource","GeoJSONSource","RasterSource","VectorSource","Layer","Images","Marker","LocationManager","LogManager","NetworkManager","OfflineManager","OfflinePack","StaticMapImageManager","TransformRequestManager","Animated"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAcEA,MAAM,QACD,+BAA4B;AAEnC,SAKEC,GAAG,QACE,yBAAsB;AAE7B,SAKEC,cAAc,QACT,4DAAyD;AAEhE,SAEEC,eAAe,QACV,6CAA0C;AAEjD,SAEEC,OAAO,QACF,6CAA0C;AAEjD,SAASC,YAAY,QAAQ,4CAAyC;AACtE,SAASC,kBAAkB,QAAQ,kDAA+C;AAClF,SAASC,kBAAkB,QAAQ,+BAA4B;AAE/D,SAEEC,WAAW,QACN,kDAA+C;AAEtD,SAGEC,aAAa,QACR,sDAAmD;AAE1D,SAEEC,YAAY,QACP,oDAAiD;AAExD,SAGEC,YAAY,QACP,oDAAiD;AAExD,SACEC,KAAK,QAWA,6BAA0B;AAmCjC,SAIEC,MAAM,QACD,+BAA4B;AAEnC,SAIEC,MAAM,QACD,2CAAwC;AAE/C,SACEC,eAAe,QAEV,uCAAoC;AAE3C,SAASC,UAAU,QAAuB,6BAA0B;AAEpE,SAASC,cAAc,QAAQ,qCAAkC;AAEjE,SACEC,cAAc,QAMT,qCAAkC;AACzC,SACEC,WAAW,QAEN,kCAA+B;AAEtC,SACEC,qBAAqB,QAKhB,0CAAuC;AAE9C,SACEC,uBAAuB,QAKlB,wDAAqD;AAwB5D,SAASC,QAAQ,QAAQ,8BAA2B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../../src","sources":["modules/network/NativeNetworkModule.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../../src","sources":["modules/network/NativeNetworkModule.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAMlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,mBAAmB,CAAC","ignoreList":[]}
|
|
@@ -3,47 +3,9 @@
|
|
|
3
3
|
import NativeNetworkModule from "./NativeNetworkModule.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* NetworkManager provides methods for managing
|
|
7
|
-
* This includes adding custom headers to tile requests and controlling network connectivity.
|
|
6
|
+
* NetworkManager provides methods for managing and controlling network connectivity.
|
|
8
7
|
*/
|
|
9
8
|
class NetworkManager {
|
|
10
|
-
/**
|
|
11
|
-
* Adds a custom HTTP header that will be sent with all map tile requests.
|
|
12
|
-
* This is useful for adding authentication tokens or other custom headers
|
|
13
|
-
* required by your tile server.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* // Add header to all requests
|
|
17
|
-
* NetworkManager.addRequestHeader("Authorization", "Bearer token123");
|
|
18
|
-
*
|
|
19
|
-
* // Add header only to requests matching a regex pattern (string)
|
|
20
|
-
* NetworkManager.addRequestHeader("X-API-Key", "key123", "https:\\/\\/api\\.example\\.com\\/tiles\\/");
|
|
21
|
-
*
|
|
22
|
-
* // Add header only to requests matching a regex pattern (RegExp)
|
|
23
|
-
* NetworkManager.addRequestHeader("X-API-Key", "key123", /https:\/\/api\.example\.com\/tiles\//);
|
|
24
|
-
*
|
|
25
|
-
* @param name The name of the header (e.g., "Authorization")
|
|
26
|
-
* @param value The value of the header (e.g., "Bearer token123")
|
|
27
|
-
* @param match Optional regex pattern to match against network URLs. If provided, the header will only be added to requests whose URLs match this pattern. Can be a RegExp object or a regex string.
|
|
28
|
-
*/
|
|
29
|
-
static addRequestHeader(name, value, match) {
|
|
30
|
-
NativeNetworkModule.addRequestHeader(name, value, (match instanceof RegExp ? match.source : match) || null);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Removes a previously added custom HTTP header.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* NetworkManager.removeRequestHeader("Authorization");
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @param headerName The name of the header to remove
|
|
42
|
-
*/
|
|
43
|
-
static removeRequestHeader(headerName) {
|
|
44
|
-
NativeNetworkModule.removeRequestHeader(headerName);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
9
|
/**
|
|
48
10
|
* Android only: Sets the connectivity state of the map. When set to false, the map will
|
|
49
11
|
* not make any network requests and will only use cached tiles. This is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeNetworkModule","NetworkManager","
|
|
1
|
+
{"version":3,"names":["NativeNetworkModule","NetworkManager","setConnected","connected"],"sourceRoot":"../../../../src","sources":["modules/network/NetworkManager.ts"],"mappings":";;AAAA,OAAOA,mBAAmB,MAAM,0BAAuB;;AAEvD;AACA;AACA;AACA,MAAMC,cAAc,CAAC;EACnB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,YAAYA,CAACC,SAAkB,EAAQ;IAC5CH,mBAAmB,CAACE,YAAY,CAACC,SAAS,CAAC;EAC7C;AACF;AAEA,SAASF,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../../src","sources":["modules/transform-request/NativeTransformRequestModule.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAqClD,eAAeA,mBAAmB,CAACC,YAAY,CAC7C,4BACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import NativeTransformRequestModule from "./NativeTransformRequestModule.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A serializable transform for rewriting MapLibre request URLs.
|
|
7
|
+
*
|
|
8
|
+
* Transforms are applied as a pipeline in the order they were added: transform N+1 sees
|
|
9
|
+
* the URL *after* transform N has possibly changed it.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A URL query parameter to append to matching map resource requests.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A HTTP header to send with matching map resource requests.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* TransformRequestManager provides methods for managing HTTP requests made by MapLibre.
|
|
22
|
+
*
|
|
23
|
+
* Transformations are possible in three ways:
|
|
24
|
+
*
|
|
25
|
+
* 1. Transforming the URL with search and replace
|
|
26
|
+
* 2. Adding URL search params
|
|
27
|
+
* 3. Adding HTTP headers
|
|
28
|
+
*
|
|
29
|
+
* Transforms are applied in this order. The `match` conditions are applied to
|
|
30
|
+
* possibly already transformed URLs.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* To gain insight into which transforms are applied set the log level to
|
|
34
|
+
* `"debug"` via {@link LogManager}:
|
|
35
|
+
*
|
|
36
|
+
* ```ts
|
|
37
|
+
* LogManager.setLogLevel("debug");
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
class TransformRequestManager {
|
|
41
|
+
/**
|
|
42
|
+
* Adds or updates a URL transform identified by `id`.
|
|
43
|
+
*
|
|
44
|
+
* Transforms execute in insertion order. Therefore `match` and `find` regexes
|
|
45
|
+
* are matched against possibly already modified URL by previous transforms.
|
|
46
|
+
*
|
|
47
|
+
* Re-adding an existing `id` updates the transform
|
|
48
|
+
* **in-place**, preserving its position in the pipeline. This makes it safe to
|
|
49
|
+
* refresh tokens or swap domains without disrupting the order of other transforms.
|
|
50
|
+
*
|
|
51
|
+
* URL transforms are applied before `addUrlSearchParam` and `addHeader`.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* // Upgrade all requests to HTTPS
|
|
55
|
+
* TransformRequestManager.addUrlTransform({
|
|
56
|
+
* id: "force-https",
|
|
57
|
+
* find: "^http://",
|
|
58
|
+
* replace: "https://",
|
|
59
|
+
* });
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* // Redirect a specific domain through a proxy
|
|
63
|
+
* TransformRequestManager.addUrlTransform({
|
|
64
|
+
* id: "proxy",
|
|
65
|
+
* match: "tiles\\.example\\.com",
|
|
66
|
+
* find: "tiles\\.example\\.com",
|
|
67
|
+
* replace: "proxy.example.com",
|
|
68
|
+
* });
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* // Inject an API key into the path using a capture group
|
|
72
|
+
* TransformRequestManager.addUrlTransform({
|
|
73
|
+
* id: "api-key",
|
|
74
|
+
* match: "api\\.example\\.com",
|
|
75
|
+
* find: "(https://api\\.example\\.com/)(.*)",
|
|
76
|
+
* replace: "$1mySecretKey/$2",
|
|
77
|
+
* });
|
|
78
|
+
*
|
|
79
|
+
* @param options The transform. Set {@link TransformOptions.id} to a stable string to
|
|
80
|
+
* enable in-place updates; if omitted an id is auto-generated and returned.
|
|
81
|
+
*
|
|
82
|
+
* @returns The id of the transform (the value of `transform.id` when provided, otherwise
|
|
83
|
+
* the auto-generated one). Pass it to {@link removeUrlTransform} to remove it later.
|
|
84
|
+
*/
|
|
85
|
+
addUrlTransform(options) {
|
|
86
|
+
const id = options.id ?? this.getId();
|
|
87
|
+
NativeTransformRequestModule.addUrlTransform(id, TransformRequestManager.toRegexString(options.match), TransformRequestManager.toRegexString(options.find) ?? "", options.replace);
|
|
88
|
+
return id;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Removes the URL transform with the given `id`.
|
|
93
|
+
* No-op if the id is not registered.
|
|
94
|
+
*
|
|
95
|
+
* @param id The identifier passed to/returned from {@link addUrlTransform}.
|
|
96
|
+
*/
|
|
97
|
+
removeUrlTransform(id) {
|
|
98
|
+
NativeTransformRequestModule.removeUrlTransform(id);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Removes all registered URL transforms
|
|
103
|
+
*/
|
|
104
|
+
clearUrlTransforms() {
|
|
105
|
+
NativeTransformRequestModule.clearUrlTransforms();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Adds or updates a URL query parameter identified by `id` that will be appended to all
|
|
110
|
+
* matching map resource requests. Re-adding an existing `id` updates the param in-place.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* // Add apiKey to for a specific domain
|
|
114
|
+
* TransformRequestManager.addUrlSearchParam({
|
|
115
|
+
* match: /tiles\.example\.com/,
|
|
116
|
+
* name: "apiKey",
|
|
117
|
+
* value: "your-api-key",
|
|
118
|
+
* });
|
|
119
|
+
*
|
|
120
|
+
* // Add apiKey to all requests (no match = applies to all)
|
|
121
|
+
* TransformRequestManager.addUrlSearchParam({ name: "apiKey", value: "your-api-key" });
|
|
122
|
+
*
|
|
123
|
+
* @param options The options. Set {@link TransformOptions.id} to a stable string to
|
|
124
|
+
* enable in-place updates; if omitted an id is auto-generated and returned.
|
|
125
|
+
*
|
|
126
|
+
* @returns The id of the options. Pass it to {@link removeUrlSearchParam} to remove it later.
|
|
127
|
+
*/
|
|
128
|
+
addUrlSearchParam(options) {
|
|
129
|
+
const id = options.id ?? this.getId();
|
|
130
|
+
NativeTransformRequestModule.addUrlSearchParam(id, TransformRequestManager.toRegexString(options.match), options.name, options.value);
|
|
131
|
+
return id;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Removes a previously added URL query parameter by its `id`.
|
|
136
|
+
*
|
|
137
|
+
* @param id The identifier passed to/returned from {@link addUrlSearchParam}.
|
|
138
|
+
*/
|
|
139
|
+
removeUrlSearchParam(id) {
|
|
140
|
+
NativeTransformRequestModule.removeUrlSearchParam(id);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Adds or updates an HTTP header identified by `id` that will be sent with all
|
|
145
|
+
* matching map resource requests. Re-adding an existing `id` updates the header in-place.
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* // Add header to all requests
|
|
149
|
+
* TransformRequestManager.addHeader({ name: "Authorization", value: "Bearer token123" });
|
|
150
|
+
*
|
|
151
|
+
* // Add header only to requests matching a pattern
|
|
152
|
+
* TransformRequestManager.addHeader({
|
|
153
|
+
* name: "X-API-Key",
|
|
154
|
+
* value: "key123",
|
|
155
|
+
* match: /https:\/\/api\.example\.com\/tiles\//,
|
|
156
|
+
* });
|
|
157
|
+
*
|
|
158
|
+
* @param options The options. Set {@link TransformOptions.id} to a stable string to
|
|
159
|
+
* enable in-place updates; if omitted an id is auto-generated and returned.
|
|
160
|
+
*
|
|
161
|
+
* @returns The id of the options. Pass it to {@link removeHeader} to remove it later.
|
|
162
|
+
*/
|
|
163
|
+
addHeader(options) {
|
|
164
|
+
const id = options.id ?? this.getId();
|
|
165
|
+
NativeTransformRequestModule.addHeader(id, TransformRequestManager.toRegexString(options.match), options.name, options.value);
|
|
166
|
+
return id;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Removes all registered URL search params.
|
|
171
|
+
*/
|
|
172
|
+
clearUrlSearchParams() {
|
|
173
|
+
NativeTransformRequestModule.clearUrlSearchParams();
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Removes a previously added HTTP header by its `id`.
|
|
178
|
+
*
|
|
179
|
+
* @param id The identifier passed to/returned from {@link addHeader}.
|
|
180
|
+
*/
|
|
181
|
+
removeHeader(id) {
|
|
182
|
+
NativeTransformRequestModule.removeHeader(id);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Removes all registered HTTP headers.
|
|
187
|
+
*/
|
|
188
|
+
clearHeaders() {
|
|
189
|
+
NativeTransformRequestModule.clearHeaders();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Removes all registered URL transforms, URL search params and HTTP headers.
|
|
194
|
+
*/
|
|
195
|
+
clear() {
|
|
196
|
+
this.clearUrlTransforms();
|
|
197
|
+
this.clearUrlSearchParams();
|
|
198
|
+
this.clearHeaders();
|
|
199
|
+
}
|
|
200
|
+
lastId = -1;
|
|
201
|
+
getId() {
|
|
202
|
+
this.lastId++;
|
|
203
|
+
return "transform-request-" + this.lastId;
|
|
204
|
+
}
|
|
205
|
+
static toRegexString(value) {
|
|
206
|
+
let result = undefined;
|
|
207
|
+
if (value instanceof RegExp) {
|
|
208
|
+
if (value.flags) {
|
|
209
|
+
throw new Error("Regex flags are not supported");
|
|
210
|
+
}
|
|
211
|
+
result = value.source;
|
|
212
|
+
} else {
|
|
213
|
+
result = value;
|
|
214
|
+
}
|
|
215
|
+
return result || null;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
const transformRequestManager = new TransformRequestManager();
|
|
219
|
+
export { transformRequestManager as TransformRequestManager };
|
|
220
|
+
//# sourceMappingURL=TransformRequestManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeTransformRequestModule","TransformRequestManager","addUrlTransform","options","id","getId","toRegexString","match","find","replace","removeUrlTransform","clearUrlTransforms","addUrlSearchParam","name","value","removeUrlSearchParam","addHeader","clearUrlSearchParams","removeHeader","clearHeaders","clear","lastId","result","undefined","RegExp","flags","Error","source","transformRequestManager"],"sourceRoot":"../../../../src","sources":["modules/transform-request/TransformRequestManager.ts"],"mappings":";;AAAA,OAAOA,4BAA4B,MAAM,mCAAgC;;AAkBzE;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;;AASA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,CAAC;EAC5B;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,eAAeA,CAACC,OAA4B,EAAU;IACpD,MAAMC,EAAE,GAAGD,OAAO,CAACC,EAAE,IAAI,IAAI,CAACC,KAAK,CAAC,CAAC;IAErCL,4BAA4B,CAACE,eAAe,CAC1CE,EAAE,EACFH,uBAAuB,CAACK,aAAa,CAACH,OAAO,CAACI,KAAK,CAAC,EACpDN,uBAAuB,CAACK,aAAa,CAACH,OAAO,CAACK,IAAI,CAAC,IAAI,EAAE,EACzDL,OAAO,CAACM,OACV,CAAC;IAED,OAAOL,EAAE;EACX;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEM,kBAAkBA,CAACN,EAAU,EAAQ;IACnCJ,4BAA4B,CAACU,kBAAkB,CAACN,EAAE,CAAC;EACrD;;EAEA;AACF;AACA;EACEO,kBAAkBA,CAAA,EAAS;IACzBX,4BAA4B,CAACW,kBAAkB,CAAC,CAAC;EACnD;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,iBAAiBA,CAACT,OAA8B,EAAU;IACxD,MAAMC,EAAE,GAAGD,OAAO,CAACC,EAAE,IAAI,IAAI,CAACC,KAAK,CAAC,CAAC;IAErCL,4BAA4B,CAACY,iBAAiB,CAC5CR,EAAE,EACFH,uBAAuB,CAACK,aAAa,CAACH,OAAO,CAACI,KAAK,CAAC,EACpDJ,OAAO,CAACU,IAAI,EACZV,OAAO,CAACW,KACV,CAAC;IAED,OAAOV,EAAE;EACX;;EAEA;AACF;AACA;AACA;AACA;EACEW,oBAAoBA,CAACX,EAAU,EAAQ;IACrCJ,4BAA4B,CAACe,oBAAoB,CAACX,EAAE,CAAC;EACvD;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEY,SAASA,CAACb,OAAsB,EAAU;IACxC,MAAMC,EAAE,GAAGD,OAAO,CAACC,EAAE,IAAI,IAAI,CAACC,KAAK,CAAC,CAAC;IAErCL,4BAA4B,CAACgB,SAAS,CACpCZ,EAAE,EACFH,uBAAuB,CAACK,aAAa,CAACH,OAAO,CAACI,KAAK,CAAC,EACpDJ,OAAO,CAACU,IAAI,EACZV,OAAO,CAACW,KACV,CAAC;IAED,OAAOV,EAAE;EACX;;EAEA;AACF;AACA;EACEa,oBAAoBA,CAAA,EAAS;IAC3BjB,4BAA4B,CAACiB,oBAAoB,CAAC,CAAC;EACrD;;EAEA;AACF;AACA;AACA;AACA;EACEC,YAAYA,CAACd,EAAU,EAAQ;IAC7BJ,4BAA4B,CAACkB,YAAY,CAACd,EAAE,CAAC;EAC/C;;EAEA;AACF;AACA;EACEe,YAAYA,CAAA,EAAS;IACnBnB,4BAA4B,CAACmB,YAAY,CAAC,CAAC;EAC7C;;EAEA;AACF;AACA;EACEC,KAAKA,CAAA,EAAS;IACZ,IAAI,CAACT,kBAAkB,CAAC,CAAC;IACzB,IAAI,CAACM,oBAAoB,CAAC,CAAC;IAC3B,IAAI,CAACE,YAAY,CAAC,CAAC;EACrB;EAEQE,MAAM,GAAW,CAAC,CAAC;EAEnBhB,KAAKA,CAAA,EAAG;IACd,IAAI,CAACgB,MAAM,EAAE;IAEb,OAAO,oBAAoB,GAAG,IAAI,CAACA,MAAM;EAC3C;EAEA,OAAef,aAAaA,CAC1BQ,KAAkC,EACnB;IACf,IAAIQ,MAA0B,GAAGC,SAAS;IAC1C,IAAIT,KAAK,YAAYU,MAAM,EAAE;MAC3B,IAAIV,KAAK,CAACW,KAAK,EAAE;QACf,MAAM,IAAIC,KAAK,CAAC,+BAA+B,CAAC;MAClD;MAEAJ,MAAM,GAAGR,KAAK,CAACa,MAAM;IACvB,CAAC,MAAM;MACLL,MAAM,GAAGR,KAAK;IAChB;IAEA,OAAOQ,MAAM,IAAI,IAAI;EACvB;AACF;AAEA,MAAMM,uBAAuB,GAAG,IAAI3B,uBAAuB,CAAC,CAAC;AAE7D,SAAS2B,uBAAuB,IAAI3B,uBAAuB","ignoreList":[]}
|
|
@@ -20,6 +20,7 @@ export { NetworkManager } from "./modules/network/NetworkManager";
|
|
|
20
20
|
export { OfflineManager, type OfflinePackCreateOptions, type OfflinePackDownloadState, type OfflinePackError, type OfflinePackProgressListener, type OfflinePackErrorListener, } from "./modules/offline/OfflineManager";
|
|
21
21
|
export { OfflinePack, type OfflinePackStatus, } from "./modules/offline/OfflinePack";
|
|
22
22
|
export { StaticMapImageManager, type StaticMapOptions, type StaticMapCenterOptions, type StaticMapBoundsOptions, type StaticMapCreateOptions, } from "./modules/static-map/StaticMapManager";
|
|
23
|
+
export { TransformRequestManager, type TransformOptions, type UrlTransformOptions, type UrlSearchParamOptions, type HeaderOptions, } from "./modules/transform-request/TransformRequestManager";
|
|
23
24
|
export type { Anchor } from "./types/Anchor";
|
|
24
25
|
export type { LngLat } from "./types/LngLat";
|
|
25
26
|
export type { LngLatBounds } from "./types/LngLatBounds";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,EACjC,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,MAAM,GACP,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,GAAG,GACJ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,cAAc,GACf,MAAM,yDAAyD,CAAC;AAEjE,OAAO,EACL,KAAK,oBAAoB,EACzB,eAAe,GAChB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACL,KAAK,YAAY,EACjB,OAAO,GACR,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,yC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9B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,WAAW,EACX,KAAK,iBAAiB,GACvB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,GAC5B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EACL,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,GACnB,MAAM,qDAAqD,CAAC;AAE7D,YAAY,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,UAAU,GACX,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { TurboModule } from "react-native";
|
|
2
2
|
export interface Spec extends TurboModule {
|
|
3
|
-
addRequestHeader(name: string, value: string, match: string | null): void;
|
|
4
|
-
removeRequestHeader(name: string): void;
|
|
5
3
|
setConnected(connected: boolean): void;
|
|
6
4
|
}
|
|
7
5
|
declare const _default: Spec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeNetworkModule.d.ts","sourceRoot":"","sources":["../../../../../src/modules/network/NativeNetworkModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,
|
|
1
|
+
{"version":3,"file":"NativeNetworkModule.d.ts","sourceRoot":"","sources":["../../../../../src/modules/network/NativeNetworkModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;CACxC;;AAED,wBAA2E"}
|
|
@@ -1,39 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* NetworkManager provides methods for managing
|
|
3
|
-
* This includes adding custom headers to tile requests and controlling network connectivity.
|
|
2
|
+
* NetworkManager provides methods for managing and controlling network connectivity.
|
|
4
3
|
*/
|
|
5
4
|
declare class NetworkManager {
|
|
6
|
-
/**
|
|
7
|
-
* Adds a custom HTTP header that will be sent with all map tile requests.
|
|
8
|
-
* This is useful for adding authentication tokens or other custom headers
|
|
9
|
-
* required by your tile server.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* // Add header to all requests
|
|
13
|
-
* NetworkManager.addRequestHeader("Authorization", "Bearer token123");
|
|
14
|
-
*
|
|
15
|
-
* // Add header only to requests matching a regex pattern (string)
|
|
16
|
-
* NetworkManager.addRequestHeader("X-API-Key", "key123", "https:\\/\\/api\\.example\\.com\\/tiles\\/");
|
|
17
|
-
*
|
|
18
|
-
* // Add header only to requests matching a regex pattern (RegExp)
|
|
19
|
-
* NetworkManager.addRequestHeader("X-API-Key", "key123", /https:\/\/api\.example\.com\/tiles\//);
|
|
20
|
-
*
|
|
21
|
-
* @param name The name of the header (e.g., "Authorization")
|
|
22
|
-
* @param value The value of the header (e.g., "Bearer token123")
|
|
23
|
-
* @param match Optional regex pattern to match against network URLs. If provided, the header will only be added to requests whose URLs match this pattern. Can be a RegExp object or a regex string.
|
|
24
|
-
*/
|
|
25
|
-
static addRequestHeader(name: string, value: string, match?: string | RegExp): void;
|
|
26
|
-
/**
|
|
27
|
-
* Removes a previously added custom HTTP header.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```ts
|
|
31
|
-
* NetworkManager.removeRequestHeader("Authorization");
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* @param headerName The name of the header to remove
|
|
35
|
-
*/
|
|
36
|
-
static removeRequestHeader(headerName: string): void;
|
|
37
5
|
/**
|
|
38
6
|
* Android only: Sets the connectivity state of the map. When set to false, the map will
|
|
39
7
|
* not make any network requests and will only use cached tiles. This is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkManager.d.ts","sourceRoot":"","sources":["../../../../../src/modules/network/NetworkManager.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"NetworkManager.d.ts","sourceRoot":"","sources":["../../../../../src/modules/network/NetworkManager.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,cAAM,cAAc;IAClB;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;CAG9C;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TurboModule } from "react-native";
|
|
2
|
+
export interface Spec extends TurboModule {
|
|
3
|
+
addUrlTransform(id: string, match: string | null, find: string, replace: string): void;
|
|
4
|
+
removeUrlTransform(id: string): void;
|
|
5
|
+
clearUrlTransforms(): void;
|
|
6
|
+
addUrlSearchParam(id: string, match: string | null, name: string, value: string): void;
|
|
7
|
+
removeUrlSearchParam(id: string): void;
|
|
8
|
+
clearUrlSearchParams(): void;
|
|
9
|
+
addHeader(id: string, match: string | null, name: string, value: string): void;
|
|
10
|
+
removeHeader(id: string): void;
|
|
11
|
+
clearHeaders(): void;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: Spec;
|
|
14
|
+
export default _default;
|
|
15
|
+
//# sourceMappingURL=NativeTransformRequestModule.d.ts.map
|
package/lib/typescript/commonjs/modules/transform-request/NativeTransformRequestModule.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeTransformRequestModule.d.ts","sourceRoot":"","sources":["../../../../../src/modules/transform-request/NativeTransformRequestModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,eAAe,CACb,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,IAAI,CAAC;IAER,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,kBAAkB,IAAI,IAAI,CAAC;IAE3B,iBAAiB,CACf,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,IAAI,CAAC;IAER,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvC,oBAAoB,IAAI,IAAI,CAAC;IAE7B,SAAS,CACP,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,IAAI,CAAC;IAER,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B,YAAY,IAAI,IAAI,CAAC;CACtB;;AAED,wBAEE"}
|