atom.io 0.44.8 → 0.44.10

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.
@@ -0,0 +1,18 @@
1
+ //#region rolldown:runtime
2
+ var __defProp = Object.defineProperty;
3
+ var __export = (all, symbols) => {
4
+ let target = {};
5
+ for (var name in all) {
6
+ __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ }
11
+ if (symbols) {
12
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
13
+ }
14
+ return target;
15
+ };
16
+
17
+ //#endregion
18
+ export { __export as t };
@@ -1,10 +1,16 @@
1
1
  import { ESLintUtils } from "@typescript-eslint/utils";
2
2
  import { ESLint } from "eslint";
3
3
 
4
+ //#region src/eslint-plugin/rules/exact-catch-types.d.ts
5
+ declare const exactCatchTypes: ESLintUtils.RuleModule<`extraneousErrorTypes` | `invalidCatchProperty` | `missingCatchProperty`, [], unknown, ESLintUtils.RuleListener>;
6
+ //#endregion
4
7
  //#region src/eslint-plugin/rules/explicit-state-types.d.ts
5
- declare const explicitStateTypes: ESLintUtils.RuleModule<`noTypeArgument`, [], unknown, ESLintUtils.RuleListener>;
8
+ type Options = [{
9
+ permitAnnotation?: boolean;
10
+ }];
11
+ declare const explicitStateTypes: ESLintUtils.RuleModule<`noTypeArgument` | `noTypeArgumentOrAnnotation`, Options, unknown, ESLintUtils.RuleListener>;
6
12
  declare namespace index_d_exports {
7
- export { explicitStateTypes };
13
+ export { exactCatchTypes, explicitStateTypes };
8
14
  }
9
15
  //#endregion
10
16
  //#region src/eslint-plugin/index.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n>","plugin: ESLint.Plugin"],"sources":["../../src/eslint-plugin/rules/explicit-state-types.ts","../../src/eslint-plugin/rules/index.ts","../../src/eslint-plugin/index.ts"],"sourcesContent":[],"mappings":";;;;cAgBaA,oBAAoB,WAAA,CAAY,0CAI5C,WAAA,CAAY;;;;;;cEdPC,QAAQ,MAAA,CAAO"}
1
+ {"version":3,"file":"index.d.ts","names":["exactCatchTypes: ESLintUtils.RuleModule<\n\t`extraneousErrorTypes` | `invalidCatchProperty` | `missingCatchProperty`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n>","explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument` | `noTypeArgumentOrAnnotation`,\n\tOptions,\n\tunknown,\n\tESLintUtils.RuleListener\n>","plugin: ESLint.Plugin"],"sources":["../../src/eslint-plugin/rules/exact-catch-types.ts","../../src/eslint-plugin/rules/explicit-state-types.ts","../../src/eslint-plugin/rules/index.ts","../../src/eslint-plugin/index.ts"],"sourcesContent":[],"mappings":";;;;cAqBaA,iBAAiB,WAAA,CAAY,kGAIzC,WAAA,CAAY;;;KCTR,OAAA;;;cAMQC,oBAAoB,WAAA,CAAY,4DAE5C,kBAEA,WAAA,CAAY;;;;;;cEpBPC,QAAQ,MAAA,CAAO"}
@@ -1,6 +1,133 @@
1
- import { t as __export } from "../chunk-dQTVuLCX.js";
2
- import { ESLintUtils } from "@typescript-eslint/utils";
1
+ import { t as __export } from "../chunk-D8lmAICg.js";
2
+ import { AST_NODE_TYPES, ESLintUtils } from "@typescript-eslint/utils";
3
3
 
4
+ //#region src/eslint-plugin/rules/exact-catch-types.ts
5
+ const createRule$1 = ESLintUtils.RuleCreator((name) => `https://atom.io.fyi/docs/eslint-plugin#${name}`);
6
+ const STATE_FUNCTIONS_WITH_CATCH = [
7
+ `atom`,
8
+ `atomFamily`,
9
+ `selector`,
10
+ `selectorFamily`
11
+ ];
12
+ const STANDALONE_FUNCTIONS = [`atom`, `selector`];
13
+ const exactCatchTypes = createRule$1({
14
+ name: `catch-constructor-type`,
15
+ meta: {
16
+ type: `problem`,
17
+ docs: { description: `Ensures that when an error type (E) is provided to an atom, the 'catch' property is set and all constructors in it are assignable to E.` },
18
+ messages: {
19
+ missingCatchProperty: "This {{functionName}} was provided the error type `{{errorTypeName}}` but the required 'catch' property is missing from its options. Either remove `{{errorTypeName}}`, or add `catch: [{{errorTypeName}}]` to the options object.",
20
+ invalidCatchProperty: "This {{functionName}} was provided a catch array containing the class `{{constructorName}}`. However, that class is not represented in the {{functionName}}'s error type, `{{errorTypeName}}`. As a result, it might catch errors that the {{functionName}} is not designed to handle. Either include `{{constructorName}}` in the {{functionName}}'s error type, or remove it from the 'catch' array.",
21
+ extraneousErrorTypes: "This {{functionName}} was provided an error type including the class {{errorTypeName}}, but its 'catch' property doesn't include a constructor for that class. Either include a constructor for {{errorTypeName}} in the 'catch' array, or remove {{errorTypeName}} from the error type."
22
+ },
23
+ schema: []
24
+ },
25
+ defaultOptions: [],
26
+ create(context) {
27
+ const parserServices = ESLintUtils.getParserServices(context);
28
+ const checker = parserServices.program.getTypeChecker();
29
+ return { CallExpression(node) {
30
+ const { callee, typeArguments: directTypeArguments, arguments: callArguments } = node;
31
+ let functionName = null;
32
+ if (callee.type === AST_NODE_TYPES.Identifier) {
33
+ if (STATE_FUNCTIONS_WITH_CATCH.includes(callee.name)) functionName = callee.name;
34
+ } else if (callee.type === AST_NODE_TYPES.MemberExpression) {
35
+ if (callee.property.type === AST_NODE_TYPES.Identifier && STATE_FUNCTIONS_WITH_CATCH.includes(callee.property.name)) functionName = callee.property.name;
36
+ }
37
+ if (!functionName) return;
38
+ let typeArguments;
39
+ if (directTypeArguments) typeArguments = directTypeArguments;
40
+ else {
41
+ const parent = node.parent;
42
+ if (parent?.type === AST_NODE_TYPES.VariableDeclarator && parent.init === node) {
43
+ const declaratorId = parent.id;
44
+ if (declaratorId.type === AST_NODE_TYPES.Identifier) {
45
+ const typeAnnotation = declaratorId.typeAnnotation?.typeAnnotation;
46
+ if (typeAnnotation && `typeArguments` in typeAnnotation && typeAnnotation.typeArguments) typeArguments = typeAnnotation.typeArguments;
47
+ }
48
+ }
49
+ }
50
+ const optionsObject = callArguments[0];
51
+ if (optionsObject?.type !== AST_NODE_TYPES.ObjectExpression) return;
52
+ const isStandalone = STANDALONE_FUNCTIONS.includes(functionName);
53
+ const errorTypeNode = typeArguments ? isStandalone ? typeArguments.params[1] : typeArguments.params[2] : void 0;
54
+ let catchProperty;
55
+ optionsObject.properties.forEach((property) => {
56
+ if (property.type === AST_NODE_TYPES.Property) {
57
+ if (property.key.type === AST_NODE_TYPES.Identifier && property.key.name === `catch` || property.key.type === AST_NODE_TYPES.Literal && property.key.value === `catch`) catchProperty = property;
58
+ }
59
+ });
60
+ if (!errorTypeNode) return;
61
+ const typeNode = parserServices.esTreeNodeToTSNodeMap.get(errorTypeNode);
62
+ const errorTypeTs = checker.getTypeFromTypeNode(typeNode);
63
+ const errorTypeName = checker.typeToString(errorTypeTs);
64
+ if (!catchProperty) {
65
+ context.report({
66
+ node: optionsObject,
67
+ messageId: `missingCatchProperty`,
68
+ data: {
69
+ functionName,
70
+ errorTypeName
71
+ }
72
+ });
73
+ return;
74
+ }
75
+ const catchArray = catchProperty.value;
76
+ if (catchArray.type !== AST_NODE_TYPES.ArrayExpression) return;
77
+ const acceptableErrorSymbols = [];
78
+ if (errorTypeTs.isUnion()) for (const memberType of errorTypeTs.types) {
79
+ const symbol = memberType.getSymbol();
80
+ if (symbol) acceptableErrorSymbols.push(symbol);
81
+ }
82
+ else {
83
+ const symbol = errorTypeTs.getSymbol();
84
+ if (symbol) acceptableErrorSymbols.push(symbol);
85
+ }
86
+ if (catchArray.elements.length === 0) {
87
+ context.report({
88
+ node: catchProperty,
89
+ messageId: `missingCatchProperty`,
90
+ data: {
91
+ functionName,
92
+ errorTypeName
93
+ }
94
+ });
95
+ return;
96
+ }
97
+ const errorSymbolsToRepresent = new Set(acceptableErrorSymbols);
98
+ for (const element of catchArray.elements) {
99
+ if (!element || element.type !== AST_NODE_TYPES.Identifier) continue;
100
+ const constructorTsNode = parserServices.esTreeNodeToTSNodeMap.get(element);
101
+ const constructorType = checker.getTypeAtLocation(constructorTsNode);
102
+ const constructorName = element.name;
103
+ let instanceType;
104
+ if (constructorType.getConstructSignatures().length > 0) instanceType = constructorType.getConstructSignatures()[0].getReturnType();
105
+ const constructorInstanceSymbol = instanceType?.getSymbol();
106
+ if (!constructorInstanceSymbol) continue;
107
+ if (acceptableErrorSymbols.includes(constructorInstanceSymbol)) errorSymbolsToRepresent.delete(constructorInstanceSymbol);
108
+ else context.report({
109
+ node: element,
110
+ messageId: `invalidCatchProperty`,
111
+ data: {
112
+ functionName,
113
+ constructorName,
114
+ errorTypeName
115
+ }
116
+ });
117
+ }
118
+ for (const errorSymbol of errorSymbolsToRepresent) context.report({
119
+ node: catchProperty,
120
+ messageId: `extraneousErrorTypes`,
121
+ data: {
122
+ errorTypeName: checker.symbolToString(errorSymbol),
123
+ functionName
124
+ }
125
+ });
126
+ } };
127
+ }
128
+ });
129
+
130
+ //#endregion
4
131
  //#region src/eslint-plugin/rules/explicit-state-types.ts
