flaghoist 0.5.0 → 0.5.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.
@@ -101,6 +101,7 @@ import { randomBytes } from "crypto";
101
101
  import { existsSync, readFileSync, writeFileSync } from "fs";
102
102
  import { join } from "path";
103
103
  import { createInterface } from "readline/promises";
104
+ import { Writable } from "stream";
104
105
  var MIN_PEPPER_LENGTH = 32;
105
106
  var PLATFORMS = [
106
107
  {
@@ -287,13 +288,17 @@ function setupSummary(result, envWritten) {
287
288
  return lines;
288
289
  }
289
290
  function terminalAsker(input = process.stdin, output = process.stdout) {
290
- const rl = createInterface({ input, output, terminal: true });
291
291
  let muted = false;
292
- const internal = rl;
293
- const write = internal._writeToOutput.bind(rl);
294
- internal._writeToOutput = (text) => {
295
- if (!muted) write(text);
296
- };
292
+ const echo = new Writable({
293
+ write(chunk, encoding, done) {
294
+ if (muted) done();
295
+ else output.write(chunk, encoding, done);
296
+ }
297
+ });
298
+ Object.defineProperty(echo, "columns", {
299
+ get: () => output.columns ?? 80
300
+ });
301
+ const rl = createInterface({ input, output: echo, terminal: true });
297
302
  return {
298
303
  interactive: true,
299
304
  async text(question, fallback) {
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  setupSummary,
13
13
  terminalAsker,
14
14
  writeSetup
15
- } from "./chunk-TQ5S6NOA.js";
15
+ } from "./chunk-LZB44MXJ.js";
16
16
 
17
17
  // src/index.ts
18
18
  import { spawnSync } from "child_process";
package/dist/lib.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  storageChoices,
16
16
  terminalAsker,
17
17
  writeSetup
18
- } from "./chunk-TQ5S6NOA.js";
18
+ } from "./chunk-LZB44MXJ.js";
19
19
  export {
20
20
  DEFAULT_CONFIG,
21
21
  MIN_PEPPER_LENGTH,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flaghoist",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Scaffold, deploy, and manage your Flaghoist feature-flag service from the terminal.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -27,9 +27,9 @@
27
27
  "@flaghoist/admin-client": "0.3.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@flaghoist/core": "0.2.0",
31
30
  "@flaghoist/server": "0.4.0",
32
- "@flaghoist/adapter-memory": "0.2.0"
31
+ "@flaghoist/adapter-memory": "0.2.0",
32
+ "@flaghoist/core": "0.2.0"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"