@ninetailed/experience.js-next-esr 7.5.3-beta.2 → 7.5.3-beta.3

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.
@@ -37,7 +37,32 @@ const buildNinetailedEdgeRequestContext = ({
37
37
  };
38
38
  };
39
39
 
40
- const fetchEdgeProfile = async ({
40
+ /******************************************************************************
41
+ Copyright (c) Microsoft Corporation.
42
+
43
+ Permission to use, copy, modify, and/or distribute this software for any
44
+ purpose with or without fee is hereby granted.
45
+
46
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
47
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
48
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
49
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
50
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
51
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
52
+ PERFORMANCE OF THIS SOFTWARE.
53
+ ***************************************************************************** */
54
+
55
+ function __awaiter(thisArg, _arguments, P, generator) {
56
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
57
+ return new (P || (P = Promise))(function (resolve, reject) {
58
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
59
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
60
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
61
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
62
+ });
63
+ }
64
+
65
+ const fetchEdgeProfile = ({
41
66
  ctx,
42
67
  cookies,
43
68
  clientId,
@@ -45,7 +70,7 @@ const fetchEdgeProfile = async ({
45
70
  url,
46
71
  ip,
47
72
  location
48
- }) => {
73
+ }) => __awaiter(void 0, void 0, void 0, function* () {
49
74
  const anonymousId = cookies[NINETAILED_ANONYMOUS_ID_COOKIE];
50
75
  const apiClient = new NinetailedApiClient({
51
76
  clientId,
@@ -61,7 +86,7 @@ const fetchEdgeProfile = async ({
61
86
  });
62
87
  const {
63
88
  profile
64
- } = await apiClient.upsertProfile({
89
+ } = yield apiClient.upsertProfile({
65
90
  events: [pageEvent],
66
91
  profileId: anonymousId
67
92
  }, {
@@ -69,6 +94,6 @@ const fetchEdgeProfile = async ({
69
94
  preflight: true
70
95
  });
71
96
  return profile;
72
- };
97
+ });
73
98
 
74
99
  export { buildNinetailedEdgeRequestContext, fetchEdgeProfile };
package/package.json CHANGED
@@ -1,13 +1,9 @@
1
1
  {
2
2
  "name": "@ninetailed/experience.js-next-esr",
3
- "version": "7.5.3-beta.2",
3
+ "version": "7.5.3-beta.3",
4
4
  "description": "Ninetailed SDK for Next.js ESR",
5
5
  "dependencies": {
6
- "next": "13.3.0"
7
- },
8
- "peerDependencies": {
9
- "@ninetailed/experience.js-shared": "*",
10
- "uuid": "9.0.0"
6
+ "next": "12.1.0"
11
7
  },
12
8
  "license": "MIT",
13
9
  "repository": {
@@ -15,12 +11,12 @@
15
11
  "url": "https://github.com/ninetailed-inc/experience.js.git",
16
12
  "directory": "packages/sdks/nextjs-esr"
17
13
  },
18
- "keywords": [
19
- "nextjs-esr",
20
- "ninetailed",
21
- "personalization",
22
- "a/b testing"
23
- ],
24
- "module": "./index.esm.js",
25
- "main": "./index.cjs.js"
14
+ "module": "./index.js",
15
+ "main": "./index.cjs",
16
+ "type": "module",
17
+ "types": "./src/index.d.ts",
18
+ "peerDependencies": {
19
+ "@ninetailed/experience.js-shared": "7.5.3-beta.3",
20
+ "uuid": "9.0.0"
21
+ }
26
22
  }
package/index.cjs.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./src/index";
File without changes