Skip to content

Commit

Permalink
Merge branch 'develop' into page-request-response-2
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarta committed Aug 30, 2022
2 parents f6d28ac + 29377d4 commit 0909a43
Show file tree
Hide file tree
Showing 88 changed files with 2,716 additions and 1,953 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
"packages/*"
],
"version": "2.2.0-dev",
"version": "2.3.0-dev",
"publish": {
"allowBranch": [
"master"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pwa-kit",
"version": "2.2.0-dev",
"version": "2.3.0-dev",
"engines": {
"node": "^14.0.0",
"npm": "^6.14.4 || ^7.0.0 || ^8.0.0"
Expand Down
2 changes: 2 additions & 0 deletions packages/commerce-sdk-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## v2.3.0-dev (Aug 25, 2022)
## v2.2.0 (Aug 25, 2022)
28 changes: 27 additions & 1 deletion packages/commerce-sdk-react/package-lock.json

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

10 changes: 5 additions & 5 deletions packages/commerce-sdk-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "commerce-sdk-react",
"version": "2.2.0-dev",
"version": "2.3.0-dev",
"description": "A library that provides react hooks for fetching data from Commerce Cloud",
"author": "[email protected]",
"license": "See license in LICENSE",
Expand Down Expand Up @@ -42,13 +42,14 @@
"private": true,
"devDependencies": {
"@tanstack/react-query": "^4.0.10",
"@tanstack/react-query-devtools": "^4.2.1",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^12.1.5",
"@types/node": "^14.18.22",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"cross-env": "^5.2.0",
"internal-lib-build": "^2.2.0-dev",
"internal-lib-build": "^2.3.0-dev",
"nock": "^13.2.9",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand All @@ -57,11 +58,10 @@
"watch": "^1.0.2"
},
"peerDependencies": {
"react": "^17",
"@tanstack/react-query": "^4"
"@tanstack/react-query": "^4",
"react": "^17"
},
"dependencies": {

"commerce-sdk-isomorphic": "^1.7.0"
}
}
24 changes: 24 additions & 0 deletions packages/commerce-sdk-react/scripts/version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env node
/*
* Copyright (c) 2021, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
// Update Change Log heading
const pkg = require('../package.json')
const path = require('path')
const os = require('os')
const fs = require('fs')

const date = new Date()
.toString()
.split(' ')
.slice(1, 4)
const heading = `## v${pkg.version} (${date[0]} ${date[1]}, ${date[2]})\n`

const changelog = path.resolve(os.tmpdir(), 'CHANGELOG.md')

fs.writeFileSync(changelog, heading, 'utf8')
fs.appendFileSync(changelog, fs.readFileSync('CHANGELOG.md'), 'utf8')
fs.copyFileSync(changelog, 'CHANGELOG.md')
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[
{
"scope": "http://localhost:3000",
"method": "GET",
"path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories?ids=womens-clothing%2Cmens-clothing&levels=2&siteId=RefArchGlobal",
"body": "",
"status": 200,
"response": [
"1f8b0800000000000003ec944d6fdb300c86effd15840fdb258efbb10c6b8e4b2fc556f490023b0c43c148b4a34d1603916e9a0efbef83dc74ab53a75fdba1875e8248a425f2a5dee7e70e40e65ded341bc3fe20ad2c2a6663f8ba0300f0b3fd05c80c2a551c1dc99fd8ed789be36c36866cc93505c9b9d1d2a964834e468d15a5a4b9ea42c645717515cb7c77776f2818ec8c2f878dec1e0cede5d0705d5334643c377628e8494a8e8652a0e05058aa31d825461a8aa23a53e4c5d429492eca91cac84173838a9eabbcce03879cd25725365e0bbbfc604687fbb3f765d196248578d6429ad9f90c43a0288541cdafffe7dd8e86df1755b7ab8075dbd4695fcb0bace888c444b750c721e5f1b6bc33a79eeec9881474723d88d5f16db18d679dbb50ddf7c15924eacc6e737e7766d839add3e997eb7827fc6bf0f893fb0bee5c31b9c978fe257d2af60eac7bc5add5b78e9ee69c02ce3c4db84ed2666328d10b6de4c89c97c7e18442938d4163433b3dc56ff7cd8d32b9f2e2c5ba67ef60442324fb04f7a476b65be7ec4eb33dbe99ce7901edd37b2b309dbba83284e99ca302060b9e4305e2892e6800a79725473b00a931ea000c4a83be4d331e459c01d19527819223346146a869b460b82ed38165e41a56dc44b0243f4019744e504542056ed43247015498",
"ac9586492bf5dd1e3ed16ac9d1cadf1183a4d207b05ed948b2b9b7e40b0a1b7b5c96ced0c6e6baaf76f31e9edc88966406178c6fac0bd55abb37f03929375d2b37698f1cc064add31b38e148af28fa27146d77f55d1b3c9b4609360fc16833eeae6832c7a8c7470fced09c279b7f6c5d7dfc6250b46bcbd1e1e8803a28f218d2032ffad46f21f44c26b75ea5178b654bef3e1cec213d01cbeb8eb693f9a8afe587e0bc3eb5852b7a0f6c0c8ae3701b3e25c73a71862e28a475cbe66b9cb9000817181de90ab804c3be17b78f20ded14625a73795bc02edff00adcf12bd0fa88dff060000ffff",
"ec98c16edb300c86ef7b0a9eda8b13b4c65620d8a92b3060dd6143d617602c2676625b0545c7cbdb0fb4652371eca409ba211872952c4ab4f47ff8c94b3359332b62b38b157418de4d66e1fdc71304ed331a16f497be948f09fa856de188dd187e324692449572d16d46624725213776aa8c89694dacdee99609624243660c4f31452b754ef09264336225f4ad833966b670c0c5624126a82cdc2845270a04f17b06b024cc9d9a385e5878c55c5c458bcc329debc1aa28ad8d5ac5b84a3a635bbb056a0b67285b47f2033bd3ae6bcb7603fa2c1adb477992d5636fc098bf34f8d6e2f3bb1ed9a95de38575417b43013c6bccab6d7b57caf571a257557f9772a7b9b73399b8c4684597dbb90923a2fbaee13bcc449fd130139feb0fe0069e2cca896cf48b837a2ddcc08f4288158ae3b688f225e348c80919582067a4182b138941184da2a1b592934daaf2362498a40e2456cab05d27a62d4e03487257a4a84b2a10123a529f94d93569dc00ca18a5c2b056ad25a1c4c4e7a272d9e4d7c0cd6ea32ef5c1bb5f9528c4af6ced7c6fca9f9eccdecc9a5c370430b9c409e602bd0fb31797ed0d6c0173fb8ed39422b9bac0f7e363dfd51c54d87fc0c939914a75c4642e9595f34fe1643e79c01358c9648639f9b54e19a664dec6486da035a29c92815f7aecb16fde05e0144d956959e549f53a6a4f975635a01ee530a1584de39034bb5c70d0bc7878ac37e849e30a80f300302486c1e7f3afcac10f9da8477ed20589f76e3e9985480f2788b7496747c1fbf7ddce1cb336cd8a314c29c5dfaa3649324ab563edfbe84e2b3d8850e59a6ec0e69febde795ddf8885c8b229d86eaa9aed0f000000ffff",
"ec9a4d6ec2301085f73d450ed048905242ba44add42ed22ee8058c312815b5911dab82d35763e71f3b3841a05075074ab063e2797ef3cd14110f574486f05fe586781cd10dd1b087a6e47bc738e27b457e24d73f2598f908fe4e40f2c9868aa78cc7eb6c4b1df776446473372cb70a85ed0048587c691aff765d29ddc64739eca71a2fcfe01a79598be4d8ee395219eb596516f1a6b2743af5cc431e2bc971dc9d88e4b663dc1d540f1452231c91301c3f1a21358471f6d9870b7acb1943faaef2be7a94e6eb922de480ebf3e3092651300d5dc44f2d4badc6ee5c163271cdeb62257d6a3c858d97522414148f716fb7254848b0302ff48bedb5d4d558f52a59af09846b4ec414d796a95bb5b05096187465513cc33c7f06184d57e84e3b978bf89676d712f7f42c57702ca736bf61bb5c374919a06e4d8360860282bae856231a1d8f999b4250cb083fe05910398bd3650054fcb7f1531d3e55d193193c59b1930d3a5591534fe0547b0546d834dfa2c38170f12fd7e7c8f54df1a59beba1c0eb49309a8e669d65beaa6bbd845e558f7d9d080ed68a4641b8c22176b7a23aaf6d6fa9c8185817a5af748a096b8f04e4d8da7896ad1622e5c90e92f7a54c5346bd15fba1f71e2c34e18c16d4ad437b455c3657640ba9b695e5d3cdf574cf6aba7746fdb75f000000ffff",
"ec9ad10e822014865fa527708892f0106e6d6ede8bc665b57affad71bc9012944356ac7800060738df76f67fe3767ec964e26140dfb83fda47b5b20821c779c74b515568c8c15d1b3d1d04ba9b562de315c728a7392b150271e745c435967257e6edcb1550050b35dd7afd04a76cd7da666bad6d0700ab1937b19f2e11083540cfefd0f603fe7e84cea55244a8237e849e5a2c8838201fc50a9ca2a232e764f0060e54e3e6cd615eec326e3614da1e19f415a9cd54dae6425bb8ce6691d94c950d21b28db70ecff406892d811ac3014be7a47119012f36889e33b247237d82d86a3e1d7d3a5d0c8c482a3a6f826f954dd73f924c67ee68fa39983662698f50ba7644d2906984c4d1af86d1c6fa3b000000ffff",
"c25b8892d0baa1eb343417cc24b0294a25f9258939a0edd25cb500000000ffff",
"0300772c72733f3d0000"
],
"rawHeaders": [
"date",
"Tue, 23 Aug 2022 19:16:41 GMT",
"content-type",
"application/json;charset=UTF-8",
"transfer-encoding",
"chunked",
"connection",
"close",
"cf-ray",
"73f62f1d6d13a70f-PHX",
"allow",
"GET, HEAD, OPTIONS",
"cache-control",
"public, must-revalidate, max-age=900",
"strict-transport-security",
"max-age=31536000; includeSubdomains;",
"vary",
"accept-encoding",
"cf-cache-status",
"DYNAMIC",
"_sfdc_personalization_group_id",
"e2f546e3a8fd618560d80ce9ea16b40223dc2b67fe53352238d5396843eac93c",
"expect-ct",
"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"",
"jweb",
"y",
"x-content-type-options",
"nosniff, nosniff",
"x-correlation-id",
"73f62f1d6d13a70f",
"x-envoy-upstream-service-time",
"34",
"x-frame-options",
"SAMEORIGIN",
"x-ratelimit-limit",
"11700",
"x-ratelimit-remaining",
"11700",
"x-xss-protection",
"1; mode=block",
"server",
"cloudflare",
"content-encoding",
"gzip",
"x-proxy-request-url",
"https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories?ids=womens-clothing%2Cmens-clothing&levels=2&siteId=RefArchGlobal"
],
"responseIsBinary": false
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[
{
"scope": "http://localhost:3000",
"method": "GET",
"path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories/newarrivals?siteId=RefArchGlobal",
"body": "",
"status": 200,
"response": [
"1f8b0800000000000003000000ffff",
"e4954d6f1b470c86effa15c41e92cb7e284e1ddb425d207151c005940470d01caac2a066b9da716687c2909b8d12e4bf173bfab6e4c0e929482fd200e472c899f77de6cb002031a834e360499211fc3d0000f8127f01125b2623483c751882fd884eb28e1bf292a49b8c0667d427d5aa731915c5e7cfa1ca86c367b9a02fa7fc296f65f83c2f3fe5869b868221e3b82d734147527130d4070af645490dfab2c340b928aa354556dc5825c944395015d86b6650d1f12c6b32cf3ea3feab0a5ba745d90dab8be909d28b22b6248538d642dae9ed14bda7208541cd96ebd5149971acb5f5b3fc6e3edb8ee4b18913bdbf37ea1c67f43b890976ae967d9ff29a3a78b93a1ab01e9675a142a92d7b9c3a02f425882e9c951a6e6a2649e10ecd0752892140e780b5a600eb6ea0e200ad9f126aac60b8a9382894b800ebd3f8cfade6f036a0516bd0c54abb9bf61b92405753a08f14406b023606c5b2cff7277a67d5d1b159e2f84f05fe60d68e30a4f0a6550acbe5d5bad727f0d21812590a68a77220af574b692daeefcbe8a1c4778168a3c25d251e57e3a6ccdebded0e926c12bea68f2c7a5fe2c734b1adba5afdb319c8dc52bc832b6efad9921154e88476e2527377edc7e4db64041adabd98637d15357afdc3180bcd059d9d3d3bdd3396435f5a3f8ba65aadb33e3065556e8e1a6cb0730ddf20cc8fca97e7e5e9707a72818fe1cb23e832fe5eb6f41fc01e3bfe3b3052209445a69cf5763ec0c582dba781a0262ca97c2c2fc691166b30a470d35a959f910f0fd361fcbf63c3f9399eff727176f63d6c88e6280389486d83ca0e1c06abd37ae02a8f5f618c1c31d04dcdf3f8bc7aea00b74a35aeed5b5a3ed6d148f1d1361be5de51472e2c52c0ad745390959e1b0e04a870b53ada5ef26db9ed626390f79bfad1baf7fdb275ca9febfd76ac024f60cc81d6650fdd1298f55874cf220f63f6104887b6d85ec737849b98dbc889d08b7629cfbedaafb699013abd9cec83224a779280047339f969deb649029d2db5be9c242727a793048adf9283c379132cf9bec9a53cffa21059bc4e3cb0fee0ebbf000000ffff",
"03008b50d7bca00b0000"
],
"rawHeaders": [
"date",
"Tue, 23 Aug 2022 19:16:41 GMT",
"content-type",
"application/json;charset=UTF-8",
"transfer-encoding",
"chunked",
"connection",
"close",
"cf-ray",
"73f62f214f76a71a-PHX",
"allow",
"GET, HEAD, OPTIONS",
"cache-control",
"public, must-revalidate, max-age=900",
"strict-transport-security",
"max-age=31536000; includeSubdomains;",
"vary",
"accept-encoding",
"cf-cache-status",
"DYNAMIC",
"_sfdc_personalization_group_id",
"e2f546e3a8fd618560d80ce9ea16b40223dc2b67fe53352238d5396843eac93c",
"expect-ct",
"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"",
"jweb",
"y",
"x-content-type-options",
"nosniff, nosniff",
"x-correlation-id",
"73f62f214f76a71a",
"x-envoy-upstream-service-time",
"14",
"x-frame-options",
"SAMEORIGIN",
"x-ratelimit-limit",
"11700",
"x-ratelimit-remaining",
"11699",
"x-xss-protection",
"1; mode=block",
"server",
"cloudflare",
"content-encoding",
"gzip",
"x-proxy-request-url",
"https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories/newarrivals?siteId=RefArchGlobal"
],
"responseIsBinary": false
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
[
{
"scope": "http://localhost:3000",
"method": "GET",
"path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories/abc?siteId=RefArchGlobal",
"body": "",
"status": 404,
"response": {
"title": "Category Not Found",
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/category-not-found",
"detail": "No category with ID 'abc' for site 'RefArchGlobal' could be found.",
"categoryId": "abc",
"siteId": "RefArchGlobal"
},
"rawHeaders": [
"date",
"Tue, 23 Aug 2022 19:16:42 GMT",
"content-type",
"application/problem+json; charset=UTF-8",
"content-length",
"272",
"connection",
"close",
"host",
"lb001-mprd-use1.cloudhub.commercecloud.salesforce.com",
"cf-ew-via",
"15",
"cdn-loop",
"cloudflare; subreqs=1",
"x-real-ip",
"162.158.142.225",
"x-forwarded-proto",
"https",
"cf-ray",
"73f62f244e2b1afb-PHX",
"accept-encoding",
"gzip",
"accept",
"*/*",
"strict-transport-security",
"max-age=31536000; includeSubdomains;",
"user-agent",
"Amazon CloudFront",
"cf-cache-status",
"DYNAMIC",
"_is_allowed",
"true",
"_sfdc_badge",
"1fd0c2e5-f426-40d3-bf3b-e6a9ba2c22b6",
"_sfdc_c2c_jti",
"C2C4856201860-189067890319256445710512518",
"_sfdc_client_id",
"c9c45bfd-0ed3-4aa2-9971-40f88962b836",
"_sfdc_customer_id",
"c89ed2ba-78ef-4b54-ae2b-388d193b7ab6",
"_sfdc_customer_idp",
"slas",
"_sfdc_customer_login",
"guest",
"_sfdc_customer_type",
"guest",
"_sfdc_customer_visit_id",
"c89ed2ba-78ef-4b54-ae2b-388d193b7ab6",
"_sfdc_org_id",
"f_ecom_zzrf_001",
"_sfdc_shopperjwt_type",
"slas",
"cf-connecting-ip",
"13.110.54.14",
"cf-visitor",
"{\"scheme\":\"https\"}",
"cf-worker",
"commerce-api-eu.api.commercecloud.salesforce.com",
"expect-ct",
"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"",
"true-client-ip",
"13.110.54.14",
"x-correlation-id",
"73f62f244e2b1afb",
"x-forwarded-for",
"13.110.54.14, 162.158.142.225",
"x-forwarded-host",
"kv7kzm78.api.commercecloud.salesforce.com",
"x-forwarded-proto-real",
"https",
"x-mobify",
"true",
"x-ssl-client-dn",
"/C=US/ST=California/L=San Francisco/O=salesforce.com, inc./CN=cloudflare.api.commercecloud.salesforce.com",
"x-ssl-client-serial",
"6283AC6B34ED9D02",
"x-ssl-client-verify",
"SUCCESS",
"x-ssl-issuer",
"/C=US/ST=California/L=San Francisco/O=salesforce.com, inc./CN=salesforce.com Internal CA PHX 2",
"Vary",
"Accept-Encoding",
"server",
"cloudflare",
"x-proxy-request-url",
"https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories/abc?siteId=RefArchGlobal"
],
"responseIsBinary": false
}
]
Loading

0 comments on commit 0909a43

Please sign in to comment.