@amplitude/plugin-global-user-properties 1.2.89 → 1.2.90

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 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amplitude={})}(this,(function(e){"use strict";function t(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{p(r.next(e))}catch(e){u(e)}}function a(e){try{p(r.throw(e))}catch(e){u(e)}}function p(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}p((r=r.apply(e,t||[])).next())}))}function n(e,t){var n,r,o,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(p){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,p])}}}var r,o,u;"function"==typeof SuppressedError&&SuppressedError,function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(r||(r={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue"}(o||(o={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(u||(u={}));var i=new Set(Object.values(u)),a=function(e){var r=this;return void 0===e&&(e={}),{name:"@amplitude/plugin-global-user-properties",type:"enrichment",execute:function(o){return t(r,void 0,void 0,(function(){var t;return n(this,(function(n){return function(e){return!i.has(e.event_type)}(o)||function(e){return e.event_type===u.IDENTIFY}(o)?(t=o.user_properties,e.propertyTransform&&t&&(t=e.propertyTransform(t)),t?(o.global_user_properties=t,e.shouldKeepOriginalUserProperties||delete o.user_properties,[2,o]):[2,o]):[2,o]}))}))}}};e.globalUserPropertiesPlugin=a,e.plugin=a,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amplitude={})}(this,function(e){"use strict";function t(e,t,n,r){return new(n||(n=Promise))(function(o,u){function i(e){try{p(r.next(e))}catch(e){u(e)}}function a(e){try{p(r.throw(e))}catch(e){u(e)}}function p(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,a)}p((r=r.apply(e,t||[])).next())})}function n(e,t){var n,r,o,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(p){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,p])}}}var r,o,u;"function"==typeof SuppressedError&&SuppressedError,function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(r||(r={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue"}(o||(o={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(u||(u={}));var i=new Set(Object.values(u)),a=function(e){var r=this;return void 0===e&&(e={}),{name:"@amplitude/plugin-global-user-properties",type:"enrichment",execute:function(o){return t(r,void 0,void 0,function(){var t;return n(this,function(n){return function(e){return!i.has(e.event_type)}(o)||function(e){return e.event_type===u.IDENTIFY}(o)?(t=o.user_properties,e.propertyTransform&&t&&(t=e.propertyTransform(t)),t?(o.global_user_properties=t,e.shouldKeepOriginalUserProperties||delete o.user_properties,[2,o]):[2,o]):[2,o]})})}}};e.globalUserPropertiesPlugin=a,e.plugin=a,Object.defineProperty(e,"__esModule",{value:!0})});
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amplitude/plugin-global-user-properties",
3
- "version": "1.2.89",
3
+ "version": "1.2.90",
4
4
  "description": "An event enrichment plugin that adds the experimental global user properties field to events",
5
5
  "author": "Amplitude Inc",
6
6
  "homepage": "https://github.com/amplitude/Amplitude-TypeScript",
@@ -41,7 +41,7 @@
41
41
  "tslib": "^2.4.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@amplitude/analytics-browser": "^2.25.2",
44
+ "@amplitude/analytics-browser": "^2.25.3",
45
45
  "@rollup/plugin-commonjs": "^23.0.4",
46
46
  "@rollup/plugin-node-resolve": "^15.0.1",
47
47
  "@rollup/plugin-typescript": "^10.0.1",
@@ -53,5 +53,5 @@
53
53
  "files": [
54
54
  "lib"
55
55
  ],
56
- "gitHead": "3fb30ef85184a6b55503171f99be5648fc00651c"
56
+ "gitHead": "2640e9c6687dd3fb8727d7759ffee19bd7b551f8"
57
57
  }