@mxenabled/web-widget-sdk
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -734,3 +734,3 @@ define(['exports'], (function (exports) { 'use strict'; | ||
if (!widgetContainer) { | ||
throw new Error(`Unable to find widget container: ${this.options.widgetContainer}`); | ||
throw new Error(`Unable to find widget container. Ensure that an element matching a selector for '${this.options.widgetContainer}' is available in the DOM before you initialize the widget.`); | ||
} | ||
@@ -743,3 +743,3 @@ this.widgetContainer = widgetContainer; | ||
else { | ||
throw new Error("Invalid value for widgetContainer property, expecting a string or an Element"); | ||
throw new Error("Invalid or missing value for widgetContainer property, expecting a query selector string or a DOM Element."); | ||
} | ||
@@ -753,3 +753,3 @@ this.setupIframe(); | ||
} | ||
throw new Error("Missing required widgetType option"); | ||
throw new Error("Missing value for widgetType property, expecting a string (eg. connect_widget)."); | ||
} | ||
@@ -756,0 +756,0 @@ get dispatcher() { |
@@ -736,3 +736,3 @@ 'use strict'; | ||
if (!widgetContainer) { | ||
throw new Error(`Unable to find widget container: ${this.options.widgetContainer}`); | ||
throw new Error(`Unable to find widget container. Ensure that an element matching a selector for '${this.options.widgetContainer}' is available in the DOM before you initialize the widget.`); | ||
} | ||
@@ -745,3 +745,3 @@ this.widgetContainer = widgetContainer; | ||
else { | ||
throw new Error("Invalid value for widgetContainer property, expecting a string or an Element"); | ||
throw new Error("Invalid or missing value for widgetContainer property, expecting a query selector string or a DOM Element."); | ||
} | ||
@@ -755,3 +755,3 @@ this.setupIframe(); | ||
} | ||
throw new Error("Missing required widgetType option"); | ||
throw new Error("Missing value for widgetType property, expecting a string (eg. connect_widget)."); | ||
} | ||
@@ -758,0 +758,0 @@ get dispatcher() { |
@@ -732,3 +732,3 @@ function isSsoUrlMethodUrl(props) { | ||
if (!widgetContainer) { | ||
throw new Error(`Unable to find widget container: ${this.options.widgetContainer}`); | ||
throw new Error(`Unable to find widget container. Ensure that an element matching a selector for '${this.options.widgetContainer}' is available in the DOM before you initialize the widget.`); | ||
} | ||
@@ -741,3 +741,3 @@ this.widgetContainer = widgetContainer; | ||
else { | ||
throw new Error("Invalid value for widgetContainer property, expecting a string or an Element"); | ||
throw new Error("Invalid or missing value for widgetContainer property, expecting a query selector string or a DOM Element."); | ||
} | ||
@@ -751,3 +751,3 @@ this.setupIframe(); | ||
} | ||
throw new Error("Missing required widgetType option"); | ||
throw new Error("Missing value for widgetType property, expecting a string (eg. connect_widget)."); | ||
} | ||
@@ -754,0 +754,0 @@ get dispatcher() { |
{ | ||
"name": "@mxenabled/web-widget-sdk", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "MX Web Widget SDK", | ||
@@ -14,8 +14,9 @@ "files": [ | ||
"clean:dist": "[ -d dist ] && rm -r dist || true", | ||
"compile": "npm run compile:sdk && npm run compile:cypress", | ||
"compile": "npm run compile:sdk && npm run compile:cypress && npm run compile:jest", | ||
"compile:sdk": "tsc --outDir build", | ||
"compile:cypress": "tsc --noEmit --types cypress,node $(find cypress -type f -name *.ts)", | ||
"compile:jest": "tsc --noEmit --types jest,node $(find jest -type f -name *.ts)", | ||
"format": "npm run prettier -- -w", | ||
"prettier": "prettier src example cypress", | ||
"lint": "eslint src example cypress", | ||
"prettier": "prettier src example jest cypress", | ||
"lint": "eslint src example jest cypress", | ||
"test": "jest --verbose --coverage", | ||
@@ -53,2 +54,3 @@ "test:integration": "start-server-and-test test:server ${PORT:-8089} test:cypress", | ||
"@types/jest": "^27.4.1", | ||
"@types/node-fetch": "^2.6.1", | ||
"@typescript-eslint/eslint-plugin": "^5.16.0", | ||
@@ -63,5 +65,8 @@ "@typescript-eslint/parser": "^5.16.0", | ||
"jest": "^27.5.1", | ||
"msw": "^0.39.2", | ||
"node-fetch": "^3.2.3", | ||
"npm-watch": "^0.11.0", | ||
"prettier": "^2.5.1", | ||
"rollup": "^2.70.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"start-server-and-test": "^1.14.0", | ||
@@ -110,6 +115,12 @@ "ts-node": "^10.7.0", | ||
"jest": { | ||
"testEnvironment": "jsdom", | ||
"collectCoverageFrom": [ | ||
"src/**/**" | ||
], | ||
"setupFiles": [ | ||
"./jest/setup.ts" | ||
], | ||
"setupFilesAfterEnv": [ | ||
"./jest/mocks.ts" | ||
], | ||
"testEnvironment": "jsdom", | ||
"testPathIgnorePatterns": [ | ||
@@ -116,0 +127,0 @@ "<rootDir>/node_modules", |
@@ -157,2 +157,3 @@ # MX Web Widget SDK | ||
[![Integration Tests](https://github.com/mxenabled/web-widget-sdk/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/mxenabled/web-widget-sdk/actions/workflows/integration-tests.yml) | ||
[![Package Audit](https://github.com/mxenabled/web-widget-sdk/actions/workflows/package-audit.yml/badge.svg)](https://github.com/mxenabled/web-widget-sdk/actions/workflows/package-audit.yml) | ||
@@ -159,0 +160,0 @@ [api_request_widget_url]: https://docs.mx.com/api#widgets_mx_widgets_request_widget_url "Request a widget URL" |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
227323
19
3794
162
28
9