@appdirect/sfb-toolkit 5.0.8 → 5.0.9
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.
- package/coverage/clover.xml +32 -32
- package/coverage/coverage-final.json +4 -4
- package/coverage/lcov-report/constants/customUserAttributesMock.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/pageUrls.js.html +1 -1
- package/coverage/lcov-report/constants/userMock.js.html +1 -1
- package/coverage/lcov-report/controllers/controllers-utils/assetsUtils.js.html +1 -1
- package/coverage/lcov-report/controllers/controllers-utils/index.html +1 -1
- package/coverage/lcov-report/controllers/data-filters/bootstrap-data-filter.js.html +1 -1
- package/coverage/lcov-report/controllers/data-filters/call-to-actions-filter.js.html +1 -1
- package/coverage/lcov-report/controllers/data-filters/index.html +1 -1
- package/coverage/lcov-report/controllers/index.html +1 -1
- package/coverage/lcov-report/controllers/index.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/base/ResultItem.js.html +7 -7
- package/coverage/lcov-report/front-end-utils/src/components/base/SearchBar.js.html +3 -3
- package/coverage/lcov-report/front-end-utils/src/components/base/index.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/base/item.js.html +11 -11
- package/coverage/lcov-report/front-end-utils/src/components/container.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/data-view.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/header-view.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/index.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/search.js.html +13 -13
- package/coverage/lcov-report/front-end-utils/src/constants/index.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/constants/pageUrl.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/constants/roleType.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/constants/searchType.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/utils/debounce.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/utils/index.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/middlewares/config.js.html +1 -1
- package/coverage/lcov-report/middlewares/index.html +1 -1
- package/coverage/lcov-report/tools/index.html +1 -1
- package/coverage/lcov-report/tools/proxy-fetch.js.html +1 -1
- package/coverage/lcov.info +81 -81
- package/npm-shrinkwrap.json +14272 -19798
- package/package.json +3 -3
- package/readme.md +3 -0
- package/src/routes/cors.js +29 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appdirect/sfb-toolkit",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"name": "appdirect/sfb-toolkit"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@appdirect/public-custom-app-ui": "^0.0.
|
|
59
|
-
"@appdirect/sfb-theme-plaza": "0.0.
|
|
58
|
+
"@appdirect/public-custom-app-ui": "^0.0.31",
|
|
59
|
+
"@appdirect/sfb-theme-plaza": "0.0.90",
|
|
60
60
|
"@appdirect/storefront-utils": "latest",
|
|
61
61
|
"@babel/core": "^7.19.1",
|
|
62
62
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
package/readme.md
CHANGED
|
@@ -7,6 +7,9 @@ Storefront Toolkit CLI to power up building your custom theme for AppDirect's Ma
|
|
|
7
7
|
|
|
8
8
|
### Release Notes:
|
|
9
9
|
|
|
10
|
+
**5.0.9**
|
|
11
|
+
- Updated extensions [`@appdirect/public-custom-app-ui@0.0.30`](https://www.npmjs.com/package/@appdirect/public-custom-app-ui/v/0.0.30)
|
|
12
|
+
|
|
10
13
|
**5.0.8**
|
|
11
14
|
- Updated storefront builder components to [`sfb-theme-components@2.1.14`](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/2.1.14)
|
|
12
15
|
|
package/src/routes/cors.js
CHANGED
|
@@ -6,6 +6,7 @@ const userMemberships = require("./mockRoutes/user/memberships");
|
|
|
6
6
|
const marketplaceManagerMemberships = require("./mockRoutes/marketplaceManager/memberships");
|
|
7
7
|
const marketplaceManagerAssignmetns = require("./mockRoutes/marketplaceManager/assignments");
|
|
8
8
|
const marketplaceManagerBootstrapContext = require("./mockRoutes/marketplaceManager/bootstrapContext");
|
|
9
|
+
const fetch = require("../tools/proxy-fetch");
|
|
9
10
|
|
|
10
11
|
const currentPath = process.cwd();
|
|
11
12
|
// eslint-disable-next-line import/no-dynamic-require
|
|
@@ -98,4 +99,32 @@ module.exports = (routes) => {
|
|
|
98
99
|
corsPipe.callApi(req, res);
|
|
99
100
|
}
|
|
100
101
|
});
|
|
102
|
+
routes.post("/api/graphql/preview", async (req, res) => {
|
|
103
|
+
try {
|
|
104
|
+
const response = await fetch(
|
|
105
|
+
`${req.config.marketplacePath}/api/graphql/preview`,
|
|
106
|
+
{
|
|
107
|
+
method: "POST",
|
|
108
|
+
headers: {
|
|
109
|
+
"Content-Type": "application/json",
|
|
110
|
+
},
|
|
111
|
+
body: JSON.stringify({
|
|
112
|
+
query: req.body.query,
|
|
113
|
+
variables: req.body.variables,
|
|
114
|
+
}),
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
if (!response.ok) {
|
|
119
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const data = await response.json();
|
|
123
|
+
res.send({
|
|
124
|
+
...data,
|
|
125
|
+
});
|
|
126
|
+
} catch (error) {
|
|
127
|
+
console.error("Error making GraphQL call:", error);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
101
130
|
};
|