@casual-simulation/aux-records 3.4.6-alpha.14668890889 → 3.5.0-alpha.15117651144
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/AIController.js +835 -890
- package/AIController.js.map +1 -1
- package/AIHumeInterface.js +43 -54
- package/AIHumeInterface.js.map +1 -1
- package/AIOpenAIRealtimeInterface.js +60 -71
- package/AIOpenAIRealtimeInterface.js.map +1 -1
- package/AnthropicAIChatInterface.js +96 -142
- package/AnthropicAIChatInterface.js.map +1 -1
- package/AuthController.d.ts +3 -2
- package/AuthController.js +1907 -1933
- package/AuthController.js.map +1 -1
- package/AuthStore.d.ts +1 -10
- package/BlockadeLabsGenerateSkyboxInterface.js +57 -72
- package/BlockadeLabsGenerateSkyboxInterface.js.map +1 -1
- package/CachingConfigStore.js +30 -45
- package/CachingConfigStore.js.map +1 -1
- package/CachingPolicyStore.d.ts +8 -2
- package/CachingPolicyStore.js +108 -135
- package/CachingPolicyStore.js.map +1 -1
- package/ComIdConfig.d.ts +18 -18
- package/ComIdConfig.js.map +1 -1
- package/ConsoleAuthMessenger.js +7 -20
- package/ConsoleAuthMessenger.js.map +1 -1
- package/DataRecordsController.d.ts +2 -2
- package/DataRecordsController.js +369 -377
- package/DataRecordsController.js.map +1 -1
- package/DataRecordsStore.d.ts +1 -1
- package/DataRecordsStore.js +1 -1
- package/DataRecordsStore.js.map +1 -1
- package/EventRecordsController.js +226 -240
- package/EventRecordsController.js.map +1 -1
- package/FileRecordsController.d.ts +13 -2
- package/FileRecordsController.js +458 -450
- package/FileRecordsController.js.map +1 -1
- package/GoogleAIChatInterface.js +133 -179
- package/GoogleAIChatInterface.js.map +1 -1
- package/LivekitController.js +43 -54
- package/LivekitController.js.map +1 -1
- package/LoomController.js +64 -75
- package/LoomController.js.map +1 -1
- package/MemoryAuthMessenger.js +10 -23
- package/MemoryAuthMessenger.js.map +1 -1
- package/MemoryCache.js +18 -35
- package/MemoryCache.js.map +1 -1
- package/MemoryFileRecordsLookup.js +105 -125
- package/MemoryFileRecordsLookup.js.map +1 -1
- package/MemoryModerationJobProvider.js +17 -30
- package/MemoryModerationJobProvider.js.map +1 -1
- package/MemoryRateLimiter.js +12 -27
- package/MemoryRateLimiter.js.map +1 -1
- package/MemoryStore.d.ts +18 -6
- package/MemoryStore.js +1879 -1997
- package/MemoryStore.js.map +1 -1
- package/MetricsStore.d.ts +2 -2
- package/ModerationController.js +186 -200
- package/ModerationController.js.map +1 -1
- package/OpenAIChatInterface.js +105 -135
- package/OpenAIChatInterface.js.map +1 -1
- package/OpenAIImageInterface.js +57 -51
- package/OpenAIImageInterface.js.map +1 -1
- package/PolicyController.d.ts +150 -10
- package/PolicyController.js +1546 -1299
- package/PolicyController.js.map +1 -1
- package/PolicyStore.d.ts +110 -2
- package/PolicyStore.js +36 -1
- package/PolicyStore.js.map +1 -1
- package/PrivoClient.js +398 -435
- package/PrivoClient.js.map +1 -1
- package/RateLimitController.js +25 -36
- package/RateLimitController.js.map +1 -1
- package/RecordsClient.js +51 -74
- package/RecordsClient.js.map +1 -1
- package/RecordsController.d.ts +2 -42
- package/RecordsController.js +1026 -1182
- package/RecordsController.js.map +1 -1
- package/RecordsServer.d.ts +196 -27
- package/RecordsServer.js +1701 -1343
- package/RecordsServer.js.map +1 -1
- package/RecordsStore.d.ts +1 -10
- package/RecordsStore.js.map +1 -1
- package/ServerConfig.d.ts +339 -195
- package/ServerConfig.js +13 -0
- package/ServerConfig.js.map +1 -1
- package/SloydInterface.js +62 -75
- package/SloydInterface.js.map +1 -1
- package/StabilityAIImageInterface.js +150 -167
- package/StabilityAIImageInterface.js.map +1 -1
- package/SubscriptionConfigBuilder.d.ts +6 -1
- package/SubscriptionConfigBuilder.js +22 -0
- package/SubscriptionConfigBuilder.js.map +1 -1
- package/SubscriptionConfiguration.d.ts +266 -169
- package/SubscriptionConfiguration.js +101 -79
- package/SubscriptionConfiguration.js.map +1 -1
- package/SubscriptionController.d.ts +2 -1
- package/SubscriptionController.js +643 -650
- package/SubscriptionController.js.map +1 -1
- package/SystemNotificationMessenger.d.ts +21 -4
- package/SystemNotificationMessenger.js +36 -30
- package/SystemNotificationMessenger.js.map +1 -1
- package/TestUtils.d.ts +9 -1
- package/TestUtils.js +105 -129
- package/TestUtils.js.map +1 -1
- package/Utils.d.ts +2 -16
- package/Utils.js +21 -22
- package/Utils.js.map +1 -1
- package/crud/CrudHelpers.js +17 -26
- package/crud/CrudHelpers.js.map +1 -1
- package/crud/CrudRecordsController.d.ts +1 -1
- package/crud/CrudRecordsController.js +259 -267
- package/crud/CrudRecordsController.js.map +1 -1
- package/crud/CrudRecordsControllerTests.js +174 -185
- package/crud/CrudRecordsControllerTests.js.map +1 -1
- package/crud/CrudRecordsStore.d.ts +7 -3
- package/crud/MemoryCrudRecordsStore.d.ts +4 -4
- package/crud/MemoryCrudRecordsStore.js +98 -118
- package/crud/MemoryCrudRecordsStore.js.map +1 -1
- package/crud/sub/MemorySubCrudRecordsStore.d.ts +24 -0
- package/crud/sub/MemorySubCrudRecordsStore.js +146 -0
- package/crud/sub/MemorySubCrudRecordsStore.js.map +1 -0
- package/crud/sub/SubCrudRecordsController.d.ts +182 -0
- package/crud/sub/SubCrudRecordsController.js +360 -0
- package/crud/sub/SubCrudRecordsController.js.map +1 -0
- package/crud/sub/SubCrudRecordsControllerTests.d.ts +39 -0
- package/crud/sub/SubCrudRecordsControllerTests.js +821 -0
- package/crud/sub/SubCrudRecordsControllerTests.js.map +1 -0
- package/crud/sub/SubCrudRecordsStore.d.ts +95 -0
- package/{forms/index.js → crud/sub/SubCrudRecordsStore.js} +2 -2
- package/crud/sub/SubCrudRecordsStore.js.map +1 -0
- package/crud/sub/index.d.ts +3 -0
- package/crud/sub/index.js +20 -0
- package/{forms → crud/sub}/index.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/notifications/MemoryNotificationRecordsStore.js +189 -198
- package/notifications/MemoryNotificationRecordsStore.js.map +1 -1
- package/notifications/NotificationRecordsController.js +438 -460
- package/notifications/NotificationRecordsController.js.map +1 -1
- package/notifications/NotificationRecordsStore.d.ts +2 -1
- package/notifications/WebPushInterface.d.ts +0 -1
- package/notifications/WebPushInterface.js +0 -1
- package/notifications/WebPushInterface.js.map +1 -1
- package/package.json +6 -6
- package/packages/MemoryPackageRecordsStore.d.ts +10 -0
- package/packages/MemoryPackageRecordsStore.js +38 -0
- package/packages/MemoryPackageRecordsStore.js.map +1 -0
- package/packages/PackageRecordsController.d.ts +26 -0
- package/packages/PackageRecordsController.js +49 -0
- package/packages/PackageRecordsController.js.map +1 -0
- package/packages/PackageRecordsStore.d.ts +32 -0
- package/packages/PackageRecordsStore.js +19 -0
- package/packages/PackageRecordsStore.js.map +1 -0
- package/packages/index.d.ts +4 -0
- package/packages/index.js +21 -0
- package/packages/index.js.map +1 -0
- package/packages/version/MemoryPackageVersionRecordsStore.d.ts +21 -0
- package/packages/version/MemoryPackageVersionRecordsStore.js +177 -0
- package/packages/version/MemoryPackageVersionRecordsStore.js.map +1 -0
- package/packages/version/PackageVersionRecordsController.d.ts +144 -0
- package/packages/version/PackageVersionRecordsController.js +656 -0
- package/packages/version/PackageVersionRecordsController.js.map +1 -0
- package/packages/version/PackageVersionRecordsStore.d.ts +342 -0
- package/packages/version/PackageVersionRecordsStore.js +126 -0
- package/packages/version/PackageVersionRecordsStore.js.map +1 -0
- package/packages/version/index.d.ts +4 -0
- package/packages/version/index.js +21 -0
- package/packages/version/index.js.map +1 -0
- package/tracing/TracingDecorators.js +31 -40
- package/tracing/TracingDecorators.js.map +1 -1
- package/webhooks/MemoryWebhookRecordsStore.js +56 -72
- package/webhooks/MemoryWebhookRecordsStore.js.map +1 -1
- package/webhooks/WebhookEnvironment.d.ts +3 -3
- package/webhooks/WebhookRecordsController.d.ts +2 -1
- package/webhooks/WebhookRecordsController.js +389 -382
- package/webhooks/WebhookRecordsController.js.map +1 -1
- package/webhooks/WebhookRecordsStore.d.ts +2 -1
- package/websockets/InstRecordsStore.d.ts +50 -0
- package/websockets/InstRecordsStore.js +17 -0
- package/websockets/InstRecordsStore.js.map +1 -1
- package/websockets/MemoryTempInstRecordsStore.d.ts +5 -0
- package/websockets/MemoryTempInstRecordsStore.js +168 -179
- package/websockets/MemoryTempInstRecordsStore.js.map +1 -1
- package/websockets/MemoryWebsocketConnectionStore.js +98 -135
- package/websockets/MemoryWebsocketConnectionStore.js.map +1 -1
- package/websockets/MemoryWebsocketMessenger.js +29 -48
- package/websockets/MemoryWebsocketMessenger.js.map +1 -1
- package/websockets/SplitInstRecordsStore.d.ts +4 -1
- package/websockets/SplitInstRecordsStore.js +167 -185
- package/websockets/SplitInstRecordsStore.js.map +1 -1
- package/websockets/TemporaryInstRecordsStore.d.ts +19 -1
- package/websockets/TemporaryInstRecordsStore.js +17 -0
- package/websockets/TemporaryInstRecordsStore.js.map +1 -1
- package/websockets/WebsocketController.d.ts +147 -3
- package/websockets/WebsocketController.js +1735 -1391
- package/websockets/WebsocketController.js.map +1 -1
- package/websockets/index.d.ts +0 -1
- package/websockets/index.js +0 -1
- package/websockets/index.js.map +1 -1
- package/AAGUID.d.ts +0 -11
- package/AAGUID.js +0 -116
- package/AAGUID.js.map +0 -1
- package/AuthUtils.d.ts +0 -162
- package/AuthUtils.js +0 -327
- package/AuthUtils.js.map +0 -1
- package/forms/FormError.d.ts +0 -43
- package/forms/FormError.js +0 -56
- package/forms/FormError.js.map +0 -1
- package/forms/index.d.ts +0 -2
- package/websockets/Utils.d.ts +0 -33
- package/websockets/Utils.js +0 -82
- package/websockets/Utils.js.map +0 -1
package/LoomController.js
CHANGED
|
@@ -4,16 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
import { getLoomFeatures, } from './SubscriptionConfiguration';
|
|
7
|
+
import { getLoomFeatures } from './SubscriptionConfiguration';
|
|
17
8
|
import * as jose from 'jose';
|
|
18
9
|
import { traced } from './tracing/TracingDecorators';
|
|
19
10
|
import { SpanStatusCode, trace } from '@opentelemetry/api';
|
|
@@ -33,79 +24,77 @@ export class LoomController {
|
|
|
33
24
|
*
|
|
34
25
|
* @param request The request.
|
|
35
26
|
*/
|
|
36
|
-
getToken(request) {
|
|
27
|
+
async getToken(request) {
|
|
37
28
|
var _a;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (!features.allowed) {
|
|
71
|
-
return {
|
|
72
|
-
success: false,
|
|
73
|
-
errorCode: 'subscription_limit_reached',
|
|
74
|
-
errorMessage: 'Loom features are not enabled for this subscription.',
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
const loomConfig = yield this._store.getStudioLoomConfig(studioId);
|
|
78
|
-
if (!loomConfig) {
|
|
79
|
-
return {
|
|
80
|
-
success: false,
|
|
81
|
-
errorCode: 'invalid_request',
|
|
82
|
-
errorMessage: 'The studio does not have a loom configuration.',
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
const privateKey = yield jose.importPKCS8(loomConfig.privateKey, 'RS256');
|
|
86
|
-
const jws = yield new jose.SignJWT({})
|
|
87
|
-
.setProtectedHeader({ alg: 'RS256' })
|
|
88
|
-
.setIssuedAt(((_a = request.nowMs) !== null && _a !== void 0 ? _a : Date.now()) / 1000)
|
|
89
|
-
.setIssuer(loomConfig.appId)
|
|
90
|
-
.setExpirationTime('10m')
|
|
91
|
-
.sign(privateKey);
|
|
29
|
+
try {
|
|
30
|
+
const context = await this._policies.constructAuthorizationContext({
|
|
31
|
+
userId: request.userId,
|
|
32
|
+
recordKeyOrRecordName: request.recordName,
|
|
33
|
+
});
|
|
34
|
+
if (context.success === false) {
|
|
35
|
+
return context;
|
|
36
|
+
}
|
|
37
|
+
const authorization = await this._policies.authorizeSubjectUsingContext(context.context, {
|
|
38
|
+
resourceKind: 'loom',
|
|
39
|
+
action: 'create',
|
|
40
|
+
markers: null,
|
|
41
|
+
subjectId: request.userId,
|
|
42
|
+
subjectType: 'user',
|
|
43
|
+
});
|
|
44
|
+
if (authorization.success === false) {
|
|
45
|
+
return authorization;
|
|
46
|
+
}
|
|
47
|
+
if (!context.context.recordStudioId) {
|
|
48
|
+
return {
|
|
49
|
+
success: false,
|
|
50
|
+
errorCode: 'invalid_request',
|
|
51
|
+
errorMessage: 'The record does not belong to a studio.',
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const studioId = context.context.recordStudioId;
|
|
55
|
+
const metrics = await this._metrics.getSubscriptionRecordMetrics({
|
|
56
|
+
studioId: studioId,
|
|
57
|
+
});
|
|
58
|
+
const config = await this._config.getSubscriptionConfiguration();
|
|
59
|
+
const features = getLoomFeatures(config, metrics.subscriptionStatus, metrics.subscriptionId);
|
|
60
|
+
if (!features.allowed) {
|
|
92
61
|
return {
|
|
93
|
-
success:
|
|
94
|
-
|
|
62
|
+
success: false,
|
|
63
|
+
errorCode: 'subscription_limit_reached',
|
|
64
|
+
errorMessage: 'Loom features are not enabled for this subscription.',
|
|
95
65
|
};
|
|
96
66
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
100
|
-
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
101
|
-
console.error('[LoomController] Failed to get token', err);
|
|
67
|
+
const loomConfig = await this._store.getStudioLoomConfig(studioId);
|
|
68
|
+
if (!loomConfig) {
|
|
102
69
|
return {
|
|
103
70
|
success: false,
|
|
104
|
-
errorCode: '
|
|
105
|
-
errorMessage: '
|
|
71
|
+
errorCode: 'invalid_request',
|
|
72
|
+
errorMessage: 'The studio does not have a loom configuration.',
|
|
106
73
|
};
|
|
107
74
|
}
|
|
108
|
-
|
|
75
|
+
const privateKey = await jose.importPKCS8(loomConfig.privateKey, 'RS256');
|
|
76
|
+
const jws = await new jose.SignJWT({})
|
|
77
|
+
.setProtectedHeader({ alg: 'RS256' })
|
|
78
|
+
.setIssuedAt(((_a = request.nowMs) !== null && _a !== void 0 ? _a : Date.now()) / 1000)
|
|
79
|
+
.setIssuer(loomConfig.appId)
|
|
80
|
+
.setExpirationTime('10m')
|
|
81
|
+
.sign(privateKey);
|
|
82
|
+
return {
|
|
83
|
+
success: true,
|
|
84
|
+
token: jws,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
catch (err) {
|
|
88
|
+
const span = trace.getActiveSpan();
|
|
89
|
+
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
90
|
+
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
91
|
+
console.error('[LoomController] Failed to get token', err);
|
|
92
|
+
return {
|
|
93
|
+
success: false,
|
|
94
|
+
errorCode: 'server_error',
|
|
95
|
+
errorMessage: 'A server error occurred.',
|
|
96
|
+
};
|
|
97
|
+
}
|
|
109
98
|
}
|
|
110
99
|
}
|
|
111
100
|
__decorate([
|
package/LoomController.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoomController.js","sourceRoot":"","sources":["LoomController.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoomController.js","sourceRoot":"","sources":["LoomController.ts"],"names":[],"mappings":";;;;;;AAwBA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,UAAU,GAAG,gBAAgB,CAAC;AASpC;;GAEG;AACH,MAAM,OAAO,cAAc;IASvB,YAAY,OAA8B;QACtC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IACpC,CAAC;IAED;;;;OAIG;IAEG,AAAN,KAAK,CAAC,QAAQ,CAAC,OAA4B;;QACvC,IAAI,CAAC;YACD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,6BAA6B,CAAC;gBAC/D,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,qBAAqB,EAAE,OAAO,CAAC,UAAU;aAC5C,CAAC,CAAC;YAEH,IAAI,OAAO,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;gBAC5B,OAAO,OAAO,CAA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AAiB;oBAC5B,YAAY,EACR,gDAAgD;iBACvD,CAAC;YACN,CAAC;YAED,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,WAAW,CACrC,UAAU,CAAC,UAAU,EACrB,OAAO,CACV,CAAC;YACF,MAAM,GAAG,GAAG,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;iBACjC,kBAAkB,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;iBACpC,WAAW,CAAC,CAAC,MAAA,OAAO,CAAC,KAAK,mCAAI,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC;iBACjD,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC;iBAC3B,iBAAiB,CAAC,KAAK,CAAC;iBACxB,IAAI,CAAC,UAAU,CAAC,CAAC;YAEtB,OAAO;gBACH,OAAO,EAAE,IAAI;gBACb,KAAK,EAAE,GAAG;aACb,CAAC;QACN,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;YACnC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,eAAe,CAAC,GAAG,CAAC,CAAC;YAC3B,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC;YAChD,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,GAAG,CAAC,CAAC;YAC3D,OAAO;gBACH,OAAO,EAAE,KAAK;gBACd,SAAS,EAAE,cAAc;gBACzB,YAAY,EAAE,0BAA0B;aAC3C,CAAC;QACN,CAAC;IACL,CAAC;CACJ;AA7FS;IADL,MAAM,CAAC,UAAU,CAAC;8CA6FlB"}
|
package/MemoryAuthMessenger.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
export class MemoryAuthMessenger {
|
|
11
2
|
constructor() {
|
|
12
3
|
this._messages = [];
|
|
@@ -14,22 +5,18 @@ export class MemoryAuthMessenger {
|
|
|
14
5
|
get messages() {
|
|
15
6
|
return this._messages;
|
|
16
7
|
}
|
|
17
|
-
supportsAddressType(addressType) {
|
|
18
|
-
return
|
|
19
|
-
return true;
|
|
20
|
-
});
|
|
8
|
+
async supportsAddressType(addressType) {
|
|
9
|
+
return true;
|
|
21
10
|
}
|
|
22
|
-
sendCode(address, addressType, code) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
code,
|
|
28
|
-
});
|
|
29
|
-
return {
|
|
30
|
-
success: true,
|
|
31
|
-
};
|
|
11
|
+
async sendCode(address, addressType, code) {
|
|
12
|
+
this._messages.push({
|
|
13
|
+
address,
|
|
14
|
+
addressType,
|
|
15
|
+
code,
|
|
32
16
|
});
|
|
17
|
+
return {
|
|
18
|
+
success: true,
|
|
19
|
+
};
|
|
33
20
|
}
|
|
34
21
|
}
|
|
35
22
|
//# sourceMappingURL=MemoryAuthMessenger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryAuthMessenger.js","sourceRoot":"","sources":["MemoryAuthMessenger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MemoryAuthMessenger.js","sourceRoot":"","sources":["MemoryAuthMessenger.ts"],"names":[],"mappings":"AAoBA,MAAM,OAAO,mBAAmB;IAAhC;QACY,cAAS,GAIX,EAAE,CAAC;IAyBb,CAAC;IAvBG,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,WAAwB;QAC9C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,QAAQ,CACV,OAAe,EACf,WAAwB,EACxB,IAAY;QAEZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAChB,OAAO;YACP,WAAW;YACX,IAAI;SACP,CAAC,CAAC;QAEH,OAAO;YACH,OAAO,EAAE,IAAI;SAChB,CAAC;IACN,CAAC;CACJ"}
|
package/MemoryCache.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
/**
|
|
11
2
|
* Defines a cache that stores data in memory.
|
|
12
3
|
*/
|
|
@@ -17,37 +8,29 @@ export class MemoryCache {
|
|
|
17
8
|
get items() {
|
|
18
9
|
return this._items;
|
|
19
10
|
}
|
|
20
|
-
store(key, data, expireSeconds) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
expireTimeMs: Date.now() + expireSeconds * 1000,
|
|
25
|
-
});
|
|
11
|
+
async store(key, data, expireSeconds) {
|
|
12
|
+
this._items.set(key, {
|
|
13
|
+
data: data,
|
|
14
|
+
expireTimeMs: Date.now() + expireSeconds * 1000,
|
|
26
15
|
});
|
|
27
16
|
}
|
|
28
|
-
retrieve(key) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (item) {
|
|
32
|
-
|
|
33
|
-
this._items.delete(key);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
return item.data;
|
|
37
|
-
}
|
|
17
|
+
async retrieve(key) {
|
|
18
|
+
const item = this._items.get(key);
|
|
19
|
+
if (item) {
|
|
20
|
+
if (item.expireTimeMs < Date.now()) {
|
|
21
|
+
this._items.delete(key);
|
|
38
22
|
}
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
else {
|
|
24
|
+
return item.data;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
41
28
|
}
|
|
42
|
-
remove(key) {
|
|
43
|
-
|
|
44
|
-
this._items.delete(key);
|
|
45
|
-
});
|
|
29
|
+
async remove(key) {
|
|
30
|
+
this._items.delete(key);
|
|
46
31
|
}
|
|
47
|
-
clear() {
|
|
48
|
-
|
|
49
|
-
this._items.clear();
|
|
50
|
-
});
|
|
32
|
+
async clear() {
|
|
33
|
+
this._items.clear();
|
|
51
34
|
}
|
|
52
35
|
}
|
|
53
36
|
//# sourceMappingURL=MemoryCache.js.map
|
package/MemoryCache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryCache.js","sourceRoot":"","sources":["MemoryCache.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MemoryCache.js","sourceRoot":"","sources":["MemoryCache.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,MAAM,OAAO,WAAW;IAAxB;QACY,WAAM,GAA4B,IAAI,GAAG,EAAE,CAAC;IAgCxD,CAAC;IA9BG,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,KAAK,CAAI,GAAW,EAAE,IAAO,EAAE,aAAqB;QACtD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE;YACjB,IAAI,EAAE,IAAI;YACV,YAAY,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,aAAa,GAAG,IAAI;SAClD,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,QAAQ,CAAI,GAAW;QACzB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,IAAI,EAAE,CAAC;YACP,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;gBACjC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC5B,CAAC;iBAAM,CAAC;gBACJ,OAAO,IAAI,CAAC,IAAI,CAAC;YACrB,CAAC;QACL,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAW;QACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,KAAK;QACP,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;CACJ"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
/* CasualOS is a set of web-based tools designed to facilitate the creation of real-time, multi-user, context-aware interactive experiences.
|
|
11
2
|
*
|
|
12
3
|
* Copyright (c) 2019-2025 Casual Simulation, Inc.
|
|
@@ -29,138 +20,127 @@ export class MemoryFileRecordsLookup {
|
|
|
29
20
|
constructor() {
|
|
30
21
|
this._files = new Map();
|
|
31
22
|
}
|
|
32
|
-
getFileRecord(recordName, fileName) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (file) {
|
|
36
|
-
return {
|
|
37
|
-
fileName: file.fileName,
|
|
38
|
-
recordName: file.recordName,
|
|
39
|
-
publisherId: file.publisherId,
|
|
40
|
-
subjectId: file.subjectId,
|
|
41
|
-
sizeInBytes: file.sizeInBytes,
|
|
42
|
-
uploaded: file.uploaded,
|
|
43
|
-
description: file.description,
|
|
44
|
-
bucket: file.bucket,
|
|
45
|
-
markers: file.markers,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
listUploadedFiles(recordName, fileName) {
|
|
54
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
let files = sortBy([...this._files.values()].filter((f) => f.recordName === recordName && f.uploaded), (f) => f.fileName);
|
|
56
|
-
const count = files.length;
|
|
57
|
-
if (fileName) {
|
|
58
|
-
files = files.filter((f) => f.fileName > fileName);
|
|
59
|
-
}
|
|
23
|
+
async getFileRecord(recordName, fileName) {
|
|
24
|
+
let file = this._files.get(fileName);
|
|
25
|
+
if (file) {
|
|
60
26
|
return {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
totalCount: count,
|
|
27
|
+
fileName: file.fileName,
|
|
28
|
+
recordName: file.recordName,
|
|
29
|
+
publisherId: file.publisherId,
|
|
30
|
+
subjectId: file.subjectId,
|
|
31
|
+
sizeInBytes: file.sizeInBytes,
|
|
32
|
+
uploaded: file.uploaded,
|
|
33
|
+
description: file.description,
|
|
34
|
+
bucket: file.bucket,
|
|
35
|
+
markers: file.markers,
|
|
71
36
|
};
|
|
72
|
-
}
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
73
41
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
42
|
+
async listUploadedFiles(recordName, fileName) {
|
|
43
|
+
let files = sortBy([...this._files.values()].filter((f) => f.recordName === recordName && f.uploaded), (f) => f.fileName);
|
|
44
|
+
const count = files.length;
|
|
45
|
+
if (fileName) {
|
|
46
|
+
files = files.filter((f) => f.fileName > fileName);
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
success: true,
|
|
50
|
+
files: files.slice(0, 10).map((f) => ({
|
|
51
|
+
fileName: f.fileName,
|
|
52
|
+
sizeInBytes: f.sizeInBytes,
|
|
53
|
+
uploaded: f.uploaded,
|
|
54
|
+
markers: f.markers,
|
|
55
|
+
bucket: f.bucket,
|
|
56
|
+
description: f.description,
|
|
57
|
+
})),
|
|
58
|
+
totalCount: count,
|
|
59
|
+
};
|
|
91
60
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
uploaded: false,
|
|
111
|
-
};
|
|
112
|
-
this._files.set(fileName, file);
|
|
61
|
+
async listAllUploadedFilesMatching(filter) {
|
|
62
|
+
let files = sortBy([...this._files.values()].filter((f) => f.uploaded), (f) => f.fileName);
|
|
63
|
+
if (filter.fileExtensions) {
|
|
64
|
+
files = files.filter((f) => {
|
|
65
|
+
return filter.fileExtensions.some((ext) => f.fileName.endsWith(ext));
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
success: true,
|
|
70
|
+
files: files.slice(0, 10).map((f) => ({
|
|
71
|
+
recordName: f.recordName,
|
|
72
|
+
fileName: f.fileName,
|
|
73
|
+
bucket: f.bucket,
|
|
74
|
+
})),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
async addFileRecord(recordName, fileName, publisherId, subjectId, sizeInBytes, description, bucket, markers) {
|
|
78
|
+
if (this._files.has(fileName)) {
|
|
113
79
|
return {
|
|
114
|
-
success:
|
|
80
|
+
success: false,
|
|
81
|
+
errorCode: 'file_already_exists',
|
|
82
|
+
errorMessage: 'The file already exists in the store.',
|
|
115
83
|
};
|
|
116
|
-
}
|
|
84
|
+
}
|
|
85
|
+
let file = {
|
|
86
|
+
fileName: fileName,
|
|
87
|
+
recordName: recordName,
|
|
88
|
+
publisherId,
|
|
89
|
+
subjectId,
|
|
90
|
+
sizeInBytes,
|
|
91
|
+
description,
|
|
92
|
+
markers,
|
|
93
|
+
bucket,
|
|
94
|
+
uploaded: false,
|
|
95
|
+
};
|
|
96
|
+
this._files.set(fileName, file);
|
|
97
|
+
return {
|
|
98
|
+
success: true,
|
|
99
|
+
};
|
|
117
100
|
}
|
|
118
|
-
updateFileRecord(recordName, fileName, markers) {
|
|
119
|
-
|
|
120
|
-
if (!this._files.has(fileName)) {
|
|
121
|
-
return {
|
|
122
|
-
success: false,
|
|
123
|
-
errorCode: 'file_not_found',
|
|
124
|
-
errorMessage: 'The file was not found in the store.',
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
let file = this._files.get(fileName);
|
|
128
|
-
this._files.set(fileName, Object.assign(Object.assign({}, file), { markers: markers.slice() }));
|
|
101
|
+
async updateFileRecord(recordName, fileName, markers) {
|
|
102
|
+
if (!this._files.has(fileName)) {
|
|
129
103
|
return {
|
|
130
|
-
success:
|
|
104
|
+
success: false,
|
|
105
|
+
errorCode: 'file_not_found',
|
|
106
|
+
errorMessage: 'The file was not found in the store.',
|
|
131
107
|
};
|
|
108
|
+
}
|
|
109
|
+
let file = this._files.get(fileName);
|
|
110
|
+
this._files.set(fileName, {
|
|
111
|
+
...file,
|
|
112
|
+
markers: markers.slice(),
|
|
132
113
|
});
|
|
114
|
+
return {
|
|
115
|
+
success: true,
|
|
116
|
+
};
|
|
133
117
|
}
|
|
134
|
-
setFileRecordAsUploaded(recordName, fileName) {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (!file) {
|
|
138
|
-
return {
|
|
139
|
-
success: false,
|
|
140
|
-
errorCode: 'file_not_found',
|
|
141
|
-
errorMessage: 'The file was not found in the store.',
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
file.uploaded = true;
|
|
118
|
+
async setFileRecordAsUploaded(recordName, fileName) {
|
|
119
|
+
let file = this._files.get(fileName);
|
|
120
|
+
if (!file) {
|
|
145
121
|
return {
|
|
146
|
-
success:
|
|
122
|
+
success: false,
|
|
123
|
+
errorCode: 'file_not_found',
|
|
124
|
+
errorMessage: 'The file was not found in the store.',
|
|
147
125
|
};
|
|
148
|
-
}
|
|
126
|
+
}
|
|
127
|
+
file.uploaded = true;
|
|
128
|
+
return {
|
|
129
|
+
success: true,
|
|
130
|
+
};
|
|
149
131
|
}
|
|
150
|
-
eraseFileRecord(recordName, fileName) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
if (!deleted) {
|
|
154
|
-
return {
|
|
155
|
-
success: false,
|
|
156
|
-
errorCode: 'file_not_found',
|
|
157
|
-
errorMessage: 'The file was not found in the store.',
|
|
158
|
-
};
|
|
159
|
-
}
|
|
132
|
+
async eraseFileRecord(recordName, fileName) {
|
|
133
|
+
const deleted = this._files.delete(fileName);
|
|
134
|
+
if (!deleted) {
|
|
160
135
|
return {
|
|
161
|
-
success:
|
|
136
|
+
success: false,
|
|
137
|
+
errorCode: 'file_not_found',
|
|
138
|
+
errorMessage: 'The file was not found in the store.',
|
|
162
139
|
};
|
|
163
|
-
}
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
success: true,
|
|
143
|
+
};
|
|
164
144
|
}
|
|
165
145
|
}
|
|
166
146
|
//# sourceMappingURL=MemoryFileRecordsLookup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryFileRecordsLookup.js","sourceRoot":"","sources":["MemoryFileRecordsLookup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MemoryFileRecordsLookup.js","sourceRoot":"","sources":["MemoryFileRecordsLookup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAahC,MAAM,OAAO,uBAAuB;IAApC;QACY,WAAM,GAA4B,IAAI,GAAG,EAAE,CAAC;IAqLxD,CAAC;IAnLG,KAAK,CAAC,aAAa,CACf,UAAkB,EAClB,QAAgB;QAEhB,IAAI,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAErC,IAAI,IAAI,EAAE,CAAC;YACP,OAAO;gBACH,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,OAAO,EAAE,IAAI,CAAC,OAAO;aACxB,CAAC;QACN,CAA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