@kntic/kntic 0.9.0 → 0.10.0
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/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -365,6 +365,8 @@ async function init(options = {}) {
|
|
|
365
365
|
if (gitInfo.gitlabToken) {
|
|
366
366
|
autoValues.GITLAB_TOKEN = gitInfo.gitlabToken;
|
|
367
367
|
}
|
|
368
|
+
} else {
|
|
369
|
+
fillEnvValues('.kntic.env', { KNTIC_REMOTE_ENABLED: 'false' });
|
|
368
370
|
}
|
|
369
371
|
if (Object.keys(autoValues).length > 0) {
|
|
370
372
|
fillEnvValues('.kntic.env', autoValues);
|
|
@@ -372,4 +372,11 @@ describe("fillEnvValues", () => {
|
|
|
372
372
|
const content = fs.readFileSync(envPath, "utf8");
|
|
373
373
|
assert.ok(content.includes("GITLAB_TOKEN=glpat-abc123"));
|
|
374
374
|
});
|
|
375
|
+
|
|
376
|
+
it("sets KNTIC_REMOTE_ENABLED=false when called with that value", () => {
|
|
377
|
+
fs.writeFileSync(envPath, "KNTIC_REMOTE_ENABLED=\nGIT_HOST=\n");
|
|
378
|
+
fillEnvValues(envPath, { KNTIC_REMOTE_ENABLED: "false" });
|
|
379
|
+
const content = fs.readFileSync(envPath, "utf8");
|
|
380
|
+
assert.ok(content.includes("KNTIC_REMOTE_ENABLED=false"));
|
|
381
|
+
});
|
|
375
382
|
});
|