hosted-fields-sdk 1.2.5 → 1.2.7
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/CHANGES.md +6 -0
- package/README.md +19 -13
- package/dist/esm/index.js +1 -0
- package/dist/esm/sdk/api/actions.js +1 -0
- package/dist/esm/sdk/api/index.js +1 -0
- package/dist/esm/sdk/model/field/index.js +1 -0
- package/package.json +20 -5
package/CHANGES.md
CHANGED
package/README.md
CHANGED
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
Hosted fields SDK is a toolkit that allows you generate a form/set of fields. It is published as a node-module to the public [npm registry](https://www.npmjs.com/package/hosted-fields-sdk).
|
|
4
4
|
|
|
5
5
|
> [!CAUTION]
|
|
6
|
-
> **Migration and Deprecation Notice:** Starting from version 1.0.50, it is mandatory to use the `'https://card-fields.paymentiq.io/1.0.
|
|
6
|
+
> **Migration and Deprecation Notice:** Starting from version 1.0.50, it is mandatory to use the `'https://card-fields.paymentiq.io/1.0.51/index.html'` as `hostedfieldsurl` value for **production** environments. Please update your configurations accordingly to avoid potential disruptions.
|
|
7
7
|
>
|
|
8
|
-
> The old hostedfieldsurl: `'https://hostedpages.paymentiq.io/1.0.
|
|
8
|
+
> The old hostedfieldsurl: `'https://hostedpages.paymentiq.io/1.0.51/index.html'` and well as *all versions previous to 1.0.50* **will be deprecated starting 15 March 2025**. Please note that using older versions and the old domain may expose your system to potential risks.
|
|
9
9
|
>
|
|
10
10
|
> This change is meant to enhance security and future compliance with the new requirements in the Payment Card Industry Data Security Standards. The old domain is scheduled for deprecation. We advise all users to transition to the new domain as soon as possible to maintain compliance and benefit from improved security measures.
|
|
11
11
|
>
|
|
12
12
|
> Obs. **The new domain supports versions starting with 1.0.50 and above.** Make sure your implementation is updated to at least this version to ensure compatibility.
|
|
13
|
+
>
|
|
14
|
+
|
|
13
15
|
|
|
14
16
|
## Demo
|
|
15
17
|
[[Live demo](https://codesandbox.io/s/dry-fire-q9txy?file=/src/App.js:5219-5240)]
|
|
@@ -85,7 +87,7 @@ Setup is the first function you will call. It takes a config-object as its only
|
|
|
85
87
|
````
|
|
86
88
|
{
|
|
87
89
|
merchantId: 123456789,
|
|
88
|
-
hostedfieldsurl: 'https://card-fields.paymentiq.io/1.0.
|
|
90
|
+
hostedfieldsurl: 'https://card-fields.paymentiq.io/1.0.51/index.html',
|
|
89
91
|
fields: my_fields, //fields you've generated using the Field-constructor
|
|
90
92
|
renderMode: 'single', // defaults to 'multiple', separate iframes per field
|
|
91
93
|
service: 'payment_method_service', // service of the payment method. Not mandatory (AstropayCard requires this)
|
|
@@ -97,12 +99,14 @@ Setup is the first function you will call. It takes a config-object as its only
|
|
|
97
99
|
}
|
|
98
100
|
````
|
|
99
101
|
|
|
102
|
+
Setup will first set the base values. After that it will loop through the fields you've passed in and create an iframe for each one.
|
|
103
|
+
|
|
100
104
|
#### renderMode
|
|
101
105
|
|
|
102
106
|
Choose if all fields should be returned in a single iframe (`single`) or separate iframes (`multiple`). Defaults to `multiple` for backwards compability.
|
|
103
107
|
|
|
104
108
|
#### autoFocusNext
|
|
105
|
-
|
|
109
|
+
Hosted-fields can support to auto focus on the next field when a valid value has been entered. E.g when the user has entered their creditcard number, focus will automatically be put on expiry and then on to cvc.
|
|
106
110
|
|
|
107
111
|
Defaults to `false`.
|
|
108
112
|
|
|
@@ -119,15 +123,17 @@ loaded, allowing you to display some kind of loader until this callback has been
|
|
|
119
123
|
|
|
120
124
|
**Possible values for hostedfieldsurl:**
|
|
121
125
|
|
|
122
|
-
For test environments use: `'https://test-hostedpages.paymentiq.io/1.0.
|
|
126
|
+
For test environments use: `'https://test-hostedpages.paymentiq.io/1.0.51/index.html'`.
|
|
127
|
+
|
|
128
|
+
For production environments use `'https://card-fields.paymentiq.io/1.0.51/index.html'`.
|
|
123
129
|
|
|
124
|
-
|
|
130
|
+
**Available versions for `'https://card-fields.paymentiq.io/1.0.51/index.html'`(where the part 1.0.51 represents the version number):**
|
|
131
|
+
- 1.0.51
|
|
132
|
+
- 1.0.50
|
|
125
133
|
|
|
126
134
|
> [!WARNING]
|
|
127
|
-
> Please note that **previous versions
|
|
128
|
-
> For previos versions we use: `'https://hostedpages.paymentiq.io/1.0.50/index.html'` where the part 1.0.50 represents the version number.
|
|
135
|
+
> Please note that **previous versions**(older than 1.0.50), as well as old domain name ***hostedpages* will be deprecated and must be updated by 15 March 2025**.
|
|
129
136
|
|
|
130
|
-
Setup will first set the base values. After that it will loop through the fields you've passed in and create an iframe for each one.
|
|
131
137
|
|
|
132
138
|
**get**
|
|
133
139
|
|
|
@@ -227,7 +233,7 @@ let fields = fieldConfig.map(conf => {
|
|
|
227
233
|
````
|
|
228
234
|
HostedFields.setup({
|
|
229
235
|
merchantId: 123456789,
|
|
230
|
-
hostedfieldsurl: 'https://card-fields.paymentiq.io/1.0.
|
|
236
|
+
hostedfieldsurl: 'https://card-fields.paymentiq.io/1.0.51/index.html',
|
|
231
237
|
fields: fields,
|
|
232
238
|
service: 'some service',
|
|
233
239
|
styles: '* .hosted-input-container .input-container input { color: green; }',
|
|
@@ -374,7 +380,7 @@ let fields = fieldConfig.map(conf => {
|
|
|
374
380
|
|
|
375
381
|
HostedFields.setup({
|
|
376
382
|
merchantId: 123456789,
|
|
377
|
-
hostedfieldsurl: 'https://card-fields.paymentiq.io/1.0.
|
|
383
|
+
hostedfieldsurl: 'https://card-fields.paymentiq.io/1.0.51/index.html',
|
|
378
384
|
fields: fields,
|
|
379
385
|
service: 'some service',
|
|
380
386
|
styles: '.hosted-input-container .input-container input { color: red; }',
|
|
@@ -400,7 +406,7 @@ Overview of Change:
|
|
|
400
406
|
We have recently updated the domain used for our card fields to enhance security and compliance with current standards. The old domain, while PCI DSS compliant, is scheduled for deprecation. We advise all users to transition to the new domain as soon as possible to maintain compliance and benefit from improved security measures.
|
|
401
407
|
|
|
402
408
|
#### New Domain:
|
|
403
|
-
Domain: `card-fields.paymentiq.io/1.0.
|
|
409
|
+
Domain: `card-fields.paymentiq.io/1.0.51/`
|
|
404
410
|
|
|
405
411
|
#### Compatibility Note:
|
|
406
412
|
Supported Versions: This domain supports versions starting with 1.0.50 and above. Make sure your implementation is updated to at least this version to ensure compatibility.
|
|
@@ -414,7 +420,7 @@ Upgrade Your Version: Ensure your integration uses version 1.0.50 or later.
|
|
|
414
420
|
Migrate to the New Domain: Begin using the new domain by updating your configurations accordingly.
|
|
415
421
|
|
|
416
422
|
#### Deprecation Timeline:
|
|
417
|
-
Old Domain: The old domain will be deprecated on
|
|
423
|
+
Old Domain: The old domain will be deprecated on 15 March, after which it will no longer be supported.
|
|
418
424
|
|
|
419
425
|
#### Additional Notes:
|
|
420
426
|
Reach out to our support team if you encounter any issues during the transition or require further assistance.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{HostedFields}from"./sdk/api";export{Field,FieldTypes}from"./sdk/model/field/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import _typeof from"@babel/runtime/helpers/typeof";var actions={get:"get",setupContent:"setupContent",setupSingleIframeContent:"setupSingleIframeContent",formData:"formData",formSubmit:"formSubmit"};function _getGlobalObject(){try{if(global)return global}catch(_){try{if(window)return window}catch(_){return this}}}Object.freeze(_get__("actions"));var _RewireModuleId__=null;function _getRewireModuleId__(){var _;return null===_RewireModuleId__&&((_=_getGlobalObject()).__$$GLOBAL_REWIRE_NEXT_MODULE_ID__||(_.__$$GLOBAL_REWIRE_NEXT_MODULE_ID__=0),_RewireModuleId__=__$$GLOBAL_REWIRE_NEXT_MODULE_ID__++),_RewireModuleId__}function _getRewireRegistry__(){var _=_getGlobalObject();return _.__$$GLOBAL_REWIRE_REGISTRY__||(_.__$$GLOBAL_REWIRE_REGISTRY__=Object.create(null)),_.__$$GLOBAL_REWIRE_REGISTRY__}function _getRewiredData__(){var _=_getRewireModuleId__(),e=_getRewireRegistry__(),t=e[_];return t||(e[_]=Object.create(null),t=e[_]),t}(()=>{var _=_getGlobalObject();_.__rewire_reset_all__||(_.__rewire_reset_all__=function(){_.__$$GLOBAL_REWIRE_REGISTRY__=Object.create(null)})})();var INTENTIONAL_UNDEFINED="__INTENTIONAL_UNDEFINED__",_RewireAPI__={};function _get__(_){var e=_getRewiredData__();return void 0===e[_]?_get_original__(_):(e=e[_])!==INTENTIONAL_UNDEFINED?e:void 0}function _get_original__(_){if("actions"===_)return actions}function _assign__(_,e){var t=_getRewiredData__();return void 0===t[_]?_set_original__(_,e):t[_]=e}function _set_original__(_,e){_}function _update_operation__(_,e,t){var r=_get__(e),_="++"===_?r+1:r-1;return _assign__(e,_),t?_:r}function _set__(e,_){var t=_getRewiredData__();return"object"===_typeof(e)?(Object.keys(e).forEach(function(_){t[_]=e[_]}),function(){Object.keys(e).forEach(function(_){_reset__(e)})}):(t[e]=void 0===_?INTENTIONAL_UNDEFINED:_,function(){_reset__(e)})}function _reset__(_){var e=_getRewiredData__();delete e[_],0==Object.keys(e).length&&delete _getRewireRegistry__()[_getRewireModuleId__]}function _with__(e){var t=_getRewiredData__(),r=Object.keys(e),n={};function i(){r.forEach(function(_){t[_]=n[_]})}return function(_){r.forEach(function(_){n[_]=t[_],t[_]=e[_]});_=_();return _&&"function"==typeof _.then?_.then(i).catch(i):i(),_}}(()=>{function _(_,e){Object.defineProperty(_RewireAPI__,_,{value:e,enumerable:!1,configurable:!0})}_("__get__",_get__),_("__GetDependency__",_get__),_("__Rewire__",_set__),_("__set__",_set__),_("__reset__",_reset__),_("__ResetDependency__",_reset__),_("__with__",_with__)})();export default _RewireAPI__;export{actions,_get__ as __get__,_get__ as __GetDependency__,_set__ as __Rewire__,_set__ as __set__,_reset__ as __ResetDependency__,_RewireAPI__ as __RewireAPI__};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import _typeof from"@babel/runtime/helpers/typeof";import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var merchantId,renderMode,fields,hostedfieldsurl,service,styles,_excluded=["errors"],_excluded2=["errors"];function ownKeys(t,e){var _,r=Object.keys(t);return Object.getOwnPropertySymbols&&(_=Object.getOwnPropertySymbols(t),e&&(_=_.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,_)),r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var _=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(_),!0).forEach(function(e){_defineProperty(t,e,_[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(_)):ownKeys(Object(_)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(_,e))})}return t}import{actions}from"./actions";var el,callback,onLoadCallback,autoFocusNext,targets=[],responses=[],onLoadCounter=0,window=document.parentWindow||document.defaultView;function setup(e){_assign__("merchantId",e.merchantId),_assign__("renderMode",e.renderMode),_assign__("hostedfieldsurl",e.hostedfieldsurl),_assign__("fields",e.fields),_assign__("service",e.service),_assign__("styles",e.styles),_assign__("callback",e.callback),_assign__("onLoadCallback",e.onLoadCallback),_assign__("autoFocusNext",e.autoFocusNext||!1),_assign__("el",e.el),(_get__("renderMode")&&"single"===_get__("renderMode")?_get__("registerSingleIframe"):_get__("registerIframes"))()}function validateOrigin(e){return-1<[e,"https://test-hostedpages.paymentiq.io","https://hostedpages.paymentiq.io","https://card-fields.paymentiq.io"].indexOf(e)}function get(){_get__("targets").forEach(function(e){e.target.postMessage({action:_get__("actions").get,merchantId:_get__("merchantId"),id:e.id},_get__("hostedfieldsurl"))})}function reset(){_assign__("targets",[])}function destroyContent(){_assign__("merchantId",null),_assign__("fields",null),_assign__("hostedfieldsurl",null),_assign__("service",null),_assign__("styles",null),_assign__("targets",[]),_assign__("responses",[]),_assign__("el",null),_assign__("callback",null),_assign__("onLoadCallback",null),_assign__("onLoadCounter",0)}function registerIframes(){_assign__("targets",_get__("targets").concat(_get__("fields").map(function(e){return _get__("initIframe")(e)})))}function registerSingleIframe(){_assign__("targets",_get__("initSingleIframe")())}function eventHandler(e){if(_get__("validateOrigin")(e.origin))switch(e.data.action){case _get__("actions").formData:_get__("responses").push({id:e.data.id,data:e.data.formData}),_get__("sendCallback")();break;case _get__("actions").formSubmit:_get__("get")()}else console.error("Received message from invalid origin",e.origin)}function sendCallback(){var t,_=_get__("responses").map(function(e){return e.id}),e=_get__("targets").map(function(e){return e.id});_.length===e.length&&(t=!0,e.forEach(function(e){t=_.includes(e)}),t)&&(e=_get__("responses").reduce(function(e,t){var _=e.errors,e=_objectWithoutProperties(e,_excluded),t=t.data,r=t.errors,t=_objectWithoutProperties(t,_excluded2),e=_objectSpread(_objectSpread({},e),t),t=_objectSpread(_objectSpread({},_),r);return 0<Object.keys(t).length&&(e.errors=t),e},{}),_assign__("responses",[]),_get__("callback")()(e))}function initIframe(e){var t=document.createElement("iframe"),_=(t.id="hosted-field-"+e.id,t.name="hosted-field-"+e.id,t.src=_get__("hostedfieldsurl")+"?mid="+_get__("merchantId"),document.querySelector(_get__("el"))),r=document.createElement("div");r.id="hosted-field-container-"+e.id,r.className="hosted-field-container";try{r.appendChild(t),_.appendChild(r);var n=document.querySelector("#"+t.id).contentWindow;return t.onload=_get__("createIframeProxy").bind(this,e,n),{id:t.id,target:n}}catch(e){console.log(e),_get__("onLoadCallback")()()}}function createIframeProxy(e,t){var _={};_[e.name]=e,_get__("window").addEventListener("message",_get__("eventHandler"),!1),t.postMessage({action:_get__("actions").setupContent,styles:_get__("styles"),fields:_,service:_get__("service")},_get__("hostedfieldsurl")),_update_operation__("++","onLoadCounter",!1),_get__("onLoadCounter")===_get__("fields").length&&_get__("onLoadCallback")&&(_get__("onLoadCallback")()(),_assign__("onLoadCounter",0))}function initSingleIframe(){var e=document.createElement("iframe"),t=(e.id="hosted-field-single-iframe",e.name="hosted-field-single-iframe",e.src=_get__("hostedfieldsurl")+"?mid="+_get__("merchantId"),document.querySelector(_get__("el"))),_=document.createElement("div");_.id="hosted-field-container-single-iframe",_.className="hosted-field-container";try{_.appendChild(e),t.appendChild(_);var r=document.querySelector("#hosted-field-single-iframe").contentWindow;return e.onload=_get__("createSingleIframeProxy").bind(this,_get__("fields"),r),[{id:e.id,target:r}]}catch(e){console.log(e),_get__("onLoadCallback")()()}}function createSingleIframeProxy(e,t){var _={};e.forEach(function(e){_[e.name]=e}),_get__("window").addEventListener("message",_get__("eventHandler"),!1),t.postMessage({action:_get__("actions").setupSingleIframeContent,styles:_get__("styles"),fields:_,service:_get__("service"),settings:{autoFocusNext:_get__("autoFocusNext")}},_get__("hostedfieldsurl")),_get__("onLoadCallback")()()}var HostedFields={setup:_get__("setup"),get:_get__("get"),reset:_get__("reset")};function _getGlobalObject(){try{if(global)return global}catch(e){try{if(window)return window}catch(e){return this}}}var _RewireModuleId__=null;function _getRewireModuleId__(){var e;return null===_RewireModuleId__&&((e=_getGlobalObject()).__$$GLOBAL_REWIRE_NEXT_MODULE_ID__||(e.__$$GLOBAL_REWIRE_NEXT_MODULE_ID__=0),_RewireModuleId__=__$$GLOBAL_REWIRE_NEXT_MODULE_ID__++),_RewireModuleId__}function _getRewireRegistry__(){var e=_getGlobalObject();return e.__$$GLOBAL_REWIRE_REGISTRY__||(e.__$$GLOBAL_REWIRE_REGISTRY__=Object.create(null)),e.__$$GLOBAL_REWIRE_REGISTRY__}function _getRewiredData__(){var e=_getRewireModuleId__(),t=_getRewireRegistry__(),_=t[e];return _||(t[e]=Object.create(null),_=t[e]),_}(()=>{var e=_getGlobalObject();e.__rewire_reset_all__||(e.__rewire_reset_all__=function(){e.__$$GLOBAL_REWIRE_REGISTRY__=Object.create(null)})})();var INTENTIONAL_UNDEFINED="__INTENTIONAL_UNDEFINED__",_RewireAPI__={};function _get__(e){var t=_getRewiredData__();return void 0===t[e]?_get_original__(e):(t=t[e])!==INTENTIONAL_UNDEFINED?t:void 0}function _get_original__(e){switch(e){case"merchantId":return merchantId;case"renderMode":return renderMode;case"hostedfieldsurl":return hostedfieldsurl;case"fields":return fields;case"service":return service;case"styles":return styles;case"callback":return callback;case"onLoadCallback":return onLoadCallback;case"autoFocusNext":return autoFocusNext;case"el":return el;case"registerSingleIframe":return registerSingleIframe;case"registerIframes":return registerIframes;case"targets":return targets;case"actions":return actions;case"responses":return responses;case"onLoadCounter":return onLoadCounter;case"initIframe":return initIframe;case"initSingleIframe":return initSingleIframe;case"validateOrigin":return validateOrigin;case"sendCallback":return sendCallback;case"get":return get;case"createIframeProxy":return createIframeProxy;case"window":return window;case"eventHandler":return eventHandler;case"createSingleIframeProxy":return createSingleIframeProxy;case"setup":return setup;case"reset":return reset}}function _assign__(e,t){var _=_getRewiredData__();return void 0===_[e]?_set_original__(e,t):_[e]=t}function _set_original__(e,t){switch(e){case"merchantId":return merchantId=t;case"renderMode":return renderMode=t;case"hostedfieldsurl":return hostedfieldsurl=t;case"fields":return fields=t;case"service":return service=t;case"styles":return styles=t;case"callback":return callback=t;case"onLoadCallback":return onLoadCallback=t;case"autoFocusNext":return autoFocusNext=t;case"el":return el=t;case"targets":return targets=t;case"responses":return responses=t;case"onLoadCounter":return onLoadCounter=t}}function _update_operation__(e,t,_){var r=_get__(t),e="++"===e?r+1:r-1;return _assign__(t,e),_?e:r}function _set__(t,e){var _=_getRewiredData__();return"object"===_typeof(t)?(Object.keys(t).forEach(function(e){_[e]=t[e]}),function(){Object.keys(t).forEach(function(e){_reset__(t)})}):(_[t]=void 0===e?INTENTIONAL_UNDEFINED:e,function(){_reset__(t)})}function _reset__(e){var t=_getRewiredData__();delete t[e],0==Object.keys(t).length&&delete _getRewireRegistry__()[_getRewireModuleId__]}function _with__(t){var _=_getRewiredData__(),r=Object.keys(t),n={};function a(){r.forEach(function(e){_[e]=n[e]})}return function(e){r.forEach(function(e){n[e]=_[e],_[e]=t[e]});e=e();return e&&"function"==typeof e.then?e.then(a).catch(a):a(),e}}(()=>{function e(e,t){Object.defineProperty(_RewireAPI__,e,{value:t,enumerable:!1,configurable:!0})}e("__get__",_get__),e("__GetDependency__",_get__),e("__Rewire__",_set__),e("__set__",_set__),e("__reset__",_reset__),e("__ResetDependency__",_reset__),e("__with__",_with__)})();export default _RewireAPI__;export{HostedFields,_get__ as __get__,_get__ as __GetDependency__,_set__ as __Rewire__,_set__ as __set__,_reset__ as __ResetDependency__,_RewireAPI__ as __RewireAPI__};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import _createClass from"@babel/runtime/helpers/createClass";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";var Field=_createClass(function e(t,i,l,s){var h=4<arguments.length&&void 0!==arguments[4]?arguments[4]:"",a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:"",r=!(6<arguments.length&&void 0!==arguments[6])||arguments[6],o=!(7<arguments.length&&void 0!==arguments[7])||arguments[7],C=8<arguments.length&&void 0!==arguments[8]&&arguments[8],n=9<arguments.length&&void 0!==arguments[9]?arguments[9]:"";_classCallCheck(this,e),this.type=t,this.id=i,this.name=l,this.label=s,this.helpKey=h,this.error=a,this.visible=r,this.required=o,this.noAttributeValueFormatting=C,this.autocomplete=n}),FieldTypes={TEXT:"TEXT",NUMBER:"NUMBER",CVV:"CVV",CREDITCARD_NUMBER:"CREDITCARD_NUMBER",EXPIRY_MM_YYYY:"EXPIRY_MM_YYYY"};export{Field,FieldTypes};
|
package/package.json
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hosted-fields-sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"description": "Hosted fields sdk",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"default": "./dist/index.js",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./esm": {
|
|
13
|
+
"import": "./dist/esm/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
6
16
|
"scripts": {
|
|
7
17
|
"test": "test",
|
|
8
|
-
"
|
|
9
|
-
"build
|
|
10
|
-
"
|
|
18
|
+
"eslint": "eslint src",
|
|
19
|
+
"build": "rimraf dist && npm run eslint && npm run build:cjs && npm run build:esm && npm run uglify",
|
|
20
|
+
"build:cjs": "babel src --out-dir dist --env-name cjs",
|
|
21
|
+
"uglify": "recursive-uglifyjs dist",
|
|
22
|
+
"build:esm": "babel src --out-dir dist/esm --extensions '.js' --env-name esm"
|
|
11
23
|
},
|
|
12
24
|
"devDependencies": {
|
|
13
25
|
"@babel/cli": "^7.26.4",
|
|
@@ -40,5 +52,8 @@
|
|
|
40
52
|
"bugs": {
|
|
41
53
|
"url": "https://github.com/devcode-git/hosted-fields-sdk/issues"
|
|
42
54
|
},
|
|
43
|
-
"homepage": "https://github.com/devcode-git/hosted-fields-sdk#readme"
|
|
55
|
+
"homepage": "https://github.com/devcode-git/hosted-fields-sdk#readme",
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@babel/runtime": "^7.27.0"
|
|
58
|
+
}
|
|
44
59
|
}
|