@mhubcloud/tms_core 3.0.0 → 3.0.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -53,7 +53,6 @@ __export(utils_exports, {
53
53
  });
54
54
  var crypto = __toESM(require("crypto"));
55
55
  var appInsights = __toESM(require("applicationinsights"));
56
- var import_node_fetch = __toESM(require("node-fetch"));
57
56
  var aiClient = null;
58
57
  if (process.env.APPINSIGHTS_INSTRUMENTATIONKEY) {
59
58
  appInsights.setup().setAutoCollectDependencies(false).setAutoCollectConsole(true, true).setSendLiveMetrics(false).setAutoCollectRequests(false).setAutoCollectPerformance(false).setUseDiskRetryCaching(false).start();
@@ -199,7 +198,7 @@ async function handlePlatformRequest({
199
198
  // eslint-disable-next-line @typescript-eslint/naming-convention
200
199
  headers: { ...requestOptions.headers }
201
200
  };
202
- const rawPlatformResponse = await (0, import_node_fetch.default)(fullUrl, fetchRequestOptions);
201
+ const rawPlatformResponse = await fetch(fullUrl, fetchRequestOptions);
203
202
  if (process.env.PUBLISHER_TESTURL) {
204
203
  await handleTestRequest({
205
204
  fetchRequestOptions,
@@ -228,7 +227,7 @@ async function handleTestRequest(params) {
228
227
  // eslint-disable-next-line @typescript-eslint/naming-convention
229
228
  "x-mhub-orig-response-status-message": params.rawPlatformResponse.statusText
230
229
  };
231
- await (0, import_node_fetch.default)(
230
+ await fetch(
232
231
  `${process.env.PUBLISHER_TESTURL ?? ""} + ${params.query ?? ""}`,
233
232
  params.fetchRequestOptions
234
233
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhubcloud/tms_core",
3
- "version": "3.0.0",
3
+ "version": "3.0.1-beta.0",
4
4
  "description": "Core function for mHub Cloud TMS publishers",
5
5
  "homepage": "https://mhubcloud.com/",
6
6
  "license": "Apache 2.0",
@@ -18,14 +18,12 @@
18
18
  "dependencies": {
19
19
  "@azure/data-tables": "^13.2.2",
20
20
  "ajv": "^8.12.0",
21
- "applicationinsights": "^2.6.0",
22
- "node-fetch": "^2.6.11"
21
+ "applicationinsights": "^2.6.0"
23
22
  },
24
23
  "devDependencies": {
25
24
  "@azure/functions": "^3.5.1",
26
25
  "@tsconfig/recommended": "^1.0.2",
27
26
  "@types/node": "^18.16.14",
28
- "@types/node-fetch": "^2.6.4",
29
27
  "@typescript-eslint/eslint-plugin": "^5.59.7",
30
28
  "@typescript-eslint/parser": "^5.59.7",
31
29
  "eslint": "^8.41.0",
@@ -1,5 +1,4 @@
1
1
  import { HttpMethod, Logger } from '@azure/functions';
2
- import { BodyInit } from 'node-fetch';
3
2
  import { TypeSafeObject } from './UtilTypes';
4
3
 
5
4
  export interface PlatformPublisher {
@@ -15,6 +14,6 @@ export interface PlatformPublisher {
15
14
 
16
15
  export interface PlatformRequestOptions {
17
16
  method: HttpMethod | undefined;
18
- body?: BodyInit | undefined;
17
+ body?: any | undefined;
19
18
  headers?: Record<string, string>;
20
19
  }
@@ -5,7 +5,6 @@ import {
5
5
  SeverityLevel,
6
6
  Telemetry,
7
7
  } from 'applicationinsights/out/Declarations/Contracts';
8
- import fetch, { RequestInit, Response } from 'node-fetch';
9
8
  import { EventPublisherBaseClass } from '../types/EventPublisher';
10
9
  import { PlatformRequestOptions } from '../types/PlatformPublisher';
11
10
  import { TypeSafeObject } from '../types/UtilTypes';