@commercetools-frontend/mc-scripts 21.0.0-rc.5 → 21.0.0-rc.7
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.
|
@@ -73,13 +73,10 @@ module.exports = ({
|
|
|
73
73
|
devServer.app.set('views', devAuthentication.views);
|
|
74
74
|
devServer.app.set('view engine', devAuthentication.config.viewEngine);
|
|
75
75
|
devServer.app.post('/api/graphql', (request, response) => {
|
|
76
|
-
response.statusCode =
|
|
76
|
+
response.statusCode = 404;
|
|
77
77
|
response.setHeader('Content-Type', 'application/json');
|
|
78
|
-
const errorMessage = `This GraphQL endpoint is not available in ${process.env.NODE_ENV} mode, as it's not necessary. The menu configuration is loaded from the file "menu.json" (more info at https://www.npmjs.com/package/@commercetools-frontend/application-shell). In case you do need to test things out, you can pass a "mcProxyApiUrl" to your application config (in the "additionalEnv" properties) and point it to the production environment, for example for GCP-EU use "https://mc.europe-west1.gcp.commercetools.com/api/graphql".`;
|
|
79
|
-
const fakeApolloError = new Error(errorMessage);
|
|
80
78
|
response.end(JSON.stringify({
|
|
81
|
-
|
|
82
|
-
error: fakeApolloError
|
|
79
|
+
message: `This GraphQL endpoint is only available in production in the [Merchant Center Proxy Router](https://docs.commercetools.com/custom-applications/concepts/merchant-center-proxy-router). Please check that you are not calling this endpoint in development mode.`
|
|
83
80
|
}));
|
|
84
81
|
});
|
|
85
82
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/mc-scripts",
|
|
3
|
-
"version": "21.0.0-rc.
|
|
3
|
+
"version": "21.0.0-rc.7",
|
|
4
4
|
"description": "Configuration and scripts for developing a MC application",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.16.7",
|
|
30
30
|
"@babel/runtime-corejs3": "^7.16.8",
|
|
31
|
-
"@commercetools-frontend/application-config": "21.0.0-rc.
|
|
31
|
+
"@commercetools-frontend/application-config": "21.0.0-rc.7",
|
|
32
32
|
"@commercetools-frontend/assets": "21.0.0-rc.1",
|
|
33
|
-
"@commercetools-frontend/babel-preset-mc-app": "21.0.0-rc.
|
|
33
|
+
"@commercetools-frontend/babel-preset-mc-app": "21.0.0-rc.7",
|
|
34
34
|
"@commercetools-frontend/mc-dev-authentication": "21.0.0-rc.1",
|
|
35
|
-
"@commercetools-frontend/mc-html-template": "21.0.0-rc.
|
|
35
|
+
"@commercetools-frontend/mc-html-template": "21.0.0-rc.7",
|
|
36
36
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
|
|
37
37
|
"@svgr/webpack": "6.2.0",
|
|
38
38
|
"autoprefixer": "10.4.2",
|