@etsoo/appscript 1.4.7 → 1.4.9
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/lib/cjs/app/CoreApp.d.ts +10 -0
- package/lib/cjs/app/CoreApp.js +18 -0
- package/lib/cjs/app/ExternalSettings.d.ts +4 -0
- package/lib/cjs/app/IApp.d.ts +8 -0
- package/lib/mjs/app/CoreApp.d.ts +10 -0
- package/lib/mjs/app/CoreApp.js +18 -0
- package/lib/mjs/app/ExternalSettings.d.ts +4 -0
- package/lib/mjs/app/IApp.d.ts +8 -0
- package/package.json +1 -1
- package/src/app/CoreApp.ts +23 -0
- package/src/app/ExternalSettings.ts +5 -0
- package/src/app/IApp.ts +10 -0
package/lib/cjs/app/CoreApp.d.ts
CHANGED
|
@@ -59,6 +59,10 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
59
59
|
* Storage
|
|
60
60
|
*/
|
|
61
61
|
readonly storage: IStorage;
|
|
62
|
+
/**
|
|
63
|
+
* Pending actions
|
|
64
|
+
*/
|
|
65
|
+
readonly pendings: (() => any)[];
|
|
62
66
|
private _culture;
|
|
63
67
|
/**
|
|
64
68
|
* Culture, like zh-CN
|
|
@@ -106,6 +110,12 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
106
110
|
*/
|
|
107
111
|
get authorized(): boolean;
|
|
108
112
|
private set authorized(value);
|
|
113
|
+
private _isReady;
|
|
114
|
+
/**
|
|
115
|
+
* Is the app ready
|
|
116
|
+
*/
|
|
117
|
+
get isReady(): boolean;
|
|
118
|
+
private set isReady(value);
|
|
109
119
|
private _isTryingLogin;
|
|
110
120
|
/**
|
|
111
121
|
* Last called with token refresh
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -96,6 +96,15 @@ class CoreApp {
|
|
|
96
96
|
set authorized(value) {
|
|
97
97
|
this._authorized = value;
|
|
98
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Is the app ready
|
|
101
|
+
*/
|
|
102
|
+
get isReady() {
|
|
103
|
+
return this._isReady;
|
|
104
|
+
}
|
|
105
|
+
set isReady(value) {
|
|
106
|
+
this._isReady = value;
|
|
107
|
+
}
|
|
99
108
|
/**
|
|
100
109
|
* Get persisted fields
|
|
101
110
|
*/
|
|
@@ -117,7 +126,12 @@ class CoreApp {
|
|
|
117
126
|
*/
|
|
118
127
|
constructor(settings, api, notifier, storage, name) {
|
|
119
128
|
var _a;
|
|
129
|
+
/**
|
|
130
|
+
* Pending actions
|
|
131
|
+
*/
|
|
132
|
+
this.pendings = [];
|
|
120
133
|
this._authorized = false;
|
|
134
|
+
this._isReady = false;
|
|
121
135
|
this._isTryingLogin = false;
|
|
122
136
|
/**
|
|
123
137
|
* Last called with token refresh
|
|
@@ -1207,8 +1221,12 @@ class CoreApp {
|
|
|
1207
1221
|
* Setup callback
|
|
1208
1222
|
*/
|
|
1209
1223
|
setup() {
|
|
1224
|
+
// Ready
|
|
1225
|
+
this.isReady = true;
|
|
1210
1226
|
// Restore
|
|
1211
1227
|
this.restore();
|
|
1228
|
+
// Pending actions
|
|
1229
|
+
this.pendings.forEach((p) => p());
|
|
1212
1230
|
}
|
|
1213
1231
|
/**
|
|
1214
1232
|
* Signout
|
package/lib/cjs/app/IApp.d.ts
CHANGED
|
@@ -109,10 +109,18 @@ export interface IApp {
|
|
|
109
109
|
* Is current authorized
|
|
110
110
|
*/
|
|
111
111
|
readonly authorized: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Is the app ready
|
|
114
|
+
*/
|
|
115
|
+
readonly isReady: boolean;
|
|
112
116
|
/**
|
|
113
117
|
* Application name
|
|
114
118
|
*/
|
|
115
119
|
readonly name: string;
|
|
120
|
+
/**
|
|
121
|
+
* Pending actions
|
|
122
|
+
*/
|
|
123
|
+
readonly pendings: (() => any)[];
|
|
116
124
|
/**
|
|
117
125
|
* IP data
|
|
118
126
|
*/
|
package/lib/mjs/app/CoreApp.d.ts
CHANGED
|
@@ -59,6 +59,10 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
59
59
|
* Storage
|
|
60
60
|
*/
|
|
61
61
|
readonly storage: IStorage;
|
|
62
|
+
/**
|
|
63
|
+
* Pending actions
|
|
64
|
+
*/
|
|
65
|
+
readonly pendings: (() => any)[];
|
|
62
66
|
private _culture;
|
|
63
67
|
/**
|
|
64
68
|
* Culture, like zh-CN
|
|
@@ -106,6 +110,12 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
106
110
|
*/
|
|
107
111
|
get authorized(): boolean;
|
|
108
112
|
private set authorized(value);
|
|
113
|
+
private _isReady;
|
|
114
|
+
/**
|
|
115
|
+
* Is the app ready
|
|
116
|
+
*/
|
|
117
|
+
get isReady(): boolean;
|
|
118
|
+
private set isReady(value);
|
|
109
119
|
private _isTryingLogin;
|
|
110
120
|
/**
|
|
111
121
|
* Last called with token refresh
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -70,6 +70,15 @@ export class CoreApp {
|
|
|
70
70
|
set authorized(value) {
|
|
71
71
|
this._authorized = value;
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Is the app ready
|
|
75
|
+
*/
|
|
76
|
+
get isReady() {
|
|
77
|
+
return this._isReady;
|
|
78
|
+
}
|
|
79
|
+
set isReady(value) {
|
|
80
|
+
this._isReady = value;
|
|
81
|
+
}
|
|
73
82
|
/**
|
|
74
83
|
* Get persisted fields
|
|
75
84
|
*/
|
|
@@ -91,7 +100,12 @@ export class CoreApp {
|
|
|
91
100
|
*/
|
|
92
101
|
constructor(settings, api, notifier, storage, name) {
|
|
93
102
|
var _a;
|
|
103
|
+
/**
|
|
104
|
+
* Pending actions
|
|
105
|
+
*/
|
|
106
|
+
this.pendings = [];
|
|
94
107
|
this._authorized = false;
|
|
108
|
+
this._isReady = false;
|
|
95
109
|
this._isTryingLogin = false;
|
|
96
110
|
/**
|
|
97
111
|
* Last called with token refresh
|
|
@@ -1181,8 +1195,12 @@ export class CoreApp {
|
|
|
1181
1195
|
* Setup callback
|
|
1182
1196
|
*/
|
|
1183
1197
|
setup() {
|
|
1198
|
+
// Ready
|
|
1199
|
+
this.isReady = true;
|
|
1184
1200
|
// Restore
|
|
1185
1201
|
this.restore();
|
|
1202
|
+
// Pending actions
|
|
1203
|
+
this.pendings.forEach((p) => p());
|
|
1186
1204
|
}
|
|
1187
1205
|
/**
|
|
1188
1206
|
* Signout
|
package/lib/mjs/app/IApp.d.ts
CHANGED
|
@@ -109,10 +109,18 @@ export interface IApp {
|
|
|
109
109
|
* Is current authorized
|
|
110
110
|
*/
|
|
111
111
|
readonly authorized: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Is the app ready
|
|
114
|
+
*/
|
|
115
|
+
readonly isReady: boolean;
|
|
112
116
|
/**
|
|
113
117
|
* Application name
|
|
114
118
|
*/
|
|
115
119
|
readonly name: string;
|
|
120
|
+
/**
|
|
121
|
+
* Pending actions
|
|
122
|
+
*/
|
|
123
|
+
readonly pendings: (() => any)[];
|
|
116
124
|
/**
|
|
117
125
|
* IP data
|
|
118
126
|
*/
|
package/package.json
CHANGED
package/src/app/CoreApp.ts
CHANGED
|
@@ -113,6 +113,11 @@ export abstract class CoreApp<
|
|
|
113
113
|
*/
|
|
114
114
|
readonly storage: IStorage;
|
|
115
115
|
|
|
116
|
+
/**
|
|
117
|
+
* Pending actions
|
|
118
|
+
*/
|
|
119
|
+
readonly pendings: (() => any)[] = [];
|
|
120
|
+
|
|
116
121
|
private _culture!: string;
|
|
117
122
|
/**
|
|
118
123
|
* Culture, like zh-CN
|
|
@@ -194,6 +199,18 @@ export abstract class CoreApp<
|
|
|
194
199
|
this._authorized = value;
|
|
195
200
|
}
|
|
196
201
|
|
|
202
|
+
private _isReady: boolean = false;
|
|
203
|
+
/**
|
|
204
|
+
* Is the app ready
|
|
205
|
+
*/
|
|
206
|
+
get isReady() {
|
|
207
|
+
return this._isReady;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
private set isReady(value: boolean) {
|
|
211
|
+
this._isReady = value;
|
|
212
|
+
}
|
|
213
|
+
|
|
197
214
|
private _isTryingLogin = false;
|
|
198
215
|
|
|
199
216
|
/**
|
|
@@ -1542,8 +1559,14 @@ export abstract class CoreApp<
|
|
|
1542
1559
|
* Setup callback
|
|
1543
1560
|
*/
|
|
1544
1561
|
setup() {
|
|
1562
|
+
// Ready
|
|
1563
|
+
this.isReady = true;
|
|
1564
|
+
|
|
1545
1565
|
// Restore
|
|
1546
1566
|
this.restore();
|
|
1567
|
+
|
|
1568
|
+
// Pending actions
|
|
1569
|
+
this.pendings.forEach((p) => p());
|
|
1547
1570
|
}
|
|
1548
1571
|
|
|
1549
1572
|
/**
|
package/src/app/IApp.ts
CHANGED
|
@@ -151,11 +151,21 @@ export interface IApp {
|
|
|
151
151
|
*/
|
|
152
152
|
readonly authorized: boolean;
|
|
153
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Is the app ready
|
|
156
|
+
*/
|
|
157
|
+
readonly isReady: boolean;
|
|
158
|
+
|
|
154
159
|
/**
|
|
155
160
|
* Application name
|
|
156
161
|
*/
|
|
157
162
|
readonly name: string;
|
|
158
163
|
|
|
164
|
+
/**
|
|
165
|
+
* Pending actions
|
|
166
|
+
*/
|
|
167
|
+
readonly pendings: (() => any)[];
|
|
168
|
+
|
|
159
169
|
/**
|
|
160
170
|
* IP data
|
|
161
171
|
*/
|