@comet/cli 8.0.0-canary-20240731111743 → 8.0.0-canary-20240910091753

Sign up to get free protection for your applications and to get access to all the features.
@@ -122,12 +122,12 @@ exports.injectSiteConfigsCommand = new commander_1.Command("inject-site-configs"
122
122
  return domain.includes("localhost") ? "http://".concat(domain) : "https://".concat(domain);
123
123
  };
124
124
  replacerFunctions = {
125
- private: function (siteConfigs) {
125
+ private: function (siteConfigs, env) {
126
126
  return siteConfigs.map(function (siteConfig) {
127
127
  return (function (_a) {
128
- var _b;
128
+ var _b, _c;
129
129
  var publicVars = _a.public, rest = __rest(_a, ["public"]);
130
- return (__assign(__assign(__assign({}, publicVars), rest), { url: getUrlFromDomain((_b = siteConfig.domains.preliminary) !== null && _b !== void 0 ? _b : siteConfig.domains.main) }));
130
+ return (__assign(__assign(__assign({}, publicVars), rest), { url: getUrlFromDomain((_b = siteConfig.domains.preliminary) !== null && _b !== void 0 ? _b : siteConfig.domains.main), preloginEnabled: (_c = siteConfig.preloginEnabled) !== null && _c !== void 0 ? _c : !["prod", "local"].includes(env) }));
131
131
  })(siteConfig);
132
132
  });
133
133
  },
@@ -151,7 +151,7 @@ exports.injectSiteConfigsCommand = new commander_1.Command("inject-site-configs"
151
151
  console.error("inject-site-configs: ERROR: type must be ".concat(Object.keys(replacerFunctions).join("|"), " (got ").concat(type, ")"));
152
152
  return [2 /*return*/, substr];
153
153
  }
154
- ret = JSON.stringify(replacerFunctions[type](siteConfigs)).replace(/\\/g, "\\\\");
154
+ ret = JSON.stringify(replacerFunctions[type](siteConfigs, env)).replace(/\\/g, "\\\\");
155
155
  if (options.dotenv)
156
156
  return [2 /*return*/, ret.replace(/\$/g, "\\$")];
157
157
  return [2 /*return*/, ret];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comet/cli",
3
- "version": "8.0.0-canary-20240731111743",
3
+ "version": "8.0.0-canary-20240910091753",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/vivid-planet/comet",
@@ -21,7 +21,7 @@
21
21
  "prettier": "^2.7.1"
22
22
  },
23
23
  "devDependencies": {
24
- "@comet/eslint-config": "8.0.0-canary-20240731111743",
24
+ "@comet/eslint-config": "8.0.0-canary-20240910091753",
25
25
  "@types/node": "^18.0.0",
26
26
  "eslint": "^8.0.0",
27
27
  "npm-run-all": "^4.1.5",