@shopgate/pwa-core 7.30.3 → 7.31.0-alpha.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.
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import { logger, hasSGJavaScriptBridge } from "../../helpers";
2
3
  import { isValidVersion, getLibVersion, isVersionAtLeast } from "../../helpers/version";
3
4
  import logGroup from "../../helpers/logGroup";
@@ -26,7 +26,7 @@ jest.mock("../../helpers/logGroup", () => function logGroup(...args) {
26
26
  });
27
27
  let mockedBridgeDispatch = jest.fn();
28
28
 
29
- /* eslint-disable require-jsdoc, class-methods-use-this */
29
+ /* eslint-disable class-methods-use-this */
30
30
  jest.mock("../DevServerBridge", () => {
31
31
  let DevServerBridge = /*#__PURE__*/function () {
32
32
  function DevServerBridge() {}
@@ -41,7 +41,7 @@ jest.mock("../DevServerBridge", () => {
41
41
  default: DevServerBridge
42
42
  };
43
43
  });
44
- /* eslint-enable require-jsdoc, class-methods-use-this */
44
+ /* eslint-enable class-methods-use-this */
45
45
 
46
46
  // Mock of the client information web storage.
47
47
  let mockedClientInformation = null;
@@ -1,4 +1,5 @@
1
1
  import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
2
+ import "core-js/modules/es.array.includes.js";
2
3
  import AppPermissionsRequest from "./AppPermissionsRequest";
3
4
  import { availablePermissionsIds } from "../../constants/AppPermissions";
4
5
  import { COMMAND_GET_APP_PERMISSIONS } from "../../constants/AppCommands";
@@ -1,4 +1,5 @@
1
1
  import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
2
+ import "core-js/modules/es.array.includes.js";
2
3
  import AppPermissionsRequest from "./AppPermissionsRequest";
3
4
  import { availablePermissionsIds } from "../../constants/AppPermissions";
4
5
  import { COMMAND_REQUEST_APP_PERMISSIONS } from "../../constants/AppCommands";
@@ -1,5 +1,5 @@
1
1
  /* global SGJavascriptBridge */
2
- import { useBrowserConnector, hasSGJavaScriptBridge } from "../../helpers";
2
+ import { useBrowserConnector as hasBrowserConnector, hasSGJavaScriptBridge } from "../../helpers";
3
3
  import BrowserConnector from "../BrowserConnector";
4
4
  import DevServerBridge from "../DevServerBridge";
5
5
 
@@ -12,7 +12,7 @@ let Bridge = /*#__PURE__*/function () {
12
12
  * Initializes the Bridge.
13
13
  */
14
14
  function Bridge() {
15
- if (useBrowserConnector()) {
15
+ if (hasBrowserConnector()) {
16
16
  this.bridge = new BrowserConnector();
17
17
  } else if (hasSGJavaScriptBridge()) {
18
18
  this.bridge = SGJavascriptBridge;
@@ -1,4 +1,5 @@
1
1
  import _createClass from "@babel/runtime/helpers/createClass";
2
+ import "core-js/modules/es.array.includes.js";
2
3
  import { logger } from "../../helpers";
3
4
  import event from "../Event";
4
5
  import { TYPE_TRUSTED } from "../../constants/Pipeline";
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import { logger } from "../../helpers";
2
3
  import event from "../Event";
3
4
 
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import DevServerBridge from "./index";
2
3
 
3
4
  // A libVersion for the bridge method calls
@@ -1,4 +1,5 @@
1
1
  import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
2
+ import "core-js/modules/es.array.includes.js";
2
3
  import EventEmitter from 'events';
3
4
  import { logger } from "../../helpers";
4
5
  const HANDLER_ADD = 'add';
@@ -1,4 +1,5 @@
1
1
  import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
2
+ import "core-js/modules/es.array.includes.js";
2
3
  import { logger } from "../../helpers";
3
4
  import logGroup from "../../helpers/logGroup";
4
5
  import event from "../Event";
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import AppCommand from "../AppCommand";
2
3
  import event from "../Event";
3
4
  import errorManager from "../ErrorManager";
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  /* eslint-disable extra-rules/no-single-line-objects */
2
3
  import logGroup from "../../helpers/logGroup";
3
4
  // eslint-disable-next-line import/named
@@ -1,4 +1,5 @@
1
1
  import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
2
+ import "core-js/modules/es.array.includes.js";
2
3
  import Request from "../Request";
3
4
  import pipelineManager from "../PipelineManager";
4
5
  import { CURRENT_VERSION } from "../../constants/Pipeline";
@@ -1,5 +1,6 @@
1
1
  import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
+ import "core-js/modules/es.array.includes.js";
3
4
  import { logger } from "../../helpers";
4
5
  import * as errorHandleTypes from "../../constants/ErrorHandleTypes";
5
6
  import * as processTypes from "../../constants/ProcessTypes";
@@ -3,7 +3,7 @@ import Request from "../Request";
3
3
  import RequestManager from '.';
4
4
  import { PROCESS_ANY, PROCESS_LAST_REQUEST, PROCESS_FIRST_RESPONSE, PROCESS_SEQUENTIALLY, PROCESS_ORDERED_REQUEST, PROPAGATE_REJECT, PROPAGATE_SINGLE } from "../../constants/RequestManagerModes";
5
5
 
6
- /* eslint-disable require-jsdoc, no-unused-vars, class-methods-use-this */
6
+ /* eslint-disable no-unused-vars, class-methods-use-this */
7
7
  let SuccessfulRequest = /*#__PURE__*/function (_Request) {
8
8
  function SuccessfulRequest(manager, payload = 42, timeout = 1000) {
9
9
  var _this;
@@ -51,7 +51,7 @@ let NeverResolvingRequest = /*#__PURE__*/function (_Request3) {
51
51
  };
52
52
  return NeverResolvingRequest;
53
53
  }(Request);
54
- /* eslint-enable require-jsdoc, no-unused-vars, class-methods-use-this */
54
+ /* eslint-enable no-unused-vars, class-methods-use-this */
55
55
  describe.skip('RequestManager', () => {
56
56
  jest.useFakeTimers();
57
57
  let timestamp = 0;
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import { logger } from "../../helpers";
2
3
  import { isLibVersionAtLeast } from "../../helpers/version";
3
4
  import ScannerEvent from "../ScannerEvent";
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import { logger } from "../../helpers";
2
3
  import AppScanner from "../Scanner";
3
4
 
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import { logger } from "../../helpers";
2
3
  import event from "../Event";
3
4
  import registerEvents from "../../commands/registerEvents";
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import AppCommand from "../classes/AppCommand";
2
3
  import { logger } from "../helpers";
3
4
 
package/helpers/index.js CHANGED
@@ -16,7 +16,6 @@ const convertLogArgs = args => {
16
16
 
17
17
  /**
18
18
  * The logging wrapper for the console.
19
- * @type {Object}
20
19
  */
21
20
  export const logger = {
22
21
  ...console,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-core",
3
- "version": "7.30.3",
3
+ "version": "7.31.0-alpha.1",
4
4
  "description": "Core library for the Shopgate Connect PWA.",
5
5
  "author": "Support <support@shopgate.com>",
6
6
  "license": "Apache-2.0",
@@ -14,6 +14,9 @@
14
14
  "shopgate",
15
15
  "connect"
16
16
  ],
17
+ "devDependencies": {
18
+ "@types/lodash": "^4.17.24"
19
+ },
17
20
  "dependencies": {
18
21
  "crypto-js": "3.1.9-1",
19
22
  "detector": "^2.5.0",