@learncard/network-brain-client 2.1.1 → 2.2.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.
- package/CHANGELOG.md +13 -0
- package/dist/brain-client.cjs.development.js +17 -2
- package/dist/brain-client.cjs.development.js.map +2 -2
- package/dist/brain-client.cjs.production.min.js +1 -1
- package/dist/brain-client.cjs.production.min.js.map +3 -3
- package/dist/brain-client.esm.js +17 -2
- package/dist/brain-client.esm.js.map +2 -2
- package/package.json +4 -4
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @learncard/network-brain-client
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#577](https://github.com/learningeconomy/LearnCard/pull/577) [`afd8472f65b27383f426e630e021a65d237e9044`](https://github.com/learningeconomy/LearnCard/commit/afd8472f65b27383f426e630e021a65d237e9044) Thanks [@TaylorBeeston](https://github.com/TaylorBeeston)! - Don't await network calls during init
|
|
8
|
+
|
|
9
|
+
## 2.1.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`20d4585c3a2bc8c5eb4b0a628eb215be829000fa`](https://github.com/learningeconomy/LearnCard/commit/20d4585c3a2bc8c5eb4b0a628eb215be829000fa)]:
|
|
14
|
+
- @learncard/network-brain-service@3.2.2
|
|
15
|
+
|
|
3
16
|
## 2.1.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -138,6 +138,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
138
138
|
LCNNotificationTypeEnumValidator: () => LCNNotificationTypeEnumValidator,
|
|
139
139
|
LCNNotificationValidator: () => LCNNotificationValidator,
|
|
140
140
|
LCNProfileConnectionStatusEnum: () => LCNProfileConnectionStatusEnum,
|
|
141
|
+
LCNProfileDisplayValidator: () => LCNProfileDisplayValidator,
|
|
141
142
|
LCNProfileQueryValidator: () => LCNProfileQueryValidator,
|
|
142
143
|
LCNProfileValidator: () => LCNProfileValidator,
|
|
143
144
|
LCNSigningAuthorityForUserValidator: () => LCNSigningAuthorityForUserValidator,
|
|
@@ -3958,6 +3959,19 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
3958
3959
|
})
|
|
3959
3960
|
);
|
|
3960
3961
|
var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: RegExpValidator }));
|
|
3962
|
+
var LCNProfileDisplayValidator = mod.object({
|
|
3963
|
+
backgroundColor: mod.string().optional(),
|
|
3964
|
+
backgroundImage: mod.string().optional(),
|
|
3965
|
+
fadeBackgroundImage: mod.boolean().optional(),
|
|
3966
|
+
repeatBackgroundImage: mod.boolean().optional(),
|
|
3967
|
+
fontColor: mod.string().optional(),
|
|
3968
|
+
accentColor: mod.string().optional(),
|
|
3969
|
+
accentFontColor: mod.string().optional(),
|
|
3970
|
+
idBackgroundImage: mod.string().optional(),
|
|
3971
|
+
fadeIdBackgroundImage: mod.boolean().optional(),
|
|
3972
|
+
idBackgroundColor: mod.string().optional(),
|
|
3973
|
+
repeatIdBackgroundImage: mod.boolean().optional()
|
|
3974
|
+
});
|
|
3961
3975
|
var LCNProfileValidator = mod.object({
|
|
3962
3976
|
profileId: mod.string().min(3).max(40),
|
|
3963
3977
|
displayName: mod.string().default(""),
|
|
@@ -3970,7 +3984,8 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
3970
3984
|
websiteLink: mod.string().optional(),
|
|
3971
3985
|
isServiceProfile: mod.boolean().default(false).optional(),
|
|
3972
3986
|
type: mod.string().optional(),
|
|
3973
|
-
notificationsWebhook: mod.string().url().startsWith("http").optional()
|
|
3987
|
+
notificationsWebhook: mod.string().url().startsWith("http").optional(),
|
|
3988
|
+
display: LCNProfileDisplayValidator.optional()
|
|
3974
3989
|
});
|
|
3975
3990
|
var LCNProfileQueryValidator = mod.object({
|
|
3976
3991
|
profileId: StringQuery,
|
|
@@ -4353,7 +4368,7 @@ var getClient = /* @__PURE__ */ __name(async (url, didAuthFunction) => {
|
|
|
4353
4368
|
const getChallenges = /* @__PURE__ */ __name(async (amount = 95 + Math.round((Math.random() - 0.5) * 5)) => {
|
|
4354
4369
|
return challengeRequester.utilities.getChallenges.query({ amount });
|
|
4355
4370
|
}, "getChallenges");
|
|
4356
|
-
challenges =
|
|
4371
|
+
getChallenges().then((result) => challenges = result);
|
|
4357
4372
|
const trpc = (0, import_client.createTRPCProxyClient)({
|
|
4358
4373
|
transformer: {
|
|
4359
4374
|
input: import_helpers.RegExpTransformer,
|