@casual-simulation/aux-vm 3.0.16 → 3.0.18-alpha.2721461525
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/auth/AuxAuth.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AuthData } from '@casual-simulation/aux-common';
|
|
2
2
|
import { CreatePublicRecordKeyResult, PublicRecordKeyPolicy } from '@casual-simulation/aux-records';
|
|
3
|
+
import { AddressType } from '@casual-simulation/aux-records/AuthStore';
|
|
3
4
|
/**
|
|
4
5
|
* Defines an interface that represents the login state of the user.
|
|
5
6
|
*/
|
|
@@ -17,12 +18,12 @@ export interface LoginStatus {
|
|
|
17
18
|
*/
|
|
18
19
|
authData?: AuthData;
|
|
19
20
|
}
|
|
20
|
-
export declare type LoginUIStatus = LoginUINoStatus |
|
|
21
|
+
export declare type LoginUIStatus = LoginUINoStatus | LoginUIAddressStatus | LoginUICheckAddressStatus | LoginUIShowIframe;
|
|
21
22
|
export interface LoginUINoStatus {
|
|
22
23
|
page: false;
|
|
23
24
|
}
|
|
24
|
-
export interface
|
|
25
|
-
page: 'enter_email';
|
|
25
|
+
export interface LoginUIAddressStatus {
|
|
26
|
+
page: 'enter_address' | 'enter_email';
|
|
26
27
|
/**
|
|
27
28
|
* The page that should be linked to as the terms of service.
|
|
28
29
|
*/
|
|
@@ -31,20 +32,57 @@ export interface LoginUIEmailStatus {
|
|
|
31
32
|
* The name of the site that is being logged into.
|
|
32
33
|
*/
|
|
33
34
|
siteName: string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to show an error message that indicates that the terms of service must be accepted.
|
|
37
|
+
*/
|
|
34
38
|
showAcceptTermsOfServiceError?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to show an error message that indicates that an email address must be provided.
|
|
41
|
+
*/
|
|
35
42
|
showEnterEmailError?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to show an error message that indicates that the email address is invalid.
|
|
45
|
+
*/
|
|
36
46
|
showInvalidEmailError?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether to show an error message that indicates a phone number must be provided.
|
|
49
|
+
*/
|
|
37
50
|
showEnterSmsError?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Whether to show an error message that the phone number is invalid.
|
|
53
|
+
*/
|
|
38
54
|
showInvalidSmsError?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* The error code that ocurred.
|
|
57
|
+
*/
|
|
39
58
|
errorCode?: string;
|
|
59
|
+
/**
|
|
60
|
+
* The error message that should be shown.
|
|
61
|
+
*/
|
|
40
62
|
errorMessage?: string;
|
|
41
63
|
/**
|
|
42
64
|
* Whether SMS phone numbers are supported for login.
|
|
43
65
|
*/
|
|
44
66
|
supportsSms?: boolean;
|
|
45
67
|
}
|
|
46
|
-
export interface
|
|
47
|
-
page: 'check_email';
|
|
68
|
+
export interface LoginUICheckAddressStatus {
|
|
69
|
+
page: 'check_address' | 'check_email';
|
|
70
|
+
/**
|
|
71
|
+
* The address that should be checked.
|
|
72
|
+
*/
|
|
73
|
+
address: string;
|
|
74
|
+
/**
|
|
75
|
+
* The type of address that should be checked.
|
|
76
|
+
*/
|
|
77
|
+
addressType: AddressType;
|
|
78
|
+
/**
|
|
79
|
+
* Whether the option to enter a code should be provided.
|
|
80
|
+
*/
|
|
81
|
+
enterCode?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Whether to show an error message that the code is invalid.
|
|
84
|
+
*/
|
|
85
|
+
showInvalidCodeError?: boolean;
|
|
48
86
|
}
|
|
49
87
|
export interface LoginUIShowIframe {
|
|
50
88
|
page: 'show_iframe';
|
|
@@ -117,6 +155,12 @@ export interface AuxAuth {
|
|
|
117
155
|
* @param acceptedTermsOfService Whether the user accepted the terms of service.
|
|
118
156
|
*/
|
|
119
157
|
provideSmsNumber(sms: string, acceptedTermsOfService: boolean): Promise<void>;
|
|
158
|
+
/**
|
|
159
|
+
* Specifies the login code that should be used to complete a login attempt.
|
|
160
|
+
* Only supported on protocol version 6 or more.
|
|
161
|
+
* @param code The code that should be used.
|
|
162
|
+
*/
|
|
163
|
+
provideCode(code: string): Promise<void>;
|
|
120
164
|
/**
|
|
121
165
|
* Cancels the in-progress login attempt.
|
|
122
166
|
*/
|
|
@@ -70,6 +70,11 @@ export interface AuthHelperInterface extends SubscriptionLike {
|
|
|
70
70
|
* @param acceptedTermsOfService Whether the user accepted the terms of service.
|
|
71
71
|
*/
|
|
72
72
|
provideSmsNumber(sms: string, acceptedTermsOfService: boolean): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Provides the given login code to finish logging in.
|
|
75
|
+
* @param code The code that should be provided.
|
|
76
|
+
*/
|
|
77
|
+
provideCode(code: string): Promise<void>;
|
|
73
78
|
/**
|
|
74
79
|
* Cancels the current login if it is using the custom UI flow.
|
|
75
80
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@casual-simulation/aux-vm",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.18-alpha.2721461525",
|
|
4
4
|
"description": "A set of abstractions required to securely run an AUX.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aux"
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"url": "https://github.com/casual-simulation/casualos/issues"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@casual-simulation/aux-common": "^3.0.
|
|
43
|
-
"@casual-simulation/aux-records": "^3.0.
|
|
42
|
+
"@casual-simulation/aux-common": "^3.0.18-alpha.2721461525",
|
|
43
|
+
"@casual-simulation/aux-records": "^3.0.18-alpha.2721461525",
|
|
44
44
|
"@casual-simulation/causal-trees": "^3.0.14",
|
|
45
45
|
"@casual-simulation/crypto": "^3.0.14",
|
|
46
46
|
"@casual-simulation/fast-json-stable-stringify": "^3.0.0",
|
|
47
47
|
"@casual-simulation/timesync": "^3.0.14",
|
|
48
|
-
"@casual-simulation/undom": "^3.0.
|
|
48
|
+
"@casual-simulation/undom": "^3.0.18-alpha.2721461525",
|
|
49
49
|
"esbuild": "^0.13.8",
|
|
50
50
|
"esbuild-wasm": "^0.8.43",
|
|
51
51
|
"lodash": "4.17.21",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"rxjs": "^6.5.2",
|
|
54
54
|
"uuid": "^8.3.2"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "62694d028e1b0b8064ec03857ed62c7db16a1314"
|
|
57
57
|
}
|
|
@@ -2,6 +2,13 @@ import { BotAction } from '@casual-simulation/aux-common';
|
|
|
2
2
|
import { AuxHelper } from '../vm';
|
|
3
3
|
import { AppBackend } from './AppBackend';
|
|
4
4
|
export declare const TARGET_INPUT_PROPERTIES: string[];
|
|
5
|
+
/**
|
|
6
|
+
* Properties that should automatically be copied for specific tag types.
|
|
7
|
+
* For performance, these properties are only copied if an event is sent for the element with the element as the target.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ELEMENT_SPECIFIC_PROPERTIES: {
|
|
10
|
+
[nodeName: string]: string[];
|
|
11
|
+
};
|
|
5
12
|
export interface HtmlPortalSetupResult {
|
|
6
13
|
builtinEvents: string[];
|
|
7
14
|
}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { action, asyncResult, hasValue, ON_APP_SETUP_ACTION_NAME, registerHtmlApp, updateHtmlApp, unregisterHtmlApp, } from '@casual-simulation/aux-common';
|
|
2
2
|
import { v4 as uuid } from 'uuid';
|
|
3
|
-
import undom from '@casual-simulation/undom';
|
|
3
|
+
import undom, { supressMutations } from '@casual-simulation/undom';
|
|
4
4
|
import { render } from 'preact';
|
|
5
5
|
export const TARGET_INPUT_PROPERTIES = ['value', 'checked'];
|
|
6
|
+
/**
|
|
7
|
+
* Properties that should automatically be copied for specific tag types.
|
|
8
|
+
* For performance, these properties are only copied if an event is sent for the element with the element as the target.
|
|
9
|
+
*/
|
|
10
|
+
export const ELEMENT_SPECIFIC_PROPERTIES = {
|
|
11
|
+
IMG: ['width', 'height', 'naturalWidth', 'naturalHeight', 'currentSrc'],
|
|
12
|
+
VIDEO: ['videoWidth', 'videoHeight', 'duration', 'currentSrc'],
|
|
13
|
+
};
|
|
6
14
|
/**
|
|
7
15
|
* Defines a class that is used to communicate HTML changes for a custom html portal.
|
|
8
16
|
*/
|
|
@@ -54,11 +62,28 @@ export class HtmlAppBackend {
|
|
|
54
62
|
let target = this._getNode(event.event.target);
|
|
55
63
|
if (target && target.dispatchEvent) {
|
|
56
64
|
let finalEvent = Object.assign(Object.assign({}, event.event), { target: target, bubbles: true });
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
try {
|
|
66
|
+
supressMutations(true);
|
|
67
|
+
for (let prop of TARGET_INPUT_PROPERTIES) {
|
|
68
|
+
let eventPropName = `_target${prop}`;
|
|
69
|
+
if (eventPropName in finalEvent) {
|
|
70
|
+
target[prop] =
|
|
71
|
+
finalEvent[eventPropName];
|
|
72
|
+
}
|
|
61
73
|
}
|
|
74
|
+
const propList = ELEMENT_SPECIFIC_PROPERTIES[target.nodeName];
|
|
75
|
+
if (propList) {
|
|
76
|
+
for (let prop of propList) {
|
|
77
|
+
let eventPropName = `_target${prop}`;
|
|
78
|
+
if (eventPropName in finalEvent) {
|
|
79
|
+
target[prop] =
|
|
80
|
+
finalEvent[eventPropName];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
finally {
|
|
86
|
+
supressMutations(false);
|
|
62
87
|
}
|
|
63
88
|
try {
|
|
64
89
|
target.dispatchEvent(finalEvent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HtmlAppBackend.js","sourceRoot":"","sources":["HtmlAppBackend.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,MAAM,EACN,WAAW,EAIX,QAAQ,EACR,wBAAwB,EACxB,eAAe,EAEf,aAAa,E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