@amplitude/analytics-react-native 0.0.1-dev.9 → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Amplitude Analytics
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -123,9 +123,9 @@ var _reactNativeClient = require("./react-native-client");
123
123
 
124
124
  var _analyticsCore = require("@amplitude/analytics-core");
125
125
 
126
- var _Types = _interopRequireWildcard(require("@amplitude/analytics-types"));
126
+ var Types = _interopRequireWildcard(require("@amplitude/analytics-types"));
127
127
 
128
- exports.Types = _Types;
128
+ exports.Types = Types;
129
129
 
130
130
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
131
131
 
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export {\n add,\n flush,\n getDeviceId,\n getSessionId,\n getUserId,\n groupIdentify,\n identify,\n init,\n logEvent,\n remove,\n revenue,\n setDeviceId,\n setGroup,\n setOptOut,\n setSessionId,\n setUserId,\n track,\n} from './react-native-client';\nexport { Revenue, Identify } from '@amplitude/analytics-core';\nexport * as Types from '@amplitude/analytics-types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAmBA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export {\n add,\n flush,\n getDeviceId,\n getSessionId,\n getUserId,\n groupIdentify,\n identify,\n init,\n logEvent,\n remove,\n revenue,\n setDeviceId,\n setGroup,\n setOptOut,\n setSessionId,\n setUserId,\n track,\n} from './react-native-client';\nexport { Revenue, Identify } from '@amplitude/analytics-core';\n// Hack - react-native apps have trouble with:\n// export * as Types from '@amplitude/analytics-types\nimport * as Types from '@amplitude/analytics-types';\nexport { Types };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAmBA;;AAGA"}
@@ -24,7 +24,7 @@ class IdentityEventSender {
24
24
  const userProperties = context.user_properties;
25
25
 
26
26
  if (userProperties) {
27
- this.identityStore.editIdentity().setUserProperties(userProperties).commit();
27
+ this.identityStore.editIdentity().updateUserProperties(userProperties).commit();
28
28
  }
29
29
 
30
30
  return context;
@@ -1 +1 @@
1
- {"version":3,"names":["IdentityEventSender","PluginType","BEFORE","getAnalyticsConnector","identityStore","execute","context","userProperties","user_properties","editIdentity","setUserProperties","commit","setup","_","Promise","resolve","undefined"],"sources":["identity.ts"],"sourcesContent":["import { BeforePlugin, PluginType, Event, Config } from '@amplitude/analytics-types';\nimport { getAnalyticsConnector } from '../utils/analytics-connector';\n\nexport class IdentityEventSender implements BeforePlugin {\n name = 'identity';\n type = PluginType.BEFORE as const;\n\n identityStore = getAnalyticsConnector().identityStore;\n\n async execute(context: Event): Promise<Event> {\n const userProperties = context.user_properties as Record<string, any>;\n if (userProperties) {\n this.identityStore.editIdentity().setUserProperties(userProperties).commit();\n }\n return context;\n }\n\n setup(_: Config): Promise<undefined> {\n return Promise.resolve(undefined);\n }\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,mBAAN,CAAkD;EAAA;IAAA,8BAChD,UADgD;;IAAA,8BAEhDC,0BAAA,CAAWC,MAFqC;;IAAA,uCAIvC,IAAAC,yCAAA,IAAwBC,aAJe;EAAA;;EAM1C,MAAPC,OAAO,CAACC,OAAD,EAAiC;IAC5C,MAAMC,cAAc,GAAGD,OAAO,CAACE,eAA/B;;IACA,IAAID,cAAJ,EAAoB;MAClB,KAAKH,aAAL,CAAmBK,YAAnB,GAAkCC,iBAAlC,CAAoDH,cAApD,EAAoEI,MAApE;IACD;;IACD,OAAOL,OAAP;EACD;;EAEDM,KAAK,CAACC,CAAD,EAAgC;IACnC,OAAOC,OAAO,CAACC,OAAR,CAAgBC,SAAhB,CAAP;EACD;;AAhBsD"}
1
+ {"version":3,"names":["IdentityEventSender","PluginType","BEFORE","getAnalyticsConnector","identityStore","execute","context","userProperties","user_properties","editIdentity","updateUserProperties","commit","setup","_","Promise","resolve","undefined"],"sources":["identity.ts"],"sourcesContent":["import { BeforePlugin, PluginType, Event, Config } from '@amplitude/analytics-types';\nimport { getAnalyticsConnector } from '../utils/analytics-connector';\n\nexport class IdentityEventSender implements BeforePlugin {\n name = 'identity';\n type = PluginType.BEFORE as const;\n\n identityStore = getAnalyticsConnector().identityStore;\n\n async execute(context: Event): Promise<Event> {\n const userProperties = context.user_properties as Record<string, any>;\n if (userProperties) {\n this.identityStore.editIdentity().updateUserProperties(userProperties).commit();\n }\n return context;\n }\n\n setup(_: Config): Promise<undefined> {\n return Promise.resolve(undefined);\n }\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,mBAAN,CAAkD;EAAA;IAAA,8BAChD,UADgD;;IAAA,8BAEhDC,0BAAA,CAAWC,MAFqC;;IAAA,uCAIvC,IAAAC,yCAAA,IAAwBC,aAJe;EAAA;;EAM1C,MAAPC,OAAO,CAACC,OAAD,EAAiC;IAC5C,MAAMC,cAAc,GAAGD,OAAO,CAACE,eAA/B;;IACA,IAAID,cAAJ,EAAoB;MAClB,KAAKH,aAAL,CAAmBK,YAAnB,GAAkCC,oBAAlC,CAAuDH,cAAvD,EAAuEI,MAAvE;IACD;;IACD,OAAOL,OAAP;EACD;;EAEDM,KAAK,CAACC,CAAD,EAAgC;IACnC,OAAOC,OAAO,CAACC,OAAR,CAAgBC,SAAhB,CAAP;EACD;;AAhBsD"}
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.VERSION = void 0;
7
- const VERSION = '0.0.1-dev.9';
7
+ const VERSION = '0.1.0';
8
8
  exports.VERSION = VERSION;
9
9
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["export const VERSION = '0.0.1-dev.9';\n"],"mappings":";;;;;;AAAO,MAAMA,OAAO,GAAG,aAAhB"}
1
+ {"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["export const VERSION = '0.1.0';\n"],"mappings":";;;;;;AAAO,MAAMA,OAAO,GAAG,OAAhB"}
@@ -1,5 +1,7 @@
1
1
  export { add, flush, getDeviceId, getSessionId, getUserId, groupIdentify, identify, init, logEvent, remove, revenue, setDeviceId, setGroup, setOptOut, setSessionId, setUserId, track } from './react-native-client';
2
- export { Revenue, Identify } from '@amplitude/analytics-core';
3
- import * as _Types from '@amplitude/analytics-types';
4
- export { _Types as Types };
2
+ export { Revenue, Identify } from '@amplitude/analytics-core'; // Hack - react-native apps have trouble with:
3
+ // export * as Types from '@amplitude/analytics-types
4
+
5
+ import * as Types from '@amplitude/analytics-types';
6
+ export { Types };
5
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["add","flush","getDeviceId","getSessionId","getUserId","groupIdentify","identify","init","logEvent","remove","revenue","setDeviceId","setGroup","setOptOut","setSessionId","setUserId","track","Revenue","Identify","Types"],"sources":["index.ts"],"sourcesContent":["export {\n add,\n flush,\n getDeviceId,\n getSessionId,\n getUserId,\n groupIdentify,\n identify,\n init,\n logEvent,\n remove,\n revenue,\n setDeviceId,\n setGroup,\n setOptOut,\n setSessionId,\n setUserId,\n track,\n} from './react-native-client';\nexport { Revenue, Identify } from '@amplitude/analytics-core';\nexport * as Types from '@amplitude/analytics-types';\n"],"mappings":"AAAA,SACEA,GADF,EAEEC,KAFF,EAGEC,WAHF,EAIEC,YAJF,EAKEC,SALF,EAMEC,aANF,EAOEC,QAPF,EAQEC,IARF,EASEC,QATF,EAUEC,MAVF,EAWEC,OAXF,EAYEC,WAZF,EAaEC,QAbF,EAcEC,SAdF,EAeEC,YAfF,EAgBEC,SAhBF,EAiBEC,KAjBF,QAkBO,uBAlBP;AAmBA,SAASC,OAAT,EAAkBC,QAAlB,QAAkC,2BAAlC;wBACuB,4B;mBAAXC,K"}
1
+ {"version":3,"names":["add","flush","getDeviceId","getSessionId","getUserId","groupIdentify","identify","init","logEvent","remove","revenue","setDeviceId","setGroup","setOptOut","setSessionId","setUserId","track","Revenue","Identify","Types"],"sources":["index.ts"],"sourcesContent":["export {\n add,\n flush,\n getDeviceId,\n getSessionId,\n getUserId,\n groupIdentify,\n identify,\n init,\n logEvent,\n remove,\n revenue,\n setDeviceId,\n setGroup,\n setOptOut,\n setSessionId,\n setUserId,\n track,\n} from './react-native-client';\nexport { Revenue, Identify } from '@amplitude/analytics-core';\n// Hack - react-native apps have trouble with:\n// export * as Types from '@amplitude/analytics-types\nimport * as Types from '@amplitude/analytics-types';\nexport { Types };\n"],"mappings":"AAAA,SACEA,GADF,EAEEC,KAFF,EAGEC,WAHF,EAIEC,YAJF,EAKEC,SALF,EAMEC,aANF,EAOEC,QAPF,EAQEC,IARF,EASEC,QATF,EAUEC,MAVF,EAWEC,OAXF,EAYEC,WAZF,EAaEC,QAbF,EAcEC,SAdF,EAeEC,YAfF,EAgBEC,SAhBF,EAiBEC,KAjBF,QAkBO,uBAlBP;AAmBA,SAASC,OAAT,EAAkBC,QAAlB,QAAkC,2BAAlC,C,CACA;AACA;;AACA,OAAO,KAAKC,KAAZ,MAAuB,4BAAvB;AACA,SAASA,KAAT"}
@@ -15,7 +15,7 @@ export class IdentityEventSender {
15
15
  const userProperties = context.user_properties;
16
16
 
17
17
  if (userProperties) {
18
- this.identityStore.editIdentity().setUserProperties(userProperties).commit();
18
+ this.identityStore.editIdentity().updateUserProperties(userProperties).commit();
19
19
  }
20
20
 
21
21
  return context;
@@ -1 +1 @@
1
- {"version":3,"names":["PluginType","getAnalyticsConnector","IdentityEventSender","BEFORE","identityStore","execute","context","userProperties","user_properties","editIdentity","setUserProperties","commit","setup","_","Promise","resolve","undefined"],"sources":["identity.ts"],"sourcesContent":["import { BeforePlugin, PluginType, Event, Config } from '@amplitude/analytics-types';\nimport { getAnalyticsConnector } from '../utils/analytics-connector';\n\nexport class IdentityEventSender implements BeforePlugin {\n name = 'identity';\n type = PluginType.BEFORE as const;\n\n identityStore = getAnalyticsConnector().identityStore;\n\n async execute(context: Event): Promise<Event> {\n const userProperties = context.user_properties as Record<string, any>;\n if (userProperties) {\n this.identityStore.editIdentity().setUserProperties(userProperties).commit();\n }\n return context;\n }\n\n setup(_: Config): Promise<undefined> {\n return Promise.resolve(undefined);\n }\n}\n"],"mappings":";;AAAA,SAAuBA,UAAvB,QAAwD,4BAAxD;AACA,SAASC,qBAAT,QAAsC,8BAAtC;AAEA,OAAO,MAAMC,mBAAN,CAAkD;EAAA;IAAA,8BAChD,UADgD;;IAAA,8BAEhDF,UAAU,CAACG,MAFqC;;IAAA,uCAIvCF,qBAAqB,GAAGG,aAJe;EAAA;;EAM1C,MAAPC,OAAO,CAACC,OAAD,EAAiC;IAC5C,MAAMC,cAAc,GAAGD,OAAO,CAACE,eAA/B;;IACA,IAAID,cAAJ,EAAoB;MAClB,KAAKH,aAAL,CAAmBK,YAAnB,GAAkCC,iBAAlC,CAAoDH,cAApD,EAAoEI,MAApE;IACD;;IACD,OAAOL,OAAP;EACD;;EAEDM,KAAK,CAACC,CAAD,EAAgC;IACnC,OAAOC,OAAO,CAACC,OAAR,CAAgBC,SAAhB,CAAP;EACD;;AAhBsD"}
1
+ {"version":3,"names":["PluginType","getAnalyticsConnector","IdentityEventSender","BEFORE","identityStore","execute","context","userProperties","user_properties","editIdentity","updateUserProperties","commit","setup","_","Promise","resolve","undefined"],"sources":["identity.ts"],"sourcesContent":["import { BeforePlugin, PluginType, Event, Config } from '@amplitude/analytics-types';\nimport { getAnalyticsConnector } from '../utils/analytics-connector';\n\nexport class IdentityEventSender implements BeforePlugin {\n name = 'identity';\n type = PluginType.BEFORE as const;\n\n identityStore = getAnalyticsConnector().identityStore;\n\n async execute(context: Event): Promise<Event> {\n const userProperties = context.user_properties as Record<string, any>;\n if (userProperties) {\n this.identityStore.editIdentity().updateUserProperties(userProperties).commit();\n }\n return context;\n }\n\n setup(_: Config): Promise<undefined> {\n return Promise.resolve(undefined);\n }\n}\n"],"mappings":";;AAAA,SAAuBA,UAAvB,QAAwD,4BAAxD;AACA,SAASC,qBAAT,QAAsC,8BAAtC;AAEA,OAAO,MAAMC,mBAAN,CAAkD;EAAA;IAAA,8BAChD,UADgD;;IAAA,8BAEhDF,UAAU,CAACG,MAFqC;;IAAA,uCAIvCF,qBAAqB,GAAGG,aAJe;EAAA;;EAM1C,MAAPC,OAAO,CAACC,OAAD,EAAiC;IAC5C,MAAMC,cAAc,GAAGD,OAAO,CAACE,eAA/B;;IACA,IAAID,cAAJ,EAAoB;MAClB,KAAKH,aAAL,CAAmBK,YAAnB,GAAkCC,oBAAlC,CAAuDH,cAAvD,EAAuEI,MAAvE;IACD;;IACD,OAAOL,OAAP;EACD;;EAEDM,KAAK,CAACC,CAAD,EAAgC;IACnC,OAAOC,OAAO,CAACC,OAAR,CAAgBC,SAAhB,CAAP;EACD;;AAhBsD"}
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.0.1-dev.9';
1
+ export const VERSION = '0.1.0';
2
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["export const VERSION = '0.0.1-dev.9';\n"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,aAAhB"}
1
+ {"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["export const VERSION = '0.1.0';\n"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,OAAhB"}
@@ -1,4 +1,5 @@
1
1
  export { add, flush, getDeviceId, getSessionId, getUserId, groupIdentify, identify, init, logEvent, remove, revenue, setDeviceId, setGroup, setOptOut, setSessionId, setUserId, track, } from './react-native-client';
2
2
  export { Revenue, Identify } from '@amplitude/analytics-core';
3
- export * as Types from '@amplitude/analytics-types';
3
+ import * as Types from '@amplitude/analytics-types';
4
+ export { Types };
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,OAAO,EACP,WAAW,EACX,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,SAAS,EACT,KAAK,GACN,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,OAAO,EACP,WAAW,EACX,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,SAAS,EACT,KAAK,GACN,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.1-dev.9";
1
+ export declare const VERSION = "0.1.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAAgB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amplitude/analytics-react-native",
3
- "version": "0.0.1-dev.9",
3
+ "version": "0.1.0",
4
4
  "description": "Official React Native SDK",
5
5
  "keywords": [
6
6
  "analytics",
@@ -58,11 +58,11 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@amplitude/analytics-connector": "1.4.4",
61
- "@amplitude/analytics-core": "^0.6.1",
62
- "@amplitude/analytics-types": "^0.5.1",
61
+ "@amplitude/analytics-core": "^0.6.3",
62
+ "@amplitude/analytics-types": "^0.6.0",
63
63
  "@amplitude/ua-parser-js": "^0.7.31",
64
- "tslib": "^2.3.1",
65
- "@react-native-async-storage/async-storage": "^1.17.7"
64
+ "@react-native-async-storage/async-storage": "^1.17.7",
65
+ "tslib": "^2.3.1"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/react": "^16.9.19",
@@ -88,5 +88,6 @@
88
88
  }
89
89
  ]
90
90
  ]
91
- }
91
+ },
92
+ "gitHead": "ccece5d22caa0ae00b64cece3165ebc0a81dfc93"
92
93
  }
package/src/index.ts CHANGED
@@ -18,4 +18,7 @@ export {
18
18
  track,
19
19
  } from './react-native-client';
20
20
  export { Revenue, Identify } from '@amplitude/analytics-core';
21
- export * as Types from '@amplitude/analytics-types';
21
+ // Hack - react-native apps have trouble with:
22
+ // export * as Types from '@amplitude/analytics-types
23
+ import * as Types from '@amplitude/analytics-types';
24
+ export { Types };
@@ -10,7 +10,7 @@ export class IdentityEventSender implements BeforePlugin {
10
10
  async execute(context: Event): Promise<Event> {
11
11
  const userProperties = context.user_properties as Record<string, any>;
12
12
  if (userProperties) {
13
- this.identityStore.editIdentity().setUserProperties(userProperties).commit();
13
+ this.identityStore.editIdentity().updateUserProperties(userProperties).commit();
14
14
  }
15
15
  return context;
16
16
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.0.1-dev.9';
1
+ export const VERSION = '0.1.0';