@chipi-stack/nextjs 7.0.0 → 8.0.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.
|
@@ -29,7 +29,7 @@ async function ChipiProvider({ children }) {
|
|
|
29
29
|
const secretKey = process.env.CHIPI_SECRET_KEY;
|
|
30
30
|
let environment = "production";
|
|
31
31
|
console.log(
|
|
32
|
-
"process.env.
|
|
32
|
+
"process.env.NEXT_PUBLIC_CHIPI_ENV",
|
|
33
33
|
process.env.NEXT_PUBLIC_CHIPI_ENV
|
|
34
34
|
);
|
|
35
35
|
if (process.env.NEXT_PUBLIC_CHIPI_ENV === "development") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/app-router/server/ChipiProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport { createChipiServer } from \"../../server/createChipiServer\";\nimport { ChipiProvider as ChipiClientProvider } from \"../client/ChipiProvider\";\n\nexport interface ChipiProviderProps {\n children: React.ReactNode;\n}\n\n/**\n * Server-side Chipi Provider for Next.js App Router\n *\n * This is the server component version that runs during SSR.\n * It initializes the server SDK and passes configuration to the client provider.\n */\nexport async function ChipiProvider({ children }: ChipiProviderProps) {\n // Read environment variables on the server\n const apiPublicKey = process.env.NEXT_PUBLIC_CHIPI_API_KEY;\n const secretKey = process.env.CHIPI_SECRET_KEY;\n let environment = \"production\" as \"production\" | \"development\";\n console.log(\n \"process.env.
|
|
1
|
+
{"version":3,"sources":["../../../../src/app-router/server/ChipiProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport { createChipiServer } from \"../../server/createChipiServer\";\nimport { ChipiProvider as ChipiClientProvider } from \"../client/ChipiProvider\";\n\nexport interface ChipiProviderProps {\n children: React.ReactNode;\n}\n\n/**\n * Server-side Chipi Provider for Next.js App Router\n *\n * This is the server component version that runs during SSR.\n * It initializes the server SDK and passes configuration to the client provider.\n */\nexport async function ChipiProvider({ children }: ChipiProviderProps) {\n // Read environment variables on the server\n const apiPublicKey = process.env.NEXT_PUBLIC_CHIPI_API_KEY;\n const secretKey = process.env.CHIPI_SECRET_KEY;\n let environment = \"production\" as \"production\" | \"development\";\n console.log(\n \"process.env.NEXT_PUBLIC_CHIPI_ENV\",\n process.env.NEXT_PUBLIC_CHIPI_ENV\n );\n if (process.env.NEXT_PUBLIC_CHIPI_ENV === \"development\") {\n environment = \"development\";\n }\n\n console.log(\"environment\", environment);\n // Validate required environment variables\n if (!apiPublicKey) {\n throw new Error(\n \" NEXT_PUBLIC_CHIPI_API_KEY environment variable. Please add it to your .env file.\"\n );\n }\n\n if (!secretKey) {\n throw new Error(\n \"Missing CHIPI_SECRET_KEY environment variable. Server-side features will not work properly.\"\n );\n }\n\n // Initialize server SDK (this runs on server only)\n createChipiServer({\n secretKey,\n apiPublicKey,\n environment,\n debug: environment === \"development\",\n });\n\n // Return the client provider which will hydrate on the client\n // Note: This works because ChipiClientProvider is marked with 'use client'\n return (\n <ChipiClientProvider apiPublicKey={apiPublicKey} environment={environment}>\n {children}\n </ChipiClientProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoDI;AAnDJ,+BAAkC;AAClC,2BAAqD;AAYrD,eAAsB,cAAc,EAAE,SAAS,GAAuB;AAEpE,QAAM,eAAe,QAAQ,IAAI;AACjC,QAAM,YAAY,QAAQ,IAAI;AAC9B,MAAI,cAAc;AAClB,UAAQ;AAAA,IACN;AAAA,IACA,QAAQ,IAAI;AAAA,EACd;AACA,MAAI,QAAQ,IAAI,0BAA0B,eAAe;AACvD,kBAAc;AAAA,EAChB;AAEA,UAAQ,IAAI,eAAe,WAAW;AAEtC,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,MAAI,CAAC,WAAW;AACd,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAGA,kDAAkB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,gBAAgB;AAAA,EACzB,CAAC;AAID,SACE,4CAAC,qBAAAA,eAAA,EAAoB,cAA4B,aAC9C,UACH;AAEJ;","names":["ChipiClientProvider"]}
|
|
@@ -6,7 +6,7 @@ async function ChipiProvider({ children }) {
|
|
|
6
6
|
const secretKey = process.env.CHIPI_SECRET_KEY;
|
|
7
7
|
let environment = "production";
|
|
8
8
|
console.log(
|
|
9
|
-
"process.env.
|
|
9
|
+
"process.env.NEXT_PUBLIC_CHIPI_ENV",
|
|
10
10
|
process.env.NEXT_PUBLIC_CHIPI_ENV
|
|
11
11
|
);
|
|
12
12
|
if (process.env.NEXT_PUBLIC_CHIPI_ENV === "development") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/app-router/server/ChipiProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport { createChipiServer } from \"../../server/createChipiServer\";\nimport { ChipiProvider as ChipiClientProvider } from \"../client/ChipiProvider\";\n\nexport interface ChipiProviderProps {\n children: React.ReactNode;\n}\n\n/**\n * Server-side Chipi Provider for Next.js App Router\n *\n * This is the server component version that runs during SSR.\n * It initializes the server SDK and passes configuration to the client provider.\n */\nexport async function ChipiProvider({ children }: ChipiProviderProps) {\n // Read environment variables on the server\n const apiPublicKey = process.env.NEXT_PUBLIC_CHIPI_API_KEY;\n const secretKey = process.env.CHIPI_SECRET_KEY;\n let environment = \"production\" as \"production\" | \"development\";\n console.log(\n \"process.env.
|
|
1
|
+
{"version":3,"sources":["../../../../src/app-router/server/ChipiProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport { createChipiServer } from \"../../server/createChipiServer\";\nimport { ChipiProvider as ChipiClientProvider } from \"../client/ChipiProvider\";\n\nexport interface ChipiProviderProps {\n children: React.ReactNode;\n}\n\n/**\n * Server-side Chipi Provider for Next.js App Router\n *\n * This is the server component version that runs during SSR.\n * It initializes the server SDK and passes configuration to the client provider.\n */\nexport async function ChipiProvider({ children }: ChipiProviderProps) {\n // Read environment variables on the server\n const apiPublicKey = process.env.NEXT_PUBLIC_CHIPI_API_KEY;\n const secretKey = process.env.CHIPI_SECRET_KEY;\n let environment = \"production\" as \"production\" | \"development\";\n console.log(\n \"process.env.NEXT_PUBLIC_CHIPI_ENV\",\n process.env.NEXT_PUBLIC_CHIPI_ENV\n );\n if (process.env.NEXT_PUBLIC_CHIPI_ENV === \"development\") {\n environment = \"development\";\n }\n\n console.log(\"environment\", environment);\n // Validate required environment variables\n if (!apiPublicKey) {\n throw new Error(\n \" NEXT_PUBLIC_CHIPI_API_KEY environment variable. Please add it to your .env file.\"\n );\n }\n\n if (!secretKey) {\n throw new Error(\n \"Missing CHIPI_SECRET_KEY environment variable. Server-side features will not work properly.\"\n );\n }\n\n // Initialize server SDK (this runs on server only)\n createChipiServer({\n secretKey,\n apiPublicKey,\n environment,\n debug: environment === \"development\",\n });\n\n // Return the client provider which will hydrate on the client\n // Note: This works because ChipiClientProvider is marked with 'use client'\n return (\n <ChipiClientProvider apiPublicKey={apiPublicKey} environment={environment}>\n {children}\n </ChipiClientProvider>\n );\n}\n"],"mappings":"AAoDI;AAnDJ,SAAS,yBAAyB;AAClC,SAAS,iBAAiB,2BAA2B;AAYrD,eAAsB,cAAc,EAAE,SAAS,GAAuB;AAEpE,QAAM,eAAe,QAAQ,IAAI;AACjC,QAAM,YAAY,QAAQ,IAAI;AAC9B,MAAI,cAAc;AAClB,UAAQ;AAAA,IACN;AAAA,IACA,QAAQ,IAAI;AAAA,EACd;AACA,MAAI,QAAQ,IAAI,0BAA0B,eAAe;AACvD,kBAAc;AAAA,EAChB;AAEA,UAAQ,IAAI,eAAe,WAAW;AAEtC,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,MAAI,CAAC,WAAW;AACd,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAGA,oBAAkB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,gBAAgB;AAAA,EACzB,CAAC;AAID,SACE,oBAAC,uBAAoB,cAA4B,aAC9C,UACH;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chipi-stack/nextjs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Chipi SDK for Next.js applications with server-side support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chipi",
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@tanstack/react-query": "^5.85.0",
|
|
76
|
-
"@chipi-stack/backend": "^
|
|
77
|
-
"@chipi-stack/chipi-react": "^
|
|
78
|
-
"@chipi-stack/types": "^
|
|
79
|
-
"@chipi-stack/shared": "^
|
|
76
|
+
"@chipi-stack/backend": "^8.0.0",
|
|
77
|
+
"@chipi-stack/chipi-react": "^8.0.0",
|
|
78
|
+
"@chipi-stack/types": "^8.0.0",
|
|
79
|
+
"@chipi-stack/shared": "^8.0.0"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"next": ">=13.0.0",
|