@esri/telemetry-amazon 6.0.0-beta.7 → 6.0.0-beta.8
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/dist/esm/index.js +21 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.test.js +30 -0
- package/dist/esm/index.test.js.map +1 -1
- package/dist/node/index.js +21 -13
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.test.js +30 -0
- package/dist/node/index.test.js.map +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/types.d.ts +5 -0
- package/dist/umd/telemetry-amazon.js +21 -13
- package/dist/umd/telemetry-amazon.js.map +1 -1
- package/dist/umd/telemetry-amazon.min.js +21 -13
- package/dist/umd/telemetry-amazon.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -2260,6 +2260,8 @@
|
|
|
2260
2260
|
};
|
|
2261
2261
|
}
|
|
2262
2262
|
|
|
2263
|
+
// October 31, 2026
|
|
2264
|
+
const PINPOINT_RETIREMENT_CUTOFF_UTC_MS = Date.parse('2026-10-31T00:00:00.000Z');
|
|
2263
2265
|
/**
|
|
2264
2266
|
* Amazon Telemetry
|
|
2265
2267
|
* Supports Pinpoint and Esri endpoint modes
|
|
@@ -2269,10 +2271,17 @@
|
|
|
2269
2271
|
this.name = 'amazon';
|
|
2270
2272
|
this.previousPage = {};
|
|
2271
2273
|
this.isInitialized = false;
|
|
2274
|
+
this.appConfig = {};
|
|
2275
|
+
this.isPinpointRetired = (nowMs = Date.now()) => nowMs >= PINPOINT_RETIREMENT_CUTOFF_UTC_MS;
|
|
2272
2276
|
// default to `esri` mode if not specified
|
|
2273
2277
|
const { app = {}, fips, userPoolID, mode = 'esri' } = options;
|
|
2274
|
-
this
|
|
2275
|
-
|
|
2278
|
+
Object.assign(this, options);
|
|
2279
|
+
this.appConfig = app;
|
|
2280
|
+
this.userPoolIDConfig = userPoolID;
|
|
2281
|
+
this.fipsConfig = fips;
|
|
2282
|
+
/** @deprecated Pinpoint is retiring on October 31, 2026. After this point all traffic will be routed to the in-house endpoint */
|
|
2283
|
+
if (mode === 'pinpoint' && !this.isPinpointRetired()) {
|
|
2284
|
+
this.mode = 'pinpoint';
|
|
2276
2285
|
this.analytics = analyticsLib({
|
|
2277
2286
|
app: app.name,
|
|
2278
2287
|
version: app.version,
|
|
@@ -2284,18 +2293,17 @@
|
|
|
2284
2293
|
}),
|
|
2285
2294
|
],
|
|
2286
2295
|
});
|
|
2296
|
+
return;
|
|
2287
2297
|
}
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
}
|
|
2298
|
-
Object.assign(this, options);
|
|
2298
|
+
this.mode = 'esri';
|
|
2299
|
+
this.analytics = createEsriPlugin({
|
|
2300
|
+
trackerName: this.name,
|
|
2301
|
+
appName: this.appConfig.name,
|
|
2302
|
+
appVersion: this.appConfig.version,
|
|
2303
|
+
appId: this.appConfig.id,
|
|
2304
|
+
userPoolID: this.userPoolIDConfig,
|
|
2305
|
+
fips: this.fipsConfig,
|
|
2306
|
+
});
|
|
2299
2307
|
}
|
|
2300
2308
|
init() {
|
|
2301
2309
|
// if already initialized, return
|