mc8yp 2.3.0 → 2.3.2

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mc8yp",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "type": "module",
5
5
  "description": "Cumulocity IoT MCP Server - Model Context Protocol integration for IoT device management",
6
6
  "keywords": [
@@ -30,31 +30,31 @@
30
30
  "dist"
31
31
  ],
32
32
  "dependencies": {
33
+ "@iso4/sandbox": "^0.0.3",
34
+ "@napi-rs/keyring": "^1.3.0"
35
+ },
36
+ "devDependencies": {
33
37
  "@c8y/client": "^1023.83.4",
34
38
  "@clack/prompts": "^1.5.1",
35
39
  "@iso4/fetch": "^0.0.1",
36
- "@iso4/sandbox": "^0.0.3",
37
- "@napi-rs/keyring": "^1.3.0",
40
+ "@schplitt/eslint-config": "^1.5.1",
38
41
  "@tmcp/adapter-valibot": "^0.1.6",
39
42
  "@tmcp/transport-http": "^0.8.6",
40
43
  "@tmcp/transport-stdio": "^0.4.3",
41
44
  "@toon-format/toon": "^2.3.0",
45
+ "@types/node": "^25.9.2",
42
46
  "bumpp": "^11.1.0",
47
+ "changelogithub": "^14.0.0",
43
48
  "citty": "^0.2.2",
44
49
  "consola": "^3.4.2",
45
- "h3": "2.0.1-rc.6",
46
- "tmcp": "^1.19.4",
47
- "ufo": "^1.6.4",
48
- "unctx": "^2.5.0",
49
- "valibot": "^1.4.1"
50
- },
51
- "devDependencies": {
52
- "@schplitt/eslint-config": "^1.5.1",
53
- "@types/node": "^25.9.2",
54
- "changelogithub": "^14.0.0",
55
50
  "eslint": "^10.4.1",
51
+ "h3": "2.0.1-rc.22",
52
+ "tmcp": "^1.19.4",
56
53
  "tsdown": "^0.22.2",
57
54
  "typescript": "^6.0.3",
55
+ "ufo": "^1.6.4",
56
+ "unctx": "^2.5.0",
57
+ "valibot": "^1.4.1",
58
58
  "vitest": "^4.1.8"
59
59
  },
60
60
  "engines": {
@@ -1,58 +0,0 @@
1
- import { i as setStoredC8yAuth, r as getStoredC8yAuth, t as cleanTenantUrl } from "./cli.mjs";
2
- import { defineCommand } from "citty";
3
- import consola from "consola";
4
- import * as v from "valibot";
5
- import { exit } from "node:process";
6
- import { cancel, isCancel, password } from "@clack/prompts";
7
- //#region src/cli/subcommands/subcommands/add.ts
8
- const command = defineCommand({
9
- meta: {
10
- name: "add",
11
- description: "Add new Cumulocity credentials"
12
- },
13
- run: async () => {
14
- try {
15
- const tenantUrl = await consola.prompt("Cumulocity tenant URL:", {
16
- type: "text",
17
- cancel: "reject"
18
- });
19
- v.parse(v.pipe(v.string(), v.url()), tenantUrl);
20
- const user = await consola.prompt("Username:", {
21
- type: "text",
22
- cancel: "reject"
23
- });
24
- const passwordPrompt = await password({
25
- message: "Password:",
26
- clearOnError: true,
27
- validate: (value) => {
28
- if (!value) return "Password is required.";
29
- }
30
- });
31
- if (isCancel(passwordPrompt)) {
32
- cancel("Cancelled.");
33
- exit();
34
- }
35
- if ((await getStoredC8yAuth()).some((cred) => cred.tenantUrl === cleanTenantUrl(tenantUrl))) {
36
- if (!await consola.prompt("Credentials for this tenant already exist. Overwrite?", {
37
- type: "confirm",
38
- cancel: "reject"
39
- })) {
40
- consola.info("Cancelled.");
41
- exit();
42
- }
43
- }
44
- await setStoredC8yAuth({
45
- tenantUrl,
46
- user,
47
- password: passwordPrompt
48
- });
49
- consola.success("Credentials saved successfully!");
50
- exit();
51
- } catch (error) {
52
- consola.error("Failed to add credentials:", error);
53
- exit();
54
- }
55
- }
56
- });
57
- //#endregion
58
- export { command as default };
@@ -1,18 +0,0 @@
1
- import { defineCommand, runCommand } from "citty";
2
- //#region src/cli/subcommands/creds.ts
3
- const command = defineCommand({
4
- meta: {
5
- name: "creds",
6
- description: "Manage your Cumulocity credentials"
7
- },
8
- subCommands: {
9
- add: () => import("./add-CmQVWyPy.mjs").then((m) => m.default),
10
- remove: () => import("./remove-BTNzrd-j.mjs").then((m) => m.default),
11
- list: () => import("./list-ONo8XOjk.mjs").then((m) => m.default)
12
- },
13
- run: async ({ rawArgs }) => {
14
- await runCommand(await import("./add-CmQVWyPy.mjs").then((m) => m.default), { rawArgs });
15
- }
16
- });
17
- //#endregion
18
- export { command as default };