@amplitude/analytics-react-native 0.3.0 → 0.3.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.
- package/lib/commonjs/storage/cookie.js +1 -1
- package/lib/commonjs/storage/cookie.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/storage/cookie.js +1 -1
- package/lib/module/storage/cookie.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/storage/cookie.ts +1 -1
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CookieStorage","constructor","options","isEnabled","isNative","window","random","String","Date","now","testStrorage","testKey","set","value","get","remove","key","getRaw","undefined","decodeURIComponent","atob","JSON","parse","cookie","document","split","match","find","c","indexOf","substring","length","expirationDays","expires","expireDate","date","setTime","getTime","str","btoa","encodeURIComponent","stringify","toUTCString","domain","secure","sameSite","reset"],"sources":["cookie.ts"],"sourcesContent":["import { Storage, CookieStorageOptions } from '@amplitude/analytics-types';\nimport { isNative } from '../utils/platform';\n\nexport class CookieStorage<T> implements Storage<T> {\n options: CookieStorageOptions;\n\n constructor(options?: CookieStorageOptions) {\n this.options = { ...options };\n }\n\n async isEnabled(): Promise<boolean> {\n /* istanbul ignore if */\n if (isNative() || typeof window === 'undefined') {\n return false;\n }\n\n const random = String(Date.now());\n const testStrorage = new CookieStorage<string>();\n const testKey = 'AMP_TEST';\n try {\n await testStrorage.set(testKey, random);\n const value = await testStrorage.get(testKey);\n return value === random;\n } catch {\n /* istanbul ignore next */\n return false;\n } finally {\n await testStrorage.remove(testKey);\n }\n }\n\n async get(key: string): Promise<T | undefined> {\n let value = await this.getRaw(key);\n if (!value) {\n return undefined;\n }\n try {\n try {\n value = decodeURIComponent(atob(value));\n } catch {\n // value not encoded\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return JSON.parse(value);\n } catch {\n /* istanbul ignore next */\n return undefined;\n }\n }\n\n async getRaw(key: string): Promise<string | undefined> {\n const cookie = window.document.cookie.split('; ');\n const match = cookie.find((c) => c.indexOf(key + '=') === 0);\n if (!match) {\n return undefined;\n }\n return match.substring(key.length + 1);\n }\n\n async set(key: string, value: T | null): Promise<void> {\n try {\n const expirationDays = this.options.expirationDays ?? 0;\n const expires = value !== null ? expirationDays : -1;\n let expireDate: Date | undefined = undefined;\n if (expires) {\n const date = new Date();\n date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000);\n expireDate = date;\n }\n let str = `${key}=${btoa(encodeURIComponent(JSON.stringify(value)))}`;\n if (expireDate) {\n str += `; expires=${expireDate.toUTCString()}`;\n }\n str += '; path=/';\n if (this.options.domain) {\n str += `; domain=${this.options.domain}`;\n }\n if (this.options.secure) {\n str += '; Secure';\n }\n if (this.options.sameSite) {\n str += `; SameSite=${this.options.sameSite}`;\n }\n window.document.cookie = str;\n } catch {\n //\n }\n }\n\n async remove(key: string): Promise<void> {\n await this.set(key, null);\n }\n\n async reset(): Promise<void> {\n return;\n }\n}\n"],"mappings":";;;;;;;AACA;;;;AAEO,MAAMA,aAAN,CAA6C;EAGlDC,WAAW,CAACC,OAAD,EAAiC;IAAA;;IAC1C,KAAKA,OAAL,GAAe,EAAE,GAAGA;IAAL,CAAf;EACD;;EAEc,MAATC,SAAS,GAAqB;IAClC;IACA,IAAI,IAAAC,kBAAA,OAAc,OAAOC,MAAP,KAAkB,WAApC,EAAiD;MAC/C,OAAO,KAAP;IACD;;IAED,MAAMC,MAAM,GAAGC,MAAM,CAACC,IAAI,CAACC,GAAL,EAAD,CAArB;IACA,MAAMC,YAAY,GAAG,IAAIV,aAAJ,
|
|
1
|
+
{"version":3,"names":["CookieStorage","constructor","options","isEnabled","isNative","window","random","String","Date","now","testStrorage","testKey","set","value","get","remove","key","getRaw","undefined","decodeURIComponent","atob","JSON","parse","cookie","document","split","match","find","c","indexOf","substring","length","expirationDays","expires","expireDate","date","setTime","getTime","str","btoa","encodeURIComponent","stringify","toUTCString","domain","secure","sameSite","reset"],"sources":["cookie.ts"],"sourcesContent":["import { Storage, CookieStorageOptions } from '@amplitude/analytics-types';\nimport { isNative } from '../utils/platform';\n\nexport class CookieStorage<T> implements Storage<T> {\n options: CookieStorageOptions;\n\n constructor(options?: CookieStorageOptions) {\n this.options = { ...options };\n }\n\n async isEnabled(): Promise<boolean> {\n /* istanbul ignore if */\n if (isNative() || typeof window === 'undefined') {\n return false;\n }\n\n const random = String(Date.now());\n const testStrorage = new CookieStorage<string>(this.options);\n const testKey = 'AMP_TEST';\n try {\n await testStrorage.set(testKey, random);\n const value = await testStrorage.get(testKey);\n return value === random;\n } catch {\n /* istanbul ignore next */\n return false;\n } finally {\n await testStrorage.remove(testKey);\n }\n }\n\n async get(key: string): Promise<T | undefined> {\n let value = await this.getRaw(key);\n if (!value) {\n return undefined;\n }\n try {\n try {\n value = decodeURIComponent(atob(value));\n } catch {\n // value not encoded\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return JSON.parse(value);\n } catch {\n /* istanbul ignore next */\n return undefined;\n }\n }\n\n async getRaw(key: string): Promise<string | undefined> {\n const cookie = window.document.cookie.split('; ');\n const match = cookie.find((c) => c.indexOf(key + '=') === 0);\n if (!match) {\n return undefined;\n }\n return match.substring(key.length + 1);\n }\n\n async set(key: string, value: T | null): Promise<void> {\n try {\n const expirationDays = this.options.expirationDays ?? 0;\n const expires = value !== null ? expirationDays : -1;\n let expireDate: Date | undefined = undefined;\n if (expires) {\n const date = new Date();\n date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000);\n expireDate = date;\n }\n let str = `${key}=${btoa(encodeURIComponent(JSON.stringify(value)))}`;\n if (expireDate) {\n str += `; expires=${expireDate.toUTCString()}`;\n }\n str += '; path=/';\n if (this.options.domain) {\n str += `; domain=${this.options.domain}`;\n }\n if (this.options.secure) {\n str += '; Secure';\n }\n if (this.options.sameSite) {\n str += `; SameSite=${this.options.sameSite}`;\n }\n window.document.cookie = str;\n } catch {\n //\n }\n }\n\n async remove(key: string): Promise<void> {\n await this.set(key, null);\n }\n\n async reset(): Promise<void> {\n return;\n }\n}\n"],"mappings":";;;;;;;AACA;;;;AAEO,MAAMA,aAAN,CAA6C;EAGlDC,WAAW,CAACC,OAAD,EAAiC;IAAA;;IAC1C,KAAKA,OAAL,GAAe,EAAE,GAAGA;IAAL,CAAf;EACD;;EAEc,MAATC,SAAS,GAAqB;IAClC;IACA,IAAI,IAAAC,kBAAA,OAAc,OAAOC,MAAP,KAAkB,WAApC,EAAiD;MAC/C,OAAO,KAAP;IACD;;IAED,MAAMC,MAAM,GAAGC,MAAM,CAACC,IAAI,CAACC,GAAL,EAAD,CAArB;IACA,MAAMC,YAAY,GAAG,IAAIV,aAAJ,CAA0B,KAAKE,OAA/B,CAArB;IACA,MAAMS,OAAO,GAAG,UAAhB;;IACA,IAAI;MACF,MAAMD,YAAY,CAACE,GAAb,CAAiBD,OAAjB,EAA0BL,MAA1B,CAAN;MACA,MAAMO,KAAK,GAAG,MAAMH,YAAY,CAACI,GAAb,CAAiBH,OAAjB,CAApB;MACA,OAAOE,KAAK,KAAKP,MAAjB;IACD,CAJD,CAIE,MAAM;MACN;MACA,OAAO,KAAP;IACD,CAPD,SAOU;MACR,MAAMI,YAAY,CAACK,MAAb,CAAoBJ,OAApB,CAAN;IACD;EACF;;EAEQ,MAAHG,GAAG,CAACE,GAAD,EAAsC;IAC7C,IAAIH,KAAK,GAAG,MAAM,KAAKI,MAAL,CAAYD,GAAZ,CAAlB;;IACA,IAAI,CAACH,KAAL,EAAY;MACV,OAAOK,SAAP;IACD;;IACD,IAAI;MACF,IAAI;QACFL,KAAK,GAAGM,kBAAkB,CAACC,IAAI,CAACP,KAAD,CAAL,CAA1B;MACD,CAFD,CAEE,MAAM,CACN;MACD,CALC,CAMF;;;MACA,OAAOQ,IAAI,CAACC,KAAL,CAAWT,KAAX,CAAP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AAjB,EAAyB;QACvBL,GAAG,IAAK,YAAW,KAAKpC,OAAL,CAAayC,MAAO,EAAvC;MACD;;MACD,IAAI,KAAKzC,OAAL,CAAa0C,MAAjB,EAAyB;QACvBN,GAAG,IAAI,UAAP;MACD;;MACD,IAAI,KAAKpC,OAAL,CAAa2C,QAAjB,EAA2B;QACzBP,GAAG,IAAK,cAAa,KAAKpC,OAAL,CAAa2C,QAAS,EAA3C;MACD;;MACDxC,MAAM,CAACmB,QAAP,CAAgBD,MAAhB,GAAyBe,GAAzB;IACD,CAxBD,CAwBE,MAAM,CACN;IACD;EACF;;EAEW,MAANvB,MAAM,CAACC,GAAD,EAA6B;IACvC,MAAM,KAAKJ,GAAL,CAASI,GAAT,EAAc,IAAd,CAAN;EACD;;EAEU,MAAL8B,KAAK,GAAkB;IAC3B;EACD;;AA5FiD"}
|
package/lib/commonjs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["export const VERSION = '0.3.
|
|
1
|
+
{"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["export const VERSION = '0.3.1';\n"],"mappings":";;;;;;AAAO,MAAMA,OAAO,GAAG,OAAhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isNative","CookieStorage","constructor","options","isEnabled","window","random","String","Date","now","testStrorage","testKey","set","value","get","remove","key","getRaw","undefined","decodeURIComponent","atob","JSON","parse","cookie","document","split","match","find","c","indexOf","substring","length","expirationDays","expires","expireDate","date","setTime","getTime","str","btoa","encodeURIComponent","stringify","toUTCString","domain","secure","sameSite","reset"],"sources":["cookie.ts"],"sourcesContent":["import { Storage, CookieStorageOptions } from '@amplitude/analytics-types';\nimport { isNative } from '../utils/platform';\n\nexport class CookieStorage<T> implements Storage<T> {\n options: CookieStorageOptions;\n\n constructor(options?: CookieStorageOptions) {\n this.options = { ...options };\n }\n\n async isEnabled(): Promise<boolean> {\n /* istanbul ignore if */\n if (isNative() || typeof window === 'undefined') {\n return false;\n }\n\n const random = String(Date.now());\n const testStrorage = new CookieStorage<string>();\n const testKey = 'AMP_TEST';\n try {\n await testStrorage.set(testKey, random);\n const value = await testStrorage.get(testKey);\n return value === random;\n } catch {\n /* istanbul ignore next */\n return false;\n } finally {\n await testStrorage.remove(testKey);\n }\n }\n\n async get(key: string): Promise<T | undefined> {\n let value = await this.getRaw(key);\n if (!value) {\n return undefined;\n }\n try {\n try {\n value = decodeURIComponent(atob(value));\n } catch {\n // value not encoded\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return JSON.parse(value);\n } catch {\n /* istanbul ignore next */\n return undefined;\n }\n }\n\n async getRaw(key: string): Promise<string | undefined> {\n const cookie = window.document.cookie.split('; ');\n const match = cookie.find((c) => c.indexOf(key + '=') === 0);\n if (!match) {\n return undefined;\n }\n return match.substring(key.length + 1);\n }\n\n async set(key: string, value: T | null): Promise<void> {\n try {\n const expirationDays = this.options.expirationDays ?? 0;\n const expires = value !== null ? expirationDays : -1;\n let expireDate: Date | undefined = undefined;\n if (expires) {\n const date = new Date();\n date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000);\n expireDate = date;\n }\n let str = `${key}=${btoa(encodeURIComponent(JSON.stringify(value)))}`;\n if (expireDate) {\n str += `; expires=${expireDate.toUTCString()}`;\n }\n str += '; path=/';\n if (this.options.domain) {\n str += `; domain=${this.options.domain}`;\n }\n if (this.options.secure) {\n str += '; Secure';\n }\n if (this.options.sameSite) {\n str += `; SameSite=${this.options.sameSite}`;\n }\n window.document.cookie = str;\n } catch {\n //\n }\n }\n\n async remove(key: string): Promise<void> {\n await this.set(key, null);\n }\n\n async reset(): Promise<void> {\n return;\n }\n}\n"],"mappings":";;AACA,SAASA,QAAT,QAAyB,mBAAzB;AAEA,OAAO,MAAMC,aAAN,CAA6C;EAGlDC,WAAW,CAACC,OAAD,EAAiC;IAAA;;IAC1C,KAAKA,OAAL,GAAe,EAAE,GAAGA;IAAL,CAAf;EACD;;EAEc,MAATC,SAAS,GAAqB;IAClC;IACA,IAAIJ,QAAQ,MAAM,OAAOK,MAAP,KAAkB,WAApC,EAAiD;MAC/C,OAAO,KAAP;IACD;;IAED,MAAMC,MAAM,GAAGC,MAAM,CAACC,IAAI,CAACC,GAAL,EAAD,CAArB;IACA,MAAMC,YAAY,GAAG,IAAIT,aAAJ,
|
|
1
|
+
{"version":3,"names":["isNative","CookieStorage","constructor","options","isEnabled","window","random","String","Date","now","testStrorage","testKey","set","value","get","remove","key","getRaw","undefined","decodeURIComponent","atob","JSON","parse","cookie","document","split","match","find","c","indexOf","substring","length","expirationDays","expires","expireDate","date","setTime","getTime","str","btoa","encodeURIComponent","stringify","toUTCString","domain","secure","sameSite","reset"],"sources":["cookie.ts"],"sourcesContent":["import { Storage, CookieStorageOptions } from '@amplitude/analytics-types';\nimport { isNative } from '../utils/platform';\n\nexport class CookieStorage<T> implements Storage<T> {\n options: CookieStorageOptions;\n\n constructor(options?: CookieStorageOptions) {\n this.options = { ...options };\n }\n\n async isEnabled(): Promise<boolean> {\n /* istanbul ignore if */\n if (isNative() || typeof window === 'undefined') {\n return false;\n }\n\n const random = String(Date.now());\n const testStrorage = new CookieStorage<string>(this.options);\n const testKey = 'AMP_TEST';\n try {\n await testStrorage.set(testKey, random);\n const value = await testStrorage.get(testKey);\n return value === random;\n } catch {\n /* istanbul ignore next */\n return false;\n } finally {\n await testStrorage.remove(testKey);\n }\n }\n\n async get(key: string): Promise<T | undefined> {\n let value = await this.getRaw(key);\n if (!value) {\n return undefined;\n }\n try {\n try {\n value = decodeURIComponent(atob(value));\n } catch {\n // value not encoded\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return JSON.parse(value);\n } catch {\n /* istanbul ignore next */\n return undefined;\n }\n }\n\n async getRaw(key: string): Promise<string | undefined> {\n const cookie = window.document.cookie.split('; ');\n const match = cookie.find((c) => c.indexOf(key + '=') === 0);\n if (!match) {\n return undefined;\n }\n return match.substring(key.length + 1);\n }\n\n async set(key: string, value: T | null): Promise<void> {\n try {\n const expirationDays = this.options.expirationDays ?? 0;\n const expires = value !== null ? expirationDays : -1;\n let expireDate: Date | undefined = undefined;\n if (expires) {\n const date = new Date();\n date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000);\n expireDate = date;\n }\n let str = `${key}=${btoa(encodeURIComponent(JSON.stringify(value)))}`;\n if (expireDate) {\n str += `; expires=${expireDate.toUTCString()}`;\n }\n str += '; path=/';\n if (this.options.domain) {\n str += `; domain=${this.options.domain}`;\n }\n if (this.options.secure) {\n str += '; Secure';\n }\n if (this.options.sameSite) {\n str += `; SameSite=${this.options.sameSite}`;\n }\n window.document.cookie = str;\n } catch {\n //\n }\n }\n\n async remove(key: string): Promise<void> {\n await this.set(key, null);\n }\n\n async reset(): Promise<void> {\n return;\n }\n}\n"],"mappings":";;AACA,SAASA,QAAT,QAAyB,mBAAzB;AAEA,OAAO,MAAMC,aAAN,CAA6C;EAGlDC,WAAW,CAACC,OAAD,EAAiC;IAAA;;IAC1C,KAAKA,OAAL,GAAe,EAAE,GAAGA;IAAL,CAAf;EACD;;EAEc,MAATC,SAAS,GAAqB;IAClC;IACA,IAAIJ,QAAQ,MAAM,OAAOK,MAAP,KAAkB,WAApC,EAAiD;MAC/C,OAAO,KAAP;IACD;;IAED,MAAMC,MAAM,GAAGC,MAAM,CAACC,IAAI,CAACC,GAAL,EAAD,CAArB;IACA,MAAMC,YAAY,GAAG,IAAIT,aAAJ,CAA0B,KAAKE,OAA/B,CAArB;IACA,MAAMQ,OAAO,GAAG,UAAhB;;IACA,IAAI;MACF,MAAMD,YAAY,CAACE,GAAb,CAAiBD,OAAjB,EAA0BL,MAA1B,CAAN;MACA,MAAMO,KAAK,GAAG,MAAMH,YAAY,CAACI,GAAb,CAAiBH,OAAjB,CAApB;MACA,OAAOE,KAAK,KAAKP,MAAjB;IACD,CAJD,CAIE,MAAM;MACN;MACA,OAAO,KAAP;IACD,CAPD,SAOU;MACR,MA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ACE,OAAL,KAAiBJ,OAAO,GAAG,EAAV,GAAe,EAAf,GAAoB,EAApB,GAAyB,IAAvD;QACAC,UAAU,GAAGC,IAAb;MACD;;MACD,IAAIG,GAAG,GAAI,GAAEtB,GAAI,IAAGuB,IAAI,CAACC,kBAAkB,CAACnB,IAAI,CAACoB,SAAL,CAAe5B,KAAf,CAAD,CAAnB,CAA4C,EAApE;;MACA,IAAIqB,UAAJ,EAAgB;QACdI,GAAG,IAAK,aAAYJ,UAAU,CAACQ,WAAX,EAAyB,EAA7C;MACD;;MACDJ,GAAG,IAAI,UAAP;;MACA,IAAI,KAAKnC,OAAL,CAAawC,MAAjB,EAAyB;QACvBL,GAAG,IAAK,YAAW,KAAKnC,OAAL,CAAawC,MAAO,EAAvC;MACD;;MACD,IAAI,KAAKxC,OAAL,CAAayC,MAAjB,EAAyB;QACvBN,GAAG,IAAI,UAAP;MACD;;MACD,IAAI,KAAKnC,OAAL,CAAa0C,QAAjB,EAA2B;QACzBP,GAAG,IAAK,cAAa,KAAKnC,OAAL,CAAa0C,QAAS,EAA3C;MACD;;MACDxC,MAAM,CAACmB,QAAP,CAAgBD,MAAhB,GAAyBe,GAAzB;IACD,CAxBD,CAwBE,MAAM,CACN;IACD;EACF;;EAEW,MAANvB,MAAM,CAACC,GAAD,EAA6B;IACvC,MAAM,KAAKJ,GAAL,CAASI,GAAT,EAAc,IAAd,CAAN;EACD;;EAEU,MAAL8B,KAAK,GAAkB;IAC3B;EACD;;AA5FiD"}
|
package/lib/module/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.3.
|
|
1
|
+
export const VERSION = '0.3.1';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["export const VERSION = '0.3.
|
|
1
|
+
{"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["export const VERSION = '0.3.1';\n"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,OAAhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.3.
|
|
1
|
+
export declare const VERSION = "0.3.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/analytics-react-native",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Official React Native SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"analytics",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
]
|
|
90
90
|
]
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "c18e76fec9ad781d5c19b37775efd2742a39f5a7"
|
|
93
93
|
}
|
package/src/storage/cookie.ts
CHANGED
|
@@ -15,7 +15,7 @@ export class CookieStorage<T> implements Storage<T> {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const random = String(Date.now());
|
|
18
|
-
const testStrorage = new CookieStorage<string>();
|
|
18
|
+
const testStrorage = new CookieStorage<string>(this.options);
|
|
19
19
|
const testKey = 'AMP_TEST';
|
|
20
20
|
try {
|
|
21
21
|
await testStrorage.set(testKey, random);
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.3.
|
|
1
|
+
export const VERSION = '0.3.1';
|