Skip to content

Commit

Permalink
Update plug and SDK to the latest versions (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospassos committed Jun 15, 2023
1 parent af74cb3 commit 963d6bb
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion examples/next-ssr-app/lib/utils/evaluate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('evaluate', () => {
apiKey: API_KEY,
clientId: headers.get(Header.CLIENT_ID),
clientIp: headers.get(Header.CLIENT_IP),
userAgent: headers.get(Header.USER_AGENT),
clientAgent: headers.get(Header.USER_AGENT),
context: {
page: {
url: headers.get(Header.REQUEST_URI),
Expand Down
4 changes: 2 additions & 2 deletions examples/next-ssr-app/lib/utils/evaluate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ export function evaluate<T extends JsonValue>(query: string, options: Evaluation
const referrer = headers.get(Header.REFERRER);
const clientId = headers.get(Header.CLIENT_ID);
const clientIp = headers.get(Header.CLIENT_IP);
const userAgent = headers.get(Header.USER_AGENT);
const clientAgent = headers.get(Header.USER_AGENT);

return executeQuery<T>(query, {
apiKey: process.env.CROCT_API_KEY!,
timeout: 100,
...(clientId !== null && {clientId: clientId}),
...(clientIp !== null && {clientIp: clientIp}),
...(userAgent !== null && {userAgent: userAgent}),
...(clientAgent !== null && {clientAgent: clientAgent}),
...(uri !== null
? {
context: {
Expand Down
2 changes: 1 addition & 1 deletion examples/next-ssr-app/lib/utils/fetchContent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('fetchContent', () => {
apiKey: API_KEY,
clientId: headers.get(Header.CLIENT_ID),
clientIp: headers.get(Header.CLIENT_IP),
userAgent: headers.get(Header.USER_AGENT),
clientAgent: headers.get(Header.USER_AGENT),
context: {
page: {
url: headers.get(Header.REQUEST_URI),
Expand Down
4 changes: 2 additions & 2 deletions examples/next-ssr-app/lib/utils/fetchContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ export function fetchContent<I extends VersionedSlotId, C extends JsonObject>(
const referrer = headers.get(Header.REFERRER);
const clientId = headers.get(Header.CLIENT_ID);
const clientIp = headers.get(Header.CLIENT_IP);
const userAgent = headers.get(Header.USER_AGENT);
const clientAgent = headers.get(Header.USER_AGENT);

const promise = loadContent<I, C>(slotId, {
apiKey: process.env.CROCT_API_KEY!,
timeout: 100,
...(previewToken !== null && {previewToken: previewToken}),
...(clientId !== null && {clientId: clientId}),
...(clientIp !== null && {clientIp: clientIp}),
...(userAgent !== null && {userAgent: userAgent}),
...(clientAgent !== null && {clientAgent: clientAgent}),
...(uri !== null
? {
context: {
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
"dependencies": {
"@croct/plug": "^0.13.1",
"@croct/sdk": "^0.13.0"
"@croct/plug": "^0.13.3",
"@croct/sdk": "^0.14.0"
},
"devDependencies": {
"@babel/core": "^7.20.2",
Expand Down

0 comments on commit 963d6bb

Please sign in to comment.