@reporting-bi/cli 0.1.13 → 0.1.14

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/index.js +125 -58
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2533,11 +2533,11 @@ var require_lib = __commonJS({
2533
2533
  "../../.yarn/cache/qs-npm-6.15.0-2165244317-ff341078a7.zip/node_modules/qs/lib/index.js"(exports2, module2) {
2534
2534
  "use strict";
2535
2535
  var stringify = require_stringify();
2536
- var parse3 = require_parse();
2536
+ var parse6 = require_parse();
2537
2537
  var formats = require_formats();
2538
2538
  module2.exports = {
2539
2539
  formats,
2540
- parse: parse3,
2540
+ parse: parse6,
2541
2541
  stringify
2542
2542
  };
2543
2543
  }
@@ -6089,24 +6089,24 @@ var require_fast_uri = __commonJS({
6089
6089
  function normalize(uri, options) {
6090
6090
  if (typeof uri === "string") {
6091
6091
  uri = /** @type {T} */
6092
- serialize(parse3(uri, options), options);
6092
+ serialize(parse6(uri, options), options);
6093
6093
  } else if (typeof uri === "object") {
6094
6094
  uri = /** @type {T} */
6095
- parse3(serialize(uri, options), options);
6095
+ parse6(serialize(uri, options), options);
6096
6096
  }
6097
6097
  return uri;
6098
6098
  }
6099
6099
  function resolve8(baseURI, relativeURI, options) {
6100
6100
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
6101
- const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
6101
+ const resolved = resolveComponent(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true);
6102
6102
  schemelessOptions.skipEscape = true;
6103
6103
  return serialize(resolved, schemelessOptions);
6104
6104
  }
6105
6105
  function resolveComponent(base, relative6, options, skipNormalization) {
6106
6106
  const target = {};
6107
6107
  if (!skipNormalization) {
6108
- base = parse3(serialize(base, options), options);
6109
- relative6 = parse3(serialize(relative6, options), options);
6108
+ base = parse6(serialize(base, options), options);
6109
+ relative6 = parse6(serialize(relative6, options), options);
6110
6110
  }
6111
6111
  options = options || {};
6112
6112
  if (!options.tolerant && relative6.scheme) {
@@ -6158,13 +6158,13 @@ var require_fast_uri = __commonJS({
6158
6158
  function equal(uriA, uriB, options) {
6159
6159
  if (typeof uriA === "string") {
6160
6160
  uriA = unescape(uriA);
6161
- uriA = serialize(normalizeComponentEncoding(parse3(uriA, options), true), { ...options, skipEscape: true });
6161
+ uriA = serialize(normalizeComponentEncoding(parse6(uriA, options), true), { ...options, skipEscape: true });
6162
6162
  } else if (typeof uriA === "object") {
6163
6163
  uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
6164
6164
  }
6165
6165
  if (typeof uriB === "string") {
6166
6166
  uriB = unescape(uriB);
6167
- uriB = serialize(normalizeComponentEncoding(parse3(uriB, options), true), { ...options, skipEscape: true });
6167
+ uriB = serialize(normalizeComponentEncoding(parse6(uriB, options), true), { ...options, skipEscape: true });
6168
6168
  } else if (typeof uriB === "object") {
6169
6169
  uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
6170
6170
  }
@@ -6233,7 +6233,7 @@ var require_fast_uri = __commonJS({
6233
6233
  return uriTokens.join("");
6234
6234
  }
6235
6235
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
6236
- function parse3(uri, opts) {
6236
+ function parse6(uri, opts) {
6237
6237
  const options = Object.assign({}, opts);
6238
6238
  const parsed = {
6239
6239
  scheme: void 0,
@@ -6327,7 +6327,7 @@ var require_fast_uri = __commonJS({
6327
6327
  resolveComponent,
6328
6328
  equal,
6329
6329
  serialize,
6330
- parse: parse3
6330
+ parse: parse6
6331
6331
  };
6332
6332
  module2.exports = fastUri;
6333
6333
  module2.exports.default = fastUri;
@@ -9536,13 +9536,23 @@ var ReportingAuthClient = class {
9536
9536
  }
9537
9537
  return tokenInfo;
9538
9538
  }
9539
+ /**
9540
+ * Revokes the session. A SAML2 session answers with `logout_url` - the caller navigates there so
9541
+ * the identity provider session ends too; every other session answers with an empty body.
9542
+ */
9539
9543
  async logout() {
9540
- await this.fetchWithAuth(`${this.options.serviceUrl}/revoke`, {
9544
+ const response = await this.fetchWithAuth(`${this.options.serviceUrl}/revoke`, {
9541
9545
  method: "GET",
9542
9546
  headers: {
9543
9547
  "Content-Type": "application/json"
9544
9548
  }
9545
9549
  });
9550
+ const text2 = response.ok ? await response.text() : "";
9551
+ try {
9552
+ return text2 ? JSON.parse(text2) : {};
9553
+ } catch {
9554
+ return {};
9555
+ }
9546
9556
  }
9547
9557
  redirectToLogin() {
9548
9558
  if (typeof window === "undefined") throw new Error("Not in browser environment");
@@ -9757,13 +9767,13 @@ var Service = class extends EventTarget {
9757
9767
  throw new ServiceException({ data: error48, url: response.url });
9758
9768
  }
9759
9769
  }
9760
- async handleResponse(response, parse3) {
9770
+ async handleResponse(response, parse6) {
9761
9771
  if (!response.ok) {
9762
9772
  await this.handleError(response);
9763
9773
  return null;
9764
9774
  }
9765
9775
  const contentType = response.headers.get("Content-Type");
9766
- if (contentType?.includes("application/json") && parse3 !== false) {
9776
+ if (contentType?.includes("application/json") && parse6 !== false) {
9767
9777
  return await response.json();
9768
9778
  } else {
9769
9779
  return await response.text();
@@ -9921,6 +9931,12 @@ var CLIENT_SECRET = "48481427819bb41798bd74fa109c90b184ca4d64d20e60dfbe8430299f0
9921
9931
  var EXIT_LOGIN_REQUIRED = 2;
9922
9932
  var LOGIN_REQUIRED_MARKER = "rpbi: login_required";
9923
9933
  var SPID_MARKER = "rpbi: spid";
9934
+ function readSqlInput(flags) {
9935
+ if (flags.stdin) return fs2.readFileSync(0, "utf-8");
9936
+ if (flags.file) return fs2.readFileSync(flags.file, "utf-8");
9937
+ if (flags.sql) return flags.sql;
9938
+ return void 0;
9939
+ }
9924
9940
  var LoginRequiredError = class extends Error {
9925
9941
  constructor(domain2, detail) {
9926
9942
  super(`Session expired. Run "rpbi login ${domain2}" again.`);
@@ -10270,6 +10286,21 @@ function output(data, flags) {
10270
10286
  console.log(data);
10271
10287
  }
10272
10288
  }
10289
+ function outputParseResult(result, flags) {
10290
+ const errors = result?.errors ?? [];
10291
+ if (flags.json) {
10292
+ output({ errors }, flags);
10293
+ return;
10294
+ }
10295
+ if (errors.length === 0) {
10296
+ console.log("No syntax errors.");
10297
+ return;
10298
+ }
10299
+ for (const error48 of errors) {
10300
+ console.log(error48.line ? `Line ${error48.line}: ${error48.error}` : `${error48.error}`);
10301
+ }
10302
+ process.exitCode = 1;
10303
+ }
10273
10304
  function errorMessage(err) {
10274
10305
  const data = err?.data;
10275
10306
  return data?.message || data?.error || (err instanceof Error ? err.message : String(err));
@@ -11829,12 +11860,7 @@ async function content(id, flags) {
11829
11860
  }
11830
11861
  async function exec2(id, flags) {
11831
11862
  const service = await createService("etl", { cwd: flags.dir || "." });
11832
- let body = void 0;
11833
- if (flags.file) {
11834
- body = fs8.readFileSync(flags.file, "utf-8");
11835
- } else if (flags.sql) {
11836
- body = flags.sql;
11837
- }
11863
+ const body = readSqlInput(flags);
11838
11864
  if (flags.output) {
11839
11865
  const response = await service.postRaw(`exec/${id}`, body, {
11840
11866
  csv_delimiter: " ",
@@ -11860,6 +11886,12 @@ async function exec2(id, flags) {
11860
11886
  process.stdout.write(result || "");
11861
11887
  }
11862
11888
  }
11889
+ async function parse(id, flags) {
11890
+ const service = await createService("etl", { cwd: flags.dir || "." });
11891
+ const body = readSqlInput(flags) ?? await service.get(`threads/${id}/content`, void 0, { parseResponse: false }) ?? "";
11892
+ const result = await service.post(`parse/${id}`, body).catch((err) => fail(err, "Parse failed"));
11893
+ outputParseResult(result, flags);
11894
+ }
11863
11895
  async function abort2(spid, flags) {
11864
11896
  const service = await createService("etl", { cwd: flags.dir || "." });
11865
11897
  const result = await service.get(`abort/${spid}`);
@@ -11914,10 +11946,16 @@ async function etl(args) {
11914
11946
  return content(rest[0], flags);
11915
11947
  case "exec":
11916
11948
  if (!rest[0]) {
11917
- console.error('Usage: rpbi etl exec <id> [--file path] [--sql "..."]');
11949
+ console.error('Usage: rpbi etl exec <id> [--file path] [--sql "..."] [--stdin]');
11918
11950
  process.exit(1);
11919
11951
  }
11920
11952
  return exec2(rest[0], flags);
11953
+ case "parse":
11954
+ if (!rest[0]) {
11955
+ console.error('Usage: rpbi etl parse <id> [--file path] [--sql "..."] [--stdin]');
11956
+ process.exit(1);
11957
+ }
11958
+ return parse(rest[0], flags);
11921
11959
  case "abort":
11922
11960
  if (!rest[0]) {
11923
11961
  console.error("Usage: rpbi etl abort <spid>");
@@ -11947,7 +11985,7 @@ async function etl(args) {
11947
11985
  case "watch":
11948
11986
  return watch4(flags);
11949
11987
  default:
11950
- console.log("Usage: rpbi etl <list|get|content|exec|abort|search|params|pull|push|context|status|watch> [options]");
11988
+ console.log("Usage: rpbi etl <list|get|content|exec|parse|abort|search|params|pull|push|context|status|watch> [options]");
11951
11989
  break;
11952
11990
  }
11953
11991
  }
@@ -12329,12 +12367,7 @@ async function doc(id, flags) {
12329
12367
  }
12330
12368
  async function exec3(id, flags) {
12331
12369
  const service = await createService("deployment", { cwd: flags.dir || "." });
12332
- let body = void 0;
12333
- if (flags.file) {
12334
- body = fs10.readFileSync(flags.file, "utf-8");
12335
- } else if (flags.sql) {
12336
- body = flags.sql;
12337
- }
12370
+ const body = readSqlInput(flags);
12338
12371
  const params3 = {};
12339
12372
  if (flags.database) params3.database = flags.database;
12340
12373
  if (flags.output) {
@@ -12357,6 +12390,20 @@ async function exec3(id, flags) {
12357
12390
  process.stdout.write(result || "");
12358
12391
  }
12359
12392
  }
12393
+ async function parse2(id, flags) {
12394
+ let body = readSqlInput(flags);
12395
+ if (body === void 0) {
12396
+ if (!id) {
12397
+ console.error('Usage: rpbi deployment parse [<id>] [--file path] [--sql "..."] [--stdin]');
12398
+ process.exit(1);
12399
+ }
12400
+ const deploymentService = await createService("deployment", { cwd: flags.dir || "." });
12401
+ body = await deploymentService.get(`threads/${id}/content`, void 0, { parseResponse: false }) ?? "";
12402
+ }
12403
+ const service = await createService("server", { cwd: flags.dir || "." });
12404
+ const result = await service.post("parse", body).catch((err) => fail(err, "Parse failed"));
12405
+ outputParseResult(result, flags);
12406
+ }
12360
12407
  async function deployment(args) {
12361
12408
  const { positional, flags } = parseArgs(args);
12362
12409
  const [subcommand, ...rest] = positional;
@@ -12383,10 +12430,12 @@ async function deployment(args) {
12383
12430
  return doc(rest[0], flags);
12384
12431
  case "exec":
12385
12432
  if (!rest[0]) {
12386
- console.error('Usage: rpbi deployment exec <id> [--file path] [--sql "..."] [--database all]');
12433
+ console.error('Usage: rpbi deployment exec <id> [--file path] [--sql "..."] [--stdin] [--database all]');
12387
12434
  process.exit(1);
12388
12435
  }
12389
12436
  return exec3(rest[0], flags);
12437
+ case "parse":
12438
+ return parse2(rest[0], flags);
12390
12439
  case "pull":
12391
12440
  return pull3(flags);
12392
12441
  case "push":
@@ -12396,7 +12445,7 @@ async function deployment(args) {
12396
12445
  case "watch":
12397
12446
  return watch5(flags);
12398
12447
  default:
12399
- console.log("Usage: rpbi deployment <list|get|content|doc|exec|pull|push|status|watch> [options]");
12448
+ console.log("Usage: rpbi deployment <list|get|content|doc|exec|parse|pull|push|status|watch> [options]");
12400
12449
  break;
12401
12450
  }
12402
12451
  }
@@ -12921,12 +12970,7 @@ async function deps(flags) {
12921
12970
  }
12922
12971
  async function exec4(id, flags) {
12923
12972
  const service = await createService("extensions", { cwd: flags.dir || "." });
12924
- let body = void 0;
12925
- if (flags.file) {
12926
- body = fs12.readFileSync(flags.file, "utf-8");
12927
- } else if (flags.sql) {
12928
- body = flags.sql;
12929
- }
12973
+ const body = readSqlInput(flags);
12930
12974
  if (flags.output) {
12931
12975
  const response = await service.postRaw(`exec/${id}`, body, {
12932
12976
  csv_delimiter: " ",
@@ -12952,6 +12996,12 @@ async function exec4(id, flags) {
12952
12996
  process.stdout.write(result || "");
12953
12997
  }
12954
12998
  }
12999
+ async function parse3(id, flags) {
13000
+ const service = await createService("extensions", { cwd: flags.dir || "." });
13001
+ const body = readSqlInput(flags) ?? await service.get(`queryContent/${id}`, void 0, { parseResponse: false }) ?? "";
13002
+ const result = await service.post(`parse/${id}`, body).catch((err) => fail(err, "Parse failed"));
13003
+ outputParseResult(result, flags);
13004
+ }
12955
13005
  async function abort3(spid, flags) {
12956
13006
  const service = await createService("extensions", { cwd: flags.dir || "." });
12957
13007
  const result = await service.get(`abort/${spid}`);
@@ -12975,10 +13025,16 @@ async function ext(args) {
12975
13025
  return content3(rest[0], flags);
12976
13026
  case "exec":
12977
13027
  if (!rest[0]) {
12978
- console.error('Usage: rpbi ext exec <query_id> [--file path] [--sql "..."]');
13028
+ console.error('Usage: rpbi ext exec <query_id> [--file path] [--sql "..."] [--stdin]');
12979
13029
  process.exit(1);
12980
13030
  }
12981
13031
  return exec4(rest[0], flags);
13032
+ case "parse":
13033
+ if (!rest[0]) {
13034
+ console.error('Usage: rpbi ext parse <query_id> [--file path] [--sql "..."] [--stdin]');
13035
+ process.exit(1);
13036
+ }
13037
+ return parse3(rest[0], flags);
12982
13038
  case "abort":
12983
13039
  if (!rest[0]) {
12984
13040
  console.error("Usage: rpbi ext abort <spid>");
@@ -13002,7 +13058,7 @@ async function ext(args) {
13002
13058
  case "watch":
13003
13059
  return watch6(flags);
13004
13060
  default:
13005
- console.log("Usage: rpbi ext <projects|resources|queries|content|exec|abort|params|deps|pull|push|status|watch> [options]");
13061
+ console.log("Usage: rpbi ext <projects|resources|queries|content|exec|parse|abort|params|deps|pull|push|status|watch> [options]");
13006
13062
  break;
13007
13063
  }
13008
13064
  }
@@ -17483,7 +17539,7 @@ __export(core_exports2, {
17483
17539
  isValidJWT: () => isValidJWT2,
17484
17540
  locales: () => locales_exports,
17485
17541
  meta: () => meta,
17486
- parse: () => parse,
17542
+ parse: () => parse4,
17487
17543
  parseAsync: () => parseAsync,
17488
17544
  prettifyError: () => prettifyError,
17489
17545
  process: () => process2,
@@ -18406,7 +18462,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
18406
18462
  }
18407
18463
  return result.value;
18408
18464
  };
18409
- var parse = /* @__PURE__ */ _parse($ZodRealError);
18465
+ var parse4 = /* @__PURE__ */ _parse($ZodRealError);
18410
18466
  var _parseAsync = (_Err) => async (schema, value, _ctx, params3) => {
18411
18467
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
18412
18468
  let result = schema._zod.run({ value, issues: [] }, ctx);
@@ -21079,10 +21135,10 @@ var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def2) =>
21079
21135
  throw new Error("implement() must be called with a function");
21080
21136
  }
21081
21137
  return function(...args) {
21082
- const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;
21138
+ const parsedArgs = inst._def.input ? parse4(inst._def.input, args) : args;
21083
21139
  const result = Reflect.apply(func, this, parsedArgs);
21084
21140
  if (inst._def.output) {
21085
- return parse(inst._def.output, result);
21141
+ return parse4(inst._def.output, result);
21086
21142
  }
21087
21143
  return result;
21088
21144
  };
@@ -28853,7 +28909,7 @@ var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def2) => {
28853
28909
  $ZodType.init(inst, def2);
28854
28910
  inst.def = def2;
28855
28911
  inst.type = def2.type;
28856
- inst.parse = (data, params3) => parse(inst, data, params3, { callee: inst.parse });
28912
+ inst.parse = (data, params3) => parse4(inst, data, params3, { callee: inst.parse });
28857
28913
  inst.safeParse = (data, params3) => safeParse(inst, data, params3);
28858
28914
  inst.parseAsync = async (data, params3) => parseAsync(inst, data, params3, { callee: inst.parseAsync });
28859
28915
  inst.safeParseAsync = async (data, params3) => safeParseAsync(inst, data, params3);
@@ -29215,7 +29271,7 @@ __export(external_exports3, {
29215
29271
  object: () => object2,
29216
29272
  optional: () => optional,
29217
29273
  overwrite: () => _overwrite,
29218
- parse: () => parse2,
29274
+ parse: () => parse5,
29219
29275
  parseAsync: () => parseAsync2,
29220
29276
  partialRecord: () => partialRecord,
29221
29277
  pipe: () => pipe,
@@ -29560,7 +29616,7 @@ var ZodRealError = $constructor("ZodError", initializer2, {
29560
29616
  });
29561
29617
 
29562
29618
  // ../../.yarn/cache/zod-npm-4.3.6-a096e305e6-860d25a81a.zip/node_modules/zod/v4/classic/parse.js
29563
- var parse2 = /* @__PURE__ */ _parse(ZodRealError);
29619
+ var parse5 = /* @__PURE__ */ _parse(ZodRealError);
29564
29620
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
29565
29621
  var safeParse3 = /* @__PURE__ */ _safeParse(ZodRealError);
29566
29622
  var safeParseAsync3 = /* @__PURE__ */ _safeParseAsync(ZodRealError);
@@ -29603,7 +29659,7 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def2) => {
29603
29659
  reg.add(inst, meta3);
29604
29660
  return inst;
29605
29661
  };
29606
- inst.parse = (data, params3) => parse2(inst, data, params3, { callee: inst.parse });
29662
+ inst.parse = (data, params3) => parse5(inst, data, params3, { callee: inst.parse });
29607
29663
  inst.safeParse = (data, params3) => safeParse3(inst, data, params3);
29608
29664
  inst.parseAsync = async (data, params3) => parseAsync2(inst, data, params3, { callee: inst.parseAsync });
29609
29665
  inst.safeParseAsync = async (data, params3) => safeParseAsync3(inst, data, params3);
@@ -36532,7 +36588,7 @@ async function mcp() {
36532
36588
  setMcpMode();
36533
36589
  const server = new McpServer({
36534
36590
  name: "reporting-bi",
36535
- version: "0.1.13"
36591
+ version: "0.1.14"
36536
36592
  });
36537
36593
  server.tool(
36538
36594
  "status",
@@ -36868,10 +36924,18 @@ async function mcp() {
36868
36924
  server.tool(
36869
36925
  "wiki_search",
36870
36926
  "Search wiki pages",
36871
- { query: external_exports3.string().describe("Search query"), ...ListParams },
36927
+ {
36928
+ query: external_exports3.string().describe("Search query"),
36929
+ semantic: external_exports3.boolean().optional().describe("Also return pages semantically close to the query (needs a vector model configured on the server; results then carry a similarity score)"),
36930
+ ...ListParams
36931
+ },
36872
36932
  async (params3) => {
36873
36933
  const service = await createService("wiki");
36874
- const result = await service.get("search", { ...toRequestParams(params3), q: params3.query });
36934
+ const result = await service.get("search", {
36935
+ ...toRequestParams(params3),
36936
+ q: params3.query,
36937
+ ...params3.semantic ? { mode: "semantic" } : {}
36938
+ });
36875
36939
  return json2(result || []);
36876
36940
  }
36877
36941
  );
@@ -37065,8 +37129,8 @@ async function checkForUpdate() {
37065
37129
  saveUpdateCheck({ lastCheck: now });
37066
37130
  const latest = await fetchLatestVersion();
37067
37131
  if (!latest) return;
37068
- if (!isNewer(latest, "0.1.13")) return;
37069
- console.error(`\x1B[33mUpdating ${PACKAGE_NAME} ${"0.1.13"} \u2192 ${latest}...\x1B[0m`);
37132
+ if (!isNewer(latest, "0.1.14")) return;
37133
+ console.error(`\x1B[33mUpdating ${PACKAGE_NAME} ${"0.1.14"} \u2192 ${latest}...\x1B[0m`);
37070
37134
  (0, import_node_child_process3.execSync)(npmInstallCmd(latest), { stdio: ["ignore", 2, 2] });
37071
37135
  console.error(`\x1B[32mUpdated to ${latest}.\x1B[0m`);
37072
37136
  } catch {
@@ -37078,11 +37142,11 @@ async function forceUpdate() {
37078
37142
  console.error("Could not fetch latest version from npm.");
37079
37143
  process.exit(1);
37080
37144
  }
37081
- if (!isNewer(latest, "0.1.13")) {
37082
- console.log(`Already up to date (${"0.1.13"}).`);
37145
+ if (!isNewer(latest, "0.1.14")) {
37146
+ console.log(`Already up to date (${"0.1.14"}).`);
37083
37147
  return;
37084
37148
  }
37085
- console.log(`Updating ${PACKAGE_NAME} ${"0.1.13"} \u2192 ${latest}...`);
37149
+ console.log(`Updating ${PACKAGE_NAME} ${"0.1.14"} \u2192 ${latest}...`);
37086
37150
  (0, import_node_child_process3.execSync)(npmInstallCmd(latest), { stdio: "inherit" });
37087
37151
  console.log(`\x1B[32mUpdated to ${latest}.\x1B[0m`);
37088
37152
  saveUpdateCheck({ lastCheck: Date.now() });
@@ -37118,7 +37182,8 @@ ETL:
37118
37182
  etl list List all threads
37119
37183
  etl get <id> Get thread metadata
37120
37184
  etl content <id> Get thread SQL content (plain text)
37121
- etl exec <id> [--sql "..."|--file f] Execute thread (optionally with custom SQL)
37185
+ etl exec <id> [--sql "..."|--file f|--stdin] Execute thread (optionally with custom SQL)
37186
+ etl parse <id> [--sql "..."|--file f|--stdin] Syntax check (set parseonly) of the thread or the given SQL; exit 1 on errors (--json: {errors}, exit 0)
37122
37187
  etl abort <spid> Abort a running exec (exec reports "rpbi: spid <n>" on stderr)
37123
37188
  etl search <query> Search threads
37124
37189
  etl params <id> [--save <json>|--delete <idz>] List, save or delete thread parameters (save creates, or updates when the JSON carries "idz"; a name already declared alongside is refused)
@@ -37133,7 +37198,8 @@ Deployment (requires the "deployment" right):
37133
37198
  deployment get <id> Get thread metadata
37134
37199
  deployment content <id> Get thread SQL content (plain text)
37135
37200
  deployment doc <id> Get thread documentation (markdown)
37136
- deployment exec <id> [--sql "..."|--file f] [--database all] Execute thread (optionally with custom SQL)
37201
+ deployment exec <id> [--sql "..."|--file f|--stdin] [--database all] Execute thread (optionally with custom SQL)
37202
+ deployment parse [<id>] [--sql "..."|--file f|--stdin] Syntax check (set parseonly, no placeholder replacement) of the thread or the given SQL
37137
37203
  deployment pull [--dir <path>] Pull all deployment threads (.sql) & docs (.md) to local files
37138
37204
  deployment push [files...] [--dir <path>] [--force] Push modified/new files back to server
37139
37205
  deployment status [--dir <path>] [--remote] [--json] Show local changes (--remote compares with server)
@@ -37144,7 +37210,8 @@ Extensions (requires the "custom.define" right):
37144
37210
  ext resources List resources
37145
37211
  ext queries List queries
37146
37212
  ext content <id> [--query] Get resource content (--query for query SQL)
37147
- ext exec <query_id> [--sql "..."|--file f] Execute query (optionally with custom SQL)
37213
+ ext exec <query_id> [--sql "..."|--file f|--stdin] Execute query (optionally with custom SQL)
37214
+ ext parse <query_id> [--sql "..."|--file f|--stdin] Syntax check (set parseonly) of the query or the given SQL; exit 1 on errors (--json: {errors}, exit 0)
37148
37215
  ext abort <spid> Abort a running exec (exec reports "rpbi: spid <n>" on stderr)
37149
37216
  ext params <query_id> [--save <json>|--delete <idz>] List, save or delete query parameters (save creates, or updates when the JSON carries "idz"; a name already declared alongside is refused)
37150
37217
  ext deps --project <id>|--query <id>|--resource <id> List SQL dependencies (resource \u2194 query links)
@@ -37270,7 +37337,7 @@ Examples:
37270
37337
  (async () => {
37271
37338
  const [command, ...args] = process.argv.slice(2);
37272
37339
  if (command === "--version" || command === "-v") {
37273
- console.log("0.1.13");
37340
+ console.log("0.1.14");
37274
37341
  return;
37275
37342
  }
37276
37343
  await checkForUpdate();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reporting-bi/cli",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Reporting.bi CLI — command-line interface for the Reporting.bi platform",
6
6
  "main": "./dist/index.js",