@sitecore-jss/sitecore-jss-nextjs 21.7.0-canary.10 → 21.7.0-canary.12

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.
@@ -19,6 +19,15 @@ class Context {
19
19
  * Promises for the SDKs
20
20
  */
21
21
  this.sdkPromises = {};
22
+ /**
23
+ * Retrieves the Software Development Kit (SDK) instance, ensuring it is initialized before returning
24
+ *
25
+ * @param {string} name SDK name
26
+ * @returns initialized SDK
27
+ */
28
+ this.getSDK = (name) => {
29
+ return this.sdkPromises[name];
30
+ };
22
31
  this.sitecoreEdgeUrl = props.sitecoreEdgeUrl;
23
32
  this.sitecoreEdgeContextId = props.sitecoreEdgeContextId;
24
33
  this.siteName = props.siteName;
@@ -36,15 +45,6 @@ class Context {
36
45
  this.initSDK(sdkName);
37
46
  }
38
47
  }
39
- /**
40
- * Retrieves the Software Development Kit (SDK) instance, ensuring it is initialized before returning
41
- *
42
- * @param {string} name SDK name
43
- * @returns initialized SDK
44
- */
45
- getSDK(name) {
46
- return this.sdkPromises[name];
47
- }
48
48
  /**
49
49
  * Initializes the Software Development Kit (SDK)
50
50
  *
@@ -16,6 +16,15 @@ export class Context {
16
16
  * Promises for the SDKs
17
17
  */
18
18
  this.sdkPromises = {};
19
+ /**
20
+ * Retrieves the Software Development Kit (SDK) instance, ensuring it is initialized before returning
21
+ *
22
+ * @param {string} name SDK name
23
+ * @returns initialized SDK
24
+ */
25
+ this.getSDK = (name) => {
26
+ return this.sdkPromises[name];
27
+ };
19
28
  this.sitecoreEdgeUrl = props.sitecoreEdgeUrl;
20
29
  this.sitecoreEdgeContextId = props.sitecoreEdgeContextId;
21
30
  this.siteName = props.siteName;
@@ -33,15 +42,6 @@ export class Context {
33
42
  this.initSDK(sdkName);
34
43
  }
35
44
  }
36
- /**
37
- * Retrieves the Software Development Kit (SDK) instance, ensuring it is initialized before returning
38
- *
39
- * @param {string} name SDK name
40
- * @returns initialized SDK
41
- */
42
- getSDK(name) {
43
- return this.sdkPromises[name];
44
- }
45
45
  /**
46
46
  * Initializes the Software Development Kit (SDK)
47
47
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-jss/sitecore-jss-nextjs",
3
- "version": "21.7.0-canary.10",
3
+ "version": "21.7.0-canary.12",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -73,9 +73,9 @@
73
73
  "react-dom": "^18.2.0"
74
74
  },
75
75
  "dependencies": {
76
- "@sitecore-jss/sitecore-jss": "^21.7.0-canary.10",
77
- "@sitecore-jss/sitecore-jss-dev-tools": "^21.7.0-canary.10",
78
- "@sitecore-jss/sitecore-jss-react": "^21.7.0-canary.10",
76
+ "@sitecore-jss/sitecore-jss": "^21.7.0-canary.12",
77
+ "@sitecore-jss/sitecore-jss-dev-tools": "^21.7.0-canary.12",
78
+ "@sitecore-jss/sitecore-jss-react": "^21.7.0-canary.12",
79
79
  "@vercel/kv": "^0.2.1",
80
80
  "node-html-parser": "^6.1.4",
81
81
  "prop-types": "^15.8.1",
@@ -84,7 +84,7 @@
84
84
  },
85
85
  "description": "",
86
86
  "types": "types/index.d.ts",
87
- "gitHead": "1385bba45f39eb4e27f62af1351b60b66a87dac8",
87
+ "gitHead": "2d8bd9f4497c8c4ff4dc8ee7d9ed7df8bf21ca4b",
88
88
  "files": [
89
89
  "dist",
90
90
  "types",
@@ -92,7 +92,7 @@ export declare class Context<SDKModules extends SDKModulesType> {
92
92
  * @param {string} name SDK name
93
93
  * @returns initialized SDK
94
94
  */
95
- getSDK<T extends keyof SDKModules>(name: T): Promise<SDKModules[T]['sdk']> | undefined;
95
+ getSDK: <T extends keyof SDKModules>(name: T) => Promise<SDKModules[T]["sdk"]> | undefined;
96
96
  /**
97
97
  * Initializes the Software Development Kit (SDK)
98
98
  *