zcatalyst-cli 1.15.0-beta.0 → 1.15.0-beta.1

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.
@@ -25,13 +25,19 @@ exports.default = (proxyInstance, customProxyUrl) => (req, res) => {
25
25
  });
26
26
  }
27
27
  else {
28
+ const headers = {};
29
+ if (req.url.match(/accounts\/p\/[0-9]+\/webclient\/v1\/captcha/g)) {
30
+ headers['origin'] = `https://${req.headers['x-zc-project-domain']}`;
31
+ }
32
+ if (req.url.includes('/__catalyst/auth/')) {
33
+ const masterPort = runtime_store_1.default.get('context.port.http.master', 3000);
34
+ headers['catalyst-redirect-domain'] = `http://localhost:${masterPort}`;
35
+ }
28
36
  proxyInstance.web(req, res, {
29
37
  target: `https://${req.headers['x-zc-project-domain']}`,
30
38
  changeOrigin: true,
31
39
  ws: true,
32
- headers: req.url.match(/accounts\/p\/[0-9]+\/webclient\/v1\/captcha/g)
33
- ? { origin: `https://${req.headers['x-zc-project-domain']}` }
34
- : undefined
40
+ headers
35
41
  });
36
42
  }
37
43
  };
@@ -54,7 +54,7 @@ const proxyResponseHandler = (systemRoutes) => (proxyRes, req, res) => {
54
54
  proxyRes.headers['set-cookie'] = result;
55
55
  }
56
56
  }
57
- else if (req.url.startsWith('/baas')) {
57
+ else if (req.url.startsWith('/baas') || req.url.startsWith('/__catalyst')) {
58
58
  if (req.url.includes('/signin-redirect')) {
59
59
  if (systemRoutes === undefined) {
60
60
  redirectByAuth(req, res, '/app/local-redirect');
@@ -46,13 +46,7 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
46
46
  const httpServer = new http_functions_1.default({ repl: replServer });
47
47
  const projectRoot = runtime_store_1.default.get('project.root');
48
48
  try {
49
- yield (0, prepare_1.default)([
50
- constants_1.FN_TYPE.basic,
51
- constants_1.FN_TYPE.cron,
52
- constants_1.FN_TYPE.event,
53
- constants_1.FN_TYPE.integration,
54
- constants_1.FN_TYPE.browserLogic
55
- ]);
49
+ yield (0, prepare_1.default)([constants_1.FN_TYPE.basic, constants_1.FN_TYPE.cron, constants_1.FN_TYPE.event, constants_1.FN_TYPE.integration]);
56
50
  const targets = runtime_store_1.default
57
51
  .get('context.functions.targets', [])
58
52
  .filter((target) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zcatalyst-cli",
3
- "version": "1.15.0-beta.0",
3
+ "version": "1.15.0-beta.1",
4
4
  "description": "Command Line Tool for CATALYST",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {