@nmshd/connector-tui 2.11.0 → 2.13.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.
@@ -917,6 +917,7 @@ export function AddSendRequestByMessage(Base) {
917
917
  mustBeAccepted: true,
918
918
  requireManualDecision: result.requireManualDecision,
919
919
  fileReference: file.reference.truncated,
920
+ ownershipToken: file.ownershipToken,
920
921
  };
921
922
  return requestItem;
922
923
  }
@@ -1,3 +1,4 @@
1
+ import { exec } from "child_process";
1
2
  import { DateTime } from "luxon";
2
3
  import prompts from "prompts";
3
4
  import qrcode from "qrcode-terminal";
@@ -206,6 +207,33 @@ export function AddShareRequestByTemplate(Base) {
206
207
  const url = template.result.reference.url;
207
208
  console.log(url);
208
209
  qrcode.generate(url, { small: true });
210
+ const result = await prompts({
211
+ message: "Do you want to open the link on a connected device?",
212
+ type: "confirm",
213
+ name: "open",
214
+ initial: false,
215
+ });
216
+ if (!result.open)
217
+ return;
218
+ const androidOrIOS = await prompts({
219
+ message: "Is the connected device Android or iOS?",
220
+ type: "select",
221
+ name: "deviceType",
222
+ choices: [
223
+ { title: "Android", value: "Android" },
224
+ { title: "iOS", value: "iOS" },
225
+ ],
226
+ });
227
+ if (!androidOrIOS.deviceType)
228
+ return;
229
+ const command = androidOrIOS.deviceType === "Android" ? `adb shell am start -a android.intent.action.VIEW -d "${url}"` : `xcrun simctl openurl booted "${url}"`;
230
+ await new Promise((resolve) => {
231
+ exec(command, (err, _, __) => {
232
+ if (err)
233
+ return console.error(`Error executing command: ${err.message}`);
234
+ resolve();
235
+ });
236
+ });
209
237
  }
210
238
  };
211
239
  }
package/package.json CHANGED
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "name": "@nmshd/connector-tui",
3
- "version": "2.11.0",
4
3
  "repository": "github:nmshd/connector-tui",
5
4
  "license": "MIT",
6
5
  "author": "j&s-soft AG",
@@ -29,33 +28,34 @@
29
28
  "watch": "node --watch --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' src/run.ts"
30
29
  },
31
30
  "dependencies": {
32
- "@nmshd/connector-sdk": "^6.26.2",
31
+ "@nmshd/connector-sdk": "^6.29.0",
33
32
  "axios": "^1.9.0",
34
33
  "chalk": "^5.4.1",
35
34
  "dotenv": "^16.5.0",
36
35
  "luxon": "^3.6.1",
37
36
  "prompts": "^2.4.2",
38
37
  "qrcode-terminal": "^0.12.0",
39
- "yargs": "^17.7.2"
38
+ "yargs": "^18.0.0"
40
39
  },
41
40
  "devDependencies": {
42
41
  "@js-soft/eslint-config-ts": "^1.6.14",
43
42
  "@js-soft/license-check": "^1.0.9",
44
43
  "@types/luxon": "^3.6.2",
45
- "@types/node": "^22.15.18",
44
+ "@types/node": "^22.15.29",
46
45
  "@types/prompts": "^2.4.9",
47
46
  "@types/qrcode-terminal": "^0.12.2",
48
47
  "@types/yargs": "^17.0.33",
49
- "eslint": "^8.57.0",
48
+ "eslint": "^8.57.1",
50
49
  "prettier": "^3.5.3",
51
50
  "ts-node": "^10.9.2",
52
51
  "typescript": "^5.8.3"
53
52
  },
54
53
  "engines": {
55
- "node": ">=19.0.0"
54
+ "node": ">=22.16.0"
56
55
  },
57
56
  "publishConfig": {
58
57
  "access": "public",
59
58
  "provenance": true
60
- }
59
+ },
60
+ "version": "2.13.0"
61
61
  }