@builder6/server 0.6.5 → 0.7.1

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.
Files changed (111) hide show
  1. package/dist/app.express.js +0 -1
  2. package/dist/app.express.js.map +1 -1
  3. package/dist/app.module.js +12 -10
  4. package/dist/app.module.js.map +1 -1
  5. package/dist/b6.server.js +11 -134
  6. package/dist/b6.server.js.map +1 -1
  7. package/dist/oidc/oidc.service.js +1 -1
  8. package/dist/oidc/oidc.service.js.map +1 -1
  9. package/package.json +10 -8
  10. package/dist/app.config.d.ts +0 -2
  11. package/dist/app.config.js +0 -55
  12. package/dist/app.config.js.map +0 -1
  13. package/dist/b6.config.d.ts +0 -0
  14. package/dist/b6.config.js +0 -4
  15. package/dist/b6.config.js.map +0 -1
  16. package/dist/files/files.controller.d.ts +0 -11
  17. package/dist/files/files.controller.js +0 -148
  18. package/dist/files/files.controller.js.map +0 -1
  19. package/dist/files/files.module.d.ts +0 -2
  20. package/dist/files/files.module.js +0 -26
  21. package/dist/files/files.module.js.map +0 -1
  22. package/dist/files/files.moleculer.d.ts +0 -10
  23. package/dist/files/files.moleculer.js +0 -53
  24. package/dist/files/files.moleculer.js.map +0 -1
  25. package/dist/files/files.service.d.ts +0 -30
  26. package/dist/files/files.service.js +0 -207
  27. package/dist/files/files.service.js.map +0 -1
  28. package/dist/files/index.d.ts +0 -3
  29. package/dist/files/index.js +0 -20
  30. package/dist/files/index.js.map +0 -1
  31. package/dist/index.d.ts +0 -3
  32. package/dist/index.js +0 -26
  33. package/dist/index.js.map +0 -1
  34. package/dist/moleculer.config.d.ts +0 -2
  35. package/dist/moleculer.config.js +0 -74
  36. package/dist/moleculer.config.js.map +0 -1
  37. package/dist/plugin/moleculer.service.d.ts +0 -11
  38. package/dist/plugin/moleculer.service.js +0 -96
  39. package/dist/plugin/moleculer.service.js.map +0 -1
  40. package/dist/plugin/plugin.module.d.ts +0 -14
  41. package/dist/plugin/plugin.module.js +0 -72
  42. package/dist/plugin/plugin.module.js.map +0 -1
  43. package/dist/plugin/plugin.service.d.ts +0 -3
  44. package/dist/plugin/plugin.service.js +0 -21
  45. package/dist/plugin/plugin.service.js.map +0 -1
  46. package/dist/rooms/globals/augmentation.d.ts +0 -25
  47. package/dist/rooms/globals/augmentation.js +0 -3
  48. package/dist/rooms/globals/augmentation.js.map +0 -1
  49. package/dist/rooms/lib/DateToString.d.ts +0 -3
  50. package/dist/rooms/lib/DateToString.js +0 -3
  51. package/dist/rooms/lib/DateToString.js.map +0 -1
  52. package/dist/rooms/lib/Json.d.ts +0 -9
  53. package/dist/rooms/lib/Json.js +0 -18
  54. package/dist/rooms/lib/Json.js.map +0 -1
  55. package/dist/rooms/lib/utils.d.ts +0 -33
  56. package/dist/rooms/lib/utils.js +0 -122
  57. package/dist/rooms/lib/utils.js.map +0 -1
  58. package/dist/rooms/protocol/AuthToken.d.ts +0 -50
  59. package/dist/rooms/protocol/AuthToken.js +0 -49
  60. package/dist/rooms/protocol/AuthToken.js.map +0 -1
  61. package/dist/rooms/protocol/Authentication.d.ts +0 -22
  62. package/dist/rooms/protocol/Authentication.js +0 -3
  63. package/dist/rooms/protocol/Authentication.js.map +0 -1
  64. package/dist/rooms/protocol/BaseActivitiesData.d.ts +0 -4
  65. package/dist/rooms/protocol/BaseActivitiesData.js +0 -3
  66. package/dist/rooms/protocol/BaseActivitiesData.js.map +0 -1
  67. package/dist/rooms/protocol/BaseRoomInfo.d.ts +0 -6
  68. package/dist/rooms/protocol/BaseRoomInfo.js +0 -3
  69. package/dist/rooms/protocol/BaseRoomInfo.js.map +0 -1
  70. package/dist/rooms/protocol/BaseUserMeta.d.ts +0 -10
  71. package/dist/rooms/protocol/BaseUserMeta.js +0 -3
  72. package/dist/rooms/protocol/BaseUserMeta.js.map +0 -1
  73. package/dist/rooms/protocol/ClientMsg.d.ts +0 -41
  74. package/dist/rooms/protocol/ClientMsg.js +0 -13
  75. package/dist/rooms/protocol/ClientMsg.js.map +0 -1
  76. package/dist/rooms/protocol/Comments.d.ts +0 -146
  77. package/dist/rooms/protocol/Comments.js +0 -3
  78. package/dist/rooms/protocol/Comments.js.map +0 -1
  79. package/dist/rooms/protocol/InboxNotifications.d.ts +0 -49
  80. package/dist/rooms/protocol/InboxNotifications.js +0 -3
  81. package/dist/rooms/protocol/InboxNotifications.js.map +0 -1
  82. package/dist/rooms/protocol/Op.d.ts +0 -82
  83. package/dist/rooms/protocol/Op.js +0 -28
  84. package/dist/rooms/protocol/Op.js.map +0 -1
  85. package/dist/rooms/protocol/SerializedCrdt.d.ts +0 -40
  86. package/dist/rooms/protocol/SerializedCrdt.js +0 -19
  87. package/dist/rooms/protocol/SerializedCrdt.js.map +0 -1
  88. package/dist/rooms/protocol/ServerMsg.d.ts +0 -128
  89. package/dist/rooms/protocol/ServerMsg.js +0 -25
  90. package/dist/rooms/protocol/ServerMsg.js.map +0 -1
  91. package/dist/rooms/protocol/VersionHistory.d.ts +0 -9
  92. package/dist/rooms/protocol/VersionHistory.js +0 -3
  93. package/dist/rooms/protocol/VersionHistory.js.map +0 -1
  94. package/dist/rooms/rooms.controller.d.ts +0 -64
  95. package/dist/rooms/rooms.controller.js +0 -401
  96. package/dist/rooms/rooms.controller.js.map +0 -1
  97. package/dist/rooms/rooms.gateway.d.ts +0 -30
  98. package/dist/rooms/rooms.gateway.js +0 -188
  99. package/dist/rooms/rooms.gateway.js.map +0 -1
  100. package/dist/rooms/rooms.guard.d.ts +0 -9
  101. package/dist/rooms/rooms.guard.js +0 -48
  102. package/dist/rooms/rooms.guard.js.map +0 -1
  103. package/dist/rooms/rooms.module.d.ts +0 -2
  104. package/dist/rooms/rooms.module.js +0 -36
  105. package/dist/rooms/rooms.module.js.map +0 -1
  106. package/dist/rooms/rooms.service.d.ts +0 -51
  107. package/dist/rooms/rooms.service.js +0 -225
  108. package/dist/rooms/rooms.service.js.map +0 -1
  109. package/views/ag-grid/README.md +0 -15
  110. package/views/ag-grid/ag-grid.hbs +0 -1099
  111. package/views/devextreme/datagrid.hbs +0 -240