5
132
  const createRule = ESLintUtils.RuleCreator((name) => `https://atom.io.fyi/docs/eslint-plugin#${name}`);
6
133
  const STATE_FUNCTIONS = [
@@ -16,40 +143,69 @@ const explicitStateTypes = createRule({
16
143
  meta: {
17
144
  type: `problem`,
18
145
  docs: { description: `State declarations must have generic type arguments directly passed to them` },
19
- messages: { noTypeArgument: `State declarations must have generic type arguments directly passed to them.` },
20
- schema: []
146
+ messages: {
147
+ noTypeArgument: `State declarations must have generic type arguments directly passed to them.`,
148
+ noTypeArgumentOrAnnotation: `State declarations must have generic type arguments directly passed to them, or a top-level type annotation.`
149
+ },
150
+ schema: [{
151
+ type: `object`,
152
+ properties: { permitAnnotation: {
153
+ type: `boolean`,
154
+ default: false
155
+ } },
156
+ additionalProperties: false
157
+ }]
21
158
  },
22
- defaultOptions: [],
159
+ defaultOptions: [{ permitAnnotation: false }],
23
160
  create(context) {
161
+ const permitAnnotation = context.options[0]?.permitAnnotation ?? false;
24
162
  return { CallExpression(node) {
25
- const { callee } = node;
163
+ const callee = node.callee;
26
164
  switch (callee.type) {
27
165
  case `Identifier`:
28
- if (STATE_FUNCTIONS.includes(callee.name)) {
29
- if (!node.typeArguments) context.report({
30
- node,
31
- messageId: `noTypeArgument`
32
- });
33
- }
166
+ if (STATE_FUNCTIONS.includes(callee.name) === false) return;
167
+ break;
168
+ case `MemberExpression`:
169
+ if ((callee.property.type === `Identifier` && STATE_FUNCTIONS.includes(callee.property.name)) === false) return;
34
170
  break;
35
- case `MemberExpression`: if (callee.property.type === `Identifier` && STATE_FUNCTIONS.includes(callee.property.name)) {
36
- if (!node.typeArguments) context.report({
37
- node,
38
- messageId: `noTypeArgument`
39
- });
171
+ default: return;
172
+ }
173
+ if (node.typeArguments) return;
174
+ if (permitAnnotation) {
175
+ let hasAnnotation = false;
176
+ const parent = node.parent;
177
+ if (parent?.type === AST_NODE_TYPES.VariableDeclarator && parent.init === node) {
178
+ const declaratorId = parent.id;
179
+ if (declaratorId.type === AST_NODE_TYPES.Identifier) hasAnnotation = Boolean(declaratorId.typeAnnotation);
40
180
  }
181
+ if (hasAnnotation) return;
182
+ context.report({
183
+ node,
184
+ messageId: `noTypeArgumentOrAnnotation`
185
+ });
186
+ return;
41
187
  }
188
+ context.report({
189
+ node,
190
+ messageId: `noTypeArgument`
191
+ });
42
192
  } };
43
193
  }
44
194
  });
45
195
 
46
196
  //#endregion
47
197
  //#region src/eslint-plugin/rules/index.ts
48
- var rules_exports = /* @__PURE__ */ __export({ explicitStateTypes: () => explicitStateTypes });
198
+ var rules_exports = /* @__PURE__ */ __export({
199
+ exactCatchTypes: () => exactCatchTypes,
200
+ explicitStateTypes: () => explicitStateTypes
201
+ });
49
202
 
50
203
  //#endregion
51
204
  //#region src/eslint-plugin/index.ts
52
- const plugin = { rules: { "explicit-state-types": explicitStateTypes } };
205
+ const plugin = { rules: {
206
+ "exact-catch-types": exactCatchTypes,
207
+ "explicit-state-types": explicitStateTypes
208
+ } };
53
209
  var eslint_plugin_default = plugin;
54
210
 
55
211
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n>","plugin: ESLint.Plugin","Rules.explicitStateTypes"],"sources":["../../src/eslint-plugin/rules/explicit-state-types.ts","../../src/eslint-plugin/rules/index.ts","../../src/eslint-plugin/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/switch-exhaustiveness-check */\nimport { ESLintUtils } from \"@typescript-eslint/utils\"\n\nconst createRule = ESLintUtils.RuleCreator(\n\t(name) => `https://atom.io.fyi/docs/eslint-plugin#${name}`,\n)\n\nconst STATE_FUNCTIONS = [\n\t`atom`,\n\t`atomFamily`,\n\t`mutableAtom`,\n\t`mutableAtomFamily`,\n\t`selector`,\n\t`selectorFamily`,\n]\n\nexport const explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n> = createRule({\n\tname: `explicit-state-types`,\n\tmeta: {\n\t\ttype: `problem`,\n\t\tdocs: {\n\t\t\tdescription: `State declarations must have generic type arguments directly passed to them`,\n\t\t},\n\t\tmessages: {\n\t\t\tnoTypeArgument: `State declarations must have generic type arguments directly passed to them.`,\n\t\t},\n\t\tschema: [], // no options\n\t},\n\tdefaultOptions: [],\n\tcreate(context) {\n\t\treturn {\n\t\t\tCallExpression(node) {\n\t\t\t\tconst { callee } = node\n\t\t\t\tswitch (callee.type) {\n\t\t\t\t\tcase `Identifier`: {\n\t\t\t\t\t\tif (STATE_FUNCTIONS.includes(callee.name)) {\n\t\t\t\t\t\t\tif (!node.typeArguments) {\n\t\t\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\t\t\tmessageId: `noTypeArgument`,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase `MemberExpression`: {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcallee.property.type === `Identifier` &&\n\t\t\t\t\t\t\tSTATE_FUNCTIONS.includes(callee.property.name)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tif (!node.typeArguments) {\n\t\t\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\t\t\tmessageId: `noTypeArgument`,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\t},\n})\n","export * from \"./explicit-state-types\"\n","import type { ESLint } from \"eslint\"\n\nimport * as Rules from \"./rules\"\n\nexport { Rules }\n\nconst plugin: ESLint.Plugin = {\n\trules: {\n\t\t\"explicit-state-types\": Rules.explicitStateTypes as any,\n\t},\n} satisfies ESLint.Plugin\n\nexport default plugin\n"],"mappings":";;;;AAGA,MAAM,aAAa,YAAY,aAC7B,SAAS,0CAA0C,OACpD;AAED,MAAM,kBAAkB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;AAED,MAAaA,qBAKT,WAAW;CACd,MAAM;CACN,MAAM;EACL,MAAM;EACN,MAAM,EACL,aAAa,+EACb;EACD,UAAU,EACT,gBAAgB,gFAChB;EACD,QAAQ,EAAE;EACV;CACD,gBAAgB,EAAE;CAClB,OAAO,SAAS;AACf,SAAO,EACN,eAAe,MAAM;GACpB,MAAM,EAAE,WAAW;AACnB,WAAQ,OAAO,MAAf;IACC,KAAK;AACJ,SAAI,gBAAgB,SAAS,OAAO,KAAK,EACxC;UAAI,CAAC,KAAK,cACT,SAAQ,OAAO;OACd;OACA,WAAW;OACX,CAAC;;AAGJ;IAED,KAAK,mBACJ,KACC,OAAO,SAAS,SAAS,gBACzB,gBAAgB,SAAS,OAAO,SAAS,KAAK,EAE9C;SAAI,CAAC,KAAK,cACT,SAAQ,OAAO;MACd;MACA,WAAW;MACX,CAAC;;;KAMP;;CAEF,CAAC;;;;;;;;AE7DF,MAAMC,SAAwB,EAC7B,OAAO,EACN,wBAAwBC,oBACxB,EACD;AAED,4BAAe"}
1
+ {"version":3,"file":"index.js","names":["createRule","exactCatchTypes: ESLintUtils.RuleModule<\n\t`extraneousErrorTypes` | `invalidCatchProperty` | `missingCatchProperty`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n>","functionName: string | null","typeArguments: TSESTree.TSTypeParameterInstantiation | undefined","catchProperty: TSESTree.Property | undefined","acceptableErrorSymbols: TsSymbol[]","instanceType: Type | undefined","explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument` | `noTypeArgumentOrAnnotation`,\n\tOptions,\n\tunknown,\n\tESLintUtils.RuleListener\n>","plugin: ESLint.Plugin","Rules.exactCatchTypes","Rules.explicitStateTypes"],"sources":["../../src/eslint-plugin/rules/exact-catch-types.ts","../../src/eslint-plugin/rules/explicit-state-types.ts","../../src/eslint-plugin/rules/index.ts","../../src/eslint-plugin/index.ts"],"sourcesContent":["import type { TSESTree } from \"@typescript-eslint/utils\"\nimport { AST_NODE_TYPES, ESLintUtils } from \"@typescript-eslint/utils\"\nimport type {\n\tInterfaceType,\n\tSymbol as TsSymbol,\n\tType,\n\tTypeNode,\n} from \"typescript\"\n\nconst createRule = ESLintUtils.RuleCreator(\n\t(name) => `https://atom.io.fyi/docs/eslint-plugin#${name}`,\n)\n\nconst STATE_FUNCTIONS_WITH_CATCH = [\n\t`atom`,\n\t`atomFamily`,\n\t`selector`,\n\t`selectorFamily`,\n]\nconst STANDALONE_FUNCTIONS = [`atom`, `selector`]\n\nexport const exactCatchTypes: ESLintUtils.RuleModule<\n\t`extraneousErrorTypes` | `invalidCatchProperty` | `missingCatchProperty`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n> = createRule({\n\tname: `catch-constructor-type`,\n\tmeta: {\n\t\ttype: `problem`,\n\t\tdocs: {\n\t\t\tdescription: `Ensures that when an error type (E) is provided to an atom, the 'catch' property is set and all constructors in it are assignable to E.`,\n\t\t},\n\t\tmessages: {\n\t\t\tmissingCatchProperty:\n\t\t\t\t`This {{functionName}} was provided the error type \\`{{errorTypeName}}\\` ` +\n\t\t\t\t`but the required 'catch' property is missing from its options. ` +\n\t\t\t\t`Either remove \\`{{errorTypeName}}\\`, or add \\`catch: [{{errorTypeName}}]\\` to the options object.`,\n\t\t\tinvalidCatchProperty:\n\t\t\t\t`This {{functionName}} was provided a catch array containing the class \\`{{constructorName}}\\`. ` +\n\t\t\t\t`However, that class is not represented in the {{functionName}}'s error type, \\`{{errorTypeName}}\\`. ` +\n\t\t\t\t`As a result, it might catch errors that the {{functionName}} is not designed to handle. ` +\n\t\t\t\t`Either include \\`{{constructorName}}\\` in the {{functionName}}'s error type, or remove it from the 'catch' array.`,\n\t\t\textraneousErrorTypes:\n\t\t\t\t`This {{functionName}} was provided an error type including the class {{errorTypeName}}, ` +\n\t\t\t\t`but its 'catch' property doesn't include a constructor for that class. ` +\n\t\t\t\t`Either include a constructor for {{errorTypeName}} in the 'catch' array, or remove {{errorTypeName}} from the error type.`,\n\t\t},\n\t\tschema: [],\n\t},\n\tdefaultOptions: [],\n\tcreate(context) {\n\t\tconst parserServices = ESLintUtils.getParserServices(context)\n\t\tconst checker = parserServices.program.getTypeChecker()\n\n\t\treturn {\n\t\t\tCallExpression(node) {\n\t\t\t\tconst {\n\t\t\t\t\tcallee,\n\t\t\t\t\ttypeArguments: directTypeArguments,\n\t\t\t\t\targuments: callArguments,\n\t\t\t\t} = node\n\n\t\t\t\t// Check if the function call is one of the targeted state functions\n\t\t\t\tlet functionName: string | null = null\n\t\t\t\tif (callee.type === AST_NODE_TYPES.Identifier) {\n\t\t\t\t\tif (STATE_FUNCTIONS_WITH_CATCH.includes(callee.name)) {\n\t\t\t\t\t\tfunctionName = callee.name\n\t\t\t\t\t}\n\t\t\t\t} else if (callee.type === AST_NODE_TYPES.MemberExpression) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tcallee.property.type === AST_NODE_TYPES.Identifier &&\n\t\t\t\t\t\tSTATE_FUNCTIONS_WITH_CATCH.includes(callee.property.name)\n\t\t\t\t\t) {\n\t\t\t\t\t\tfunctionName = callee.property.name\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!functionName) return\n\n\t\t\t\t// Where do the type arguments come from?\n\t\t\t\tlet typeArguments: TSESTree.TSTypeParameterInstantiation | undefined\n\t\t\t\tif (directTypeArguments) {\n\t\t\t\t\ttypeArguments = directTypeArguments\n\t\t\t\t} else {\n\t\t\t\t\tconst parent = node.parent\n\t\t\t\t\tif (\n\t\t\t\t\t\tparent?.type === AST_NODE_TYPES.VariableDeclarator &&\n\t\t\t\t\t\tparent.init === node\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Check if the VariableDeclarator has an id with a TypeAnnotation\n\t\t\t\t\t\tconst declaratorId = parent.id\n\t\t\t\t\t\tif (declaratorId.type === AST_NODE_TYPES.Identifier) {\n\t\t\t\t\t\t\t// Check for 'const myAtom: AtomToken<string> = ...'\n\t\t\t\t\t\t\tconst typeAnnotation = declaratorId.typeAnnotation?.typeAnnotation\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\ttypeAnnotation &&\n\t\t\t\t\t\t\t\t`typeArguments` in typeAnnotation &&\n\t\t\t\t\t\t\t\ttypeAnnotation.typeArguments\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\ttypeArguments = typeAnnotation.typeArguments\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst optionsObject = callArguments[0]\n\n\t\t\t\tif (optionsObject?.type !== AST_NODE_TYPES.ObjectExpression) return\n\n\t\t\t\tconst isStandalone = STANDALONE_FUNCTIONS.includes(functionName)\n\n\t\t\t\tconst errorTypeNode = typeArguments\n\t\t\t\t\t? isStandalone\n\t\t\t\t\t\t? typeArguments.params[1]\n\t\t\t\t\t\t: typeArguments.params[2]\n\t\t\t\t\t: undefined\n\n\t\t\t\tlet catchProperty: TSESTree.Property | undefined\n\t\t\t\toptionsObject.properties.forEach((property) => {\n\t\t\t\t\tif (property.type === AST_NODE_TYPES.Property) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t(property.key.type === AST_NODE_TYPES.Identifier &&\n\t\t\t\t\t\t\t\tproperty.key.name === `catch`) ||\n\t\t\t\t\t\t\t(property.key.type === AST_NODE_TYPES.Literal &&\n\t\t\t\t\t\t\t\tproperty.key.value === `catch`)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcatchProperty = property\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tif (!errorTypeNode) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tconst typeNode = parserServices.esTreeNodeToTSNodeMap.get(\n\t\t\t\t\terrorTypeNode,\n\t\t\t\t) as TypeNode\n\t\t\t\t// Get the TypeScript Type object for E\n\t\t\t\tconst errorTypeTs = checker.getTypeFromTypeNode(typeNode)\n\t\t\t\tconst errorTypeName = checker.typeToString(errorTypeTs)\n\n\t\t\t\tif (!catchProperty) {\n\t\t\t\t\tcontext.report({\n\t\t\t\t\t\tnode: optionsObject,\n\t\t\t\t\t\tmessageId: `missingCatchProperty`,\n\t\t\t\t\t\tdata: { functionName, errorTypeName },\n\t\t\t\t\t})\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// --- New Validation: Check Constructor Types ---\n\t\t\t\tconst catchArray = catchProperty.value\n\t\t\t\tif (catchArray.type !== AST_NODE_TYPES.ArrayExpression) {\n\t\t\t\t\t// We only check array literals (e.g., [Ctor1, Ctor2])\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// 3. Collect all acceptable nominal symbols from E\n\t\t\t\tconst acceptableErrorSymbols: TsSymbol[] = []\n\n\t\t\t\t// Check if E is a Union Type\n\t\t\t\tif (errorTypeTs.isUnion()) {\n\t\t\t\t\t// Add the symbol of every member of the union (e.g., Symbol(SpecialError), Symbol(FancyError))\n\t\t\t\t\tfor (const memberType of errorTypeTs.types) {\n\t\t\t\t\t\tconst symbol = memberType.getSymbol()\n\t\t\t\t\t\tif (symbol) {\n\t\t\t\t\t\t\tacceptableErrorSymbols.push(symbol)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// E is a single type, add its symbol\n\t\t\t\t\tconst symbol = errorTypeTs.getSymbol()\n\t\t\t\t\tif (symbol) {\n\t\t\t\t\t\tacceptableErrorSymbols.push(symbol)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (catchArray.elements.length === 0) {\n\t\t\t\t\tcontext.report({\n\t\t\t\t\t\tnode: catchProperty,\n\t\t\t\t\t\tmessageId: `missingCatchProperty`,\n\t\t\t\t\t\tdata: { functionName, errorTypeName },\n\t\t\t\t\t})\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst errorSymbolsToRepresent = new Set(acceptableErrorSymbols)\n\n\t\t\t\t// Iterate over each constructor reference in the 'catch' array\n\t\t\t\tfor (const element of catchArray.elements) {\n\t\t\t\t\tif (!element || element.type !== AST_NODE_TYPES.Identifier) {\n\t\t\t\t\t\t// Only check simple identifier references (e.g., [ClientError])\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get the type of the constructor identifier (e.g., the Type of 'Error')\n\t\t\t\t\tconst constructorTsNode =\n\t\t\t\t\t\tparserServices.esTreeNodeToTSNodeMap.get(element)\n\t\t\t\t\tconst constructorType = checker.getTypeAtLocation(constructorTsNode)\n\t\t\t\t\tconst constructorName = element.name\n\n\t\t\t\t\t// console.log(`constructorName`, constructorName)\n\n\t\t\t\t\t// Extract the instance type from the constructor type.\n\t\t\t\t\t// e.g., turn 'typeof ClientError' into 'ClientError'\n\t\t\t\t\tlet instanceType: Type | undefined\n\t\t\t\t\tif (\n\t\t\t\t\t\t(constructorType as InterfaceType).getConstructSignatures().length >\n\t\t\t\t\t\t0\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Get the return type of the constructor signature\n\t\t\t\t\t\tconst signature = (\n\t\t\t\t\t\t\tconstructorType as InterfaceType\n\t\t\t\t\t\t).getConstructSignatures()[0]\n\t\t\t\t\t\tinstanceType = signature.getReturnType()\n\t\t\t\t\t}\n\n\t\t\t\t\t// If we couldn't get the instance type, skip the check\n\n\t\t\t\t\tconst constructorInstanceSymbol = instanceType?.getSymbol()\n\t\t\t\t\tif (!constructorInstanceSymbol) continue\n\n\t\t\t\t\t// Check for symbol identity\n\t\t\t\t\tif (acceptableErrorSymbols.includes(constructorInstanceSymbol)) {\n\t\t\t\t\t\terrorSymbolsToRepresent.delete(constructorInstanceSymbol)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\tnode: element,\n\t\t\t\t\t\t\tmessageId: `invalidCatchProperty`,\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\tfunctionName,\n\t\t\t\t\t\t\t\tconstructorName: constructorName,\n\t\t\t\t\t\t\t\terrorTypeName: errorTypeName,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (const errorSymbol of errorSymbolsToRepresent) {\n\t\t\t\t\tcontext.report({\n\t\t\t\t\t\tnode: catchProperty,\n\t\t\t\t\t\tmessageId: `extraneousErrorTypes`,\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\terrorTypeName: checker.symbolToString(errorSymbol),\n\t\t\t\t\t\t\tfunctionName,\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\t},\n})\n","/* eslint-disable @typescript-eslint/switch-exhaustiveness-check */\nimport { AST_NODE_TYPES, ESLintUtils } from \"@typescript-eslint/utils\"\n\nconst createRule = ESLintUtils.RuleCreator(\n\t(name) => `https://atom.io.fyi/docs/eslint-plugin#${name}`,\n)\n\nconst STATE_FUNCTIONS = [\n\t`atom`,\n\t`atomFamily`,\n\t`mutableAtom`,\n\t`mutableAtomFamily`,\n\t`selector`,\n\t`selectorFamily`,\n]\n\ntype Options = [\n\t{\n\t\tpermitAnnotation?: boolean\n\t},\n]\n\nexport const explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument` | `noTypeArgumentOrAnnotation`,\n\tOptions,\n\tunknown,\n\tESLintUtils.RuleListener\n> = createRule({\n\tname: `explicit-state-types`,\n\tmeta: {\n\t\ttype: `problem`,\n\t\tdocs: {\n\t\t\tdescription: `State declarations must have generic type arguments directly passed to them`,\n\t\t},\n\t\tmessages: {\n\t\t\tnoTypeArgument: `State declarations must have generic type arguments directly passed to them.`,\n\t\t\tnoTypeArgumentOrAnnotation: `State declarations must have generic type arguments directly passed to them, or a top-level type annotation.`,\n\t\t},\n\t\tschema: [\n\t\t\t{\n\t\t\t\ttype: `object`,\n\t\t\t\tproperties: {\n\t\t\t\t\tpermitAnnotation: {\n\t\t\t\t\t\ttype: `boolean`,\n\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tadditionalProperties: false,\n\t\t\t},\n\t\t],\n\t},\n\tdefaultOptions: [\n\t\t{\n\t\t\tpermitAnnotation: false,\n\t\t},\n\t],\n\tcreate(context) {\n\t\tconst options = context.options[0]\n\t\tconst permitAnnotation = options?.permitAnnotation ?? false\n\n\t\treturn {\n\t\t\tCallExpression(node) {\n\t\t\t\tconst callee = node.callee\n\n\t\t\t\tswitch (callee.type) {\n\t\t\t\t\tcase `Identifier`:\n\t\t\t\t\t\tif (STATE_FUNCTIONS.includes(callee.name) === false) {\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase `MemberExpression`:\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t(callee.property.type === `Identifier` &&\n\t\t\t\t\t\t\t\tSTATE_FUNCTIONS.includes(callee.property.name)) === false\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// Check for the *required* generic type argument first\n\t\t\t\tif (node.typeArguments) {\n\t\t\t\t\treturn // Generic type argument is present, no error\n\t\t\t\t}\n\n\t\t\t\t// If generic arguments are missing, check if the top-level annotation exception is enabled AND present\n\t\t\t\tif (permitAnnotation) {\n\t\t\t\t\tlet hasAnnotation = false\n\t\t\t\t\t// Check if the CallExpression is the initializer of a variable declarator\n\t\t\t\t\tconst parent = node.parent\n\t\t\t\t\tif (\n\t\t\t\t\t\tparent?.type === AST_NODE_TYPES.VariableDeclarator &&\n\t\t\t\t\t\tparent.init === node\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Check if the VariableDeclarator has an id with a TypeAnnotation\n\t\t\t\t\t\tconst declaratorId = parent.id\n\t\t\t\t\t\tif (declaratorId.type === AST_NODE_TYPES.Identifier) {\n\t\t\t\t\t\t\t// Check for 'const myAtom: AtomToken<string> = ...'\n\t\t\t\t\t\t\thasAnnotation = Boolean(declaratorId.typeAnnotation)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (hasAnnotation) {\n\t\t\t\t\t\treturn // Exception met: type annotation is on the variable declaration\n\t\t\t\t\t}\n\t\t\t\t\tcontext.report({\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tmessageId: `noTypeArgumentOrAnnotation`,\n\t\t\t\t\t})\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tcontext.report({\n\t\t\t\t\tnode,\n\t\t\t\t\tmessageId: `noTypeArgument`,\n\t\t\t\t})\n\t\t\t},\n\t\t}\n\t},\n})\n","export * from \"./exact-catch-types\"\nexport * from \"./explicit-state-types\"\n","import type { ESLint } from \"eslint\"\n\nimport * as Rules from \"./rules\"\n\nexport { Rules }\n\nconst plugin: ESLint.Plugin = {\n\trules: {\n\t\t\"exact-catch-types\": Rules.exactCatchTypes as any,\n\t\t\"explicit-state-types\": Rules.explicitStateTypes as any,\n\t},\n} satisfies ESLint.Plugin\n\nexport default plugin\n"],"mappings":";;;;AASA,MAAMA,eAAa,YAAY,aAC7B,SAAS,0CAA0C,OACpD;AAED,MAAM,6BAA6B;CAClC;CACA;CACA;CACA;CACA;AACD,MAAM,uBAAuB,CAAC,QAAQ,WAAW;AAEjD,MAAaC,kBAKTD,aAAW;CACd,MAAM;CACN,MAAM;EACL,MAAM;EACN,MAAM,EACL,aAAa,2IACb;EACD,UAAU;GACT,sBACC;GAGD,sBACC;GAID,sBACC;GAGD;EACD,QAAQ,EAAE;EACV;CACD,gBAAgB,EAAE;CAClB,OAAO,SAAS;EACf,MAAM,iBAAiB,YAAY,kBAAkB,QAAQ;EAC7D,MAAM,UAAU,eAAe,QAAQ,gBAAgB;AAEvD,SAAO,EACN,eAAe,MAAM;GACpB,MAAM,EACL,QACA,eAAe,qBACf,WAAW,kBACR;GAGJ,IAAIE,eAA8B;AAClC,OAAI,OAAO,SAAS,eAAe,YAClC;QAAI,2BAA2B,SAAS,OAAO,KAAK,CACnD,gBAAe,OAAO;cAEb,OAAO,SAAS,eAAe,kBACzC;QACC,OAAO,SAAS,SAAS,eAAe,cACxC,2BAA2B,SAAS,OAAO,SAAS,KAAK,CAEzD,gBAAe,OAAO,SAAS;;AAIjC,OAAI,CAAC,aAAc;GAGnB,IAAIC;AACJ,OAAI,oBACH,iBAAgB;QACV;IACN,MAAM,SAAS,KAAK;AACpB,QACC,QAAQ,SAAS,eAAe,sBAChC,OAAO,SAAS,MACf;KAED,MAAM,eAAe,OAAO;AAC5B,SAAI,aAAa,SAAS,eAAe,YAAY;MAEpD,MAAM,iBAAiB,aAAa,gBAAgB;AACpD,UACC,kBACA,mBAAmB,kBACnB,eAAe,cAEf,iBAAgB,eAAe;;;;GAMnC,MAAM,gBAAgB,cAAc;AAEpC,OAAI,eAAe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cACR;AAID,OAAI,kBAAkB;IACrB,IAAI,gBAAgB;IAEpB,MAAM,SAAS,KAAK;AACpB,QACC,QAAQ,SAAS,eAAe,sBAChC,OAAO,SAAS,MACf;KAED,MAAM,eAAe,OAAO;AAC5B,SAAI,aAAa,SAAS,eAAe,WAExC,iBAAgB,QAAQ,aAAa,eAAe;;AAGtD,QAAI,cACH;AAED,YAAQ,OAAO;KACd;KACA,WAAW;KACX,CAAC;AACF;;AAGD,WAAQ,OAAO;IACd;IACA,WAAW;IACX,CAAC;KAEH;;CAEF,CAAC;;;;;;;;;;;AElHF,MAAMC,SAAwB,EAC7B,OAAO;CACN,qBAAqBC;CACrB,wBAAwBC;CACxB,EACD;AAED,4BAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["mutexAtoms: AtomFamilyToken<boolean, Canonical>","roomKeysAtom: MutableAtomToken<UList<string>>","DEFAULT_USER_IN_ROOM_META: UserInRoomMeta","usersInRooms: JoinToken<`room`, RoomKey, `user`, UserKey, `1:n`>","usersInMyRoomView: ReadonlyPureSelectorFamilyToken<\n\tMutableAtomToken<UList<RoomKey>>[],\n\tUserKey\n>"],"sources":["../../src/realtime/employ-socket.ts","../../src/realtime/mutex-store.ts","../../src/realtime/realtime-continuity.ts","../../src/realtime/realtime-key-types.ts","../../src/realtime/shared-room-store.ts"],"sourcesContent":["import type { Socket } from \"atom.io/realtime\"\nimport type { Events } from \"atom.io/realtime-server\"\n\nexport function employSocket<I extends Events, K extends string & keyof I>(\n\tsocket: Socket,\n\tevent: K,\n\thandleEvent: (...data: I[K]) => void,\n): () => void {\n\tsocket.on(event, handleEvent)\n\tconst retireSocket = () => {\n\t\tsocket.off(event, handleEvent)\n\t}\n\treturn retireSocket\n}\n","import type { AtomFamilyToken } from \"atom.io\"\nimport { atomFamily } from \"atom.io\"\nimport type { Canonical } from \"atom.io/json\"\n\nexport const mutexAtoms: AtomFamilyToken<boolean, Canonical> = atomFamily<\n\tboolean,\n\tCanonical\n>({\n\tkey: `mutex`,\n\tdefault: false,\n})\n","import type {\n\tAtomFamilyToken,\n\tAtomToken,\n\tReadableFamilyToken,\n\tReadableToken,\n\tTokenType,\n\tTransactionToken,\n} from \"atom.io\"\nimport {\n\tassignTransactionToContinuity,\n\tIMPLICIT,\n\tsetEpochNumberOfContinuity,\n} from \"atom.io/internal\"\nimport type { Canonical } from \"atom.io/json\"\n\nimport type { UserKey } from \"./realtime-key-types\"\n\n/* eslint-disable no-console */\n\nexport class InvariantMap<K, V> extends Map<K, V> implements ReadonlyMap<K, V> {\n\tpublic set(key: K, value: V): this {\n\t\tif (this.has(key)) {\n\t\t\tconsole.warn(`Tried to set a key that already exists in an InvariantMap`, {\n\t\t\t\tkey,\n\t\t\t\tvalue,\n\t\t\t})\n\t\t\treturn this\n\t\t}\n\t\treturn super.set(key, value)\n\t}\n}\n\nexport type PerspectiveToken<F extends AtomFamilyToken<any>> = {\n\ttype: `realtime_perspective`\n\tresourceAtoms: F\n\tviewAtoms: ReadableFamilyToken<ReadableToken<TokenType<F>>[], UserKey>\n}\n\nexport type ContinuityToken = {\n\treadonly type: `continuity`\n\treadonly key: string\n\treadonly globals: AtomToken<any>[]\n\treadonly actions: TransactionToken<any>[]\n\treadonly perspectives: PerspectiveToken<AtomFamilyToken<any, Canonical>>[]\n}\n\nexport class SyncGroup {\n\tpublic type = `continuity` as const\n\n\tprotected globals: AtomToken<any>[] = []\n\tprotected actions: TransactionToken<any>[] = []\n\tprotected perspectives: PerspectiveToken<any>[] = []\n\tprotected readonly key: string\n\n\tprotected constructor(key: string) {\n\t\tthis.key = key\n\t}\n\n\tpublic static existing: InvariantMap<string, ContinuityToken> =\n\t\tnew InvariantMap()\n\tpublic static create(\n\t\tkey: string,\n\t\tbuilder: (group: SyncGroup) => SyncGroup,\n\t): ContinuityToken {\n\t\tconst group = new SyncGroup(key)\n\t\tconst { type, globals, actions, perspectives } = builder(group)\n\t\tconst token = { type, key, globals, actions, perspectives }\n\t\tSyncGroup.existing.set(key, token)\n\t\treturn token\n\t}\n\n\tpublic add(...atoms: AtomToken<any>[]): SyncGroup\n\tpublic add(...args: TransactionToken<any>[]): SyncGroup\n\tpublic add<\n\t\tF extends AtomFamilyToken<any>,\n\t\tT extends F extends AtomFamilyToken<infer U> ? U : never,\n\t>(\n\t\tfamily: AtomFamilyToken<T, any>,\n\t\tindex: ReadableFamilyToken<Iterable<AtomToken<T>>, string>,\n\t): SyncGroup\n\tpublic add(\n\t\t...args:\n\t\t\t| readonly AtomToken<any>[]\n\t\t\t| readonly TransactionToken<any>[]\n\t\t\t| [AtomFamilyToken<any, any>, ReadableFamilyToken<Iterable<any>, string>]\n\t): this {\n\t\tconst zeroth = args[0]\n\t\tswitch (zeroth.type) {\n\t\t\tcase `atom`:\n\t\t\tcase `mutable_atom`:\n\t\t\t\tthis.globals.push(...(args as AtomToken<any>[]))\n\t\t\t\tbreak\n\t\t\tcase `transaction`:\n\t\t\t\tthis.actions.push(...(args as TransactionToken<any>[]))\n\t\t\t\tbreak\n\t\t\tcase `atom_family`:\n\t\t\tcase `mutable_atom_family`:\n\t\t\t\t{\n\t\t\t\t\tconst [family, index] = args as [\n\t\t\t\t\t\tAtomFamilyToken<any, any>,\n\t\t\t\t\t\tReadableFamilyToken<ReadableToken<any>[], UserKey>,\n\t\t\t\t\t]\n\t\t\t\t\tthis.perspectives.push({\n\t\t\t\t\t\ttype: `realtime_perspective`,\n\t\t\t\t\t\tresourceAtoms: family,\n\t\t\t\t\t\tviewAtoms: index,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t}\n\n\t\treturn this\n\t}\n}\n\nexport type ContinuityOptions = {\n\tkey: string\n\tconfig: (group: SyncGroup) => SyncGroup\n}\n\nexport function continuity(options: ContinuityOptions): ContinuityToken {\n\tconst { key, config } = options\n\tconst token = SyncGroup.create(key, config)\n\tconst { actions } = token\n\tfor (const action of actions) {\n\t\tassignTransactionToContinuity(IMPLICIT.STORE, key, action.key)\n\t}\n\tsetEpochNumberOfContinuity(IMPLICIT.STORE, key, -1)\n\treturn token\n}\n\n// const counterStates = atomFamily<number, { c: string }>({\n// \tkey: `counter`,\n// \tdefault: 0,\n// })\n// const counterIndices = atomFamily<{ c: string }[], string>({\n// \tkey: `counterIndex`,\n// \tdefault: [],\n// })\n// const nameStates = atomFamily<number, { n: string }>({\n// \tkey: `name`,\n// \tdefault: 0,\n// })\n// const nameIndices = atomFamily<{ n: string }[], string>({\n// \tkey: `nameIndex`,\n// \tdefault: [],\n// })\n\n// const counterContinuity = continuity({\n// \tkey: `counter`,\n// \tconfig: (group) =>\n// \t\tgroup\n// \t\t\t.add(counterStates, counterIndices)\n// \t\t\t.add(nameStates, nameIndices)\n// \t\t\t.add(nameStates, nameIndices)\n// \t\t\t.add(nameStates, nameIndices),\n// })\n","export type SocketKey = `socket::${string}`\nexport const isSocketKey = (key: string): key is SocketKey =>\n\tkey.startsWith(`socket::`)\n\nexport type UserKey = `user::${string}`\nexport const isUserKey = (key: string): key is UserKey =>\n\tkey.startsWith(`user::`)\n\nexport type RoomKey = `room::${string}`\nexport const isRoomKey = (key: string): key is RoomKey =>\n\tkey.startsWith(`room::`)\n","import type {\n\tJoinToken,\n\tMutableAtomToken,\n\tReadonlyPureSelectorFamilyToken,\n} from \"atom.io\"\nimport { getInternalRelations, join, mutableAtom, selectorFamily } from \"atom.io\"\nimport { UList } from \"atom.io/transceivers/u-list\"\n\nimport {\n\tisRoomKey,\n\tisUserKey,\n\ttype RoomKey,\n\ttype UserKey,\n} from \"./realtime-key-types\"\n\nexport type RoomSocketInterface<RoomNames extends string> = {\n\tcreateRoom: (roomName: RoomNames) => void\n\tjoinRoom: (roomKey: string) => void\n\t[leaveRoom: `leaveRoom:${string}`]: () => void\n\t[deleteRoom: `deleteRoom:${string}`]: () => void\n}\n\nexport const roomKeysAtom: MutableAtomToken<UList<string>> = mutableAtom<\n\tUList<string>\n>({\n\tkey: `roomIndex`,\n\tclass: UList,\n})\n\nexport type UserInRoomMeta = {\n\tenteredAtEpoch: number\n}\nexport const DEFAULT_USER_IN_ROOM_META: UserInRoomMeta = {\n\tenteredAtEpoch: 0,\n}\nexport const usersInRooms: JoinToken<`room`, RoomKey, `user`, UserKey, `1:n`> =\n\tjoin({\n\t\tkey: `usersInRooms`,\n\t\tbetween: [`room`, `user`],\n\t\tcardinality: `1:n`,\n\t\tisAType: isRoomKey,\n\t\tisBType: isUserKey,\n\t})\n\nexport const usersInMyRoomView: ReadonlyPureSelectorFamilyToken<\n\tMutableAtomToken<UList<RoomKey>>[],\n\tUserKey\n> = selectorFamily<MutableAtomToken<UList<RoomKey>>[], UserKey>({\n\tkey: `usersInMyRoomView`,\n\tget:\n\t\t(myUsername) =>\n\t\t({ find }) => {\n\t\t\tconst [, roomsOfUsersAtoms] = getInternalRelations(usersInRooms, `split`)\n\t\t\tconst myRoomIndex = find(roomsOfUsersAtoms, myUsername)\n\t\t\treturn [myRoomIndex]\n\t\t},\n})\n"],"mappings":";;;;;AAGA,SAAgB,aACf,QACA,OACA,aACa;AACb,QAAO,GAAG,OAAO,YAAY;CAC7B,MAAM,qBAAqB;AAC1B,SAAO,IAAI,OAAO,YAAY;;AAE/B,QAAO;;;;;ACRR,MAAaA,aAAkD,WAG7D;CACD,KAAK;CACL,SAAS;CACT,CAAC;;;;ACSF,IAAa,eAAb,cAAwC,IAAuC;CAC9E,AAAO,IAAI,KAAQ,OAAgB;AAClC,MAAI,KAAK,IAAI,IAAI,EAAE;AAClB,WAAQ,KAAK,6DAA6D;IACzE;IACA;IACA,CAAC;AACF,UAAO;;AAER,SAAO,MAAM,IAAI,KAAK,MAAM;;;AAkB9B,IAAa,YAAb,MAAa,UAAU;CACtB,AAAO,OAAO;CAEd,AAAU,UAA4B,EAAE;CACxC,AAAU,UAAmC,EAAE;CAC/C,AAAU,eAAwC,EAAE;CACpD,AAAmB;CAEnB,AAAU,YAAY,KAAa;AAClC,OAAK,MAAM;;CAGZ,OAAc,WACb,IAAI,cAAc;CACnB,OAAc,OACb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Q;AAEzE,SAAO,CADa,KAAK,mBAAmB,WAAW,CACnC;;CAEtB,CAAC"}
1
+ {"version":3,"file":"index.js","names":["mutexAtoms: AtomFamilyToken<boolean, Canonical>","roomKeysAtom: MutableAtomToken<UList<string>>","DEFAULT_USER_IN_ROOM_META: UserInRoomMeta","usersInRooms: JoinToken<`room`, RoomKey, `user`, UserKey, `1:n`>","usersInMyRoomView: ReadonlyPureSelectorFamilyToken<\n\tMutableAtomToken<UList<RoomKey>>[],\n\tUserKey\n>"],"sources":["../../src/realtime/employ-socket.ts","../../src/realtime/mutex-store.ts","../../src/realtime/realtime-continuity.ts","../../src/realtime/realtime-key-types.ts","../../src/realtime/shared-room-store.ts"],"sourcesContent":["import type { Socket } from \"atom.io/realtime\"\nimport type { Events } from \"atom.io/realtime-server\"\n\nexport function employSocket<I extends Events, K extends string & keyof I>(\n\tsocket: Socket,\n\tevent: K,\n\thandleEvent: (...data: I[K]) => void,\n): () => void {\n\tsocket.on(event, handleEvent)\n\tconst retireSocket = () => {\n\t\tsocket.off(event, handleEvent)\n\t}\n\treturn retireSocket\n}\n","import type { AtomFamilyToken } from \"atom.io\"\nimport { atomFamily } from \"atom.io\"\nimport type { Canonical } from \"atom.io/json\"\n\nexport const mutexAtoms: AtomFamilyToken<boolean, Canonical> = atomFamily({\n\tkey: `mutex`,\n\tdefault: false,\n})\n","import type {\n\tAtomFamilyToken,\n\tAtomToken,\n\tReadableFamilyToken,\n\tReadableToken,\n\tTokenType,\n\tTransactionToken,\n} from \"atom.io\"\nimport {\n\tassignTransactionToContinuity,\n\tIMPLICIT,\n\tsetEpochNumberOfContinuity,\n} from \"atom.io/internal\"\nimport type { Canonical } from \"atom.io/json\"\n\nimport type { UserKey } from \"./realtime-key-types\"\n\n/* eslint-disable no-console */\n\nexport class InvariantMap<K, V> extends Map<K, V> implements ReadonlyMap<K, V> {\n\tpublic set(key: K, value: V): this {\n\t\tif (this.has(key)) {\n\t\t\tconsole.warn(`Tried to set a key that already exists in an InvariantMap`, {\n\t\t\t\tkey,\n\t\t\t\tvalue,\n\t\t\t})\n\t\t\treturn this\n\t\t}\n\t\treturn super.set(key, value)\n\t}\n}\n\nexport type PerspectiveToken<F extends AtomFamilyToken<any>> = {\n\ttype: `realtime_perspective`\n\tresourceAtoms: F\n\tviewAtoms: ReadableFamilyToken<ReadableToken<TokenType<F>>[], UserKey>\n}\n\nexport type ContinuityToken = {\n\treadonly type: `continuity`\n\treadonly key: string\n\treadonly globals: AtomToken<any>[]\n\treadonly actions: TransactionToken<any>[]\n\treadonly perspectives: PerspectiveToken<AtomFamilyToken<any, Canonical>>[]\n}\n\nexport class SyncGroup {\n\tpublic type = `continuity` as const\n\n\tprotected globals: AtomToken<any>[] = []\n\tprotected actions: TransactionToken<any>[] = []\n\tprotected perspectives: PerspectiveToken<any>[] = []\n\tprotected readonly key: string\n\n\tprotected constructor(key: string) {\n\t\tthis.key = key\n\t}\n\n\tpublic static existing: InvariantMap<string, ContinuityToken> =\n\t\tnew InvariantMap()\n\tpublic static create(\n\t\tkey: string,\n\t\tbuilder: (group: SyncGroup) => SyncGroup,\n\t): ContinuityToken {\n\t\tconst group = new SyncGroup(key)\n\t\tconst { type, globals, actions, perspectives } = builder(group)\n\t\tconst token = { type, key, globals, actions, perspectives }\n\t\tSyncGroup.existing.set(key, token)\n\t\treturn token\n\t}\n\n\tpublic add(...atoms: AtomToken<any>[]): SyncGroup\n\tpublic add(...args: TransactionToken<any>[]): SyncGroup\n\tpublic add<\n\t\tF extends AtomFamilyToken<any>,\n\t\tT extends F extends AtomFamilyToken<infer U> ? U : never,\n\t>(\n\t\tfamily: AtomFamilyToken<T, any>,\n\t\tindex: ReadableFamilyToken<Iterable<AtomToken<T>>, string>,\n\t): SyncGroup\n\tpublic add(\n\t\t...args:\n\t\t\t| readonly AtomToken<any>[]\n\t\t\t| readonly TransactionToken<any>[]\n\t\t\t| [AtomFamilyToken<any, any>, ReadableFamilyToken<Iterable<any>, string>]\n\t): this {\n\t\tconst zeroth = args[0]\n\t\tswitch (zeroth.type) {\n\t\t\tcase `atom`:\n\t\t\tcase `mutable_atom`:\n\t\t\t\tthis.globals.push(...(args as AtomToken<any>[]))\n\t\t\t\tbreak\n\t\t\tcase `transaction`:\n\t\t\t\tthis.actions.push(...(args as TransactionToken<any>[]))\n\t\t\t\tbreak\n\t\t\tcase `atom_family`:\n\t\t\tcase `mutable_atom_family`:\n\t\t\t\t{\n\t\t\t\t\tconst [family, index] = args as [\n\t\t\t\t\t\tAtomFamilyToken<any, any>,\n\t\t\t\t\t\tReadableFamilyToken<ReadableToken<any>[], UserKey>,\n\t\t\t\t\t]\n\t\t\t\t\tthis.perspectives.push({\n\t\t\t\t\t\ttype: `realtime_perspective`,\n\t\t\t\t\t\tresourceAtoms: family,\n\t\t\t\t\t\tviewAtoms: index,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t}\n\n\t\treturn this\n\t}\n}\n\nexport type ContinuityOptions = {\n\tkey: string\n\tconfig: (group: SyncGroup) => SyncGroup\n}\n\nexport function continuity(options: ContinuityOptions): ContinuityToken {\n\tconst { key, config } = options\n\tconst token = SyncGroup.create(key, config)\n\tconst { actions } = token\n\tfor (const action of actions) {\n\t\tassignTransactionToContinuity(IMPLICIT.STORE, key, action.key)\n\t}\n\tsetEpochNumberOfContinuity(IMPLICIT.STORE, key, -1)\n\treturn token\n}\n\n// const counterStates = atomFamily<number, { c: string }>({\n// \tkey: `counter`,\n// \tdefault: 0,\n// })\n// const counterIndices = atomFamily<{ c: string }[], string>({\n// \tkey: `counterIndex`,\n// \tdefault: [],\n// })\n// const nameStates = atomFamily<number, { n: string }>({\n// \tkey: `name`,\n// \tdefault: 0,\n// })\n// const nameIndices = atomFamily<{ n: string }[], string>({\n// \tkey: `nameIndex`,\n// \tdefault: [],\n// })\n\n// const counterContinuity = continuity({\n// \tkey: `counter`,\n// \tconfig: (group) =>\n// \t\tgroup\n// \t\t\t.add(counterStates, counterIndices)\n// \t\t\t.add(nameStates, nameIndices)\n// \t\t\t.add(nameStates, nameIndices)\n// \t\t\t.add(nameStates, nameIndices),\n// })\n","export type SocketKey = `socket::${string}`\nexport const isSocketKey = (key: string): key is SocketKey =>\n\tkey.startsWith(`socket::`)\n\nexport type UserKey = `user::${string}`\nexport const isUserKey = (key: string): key is UserKey =>\n\tkey.startsWith(`user::`)\n\nexport type RoomKey = `room::${string}`\nexport const isRoomKey = (key: string): key is RoomKey =>\n\tkey.startsWith(`room::`)\n","import type {\n\tJoinToken,\n\tMutableAtomToken,\n\tReadonlyPureSelectorFamilyToken,\n} from \"atom.io\"\nimport { getInternalRelations, join, mutableAtom, selectorFamily } from \"atom.io\"\nimport { UList } from \"atom.io/transceivers/u-list\"\n\nimport {\n\tisRoomKey,\n\tisUserKey,\n\ttype RoomKey,\n\ttype UserKey,\n} from \"./realtime-key-types\"\n\nexport type RoomSocketInterface<RoomNames extends string> = {\n\tcreateRoom: (roomName: RoomNames) => void\n\tjoinRoom: (roomKey: string) => void\n\t[leaveRoom: `leaveRoom:${string}`]: () => void\n\t[deleteRoom: `deleteRoom:${string}`]: () => void\n}\n\nexport const roomKeysAtom: MutableAtomToken<UList<string>> = mutableAtom({\n\tkey: `roomIndex`,\n\tclass: UList,\n})\n\nexport type UserInRoomMeta = {\n\tenteredAtEpoch: number\n}\nexport const DEFAULT_USER_IN_ROOM_META: UserInRoomMeta = {\n\tenteredAtEpoch: 0,\n}\nexport const usersInRooms: JoinToken<`room`, RoomKey, `user`, UserKey, `1:n`> =\n\tjoin({\n\t\tkey: `usersInRooms`,\n\t\tbetween: [`room`, `user`],\n\t\tcardinality: `1:n`,\n\t\tisAType: isRoomKey,\n\t\tisBType: isUserKey,\n\t})\n\nexport const usersInMyRoomView: ReadonlyPureSelectorFamilyToken<\n\tMutableAtomToken<UList<RoomKey>>[],\n\tUserKey\n> = selectorFamily({\n\tkey: `usersInMyRoomView`,\n\tget:\n\t\t(myUsername) =>\n\t\t({ find }) => {\n\t\t\tconst [, roomsOfUsersAtoms] = getInternalRelations(usersInRooms, `split`)\n\t\t\tconst myRoomIndex = find(roomsOfUsersAtoms, myUsername)\n\t\t\treturn [myRoomIndex]\n\t\t},\n})\n"],"mappings":";;;;;AAGA,SAAgB,aACf,QACA,OACA,aACa;AACb,QAAO,GAAG,OAAO,YAAY;CAC7B,MAAM,qBAAqB;AAC1B,SAAO,IAAI,OAAO,YAAY;;AAE/B,QAAO;;;;;ACRR,MAAaA,aAAkD,WAAW;CACzE,KAAK;CACL,SAAS;CACT,CAAC;;;;ACYF,IAAa,eAAb,cAAwC,IAAuC;CAC9E,AAAO,IAAI,KAAQ,OAAgB;AAClC,MAAI,KAAK,IAAI,IAAI,EAAE;AAClB,WAAQ,KAAK,6DAA6D;IACzE;IACA;IACA,CAAC;AACF,UAAO;;AAER,SAAO,MAAM,IAAI,KAAK,MAAM;;;AAkB9B,IAAa,YAAb,MAAa,UAAU;CACtB,AAAO,OAAO;CAEd,AAAU,UAA4B,EAAE;CACxC,AAAU,UAAmC,EAAE;CAC/C,AAAU,eAAwC,EAAE;CACpD,AAAmB;CAEnB,AAAU,YAAY,KAAa;AAClC,OAAK,MAAM;;CAGZ,OAAc,WACb,IAAI,cAAc;CACnB,OAAc,OACb,KACA,SACkB;EAElB,MAAM,EAAE,MAAM,SAAS,SAAS,iBAAiB,QADnC,IAAI,UAAU,IAAI,CAC+B;EAC/D,MAAM,QAAQ;GAAE;GAAM;GAAK;GAAS;GAAS;GAAc;AAC3D,YAAU,SAAS,IAAI,KAAK,MAAM;AAClC,SAAO;;CAYR,AAAO,IACN,GAAG,MAII;AAEP,UADe,KAAK,GACL,MAAf;GACC,KAAK;GACL,KAAK;AACJ,SAAK,QAAQ,KAAK,GAAI,KAA0B;AAChD;GACD,KAAK;AACJ,SAAK,QAAQ,KAAK,GAAI,KAAiC;AACvD;GACD,KAAK;GACL,KAAK;IACJ;KACC,MAAM,CAAC,QAAQ,SAAS;AAIxB,UAAK,aAAa,KAAK;MACtB,MAAM;MACN,eAAe;MACf,WAAW;MACX,CAAC;;AAEH;;AAGF,SAAO;;;AAST,SAAgB,WAAW,SAA6C;CACvE,MAAM,EAAE,KAAK,WAAW;CACxB,MAAM,QAAQ,UAAU,OAAO,KAAK,OAAO;CAC3C,MAAM,EAAE,YAAY;AACpB,MAAK,MAAM,UAAU,QACpB,+BAA8B,SAAS,OAAO,KAAK,OAAO,IAAI;AAE/D,4BAA2B,SAAS,OAAO,KAAK,GAAG;AACnD,QAAO;;;;;AC/HR,MAAa,eAAe,QAC3B,IAAI,WAAW,WAAW;AAG3B,MAAa,aAAa,QACzB,IAAI,WAAW,SAAS;AAGzB,MAAa,aAAa,QACzB,IAAI,WAAW,SAAS;;;;ACYzB,MAAaC,eAAgD,YAAY;CACxE,KAAK;CACL,OAAO;CACP,CAAC;AAKF,MAAaC,4BAA4C,EACxD,gBAAgB,GAChB;AACD,MAAaC,eACZ,KAAK;CACJ,KAAK;CACL,SAAS,CAAC,QAAQ,OAAO;CACzB,aAAa;CACb,SAAS;CACT,SAAS;CACT,CAAC;AAEH,MAAaC,oBAGT,eAAe;CAClB,KAAK;CACL,MACE,gBACA,EAAE,WAAW;EACb,MAAM,GAAG,qBAAqB,qBAAqB,cAAc,QAAQ;AAEzE,SAAO,CADa,KAAK,mBAAmB,WAAW,CACnC;;CAEtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["ATOM_IO_REALTIME_SERVER_ROOMS: RoomMap","ROOMS: RoomMap","roomMeta: { count: number }","socketAtoms: RegularAtomFamilyToken<Socket | null, SocketKey>","socketKeysAtom: MutableAtomToken<UList<SocketKey>>","userKeysAtom: MutableAtomToken<UList<UserKey>>","usersOfSockets: JoinToken<\n\t`user`,\n\tUserKey,\n\t`socket`,\n\tSocketKey,\n\t`1:1`\n>","selfListSelectors: PureSelectorFamilyToken<UserKey[], UserKey>"],"sources":["../../src/realtime-server/continuity/provide-continuity.ts","../../src/realtime-server/ipc-sockets/custom-socket.ts","../../src/realtime-server/ipc-sockets/child-socket.ts","../../src/realtime-server/ipc-sockets/parent-socket.ts","../../src/realtime-server/realtime-family-provider.ts","../../src/realtime-server/realtime-mutable-family-provider.ts","../../src/realtime-server/realtime-mutable-provider.ts","../../src/realtime-server/server-config.ts","../../src/realtime-server/realtime-server-stores/server-room-external-store.ts","../../src/realtime-server/realtime-server-stores/server-user-store.ts","../../src/realtime-server/realtime-state-provider.ts","../../src/realtime-server/realtime-state-receiver.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;KAYY,iBAAA,gBACC,0BACH;iBAEM,0BAAA;;;GAGb,eAAe;;;KChBN,MAAA,GAAS,IAAA,CAAK,eAAe,IAAA,CAAK;KAElC,kCACU,iCACI,8BAA8B,4BACxC,aAAa;UAEZ,sBACN,iCACe,mBAAmB,EDA7C,SCCU,MDDE,CAAA;EAIZ,QAAgB,EAAA,ECFH,WDEG,CCFS,YDET,CCFsB,CDEtB,ECFyB,CDEzB,CAAA,CAAA;;AAEf,uBCDqB,YDCrB,CACE,UCF0C,MDE1C,EAAe,UCF6C,MDE7C,CAAA,YCDN,MDCM,CAAA;uBCCI,UAAU,GAAG,cAAc,IAAA,CAAK;6BAC1B,6BAA6B,IAAA,CAAK;iDACd,YACrC,aAAa,GAAG;EApB3B,EAAA,EAAY,MAAA;EAEZ,IAAY,EAAA,CAAA,cAAA,MAiCuB,CAjCvB,CAAA,CAAA,KAAA,EAkCH,KAlCG,EAAA,GAAA,IAAA,EAmCD,CAnCC,CAmCC,KAnCD,CAAA,EAAA,GAoCN,YApCM,CAoCO,CApCP,EAoCU,CApCV,CAAA;EACU,WAAA,CAAA,IAAA,EAAA,CAAA,cAAA,MAsCO,CAtCP,CAAA,CAAA,KAAA,EAuCZ,KAvCY,EAAA,GAAA,IAAA,EAwCV,CAxCU,CAwCR,KAxCQ,CAAA,EAAA,GAyCf,YAzCe,CAyCF,CAzCE,EAyCC,CAzCD,CAAA;EACI,EAAA,CAAA,cAAA,MA+CK,CA/CL,CAAA,C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J,aAAA,GAAgB,kBAAkB;iBAC9B,qBAAA;;;GAGb,0BACsC,IAAA,CAAK,qBACrC,MAAA,CAAO,cAAc;;;KCElB,aAAA,GAAgB,kBAAkB;iBAC9B,qBAAA;;;GAGb,0BACsC,IAAA,CAAK,wBAAwB,gBACvD,cAAc,kBACd,cAAc"}
1
+ {"version":3,"file":"index.d.ts","names":["ATOM_IO_REALTIME_SERVER_ROOMS: RoomMap","ROOMS: RoomMap","roomMeta: { count: number }","socketAtoms: RegularAtomFamilyToken<Socket | null, SocketKey>","socketKeysAtom: MutableAtomToken<UList<SocketKey>>","userKeysAtom: MutableAtomToken<UList<UserKey>>","usersOfSockets: JoinToken<\n\t`user`,\n\tUserKey,\n\t`socket`,\n\tSocketKey,\n\t`1:1`\n>","selfListSelectors: PureSelectorFamilyToken<UserKey[], UserKey>"],"sources":["../../src/realtime-server/continuity/provide-continuity.ts","../../src/realtime-server/ipc-sockets/custom-socket.ts","../../src/realtime-server/ipc-sockets/child-socket.ts","../../src/realtime-server/ipc-sockets/parent-socket.ts","../../src/realtime-server/realtime-family-provider.ts","../../src/realtime-server/realtime-mutable-family-provider.ts","../../src/realtime-server/realtime-mutable-provider.ts","../../src/realtime-server/server-config.ts","../../src/realtime-server/realtime-server-stores/server-room-external-store.ts","../../src/realtime-server/realtime-server-stores/server-user-store.ts","../../src/realtime-server/realtime-state-provider.ts","../../src/realtime-server/realtime-state-receiver.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;KAYY,iBAAA,gBACC,0BACH;iBAEM,0BAAA;;;GAGb,eAAe;;;KChBN,MAAA,GAAS,IAAA,CAAK,eAAe,IAAA,CAAK;KAElC,kCACU,iCACI,8BAA8B,4BACxC,aAAa;UAEZ,sBACN,iCACe,mBAAmB,EDA7C,SCCU,MDDE,CAAA;EAIZ,QAAgB,EAAA,ECFH,WDEG,CCFS,YDET,CCFsB,CDEtB,ECFyB,CDEzB,CAAA,CAAA;;AAEf,uBCDqB,YDCrB,CACE,UCF0C,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