ropegeo-common 1.12.3 → 1.12.4
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/dist/components/RopeGeoCursorPaginationHttpRequest.js +8 -8
- package/dist/components/RopeGeoHttpRequest.js +5 -5
- package/dist/components/RopeGeoPaginationHttpRequest.js +7 -7
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +10 -10
- package/dist/helpers/network/index.d.ts +7 -0
- package/dist/helpers/network/index.d.ts.map +1 -0
- package/dist/helpers/network/index.js +18 -0
- package/dist/helpers/network/networkRequestPolicy.d.ts.map +1 -0
- package/package.json +5 -1
- package/dist/helpers/networkRequestPolicy.d.ts.map +0 -1
- /package/dist/helpers/{networkRequestPolicy.d.ts → network/networkRequestPolicy.d.ts} +0 -0
- /package/dist/helpers/{networkRequestPolicy.js → network/networkRequestPolicy.js} +0 -0
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ npm install ropegeo-common
|
|
|
11
11
|
## Imports
|
|
12
12
|
|
|
13
13
|
- **Models** — `import { … } from 'ropegeo-common/models'` (or `import type { … }` for symbols that are type-only in TypeScript). The package root `ropegeo-common` re-exports everything from `./models` for convenience. The subpath `ropegeo-common/classes` is kept as an alias of `./models` for older imports until dependents switch over.
|
|
14
|
-
- **Helpers** — `import { … } from 'ropegeo-common/helpers'` (and `import type { … }` for helper types such as `GetS3ObjectResult`).
|
|
14
|
+
- **Helpers** — `import { … } from 'ropegeo-common/helpers'` (and `import type { … }` for helper types such as `GetS3ObjectResult`). The full barrel includes Node-only modules (S3 folder upload uses `fs`); **React Native / Metro** should use **`ropegeo-common/helpers/network`** (sources under `src/helpers/network/`, barrel `index.ts`) for the request-timeout / abort helpers only (`NETWORK_REQUEST_*`, `installNetworkRequestPolicyTimers`, `mergeParentSignalWithDeadline`, `resolveRequestTimeoutMs`, `isAbortError`, `isNetworkRequestTimeoutError`, and related types).
|
|
15
15
|
|
|
16
16
|
Helper tables use columns **Name**, **Description**, **Import**. Model tables add **Base class** after **Name** (`N/A` for enums, TypeScript-only type aliases, constants, registration functions, and classes without an exported superclass; otherwise the direct superclass).
|
|
17
17
|
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RopeGeoCursorPaginationHttpRequest = RopeGeoCursorPaginationHttpRequest;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
6
|
+
const network_1 = require("../helpers/network");
|
|
7
7
|
const models_1 = require("../models");
|
|
8
8
|
const RopeGeoHttpRequest_1 = require("./RopeGeoHttpRequest");
|
|
9
9
|
const PATH_PARAM_PATTERN = /:([a-zA-Z0-9_]+)/g;
|
|
@@ -52,13 +52,13 @@ function RopeGeoCursorPaginationHttpRequest({ service, method = RopeGeoHttpReque
|
|
|
52
52
|
const abortController = new AbortController();
|
|
53
53
|
const timedOutRef = { current: false };
|
|
54
54
|
const requestStartedAt = Date.now();
|
|
55
|
-
const timeoutMs = (0,
|
|
55
|
+
const timeoutMs = (0, network_1.resolveRequestTimeoutMs)(timeoutAfterSeconds);
|
|
56
56
|
setData([]);
|
|
57
57
|
setParams(queryParams);
|
|
58
58
|
setLoading(true);
|
|
59
59
|
setErrors(null);
|
|
60
60
|
setTimeoutCountdown(null);
|
|
61
|
-
const policyDispose = (0,
|
|
61
|
+
const policyDispose = (0, network_1.installNetworkRequestPolicyTimers)(requestStartedAt, timeoutMs, {
|
|
62
62
|
isActive: () => !cancelled,
|
|
63
63
|
onTimeoutCountdown: (seconds) => {
|
|
64
64
|
if (!cancelled)
|
|
@@ -121,11 +121,11 @@ function RopeGeoCursorPaginationHttpRequest({ service, method = RopeGeoHttpReque
|
|
|
121
121
|
if (cancelled)
|
|
122
122
|
return;
|
|
123
123
|
if (timedOutRef.current) {
|
|
124
|
-
setErrors(new Error(
|
|
124
|
+
setErrors(new Error(network_1.NETWORK_REQUEST_TIMED_OUT_MESSAGE));
|
|
125
125
|
setData([]);
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
|
-
if ((0,
|
|
128
|
+
if ((0, network_1.isAbortError)(err))
|
|
129
129
|
return;
|
|
130
130
|
console.error("[RopeGeoCursorPaginationHttpRequest] Request failed", {
|
|
131
131
|
url,
|
|
@@ -163,8 +163,8 @@ function RopeGeoCursorPaginationHttpRequest({ service, method = RopeGeoHttpReque
|
|
|
163
163
|
loadMoreAbortRef.current = outer;
|
|
164
164
|
const timedOutRef = { current: false };
|
|
165
165
|
const requestStartedAt = Date.now();
|
|
166
|
-
const timeoutMs = (0,
|
|
167
|
-
const policyDispose = (0,
|
|
166
|
+
const timeoutMs = (0, network_1.resolveRequestTimeoutMs)(timeoutAfterSeconds);
|
|
167
|
+
const policyDispose = (0, network_1.installNetworkRequestPolicyTimers)(requestStartedAt, timeoutMs, {
|
|
168
168
|
isActive: () => loadMoreAbortRef.current === outer,
|
|
169
169
|
onTimeoutCountdown: (seconds) => {
|
|
170
170
|
if (loadMoreAbortRef.current === outer) {
|
|
@@ -218,7 +218,7 @@ function RopeGeoCursorPaginationHttpRequest({ service, method = RopeGeoHttpReque
|
|
|
218
218
|
console.error("[RopeGeoCursorPaginationHttpRequest] loadMore: timed out", { url });
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
|
-
if ((0,
|
|
221
|
+
if ((0, network_1.isAbortError)(err))
|
|
222
222
|
return;
|
|
223
223
|
console.error("[RopeGeoCursorPaginationHttpRequest] loadMore: Request failed", {
|
|
224
224
|
url,
|
|
@@ -4,7 +4,7 @@ exports.SERVICE_BASE_URL = exports.Method = exports.Service = void 0;
|
|
|
4
4
|
exports.RopeGeoHttpRequest = RopeGeoHttpRequest;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
-
const
|
|
7
|
+
const network_1 = require("../helpers/network");
|
|
8
8
|
const models_1 = require("../models");
|
|
9
9
|
exports.Service = {
|
|
10
10
|
WEBSCRAPER: "WEBSCRAPER",
|
|
@@ -57,11 +57,11 @@ function RopeGeoHttpRequest({ service, method, path, pathParams, queryParams, bo
|
|
|
57
57
|
const abortController = new AbortController();
|
|
58
58
|
const timedOutRef = { current: false };
|
|
59
59
|
const requestStartedAt = Date.now();
|
|
60
|
-
const timeoutMs = (0,
|
|
60
|
+
const timeoutMs = (0, network_1.resolveRequestTimeoutMs)(timeoutAfterSeconds);
|
|
61
61
|
setLoading(true);
|
|
62
62
|
setErrors(null);
|
|
63
63
|
setTimeoutCountdown(null);
|
|
64
|
-
const policyDispose = (0,
|
|
64
|
+
const policyDispose = (0, network_1.installNetworkRequestPolicyTimers)(requestStartedAt, timeoutMs, {
|
|
65
65
|
isActive: () => !cancelled,
|
|
66
66
|
onTimeoutCountdown: (seconds) => {
|
|
67
67
|
if (!cancelled)
|
|
@@ -127,11 +127,11 @@ function RopeGeoHttpRequest({ service, method, path, pathParams, queryParams, bo
|
|
|
127
127
|
if (cancelled)
|
|
128
128
|
return;
|
|
129
129
|
if (timedOutRef.current) {
|
|
130
|
-
setErrors(new Error(
|
|
130
|
+
setErrors(new Error(network_1.NETWORK_REQUEST_TIMED_OUT_MESSAGE));
|
|
131
131
|
setData(null);
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
|
-
if ((0,
|
|
134
|
+
if ((0, network_1.isAbortError)(err))
|
|
135
135
|
return;
|
|
136
136
|
console.error("[RopeGeoHttpRequest] Request failed", {
|
|
137
137
|
url,
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RopeGeoPaginationHttpRequest = RopeGeoPaginationHttpRequest;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
6
|
+
const network_1 = require("../helpers/network");
|
|
7
7
|
const models_1 = require("../models");
|
|
8
8
|
const RopeGeoHttpRequest_1 = require("./RopeGeoHttpRequest");
|
|
9
9
|
const PATH_PARAM_PATTERN = /:([a-zA-Z0-9_]+)/g;
|
|
@@ -71,7 +71,7 @@ function RopeGeoPaginationHttpRequest({ service, method = RopeGeoHttpRequest_1.M
|
|
|
71
71
|
let cancelled = false;
|
|
72
72
|
const abortController = new AbortController();
|
|
73
73
|
const { signal } = abortController;
|
|
74
|
-
const timeoutMs = (0,
|
|
74
|
+
const timeoutMs = (0, network_1.resolveRequestTimeoutMs)(timeoutAfterSeconds);
|
|
75
75
|
setLoading(true);
|
|
76
76
|
setReceived(0);
|
|
77
77
|
setTotal(null);
|
|
@@ -98,7 +98,7 @@ function RopeGeoPaginationHttpRequest({ service, method = RopeGeoHttpRequest_1.M
|
|
|
98
98
|
const pageOneTimedOutRef = { current: false };
|
|
99
99
|
if (pageNum === 1) {
|
|
100
100
|
const startedAt = Date.now();
|
|
101
|
-
pageOnePolicyDispose = (0,
|
|
101
|
+
pageOnePolicyDispose = (0, network_1.installNetworkRequestPolicyTimers)(startedAt, timeoutMs, {
|
|
102
102
|
isActive: () => !cancelled,
|
|
103
103
|
onTimeoutCountdown: (seconds) => {
|
|
104
104
|
if (!cancelled)
|
|
@@ -120,7 +120,7 @@ function RopeGeoPaginationHttpRequest({ service, method = RopeGeoHttpRequest_1.M
|
|
|
120
120
|
signalForFetch = signal;
|
|
121
121
|
}
|
|
122
122
|
else {
|
|
123
|
-
merged = (0,
|
|
123
|
+
merged = (0, network_1.mergeParentSignalWithDeadline)(signal, timeoutMs);
|
|
124
124
|
signalForFetch = merged.signal;
|
|
125
125
|
}
|
|
126
126
|
try {
|
|
@@ -162,10 +162,10 @@ function RopeGeoPaginationHttpRequest({ service, method = RopeGeoHttpRequest_1.M
|
|
|
162
162
|
catch (err) {
|
|
163
163
|
if (pageNum !== 1 && merged != null && merged.consumeDidTimeout()) {
|
|
164
164
|
abortController.abort();
|
|
165
|
-
throw new Error(
|
|
165
|
+
throw new Error(network_1.NETWORK_REQUEST_TIMED_OUT_MESSAGE);
|
|
166
166
|
}
|
|
167
167
|
if (pageNum === 1 && pageOneTimedOutRef.current) {
|
|
168
|
-
throw new Error(
|
|
168
|
+
throw new Error(network_1.NETWORK_REQUEST_TIMED_OUT_MESSAGE);
|
|
169
169
|
}
|
|
170
170
|
throw err;
|
|
171
171
|
}
|
|
@@ -225,7 +225,7 @@ function RopeGeoPaginationHttpRequest({ service, method = RopeGeoHttpRequest_1.M
|
|
|
225
225
|
setErrors(null);
|
|
226
226
|
}
|
|
227
227
|
catch (err) {
|
|
228
|
-
if (cancelled || (0,
|
|
228
|
+
if (cancelled || (0, network_1.isAbortError)(err))
|
|
229
229
|
return;
|
|
230
230
|
console.error("[RopeGeoPaginationHttpRequest] Request failed", {
|
|
231
231
|
error: err instanceof Error ? err.message : String(err),
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { httpRequest } from './httpRequest';
|
|
2
2
|
export { default as ProgressLogger } from './progressLogger';
|
|
3
3
|
export { timeoutAfter } from './timeoutAfter';
|
|
4
|
-
export { NETWORK_REQUEST_DEFAULT_TIMEOUT_SECONDS, NETWORK_REQUEST_HARD_TIMEOUT_MS, NETWORK_REQUEST_SLOW_THRESHOLD_MS, NETWORK_REQUEST_TIMED_OUT_MESSAGE, installNetworkRequestPolicyTimers, isAbortError, isNetworkRequestTimeoutError, mergeParentSignalWithDeadline, resolveRequestTimeoutMs, type MergedDeadlineHandles, type NetworkRequestPolicyTimerCallbacks, } from './
|
|
4
|
+
export { NETWORK_REQUEST_DEFAULT_TIMEOUT_SECONDS, NETWORK_REQUEST_HARD_TIMEOUT_MS, NETWORK_REQUEST_SLOW_THRESHOLD_MS, NETWORK_REQUEST_TIMED_OUT_MESSAGE, installNetworkRequestPolicyTimers, isAbortError, isNetworkRequestTimeoutError, mergeParentSignalWithDeadline, resolveRequestTimeoutMs, type MergedDeadlineHandles, type NetworkRequestPolicyTimerCallbacks, } from './network';
|
|
5
5
|
export { getS3Client, resetS3ClientForTests } from './s3/getS3Client';
|
|
6
6
|
export { default as listS3Objects, type S3ObjectEntry } from './s3/listS3Objects';
|
|
7
7
|
export { default as getS3Object, type GetS3ObjectResult } from './s3/getS3Object';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACH,uCAAuC,EACvC,+BAA+B,EAC/B,iCAAiC,EACjC,iCAAiC,EACjC,iCAAiC,EACjC,YAAY,EACZ,4BAA4B,EAC5B,6BAA6B,EAC7B,uBAAuB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,kCAAkC,GAC1C,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACH,uCAAuC,EACvC,+BAA+B,EAC/B,iCAAiC,EACjC,iCAAiC,EACjC,iCAAiC,EACjC,YAAY,EACZ,4BAA4B,EAC5B,6BAA6B,EAC7B,uBAAuB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,kCAAkC,GAC1C,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,iCAAiC,EAAE,MAAM,yCAAyC,CAAC;AAEvG,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC"}
|
package/dist/helpers/index.js
CHANGED
|
@@ -10,16 +10,16 @@ var progressLogger_1 = require("./progressLogger");
|
|
|
10
10
|
Object.defineProperty(exports, "ProgressLogger", { enumerable: true, get: function () { return __importDefault(progressLogger_1).default; } });
|
|
11
11
|
var timeoutAfter_1 = require("./timeoutAfter");
|
|
12
12
|
Object.defineProperty(exports, "timeoutAfter", { enumerable: true, get: function () { return timeoutAfter_1.timeoutAfter; } });
|
|
13
|
-
var
|
|
14
|
-
Object.defineProperty(exports, "NETWORK_REQUEST_DEFAULT_TIMEOUT_SECONDS", { enumerable: true, get: function () { return
|
|
15
|
-
Object.defineProperty(exports, "NETWORK_REQUEST_HARD_TIMEOUT_MS", { enumerable: true, get: function () { return
|
|
16
|
-
Object.defineProperty(exports, "NETWORK_REQUEST_SLOW_THRESHOLD_MS", { enumerable: true, get: function () { return
|
|
17
|
-
Object.defineProperty(exports, "NETWORK_REQUEST_TIMED_OUT_MESSAGE", { enumerable: true, get: function () { return
|
|
18
|
-
Object.defineProperty(exports, "installNetworkRequestPolicyTimers", { enumerable: true, get: function () { return
|
|
19
|
-
Object.defineProperty(exports, "isAbortError", { enumerable: true, get: function () { return
|
|
20
|
-
Object.defineProperty(exports, "isNetworkRequestTimeoutError", { enumerable: true, get: function () { return
|
|
21
|
-
Object.defineProperty(exports, "mergeParentSignalWithDeadline", { enumerable: true, get: function () { return
|
|
22
|
-
Object.defineProperty(exports, "resolveRequestTimeoutMs", { enumerable: true, get: function () { return
|
|
13
|
+
var network_1 = require("./network");
|
|
14
|
+
Object.defineProperty(exports, "NETWORK_REQUEST_DEFAULT_TIMEOUT_SECONDS", { enumerable: true, get: function () { return network_1.NETWORK_REQUEST_DEFAULT_TIMEOUT_SECONDS; } });
|
|
15
|
+
Object.defineProperty(exports, "NETWORK_REQUEST_HARD_TIMEOUT_MS", { enumerable: true, get: function () { return network_1.NETWORK_REQUEST_HARD_TIMEOUT_MS; } });
|
|
16
|
+
Object.defineProperty(exports, "NETWORK_REQUEST_SLOW_THRESHOLD_MS", { enumerable: true, get: function () { return network_1.NETWORK_REQUEST_SLOW_THRESHOLD_MS; } });
|
|
17
|
+
Object.defineProperty(exports, "NETWORK_REQUEST_TIMED_OUT_MESSAGE", { enumerable: true, get: function () { return network_1.NETWORK_REQUEST_TIMED_OUT_MESSAGE; } });
|
|
18
|
+
Object.defineProperty(exports, "installNetworkRequestPolicyTimers", { enumerable: true, get: function () { return network_1.installNetworkRequestPolicyTimers; } });
|
|
19
|
+
Object.defineProperty(exports, "isAbortError", { enumerable: true, get: function () { return network_1.isAbortError; } });
|
|
20
|
+
Object.defineProperty(exports, "isNetworkRequestTimeoutError", { enumerable: true, get: function () { return network_1.isNetworkRequestTimeoutError; } });
|
|
21
|
+
Object.defineProperty(exports, "mergeParentSignalWithDeadline", { enumerable: true, get: function () { return network_1.mergeParentSignalWithDeadline; } });
|
|
22
|
+
Object.defineProperty(exports, "resolveRequestTimeoutMs", { enumerable: true, get: function () { return network_1.resolveRequestTimeoutMs; } });
|
|
23
23
|
var getS3Client_1 = require("./s3/getS3Client");
|
|
24
24
|
Object.defineProperty(exports, "getS3Client", { enumerable: true, get: function () { return getS3Client_1.getS3Client; } });
|
|
25
25
|
Object.defineProperty(exports, "resetS3ClientForTests", { enumerable: true, get: function () { return getS3Client_1.resetS3ClientForTests; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Network-only helpers safe for browsers and React Native (no Node `fs`, no AWS S3/SQS in this graph).
|
|
3
|
+
* Published as `ropegeo-common/helpers/network`. Prefer this entry over `ropegeo-common/helpers` in
|
|
4
|
+
* Metro/RN bundles so the full helpers barrel (S3 folder upload, etc.) is not resolved.
|
|
5
|
+
*/
|
|
6
|
+
export { NETWORK_REQUEST_DEFAULT_TIMEOUT_SECONDS, NETWORK_REQUEST_HARD_TIMEOUT_MS, NETWORK_REQUEST_SLOW_THRESHOLD_MS, NETWORK_REQUEST_TIMED_OUT_MESSAGE, installNetworkRequestPolicyTimers, isAbortError, isNetworkRequestTimeoutError, mergeParentSignalWithDeadline, resolveRequestTimeoutMs, type MergedDeadlineHandles, type NetworkRequestPolicyTimerCallbacks, } from "./networkRequestPolicy";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/network/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,uCAAuC,EACvC,+BAA+B,EAC/B,iCAAiC,EACjC,iCAAiC,EACjC,iCAAiC,EACjC,YAAY,EACZ,4BAA4B,EAC5B,6BAA6B,EAC7B,uBAAuB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,kCAAkC,GACxC,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Network-only helpers safe for browsers and React Native (no Node `fs`, no AWS S3/SQS in this graph).
|
|
4
|
+
* Published as `ropegeo-common/helpers/network`. Prefer this entry over `ropegeo-common/helpers` in
|
|
5
|
+
* Metro/RN bundles so the full helpers barrel (S3 folder upload, etc.) is not resolved.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.resolveRequestTimeoutMs = exports.mergeParentSignalWithDeadline = exports.isNetworkRequestTimeoutError = exports.isAbortError = exports.installNetworkRequestPolicyTimers = exports.NETWORK_REQUEST_TIMED_OUT_MESSAGE = exports.NETWORK_REQUEST_SLOW_THRESHOLD_MS = exports.NETWORK_REQUEST_HARD_TIMEOUT_MS = exports.NETWORK_REQUEST_DEFAULT_TIMEOUT_SECONDS = void 0;
|
|
9
|
+
var networkRequestPolicy_1 = require("./networkRequestPolicy");
|
|
10
|
+
Object.defineProperty(exports, "NETWORK_REQUEST_DEFAULT_TIMEOUT_SECONDS", { enumerable: true, get: function () { return networkRequestPolicy_1.NETWORK_REQUEST_DEFAULT_TIMEOUT_SECONDS; } });
|
|
11
|
+
Object.defineProperty(exports, "NETWORK_REQUEST_HARD_TIMEOUT_MS", { enumerable: true, get: function () { return networkRequestPolicy_1.NETWORK_REQUEST_HARD_TIMEOUT_MS; } });
|
|
12
|
+
Object.defineProperty(exports, "NETWORK_REQUEST_SLOW_THRESHOLD_MS", { enumerable: true, get: function () { return networkRequestPolicy_1.NETWORK_REQUEST_SLOW_THRESHOLD_MS; } });
|
|
13
|
+
Object.defineProperty(exports, "NETWORK_REQUEST_TIMED_OUT_MESSAGE", { enumerable: true, get: function () { return networkRequestPolicy_1.NETWORK_REQUEST_TIMED_OUT_MESSAGE; } });
|
|
14
|
+
Object.defineProperty(exports, "installNetworkRequestPolicyTimers", { enumerable: true, get: function () { return networkRequestPolicy_1.installNetworkRequestPolicyTimers; } });
|
|
15
|
+
Object.defineProperty(exports, "isAbortError", { enumerable: true, get: function () { return networkRequestPolicy_1.isAbortError; } });
|
|
16
|
+
Object.defineProperty(exports, "isNetworkRequestTimeoutError", { enumerable: true, get: function () { return networkRequestPolicy_1.isNetworkRequestTimeoutError; } });
|
|
17
|
+
Object.defineProperty(exports, "mergeParentSignalWithDeadline", { enumerable: true, get: function () { return networkRequestPolicy_1.mergeParentSignalWithDeadline; } });
|
|
18
|
+
Object.defineProperty(exports, "resolveRequestTimeoutMs", { enumerable: true, get: function () { return networkRequestPolicy_1.resolveRequestTimeoutMs; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networkRequestPolicy.d.ts","sourceRoot":"","sources":["../../../src/helpers/network/networkRequestPolicy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,uCAAuC,KAAK,CAAC;AAE1D,eAAO,MAAM,+BAA+B,QACK,CAAC;AAElD,8FAA8F;AAC9F,eAAO,MAAM,iCAAiC,QAAS,CAAC;AAExD,8EAA8E;AAC9E,eAAO,MAAM,iCAAiC,8BAA8B,CAAC;AAE7E,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAEhE;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAIhD;AAED,4FAA4F;AAC5F,wBAAgB,uBAAuB,CAAC,mBAAmB,CAAC,EAAE,MAAM,GAAG,MAAM,CAS5E;AAED,MAAM,MAAM,kCAAkC,GAAG;IAC/C,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,uBAAuB,EAAE,MAAM,IAAI,CAAC;IACpC,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iCAAiC,CAC/C,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,kCAAkC,GAC5C,MAAM,IAAI,CAuCZ;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iBAAiB,EAAE,MAAM,OAAO,CAAC;CAClC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,YAAY,EAAE,WAAW,EACzB,UAAU,GAAE,MAAwC,GACnD,qBAAqB,CAqCvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ropegeo-common",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.4",
|
|
4
4
|
"description": "Shared domain models and helpers for RopeGeo and WebScraper",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": {
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
"types": "./dist/helpers/index.d.ts",
|
|
24
24
|
"default": "./dist/helpers/index.js"
|
|
25
25
|
},
|
|
26
|
+
"./helpers/network": {
|
|
27
|
+
"types": "./dist/helpers/network/index.d.ts",
|
|
28
|
+
"default": "./dist/helpers/network/index.js"
|
|
29
|
+
},
|
|
26
30
|
"./components": {
|
|
27
31
|
"types": "./dist/components/index.d.ts",
|
|
28
32
|
"default": "./dist/components/index.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"networkRequestPolicy.d.ts","sourceRoot":"","sources":["../../src/helpers/networkRequestPolicy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,uCAAuC,KAAK,CAAC;AAE1D,eAAO,MAAM,+BAA+B,QACK,CAAC;AAElD,8FAA8F;AAC9F,eAAO,MAAM,iCAAiC,QAAS,CAAC;AAExD,8EAA8E;AAC9E,eAAO,MAAM,iCAAiC,8BAA8B,CAAC;AAE7E,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAEhE;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAIhD;AAED,4FAA4F;AAC5F,wBAAgB,uBAAuB,CAAC,mBAAmB,CAAC,EAAE,MAAM,GAAG,MAAM,CAS5E;AAED,MAAM,MAAM,kCAAkC,GAAG;IAC/C,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,uBAAuB,EAAE,MAAM,IAAI,CAAC;IACpC,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iCAAiC,CAC/C,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,kCAAkC,GAC5C,MAAM,IAAI,CAuCZ;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iBAAiB,EAAE,MAAM,OAAO,CAAC;CAClC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,YAAY,EAAE,WAAW,EACzB,UAAU,GAAE,MAAwC,GACnD,qBAAqB,CAqCvB"}
|
|
File without changes
|
|
File without changes
|