@nmshd/connector-tui 2.9.0 → 2.10.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.
|
@@ -607,7 +607,7 @@ export function AddSendRequestByMessage(Base) {
|
|
|
607
607
|
message: "[Optional] Enter a description of the authentication",
|
|
608
608
|
type: "text",
|
|
609
609
|
name: "description",
|
|
610
|
-
format: (value) => (value.length > 0 ? value : undefined),
|
|
610
|
+
format: (value) => (value.length > 0 ? value.replaceAll("\\n", "\n") : undefined),
|
|
611
611
|
},
|
|
612
612
|
{
|
|
613
613
|
message: "[Optional] Enter an unique authenticationToken to know which authentication did the user grant",
|
|
@@ -136,7 +136,8 @@ export function AddShareRequestByTemplate(Base) {
|
|
|
136
136
|
},
|
|
137
137
|
name: "password",
|
|
138
138
|
});
|
|
139
|
-
|
|
139
|
+
const passwordLocationIndicator = await this.selectPasswordLocationIndicator();
|
|
140
|
+
return { password: password.password, passwordLocationIndicator };
|
|
140
141
|
}
|
|
141
142
|
const password = await prompts({
|
|
142
143
|
message: "Enter the PIN",
|
|
@@ -152,7 +153,40 @@ export function AddShareRequestByTemplate(Base) {
|
|
|
152
153
|
},
|
|
153
154
|
name: "password",
|
|
154
155
|
});
|
|
155
|
-
|
|
156
|
+
const passwordLocationIndicator = await this.selectPasswordLocationIndicator();
|
|
157
|
+
return { password: password.password, passwordIsPin: true, passwordLocationIndicator };
|
|
158
|
+
}
|
|
159
|
+
async selectPasswordLocationIndicator() {
|
|
160
|
+
const result = await prompts({
|
|
161
|
+
message: "Where can the user find the password?",
|
|
162
|
+
type: "select",
|
|
163
|
+
name: "passwordLocationIndicator",
|
|
164
|
+
choices: [
|
|
165
|
+
{ title: "None", value: "None", selected: true },
|
|
166
|
+
{ title: "Custom (Number between 50 and 99)", value: "Custom" },
|
|
167
|
+
{ title: "Self", value: "Self" },
|
|
168
|
+
{ title: "Letter", value: "Letter" },
|
|
169
|
+
{ title: "RegistrationLetter", value: "RegistrationLetter" },
|
|
170
|
+
{ title: "Email", value: "Email" },
|
|
171
|
+
{ title: "SMS", value: "SMS" },
|
|
172
|
+
{ title: "Website", value: "Website" },
|
|
173
|
+
],
|
|
174
|
+
});
|
|
175
|
+
if (result.passwordLocationIndicator === "None")
|
|
176
|
+
return;
|
|
177
|
+
if (result.passwordLocationIndicator !== "Custom")
|
|
178
|
+
return result.passwordLocationIndicator;
|
|
179
|
+
const customLocation = await prompts({
|
|
180
|
+
message: "Enter a number between 50 and 99",
|
|
181
|
+
type: "number",
|
|
182
|
+
validate: (value) => {
|
|
183
|
+
if (value < 50 || value > 99)
|
|
184
|
+
return "Number must be between 50 and 99";
|
|
185
|
+
return true;
|
|
186
|
+
},
|
|
187
|
+
name: "passwordLocationIndicator",
|
|
188
|
+
});
|
|
189
|
+
return customLocation.passwordLocationIndicator;
|
|
156
190
|
}
|
|
157
191
|
async createQRCodeForRelationshipTemplate(onNewRelationship, onExistingRelationship, name, passwordProtection) {
|
|
158
192
|
const content = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nmshd/connector-tui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"repository": "github:nmshd/connector-tui",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "j&s-soft AG",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"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
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@nmshd/connector-sdk": "^6.
|
|
33
|
-
"axios": "^1.
|
|
32
|
+
"@nmshd/connector-sdk": "^6.24.0",
|
|
33
|
+
"axios": "^1.9.0",
|
|
34
34
|
"chalk": "^5.4.1",
|
|
35
35
|
"dotenv": "^16.5.0",
|
|
36
36
|
"luxon": "^3.6.1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@js-soft/eslint-config-ts": "^1.6.14",
|
|
43
43
|
"@js-soft/license-check": "^1.0.9",
|
|
44
44
|
"@types/luxon": "^3.6.2",
|
|
45
|
-
"@types/node": "^22.
|
|
45
|
+
"@types/node": "^22.15.3",
|
|
46
46
|
"@types/prompts": "^2.4.9",
|
|
47
47
|
"@types/qrcode-terminal": "^0.12.2",
|
|
48
48
|
"@types/yargs": "^17.0.33",
|