pipe-kan 0.24.0 → 0.24.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.
Files changed (2) hide show
  1. package/dist/pipe-kan.js +16 -4
  2. package/package.json +1 -1
package/dist/pipe-kan.js CHANGED
@@ -311,6 +311,14 @@ function parseFlags(flags) {
311
311
  function flagsToJql(flags) {
312
312
  return parseFlags(flags).jql;
313
313
  }
314
+ function argvToFlags(argv) {
315
+ const args = argv.slice(2);
316
+ if (args.length === 0)
317
+ return "";
318
+ if (args.length === 1 && !args[0].startsWith("-"))
319
+ return args[0];
320
+ return args.join(" ");
321
+ }
314
322
 
315
323
  // src/store.ts
316
324
  var ME = {
@@ -1030,18 +1038,20 @@ function createApp(opts) {
1030
1038
  // src/boot.ts
1031
1039
  async function createBoardApp(opts) {
1032
1040
  const env = opts.env ?? process.env;
1041
+ const flags = opts.flags ?? "";
1033
1042
  const store = IssueStore.fromRaw(opts.raw);
1034
1043
  const bin = resolveJiraBin(env.JIRA_BIN ?? "jira", env.PATH ?? "");
1035
1044
  const cli = bin ? createJiraCli({
1036
1045
  bin,
1037
1046
  configPath: env.JIRA_CONFIG_FILE,
1038
- token: env.JIRA_API_TOKEN
1039
- }) : createStoreCli(store);
1047
+ token: env.JIRA_API_TOKEN,
1048
+ flags
1049
+ }) : createStoreCli(store, flags);
1040
1050
  const app = createApp({ store, cli });
1041
1051
  if (opts.piped) {
1042
1052
  app.hydrate(opts.raw);
1043
1053
  } else {
1044
- const local = createStoreCli(store);
1054
+ const local = createStoreCli(store, flags);
1045
1055
  app.hydrate(JSON.parse(await local.list(app.flags)), { fromStore: true });
1046
1056
  }
1047
1057
  return { app, store, kind: bin ? "jira" : "store" };
@@ -12069,9 +12079,11 @@ function announce(line) {
12069
12079
  async function runServer(opts) {
12070
12080
  const piped = await readPipe();
12071
12081
  const raw = piped ?? JSON.parse(readFileSync4(join8(opts.root, "fixtures/issues.json"), "utf8"));
12082
+ const flags = argvToFlags(process.argv);
12072
12083
  const { app, store, kind } = await createBoardApp({
12073
12084
  raw,
12074
- piped: Boolean(piped)
12085
+ piped: Boolean(piped),
12086
+ flags
12075
12087
  });
12076
12088
  const server = createServer((req, res) => {
12077
12089
  if (handleRequest(req, res, { app, store }))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipe-kan",
3
- "version": "0.24.0",
3
+ "version": "0.24.1",
4
4
  "description": "Local Kanban for jira-cli",
5
5
  "license": "MIT",
6
6
  "type": "module",