@diafunc/cli 0.24.0 → 0.25.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.
@@ -4,13 +4,13 @@ import {
4
4
  PromptCancelled,
5
5
  createProgram,
6
6
  handleError
7
- } from "../chunk-2YKNPNBM.js";
7
+ } from "../chunk-RJM7OBRF.js";
8
8
  import {
9
9
  getUpdateNotice
10
- } from "../chunk-FX557IX3.js";
10
+ } from "../chunk-2RII4SNX.js";
11
11
  import {
12
12
  package_default
13
- } from "../chunk-A6PH2CFB.js";
13
+ } from "../chunk-DOVJKPLM.js";
14
14
 
15
15
  // bin/diafunc.ts
16
16
  import chalk2 from "chalk";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./chunk-A6PH2CFB.js";
3
+ } from "./chunk-DOVJKPLM.js";
4
4
 
5
5
  // src/util/update-check.ts
6
6
  import * as fs from "fs";
@@ -72,4 +72,4 @@ async function getUpdateNotice() {
72
72
  export {
73
73
  getUpdateNotice
74
74
  };
75
- //# sourceMappingURL=chunk-FX557IX3.js.map
75
+ //# sourceMappingURL=chunk-2RII4SNX.js.map
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@diafunc/cli",
4
- version: "0.24.0",
4
+ version: "0.25.0",
5
5
  description: "Diafunc CLI: the command-line interface for the Diafunc platform",
6
6
  type: "module",
7
7
  bin: {
@@ -62,4 +62,4 @@ var package_default = {
62
62
  export {
63
63
  package_default
64
64
  };
65
- //# sourceMappingURL=chunk-A6PH2CFB.js.map
65
+ //# sourceMappingURL=chunk-DOVJKPLM.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@diafunc/cli\",\n \"version\": \"0.24.0\",\n \"description\": \"Diafunc CLI: the command-line interface for the Diafunc platform\",\n \"type\": \"module\",\n \"bin\": {\n \"diafunc\": \"./dist/bin/diafunc.js\"\n },\n \"homepage\": \"https://diafunc.com\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://gitlab.com/diafunc/cli.git\"\n },\n \"bugs\": {\n \"url\": \"https://gitlab.com/diafunc/cli/-/issues\"\n },\n \"author\": \"Markus Pollak <markus.pollak@diafunc.com>\",\n \"scripts\": {\n \"build\": \"tsup && node -e \\\"const fs=require('fs');const f='dist/bin/diafunc.js';fs.writeFileSync(f,'#!/usr/bin/env node\\\\n'+fs.readFileSync(f,'utf8'))\\\"\",\n \"dev\": \"tsup --watch\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"lint\": \"tsc --noEmit\",\n \"start\": \"node dist/bin/diafunc.js\",\n \"prepublishOnly\": \"npm run lint && npm test && npm run build\"\n },\n \"files\": [\n \"dist\",\n \"LICENSE\",\n \"README.md\"\n ],\n \"keywords\": [\n \"diafunc\",\n \"cli\",\n \"data-science\",\n \"symbolic-regression\"\n ],\n \"license\": \"Apache-2.0\",\n \"publishConfig\": {\n \"access\": \"public\",\n \"registry\": \"https://registry.npmjs.org/\"\n },\n \"engines\": {\n \"node\": \">=20.0.0\"\n },\n \"dependencies\": {\n \"@inquirer/prompts\": \"^7.0.0\",\n \"chalk\": \"^5.4.0\",\n \"cli-table3\": \"^0.6.5\",\n \"commander\": \"^12.1.0\",\n \"ora\": \"^8.1.0\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^22.0.0\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^5.6.0\",\n \"vitest\": \"^2.1.0\"\n }\n}\n"],"mappings":";AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,KAAO;AAAA,IACL,SAAW;AAAA,EACb;AAAA,EACA,UAAY;AAAA,EACZ,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,MAAQ;AAAA,IACN,KAAO;AAAA,EACT;AAAA,EACA,QAAU;AAAA,EACV,SAAW;AAAA,IACT,OAAS;AAAA,IACT,KAAO;AAAA,IACP,MAAQ;AAAA,IACR,cAAc;AAAA,IACd,MAAQ;AAAA,IACR,OAAS;AAAA,IACT,gBAAkB;AAAA,EACpB;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,EACX,eAAiB;AAAA,IACf,QAAU;AAAA,IACV,UAAY;AAAA,EACd;AAAA,EACA,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,cAAgB;AAAA,IACd,qBAAqB;AAAA,IACrB,OAAS;AAAA,IACT,cAAc;AAAA,IACd,WAAa;AAAA,IACb,KAAO;AAAA,EACT;AAAA,EACA,iBAAmB;AAAA,IACjB,eAAe;AAAA,IACf,MAAQ;AAAA,IACR,YAAc;AAAA,IACd,QAAU;AAAA,EACZ;AACF;","names":[]}
1
+ {"version":3,"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@diafunc/cli\",\n \"version\": \"0.25.0\",\n \"description\": \"Diafunc CLI: the command-line interface for the Diafunc platform\",\n \"type\": \"module\",\n \"bin\": {\n \"diafunc\": \"./dist/bin/diafunc.js\"\n },\n \"homepage\": \"https://diafunc.com\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://gitlab.com/diafunc/cli.git\"\n },\n \"bugs\": {\n \"url\": \"https://gitlab.com/diafunc/cli/-/issues\"\n },\n \"author\": \"Markus Pollak <markus.pollak@diafunc.com>\",\n \"scripts\": {\n \"build\": \"tsup && node -e \\\"const fs=require('fs');const f='dist/bin/diafunc.js';fs.writeFileSync(f,'#!/usr/bin/env node\\\\n'+fs.readFileSync(f,'utf8'))\\\"\",\n \"dev\": \"tsup --watch\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"lint\": \"tsc --noEmit\",\n \"start\": \"node dist/bin/diafunc.js\",\n \"prepublishOnly\": \"npm run lint && npm test && npm run build\"\n },\n \"files\": [\n \"dist\",\n \"LICENSE\",\n \"README.md\"\n ],\n \"keywords\": [\n \"diafunc\",\n \"cli\",\n \"data-science\",\n \"symbolic-regression\"\n ],\n \"license\": \"Apache-2.0\",\n \"publishConfig\": {\n \"access\": \"public\",\n \"registry\": \"https://registry.npmjs.org/\"\n },\n \"engines\": {\n \"node\": \">=20.0.0\"\n },\n \"dependencies\": {\n \"@inquirer/prompts\": \"^7.0.0\",\n \"chalk\": \"^5.4.0\",\n \"cli-table3\": \"^0.6.5\",\n \"commander\": \"^12.1.0\",\n \"ora\": \"^8.1.0\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^22.0.0\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^5.6.0\",\n \"vitest\": \"^2.1.0\"\n }\n}\n"],"mappings":";AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,KAAO;AAAA,IACL,SAAW;AAAA,EACb;AAAA,EACA,UAAY;AAAA,EACZ,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,MAAQ;AAAA,IACN,KAAO;AAAA,EACT;AAAA,EACA,QAAU;AAAA,EACV,SAAW;AAAA,IACT,OAAS;AAAA,IACT,KAAO;AAAA,IACP,MAAQ;AAAA,IACR,cAAc;AAAA,IACd,MAAQ;AAAA,IACR,OAAS;AAAA,IACT,gBAAkB;AAAA,EACpB;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,EACX,eAAiB;AAAA,IACf,QAAU;AAAA,IACV,UAAY;AAAA,EACd;AAAA,EACA,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,cAAgB;AAAA,IACd,qBAAqB;AAAA,IACrB,OAAS;AAAA,IACT,cAAc;AAAA,IACd,WAAa;AAAA,IACb,KAAO;AAAA,EACT;AAAA,EACA,iBAAmB;AAAA,IACjB,eAAe;AAAA,IACf,MAAQ;AAAA,IACR,YAAc;AAAA,IACd,QAAU;AAAA,EACZ;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./chunk-A6PH2CFB.js";
3
+ } from "./chunk-DOVJKPLM.js";
4
4
 
5
5
  // src/index.ts
6
6
  import chalk37 from "chalk";
@@ -3578,7 +3578,7 @@ Showing ${capped.length} of ${projects.length}. Pass --limit 0 to see them all.`
3578
3578
  handleError(error);
3579
3579
  }
3580
3580
  });
3581
- project.command("update").description("Update a project").argument("<projectId>", "Project ID").option("--visibility <visibility>", "PRIVATE or PUBLIC").option("--language <language>", "Project language").option("--active <bool>", "Whether the project is active (true/false)").action(async (projectId, options) => {
3581
+ project.command("update").description("Update a project").argument("<projectId>", "Project ID").option("--visibility <visibility>", "PRIVATE or PUBLIC").option("--language <language>", "Project language").option("--active <bool>", "Whether the project is active (true/false)").option("--licence <licenceId>", "Licence a public project is published under, an id of the licence catalogue (CC-BY-4.0, CC0-1.0, diafunc-view-only, ...)").option("--data-source-name <name>", "Who published the data the project analyses; an empty value clears it").option("--data-source-url <url>", "Where the data was obtained, an http(s) address; an empty value clears it").action(async (projectId, options) => {
3582
3582
  try {
3583
3583
  const api = createApiClient();
3584
3584
  const current = await api.admin.getProject(projectId);
@@ -3586,7 +3586,10 @@ Showing ${capped.length} of ${projects.length}. Pass --limit 0 to see them all.`
3586
3586
  ...current,
3587
3587
  ...options.visibility ? { visibility: options.visibility.toUpperCase() } : {},
3588
3588
  ...options.language ? { language: options.language } : {},
3589
- ...options.active !== void 0 ? { active: options.active === "true" } : {}
3589
+ ...options.active !== void 0 ? { active: options.active === "true" } : {},
3590
+ ...options.licence ? { licenceId: options.licence } : {},
3591
+ ...options.dataSourceName !== void 0 ? { dataSourceName: options.dataSourceName } : {},
3592
+ ...options.dataSourceUrl !== void 0 ? { dataSourceUrl: options.dataSourceUrl } : {}
3590
3593
  };
3591
3594
  await api.admin.updateProject(updated);
3592
3595
  success(`Project "${projectId}" updated.`);
@@ -6327,7 +6330,7 @@ var HELP = [
6327
6330
  ];
6328
6331
  async function runChatRepl(options) {
6329
6332
  const { input: promptInput } = await import("@inquirer/prompts");
6330
- const { getUpdateNotice } = await import("./update-check-YTIEPB54.js");
6333
+ const { getUpdateNotice } = await import("./update-check-F2A6LMK6.js");
6331
6334
  let sessionId = options.session;
6332
6335
  let lastReportedSession;
6333
6336
  console.log(chalk19.bold("Diafunc chat") + chalk19.dim(" \xB7 /help for commands, /quit to exit"));
@@ -10886,7 +10889,7 @@ function registerShellCommand(program) {
10886
10889
  });
10887
10890
  const api = createApiClient();
10888
10891
  const { input: promptInput } = await import("@inquirer/prompts");
10889
- const { getUpdateNotice } = await import("./update-check-YTIEPB54.js");
10892
+ const { getUpdateNotice } = await import("./update-check-F2A6LMK6.js");
10890
10893
  const resolvedLanguage = await resolveLanguage(api, fnRef.projectId, options.language);
10891
10894
  console.log(chalk32.bold("Diafunc shell") + chalk32.dim(` \xB7 function ${fnRef.entityId} \xB7 ${resolvedLanguage}`));
10892
10895
  console.log(chalk32.dim(`Endpoint: ${config.profiles[config.currentProfile]?.endpoint}`));
@@ -11936,4 +11939,4 @@ export {
11936
11939
  PromptCancelled,
11937
11940
  createProgram
11938
11941
  };
11939
- //# sourceMappingURL=chunk-2YKNPNBM.js.map
11942
+ //# sourceMappingURL=chunk-RJM7OBRF.js.map