@monimesl/dot-cli 0.1.0-alpha.24 → 0.1.0-alpha.26
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/dist/templates/showcase/pages/dash/account/controller.ts +4 -3
- package/dist/templates/showcase/pages/dash/account/state.ts +1 -0
- package/dist/templates/showcase/pages/dash/account/view.dml +4 -3
- package/dist/templates/showcase/pages/dash/calls/controller.ts +3 -0
- package/dist/templates/showcase/pages/dash/calls/view.dml +1 -0
- package/dist/templates/showcase/pages/index/state.ts +1 -1
- package/package.json +6 -6
|
@@ -9,12 +9,13 @@ export default definePage({
|
|
|
9
9
|
setNonce: (_state, event: ValueEvent) => ({ nonce: event.detail.value }),
|
|
10
10
|
},
|
|
11
11
|
actions: {
|
|
12
|
-
async
|
|
12
|
+
async signIn(state) {
|
|
13
13
|
try {
|
|
14
|
-
const { fullName, accountIdToken } = await this.dash.account.
|
|
14
|
+
const { fullName, alias, accountIdToken } = await this.dash.account.signIn({
|
|
15
|
+
mode: 'simple',
|
|
15
16
|
nonce: state.nonce,
|
|
16
17
|
});
|
|
17
|
-
this.setState({ fullName, accountIdToken, note: '' });
|
|
18
|
+
this.setState({ fullName, alias, accountIdToken, note: '' });
|
|
18
19
|
} catch (error) {
|
|
19
20
|
this.setState({ note: errorMessage(error) });
|
|
20
21
|
}
|
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
<Text>Who is signed in to Dash. It needs the account permission in dot.json.</Text>
|
|
4
4
|
|
|
5
5
|
<View gap="small">
|
|
6
|
-
<Text variant="subtitle">
|
|
7
|
-
<Text variant="caption" tone="muted">
|
|
6
|
+
<Text variant="subtitle">signIn</Text>
|
|
7
|
+
<Text variant="caption" tone="muted">With mode "simple", Dash says who the person is: their full name, the phone number or email address they use Dash with, and a token: a SHA-512 hash of this dot's id, their Monimeer id and the nonce. The same nonce gives the same token. Dash makes it on the phone, so it names the person, but proves nothing to the dot's server.</Text>
|
|
8
8
|
<View variant="card" gap="medium">
|
|
9
9
|
<Input label="Nonce" value="{{ nonce }}" onChange="setNonce" />
|
|
10
|
-
<Button onClick="
|
|
10
|
+
<Button onClick="signIn">Sign in with Dash</Button>
|
|
11
11
|
<If condition="{{ fullName }}">
|
|
12
12
|
<View gap="none">
|
|
13
13
|
<DetailRow label="fullName" value="{{ fullName }}" />
|
|
14
|
+
<DetailRow label="alias" value="{{ alias }}" />
|
|
14
15
|
<DetailRow label="accountIdToken" value="{{ accountIdToken }}" />
|
|
15
16
|
</View>
|
|
16
17
|
</If>
|
|
@@ -41,6 +41,9 @@ export default definePage({
|
|
|
41
41
|
case 'denied':
|
|
42
42
|
await this.dash.network.http.request({ url: 'https://example.com' });
|
|
43
43
|
break;
|
|
44
|
+
case 'missing':
|
|
45
|
+
await this.dash.storage.file.read('never-saved.txt');
|
|
46
|
+
break;
|
|
44
47
|
}
|
|
45
48
|
this.setState({ code: 'none', message: 'It worked' });
|
|
46
49
|
} catch (error) {
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
<View direction="row" wrap gap="small">
|
|
33
33
|
<Button variant="secondary" data-call="invalid" onClick="show">Pick a date between bad limits</Button>
|
|
34
34
|
<Button variant="secondary" data-call="denied" onClick="show">Reach an unlisted host</Button>
|
|
35
|
+
<Button variant="secondary" data-call="missing" onClick="show">Read a file never saved</Button>
|
|
35
36
|
</View>
|
|
36
37
|
</View>
|
|
37
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monimesl/dot-cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.26",
|
|
4
4
|
"description": "The dotctl command: build mini apps and run them in the simulator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"typescript": "^5.9.3",
|
|
26
26
|
"uqr": "^0.1.3",
|
|
27
|
-
"@monimesl/dot-compiler": "0.1.0-alpha.
|
|
28
|
-
"@monimesl/dot-
|
|
29
|
-
"@monimesl/dot-
|
|
30
|
-
"@monimesl/dot-
|
|
31
|
-
"@monimesl/dot-
|
|
27
|
+
"@monimesl/dot-compiler": "0.1.0-alpha.26",
|
|
28
|
+
"@monimesl/dot-dml-parser": "0.1.0-alpha.26",
|
|
29
|
+
"@monimesl/dot-script-parser": "0.1.0-alpha.26",
|
|
30
|
+
"@monimesl/dot-simulator": "0.1.0-alpha.26",
|
|
31
|
+
"@monimesl/dot-core": "0.1.0-alpha.26"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^22.20.4",
|