@@ -1,72 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var PluginModule_1;
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.PluginModule = void 0;
11
- const common_1 = require("@nestjs/common");
12
- const fs = require("fs");
13
- const path = require("path");
14
- const plugin_service_1 = require("./plugin.service");
15
- const app_config_1 = require("../app.config");
16
- const moleculer_service_1 = require("./moleculer.service");
17
- const moleculer_1 = require("@builder6/moleculer");
18
- let PluginModule = PluginModule_1 = class PluginModule {
19
- static forRoot() {
20
- const modules = this.config.plugin.modules;
21
- if (modules) {
22
- for (const module of modules.split(',')) {
23
- const pluginModule = this.loadPlugin(module);
24
- this.plugins.push({
25
- name: module,
26
- module: pluginModule,
27
- });
28
- }
29
- }
30
- return {
31
- module: PluginModule_1,
32
- imports: [...this.plugins.map((plugin) => plugin.module)],
33
- };
34
- }
35
- static loadPlugin(packageName) {
36
- const packageModulePath = path.resolve(this.getPackagePath(packageName), './dist/app.module.js');
37
- if (!fs.existsSync(packageModulePath)) {
38
- this.logger.error(`Nestjs 插件 ${packageName} 缺少文件: ${packageModulePath}`);
39
- return;
40
- }
41
- this.logger.log(`加载 Nestjs 插件: ${packageName} ...`);
42
- const PluginModule = require(packageModulePath);
43
- return PluginModule.default;
44
- }
45
- static getPackagePath(packageName) {
46
- try {
47
- return path.dirname(require.resolve(`${packageName}/package.json`, {
48
- paths: [
49
- path.join(process.env.B6_PLUGIN_DIR, 'node_modules'),
50
- ...module.paths,
51
- ],
52
- }));
53
- }
54
- catch (e) {
55
- console.error(e);
56
- return null;
57
- }
58
- }
59
- };
60
- exports.PluginModule = PluginModule;
61
- PluginModule.logger = new common_1.Logger(PluginModule_1.name);
62
- PluginModule.config = (0, app_config_1.default)();
63
- PluginModule.plugins = [];
64
- exports.PluginModule = PluginModule = PluginModule_1 = __decorate([
65
- (0, common_1.Module)({
66
- imports: [
67
- moleculer_1.MoleculerModule.forRoot({})
68
- ],
69
- providers: [plugin_service_1.PluginService, moleculer_service_1.MoleculerPluginService],
70
- })
71
- ], PluginModule);
72
- //# sourceMappingURL=plugin.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.module.js","sourceRoot":"","sources":["../../src/plugin/plugin.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,yBAAyB;AACzB,6BAA6B;AAC7B,qDAAiD;AACjD,8CAAqC;AACrC,2DAA6D;AAC7D,mDAAsD;AAS/C,IAAM,YAAY,oBAAlB,MAAM,YAAY;IAKvB,MAAM,CAAC,OAAO;QACZ,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;QAC3C,IAAI,OAAO,EAAE,CAAC;YACZ,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;gBACxC,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;gBAC7C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;oBAChB,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,YAAY;iBACrB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,OAAO;YACL,MAAM,EAAE,cAAY;YACpB,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SACzC,CAAC;IACrB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AAS,EAAE,CAAC,8BAAa,EAAE,0CAAsB,CAAC;KACnD,CAAC;GACW,YAAY,CA2DxB"}
@@ -1,3 +0,0 @@
1
- export declare class PluginService {
2
- private readonly logger;
3
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var PluginService_1;
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.PluginService = void 0;
11
- const common_1 = require("@nestjs/common");
12
- let PluginService = PluginService_1 = class PluginService {
13
- constructor() {
14
- this.logger = new common_1.Logger(PluginService_1.name);
15
- }
16
- };
17
- exports.PluginService = PluginService;
18
- exports.PluginService = PluginService = PluginService_1 = __decorate([
19
- (0, common_1.Injectable)()
20
- ], PluginService);
21
- //# sourceMappingURL=plugin.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.service.js","sourceRoot":"","sources":["../../src/plugin/plugin.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AAG7C,IAAM,aAAa,qBAAnB,MAAM,aAAa;IAAnB;QACY,WAAM,GAAG,IAAI,eAAM,CAAC,eAAa,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC;CAAA,CAAA;AAFY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CAEzB"}
@@ -1,25 +0,0 @@
1
- import type { Json, JsonObject } from '../lib/Json';
2
- import type { BaseActivitiesData } from '../protocol/BaseActivitiesData';
3
- import type { BaseRoomInfo } from '../protocol/BaseRoomInfo';
4
- import type { BaseUserMeta } from '../protocol/BaseUserMeta';
5
- import type { BaseMetadata } from '../protocol/Comments';
6
- declare global {
7
- export interface Liveblocks {
8
- [key: string]: unknown;
9
- }
10
- }
11
- type ExtendableTypes = 'Presence' | 'Storage' | 'UserMeta' | 'RoomEvent' | 'ThreadMetadata' | 'RoomInfo' | 'ActivitiesData';
12
- type MakeErrorString<K extends ExtendableTypes, Reason extends string = 'does not match its requirements'> = `The type you provided for '${K}' ${Reason}. To learn how to fix this, see https://liveblocks.io/docs/errors/${K}`;
13
- type GetOverride<K extends ExtendableTypes, B, Reason extends string = 'does not match its requirements'> = GetOverrideOrErrorValue<K, B, MakeErrorString<K, Reason>>;
14
- type GetOverrideOrErrorValue<K extends ExtendableTypes, B, ErrorType> = unknown extends Liveblocks[K] ? B : Liveblocks[K] extends B ? Liveblocks[K] : ErrorType;
15
- export type DP = GetOverride<'Presence', JsonObject, 'is not a valid JSON object'>;
16
- export type DS = GetOverride<'Storage', JsonObject, 'is not a valid LSON value'>;
17
- export type DU = GetOverrideOrErrorValue<'UserMeta', BaseUserMeta, Record<'id' | 'info', MakeErrorString<'UserMeta'>>>;
18
- export type DE = GetOverride<'RoomEvent', Json, 'is not a valid JSON value'>;
19
- export type DM = GetOverride<'ThreadMetadata', BaseMetadata>;
20
- export type DRI = GetOverride<'RoomInfo', BaseRoomInfo>;
21
- export type DAD = GetOverrideOrErrorValue<'ActivitiesData', BaseActivitiesData, {
22
- [K in keyof Liveblocks['ActivitiesData']]: "At least one of the custom notification kinds you provided for 'ActivitiesData' does not match its requirements. To learn how to fix this, see https://liveblocks.io/docs/errors/ActivitiesData";
23
- }>;
24
- export type KDAD = keyof DAD extends `$${string}` ? keyof DAD : "Custom notification kinds must start with '$' but your custom 'ActivitiesData' type contains at least one kind which doesn't. To learn how to fix this, see https://liveblocks.io/docs/errors/ActivitiesData";
25
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=augmentation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"augmentation.js","sourceRoot":"","sources":["../../../src/rooms/globals/augmentation.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export type DateToString<T> = {
2
- [P in keyof T]: T[P] extends Date ? string : T[P] extends Date | null ? string | null : T[P] extends Date | undefined ? string | undefined : T[P];
3
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DateToString.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateToString.js","sourceRoot":"","sources":["../../../src/rooms/lib/DateToString.ts"],"names":[],"mappings":""}
@@ -1,9 +0,0 @@
1
- export type Json = JsonScalar | JsonArray | JsonObject;
2
- export type JsonScalar = string | number | boolean | null;
3
- export type JsonArray = Json[];
4
- export type JsonObject = {
5
- [key: string]: Json | undefined;
6
- };
7
- export declare function isJsonScalar(data: Json): data is JsonScalar;
8
- export declare function isJsonArray(data: Json): data is JsonArray;
9
- export declare function isJsonObject(data: Json): data is JsonObject;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isJsonScalar = isJsonScalar;
4
- exports.isJsonArray = isJsonArray;
5
- exports.isJsonObject = isJsonObject;
6
- function isJsonScalar(data) {
7
- return (data === null ||
8
- typeof data === 'string' ||
9
- typeof data === 'number' ||
10
- typeof data === 'boolean');
11
- }
12
- function isJsonArray(data) {
13
- return Array.isArray(data);
14
- }
15
- function isJsonObject(data) {
16
- return !isJsonScalar(data) && !isJsonArray(data);
17
- }
18
- //# sourceMappingURL=Json.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Json.js","sourceRoot":"","sources":["../../../src/rooms/lib/Json.ts"],"names":[],"mappings":";;AAkBA,oCAOC;AAED,kCAEC;AAED,oCAEC;AAfD,SAAgB,YAAY,CAAC,IAAU;IACrC,OAAO,CACL,IAAI,KAAK,IAAI;QACb,OAAO,IAAI,KAAK,QAAQ;QACxB,OAAO,IAAI,KAAK,QAAQ;QACxB,OAAO,IAAI,KAAK,SAAS,CAC1B,CAAC;AACJ,CAAC;AAED,SAAgB,WAAW,CAAC,IAAU;IACpC,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,SAAgB,YAAY,CAAC,IAAU;IACrC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC"}
@@ -1,33 +0,0 @@
1
- import type { Json } from './Json';
2
- declare const brand: unique symbol;
3
- export type Brand<T, TBrand extends string> = T & {
4
- [brand]: TBrand;
5
- };
6
- export type DistributiveOmit<T, K extends PropertyKey> = T extends any ? Omit<T, K> : never;
7
- export declare function raise(msg: string): never;
8
- export declare function isPlainObject(blob: unknown): blob is {
9
- [key: string]: unknown;
10
- };
11
- export declare function entries<O extends {
12
- [key: string]: unknown;
13
- }, K extends keyof O>(obj: O): [K, O[K]][];
14
- export declare function keys<O extends {
15
- [key: string]: unknown;
16
- }, K extends keyof O>(obj: O): K[];
17
- export declare function values<O extends Record<string, unknown>>(obj: O): O[keyof O][];
18
- export declare function mapValues<V, O extends Record<string, unknown>>(obj: O, mapFn: (value: O[keyof O], key: keyof O) => V): {
19
- [K in keyof O]: V;
20
- };
21
- export declare function tryParseJson(rawMessage: string): Json | undefined;
22
- export declare function deepClone<T extends Json>(value: T): T;
23
- export declare function b64decode(b64value: string): string;
24
- export declare function remove<T>(array: T[], item: T): void;
25
- export declare function compact<T>(items: readonly T[]): NonNullable<T>[];
26
- export type RemoveUndefinedValues<T> = {
27
- [K in keyof T]-?: Exclude<T[K], undefined>;
28
- };
29
- export declare function compactObject<O extends Record<string, unknown>>(obj: O): RemoveUndefinedValues<O>;
30
- export declare function wait(millis: number): Promise<void>;
31
- export declare function withTimeout<T>(promise: Promise<T>, millis: number, errmsg: string): Promise<T>;
32
- export declare function memoizeOnSuccess<T>(factoryFn: () => Promise<T>): () => Promise<T>;
33
- export {};
@@ -1,122 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.raise = raise;
4
- exports.isPlainObject = isPlainObject;
5
- exports.entries = entries;
6
- exports.keys = keys;
7
- exports.values = values;
8
- exports.mapValues = mapValues;
9
- exports.tryParseJson = tryParseJson;
10
- exports.deepClone = deepClone;
11
- exports.b64decode = b64decode;
12
- exports.remove = remove;
13
- exports.compact = compact;
14
- exports.compactObject = compactObject;
15
- exports.wait = wait;
16
- exports.withTimeout = withTimeout;
17
- exports.memoizeOnSuccess = memoizeOnSuccess;
18
- function raise(msg) {
19
- throw new Error(msg);
20
- }
21
- function isPlainObject(blob) {
22
- return (blob !== null &&
23
- typeof blob === 'object' &&
24
- Object.prototype.toString.call(blob) === '[object Object]');
25
- }
26
- function entries(obj) {
27
- return Object.entries(obj);
28
- }
29
- function keys(obj) {
30
- return Object.keys(obj);
31
- }
32
- function values(obj) {
33
- return Object.values(obj);
34
- }
35
- function mapValues(obj, mapFn) {
36
- const result = {};
37
- for (const pair of Object.entries(obj)) {
38
- const key = pair[0];
39
- if (key === '__proto__') {
40
- continue;
41
- }
42
- const value = pair[1];
43
- result[key] = mapFn(value, key);
44
- }
45
- return result;
46
- }
47
- function tryParseJson(rawMessage) {
48
- try {
49
- return JSON.parse(rawMessage);
50
- }
51
- catch (e) {
52
- return undefined;
53
- }
54
- }
55
- function deepClone(value) {
56
- return JSON.parse(JSON.stringify(value));
57
- }
58
- function b64decode(b64value) {
59
- try {
60
- const formattedValue = b64value.replace(/-/g, '+').replace(/_/g, '/');
61
- const decodedValue = decodeURIComponent(atob(formattedValue)
62
- .split('')
63
- .map(function (c) {
64
- return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
65
- })
66
- .join(''));
67
- return decodedValue;
68
- }
69
- catch (err) {
70
- return atob(b64value);
71
- }
72
- }
73
- function remove(array, item) {
74
- for (let i = 0; i < array.length; i++) {
75
- if (array[i] === item) {
76
- array.splice(i, 1);
77
- break;
78
- }
79
- }
80
- }
81
- function compact(items) {
82
- return items.filter((item) => item !== null && item !== undefined);
83
- }
84
- function compactObject(obj) {
85
- const newObj = { ...obj };
86
- Object.keys(obj).forEach((k) => {
87
- const key = k;
88
- if (newObj[key] === undefined) {
89
- delete newObj[key];
90
- }
91
- });
92
- return newObj;
93
- }
94
- function wait(millis) {
95
- return new Promise((res) => setTimeout(res, millis));
96
- }
97
- async function withTimeout(promise, millis, errmsg) {
98
- let timerID;
99
- const timer$ = new Promise((_, reject) => {
100
- timerID = setTimeout(() => {
101
- reject(new Error(errmsg));
102
- }, millis);
103
- });
104
- return (Promise
105
- .race([promise, timer$])
106
- .finally(() => clearTimeout(timerID)));
107
- }
108
- function memoizeOnSuccess(factoryFn) {
109
- let cached = null;
110
- return () => {
111
- if (cached === null) {
112
- cached = factoryFn().catch((err) => {
113
- setTimeout(() => {
114
- cached = null;
115
- }, 5_000);
116
- throw err;
117
- });
118
- }
119
- return cached;
120
- };
121
- }
122
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/rooms/lib/utils.ts"],"names":[],"mappings":";;AAgBA,sBAEC;AAED,sCAUC;AAKD,0BAKC;AAKD,oBAIC;AAKD,wBAIC;AAMD,8BAeC;AAMD,oCAOC;AAQD,8BAKC;AAKD,8BAgBC;AAMD,wBAOC;AAMD,0BAIC;AAUD,sCAWC;AAKD,oBAEC;AAOD,kCAoBC;AAQD,4CA2BC;AA/ND,SAAgB,KAAK,CAAC,GAAW;IAC/B,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC;AAED,SAAgB,aAAa,CAC3B,IAAa;IAIb,OAAO,CACL,IAAI,KAAK,IAAI;QACb,OAAO,IAAI,KAAK,QAAQ;QACxB,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,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C"}
@@ -1,50 +0,0 @@
1
- import type { Json } from '../lib/Json';
2
- import type { IUserInfo } from './BaseUserMeta';
3
- export declare enum Permission {
4
- Read = "room:read",
5
- Write = "room:write",
6
- PresenceWrite = "room:presence:write",
7
- CommentsWrite = "comments:write",
8
- CommentsRead = "comments:read"
9
- }
10
- export type LiveblocksPermissions = Record<string, Permission[]>;
11
- export declare enum TokenKind {
12
- SECRET_LEGACY = "sec-legacy",
13
- ACCESS_TOKEN = "acc",
14
- ID_TOKEN = "id"
15
- }
16
- export declare function canWriteStorage(scopes: readonly string[]): boolean;
17
- export declare function canComment(scopes: readonly string[]): boolean;
18
- type JwtMeta = {
19
- iat: number;
20
- exp: number;
21
- };
22
- export type LegacySecretToken = {
23
- k: TokenKind.SECRET_LEGACY;
24
- roomId: string;
25
- scopes: string[];
26
- id?: string;
27
- info?: IUserInfo;
28
- [other: string]: Json | undefined;
29
- } & JwtMeta;
30
- export type AccessToken = {
31
- k: TokenKind.ACCESS_TOKEN;
32
- pid: string;
33
- uid: string;
34
- perms: LiveblocksPermissions;
35
- ui?: IUserInfo;
36
- } & JwtMeta;
37
- export type IDToken = {
38
- k: TokenKind.ID_TOKEN;
39
- pid: string;
40
- uid: string;
41
- gids?: string[];
42
- ui?: IUserInfo;
43
- } & JwtMeta;
44
- export type AuthToken = AccessToken | IDToken | LegacySecretToken;
45
- export type ParsedAuthToken = {
46
- readonly raw: string;
47
- readonly parsed: AuthToken;
48
- };
49
- export declare function parseAuthToken(rawTokenString: string): ParsedAuthToken;
50
- export {};
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TokenKind = exports.Permission = void 0;
4
- exports.canWriteStorage = canWriteStorage;
5
- exports.canComment = canComment;
6
- exports.parseAuthToken = parseAuthToken;
7
- const utils_1 = require("../lib/utils");
8
- var Permission;
9
- (function (Permission) {
10
- Permission["Read"] = "room:read";
11
- Permission["Write"] = "room:write";
12
- Permission["PresenceWrite"] = "room:presence:write";
13
- Permission["CommentsWrite"] = "comments:write";
14
- Permission["CommentsRead"] = "comments:read";
15
- })(Permission || (exports.Permission = Permission = {}));
16
- var TokenKind;
17
- (function (TokenKind) {
18
- TokenKind["SECRET_LEGACY"] = "sec-legacy";
19
- TokenKind["ACCESS_TOKEN"] = "acc";
20
- TokenKind["ID_TOKEN"] = "id";
21
- })(TokenKind || (exports.TokenKind = TokenKind = {}));
22
- function canWriteStorage(scopes) {
23
- return scopes.includes(Permission.Write);
24
- }
25
- function canComment(scopes) {
26
- return (scopes.includes(Permission.CommentsWrite) ||
27
- scopes.includes(Permission.Write));
28
- }
29
- function isValidAuthTokenPayload(data) {
30
- return ((0, utils_1.isPlainObject)(data) &&
31
- (data.k === TokenKind.ACCESS_TOKEN ||
32
- data.k === TokenKind.ID_TOKEN ||
33
- data.k === TokenKind.SECRET_LEGACY));
34
- }
35
- function parseAuthToken(rawTokenString) {
36
- const tokenParts = rawTokenString.split('.');
37
- if (tokenParts.length !== 3) {
38
- throw new Error('Authentication error: invalid JWT token');
39
- }
40
- const payload = (0, utils_1.tryParseJson)((0, utils_1.b64decode)(tokenParts[1]));
41
- if (!(payload && isValidAuthTokenPayload(payload))) {
42
- throw new Error('Authentication error: expected a valid token but did not get one. Hint: if you are using a callback, ensure the room is passed when creating the token. For more information: https://liveblocks.io/docs/api-reference/liveblocks-client#createClientCallback');
43
- }
44
- return {
45
- raw: rawTokenString,
46
- parsed: payload,
47
- };
48
- }
49
- //# sourceMappingURL=AuthToken.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthToken.js","sourceRoot":"","sources":["../../../src/rooms/protocol/AuthToken.ts"],"names":[],"mappings":";;;AAwBA,0CAEC;AAED,gCAKC;AA2ED,wCAiBC;AA5HD,wCAAsE;AAGtE,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,gCAAkB,CAAA;IAClB,kCAAoB,CAAA;IACpB,mDAAqC,CAAA;IACrC,8CAAgC,CAAA;IAChC,4CAA8B,C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AAE,cAAc;QACnB,MAAM,EAAE,OAAO;KAChB,CAAC;AACJ,CAAC"}
@@ -1,22 +0,0 @@
1
- export type CustomAuthenticationResult = {
2
- token: string;
3
- error?: never;
4
- } | {
5
- token?: never;
6
- error: 'forbidden';
7
- reason: string;
8
- } | {
9
- token?: never;
10
- error: string;
11
- reason: string;
12
- };
13
- export type Authentication = {
14
- type: 'public';
15
- publicApiKey: string;
16
- } | {
17
- type: 'private';
18
- url: string;
19
- } | {
20
- type: 'custom';
21
- callback: (room?: string) => Promise<CustomAuthenticationResult>;
22
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=Authentication.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Authentication.js","sourceRoot":"","sources":["../../../src/rooms/protocol/Authentication.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import type { ActivityData } from './InboxNotifications';
2
- export type BaseActivitiesData = {
3
- [key: `$${string}`]: ActivityData;
4
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=BaseActivitiesData.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseActivitiesData.js","sourceRoot":"","sources":["../../../src/rooms/protocol/BaseActivitiesData.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import type { Json } from '../lib/Json';
2
- export type BaseRoomInfo = {
3
- [key: string]: Json | undefined;
4
- name?: string;
5
- url?: string;
6
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=BaseRoomInfo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseRoomInfo.js","sourceRoot":"","sources":["../../../src/rooms/protocol/BaseRoomInfo.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- import type { Json } from '../lib/Json';
2
- export type IUserInfo = {
3
- [key: string]: Json | undefined;
4
- name?: string;
5
- avatar?: string;
6
- };
7
- export type BaseUserMeta = {
8
- id?: string;
9
- info?: IUserInfo;
10
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=BaseUserMeta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseUserMeta.js","sourceRoot":"","sources":["../../../src/rooms/protocol/BaseUserMeta.ts"],"names":[],"mappings":""}
@@ -1,41 +0,0 @@
1
- import type { Json, JsonObject } from '../lib/Json';
2
- import type { Op } from './Op';
3
- export declare enum ClientMsgCode {
4
- UPDATE_PRESENCE = 100,
5
- BROADCAST_EVENT = 103,
6
- FETCH_STORAGE = 200,
7
- UPDATE_STORAGE = 201,
8
- FETCH_YDOC = 300,
9
- UPDATE_YDOC = 301
10
- }
11
- export type ClientMsg<P extends JsonObject, E extends Json> = BroadcastEventClientMsg<E> | UpdatePresenceClientMsg<P> | UpdateStorageClientMsg | FetchStorageClientMsg | FetchYDocClientMsg | UpdateYDocClientMsg;
12
- export type BroadcastEventClientMsg<E extends Json> = {
13
- type: ClientMsgCode.BROADCAST_EVENT;
14
- event: E;
15
- };
16
- export type UpdatePresenceClientMsg<P extends JsonObject> = {
17
- readonly type: ClientMsgCode.UPDATE_PRESENCE;
18
- readonly targetActor: number;
19
- readonly data: P;
20
- } | {
21
- readonly type: ClientMsgCode.UPDATE_PRESENCE;
22
- readonly targetActor?: undefined;
23
- readonly data: Partial<P>;
24
- };
25
- export type UpdateStorageClientMsg = {
26
- readonly type: ClientMsgCode.UPDATE_STORAGE;
27
- readonly ops: Op[];
28
- };
29
- export type FetchStorageClientMsg = {
30
- readonly type: ClientMsgCode.FETCH_STORAGE;
31
- };
32
- export type FetchYDocClientMsg = {
33
- readonly type: ClientMsgCode.FETCH_YDOC;
34
- readonly vector: string;
35
- readonly guid?: string;
36
- };
37
- export type UpdateYDocClientMsg = {
38
- readonly type: ClientMsgCode.UPDATE_YDOC;
39
- readonly update: string;
40
- readonly guid?: string;
41
- };
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClientMsgCode = void 0;
4
- var ClientMsgCode;
5
- (function (ClientMsgCode) {
6
- ClientMsgCode[ClientMsgCode["UPDATE_PRESENCE"] = 100] = "UPDATE_PRESENCE";
7
- ClientMsgCode[ClientMsgCode["BROADCAST_EVENT"] = 103] = "BROADCAST_EVENT";
8
- ClientMsgCode[ClientMsgCode["FETCH_STORAGE"] = 200] = "FETCH_STORAGE";
9
- ClientMsgCode[ClientMsgCode["UPDATE_STORAGE"] = 201] = "UPDATE_STORAGE";
10
- ClientMsgCode[ClientMsgCode["FETCH_YDOC"] = 300] = "FETCH_YDOC";
11
- ClientMsgCode[ClientMsgCode["UPDATE_YDOC"] = 301] = "UPDATE_YDOC";
12
- })(ClientMsgCode || (exports.ClientMsgCode = ClientMsgCode = {}));
13
- //# sourceMappingURL=ClientMsg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClientMsg.js","sourceRoot":"","sources":["../../../src/rooms/protocol/ClientMsg.ts"],"names":[],"mappings":";;;AAGA,IAAY,aAYX;AAZD,WAAY,aAAa;IAEvB,yEAAqB,CAAA;IACrB,yEAAqB,CAAA;IAGrB,qEAAmB,CAAA;IACnB,uEAAoB,CAAA;IAGpB,+DAAgB,CAAA;IAChB,iEAAiB,CAAA;AACnB,CAAC,EAZW,aAAa,6BAAb,aAAa,QAYxB"}