@firfi/huly-mcp 0.1.13 → 0.1.14
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/dist/index.cjs +796 -793
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -53399,9 +53399,9 @@ var require_dist17 = __commonJS({
|
|
|
53399
53399
|
"node_modules/.pnpm/@tiptap+extension-task-item@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-task-item/dist/index.cjs"(exports2) {
|
|
53400
53400
|
"use strict";
|
|
53401
53401
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53402
|
-
var
|
|
53402
|
+
var core4 = require_dist16();
|
|
53403
53403
|
var inputRegex = /^\s*(\[([( |x])?\])\s$/;
|
|
53404
|
-
var TaskItem =
|
|
53404
|
+
var TaskItem = core4.Node.create({
|
|
53405
53405
|
name: "taskItem",
|
|
53406
53406
|
addOptions() {
|
|
53407
53407
|
return {
|
|
@@ -53441,7 +53441,7 @@ var require_dist17 = __commonJS({
|
|
|
53441
53441
|
renderHTML({ node, HTMLAttributes }) {
|
|
53442
53442
|
return [
|
|
53443
53443
|
"li",
|
|
53444
|
-
|
|
53444
|
+
core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {
|
|
53445
53445
|
"data-type": this.name
|
|
53446
53446
|
}),
|
|
53447
53447
|
[
|
|
@@ -53539,7 +53539,7 @@ var require_dist17 = __commonJS({
|
|
|
53539
53539
|
},
|
|
53540
53540
|
addInputRules() {
|
|
53541
53541
|
return [
|
|
53542
|
-
|
|
53542
|
+
core4.wrappingInputRule({
|
|
53543
53543
|
find: inputRegex,
|
|
53544
53544
|
type: this.type,
|
|
53545
53545
|
getAttributes: (match16) => ({
|
|
@@ -53560,8 +53560,8 @@ var require_dist18 = __commonJS({
|
|
|
53560
53560
|
"node_modules/.pnpm/@tiptap+extension-task-list@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-task-list/dist/index.cjs"(exports2) {
|
|
53561
53561
|
"use strict";
|
|
53562
53562
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53563
|
-
var
|
|
53564
|
-
var TaskList =
|
|
53563
|
+
var core4 = require_dist16();
|
|
53564
|
+
var TaskList = core4.Node.create({
|
|
53565
53565
|
name: "taskList",
|
|
53566
53566
|
addOptions() {
|
|
53567
53567
|
return {
|
|
@@ -53582,7 +53582,7 @@ var require_dist18 = __commonJS({
|
|
|
53582
53582
|
];
|
|
53583
53583
|
},
|
|
53584
53584
|
renderHTML({ HTMLAttributes }) {
|
|
53585
|
-
return ["ul",
|
|
53585
|
+
return ["ul", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { "data-type": this.name }), 0];
|
|
53586
53586
|
},
|
|
53587
53587
|
addCommands() {
|
|
53588
53588
|
return {
|
|
@@ -53762,11 +53762,11 @@ var require_dist19 = __commonJS({
|
|
|
53762
53762
|
"node_modules/.pnpm/@tiptap+extension-code-block@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-code-block/dist/index.cjs"(exports2) {
|
|
53763
53763
|
"use strict";
|
|
53764
53764
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53765
|
-
var
|
|
53765
|
+
var core4 = require_dist16();
|
|
53766
53766
|
var state = require_dist5();
|
|
53767
53767
|
var backtickInputRegex = /^```([a-z]+)?[\s\n]$/;
|
|
53768
53768
|
var tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/;
|
|
53769
|
-
var CodeBlock =
|
|
53769
|
+
var CodeBlock = core4.Node.create({
|
|
53770
53770
|
name: "codeBlock",
|
|
53771
53771
|
addOptions() {
|
|
53772
53772
|
return {
|
|
@@ -53812,7 +53812,7 @@ var require_dist19 = __commonJS({
|
|
|
53812
53812
|
renderHTML({ node, HTMLAttributes }) {
|
|
53813
53813
|
return [
|
|
53814
53814
|
"pre",
|
|
53815
|
-
|
|
53815
|
+
core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),
|
|
53816
53816
|
[
|
|
53817
53817
|
"code",
|
|
53818
53818
|
{
|
|
@@ -53900,14 +53900,14 @@ var require_dist19 = __commonJS({
|
|
|
53900
53900
|
},
|
|
53901
53901
|
addInputRules() {
|
|
53902
53902
|
return [
|
|
53903
|
-
|
|
53903
|
+
core4.textblockTypeInputRule({
|
|
53904
53904
|
find: backtickInputRegex,
|
|
53905
53905
|
type: this.type,
|
|
53906
53906
|
getAttributes: (match16) => ({
|
|
53907
53907
|
language: match16[1]
|
|
53908
53908
|
})
|
|
53909
53909
|
}),
|
|
53910
|
-
|
|
53910
|
+
core4.textblockTypeInputRule({
|
|
53911
53911
|
find: tildeInputRegex,
|
|
53912
53912
|
type: this.type,
|
|
53913
53913
|
getAttributes: (match16) => ({
|
|
@@ -54458,7 +54458,7 @@ var require_dist20 = __commonJS({
|
|
|
54458
54458
|
"node_modules/.pnpm/@tiptap+extension-text-style@2.11.9_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-text-style/dist/index.cjs"(exports2) {
|
|
54459
54459
|
"use strict";
|
|
54460
54460
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
54461
|
-
var
|
|
54461
|
+
var core4 = require_dist16();
|
|
54462
54462
|
var mergeNestedSpanStyles = (element2) => {
|
|
54463
54463
|
if (!element2.children.length) {
|
|
54464
54464
|
return;
|
|
@@ -54474,7 +54474,7 @@ var require_dist20 = __commonJS({
|
|
|
54474
54474
|
childSpan.setAttribute("style", `${closestParentSpanStyleOfChild};${childStyle}`);
|
|
54475
54475
|
});
|
|
54476
54476
|
};
|
|
54477
|
-
var TextStyle =
|
|
54477
|
+
var TextStyle = core4.Mark.create({
|
|
54478
54478
|
name: "textStyle",
|
|
54479
54479
|
priority: 101,
|
|
54480
54480
|
addOptions() {
|
|
@@ -54501,7 +54501,7 @@ var require_dist20 = __commonJS({
|
|
|
54501
54501
|
];
|
|
54502
54502
|
},
|
|
54503
54503
|
renderHTML({ HTMLAttributes }) {
|
|
54504
|
-
return ["span",
|
|
54504
|
+
return ["span", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
54505
54505
|
},
|
|
54506
54506
|
addCommands() {
|
|
54507
54507
|
return {
|
|
@@ -54530,9 +54530,9 @@ var require_dist21 = __commonJS({
|
|
|
54530
54530
|
"node_modules/.pnpm/@tiptap+extension-blockquote@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-blockquote/dist/index.cjs"(exports2) {
|
|
54531
54531
|
"use strict";
|
|
54532
54532
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
54533
|
-
var
|
|
54533
|
+
var core4 = require_dist16();
|
|
54534
54534
|
var inputRegex = /^\s*>\s$/;
|
|
54535
|
-
var Blockquote =
|
|
54535
|
+
var Blockquote = core4.Node.create({
|
|
54536
54536
|
name: "blockquote",
|
|
54537
54537
|
addOptions() {
|
|
54538
54538
|
return {
|
|
@@ -54548,7 +54548,7 @@ var require_dist21 = __commonJS({
|
|
|
54548
54548
|
];
|
|
54549
54549
|
},
|
|
54550
54550
|
renderHTML({ HTMLAttributes }) {
|
|
54551
|
-
return ["blockquote",
|
|
54551
|
+
return ["blockquote", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
54552
54552
|
},
|
|
54553
54553
|
addCommands() {
|
|
54554
54554
|
return {
|
|
@@ -54570,7 +54570,7 @@ var require_dist21 = __commonJS({
|
|
|
54570
54570
|
},
|
|
54571
54571
|
addInputRules() {
|
|
54572
54572
|
return [
|
|
54573
|
-
|
|
54573
|
+
core4.wrappingInputRule({
|
|
54574
54574
|
find: inputRegex,
|
|
54575
54575
|
type: this.type
|
|
54576
54576
|
})
|
|
@@ -54588,12 +54588,12 @@ var require_dist22 = __commonJS({
|
|
|
54588
54588
|
"node_modules/.pnpm/@tiptap+extension-bold@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-bold/dist/index.cjs"(exports2) {
|
|
54589
54589
|
"use strict";
|
|
54590
54590
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
54591
|
-
var
|
|
54591
|
+
var core4 = require_dist16();
|
|
54592
54592
|
var starInputRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/;
|
|
54593
54593
|
var starPasteRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g;
|
|
54594
54594
|
var underscoreInputRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/;
|
|
54595
54595
|
var underscorePasteRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g;
|
|
54596
|
-
var Bold =
|
|
54596
|
+
var Bold = core4.Mark.create({
|
|
54597
54597
|
name: "bold",
|
|
54598
54598
|
addOptions() {
|
|
54599
54599
|
return {
|
|
@@ -54620,7 +54620,7 @@ var require_dist22 = __commonJS({
|
|
|
54620
54620
|
];
|
|
54621
54621
|
},
|
|
54622
54622
|
renderHTML({ HTMLAttributes }) {
|
|
54623
|
-
return ["strong",
|
|
54623
|
+
return ["strong", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
54624
54624
|
},
|
|
54625
54625
|
addCommands() {
|
|
54626
54626
|
return {
|
|
@@ -54643,11 +54643,11 @@ var require_dist22 = __commonJS({
|
|
|
54643
54643
|
},
|
|
54644
54644
|
addInputRules() {
|
|
54645
54645
|
return [
|
|
54646
|
-
|
|
54646
|
+
core4.markInputRule({
|
|
54647
54647
|
find: starInputRegex,
|
|
54648
54648
|
type: this.type
|
|
54649
54649
|
}),
|
|
54650
|
-
|
|
54650
|
+
core4.markInputRule({
|
|
54651
54651
|
find: underscoreInputRegex,
|
|
54652
54652
|
type: this.type
|
|
54653
54653
|
})
|
|
@@ -54655,11 +54655,11 @@ var require_dist22 = __commonJS({
|
|
|
54655
54655
|
},
|
|
54656
54656
|
addPasteRules() {
|
|
54657
54657
|
return [
|
|
54658
|
-
|
|
54658
|
+
core4.markPasteRule({
|
|
54659
54659
|
find: starPasteRegex,
|
|
54660
54660
|
type: this.type
|
|
54661
54661
|
}),
|
|
54662
|
-
|
|
54662
|
+
core4.markPasteRule({
|
|
54663
54663
|
find: underscorePasteRegex,
|
|
54664
54664
|
type: this.type
|
|
54665
54665
|
})
|
|
@@ -54680,8 +54680,8 @@ var require_dist23 = __commonJS({
|
|
|
54680
54680
|
"node_modules/.pnpm/@tiptap+extension-document@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-document/dist/index.cjs"(exports2) {
|
|
54681
54681
|
"use strict";
|
|
54682
54682
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
54683
|
-
var
|
|
54684
|
-
var Document =
|
|
54683
|
+
var core4 = require_dist16();
|
|
54684
|
+
var Document = core4.Node.create({
|
|
54685
54685
|
name: "doc",
|
|
54686
54686
|
topNode: true,
|
|
54687
54687
|
content: "block+"
|
|
@@ -54935,9 +54935,9 @@ var require_dist26 = __commonJS({
|
|
|
54935
54935
|
"node_modules/.pnpm/@tiptap+extension-dropcursor@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-dropcursor/dist/index.cjs"(exports2) {
|
|
54936
54936
|
"use strict";
|
|
54937
54937
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
54938
|
-
var
|
|
54938
|
+
var core4 = require_dist16();
|
|
54939
54939
|
var dropcursor = require_dist25();
|
|
54940
|
-
var Dropcursor =
|
|
54940
|
+
var Dropcursor = core4.Extension.create({
|
|
54941
54941
|
name: "dropCursor",
|
|
54942
54942
|
addOptions() {
|
|
54943
54943
|
return {
|
|
@@ -55309,9 +55309,9 @@ var require_dist29 = __commonJS({
|
|
|
55309
55309
|
"node_modules/.pnpm/@tiptap+extension-gapcursor@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-gapcursor/dist/index.cjs"(exports2) {
|
|
55310
55310
|
"use strict";
|
|
55311
55311
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
55312
|
-
var
|
|
55312
|
+
var core4 = require_dist16();
|
|
55313
55313
|
var gapcursor = require_dist28();
|
|
55314
|
-
var Gapcursor =
|
|
55314
|
+
var Gapcursor = core4.Extension.create({
|
|
55315
55315
|
name: "gapCursor",
|
|
55316
55316
|
addProseMirrorPlugins() {
|
|
55317
55317
|
return [
|
|
@@ -55326,7 +55326,7 @@ var require_dist29 = __commonJS({
|
|
|
55326
55326
|
storage: extension.storage
|
|
55327
55327
|
};
|
|
55328
55328
|
return {
|
|
55329
|
-
allowGapCursor: (_a2 =
|
|
55329
|
+
allowGapCursor: (_a2 = core4.callOrReturn(core4.getExtensionField(extension, "allowGapCursor", context6))) !== null && _a2 !== void 0 ? _a2 : null
|
|
55330
55330
|
};
|
|
55331
55331
|
}
|
|
55332
55332
|
});
|
|
@@ -55340,8 +55340,8 @@ var require_dist30 = __commonJS({
|
|
|
55340
55340
|
"node_modules/.pnpm/@tiptap+extension-hard-break@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-hard-break/dist/index.cjs"(exports2) {
|
|
55341
55341
|
"use strict";
|
|
55342
55342
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
55343
|
-
var
|
|
55344
|
-
var HardBreak =
|
|
55343
|
+
var core4 = require_dist16();
|
|
55344
|
+
var HardBreak = core4.Node.create({
|
|
55345
55345
|
name: "hardBreak",
|
|
55346
55346
|
addOptions() {
|
|
55347
55347
|
return {
|
|
@@ -55359,7 +55359,7 @@ var require_dist30 = __commonJS({
|
|
|
55359
55359
|
];
|
|
55360
55360
|
},
|
|
55361
55361
|
renderHTML({ HTMLAttributes }) {
|
|
55362
|
-
return ["br",
|
|
55362
|
+
return ["br", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];
|
|
55363
55363
|
},
|
|
55364
55364
|
renderText() {
|
|
55365
55365
|
return "\n";
|
|
@@ -55406,8 +55406,8 @@ var require_dist31 = __commonJS({
|
|
|
55406
55406
|
"node_modules/.pnpm/@tiptap+extension-heading@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-heading/dist/index.cjs"(exports2) {
|
|
55407
55407
|
"use strict";
|
|
55408
55408
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
55409
|
-
var
|
|
55410
|
-
var Heading =
|
|
55409
|
+
var core4 = require_dist16();
|
|
55410
|
+
var Heading = core4.Node.create({
|
|
55411
55411
|
name: "heading",
|
|
55412
55412
|
addOptions() {
|
|
55413
55413
|
return {
|
|
@@ -55435,7 +55435,7 @@ var require_dist31 = __commonJS({
|
|
|
55435
55435
|
renderHTML({ node, HTMLAttributes }) {
|
|
55436
55436
|
const hasLevel = this.options.levels.includes(node.attrs.level);
|
|
55437
55437
|
const level = hasLevel ? node.attrs.level : this.options.levels[0];
|
|
55438
|
-
return [`h${level}`,
|
|
55438
|
+
return [`h${level}`, core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
55439
55439
|
},
|
|
55440
55440
|
addCommands() {
|
|
55441
55441
|
return {
|
|
@@ -55463,7 +55463,7 @@ var require_dist31 = __commonJS({
|
|
|
55463
55463
|
},
|
|
55464
55464
|
addInputRules() {
|
|
55465
55465
|
return this.options.levels.map((level) => {
|
|
55466
|
-
return
|
|
55466
|
+
return core4.textblockTypeInputRule({
|
|
55467
55467
|
find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\s$`),
|
|
55468
55468
|
type: this.type,
|
|
55469
55469
|
getAttributes: {
|
|
@@ -56102,9 +56102,9 @@ var require_dist35 = __commonJS({
|
|
|
56102
56102
|
"node_modules/.pnpm/@tiptap+extension-history@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-history/dist/index.cjs"(exports2) {
|
|
56103
56103
|
"use strict";
|
|
56104
56104
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
56105
|
-
var
|
|
56105
|
+
var core4 = require_dist16();
|
|
56106
56106
|
var history = require_dist34();
|
|
56107
|
-
var History =
|
|
56107
|
+
var History = core4.Extension.create({
|
|
56108
56108
|
name: "history",
|
|
56109
56109
|
addOptions() {
|
|
56110
56110
|
return {
|
|
@@ -56148,9 +56148,9 @@ var require_dist36 = __commonJS({
|
|
|
56148
56148
|
"node_modules/.pnpm/@tiptap+extension-horizontal-rule@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs"(exports2) {
|
|
56149
56149
|
"use strict";
|
|
56150
56150
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
56151
|
-
var
|
|
56151
|
+
var core4 = require_dist16();
|
|
56152
56152
|
var state = require_dist5();
|
|
56153
|
-
var HorizontalRule =
|
|
56153
|
+
var HorizontalRule = core4.Node.create({
|
|
56154
56154
|
name: "horizontalRule",
|
|
56155
56155
|
addOptions() {
|
|
56156
56156
|
return {
|
|
@@ -56162,12 +56162,12 @@ var require_dist36 = __commonJS({
|
|
|
56162
56162
|
return [{ tag: "hr" }];
|
|
56163
56163
|
},
|
|
56164
56164
|
renderHTML({ HTMLAttributes }) {
|
|
56165
|
-
return ["hr",
|
|
56165
|
+
return ["hr", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];
|
|
56166
56166
|
},
|
|
56167
56167
|
addCommands() {
|
|
56168
56168
|
return {
|
|
56169
56169
|
setHorizontalRule: () => ({ chain, state: state$1 }) => {
|
|
56170
|
-
if (!
|
|
56170
|
+
if (!core4.canInsertNode(state$1, state$1.schema.nodes[this.name])) {
|
|
56171
56171
|
return false;
|
|
56172
56172
|
}
|
|
56173
56173
|
const { selection } = state$1;
|
|
@@ -56180,7 +56180,7 @@ var require_dist36 = __commonJS({
|
|
|
56180
56180
|
}, {
|
|
56181
56181
|
type: this.name
|
|
56182
56182
|
});
|
|
56183
|
-
} else if (
|
|
56183
|
+
} else if (core4.isNodeSelection(selection)) {
|
|
56184
56184
|
currentChain.insertContentAt($originTo.pos, {
|
|
56185
56185
|
type: this.name
|
|
56186
56186
|
});
|
|
@@ -56216,7 +56216,7 @@ var require_dist36 = __commonJS({
|
|
|
56216
56216
|
},
|
|
56217
56217
|
addInputRules() {
|
|
56218
56218
|
return [
|
|
56219
|
-
|
|
56219
|
+
core4.nodeInputRule({
|
|
56220
56220
|
find: /^(?:---|—-|___\s|\*\*\*\s)$/,
|
|
56221
56221
|
type: this.type
|
|
56222
56222
|
})
|
|
@@ -56233,12 +56233,12 @@ var require_dist37 = __commonJS({
|
|
|
56233
56233
|
"node_modules/.pnpm/@tiptap+extension-italic@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-italic/dist/index.cjs"(exports2) {
|
|
56234
56234
|
"use strict";
|
|
56235
56235
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
56236
|
-
var
|
|
56236
|
+
var core4 = require_dist16();
|
|
56237
56237
|
var starInputRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/;
|
|
56238
56238
|
var starPasteRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g;
|
|
56239
56239
|
var underscoreInputRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/;
|
|
56240
56240
|
var underscorePasteRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g;
|
|
56241
|
-
var Italic =
|
|
56241
|
+
var Italic = core4.Mark.create({
|
|
56242
56242
|
name: "italic",
|
|
56243
56243
|
addOptions() {
|
|
56244
56244
|
return {
|
|
@@ -56264,7 +56264,7 @@ var require_dist37 = __commonJS({
|
|
|
56264
56264
|
];
|
|
56265
56265
|
},
|
|
56266
56266
|
renderHTML({ HTMLAttributes }) {
|
|
56267
|
-
return ["em",
|
|
56267
|
+
return ["em", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
56268
56268
|
},
|
|
56269
56269
|
addCommands() {
|
|
56270
56270
|
return {
|
|
@@ -56287,11 +56287,11 @@ var require_dist37 = __commonJS({
|
|
|
56287
56287
|
},
|
|
56288
56288
|
addInputRules() {
|
|
56289
56289
|
return [
|
|
56290
|
-
|
|
56290
|
+
core4.markInputRule({
|
|
56291
56291
|
find: starInputRegex,
|
|
56292
56292
|
type: this.type
|
|
56293
56293
|
}),
|
|
56294
|
-
|
|
56294
|
+
core4.markInputRule({
|
|
56295
56295
|
find: underscoreInputRegex,
|
|
56296
56296
|
type: this.type
|
|
56297
56297
|
})
|
|
@@ -56299,11 +56299,11 @@ var require_dist37 = __commonJS({
|
|
|
56299
56299
|
},
|
|
56300
56300
|
addPasteRules() {
|
|
56301
56301
|
return [
|
|
56302
|
-
|
|
56302
|
+
core4.markPasteRule({
|
|
56303
56303
|
find: starPasteRegex,
|
|
56304
56304
|
type: this.type
|
|
56305
56305
|
}),
|
|
56306
|
-
|
|
56306
|
+
core4.markPasteRule({
|
|
56307
56307
|
find: underscorePasteRegex,
|
|
56308
56308
|
type: this.type
|
|
56309
56309
|
})
|
|
@@ -56324,8 +56324,8 @@ var require_dist38 = __commonJS({
|
|
|
56324
56324
|
"node_modules/.pnpm/@tiptap+extension-paragraph@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-paragraph/dist/index.cjs"(exports2) {
|
|
56325
56325
|
"use strict";
|
|
56326
56326
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
56327
|
-
var
|
|
56328
|
-
var Paragraph =
|
|
56327
|
+
var core4 = require_dist16();
|
|
56328
|
+
var Paragraph = core4.Node.create({
|
|
56329
56329
|
name: "paragraph",
|
|
56330
56330
|
priority: 1e3,
|
|
56331
56331
|
addOptions() {
|
|
@@ -56341,7 +56341,7 @@ var require_dist38 = __commonJS({
|
|
|
56341
56341
|
];
|
|
56342
56342
|
},
|
|
56343
56343
|
renderHTML({ HTMLAttributes }) {
|
|
56344
|
-
return ["p",
|
|
56344
|
+
return ["p", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
56345
56345
|
},
|
|
56346
56346
|
addCommands() {
|
|
56347
56347
|
return {
|
|
@@ -56366,10 +56366,10 @@ var require_dist39 = __commonJS({
|
|
|
56366
56366
|
"node_modules/.pnpm/@tiptap+extension-strike@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-strike/dist/index.cjs"(exports2) {
|
|
56367
56367
|
"use strict";
|
|
56368
56368
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
56369
|
-
var
|
|
56369
|
+
var core4 = require_dist16();
|
|
56370
56370
|
var inputRegex = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/;
|
|
56371
56371
|
var pasteRegex = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g;
|
|
56372
|
-
var Strike =
|
|
56372
|
+
var Strike = core4.Mark.create({
|
|
56373
56373
|
name: "strike",
|
|
56374
56374
|
addOptions() {
|
|
56375
56375
|
return {
|
|
@@ -56395,7 +56395,7 @@ var require_dist39 = __commonJS({
|
|
|
56395
56395
|
];
|
|
56396
56396
|
},
|
|
56397
56397
|
renderHTML({ HTMLAttributes }) {
|
|
56398
|
-
return ["s",
|
|
56398
|
+
return ["s", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
56399
56399
|
},
|
|
56400
56400
|
addCommands() {
|
|
56401
56401
|
return {
|
|
@@ -56417,7 +56417,7 @@ var require_dist39 = __commonJS({
|
|
|
56417
56417
|
},
|
|
56418
56418
|
addInputRules() {
|
|
56419
56419
|
return [
|
|
56420
|
-
|
|
56420
|
+
core4.markInputRule({
|
|
56421
56421
|
find: inputRegex,
|
|
56422
56422
|
type: this.type
|
|
56423
56423
|
})
|
|
@@ -56425,7 +56425,7 @@ var require_dist39 = __commonJS({
|
|
|
56425
56425
|
},
|
|
56426
56426
|
addPasteRules() {
|
|
56427
56427
|
return [
|
|
56428
|
-
|
|
56428
|
+
core4.markPasteRule({
|
|
56429
56429
|
find: pasteRegex,
|
|
56430
56430
|
type: this.type
|
|
56431
56431
|
})
|
|
@@ -56444,8 +56444,8 @@ var require_dist40 = __commonJS({
|
|
|
56444
56444
|
"node_modules/.pnpm/@tiptap+extension-text@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-text/dist/index.cjs"(exports2) {
|
|
56445
56445
|
"use strict";
|
|
56446
56446
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
56447
|
-
var
|
|
56448
|
-
var Text =
|
|
56447
|
+
var core4 = require_dist16();
|
|
56448
|
+
var Text = core4.Node.create({
|
|
56449
56449
|
name: "text",
|
|
56450
56450
|
group: "inline"
|
|
56451
56451
|
});
|
|
@@ -57691,7 +57691,7 @@ var require_dist41 = __commonJS({
|
|
|
57691
57691
|
"node_modules/.pnpm/@tiptap+extension-link@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-link/dist/index.cjs"(exports2) {
|
|
57692
57692
|
"use strict";
|
|
57693
57693
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
57694
|
-
var
|
|
57694
|
+
var core4 = require_dist16();
|
|
57695
57695
|
var linkifyjs = require_linkify();
|
|
57696
57696
|
var state = require_dist5();
|
|
57697
57697
|
var UNICODE_WHITESPACE_PATTERN = "[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]";
|
|
@@ -57717,10 +57717,10 @@ var require_dist41 = __commonJS({
|
|
|
57717
57717
|
return;
|
|
57718
57718
|
}
|
|
57719
57719
|
const { tr } = newState;
|
|
57720
|
-
const transform4 =
|
|
57721
|
-
const changes =
|
|
57720
|
+
const transform4 = core4.combineTransactionSteps(oldState.doc, [...transactions]);
|
|
57721
|
+
const changes = core4.getChangedRanges(transform4);
|
|
57722
57722
|
changes.forEach(({ newRange }) => {
|
|
57723
|
-
const nodesInChangedRanges =
|
|
57723
|
+
const nodesInChangedRanges = core4.findChildrenInRange(newState.doc, newRange, (node) => node.isTextblock);
|
|
57724
57724
|
let textBlock;
|
|
57725
57725
|
let textBeforeWhitespace;
|
|
57726
57726
|
if (nodesInChangedRanges.length > 1) {
|
|
@@ -57758,7 +57758,7 @@ var require_dist41 = __commonJS({
|
|
|
57758
57758
|
}
|
|
57759
57759
|
return !newState.doc.rangeHasMark(link.from, link.to, newState.schema.marks.code);
|
|
57760
57760
|
}).filter((link) => options.validate(link.value)).filter((link) => options.shouldAutoLink(link.value)).forEach((link) => {
|
|
57761
|
-
if (
|
|
57761
|
+
if (core4.getMarksBetween(link.from, link.to, newState.doc).some((item) => item.mark.type === options.type)) {
|
|
57762
57762
|
return;
|
|
57763
57763
|
}
|
|
57764
57764
|
tr.addMark(link.from, link.to, options.type.create({
|
|
@@ -57795,7 +57795,7 @@ var require_dist41 = __commonJS({
|
|
|
57795
57795
|
if (!els.find((value5) => value5.nodeName === "A")) {
|
|
57796
57796
|
return false;
|
|
57797
57797
|
}
|
|
57798
|
-
const attrs =
|
|
57798
|
+
const attrs = core4.getAttributes(view.state, options.type.name);
|
|
57799
57799
|
const link = event.target;
|
|
57800
57800
|
const href = (_a2 = link === null || link === void 0 ? void 0 : link.href) !== null && _a2 !== void 0 ? _a2 : attrs.href;
|
|
57801
57801
|
const target = (_b = link === null || link === void 0 ? void 0 : link.target) !== null && _b !== void 0 ? _b : attrs.target;
|
|
@@ -57862,7 +57862,7 @@ var require_dist41 = __commonJS({
|
|
|
57862
57862
|
"i"
|
|
57863
57863
|
));
|
|
57864
57864
|
}
|
|
57865
|
-
var Link =
|
|
57865
|
+
var Link = core4.Mark.create({
|
|
57866
57866
|
name: "link",
|
|
57867
57867
|
priority: 1e3,
|
|
57868
57868
|
keepOnSplit: false,
|
|
@@ -57948,11 +57948,11 @@ var require_dist41 = __commonJS({
|
|
|
57948
57948
|
})) {
|
|
57949
57949
|
return [
|
|
57950
57950
|
"a",
|
|
57951
|
-
|
|
57951
|
+
core4.mergeAttributes(this.options.HTMLAttributes, { ...HTMLAttributes, href: "" }),
|
|
57952
57952
|
0
|
|
57953
57953
|
];
|
|
57954
57954
|
}
|
|
57955
|
-
return ["a",
|
|
57955
|
+
return ["a", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
57956
57956
|
},
|
|
57957
57957
|
addCommands() {
|
|
57958
57958
|
return {
|
|
@@ -57985,7 +57985,7 @@ var require_dist41 = __commonJS({
|
|
|
57985
57985
|
},
|
|
57986
57986
|
addPasteRules() {
|
|
57987
57987
|
return [
|
|
57988
|
-
|
|
57988
|
+
core4.markPasteRule({
|
|
57989
57989
|
find: (text) => {
|
|
57990
57990
|
const foundLinks = [];
|
|
57991
57991
|
if (text) {
|
|
@@ -58059,96 +58059,96 @@ var require_dist42 = __commonJS({
|
|
|
58059
58059
|
"node_modules/.pnpm/@tiptap+extension-typography@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-typography/dist/index.cjs"(exports2) {
|
|
58060
58060
|
"use strict";
|
|
58061
58061
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
58062
|
-
var
|
|
58063
|
-
var emDash = (override) =>
|
|
58062
|
+
var core4 = require_dist16();
|
|
58063
|
+
var emDash = (override) => core4.textInputRule({
|
|
58064
58064
|
find: /--$/,
|
|
58065
58065
|
replace: override !== null && override !== void 0 ? override : "\u2014"
|
|
58066
58066
|
});
|
|
58067
|
-
var ellipsis = (override) =>
|
|
58067
|
+
var ellipsis = (override) => core4.textInputRule({
|
|
58068
58068
|
find: /\.\.\.$/,
|
|
58069
58069
|
replace: override !== null && override !== void 0 ? override : "\u2026"
|
|
58070
58070
|
});
|
|
58071
|
-
var openDoubleQuote = (override) =>
|
|
58071
|
+
var openDoubleQuote = (override) => core4.textInputRule({
|
|
58072
58072
|
find: /(?:^|[\s{[(<'"\u2018\u201C])(")$/,
|
|
58073
58073
|
replace: override !== null && override !== void 0 ? override : "\u201C"
|
|
58074
58074
|
});
|
|
58075
|
-
var closeDoubleQuote = (override) =>
|
|
58075
|
+
var closeDoubleQuote = (override) => core4.textInputRule({
|
|
58076
58076
|
find: /"$/,
|
|
58077
58077
|
replace: override !== null && override !== void 0 ? override : "\u201D"
|
|
58078
58078
|
});
|
|
58079
|
-
var openSingleQuote = (override) =>
|
|
58079
|
+
var openSingleQuote = (override) => core4.textInputRule({
|
|
58080
58080
|
find: /(?:^|[\s{[(<'"\u2018\u201C])(')$/,
|
|
58081
58081
|
replace: override !== null && override !== void 0 ? override : "\u2018"
|
|
58082
58082
|
});
|
|
58083
|
-
var closeSingleQuote = (override) =>
|
|
58083
|
+
var closeSingleQuote = (override) => core4.textInputRule({
|
|
58084
58084
|
find: /'$/,
|
|
58085
58085
|
replace: override !== null && override !== void 0 ? override : "\u2019"
|
|
58086
58086
|
});
|
|
58087
|
-
var leftArrow = (override) =>
|
|
58087
|
+
var leftArrow = (override) => core4.textInputRule({
|
|
58088
58088
|
find: /<-$/,
|
|
58089
58089
|
replace: override !== null && override !== void 0 ? override : "\u2190"
|
|
58090
58090
|
});
|
|
58091
|
-
var rightArrow = (override) =>
|
|
58091
|
+
var rightArrow = (override) => core4.textInputRule({
|
|
58092
58092
|
find: /->$/,
|
|
58093
58093
|
replace: override !== null && override !== void 0 ? override : "\u2192"
|
|
58094
58094
|
});
|
|
58095
|
-
var copyright = (override) =>
|
|
58095
|
+
var copyright = (override) => core4.textInputRule({
|
|
58096
58096
|
find: /\(c\)$/,
|
|
58097
58097
|
replace: override !== null && override !== void 0 ? override : "\xA9"
|
|
58098
58098
|
});
|
|
58099
|
-
var trademark = (override) =>
|
|
58099
|
+
var trademark = (override) => core4.textInputRule({
|
|
58100
58100
|
find: /\(tm\)$/,
|
|
58101
58101
|
replace: override !== null && override !== void 0 ? override : "\u2122"
|
|
58102
58102
|
});
|
|
58103
|
-
var servicemark = (override) =>
|
|
58103
|
+
var servicemark = (override) => core4.textInputRule({
|
|
58104
58104
|
find: /\(sm\)$/,
|
|
58105
58105
|
replace: override !== null && override !== void 0 ? override : "\u2120"
|
|
58106
58106
|
});
|
|
58107
|
-
var registeredTrademark = (override) =>
|
|
58107
|
+
var registeredTrademark = (override) => core4.textInputRule({
|
|
58108
58108
|
find: /\(r\)$/,
|
|
58109
58109
|
replace: override !== null && override !== void 0 ? override : "\xAE"
|
|
58110
58110
|
});
|
|
58111
|
-
var oneHalf = (override) =>
|
|
58111
|
+
var oneHalf = (override) => core4.textInputRule({
|
|
58112
58112
|
find: /(?:^|\s)(1\/2)\s$/,
|
|
58113
58113
|
replace: override !== null && override !== void 0 ? override : "\xBD"
|
|
58114
58114
|
});
|
|
58115
|
-
var plusMinus = (override) =>
|
|
58115
|
+
var plusMinus = (override) => core4.textInputRule({
|
|
58116
58116
|
find: /\+\/-$/,
|
|
58117
58117
|
replace: override !== null && override !== void 0 ? override : "\xB1"
|
|
58118
58118
|
});
|
|
58119
|
-
var notEqual = (override) =>
|
|
58119
|
+
var notEqual = (override) => core4.textInputRule({
|
|
58120
58120
|
find: /!=$/,
|
|
58121
58121
|
replace: override !== null && override !== void 0 ? override : "\u2260"
|
|
58122
58122
|
});
|
|
58123
|
-
var laquo = (override) =>
|
|
58123
|
+
var laquo = (override) => core4.textInputRule({
|
|
58124
58124
|
find: /<<$/,
|
|
58125
58125
|
replace: override !== null && override !== void 0 ? override : "\xAB"
|
|
58126
58126
|
});
|
|
58127
|
-
var raquo = (override) =>
|
|
58127
|
+
var raquo = (override) => core4.textInputRule({
|
|
58128
58128
|
find: />>$/,
|
|
58129
58129
|
replace: override !== null && override !== void 0 ? override : "\xBB"
|
|
58130
58130
|
});
|
|
58131
|
-
var multiplication = (override) =>
|
|
58131
|
+
var multiplication = (override) => core4.textInputRule({
|
|
58132
58132
|
find: /\d+\s?([*x])\s?\d+$/,
|
|
58133
58133
|
replace: override !== null && override !== void 0 ? override : "\xD7"
|
|
58134
58134
|
});
|
|
58135
|
-
var superscriptTwo = (override) =>
|
|
58135
|
+
var superscriptTwo = (override) => core4.textInputRule({
|
|
58136
58136
|
find: /\^2$/,
|
|
58137
58137
|
replace: override !== null && override !== void 0 ? override : "\xB2"
|
|
58138
58138
|
});
|
|
58139
|
-
var superscriptThree = (override) =>
|
|
58139
|
+
var superscriptThree = (override) => core4.textInputRule({
|
|
58140
58140
|
find: /\^3$/,
|
|
58141
58141
|
replace: override !== null && override !== void 0 ? override : "\xB3"
|
|
58142
58142
|
});
|
|
58143
|
-
var oneQuarter = (override) =>
|
|
58143
|
+
var oneQuarter = (override) => core4.textInputRule({
|
|
58144
58144
|
find: /(?:^|\s)(1\/4)\s$/,
|
|
58145
58145
|
replace: override !== null && override !== void 0 ? override : "\xBC"
|
|
58146
58146
|
});
|
|
58147
|
-
var threeQuarters = (override) =>
|
|
58147
|
+
var threeQuarters = (override) => core4.textInputRule({
|
|
58148
58148
|
find: /(?:^|\s)(3\/4)\s$/,
|
|
58149
58149
|
replace: override !== null && override !== void 0 ? override : "\xBE"
|
|
58150
58150
|
});
|
|
58151
|
-
var Typography =
|
|
58151
|
+
var Typography = core4.Extension.create({
|
|
58152
58152
|
name: "typography",
|
|
58153
58153
|
addOptions() {
|
|
58154
58154
|
return {
|
|
@@ -58279,8 +58279,8 @@ var require_dist43 = __commonJS({
|
|
|
58279
58279
|
"node_modules/.pnpm/@tiptap+extension-underline@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-underline/dist/index.cjs"(exports2) {
|
|
58280
58280
|
"use strict";
|
|
58281
58281
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
58282
|
-
var
|
|
58283
|
-
var Underline =
|
|
58282
|
+
var core4 = require_dist16();
|
|
58283
|
+
var Underline = core4.Mark.create({
|
|
58284
58284
|
name: "underline",
|
|
58285
58285
|
addOptions() {
|
|
58286
58286
|
return {
|
|
@@ -58300,7 +58300,7 @@ var require_dist43 = __commonJS({
|
|
|
58300
58300
|
];
|
|
58301
58301
|
},
|
|
58302
58302
|
renderHTML({ HTMLAttributes }) {
|
|
58303
|
-
return ["u",
|
|
58303
|
+
return ["u", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
58304
58304
|
},
|
|
58305
58305
|
addCommands() {
|
|
58306
58306
|
return {
|
|
@@ -58332,11 +58332,11 @@ var require_dist44 = __commonJS({
|
|
|
58332
58332
|
"node_modules/.pnpm/@tiptap+extension-bullet-list@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-bullet-list/dist/index.cjs"(exports2) {
|
|
58333
58333
|
"use strict";
|
|
58334
58334
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
58335
|
-
var
|
|
58335
|
+
var core4 = require_dist16();
|
|
58336
58336
|
var ListItemName = "listItem";
|
|
58337
58337
|
var TextStyleName = "textStyle";
|
|
58338
58338
|
var inputRegex = /^\s*([-+*])\s$/;
|
|
58339
|
-
var BulletList =
|
|
58339
|
+
var BulletList = core4.Node.create({
|
|
58340
58340
|
name: "bulletList",
|
|
58341
58341
|
addOptions() {
|
|
58342
58342
|
return {
|
|
@@ -58356,7 +58356,7 @@ var require_dist44 = __commonJS({
|
|
|
58356
58356
|
];
|
|
58357
58357
|
},
|
|
58358
58358
|
renderHTML({ HTMLAttributes }) {
|
|
58359
|
-
return ["ul",
|
|
58359
|
+
return ["ul", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
58360
58360
|
},
|
|
58361
58361
|
addCommands() {
|
|
58362
58362
|
return {
|
|
@@ -58374,12 +58374,12 @@ var require_dist44 = __commonJS({
|
|
|
58374
58374
|
};
|
|
58375
58375
|
},
|
|
58376
58376
|
addInputRules() {
|
|
58377
|
-
let inputRule =
|
|
58377
|
+
let inputRule = core4.wrappingInputRule({
|
|
58378
58378
|
find: inputRegex,
|
|
58379
58379
|
type: this.type
|
|
58380
58380
|
});
|
|
58381
58381
|
if (this.options.keepMarks || this.options.keepAttributes) {
|
|
58382
|
-
inputRule =
|
|
58382
|
+
inputRule = core4.wrappingInputRule({
|
|
58383
58383
|
find: inputRegex,
|
|
58384
58384
|
type: this.type,
|
|
58385
58385
|
keepMarks: this.options.keepMarks,
|
|
@@ -58406,8 +58406,8 @@ var require_dist45 = __commonJS({
|
|
|
58406
58406
|
"node_modules/.pnpm/@tiptap+extension-list-item@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-list-item/dist/index.cjs"(exports2) {
|
|
58407
58407
|
"use strict";
|
|
58408
58408
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
58409
|
-
var
|
|
58410
|
-
var ListItem =
|
|
58409
|
+
var core4 = require_dist16();
|
|
58410
|
+
var ListItem = core4.Node.create({
|
|
58411
58411
|
name: "listItem",
|
|
58412
58412
|
addOptions() {
|
|
58413
58413
|
return {
|
|
@@ -58426,7 +58426,7 @@ var require_dist45 = __commonJS({
|
|
|
58426
58426
|
];
|
|
58427
58427
|
},
|
|
58428
58428
|
renderHTML({ HTMLAttributes }) {
|
|
58429
|
-
return ["li",
|
|
58429
|
+
return ["li", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
58430
58430
|
},
|
|
58431
58431
|
addKeyboardShortcuts() {
|
|
58432
58432
|
return {
|
|
@@ -58446,11 +58446,11 @@ var require_dist46 = __commonJS({
|
|
|
58446
58446
|
"node_modules/.pnpm/@tiptap+extension-ordered-list@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-ordered-list/dist/index.cjs"(exports2) {
|
|
58447
58447
|
"use strict";
|
|
58448
58448
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
58449
|
-
var
|
|
58449
|
+
var core4 = require_dist16();
|
|
58450
58450
|
var ListItemName = "listItem";
|
|
58451
58451
|
var TextStyleName = "textStyle";
|
|
58452
58452
|
var inputRegex = /^(\d+)\.\s$/;
|
|
58453
|
-
var OrderedList =
|
|
58453
|
+
var OrderedList = core4.Node.create({
|
|
58454
58454
|
name: "orderedList",
|
|
58455
58455
|
addOptions() {
|
|
58456
58456
|
return {
|
|
@@ -58487,7 +58487,7 @@ var require_dist46 = __commonJS({
|
|
|
58487
58487
|
},
|
|
58488
58488
|
renderHTML({ HTMLAttributes }) {
|
|
58489
58489
|
const { start: start3, ...attributesWithoutStart } = HTMLAttributes;
|
|
58490
|
-
return start3 === 1 ? ["ol",
|
|
58490
|
+
return start3 === 1 ? ["ol", core4.mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart), 0] : ["ol", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
58491
58491
|
},
|
|
58492
58492
|
addCommands() {
|
|
58493
58493
|
return {
|
|
@@ -58505,14 +58505,14 @@ var require_dist46 = __commonJS({
|
|
|
58505
58505
|
};
|
|
58506
58506
|
},
|
|
58507
58507
|
addInputRules() {
|
|
58508
|
-
let inputRule =
|
|
58508
|
+
let inputRule = core4.wrappingInputRule({
|
|
58509
58509
|
find: inputRegex,
|
|
58510
58510
|
type: this.type,
|
|
58511
58511
|
getAttributes: (match16) => ({ start: +match16[1] }),
|
|
58512
58512
|
joinPredicate: (match16, node) => node.childCount + node.attrs.start === +match16[1]
|
|
58513
58513
|
});
|
|
58514
58514
|
if (this.options.keepMarks || this.options.keepAttributes) {
|
|
58515
|
-
inputRule =
|
|
58515
|
+
inputRule = core4.wrappingInputRule({
|
|
58516
58516
|
find: inputRegex,
|
|
58517
58517
|
type: this.type,
|
|
58518
58518
|
keepMarks: this.options.keepMarks,
|
|
@@ -58538,8 +58538,8 @@ var require_dist47 = __commonJS({
|
|
|
58538
58538
|
"node_modules/.pnpm/@tiptap+extension-text-align@2.11.9_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-text-align/dist/index.cjs"(exports2) {
|
|
58539
58539
|
"use strict";
|
|
58540
58540
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
58541
|
-
var
|
|
58542
|
-
var TextAlign =
|
|
58541
|
+
var core4 = require_dist16();
|
|
58542
|
+
var TextAlign = core4.Extension.create({
|
|
58543
58543
|
name: "textAlign",
|
|
58544
58544
|
addOptions() {
|
|
58545
58545
|
return {
|
|
@@ -60861,7 +60861,7 @@ var require_dist50 = __commonJS({
|
|
|
60861
60861
|
"node_modules/.pnpm/@tiptap+extension-table@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/extension-table/dist/index.cjs"(exports2) {
|
|
60862
60862
|
"use strict";
|
|
60863
60863
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
60864
|
-
var
|
|
60864
|
+
var core4 = require_dist16();
|
|
60865
60865
|
var state = require_dist5();
|
|
60866
60866
|
var tables = require_dist49();
|
|
60867
60867
|
function getColStyleDeclaration(minWidth, width) {
|
|
@@ -61016,7 +61016,7 @@ var require_dist50 = __commonJS({
|
|
|
61016
61016
|
return false;
|
|
61017
61017
|
}
|
|
61018
61018
|
let cellCount = 0;
|
|
61019
|
-
const table =
|
|
61019
|
+
const table = core4.findParentNodeClosestToPos(selection.ranges[0].$from, (node) => {
|
|
61020
61020
|
return node.type.name === "table";
|
|
61021
61021
|
});
|
|
61022
61022
|
table === null || table === void 0 ? void 0 : table.node.descendants((node) => {
|
|
@@ -61034,7 +61034,7 @@ var require_dist50 = __commonJS({
|
|
|
61034
61034
|
editor.commands.deleteTable();
|
|
61035
61035
|
return true;
|
|
61036
61036
|
};
|
|
61037
|
-
var Table =
|
|
61037
|
+
var Table = core4.Node.create({
|
|
61038
61038
|
name: "table",
|
|
61039
61039
|
// @ts-ignore
|
|
61040
61040
|
addOptions() {
|
|
@@ -61061,7 +61061,7 @@ var require_dist50 = __commonJS({
|
|
|
61061
61061
|
const { colgroup, tableWidth, tableMinWidth } = createColGroup(node, this.options.cellMinWidth);
|
|
61062
61062
|
const table = [
|
|
61063
61063
|
"table",
|
|
61064
|
-
|
|
61064
|
+
core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {
|
|
61065
61065
|
style: tableWidth ? `width: ${tableWidth}` : `min-width: ${tableMinWidth}`
|
|
61066
61066
|
}),
|
|
61067
61067
|
colgroup,
|
|
@@ -61187,7 +61187,7 @@ var require_dist50 = __commonJS({
|
|
|
61187
61187
|
storage: extension.storage
|
|
61188
61188
|
};
|
|
61189
61189
|
return {
|
|
61190
|
-
tableRole:
|
|
61190
|
+
tableRole: core4.callOrReturn(core4.getExtensionField(extension, "tableRole", context6))
|
|
61191
61191
|
};
|
|
61192
61192
|
}
|
|
61193
61193
|
});
|
|
@@ -61205,8 +61205,8 @@ var require_dist51 = __commonJS({
|
|
|
61205
61205
|
"node_modules/.pnpm/@tiptap+extension-table-cell@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-table-cell/dist/index.cjs"(exports2) {
|
|
61206
61206
|
"use strict";
|
|
61207
61207
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
61208
|
-
var
|
|
61209
|
-
var TableCell =
|
|
61208
|
+
var core4 = require_dist16();
|
|
61209
|
+
var TableCell = core4.Node.create({
|
|
61210
61210
|
name: "tableCell",
|
|
61211
61211
|
addOptions() {
|
|
61212
61212
|
return {
|
|
@@ -61240,7 +61240,7 @@ var require_dist51 = __commonJS({
|
|
|
61240
61240
|
];
|
|
61241
61241
|
},
|
|
61242
61242
|
renderHTML({ HTMLAttributes }) {
|
|
61243
|
-
return ["td",
|
|
61243
|
+
return ["td", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
61244
61244
|
}
|
|
61245
61245
|
});
|
|
61246
61246
|
exports2.TableCell = TableCell;
|
|
@@ -61253,8 +61253,8 @@ var require_dist52 = __commonJS({
|
|
|
61253
61253
|
"node_modules/.pnpm/@tiptap+extension-table-header@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-table-header/dist/index.cjs"(exports2) {
|
|
61254
61254
|
"use strict";
|
|
61255
61255
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
61256
|
-
var
|
|
61257
|
-
var TableHeader =
|
|
61256
|
+
var core4 = require_dist16();
|
|
61257
|
+
var TableHeader = core4.Node.create({
|
|
61258
61258
|
name: "tableHeader",
|
|
61259
61259
|
addOptions() {
|
|
61260
61260
|
return {
|
|
@@ -61288,7 +61288,7 @@ var require_dist52 = __commonJS({
|
|
|
61288
61288
|
];
|
|
61289
61289
|
},
|
|
61290
61290
|
renderHTML({ HTMLAttributes }) {
|
|
61291
|
-
return ["th",
|
|
61291
|
+
return ["th", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
61292
61292
|
}
|
|
61293
61293
|
});
|
|
61294
61294
|
exports2.TableHeader = TableHeader;
|
|
@@ -61301,8 +61301,8 @@ var require_dist53 = __commonJS({
|
|
|
61301
61301
|
"node_modules/.pnpm/@tiptap+extension-table-row@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-table-row/dist/index.cjs"(exports2) {
|
|
61302
61302
|
"use strict";
|
|
61303
61303
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
61304
|
-
var
|
|
61305
|
-
var TableRow =
|
|
61304
|
+
var core4 = require_dist16();
|
|
61305
|
+
var TableRow = core4.Node.create({
|
|
61306
61306
|
name: "tableRow",
|
|
61307
61307
|
addOptions() {
|
|
61308
61308
|
return {
|
|
@@ -61317,7 +61317,7 @@ var require_dist53 = __commonJS({
|
|
|
61317
61317
|
];
|
|
61318
61318
|
},
|
|
61319
61319
|
renderHTML({ HTMLAttributes }) {
|
|
61320
|
-
return ["tr",
|
|
61320
|
+
return ["tr", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
61321
61321
|
}
|
|
61322
61322
|
});
|
|
61323
61323
|
exports2.TableRow = TableRow;
|
|
@@ -61622,10 +61622,10 @@ var require_dist54 = __commonJS({
|
|
|
61622
61622
|
"node_modules/.pnpm/@tiptap+extension-code@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2_/node_modules/@tiptap/extension-code/dist/index.cjs"(exports2) {
|
|
61623
61623
|
"use strict";
|
|
61624
61624
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
61625
|
-
var
|
|
61625
|
+
var core4 = require_dist16();
|
|
61626
61626
|
var inputRegex = /(^|[^`])`([^`]+)`(?!`)/;
|
|
61627
61627
|
var pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g;
|
|
61628
|
-
var Code =
|
|
61628
|
+
var Code = core4.Mark.create({
|
|
61629
61629
|
name: "code",
|
|
61630
61630
|
addOptions() {
|
|
61631
61631
|
return {
|
|
@@ -61641,7 +61641,7 @@ var require_dist54 = __commonJS({
|
|
|
61641
61641
|
];
|
|
61642
61642
|
},
|
|
61643
61643
|
renderHTML({ HTMLAttributes }) {
|
|
61644
|
-
return ["code",
|
|
61644
|
+
return ["code", core4.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
61645
61645
|
},
|
|
61646
61646
|
addCommands() {
|
|
61647
61647
|
return {
|
|
@@ -61663,7 +61663,7 @@ var require_dist54 = __commonJS({
|
|
|
61663
61663
|
},
|
|
61664
61664
|
addInputRules() {
|
|
61665
61665
|
return [
|
|
61666
|
-
|
|
61666
|
+
core4.markInputRule({
|
|
61667
61667
|
find: inputRegex,
|
|
61668
61668
|
type: this.type
|
|
61669
61669
|
})
|
|
@@ -61671,7 +61671,7 @@ var require_dist54 = __commonJS({
|
|
|
61671
61671
|
},
|
|
61672
61672
|
addPasteRules() {
|
|
61673
61673
|
return [
|
|
61674
|
-
|
|
61674
|
+
core4.markPasteRule({
|
|
61675
61675
|
find: pasteRegex,
|
|
61676
61676
|
type: this.type
|
|
61677
61677
|
})
|
|
@@ -66045,7 +66045,7 @@ ${handleChildren().trim()}
|
|
|
66045
66045
|
var require_dist55 = __commonJS({
|
|
66046
66046
|
"node_modules/.pnpm/@tiptap+html@2.27.2_@tiptap+core@2.27.2_@tiptap+pm@2.27.2__@tiptap+pm@2.27.2/node_modules/@tiptap/html/dist/index.cjs"(exports2) {
|
|
66047
66047
|
"use strict";
|
|
66048
|
-
var
|
|
66048
|
+
var core4 = require_dist16();
|
|
66049
66049
|
var model = require_dist10();
|
|
66050
66050
|
var zeedDom = require_index_browser();
|
|
66051
66051
|
function getHTMLFromFragment(doc, schema, options) {
|
|
@@ -66055,12 +66055,12 @@ var require_dist55 = __commonJS({
|
|
|
66055
66055
|
return zeedDocument.render();
|
|
66056
66056
|
}
|
|
66057
66057
|
function generateHTML(doc, extensions) {
|
|
66058
|
-
const schema =
|
|
66058
|
+
const schema = core4.getSchema(extensions);
|
|
66059
66059
|
const contentNode = model.Node.fromJSON(schema, doc);
|
|
66060
66060
|
return getHTMLFromFragment(contentNode, schema);
|
|
66061
66061
|
}
|
|
66062
66062
|
function generateJSON(html, extensions, options) {
|
|
66063
|
-
const schema =
|
|
66063
|
+
const schema = core4.getSchema(extensions);
|
|
66064
66064
|
const dom = zeedDom.parseHTML(html);
|
|
66065
66065
|
return model.DOMParser.fromSchema(schema).parse(dom, options).toJSON();
|
|
66066
66066
|
}
|
|
@@ -81609,7 +81609,7 @@ var require_connection2 = __commonJS({
|
|
|
81609
81609
|
});
|
|
81610
81610
|
module2.exports = __toCommonJS2(connection_exports);
|
|
81611
81611
|
var import_analytics = require_lib2();
|
|
81612
|
-
var
|
|
81612
|
+
var import_client11 = __toESM2(require_lib6());
|
|
81613
81613
|
var import_core22 = __toESM2(require_lib4());
|
|
81614
81614
|
var import_platform = __toESM2(require_lib());
|
|
81615
81615
|
var import_rpc = require_lib18();
|
|
@@ -81720,7 +81720,7 @@ var require_connection2 = __commonJS({
|
|
|
81720
81720
|
}
|
|
81721
81721
|
if (!this.closed) {
|
|
81722
81722
|
void this.sendRequest({
|
|
81723
|
-
method:
|
|
81723
|
+
method: import_client11.pingConst,
|
|
81724
81724
|
params: [],
|
|
81725
81725
|
once: true,
|
|
81726
81726
|
handleResult: /* @__PURE__ */ __name(async (result) => {
|
|
@@ -81753,7 +81753,7 @@ var require_connection2 = __commonJS({
|
|
|
81753
81753
|
}
|
|
81754
81754
|
}
|
|
81755
81755
|
isConnected() {
|
|
81756
|
-
return this.websocket != null && this.websocket.readyState ===
|
|
81756
|
+
return this.websocket != null && this.websocket.readyState === import_client11.ClientSocketReadyState.OPEN && this.helloReceived;
|
|
81757
81757
|
}
|
|
81758
81758
|
delay = 0;
|
|
81759
81759
|
onConnectHandlers = [];
|
|
@@ -81893,8 +81893,8 @@ var require_connection2 = __commonJS({
|
|
|
81893
81893
|
}
|
|
81894
81894
|
return;
|
|
81895
81895
|
}
|
|
81896
|
-
if (resp.result ===
|
|
81897
|
-
void this.sendRequest({ method:
|
|
81896
|
+
if (resp.result === import_client11.pingConst) {
|
|
81897
|
+
void this.sendRequest({ method: import_client11.pingConst, params: [] }).catch((err) => {
|
|
81898
81898
|
this.ctx.error("failed to send ping", { err });
|
|
81899
81899
|
});
|
|
81900
81900
|
return;
|
|
@@ -81986,15 +81986,15 @@ var require_connection2 = __commonJS({
|
|
|
81986
81986
|
}
|
|
81987
81987
|
}
|
|
81988
81988
|
checkArrayBufferPing(data) {
|
|
81989
|
-
if (data.byteLength ===
|
|
81989
|
+
if (data.byteLength === import_client11.pingConst.length || data.byteLength === import_client11.pongConst.length) {
|
|
81990
81990
|
const text = new TextDecoder().decode(data);
|
|
81991
|
-
if (text ===
|
|
81992
|
-
void this.sendRequest({ method:
|
|
81991
|
+
if (text === import_client11.pingConst) {
|
|
81992
|
+
void this.sendRequest({ method: import_client11.pingConst, params: [] }).catch((err) => {
|
|
81993
81993
|
this.ctx.error("failed to send ping", { err });
|
|
81994
81994
|
});
|
|
81995
81995
|
return true;
|
|
81996
81996
|
}
|
|
81997
|
-
if (text ===
|
|
81997
|
+
if (text === import_client11.pongConst) {
|
|
81998
81998
|
this.pingResponse = Date.now();
|
|
81999
81999
|
return true;
|
|
82000
82000
|
}
|
|
@@ -82004,7 +82004,7 @@ var require_connection2 = __commonJS({
|
|
|
82004
82004
|
openConnection(ctx, socketId) {
|
|
82005
82005
|
this.binaryMode = false;
|
|
82006
82006
|
this.helloReceived = false;
|
|
82007
|
-
const clientSocketFactory = this.opt?.socketFactory ?? (0, import_platform.getMetadata)(
|
|
82007
|
+
const clientSocketFactory = this.opt?.socketFactory ?? (0, import_platform.getMetadata)(import_client11.default.metadata.ClientSocketFactory) ?? ((url4) => {
|
|
82008
82008
|
const s = new WebSocket(url4);
|
|
82009
82009
|
return s;
|
|
82010
82010
|
});
|
|
@@ -82039,12 +82039,12 @@ var require_connection2 = __commonJS({
|
|
|
82039
82039
|
if (this.websocket !== wsocket) {
|
|
82040
82040
|
return;
|
|
82041
82041
|
}
|
|
82042
|
-
if (event.data ===
|
|
82042
|
+
if (event.data === import_client11.pongConst) {
|
|
82043
82043
|
this.pingResponse = Date.now();
|
|
82044
82044
|
return;
|
|
82045
82045
|
}
|
|
82046
|
-
if (event.data ===
|
|
82047
|
-
void this.sendRequest({ method:
|
|
82046
|
+
if (event.data === import_client11.pingConst) {
|
|
82047
|
+
void this.sendRequest({ method: import_client11.pingConst, params: [] }).catch((err) => {
|
|
82048
82048
|
this.ctx.error("failed to send ping", { err });
|
|
82049
82049
|
});
|
|
82050
82050
|
return;
|
|
@@ -82109,8 +82109,8 @@ var require_connection2 = __commonJS({
|
|
|
82109
82109
|
if (this.websocket !== wsocket) {
|
|
82110
82110
|
return;
|
|
82111
82111
|
}
|
|
82112
|
-
const useBinary = this.opt?.useBinaryProtocol ?? (0, import_platform.getMetadata)(
|
|
82113
|
-
this.compressionMode = this.opt?.useProtocolCompression ?? (0, import_platform.getMetadata)(
|
|
82112
|
+
const useBinary = this.opt?.useBinaryProtocol ?? (0, import_platform.getMetadata)(import_client11.default.metadata.UseBinaryProtocol) ?? true;
|
|
82113
|
+
this.compressionMode = this.opt?.useProtocolCompression ?? (0, import_platform.getMetadata)(import_client11.default.metadata.UseProtocolCompression) ?? false;
|
|
82114
82114
|
const helloRequest = {
|
|
82115
82115
|
method: "hello",
|
|
82116
82116
|
params: [],
|
|
@@ -82156,13 +82156,13 @@ var require_connection2 = __commonJS({
|
|
|
82156
82156
|
if (w instanceof Promise) {
|
|
82157
82157
|
await w;
|
|
82158
82158
|
}
|
|
82159
|
-
if (data.method !==
|
|
82159
|
+
if (data.method !== import_client11.pingConst) {
|
|
82160
82160
|
this.requests.set(id, promise4);
|
|
82161
82161
|
}
|
|
82162
82162
|
promise4.sendData = () => {
|
|
82163
|
-
if (this.websocket?.readyState ===
|
|
82163
|
+
if (this.websocket?.readyState === import_client11.ClientSocketReadyState.OPEN) {
|
|
82164
82164
|
promise4.startTime = Date.now();
|
|
82165
|
-
if (data.method !==
|
|
82165
|
+
if (data.method !== import_client11.pingConst) {
|
|
82166
82166
|
const dta = this.rpcHandler.serialize(
|
|
82167
82167
|
{
|
|
82168
82168
|
method: data.method,
|
|
@@ -82175,7 +82175,7 @@ var require_connection2 = __commonJS({
|
|
|
82175
82175
|
);
|
|
82176
82176
|
this.websocket?.send(dta);
|
|
82177
82177
|
} else {
|
|
82178
|
-
this.websocket?.send(
|
|
82178
|
+
this.websocket?.send(import_client11.pingConst);
|
|
82179
82179
|
}
|
|
82180
82180
|
}
|
|
82181
82181
|
};
|
|
@@ -82189,7 +82189,7 @@ var require_connection2 = __commonJS({
|
|
|
82189
82189
|
};
|
|
82190
82190
|
}
|
|
82191
82191
|
promise4.sendData();
|
|
82192
|
-
if (data.method !==
|
|
82192
|
+
if (data.method !== import_client11.pingConst) {
|
|
82193
82193
|
return await promise4.promise;
|
|
82194
82194
|
}
|
|
82195
82195
|
},
|
|
@@ -82355,7 +82355,7 @@ var require_lib19 = __commonJS({
|
|
|
82355
82355
|
default: () => index_default
|
|
82356
82356
|
});
|
|
82357
82357
|
module2.exports = __toCommonJS2(index_exports2);
|
|
82358
|
-
var
|
|
82358
|
+
var import_client11 = __toESM2(require_lib6());
|
|
82359
82359
|
var import_core22 = __toESM2(require_lib4());
|
|
82360
82360
|
var import_platform = __toESM2(require_lib());
|
|
82361
82361
|
var import_connection = require_connection2();
|
|
@@ -82399,8 +82399,8 @@ var require_lib19 = __commonJS({
|
|
|
82399
82399
|
return {
|
|
82400
82400
|
function: {
|
|
82401
82401
|
GetClient: /* @__PURE__ */ __name(async (token, endpoint, opt) => {
|
|
82402
|
-
const filterModel = (0, import_platform.getMetadata)(
|
|
82403
|
-
const extraFilter = (0, import_platform.getMetadata)(
|
|
82402
|
+
const filterModel = (0, import_platform.getMetadata)(import_client11.default.metadata.FilterModel) ?? "none";
|
|
82403
|
+
const extraFilter = (0, import_platform.getMetadata)(import_client11.default.metadata.ExtraFilter) ?? [];
|
|
82404
82404
|
const handler = /* @__PURE__ */ __name(async (handler2) => {
|
|
82405
82405
|
const url4 = (0, import_core22.concatLink)(endpoint, `/${token}`);
|
|
82406
82406
|
const upgradeHandler = /* @__PURE__ */ __name((...txes) => {
|
|
@@ -82428,7 +82428,7 @@ var require_lib19 = __commonJS({
|
|
|
82428
82428
|
throw new Error("Workspace or account not found in token");
|
|
82429
82429
|
}
|
|
82430
82430
|
const newOpt = { ...opt };
|
|
82431
|
-
const connectTimeout = opt?.connectionTimeout ?? (0, import_platform.getMetadata)(
|
|
82431
|
+
const connectTimeout = opt?.connectionTimeout ?? (0, import_platform.getMetadata)(import_client11.default.metadata.ConnectionTimeout);
|
|
82432
82432
|
let connectPromise;
|
|
82433
82433
|
if ((connectTimeout ?? 0) > 0) {
|
|
82434
82434
|
connectPromise = new Promise((resolve2, reject) => {
|
|
@@ -82480,7 +82480,7 @@ var require_lib19 = __commonJS({
|
|
|
82480
82480
|
function returnUITxes(txes, extraFilter) {
|
|
82481
82481
|
const configs = /* @__PURE__ */ new Map();
|
|
82482
82482
|
(0, import_core22.fillConfiguration)(txes, configs);
|
|
82483
|
-
const allowedPlugins = [...(0, import_platform.getPlugins)(), ...(0, import_platform.getMetadata)(
|
|
82483
|
+
const allowedPlugins = [...(0, import_platform.getPlugins)(), ...(0, import_platform.getMetadata)(import_client11.default.metadata.ExtraPlugins) ?? []];
|
|
82484
82484
|
const excludedPlugins = Array.from(configs.values()).filter(
|
|
82485
82485
|
(it) => !it.enabled || !allowedPlugins.includes(it.pluginId) || extraFilter.includes(it.pluginId)
|
|
82486
82486
|
);
|
|
@@ -82528,7 +82528,7 @@ var require_lib19 = __commonJS({
|
|
|
82528
82528
|
}
|
|
82529
82529
|
__name(returnClientTxes, "returnClientTxes");
|
|
82530
82530
|
function createModelPersistence(workspace) {
|
|
82531
|
-
const overrideStore = (0, import_platform.getMetadata)(
|
|
82531
|
+
const overrideStore = (0, import_platform.getMetadata)(import_client11.default.metadata.OverridePersistenceStore);
|
|
82532
82532
|
if (overrideStore !== void 0) {
|
|
82533
82533
|
return overrideStore;
|
|
82534
82534
|
}
|
|
@@ -82625,7 +82625,7 @@ var require_client6 = __commonJS({
|
|
|
82625
82625
|
});
|
|
82626
82626
|
module2.exports = __toCommonJS2(client_exports);
|
|
82627
82627
|
var import_account_client = require_lib5();
|
|
82628
|
-
var
|
|
82628
|
+
var import_client11 = __toESM2(require_lib6());
|
|
82629
82629
|
var import_core22 = require_lib4();
|
|
82630
82630
|
var import_platform = require_lib();
|
|
82631
82631
|
var import_config7 = require_config();
|
|
@@ -82651,9 +82651,9 @@ var require_client6 = __commonJS({
|
|
|
82651
82651
|
}
|
|
82652
82652
|
__name(connect, "connect");
|
|
82653
82653
|
async function createClient(url4, endpoint, token, workspaceUuid, account, config3, options) {
|
|
82654
|
-
(0, import_platform.addLocation)(
|
|
82654
|
+
(0, import_platform.addLocation)(import_client11.clientId, () => Promise.resolve().then(() => __toESM(require_lib19())));
|
|
82655
82655
|
const { socketFactory, connectionTimeout } = options;
|
|
82656
|
-
const clientFactory = await (0, import_platform.getResource)(
|
|
82656
|
+
const clientFactory = await (0, import_platform.getResource)(import_client11.default.function.GetClient);
|
|
82657
82657
|
const connection = await clientFactory(token, endpoint, {
|
|
82658
82658
|
socketFactory,
|
|
82659
82659
|
connectionTimeout
|
|
@@ -83774,11 +83774,11 @@ var require_storage2 = __commonJS({
|
|
|
83774
83774
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
83775
83775
|
var storage_exports = {};
|
|
83776
83776
|
__export2(storage_exports, {
|
|
83777
|
-
connectStorage: () =>
|
|
83778
|
-
createStorageClient: () =>
|
|
83777
|
+
connectStorage: () => import_client11.connectStorage,
|
|
83778
|
+
createStorageClient: () => import_client11.createStorageClient
|
|
83779
83779
|
});
|
|
83780
83780
|
module2.exports = __toCommonJS2(storage_exports);
|
|
83781
|
-
var
|
|
83781
|
+
var import_client11 = require_client7();
|
|
83782
83782
|
__reExport2(storage_exports, require_error3(), module2.exports);
|
|
83783
83783
|
__reExport2(storage_exports, require_types8(), module2.exports);
|
|
83784
83784
|
}
|
|
@@ -111962,7 +111962,7 @@ var require_core3 = __commonJS({
|
|
|
111962
111962
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
111963
111963
|
var id_1 = require_id();
|
|
111964
111964
|
var ref_1 = require_ref2();
|
|
111965
|
-
var
|
|
111965
|
+
var core4 = [
|
|
111966
111966
|
"$schema",
|
|
111967
111967
|
"$id",
|
|
111968
111968
|
"$defs",
|
|
@@ -111972,7 +111972,7 @@ var require_core3 = __commonJS({
|
|
|
111972
111972
|
id_1.default,
|
|
111973
111973
|
ref_1.default
|
|
111974
111974
|
];
|
|
111975
|
-
exports2.default =
|
|
111975
|
+
exports2.default = core4;
|
|
111976
111976
|
}
|
|
111977
111977
|
});
|
|
111978
111978
|
|
|
@@ -117894,248 +117894,8 @@ var require_lib28 = __commonJS({
|
|
|
117894
117894
|
}
|
|
117895
117895
|
});
|
|
117896
117896
|
|
|
117897
|
-
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/plugin.js
|
|
117898
|
-
var require_plugin2 = __commonJS({
|
|
117899
|
-
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/plugin.js"(exports2, module2) {
|
|
117900
|
-
"use strict";
|
|
117901
|
-
var __defProp2 = Object.defineProperty;
|
|
117902
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
117903
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
117904
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
117905
|
-
var __export2 = (target, all8) => {
|
|
117906
|
-
for (var name in all8)
|
|
117907
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
117908
|
-
};
|
|
117909
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
117910
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
117911
|
-
for (let key of __getOwnPropNames2(from))
|
|
117912
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
117913
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
117914
|
-
}
|
|
117915
|
-
return to;
|
|
117916
|
-
};
|
|
117917
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
117918
|
-
var plugin_exports = {};
|
|
117919
|
-
__export2(plugin_exports, {
|
|
117920
|
-
default: () => plugin_default,
|
|
117921
|
-
documentId: () => documentId,
|
|
117922
|
-
documentPlugin: () => documentPlugin2
|
|
117923
|
-
});
|
|
117924
|
-
module2.exports = __toCommonJS2(plugin_exports);
|
|
117925
|
-
var import_platform = require_lib();
|
|
117926
|
-
var documentId = "document";
|
|
117927
|
-
var documentPlugin2 = (0, import_platform.plugin)(documentId, {
|
|
117928
|
-
class: {
|
|
117929
|
-
Document: "",
|
|
117930
|
-
DocumentSnapshot: "",
|
|
117931
|
-
SavedDocument: "",
|
|
117932
|
-
Teamspace: ""
|
|
117933
|
-
},
|
|
117934
|
-
mixin: {
|
|
117935
|
-
DefaultTeamspaceTypeData: ""
|
|
117936
|
-
},
|
|
117937
|
-
component: {
|
|
117938
|
-
CreateDocument: "",
|
|
117939
|
-
DocumentSearchIcon: ""
|
|
117940
|
-
},
|
|
117941
|
-
action: {
|
|
117942
|
-
CreateChildDocument: "",
|
|
117943
|
-
CreateDocument: "",
|
|
117944
|
-
EditTeamspace: ""
|
|
117945
|
-
},
|
|
117946
|
-
icon: {
|
|
117947
|
-
Document: "",
|
|
117948
|
-
DocumentApplication: "",
|
|
117949
|
-
Add: "",
|
|
117950
|
-
Teamspace: "",
|
|
117951
|
-
References: "",
|
|
117952
|
-
History: "",
|
|
117953
|
-
Star: "",
|
|
117954
|
-
Starred: "",
|
|
117955
|
-
Lock: "",
|
|
117956
|
-
Unlock: ""
|
|
117957
|
-
},
|
|
117958
|
-
app: {
|
|
117959
|
-
Documents: ""
|
|
117960
|
-
},
|
|
117961
|
-
resolver: {
|
|
117962
|
-
Location: ""
|
|
117963
|
-
},
|
|
117964
|
-
string: {
|
|
117965
|
-
ConfigLabel: "",
|
|
117966
|
-
CreateDocument: "",
|
|
117967
|
-
Documents: "",
|
|
117968
|
-
ForbidCreateTeamspacePermission: "",
|
|
117969
|
-
ForbidCreateTeamspacePermissionDescription: ""
|
|
117970
|
-
},
|
|
117971
|
-
ids: {
|
|
117972
|
-
NoParent: "",
|
|
117973
|
-
DocumentNotificationGroup: "",
|
|
117974
|
-
ContentNotification: ""
|
|
117975
|
-
},
|
|
117976
|
-
descriptor: {
|
|
117977
|
-
TeamspaceType: ""
|
|
117978
|
-
},
|
|
117979
|
-
spaceType: {
|
|
117980
|
-
DefaultTeamspaceType: ""
|
|
117981
|
-
},
|
|
117982
|
-
permission: {
|
|
117983
|
-
ForbidCreateTeamspace: ""
|
|
117984
|
-
}
|
|
117985
|
-
});
|
|
117986
|
-
var plugin_default = documentPlugin2;
|
|
117987
|
-
}
|
|
117988
|
-
});
|
|
117989
|
-
|
|
117990
|
-
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/analytics.js
|
|
117991
|
-
var require_analytics4 = __commonJS({
|
|
117992
|
-
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/analytics.js"(exports2, module2) {
|
|
117993
|
-
"use strict";
|
|
117994
|
-
var __defProp2 = Object.defineProperty;
|
|
117995
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
117996
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
117997
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
117998
|
-
var __export2 = (target, all8) => {
|
|
117999
|
-
for (var name in all8)
|
|
118000
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
118001
|
-
};
|
|
118002
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
118003
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
118004
|
-
for (let key of __getOwnPropNames2(from))
|
|
118005
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
118006
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
118007
|
-
}
|
|
118008
|
-
return to;
|
|
118009
|
-
};
|
|
118010
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
118011
|
-
var analytics_exports = {};
|
|
118012
|
-
__export2(analytics_exports, {
|
|
118013
|
-
DocumentEvents: () => DocumentEvents
|
|
118014
|
-
});
|
|
118015
|
-
module2.exports = __toCommonJS2(analytics_exports);
|
|
118016
|
-
var DocumentEvents = /* @__PURE__ */ ((DocumentEvents2) => {
|
|
118017
|
-
DocumentEvents2["CreateDocumentButtonClicked"] = "document.CreateButtonClicked";
|
|
118018
|
-
DocumentEvents2["PlusDocumentButtonClicked"] = "document.PlusButtonClicked";
|
|
118019
|
-
DocumentEvents2["DocumentCreated"] = "document.Created";
|
|
118020
|
-
DocumentEvents2["TeamspaceCreated"] = "document.CreatedTeamspace";
|
|
118021
|
-
DocumentEvents2["DocumentEdited"] = "document.Edited";
|
|
118022
|
-
DocumentEvents2["DocumentOpened"] = "document.Opened";
|
|
118023
|
-
return DocumentEvents2;
|
|
118024
|
-
})(DocumentEvents || {});
|
|
118025
|
-
}
|
|
118026
|
-
});
|
|
118027
|
-
|
|
118028
|
-
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/types.js
|
|
118029
|
-
var require_types12 = __commonJS({
|
|
118030
|
-
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/types.js"(exports2, module2) {
|
|
118031
|
-
"use strict";
|
|
118032
|
-
var __defProp2 = Object.defineProperty;
|
|
118033
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
118034
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
118035
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
118036
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
118037
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
118038
|
-
for (let key of __getOwnPropNames2(from))
|
|
118039
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
118040
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
118041
|
-
}
|
|
118042
|
-
return to;
|
|
118043
|
-
};
|
|
118044
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
118045
|
-
var types_exports = {};
|
|
118046
|
-
module2.exports = __toCommonJS2(types_exports);
|
|
118047
|
-
}
|
|
118048
|
-
});
|
|
118049
|
-
|
|
118050
|
-
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/utils.js
|
|
118051
|
-
var require_utils19 = __commonJS({
|
|
118052
|
-
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/utils.js"(exports2, module2) {
|
|
118053
|
-
"use strict";
|
|
118054
|
-
var __create2 = Object.create;
|
|
118055
|
-
var __defProp2 = Object.defineProperty;
|
|
118056
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
118057
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
118058
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
118059
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
118060
|
-
var __name = (target, value5) => __defProp2(target, "name", { value: value5, configurable: true });
|
|
118061
|
-
var __export2 = (target, all8) => {
|
|
118062
|
-
for (var name in all8)
|
|
118063
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
118064
|
-
};
|
|
118065
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
118066
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
118067
|
-
for (let key of __getOwnPropNames2(from))
|
|
118068
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
118069
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
118070
|
-
}
|
|
118071
|
-
return to;
|
|
118072
|
-
};
|
|
118073
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
118074
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
118075
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
118076
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
118077
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
118078
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
118079
|
-
mod
|
|
118080
|
-
));
|
|
118081
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
118082
|
-
var utils_exports = {};
|
|
118083
|
-
__export2(utils_exports, {
|
|
118084
|
-
getFirstRank: () => getFirstRank
|
|
118085
|
-
});
|
|
118086
|
-
module2.exports = __toCommonJS2(utils_exports);
|
|
118087
|
-
var import_core22 = require_lib4();
|
|
118088
|
-
var import_plugin = __toESM2(require_plugin2());
|
|
118089
|
-
async function getFirstRank(client, space, parent, sort3 = import_core22.SortingOrder.Descending, extra = {}) {
|
|
118090
|
-
const doc = await client.findOne(
|
|
118091
|
-
import_plugin.default.class.Document,
|
|
118092
|
-
{ space, parent, ...extra },
|
|
118093
|
-
{ sort: { rank: sort3 }, projection: { rank: 1 } }
|
|
118094
|
-
);
|
|
118095
|
-
return doc?.rank;
|
|
118096
|
-
}
|
|
118097
|
-
__name(getFirstRank, "getFirstRank");
|
|
118098
|
-
}
|
|
118099
|
-
});
|
|
118100
|
-
|
|
118101
|
-
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/index.js
|
|
118102
|
-
var require_lib29 = __commonJS({
|
|
118103
|
-
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/index.js"(exports2, module2) {
|
|
118104
|
-
"use strict";
|
|
118105
|
-
var __defProp2 = Object.defineProperty;
|
|
118106
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
118107
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
118108
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
118109
|
-
var __export2 = (target, all8) => {
|
|
118110
|
-
for (var name in all8)
|
|
118111
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
118112
|
-
};
|
|
118113
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
118114
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
118115
|
-
for (let key of __getOwnPropNames2(from))
|
|
118116
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
118117
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
118118
|
-
}
|
|
118119
|
-
return to;
|
|
118120
|
-
};
|
|
118121
|
-
var __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
|
|
118122
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
118123
|
-
var index_exports2 = {};
|
|
118124
|
-
__export2(index_exports2, {
|
|
118125
|
-
default: () => index_default,
|
|
118126
|
-
documentId: () => import_plugin.documentId
|
|
118127
|
-
});
|
|
118128
|
-
module2.exports = __toCommonJS2(index_exports2);
|
|
118129
|
-
var import_plugin = require_plugin2();
|
|
118130
|
-
__reExport2(index_exports2, require_analytics4(), module2.exports);
|
|
118131
|
-
__reExport2(index_exports2, require_types12(), module2.exports);
|
|
118132
|
-
__reExport2(index_exports2, require_utils19(), module2.exports);
|
|
118133
|
-
var index_default = import_plugin.documentPlugin;
|
|
118134
|
-
}
|
|
118135
|
-
});
|
|
118136
|
-
|
|
118137
117897
|
// node_modules/.pnpm/@hcengineering+task@0.7.0/node_modules/@hcengineering/task/lib/utils.js
|
|
118138
|
-
var
|
|
117898
|
+
var require_utils19 = __commonJS({
|
|
118139
117899
|
"node_modules/.pnpm/@hcengineering+task@0.7.0/node_modules/@hcengineering/task/lib/utils.js"(exports2, module2) {
|
|
118140
117900
|
"use strict";
|
|
118141
117901
|
var __create2 = Object.create;
|
|
@@ -118184,7 +117944,7 @@ var require_utils20 = __commonJS({
|
|
|
118184
117944
|
module2.exports = __toCommonJS2(utils_exports);
|
|
118185
117945
|
var import_core22 = __toESM2(require_lib4());
|
|
118186
117946
|
var import_platform = require_lib();
|
|
118187
|
-
var import__ = __toESM2(
|
|
117947
|
+
var import__ = __toESM2(require_lib29());
|
|
118188
117948
|
var import_rank3 = require_lib28();
|
|
118189
117949
|
var import_rank22 = require_lib28();
|
|
118190
117950
|
var calcRank = /* @__PURE__ */ __name((prev, next4) => {
|
|
@@ -118390,7 +118150,7 @@ var require_utils20 = __commonJS({
|
|
|
118390
118150
|
});
|
|
118391
118151
|
|
|
118392
118152
|
// node_modules/.pnpm/@hcengineering+task@0.7.0/node_modules/@hcengineering/task/lib/index.js
|
|
118393
|
-
var
|
|
118153
|
+
var require_lib29 = __commonJS({
|
|
118394
118154
|
"node_modules/.pnpm/@hcengineering+task@0.7.0/node_modules/@hcengineering/task/lib/index.js"(exports2, module2) {
|
|
118395
118155
|
"use strict";
|
|
118396
118156
|
var __defProp2 = Object.defineProperty;
|
|
@@ -118419,7 +118179,7 @@ var require_lib30 = __commonJS({
|
|
|
118419
118179
|
});
|
|
118420
118180
|
module2.exports = __toCommonJS2(index_exports2);
|
|
118421
118181
|
var import_platform = require_lib();
|
|
118422
|
-
__reExport2(index_exports2,
|
|
118182
|
+
__reExport2(index_exports2, require_utils19(), module2.exports);
|
|
118423
118183
|
var TaskOrdering = /* @__PURE__ */ ((TaskOrdering2) => {
|
|
118424
118184
|
TaskOrdering2["State"] = "state";
|
|
118425
118185
|
TaskOrdering2["LastUpdated"] = "modifiedOn";
|
|
@@ -118428,7 +118188,7 @@ var require_lib30 = __commonJS({
|
|
|
118428
118188
|
return TaskOrdering2;
|
|
118429
118189
|
})(TaskOrdering || {});
|
|
118430
118190
|
var taskId = "task";
|
|
118431
|
-
var
|
|
118191
|
+
var task3 = (0, import_platform.plugin)(taskId, {
|
|
118432
118192
|
app: {
|
|
118433
118193
|
Tasks: ""
|
|
118434
118194
|
},
|
|
@@ -118520,7 +118280,247 @@ var require_lib30 = __commonJS({
|
|
|
118520
118280
|
ProjectEditorExtension: ""
|
|
118521
118281
|
}
|
|
118522
118282
|
});
|
|
118523
|
-
var index_default =
|
|
118283
|
+
var index_default = task3;
|
|
118284
|
+
}
|
|
118285
|
+
});
|
|
118286
|
+
|
|
118287
|
+
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/plugin.js
|
|
118288
|
+
var require_plugin2 = __commonJS({
|
|
118289
|
+
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/plugin.js"(exports2, module2) {
|
|
118290
|
+
"use strict";
|
|
118291
|
+
var __defProp2 = Object.defineProperty;
|
|
118292
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
118293
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
118294
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
118295
|
+
var __export2 = (target, all8) => {
|
|
118296
|
+
for (var name in all8)
|
|
118297
|
+
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
118298
|
+
};
|
|
118299
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
118300
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
118301
|
+
for (let key of __getOwnPropNames2(from))
|
|
118302
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
118303
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
118304
|
+
}
|
|
118305
|
+
return to;
|
|
118306
|
+
};
|
|
118307
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
118308
|
+
var plugin_exports = {};
|
|
118309
|
+
__export2(plugin_exports, {
|
|
118310
|
+
default: () => plugin_default,
|
|
118311
|
+
documentId: () => documentId,
|
|
118312
|
+
documentPlugin: () => documentPlugin2
|
|
118313
|
+
});
|
|
118314
|
+
module2.exports = __toCommonJS2(plugin_exports);
|
|
118315
|
+
var import_platform = require_lib();
|
|
118316
|
+
var documentId = "document";
|
|
118317
|
+
var documentPlugin2 = (0, import_platform.plugin)(documentId, {
|
|
118318
|
+
class: {
|
|
118319
|
+
Document: "",
|
|
118320
|
+
DocumentSnapshot: "",
|
|
118321
|
+
SavedDocument: "",
|
|
118322
|
+
Teamspace: ""
|
|
118323
|
+
},
|
|
118324
|
+
mixin: {
|
|
118325
|
+
DefaultTeamspaceTypeData: ""
|
|
118326
|
+
},
|
|
118327
|
+
component: {
|
|
118328
|
+
CreateDocument: "",
|
|
118329
|
+
DocumentSearchIcon: ""
|
|
118330
|
+
},
|
|
118331
|
+
action: {
|
|
118332
|
+
CreateChildDocument: "",
|
|
118333
|
+
CreateDocument: "",
|
|
118334
|
+
EditTeamspace: ""
|
|
118335
|
+
},
|
|
118336
|
+
icon: {
|
|
118337
|
+
Document: "",
|
|
118338
|
+
DocumentApplication: "",
|
|
118339
|
+
Add: "",
|
|
118340
|
+
Teamspace: "",
|
|
118341
|
+
References: "",
|
|
118342
|
+
History: "",
|
|
118343
|
+
Star: "",
|
|
118344
|
+
Starred: "",
|
|
118345
|
+
Lock: "",
|
|
118346
|
+
Unlock: ""
|
|
118347
|
+
},
|
|
118348
|
+
app: {
|
|
118349
|
+
Documents: ""
|
|
118350
|
+
},
|
|
118351
|
+
resolver: {
|
|
118352
|
+
Location: ""
|
|
118353
|
+
},
|
|
118354
|
+
string: {
|
|
118355
|
+
ConfigLabel: "",
|
|
118356
|
+
CreateDocument: "",
|
|
118357
|
+
Documents: "",
|
|
118358
|
+
ForbidCreateTeamspacePermission: "",
|
|
118359
|
+
ForbidCreateTeamspacePermissionDescription: ""
|
|
118360
|
+
},
|
|
118361
|
+
ids: {
|
|
118362
|
+
NoParent: "",
|
|
118363
|
+
DocumentNotificationGroup: "",
|
|
118364
|
+
ContentNotification: ""
|
|
118365
|
+
},
|
|
118366
|
+
descriptor: {
|
|
118367
|
+
TeamspaceType: ""
|
|
118368
|
+
},
|
|
118369
|
+
spaceType: {
|
|
118370
|
+
DefaultTeamspaceType: ""
|
|
118371
|
+
},
|
|
118372
|
+
permission: {
|
|
118373
|
+
ForbidCreateTeamspace: ""
|
|
118374
|
+
}
|
|
118375
|
+
});
|
|
118376
|
+
var plugin_default = documentPlugin2;
|
|
118377
|
+
}
|
|
118378
|
+
});
|
|
118379
|
+
|
|
118380
|
+
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/analytics.js
|
|
118381
|
+
var require_analytics4 = __commonJS({
|
|
118382
|
+
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/analytics.js"(exports2, module2) {
|
|
118383
|
+
"use strict";
|
|
118384
|
+
var __defProp2 = Object.defineProperty;
|
|
118385
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
118386
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
118387
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
118388
|
+
var __export2 = (target, all8) => {
|
|
118389
|
+
for (var name in all8)
|
|
118390
|
+
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
118391
|
+
};
|
|
118392
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
118393
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
118394
|
+
for (let key of __getOwnPropNames2(from))
|
|
118395
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
118396
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
118397
|
+
}
|
|
118398
|
+
return to;
|
|
118399
|
+
};
|
|
118400
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
118401
|
+
var analytics_exports = {};
|
|
118402
|
+
__export2(analytics_exports, {
|
|
118403
|
+
DocumentEvents: () => DocumentEvents
|
|
118404
|
+
});
|
|
118405
|
+
module2.exports = __toCommonJS2(analytics_exports);
|
|
118406
|
+
var DocumentEvents = /* @__PURE__ */ ((DocumentEvents2) => {
|
|
118407
|
+
DocumentEvents2["CreateDocumentButtonClicked"] = "document.CreateButtonClicked";
|
|
118408
|
+
DocumentEvents2["PlusDocumentButtonClicked"] = "document.PlusButtonClicked";
|
|
118409
|
+
DocumentEvents2["DocumentCreated"] = "document.Created";
|
|
118410
|
+
DocumentEvents2["TeamspaceCreated"] = "document.CreatedTeamspace";
|
|
118411
|
+
DocumentEvents2["DocumentEdited"] = "document.Edited";
|
|
118412
|
+
DocumentEvents2["DocumentOpened"] = "document.Opened";
|
|
118413
|
+
return DocumentEvents2;
|
|
118414
|
+
})(DocumentEvents || {});
|
|
118415
|
+
}
|
|
118416
|
+
});
|
|
118417
|
+
|
|
118418
|
+
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/types.js
|
|
118419
|
+
var require_types12 = __commonJS({
|
|
118420
|
+
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/types.js"(exports2, module2) {
|
|
118421
|
+
"use strict";
|
|
118422
|
+
var __defProp2 = Object.defineProperty;
|
|
118423
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
118424
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
118425
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
118426
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
118427
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
118428
|
+
for (let key of __getOwnPropNames2(from))
|
|
118429
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
118430
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
118431
|
+
}
|
|
118432
|
+
return to;
|
|
118433
|
+
};
|
|
118434
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
118435
|
+
var types_exports = {};
|
|
118436
|
+
module2.exports = __toCommonJS2(types_exports);
|
|
118437
|
+
}
|
|
118438
|
+
});
|
|
118439
|
+
|
|
118440
|
+
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/utils.js
|
|
118441
|
+
var require_utils20 = __commonJS({
|
|
118442
|
+
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/utils.js"(exports2, module2) {
|
|
118443
|
+
"use strict";
|
|
118444
|
+
var __create2 = Object.create;
|
|
118445
|
+
var __defProp2 = Object.defineProperty;
|
|
118446
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
118447
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
118448
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
118449
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
118450
|
+
var __name = (target, value5) => __defProp2(target, "name", { value: value5, configurable: true });
|
|
118451
|
+
var __export2 = (target, all8) => {
|
|
118452
|
+
for (var name in all8)
|
|
118453
|
+
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
118454
|
+
};
|
|
118455
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
118456
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
118457
|
+
for (let key of __getOwnPropNames2(from))
|
|
118458
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
118459
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
118460
|
+
}
|
|
118461
|
+
return to;
|
|
118462
|
+
};
|
|
118463
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
118464
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
118465
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
118466
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
118467
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
118468
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
118469
|
+
mod
|
|
118470
|
+
));
|
|
118471
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
118472
|
+
var utils_exports = {};
|
|
118473
|
+
__export2(utils_exports, {
|
|
118474
|
+
getFirstRank: () => getFirstRank
|
|
118475
|
+
});
|
|
118476
|
+
module2.exports = __toCommonJS2(utils_exports);
|
|
118477
|
+
var import_core22 = require_lib4();
|
|
118478
|
+
var import_plugin = __toESM2(require_plugin2());
|
|
118479
|
+
async function getFirstRank(client, space, parent, sort3 = import_core22.SortingOrder.Descending, extra = {}) {
|
|
118480
|
+
const doc = await client.findOne(
|
|
118481
|
+
import_plugin.default.class.Document,
|
|
118482
|
+
{ space, parent, ...extra },
|
|
118483
|
+
{ sort: { rank: sort3 }, projection: { rank: 1 } }
|
|
118484
|
+
);
|
|
118485
|
+
return doc?.rank;
|
|
118486
|
+
}
|
|
118487
|
+
__name(getFirstRank, "getFirstRank");
|
|
118488
|
+
}
|
|
118489
|
+
});
|
|
118490
|
+
|
|
118491
|
+
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/index.js
|
|
118492
|
+
var require_lib30 = __commonJS({
|
|
118493
|
+
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/index.js"(exports2, module2) {
|
|
118494
|
+
"use strict";
|
|
118495
|
+
var __defProp2 = Object.defineProperty;
|
|
118496
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
118497
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
118498
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
118499
|
+
var __export2 = (target, all8) => {
|
|
118500
|
+
for (var name in all8)
|
|
118501
|
+
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
118502
|
+
};
|
|
118503
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
118504
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
118505
|
+
for (let key of __getOwnPropNames2(from))
|
|
118506
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
118507
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
118508
|
+
}
|
|
118509
|
+
return to;
|
|
118510
|
+
};
|
|
118511
|
+
var __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
|
|
118512
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
118513
|
+
var index_exports2 = {};
|
|
118514
|
+
__export2(index_exports2, {
|
|
118515
|
+
default: () => index_default,
|
|
118516
|
+
documentId: () => import_plugin.documentId
|
|
118517
|
+
});
|
|
118518
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
118519
|
+
var import_plugin = require_plugin2();
|
|
118520
|
+
__reExport2(index_exports2, require_analytics4(), module2.exports);
|
|
118521
|
+
__reExport2(index_exports2, require_types12(), module2.exports);
|
|
118522
|
+
__reExport2(index_exports2, require_utils20(), module2.exports);
|
|
118523
|
+
var index_default = import_plugin.documentPlugin;
|
|
118524
118524
|
}
|
|
118525
118525
|
});
|
|
118526
118526
|
|
|
@@ -125548,7 +125548,7 @@ var ClockTypeId = /* @__PURE__ */ Symbol.for(ClockSymbolKey);
|
|
|
125548
125548
|
var clockTag = /* @__PURE__ */ GenericTag("effect/Clock");
|
|
125549
125549
|
var MAX_TIMER_MILLIS = 2 ** 31 - 1;
|
|
125550
125550
|
var globalClockScheduler = {
|
|
125551
|
-
unsafeSchedule(
|
|
125551
|
+
unsafeSchedule(task3, duration7) {
|
|
125552
125552
|
const millis2 = toMillis(duration7);
|
|
125553
125553
|
if (millis2 > MAX_TIMER_MILLIS) {
|
|
125554
125554
|
return constFalse;
|
|
@@ -125556,7 +125556,7 @@ var globalClockScheduler = {
|
|
|
125556
125556
|
let completed = false;
|
|
125557
125557
|
const handle = setTimeout(() => {
|
|
125558
125558
|
completed = true;
|
|
125559
|
-
|
|
125559
|
+
task3();
|
|
125560
125560
|
}, millis2);
|
|
125561
125561
|
return () => {
|
|
125562
125562
|
clearTimeout(handle);
|
|
@@ -127269,8 +127269,8 @@ var MicroSchedulerDefault = class {
|
|
|
127269
127269
|
/**
|
|
127270
127270
|
* @since 3.5.9
|
|
127271
127271
|
*/
|
|
127272
|
-
scheduleTask(
|
|
127273
|
-
this.tasks.push(
|
|
127272
|
+
scheduleTask(task3, _priority) {
|
|
127273
|
+
this.tasks.push(task3);
|
|
127274
127274
|
if (!this.running) {
|
|
127275
127275
|
this.running = true;
|
|
127276
127276
|
setImmediate2(this.afterScheduled);
|
|
@@ -127686,7 +127686,7 @@ var PriorityBuckets = class {
|
|
|
127686
127686
|
/**
|
|
127687
127687
|
* @since 2.0.0
|
|
127688
127688
|
*/
|
|
127689
|
-
scheduleTask(
|
|
127689
|
+
scheduleTask(task3, priority) {
|
|
127690
127690
|
const length3 = this.buckets.length;
|
|
127691
127691
|
let bucket = void 0;
|
|
127692
127692
|
let index = 0;
|
|
@@ -127698,11 +127698,11 @@ var PriorityBuckets = class {
|
|
|
127698
127698
|
}
|
|
127699
127699
|
}
|
|
127700
127700
|
if (bucket && bucket[0] === priority) {
|
|
127701
|
-
bucket[1].push(
|
|
127701
|
+
bucket[1].push(task3);
|
|
127702
127702
|
} else if (index === length3) {
|
|
127703
|
-
this.buckets.push([priority, [
|
|
127703
|
+
this.buckets.push([priority, [task3]]);
|
|
127704
127704
|
} else {
|
|
127705
|
-
this.buckets.splice(index, 0, [priority, [
|
|
127705
|
+
this.buckets.splice(index, 0, [priority, [task3]]);
|
|
127706
127706
|
}
|
|
127707
127707
|
}
|
|
127708
127708
|
};
|
|
@@ -127755,8 +127755,8 @@ var MixedScheduler = class {
|
|
|
127755
127755
|
/**
|
|
127756
127756
|
* @since 2.0.0
|
|
127757
127757
|
*/
|
|
127758
|
-
scheduleTask(
|
|
127759
|
-
this.tasks.scheduleTask(
|
|
127758
|
+
scheduleTask(task3, priority) {
|
|
127759
|
+
this.tasks.scheduleTask(task3, priority);
|
|
127760
127760
|
if (!this.running) {
|
|
127761
127761
|
this.running = true;
|
|
127762
127762
|
this.starve();
|
|
@@ -127776,11 +127776,11 @@ var SyncScheduler = class {
|
|
|
127776
127776
|
/**
|
|
127777
127777
|
* @since 2.0.0
|
|
127778
127778
|
*/
|
|
127779
|
-
scheduleTask(
|
|
127779
|
+
scheduleTask(task3, priority) {
|
|
127780
127780
|
if (this.deferred) {
|
|
127781
|
-
defaultScheduler.scheduleTask(
|
|
127781
|
+
defaultScheduler.scheduleTask(task3, priority);
|
|
127782
127782
|
} else {
|
|
127783
|
-
this.tasks.scheduleTask(
|
|
127783
|
+
this.tasks.scheduleTask(task3, priority);
|
|
127784
127784
|
}
|
|
127785
127785
|
}
|
|
127786
127786
|
/**
|
|
@@ -141339,12 +141339,12 @@ var SchedulerImplem = class _SchedulerImplem {
|
|
|
141339
141339
|
outputValue: data !== void 0 ? stringify(data) : void 0
|
|
141340
141340
|
});
|
|
141341
141341
|
}
|
|
141342
|
-
scheduleInternal(schedulingType, label,
|
|
141342
|
+
scheduleInternal(schedulingType, label, task3, metadata, customAct, thenTaskToBeAwaited) {
|
|
141343
141343
|
let trigger = null;
|
|
141344
141344
|
const taskId = ++this.lastTaskId;
|
|
141345
141345
|
const scheduledPromise = new Promise((resolve2, reject) => {
|
|
141346
141346
|
trigger = () => {
|
|
141347
|
-
(thenTaskToBeAwaited ?
|
|
141347
|
+
(thenTaskToBeAwaited ? task3.then(() => thenTaskToBeAwaited()) : task3).then((data) => {
|
|
141348
141348
|
this.log(schedulingType, taskId, label, metadata, "resolved", data);
|
|
141349
141349
|
return resolve2(data);
|
|
141350
141350
|
}, (err) => {
|
|
@@ -141354,7 +141354,7 @@ var SchedulerImplem = class _SchedulerImplem {
|
|
|
141354
141354
|
};
|
|
141355
141355
|
});
|
|
141356
141356
|
this.scheduledTasks.push({
|
|
141357
|
-
original:
|
|
141357
|
+
original: task3,
|
|
141358
141358
|
scheduled: scheduledPromise,
|
|
141359
141359
|
trigger,
|
|
141360
141360
|
schedulingType,
|
|
@@ -141368,8 +141368,8 @@ var SchedulerImplem = class _SchedulerImplem {
|
|
|
141368
141368
|
}
|
|
141369
141369
|
return scheduledPromise;
|
|
141370
141370
|
}
|
|
141371
|
-
schedule(
|
|
141372
|
-
return this.scheduleInternal("promise", label || "",
|
|
141371
|
+
schedule(task3, label, metadata, customAct) {
|
|
141372
|
+
return this.scheduleInternal("promise", label || "", task3, metadata, customAct || defaultSchedulerAct);
|
|
141373
141373
|
}
|
|
141374
141374
|
scheduleFunction(asyncFunction, customAct) {
|
|
141375
141375
|
return (...args2) => this.scheduleInternal("function", `${asyncFunction.name}(${args2.map(stringify).join(",")})`, asyncFunction(...args2), void 0, customAct || defaultSchedulerAct);
|
|
@@ -152625,9 +152625,9 @@ function validateRequiredArguments(numArguments, expectedNumArguments, methodNam
|
|
|
152625
152625
|
}
|
|
152626
152626
|
|
|
152627
152627
|
// node_modules/.pnpm/fake-indexeddb@6.2.5/node_modules/fake-indexeddb/build/esm/FDBFactory.js
|
|
152628
|
-
var runTaskInConnectionQueue = (connectionQueues, name,
|
|
152628
|
+
var runTaskInConnectionQueue = (connectionQueues, name, task3) => {
|
|
152629
152629
|
const queue = connectionQueues.get(name) ?? Promise.resolve();
|
|
152630
|
-
connectionQueues.set(name, queue.then(
|
|
152630
|
+
connectionQueues.set(name, queue.then(task3));
|
|
152631
152631
|
};
|
|
152632
152632
|
var waitForOthersClosedDelete = (databases, name, openDatabases, cb) => {
|
|
152633
152633
|
const anyOpen = openDatabases.some((openDatabase2) => {
|
|
@@ -153092,7 +153092,7 @@ var HulyAuthError = class extends Schema_exports.TaggedError()(
|
|
|
153092
153092
|
) {
|
|
153093
153093
|
mcpErrorCode = McpErrorCode.InternalError;
|
|
153094
153094
|
};
|
|
153095
|
-
var
|
|
153095
|
+
var IssueNotFoundError2 = class extends Schema_exports.TaggedError()(
|
|
153096
153096
|
"IssueNotFoundError",
|
|
153097
153097
|
{
|
|
153098
153098
|
identifier: Schema_exports.String,
|
|
@@ -153263,7 +153263,7 @@ var HulyDomainError = Schema_exports.Union(
|
|
|
153263
153263
|
HulyError,
|
|
153264
153264
|
HulyConnectionError,
|
|
153265
153265
|
HulyAuthError,
|
|
153266
|
-
|
|
153266
|
+
IssueNotFoundError2,
|
|
153267
153267
|
ProjectNotFoundError,
|
|
153268
153268
|
InvalidStatusError,
|
|
153269
153269
|
PersonNotFoundError,
|
|
@@ -167407,12 +167407,12 @@ var Protocol = class {
|
|
|
167407
167407
|
this._taskMessageQueue = _options?.taskMessageQueue;
|
|
167408
167408
|
if (this._taskStore) {
|
|
167409
167409
|
this.setRequestHandler(GetTaskRequestSchema, async (request2, extra) => {
|
|
167410
|
-
const
|
|
167411
|
-
if (!
|
|
167410
|
+
const task3 = await this._taskStore.getTask(request2.params.taskId, extra.sessionId);
|
|
167411
|
+
if (!task3) {
|
|
167412
167412
|
throw new McpError(ErrorCode.InvalidParams, "Failed to retrieve task: Task not found");
|
|
167413
167413
|
}
|
|
167414
167414
|
return {
|
|
167415
|
-
...
|
|
167415
|
+
...task3
|
|
167416
167416
|
};
|
|
167417
167417
|
});
|
|
167418
167418
|
this.setRequestHandler(GetTaskPayloadRequestSchema, async (request2, extra) => {
|
|
@@ -167443,15 +167443,15 @@ var Protocol = class {
|
|
|
167443
167443
|
await this._transport?.send(queuedMessage.message, { relatedRequestId: extra.requestId });
|
|
167444
167444
|
}
|
|
167445
167445
|
}
|
|
167446
|
-
const
|
|
167447
|
-
if (!
|
|
167446
|
+
const task3 = await this._taskStore.getTask(taskId, extra.sessionId);
|
|
167447
|
+
if (!task3) {
|
|
167448
167448
|
throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
|
|
167449
167449
|
}
|
|
167450
|
-
if (!isTerminal(
|
|
167450
|
+
if (!isTerminal(task3.status)) {
|
|
167451
167451
|
await this._waitForTaskUpdate(taskId, extra.signal);
|
|
167452
167452
|
return await handleTaskResult();
|
|
167453
167453
|
}
|
|
167454
|
-
if (isTerminal(
|
|
167454
|
+
if (isTerminal(task3.status)) {
|
|
167455
167455
|
const result = await this._taskStore.getTaskResult(taskId, extra.sessionId);
|
|
167456
167456
|
this._clearTaskQueue(taskId);
|
|
167457
167457
|
return {
|
|
@@ -167482,12 +167482,12 @@ var Protocol = class {
|
|
|
167482
167482
|
});
|
|
167483
167483
|
this.setRequestHandler(CancelTaskRequestSchema, async (request2, extra) => {
|
|
167484
167484
|
try {
|
|
167485
|
-
const
|
|
167486
|
-
if (!
|
|
167485
|
+
const task3 = await this._taskStore.getTask(request2.params.taskId, extra.sessionId);
|
|
167486
|
+
if (!task3) {
|
|
167487
167487
|
throw new McpError(ErrorCode.InvalidParams, `Task not found: ${request2.params.taskId}`);
|
|
167488
167488
|
}
|
|
167489
|
-
if (isTerminal(
|
|
167490
|
-
throw new McpError(ErrorCode.InvalidParams, `Cannot cancel task in terminal status: ${
|
|
167489
|
+
if (isTerminal(task3.status)) {
|
|
167490
|
+
throw new McpError(ErrorCode.InvalidParams, `Cannot cancel task in terminal status: ${task3.status}`);
|
|
167491
167491
|
}
|
|
167492
167492
|
await this._taskStore.updateTaskStatus(request2.params.taskId, "cancelled", "Client cancelled task execution.", extra.sessionId);
|
|
167493
167493
|
this._clearTaskQueue(request2.params.taskId);
|
|
@@ -167757,10 +167757,10 @@ var Protocol = class {
|
|
|
167757
167757
|
if (isJSONRPCResultResponse(response) && response.result && typeof response.result === "object") {
|
|
167758
167758
|
const result = response.result;
|
|
167759
167759
|
if (result.task && typeof result.task === "object") {
|
|
167760
|
-
const
|
|
167761
|
-
if (typeof
|
|
167760
|
+
const task3 = result.task;
|
|
167761
|
+
if (typeof task3.taskId === "string") {
|
|
167762
167762
|
isTaskResponse = true;
|
|
167763
|
-
this._taskProgressTokens.set(
|
|
167763
|
+
this._taskProgressTokens.set(task3.taskId, messageId);
|
|
167764
167764
|
}
|
|
167765
167765
|
}
|
|
167766
167766
|
}
|
|
@@ -167811,8 +167811,8 @@ var Protocol = class {
|
|
|
167811
167811
|
* @experimental Use `client.experimental.tasks.requestStream()` to access this method.
|
|
167812
167812
|
*/
|
|
167813
167813
|
async *requestStream(request2, resultSchema, options) {
|
|
167814
|
-
const { task:
|
|
167815
|
-
if (!
|
|
167814
|
+
const { task: task3 } = options ?? {};
|
|
167815
|
+
if (!task3) {
|
|
167816
167816
|
try {
|
|
167817
167817
|
const result = await this.request(request2, resultSchema, options);
|
|
167818
167818
|
yield { type: "result", result };
|
|
@@ -167834,18 +167834,18 @@ var Protocol = class {
|
|
|
167834
167834
|
throw new McpError(ErrorCode.InternalError, "Task creation did not return a task");
|
|
167835
167835
|
}
|
|
167836
167836
|
while (true) {
|
|
167837
|
-
const
|
|
167838
|
-
yield { type: "taskStatus", task:
|
|
167839
|
-
if (isTerminal(
|
|
167840
|
-
if (
|
|
167837
|
+
const task4 = await this.getTask({ taskId }, options);
|
|
167838
|
+
yield { type: "taskStatus", task: task4 };
|
|
167839
|
+
if (isTerminal(task4.status)) {
|
|
167840
|
+
if (task4.status === "completed") {
|
|
167841
167841
|
const result = await this.getTaskResult({ taskId }, resultSchema, options);
|
|
167842
167842
|
yield { type: "result", result };
|
|
167843
|
-
} else if (
|
|
167843
|
+
} else if (task4.status === "failed") {
|
|
167844
167844
|
yield {
|
|
167845
167845
|
type: "error",
|
|
167846
167846
|
error: new McpError(ErrorCode.InternalError, `Task ${taskId} failed`)
|
|
167847
167847
|
};
|
|
167848
|
-
} else if (
|
|
167848
|
+
} else if (task4.status === "cancelled") {
|
|
167849
167849
|
yield {
|
|
167850
167850
|
type: "error",
|
|
167851
167851
|
error: new McpError(ErrorCode.InternalError, `Task ${taskId} was cancelled`)
|
|
@@ -167853,12 +167853,12 @@ var Protocol = class {
|
|
|
167853
167853
|
}
|
|
167854
167854
|
return;
|
|
167855
167855
|
}
|
|
167856
|
-
if (
|
|
167856
|
+
if (task4.status === "input_required") {
|
|
167857
167857
|
const result = await this.getTaskResult({ taskId }, resultSchema, options);
|
|
167858
167858
|
yield { type: "result", result };
|
|
167859
167859
|
return;
|
|
167860
167860
|
}
|
|
167861
|
-
const pollInterval =
|
|
167861
|
+
const pollInterval = task4.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
|
|
167862
167862
|
await new Promise((resolve2) => setTimeout(resolve2, pollInterval));
|
|
167863
167863
|
options?.signal?.throwIfAborted();
|
|
167864
167864
|
}
|
|
@@ -167875,7 +167875,7 @@ var Protocol = class {
|
|
|
167875
167875
|
* Do not use this method to emit notifications! Use notification() instead.
|
|
167876
167876
|
*/
|
|
167877
167877
|
request(request2, resultSchema, options) {
|
|
167878
|
-
const { relatedRequestId, resumptionToken, onresumptiontoken, task:
|
|
167878
|
+
const { relatedRequestId, resumptionToken, onresumptiontoken, task: task3, relatedTask } = options ?? {};
|
|
167879
167879
|
return new Promise((resolve2, reject) => {
|
|
167880
167880
|
const earlyReject = (error2) => {
|
|
167881
167881
|
reject(error2);
|
|
@@ -167887,7 +167887,7 @@ var Protocol = class {
|
|
|
167887
167887
|
if (this._options?.enforceStrictCapabilities === true) {
|
|
167888
167888
|
try {
|
|
167889
167889
|
this.assertCapabilityForMethod(request2.method);
|
|
167890
|
-
if (
|
|
167890
|
+
if (task3) {
|
|
167891
167891
|
this.assertTaskCapability(request2.method);
|
|
167892
167892
|
}
|
|
167893
167893
|
} catch (e) {
|
|
@@ -167912,10 +167912,10 @@ var Protocol = class {
|
|
|
167912
167912
|
}
|
|
167913
167913
|
};
|
|
167914
167914
|
}
|
|
167915
|
-
if (
|
|
167915
|
+
if (task3) {
|
|
167916
167916
|
jsonrpcRequest.params = {
|
|
167917
167917
|
...jsonrpcRequest.params,
|
|
167918
|
-
task:
|
|
167918
|
+
task: task3
|
|
167919
167919
|
};
|
|
167920
167920
|
}
|
|
167921
167921
|
if (relatedTask) {
|
|
@@ -168209,9 +168209,9 @@ var Protocol = class {
|
|
|
168209
168209
|
async _waitForTaskUpdate(taskId, signal) {
|
|
168210
168210
|
let interval = this._options?.defaultTaskPollInterval ?? 1e3;
|
|
168211
168211
|
try {
|
|
168212
|
-
const
|
|
168213
|
-
if (
|
|
168214
|
-
interval =
|
|
168212
|
+
const task3 = await this._taskStore?.getTask(taskId);
|
|
168213
|
+
if (task3?.pollInterval) {
|
|
168214
|
+
interval = task3.pollInterval;
|
|
168215
168215
|
}
|
|
168216
168216
|
} catch {
|
|
168217
168217
|
}
|
|
@@ -168243,22 +168243,22 @@ var Protocol = class {
|
|
|
168243
168243
|
}, sessionId);
|
|
168244
168244
|
},
|
|
168245
168245
|
getTask: async (taskId) => {
|
|
168246
|
-
const
|
|
168247
|
-
if (!
|
|
168246
|
+
const task3 = await taskStore.getTask(taskId, sessionId);
|
|
168247
|
+
if (!task3) {
|
|
168248
168248
|
throw new McpError(ErrorCode.InvalidParams, "Failed to retrieve task: Task not found");
|
|
168249
168249
|
}
|
|
168250
|
-
return
|
|
168250
|
+
return task3;
|
|
168251
168251
|
},
|
|
168252
168252
|
storeTaskResult: async (taskId, status, result) => {
|
|
168253
168253
|
await taskStore.storeTaskResult(taskId, status, result, sessionId);
|
|
168254
|
-
const
|
|
168255
|
-
if (
|
|
168254
|
+
const task3 = await taskStore.getTask(taskId, sessionId);
|
|
168255
|
+
if (task3) {
|
|
168256
168256
|
const notification = TaskStatusNotificationSchema.parse({
|
|
168257
168257
|
method: "notifications/tasks/status",
|
|
168258
|
-
params:
|
|
168258
|
+
params: task3
|
|
168259
168259
|
});
|
|
168260
168260
|
await this.notification(notification);
|
|
168261
|
-
if (isTerminal(
|
|
168261
|
+
if (isTerminal(task3.status)) {
|
|
168262
168262
|
this._cleanupTaskProgressHandler(taskId);
|
|
168263
168263
|
}
|
|
168264
168264
|
}
|
|
@@ -168267,12 +168267,12 @@ var Protocol = class {
|
|
|
168267
168267
|
return taskStore.getTaskResult(taskId, sessionId);
|
|
168268
168268
|
},
|
|
168269
168269
|
updateTaskStatus: async (taskId, status, statusMessage) => {
|
|
168270
|
-
const
|
|
168271
|
-
if (!
|
|
168270
|
+
const task3 = await taskStore.getTask(taskId, sessionId);
|
|
168271
|
+
if (!task3) {
|
|
168272
168272
|
throw new McpError(ErrorCode.InvalidParams, `Task "${taskId}" not found - it may have been cleaned up`);
|
|
168273
168273
|
}
|
|
168274
|
-
if (isTerminal(
|
|
168275
|
-
throw new McpError(ErrorCode.InvalidParams, `Cannot update task "${taskId}" from terminal status "${
|
|
168274
|
+
if (isTerminal(task3.status)) {
|
|
168275
|
+
throw new McpError(ErrorCode.InvalidParams, `Cannot update task "${taskId}" from terminal status "${task3.status}" to "${status}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);
|
|
168276
168276
|
}
|
|
168277
168277
|
await taskStore.updateTaskStatus(taskId, status, statusMessage, sessionId);
|
|
168278
168278
|
const updatedTask = await taskStore.getTask(taskId, sessionId);
|
|
@@ -169348,7 +169348,10 @@ var ListEventInstancesParamsSchema = Schema_exports.Struct({
|
|
|
169348
169348
|
LimitParam.annotations({
|
|
169349
169349
|
description: "Maximum number of instances to return (default: 50)"
|
|
169350
169350
|
})
|
|
169351
|
-
)
|
|
169351
|
+
),
|
|
169352
|
+
includeParticipants: Schema_exports.optional(Schema_exports.Boolean.annotations({
|
|
169353
|
+
description: "Include full participant info (requires extra lookups, default: off)"
|
|
169354
|
+
}))
|
|
169352
169355
|
}).annotations({
|
|
169353
169356
|
title: "ListEventInstancesParams",
|
|
169354
169357
|
description: "Parameters for listing instances of a recurring event"
|
|
@@ -169497,7 +169500,7 @@ var getEvent = (params) => Effect_exports.gen(function* () {
|
|
|
169497
169500
|
allDay: event.allDay,
|
|
169498
169501
|
location: event.location,
|
|
169499
169502
|
visibility: visibilityToString(event.visibility),
|
|
169500
|
-
participants
|
|
169503
|
+
participants,
|
|
169501
169504
|
externalParticipants: event.externalParticipants,
|
|
169502
169505
|
calendarId: event.calendar ? String(event.calendar) : void 0,
|
|
169503
169506
|
modifiedOn: event.modifiedOn,
|
|
@@ -169753,6 +169756,22 @@ var listEventInstances = (params) => Effect_exports.gen(function* () {
|
|
|
169753
169756
|
sort: { date: import_core13.SortingOrder.Ascending }
|
|
169754
169757
|
}
|
|
169755
169758
|
);
|
|
169759
|
+
const participantMap = /* @__PURE__ */ new Map();
|
|
169760
|
+
if (params.includeParticipants) {
|
|
169761
|
+
const allParticipantRefs = [...new Set(instances.flatMap((i) => i.participants))];
|
|
169762
|
+
if (allParticipantRefs.length > 0) {
|
|
169763
|
+
const participants = yield* buildParticipants(client, allParticipantRefs);
|
|
169764
|
+
const participantById = new Map(participants.map((p) => [p.id, p]));
|
|
169765
|
+
for (const instance of instances) {
|
|
169766
|
+
const instanceParticipants = instance.participants.map((ref) => participantById.get(String(ref))).filter((p) => p !== void 0);
|
|
169767
|
+
participantMap.set(instance.eventId, instanceParticipants);
|
|
169768
|
+
}
|
|
169769
|
+
} else {
|
|
169770
|
+
for (const instance of instances) {
|
|
169771
|
+
participantMap.set(instance.eventId, []);
|
|
169772
|
+
}
|
|
169773
|
+
}
|
|
169774
|
+
}
|
|
169756
169775
|
const results = instances.map((instance) => ({
|
|
169757
169776
|
eventId: instance.eventId,
|
|
169758
169777
|
recurringEventId: instance.recurringEventId,
|
|
@@ -169765,6 +169784,7 @@ var listEventInstances = (params) => Effect_exports.gen(function* () {
|
|
|
169765
169784
|
visibility: visibilityToString(instance.visibility),
|
|
169766
169785
|
isCancelled: instance.isCancelled,
|
|
169767
169786
|
isVirtual: instance.virtual,
|
|
169787
|
+
participants: params.includeParticipants ? participantMap.get(instance.eventId) ?? [] : void 0,
|
|
169768
169788
|
externalParticipants: instance.externalParticipants
|
|
169769
169789
|
}));
|
|
169770
169790
|
return results;
|
|
@@ -169878,7 +169898,7 @@ var calendarTools = [
|
|
|
169878
169898
|
},
|
|
169879
169899
|
{
|
|
169880
169900
|
name: "list_event_instances",
|
|
169881
|
-
description: "List instances of a recurring event. Returns instances sorted by date. Supports filtering by date range.",
|
|
169901
|
+
description: "List instances of a recurring event. Returns instances sorted by date. Supports filtering by date range. Use includeParticipants=true to fetch full participant info (extra lookups).",
|
|
169882
169902
|
inputSchema: listEventInstancesParamsJsonSchema,
|
|
169883
169903
|
handler: createToolHandler(
|
|
169884
169904
|
"list_event_instances",
|
|
@@ -171061,6 +171081,48 @@ var markdownToMarkupString = (markdown) => {
|
|
|
171061
171081
|
const json3 = (0, import_text_markdown2.markdownToMarkup)(markdown, { refUrl: "", imageUrl: "" });
|
|
171062
171082
|
return (0, import_text2.jsonToMarkup)(json3);
|
|
171063
171083
|
};
|
|
171084
|
+
var buildSocialIdToPersonNameMap = (client, socialIds) => Effect_exports.gen(function* () {
|
|
171085
|
+
if (socialIds.length === 0) {
|
|
171086
|
+
return /* @__PURE__ */ new Map();
|
|
171087
|
+
}
|
|
171088
|
+
const socialIdentities = yield* client.findAll(
|
|
171089
|
+
contact2.class.SocialIdentity,
|
|
171090
|
+
{ _id: { $in: socialIds } }
|
|
171091
|
+
);
|
|
171092
|
+
if (socialIdentities.length === 0) {
|
|
171093
|
+
return /* @__PURE__ */ new Map();
|
|
171094
|
+
}
|
|
171095
|
+
const personRefs = [...new Set(socialIdentities.map((si) => si.attachedTo))];
|
|
171096
|
+
const persons = yield* client.findAll(
|
|
171097
|
+
contact2.class.Person,
|
|
171098
|
+
{ _id: { $in: personRefs } }
|
|
171099
|
+
);
|
|
171100
|
+
const personById = new Map(persons.map((p) => [p._id, p]));
|
|
171101
|
+
const result = /* @__PURE__ */ new Map();
|
|
171102
|
+
for (const si of socialIdentities) {
|
|
171103
|
+
const person = personById.get(si.attachedTo);
|
|
171104
|
+
if (person !== void 0) {
|
|
171105
|
+
result.set(si._id, person.name);
|
|
171106
|
+
}
|
|
171107
|
+
}
|
|
171108
|
+
return result;
|
|
171109
|
+
});
|
|
171110
|
+
var buildAccountUuidToNameMap = (client, accountUuids) => Effect_exports.gen(function* () {
|
|
171111
|
+
if (accountUuids.length === 0) {
|
|
171112
|
+
return /* @__PURE__ */ new Map();
|
|
171113
|
+
}
|
|
171114
|
+
const employees = yield* client.findAll(
|
|
171115
|
+
contact2.mixin.Employee,
|
|
171116
|
+
{ personUuid: { $in: accountUuids } }
|
|
171117
|
+
);
|
|
171118
|
+
const result = /* @__PURE__ */ new Map();
|
|
171119
|
+
for (const emp of employees) {
|
|
171120
|
+
if (emp.personUuid !== void 0) {
|
|
171121
|
+
result.set(emp.personUuid, emp.name);
|
|
171122
|
+
}
|
|
171123
|
+
}
|
|
171124
|
+
return result;
|
|
171125
|
+
});
|
|
171064
171126
|
var listChannels = (params) => Effect_exports.gen(function* () {
|
|
171065
171127
|
const client = yield* HulyClient;
|
|
171066
171128
|
const query = {};
|
|
@@ -171094,15 +171156,11 @@ var getChannel = (params) => Effect_exports.gen(function* () {
|
|
|
171094
171156
|
const { channel, client } = yield* findChannel(params.channel);
|
|
171095
171157
|
let memberNames;
|
|
171096
171158
|
if (channel.members && channel.members.length > 0) {
|
|
171097
|
-
const
|
|
171098
|
-
|
|
171099
|
-
|
|
171100
|
-
{ _id: { $in: memberIds } }
|
|
171159
|
+
const accountUuidToName = yield* buildAccountUuidToNameMap(
|
|
171160
|
+
client,
|
|
171161
|
+
channel.members
|
|
171101
171162
|
);
|
|
171102
|
-
|
|
171103
|
-
persons.map((p) => [String(p._id), p])
|
|
171104
|
-
);
|
|
171105
|
-
memberNames = channel.members.map((m) => personByAccount.get(String(m))?.name).filter((n) => n !== void 0);
|
|
171163
|
+
memberNames = channel.members.map((m) => accountUuidToName.get(m)).filter((n) => n !== void 0);
|
|
171106
171164
|
}
|
|
171107
171165
|
const result = {
|
|
171108
171166
|
id: String(channel._id),
|
|
@@ -171182,15 +171240,19 @@ var listChannelMessages = (params) => Effect_exports.gen(function* () {
|
|
|
171182
171240
|
}
|
|
171183
171241
|
);
|
|
171184
171242
|
const total = messages2.total ?? messages2.length;
|
|
171185
|
-
const
|
|
171186
|
-
|
|
171243
|
+
const uniqueSocialIds = [
|
|
171244
|
+
...new Set(
|
|
171245
|
+
messages2.map((msg) => msg.modifiedBy).filter((id) => id !== void 0)
|
|
171246
|
+
)
|
|
171247
|
+
];
|
|
171248
|
+
const socialIdToName = yield* buildSocialIdToPersonNameMap(client, uniqueSocialIds);
|
|
171187
171249
|
const summaries = messages2.map((msg) => {
|
|
171188
|
-
const
|
|
171250
|
+
const senderName = msg.modifiedBy ? socialIdToName.get(msg.modifiedBy) : void 0;
|
|
171189
171251
|
return {
|
|
171190
|
-
id:
|
|
171252
|
+
id: msg._id,
|
|
171191
171253
|
body: markupToMarkdownString(msg.message),
|
|
171192
|
-
sender:
|
|
171193
|
-
senderId: msg.modifiedBy
|
|
171254
|
+
sender: senderName,
|
|
171255
|
+
senderId: msg.modifiedBy,
|
|
171194
171256
|
createdOn: msg.createdOn,
|
|
171195
171257
|
modifiedOn: msg.modifiedOn,
|
|
171196
171258
|
editedOn: msg.editedOn,
|
|
@@ -171232,13 +171294,18 @@ var listDirectMessages = (params) => Effect_exports.gen(function* () {
|
|
|
171232
171294
|
}
|
|
171233
171295
|
);
|
|
171234
171296
|
const total = dms.total ?? dms.length;
|
|
171235
|
-
const
|
|
171236
|
-
|
|
171297
|
+
const uniqueAccountUuids = [
|
|
171298
|
+
...new Set(
|
|
171299
|
+
dms.flatMap((dm) => dm.members || [])
|
|
171300
|
+
)
|
|
171301
|
+
];
|
|
171302
|
+
const accountUuidToName = yield* buildAccountUuidToNameMap(client, uniqueAccountUuids);
|
|
171237
171303
|
const summaries = dms.map((dm) => {
|
|
171238
|
-
const
|
|
171239
|
-
const
|
|
171304
|
+
const members = dm.members || [];
|
|
171305
|
+
const participants = members.map((m) => accountUuidToName.get(m)).filter((n) => n !== void 0);
|
|
171306
|
+
const participantIds = members;
|
|
171240
171307
|
return {
|
|
171241
|
-
id:
|
|
171308
|
+
id: dm._id,
|
|
171242
171309
|
participants,
|
|
171243
171310
|
participantIds,
|
|
171244
171311
|
messages: dm.messages,
|
|
@@ -171334,8 +171401,11 @@ var channelTools = [
|
|
|
171334
171401
|
|
|
171335
171402
|
// src/huly/operations/comments.ts
|
|
171336
171403
|
var import_core15 = __toESM(require_lib4(), 1);
|
|
171404
|
+
|
|
171405
|
+
// src/huly/operations/shared.ts
|
|
171337
171406
|
var tracker = require_lib26().default;
|
|
171338
|
-
var
|
|
171407
|
+
var task = require_lib29().default;
|
|
171408
|
+
var core2 = require_lib4().default;
|
|
171339
171409
|
var findProject = (projectIdentifier) => Effect_exports.gen(function* () {
|
|
171340
171410
|
const client = yield* HulyClient;
|
|
171341
171411
|
const project3 = yield* client.findOne(
|
|
@@ -171347,6 +171417,62 @@ var findProject = (projectIdentifier) => Effect_exports.gen(function* () {
|
|
|
171347
171417
|
}
|
|
171348
171418
|
return { client, project: project3 };
|
|
171349
171419
|
});
|
|
171420
|
+
var findProjectWithStatuses = (projectIdentifier) => Effect_exports.gen(function* () {
|
|
171421
|
+
const client = yield* HulyClient;
|
|
171422
|
+
const project3 = yield* client.findOne(
|
|
171423
|
+
tracker.class.Project,
|
|
171424
|
+
{ identifier: projectIdentifier },
|
|
171425
|
+
{ lookup: { type: task.class.ProjectType } }
|
|
171426
|
+
);
|
|
171427
|
+
if (project3 === void 0) {
|
|
171428
|
+
return yield* new ProjectNotFoundError({ identifier: projectIdentifier });
|
|
171429
|
+
}
|
|
171430
|
+
const projectType = project3.$lookup?.type;
|
|
171431
|
+
let statuses = [];
|
|
171432
|
+
const wonCategory = String(task.statusCategory.Won);
|
|
171433
|
+
const lostCategory = String(task.statusCategory.Lost);
|
|
171434
|
+
if (projectType?.statuses) {
|
|
171435
|
+
const statusRefs = projectType.statuses.map((s) => s._id);
|
|
171436
|
+
if (statusRefs.length > 0) {
|
|
171437
|
+
const statusDocsResult = yield* Effect_exports.either(
|
|
171438
|
+
client.findAll(
|
|
171439
|
+
// Double cast needed: core.class.Status is typed as string constant
|
|
171440
|
+
// but findAll expects Ref<Class<Status>>. SDK type limitation.
|
|
171441
|
+
core2.class.Status,
|
|
171442
|
+
{ _id: { $in: statusRefs } }
|
|
171443
|
+
)
|
|
171444
|
+
);
|
|
171445
|
+
if (statusDocsResult._tag === "Right") {
|
|
171446
|
+
for (const doc of statusDocsResult.right) {
|
|
171447
|
+
const categoryStr = doc.category ? String(doc.category) : "";
|
|
171448
|
+
statuses.push({
|
|
171449
|
+
_id: doc._id,
|
|
171450
|
+
name: doc.name,
|
|
171451
|
+
isDone: categoryStr === wonCategory,
|
|
171452
|
+
isCanceled: categoryStr === lostCategory
|
|
171453
|
+
});
|
|
171454
|
+
}
|
|
171455
|
+
} else {
|
|
171456
|
+
yield* Effect_exports.logWarning(
|
|
171457
|
+
`Status query failed for project ${projectIdentifier}, using fallback. Category-based filtering (open/done/canceled) will use name heuristics. Error: ${statusDocsResult.left.message}`
|
|
171458
|
+
);
|
|
171459
|
+
for (const ps of projectType.statuses) {
|
|
171460
|
+
const name = String(ps._id).split(":").pop() ?? "Unknown";
|
|
171461
|
+
const nameLower = name.toLowerCase();
|
|
171462
|
+
const isDone5 = nameLower.includes("done") || nameLower.includes("complete") || nameLower.includes("finished") || nameLower.includes("resolved") || nameLower.includes("closed");
|
|
171463
|
+
const isCanceled = nameLower.includes("cancel") || nameLower.includes("reject") || nameLower.includes("abort") || nameLower.includes("wontfix") || nameLower.includes("invalid");
|
|
171464
|
+
statuses.push({
|
|
171465
|
+
_id: ps._id,
|
|
171466
|
+
name,
|
|
171467
|
+
isDone: isDone5,
|
|
171468
|
+
isCanceled
|
|
171469
|
+
});
|
|
171470
|
+
}
|
|
171471
|
+
}
|
|
171472
|
+
}
|
|
171473
|
+
}
|
|
171474
|
+
return { client, project: project3, statuses };
|
|
171475
|
+
});
|
|
171350
171476
|
var parseIssueIdentifier = (identifier2, projectIdentifier) => {
|
|
171351
171477
|
const idStr = String(identifier2).trim();
|
|
171352
171478
|
const match16 = idStr.match(/^([A-Z]+)-(\d+)$/i);
|
|
@@ -171369,7 +171495,7 @@ var parseIssueIdentifier = (identifier2, projectIdentifier) => {
|
|
|
171369
171495
|
var findProjectAndIssue = (params) => Effect_exports.gen(function* () {
|
|
171370
171496
|
const { client, project: project3 } = yield* findProject(params.project);
|
|
171371
171497
|
const { fullIdentifier, number: number9 } = parseIssueIdentifier(
|
|
171372
|
-
params.
|
|
171498
|
+
params.identifier,
|
|
171373
171499
|
params.project
|
|
171374
171500
|
);
|
|
171375
171501
|
let issue2 = yield* client.findOne(
|
|
@@ -171389,15 +171515,20 @@ var findProjectAndIssue = (params) => Effect_exports.gen(function* () {
|
|
|
171389
171515
|
);
|
|
171390
171516
|
}
|
|
171391
171517
|
if (issue2 === void 0) {
|
|
171392
|
-
return yield* new
|
|
171393
|
-
identifier: params.
|
|
171518
|
+
return yield* new IssueNotFoundError2({
|
|
171519
|
+
identifier: params.identifier,
|
|
171394
171520
|
project: params.project
|
|
171395
171521
|
});
|
|
171396
171522
|
}
|
|
171397
171523
|
return { client, project: project3, issue: issue2 };
|
|
171398
171524
|
});
|
|
171525
|
+
|
|
171526
|
+
// src/huly/operations/comments.ts
|
|
171527
|
+
var tracker2 = require_lib26().default;
|
|
171528
|
+
var chunter2 = require_lib25().default;
|
|
171529
|
+
var findProjectAndIssue2 = (params) => findProjectAndIssue({ project: params.project, identifier: params.issueIdentifier });
|
|
171399
171530
|
var listComments = (params) => Effect_exports.gen(function* () {
|
|
171400
|
-
const { client, issue: issue2 } = yield*
|
|
171531
|
+
const { client, issue: issue2 } = yield* findProjectAndIssue2({
|
|
171401
171532
|
project: params.project,
|
|
171402
171533
|
issueIdentifier: params.issueIdentifier
|
|
171403
171534
|
});
|
|
@@ -171406,7 +171537,7 @@ var listComments = (params) => Effect_exports.gen(function* () {
|
|
|
171406
171537
|
chunter2.class.ChatMessage,
|
|
171407
171538
|
{
|
|
171408
171539
|
attachedTo: issue2._id,
|
|
171409
|
-
attachedToClass:
|
|
171540
|
+
attachedToClass: tracker2.class.Issue
|
|
171410
171541
|
},
|
|
171411
171542
|
{
|
|
171412
171543
|
limit,
|
|
@@ -171426,7 +171557,7 @@ var listComments = (params) => Effect_exports.gen(function* () {
|
|
|
171426
171557
|
return comments;
|
|
171427
171558
|
});
|
|
171428
171559
|
var addComment = (params) => Effect_exports.gen(function* () {
|
|
171429
|
-
const { client,
|
|
171560
|
+
const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue2({
|
|
171430
171561
|
project: params.project,
|
|
171431
171562
|
issueIdentifier: params.issueIdentifier
|
|
171432
171563
|
});
|
|
@@ -171438,7 +171569,7 @@ var addComment = (params) => Effect_exports.gen(function* () {
|
|
|
171438
171569
|
chunter2.class.ChatMessage,
|
|
171439
171570
|
project3._id,
|
|
171440
171571
|
issue2._id,
|
|
171441
|
-
|
|
171572
|
+
tracker2.class.Issue,
|
|
171442
171573
|
"comments",
|
|
171443
171574
|
commentData,
|
|
171444
171575
|
commentId
|
|
@@ -171449,7 +171580,7 @@ var addComment = (params) => Effect_exports.gen(function* () {
|
|
|
171449
171580
|
};
|
|
171450
171581
|
});
|
|
171451
171582
|
var updateComment = (params) => Effect_exports.gen(function* () {
|
|
171452
|
-
const { client,
|
|
171583
|
+
const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue2({
|
|
171453
171584
|
project: params.project,
|
|
171454
171585
|
issueIdentifier: params.issueIdentifier
|
|
171455
171586
|
});
|
|
@@ -171467,6 +171598,13 @@ var updateComment = (params) => Effect_exports.gen(function* () {
|
|
|
171467
171598
|
project: params.project
|
|
171468
171599
|
});
|
|
171469
171600
|
}
|
|
171601
|
+
if (params.body === comment.message) {
|
|
171602
|
+
return {
|
|
171603
|
+
commentId: params.commentId,
|
|
171604
|
+
issueIdentifier: issue2.identifier,
|
|
171605
|
+
updated: false
|
|
171606
|
+
};
|
|
171607
|
+
}
|
|
171470
171608
|
const updateOps = {
|
|
171471
171609
|
message: params.body,
|
|
171472
171610
|
editedOn: Date.now()
|
|
@@ -171484,7 +171622,7 @@ var updateComment = (params) => Effect_exports.gen(function* () {
|
|
|
171484
171622
|
};
|
|
171485
171623
|
});
|
|
171486
171624
|
var deleteComment = (params) => Effect_exports.gen(function* () {
|
|
171487
|
-
const { client,
|
|
171625
|
+
const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue2({
|
|
171488
171626
|
project: params.project,
|
|
171489
171627
|
issueIdentifier: params.issueIdentifier
|
|
171490
171628
|
});
|
|
@@ -171570,16 +171708,25 @@ var parseName = (name) => {
|
|
|
171570
171708
|
}
|
|
171571
171709
|
return { firstName: name, lastName: "" };
|
|
171572
171710
|
};
|
|
171573
|
-
var
|
|
171711
|
+
var batchGetEmailsForPersons = (client, personIds) => Effect_exports.gen(function* () {
|
|
171712
|
+
if (personIds.length === 0) {
|
|
171713
|
+
return /* @__PURE__ */ new Map();
|
|
171714
|
+
}
|
|
171574
171715
|
const channels = yield* client.findAll(
|
|
171575
171716
|
contact3.class.Channel,
|
|
171576
171717
|
{
|
|
171577
|
-
attachedTo:
|
|
171578
|
-
attachedToClass: contact3.class.Person,
|
|
171718
|
+
attachedTo: { $in: personIds },
|
|
171579
171719
|
provider: contact3.channelProvider.Email
|
|
171580
171720
|
}
|
|
171581
171721
|
);
|
|
171582
|
-
|
|
171722
|
+
const emailMap = /* @__PURE__ */ new Map();
|
|
171723
|
+
for (const channel of channels) {
|
|
171724
|
+
const personIdStr = String(channel.attachedTo);
|
|
171725
|
+
if (!emailMap.has(personIdStr)) {
|
|
171726
|
+
emailMap.set(personIdStr, channel.value);
|
|
171727
|
+
}
|
|
171728
|
+
}
|
|
171729
|
+
return emailMap;
|
|
171583
171730
|
});
|
|
171584
171731
|
var listPersons = (params) => Effect_exports.gen(function* () {
|
|
171585
171732
|
const client = yield* HulyClient;
|
|
@@ -171592,18 +171739,15 @@ var listPersons = (params) => Effect_exports.gen(function* () {
|
|
|
171592
171739
|
sort: { modifiedOn: import_core16.SortingOrder.Descending }
|
|
171593
171740
|
}
|
|
171594
171741
|
);
|
|
171595
|
-
const
|
|
171596
|
-
|
|
171597
|
-
|
|
171598
|
-
|
|
171599
|
-
|
|
171600
|
-
|
|
171601
|
-
|
|
171602
|
-
|
|
171603
|
-
|
|
171604
|
-
});
|
|
171605
|
-
}
|
|
171606
|
-
return summaries;
|
|
171742
|
+
const personIds = persons.map((p) => p._id);
|
|
171743
|
+
const emailMap = yield* batchGetEmailsForPersons(client, personIds);
|
|
171744
|
+
return persons.map((person) => ({
|
|
171745
|
+
id: String(person._id),
|
|
171746
|
+
name: person.name,
|
|
171747
|
+
city: person.city,
|
|
171748
|
+
email: emailMap.get(String(person._id)),
|
|
171749
|
+
modifiedOn: person.modifiedOn
|
|
171750
|
+
}));
|
|
171607
171751
|
});
|
|
171608
171752
|
var findPersonById = (client, personId) => client.findOne(
|
|
171609
171753
|
contact3.class.Person,
|
|
@@ -171744,19 +171888,16 @@ var listEmployees = (params) => Effect_exports.gen(function* () {
|
|
|
171744
171888
|
sort: { modifiedOn: import_core16.SortingOrder.Descending }
|
|
171745
171889
|
}
|
|
171746
171890
|
);
|
|
171747
|
-
const
|
|
171748
|
-
|
|
171749
|
-
|
|
171750
|
-
|
|
171751
|
-
|
|
171752
|
-
|
|
171753
|
-
|
|
171754
|
-
|
|
171755
|
-
|
|
171756
|
-
|
|
171757
|
-
});
|
|
171758
|
-
}
|
|
171759
|
-
return summaries;
|
|
171891
|
+
const employeeIds = employees.map((e) => e._id);
|
|
171892
|
+
const emailMap = yield* batchGetEmailsForPersons(client, employeeIds);
|
|
171893
|
+
return employees.map((emp) => ({
|
|
171894
|
+
id: String(emp._id),
|
|
171895
|
+
name: emp.name,
|
|
171896
|
+
email: emailMap.get(String(emp._id)),
|
|
171897
|
+
position: emp.position ?? void 0,
|
|
171898
|
+
active: emp.active,
|
|
171899
|
+
modifiedOn: emp.modifiedOn
|
|
171900
|
+
}));
|
|
171760
171901
|
});
|
|
171761
171902
|
var listOrganizations = (params) => Effect_exports.gen(function* () {
|
|
171762
171903
|
const client = yield* HulyClient;
|
|
@@ -171907,7 +172048,7 @@ var contactTools = [
|
|
|
171907
172048
|
// src/huly/operations/documents.ts
|
|
171908
172049
|
var import_core17 = __toESM(require_lib4(), 1);
|
|
171909
172050
|
var import_rank = __toESM(require_lib28(), 1);
|
|
171910
|
-
var documentPlugin =
|
|
172051
|
+
var documentPlugin = require_lib30().default;
|
|
171911
172052
|
var findTeamspace = (identifier2) => Effect_exports.gen(function* () {
|
|
171912
172053
|
const client = yield* HulyClient;
|
|
171913
172054
|
let teamspace = yield* client.findOne(
|
|
@@ -172187,11 +172328,11 @@ var documentTools = [
|
|
|
172187
172328
|
var import_core18 = __toESM(require_lib4(), 1);
|
|
172188
172329
|
var import_rank2 = __toESM(require_lib28(), 1);
|
|
172189
172330
|
var import_tracker = __toESM(require_lib26(), 1);
|
|
172190
|
-
var
|
|
172331
|
+
var tracker3 = require_lib26().default;
|
|
172191
172332
|
var contact4 = require_lib24().default;
|
|
172192
|
-
var
|
|
172333
|
+
var task2 = require_lib29().default;
|
|
172193
172334
|
var tags3 = require_lib31().default;
|
|
172194
|
-
var
|
|
172335
|
+
var core3 = require_lib4().default;
|
|
172195
172336
|
var priorityToString = (priority) => {
|
|
172196
172337
|
switch (priority) {
|
|
172197
172338
|
case import_tracker.IssuePriority.Urgent:
|
|
@@ -172226,94 +172367,34 @@ var stringToPriority = (priority) => {
|
|
|
172226
172367
|
throw new Error("Invalid priority");
|
|
172227
172368
|
}
|
|
172228
172369
|
};
|
|
172229
|
-
var isDoneStatus = (statusRef, statuses) => {
|
|
172230
|
-
const status = statuses.find((s) => String(s._id) === String(statusRef));
|
|
172231
|
-
if (!status?.category) return false;
|
|
172232
|
-
const wonCategory = task.statusCategory.Won;
|
|
172233
|
-
return status.category === wonCategory;
|
|
172234
|
-
};
|
|
172235
|
-
var isCanceledStatus = (statusRef, statuses) => {
|
|
172236
|
-
const status = statuses.find((s) => String(s._id) === String(statusRef));
|
|
172237
|
-
if (!status?.category) return false;
|
|
172238
|
-
const lostCategory = task.statusCategory.Lost;
|
|
172239
|
-
return status.category === lostCategory;
|
|
172240
|
-
};
|
|
172241
|
-
var findProject2 = (projectIdentifier) => Effect_exports.gen(function* () {
|
|
172242
|
-
const client = yield* HulyClient;
|
|
172243
|
-
const project3 = yield* client.findOne(
|
|
172244
|
-
tracker2.class.Project,
|
|
172245
|
-
{ identifier: projectIdentifier }
|
|
172246
|
-
);
|
|
172247
|
-
if (project3 === void 0) {
|
|
172248
|
-
return yield* new ProjectNotFoundError({ identifier: projectIdentifier });
|
|
172249
|
-
}
|
|
172250
|
-
return { client, project: project3 };
|
|
172251
|
-
});
|
|
172252
|
-
var findProjectAndIssue2 = (params) => Effect_exports.gen(function* () {
|
|
172253
|
-
const { client, project: project3 } = yield* findProject2(params.project);
|
|
172254
|
-
const { fullIdentifier, number: number9 } = parseIssueIdentifier2(
|
|
172255
|
-
params.identifier,
|
|
172256
|
-
params.project
|
|
172257
|
-
);
|
|
172258
|
-
let issue2 = yield* client.findOne(
|
|
172259
|
-
tracker2.class.Issue,
|
|
172260
|
-
{
|
|
172261
|
-
space: project3._id,
|
|
172262
|
-
identifier: fullIdentifier
|
|
172263
|
-
}
|
|
172264
|
-
);
|
|
172265
|
-
if (issue2 === void 0 && number9 !== null) {
|
|
172266
|
-
issue2 = yield* client.findOne(
|
|
172267
|
-
tracker2.class.Issue,
|
|
172268
|
-
{
|
|
172269
|
-
space: project3._id,
|
|
172270
|
-
number: number9
|
|
172271
|
-
}
|
|
172272
|
-
);
|
|
172273
|
-
}
|
|
172274
|
-
if (issue2 === void 0) {
|
|
172275
|
-
return yield* new IssueNotFoundError({
|
|
172276
|
-
identifier: params.identifier,
|
|
172277
|
-
project: params.project
|
|
172278
|
-
});
|
|
172279
|
-
}
|
|
172280
|
-
return { client, project: project3, issue: issue2 };
|
|
172281
|
-
});
|
|
172282
172370
|
var listIssues = (params) => Effect_exports.gen(function* () {
|
|
172283
|
-
const { client, project: project3 } = yield*
|
|
172284
|
-
const allStatuses = yield* client.findAll(
|
|
172285
|
-
tracker2.class.IssueStatus,
|
|
172286
|
-
{}
|
|
172287
|
-
);
|
|
172288
|
-
const statusList = allStatuses;
|
|
172371
|
+
const { client, project: project3, statuses } = yield* findProjectWithStatuses(params.project);
|
|
172289
172372
|
const query = {
|
|
172290
172373
|
space: project3._id
|
|
172291
172374
|
};
|
|
172292
172375
|
if (params.status !== void 0) {
|
|
172293
172376
|
const statusFilter = params.status.toLowerCase();
|
|
172294
172377
|
if (statusFilter === "open") {
|
|
172295
|
-
const doneAndCanceledStatuses =
|
|
172296
|
-
(s) => isDoneStatus(s._id, statusList) || isCanceledStatus(s._id, statusList)
|
|
172297
|
-
).map((s) => s._id);
|
|
172378
|
+
const doneAndCanceledStatuses = statuses.filter((s) => s.isDone || s.isCanceled).map((s) => s._id);
|
|
172298
172379
|
if (doneAndCanceledStatuses.length > 0) {
|
|
172299
172380
|
query.status = { $nin: doneAndCanceledStatuses };
|
|
172300
172381
|
}
|
|
172301
172382
|
} else if (statusFilter === "done") {
|
|
172302
|
-
const doneStatuses =
|
|
172383
|
+
const doneStatuses = statuses.filter((s) => s.isDone).map((s) => s._id);
|
|
172303
172384
|
if (doneStatuses.length > 0) {
|
|
172304
172385
|
query.status = { $in: doneStatuses };
|
|
172305
172386
|
} else {
|
|
172306
172387
|
return [];
|
|
172307
172388
|
}
|
|
172308
172389
|
} else if (statusFilter === "canceled") {
|
|
172309
|
-
const canceledStatuses =
|
|
172390
|
+
const canceledStatuses = statuses.filter((s) => s.isCanceled).map((s) => s._id);
|
|
172310
172391
|
if (canceledStatuses.length > 0) {
|
|
172311
172392
|
query.status = { $in: canceledStatuses };
|
|
172312
172393
|
} else {
|
|
172313
172394
|
return [];
|
|
172314
172395
|
}
|
|
172315
172396
|
} else {
|
|
172316
|
-
const matchingStatus =
|
|
172397
|
+
const matchingStatus = statuses.find(
|
|
172317
172398
|
(s) => s.name.toLowerCase() === statusFilter
|
|
172318
172399
|
);
|
|
172319
172400
|
if (matchingStatus === void 0) {
|
|
@@ -172335,7 +172416,7 @@ var listIssues = (params) => Effect_exports.gen(function* () {
|
|
|
172335
172416
|
}
|
|
172336
172417
|
const limit = Math.min(params.limit ?? 50, 200);
|
|
172337
172418
|
const issues = yield* client.findAll(
|
|
172338
|
-
|
|
172419
|
+
tracker3.class.Issue,
|
|
172339
172420
|
query,
|
|
172340
172421
|
{
|
|
172341
172422
|
limit,
|
|
@@ -172355,7 +172436,7 @@ var listIssues = (params) => Effect_exports.gen(function* () {
|
|
|
172355
172436
|
) : [];
|
|
172356
172437
|
const personMap = new Map(persons.map((p) => [p._id, p]));
|
|
172357
172438
|
const summaries = issues.map((issue2) => {
|
|
172358
|
-
const statusDoc =
|
|
172439
|
+
const statusDoc = statuses.find((s) => String(s._id) === String(issue2.status));
|
|
172359
172440
|
const statusName = statusDoc?.name ?? "Unknown";
|
|
172360
172441
|
const assigneeName = issue2.assignee !== null ? personMap.get(issue2.assignee)?.name : void 0;
|
|
172361
172442
|
return {
|
|
@@ -172401,32 +172482,23 @@ var findPersonByEmailOrName = (client, emailOrName) => Effect_exports.gen(functi
|
|
|
172401
172482
|
);
|
|
172402
172483
|
return matchingPerson;
|
|
172403
172484
|
});
|
|
172404
|
-
var parseIssueIdentifier2 = (identifier2, projectIdentifier) => {
|
|
172405
|
-
const idStr = String(identifier2).trim();
|
|
172406
|
-
const match16 = idStr.match(/^([A-Z]+)-(\d+)$/i);
|
|
172407
|
-
if (match16) {
|
|
172408
|
-
return {
|
|
172409
|
-
fullIdentifier: `${match16[1].toUpperCase()}-${match16[2]}`,
|
|
172410
|
-
number: parseInt(match16[2], 10)
|
|
172411
|
-
};
|
|
172412
|
-
}
|
|
172413
|
-
const numMatch = idStr.match(/^\d+$/);
|
|
172414
|
-
if (numMatch) {
|
|
172415
|
-
const num = parseInt(idStr, 10);
|
|
172416
|
-
return {
|
|
172417
|
-
fullIdentifier: `${projectIdentifier.toUpperCase()}-${num}`,
|
|
172418
|
-
number: num
|
|
172419
|
-
};
|
|
172420
|
-
}
|
|
172421
|
-
return { fullIdentifier: idStr, number: null };
|
|
172422
|
-
};
|
|
172423
172485
|
var getIssue = (params) => Effect_exports.gen(function* () {
|
|
172424
|
-
const { client,
|
|
172425
|
-
const
|
|
172426
|
-
|
|
172427
|
-
|
|
172486
|
+
const { client, project: project3, statuses } = yield* findProjectWithStatuses(params.project);
|
|
172487
|
+
const { fullIdentifier, number: number9 } = parseIssueIdentifier(params.identifier, params.project);
|
|
172488
|
+
let issue2 = yield* client.findOne(
|
|
172489
|
+
tracker3.class.Issue,
|
|
172490
|
+
{ space: project3._id, identifier: fullIdentifier }
|
|
172428
172491
|
);
|
|
172429
|
-
|
|
172492
|
+
if (issue2 === void 0 && number9 !== null) {
|
|
172493
|
+
issue2 = yield* client.findOne(
|
|
172494
|
+
tracker3.class.Issue,
|
|
172495
|
+
{ space: project3._id, number: number9 }
|
|
172496
|
+
);
|
|
172497
|
+
}
|
|
172498
|
+
if (issue2 === void 0) {
|
|
172499
|
+
return yield* new IssueNotFoundError({ identifier: params.identifier, project: params.project });
|
|
172500
|
+
}
|
|
172501
|
+
const statusDoc = statuses.find((s) => String(s._id) === String(issue2.status));
|
|
172430
172502
|
const statusName = statusDoc?.name ?? "Unknown";
|
|
172431
172503
|
let assigneeName;
|
|
172432
172504
|
let assigneeRef;
|
|
@@ -172470,11 +172542,16 @@ var getIssue = (params) => Effect_exports.gen(function* () {
|
|
|
172470
172542
|
return result;
|
|
172471
172543
|
});
|
|
172472
172544
|
var createIssue = (params) => Effect_exports.gen(function* () {
|
|
172473
|
-
const
|
|
172545
|
+
const result = params.status !== void 0 ? yield* findProjectWithStatuses(params.project) : yield* Effect_exports.map(findProject(params.project), ({ client: client2, project: project4 }) => ({
|
|
172546
|
+
client: client2,
|
|
172547
|
+
project: project4,
|
|
172548
|
+
statuses: []
|
|
172549
|
+
}));
|
|
172550
|
+
const { client, project: project3, statuses } = result;
|
|
172474
172551
|
const issueId = (0, import_core18.generateId)();
|
|
172475
172552
|
const incOps = { $inc: { sequence: 1 } };
|
|
172476
172553
|
const incResult = yield* client.updateDoc(
|
|
172477
|
-
|
|
172554
|
+
tracker3.class.Project,
|
|
172478
172555
|
"core:space:Space",
|
|
172479
172556
|
project3._id,
|
|
172480
172557
|
incOps,
|
|
@@ -172483,12 +172560,8 @@ var createIssue = (params) => Effect_exports.gen(function* () {
|
|
|
172483
172560
|
const sequence = incResult.object?.sequence ?? project3.sequence + 1;
|
|
172484
172561
|
let statusRef = project3.defaultIssueStatus;
|
|
172485
172562
|
if (params.status !== void 0) {
|
|
172486
|
-
const allStatuses = yield* client.findAll(
|
|
172487
|
-
tracker2.class.IssueStatus,
|
|
172488
|
-
{}
|
|
172489
|
-
);
|
|
172490
172563
|
const statusFilter = params.status.toLowerCase();
|
|
172491
|
-
const matchingStatus =
|
|
172564
|
+
const matchingStatus = statuses.find(
|
|
172492
172565
|
(s) => s.name.toLowerCase() === statusFilter
|
|
172493
172566
|
);
|
|
172494
172567
|
if (matchingStatus === void 0) {
|
|
@@ -172508,7 +172581,7 @@ var createIssue = (params) => Effect_exports.gen(function* () {
|
|
|
172508
172581
|
assigneeRef = person._id;
|
|
172509
172582
|
}
|
|
172510
172583
|
const lastIssue = yield* client.findOne(
|
|
172511
|
-
|
|
172584
|
+
tracker3.class.Issue,
|
|
172512
172585
|
{ space: project3._id },
|
|
172513
172586
|
{ sort: { rank: import_core18.SortingOrder.Descending } }
|
|
172514
172587
|
);
|
|
@@ -172516,7 +172589,7 @@ var createIssue = (params) => Effect_exports.gen(function* () {
|
|
|
172516
172589
|
let descriptionMarkupRef = null;
|
|
172517
172590
|
if (params.description !== void 0 && params.description.trim() !== "") {
|
|
172518
172591
|
descriptionMarkupRef = yield* client.uploadMarkup(
|
|
172519
|
-
|
|
172592
|
+
tracker3.class.Issue,
|
|
172520
172593
|
issueId,
|
|
172521
172594
|
"description",
|
|
172522
172595
|
params.description,
|
|
@@ -172530,7 +172603,7 @@ var createIssue = (params) => Effect_exports.gen(function* () {
|
|
|
172530
172603
|
description: descriptionMarkupRef,
|
|
172531
172604
|
status: statusRef,
|
|
172532
172605
|
number: sequence,
|
|
172533
|
-
kind:
|
|
172606
|
+
kind: tracker3.taskTypes.Issue,
|
|
172534
172607
|
identifier: identifier2,
|
|
172535
172608
|
priority,
|
|
172536
172609
|
assignee: assigneeRef,
|
|
@@ -172546,10 +172619,10 @@ var createIssue = (params) => Effect_exports.gen(function* () {
|
|
|
172546
172619
|
rank
|
|
172547
172620
|
};
|
|
172548
172621
|
yield* client.addCollection(
|
|
172549
|
-
|
|
172622
|
+
tracker3.class.Issue,
|
|
172550
172623
|
project3._id,
|
|
172551
172624
|
project3._id,
|
|
172552
|
-
|
|
172625
|
+
tracker3.class.Project,
|
|
172553
172626
|
"issues",
|
|
172554
172627
|
issueData,
|
|
172555
172628
|
issueId
|
|
@@ -172557,7 +172630,12 @@ var createIssue = (params) => Effect_exports.gen(function* () {
|
|
|
172557
172630
|
return { identifier: identifier2 };
|
|
172558
172631
|
});
|
|
172559
172632
|
var updateIssue = (params) => Effect_exports.gen(function* () {
|
|
172560
|
-
const { client, issue: issue2, project: project3 } = yield*
|
|
172633
|
+
const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue(params);
|
|
172634
|
+
let statuses = [];
|
|
172635
|
+
if (params.status !== void 0) {
|
|
172636
|
+
const result = yield* findProjectWithStatuses(params.project);
|
|
172637
|
+
statuses = result.statuses;
|
|
172638
|
+
}
|
|
172561
172639
|
const updateOps = {};
|
|
172562
172640
|
let descriptionUpdatedInPlace = false;
|
|
172563
172641
|
if (params.title !== void 0) {
|
|
@@ -172568,7 +172646,7 @@ var updateIssue = (params) => Effect_exports.gen(function* () {
|
|
|
172568
172646
|
updateOps.description = null;
|
|
172569
172647
|
} else if (issue2.description) {
|
|
172570
172648
|
yield* client.updateMarkup(
|
|
172571
|
-
|
|
172649
|
+
tracker3.class.Issue,
|
|
172572
172650
|
issue2._id,
|
|
172573
172651
|
"description",
|
|
172574
172652
|
params.description,
|
|
@@ -172577,7 +172655,7 @@ var updateIssue = (params) => Effect_exports.gen(function* () {
|
|
|
172577
172655
|
descriptionUpdatedInPlace = true;
|
|
172578
172656
|
} else {
|
|
172579
172657
|
const descriptionMarkupRef = yield* client.uploadMarkup(
|
|
172580
|
-
|
|
172658
|
+
tracker3.class.Issue,
|
|
172581
172659
|
issue2._id,
|
|
172582
172660
|
"description",
|
|
172583
172661
|
params.description,
|
|
@@ -172587,12 +172665,8 @@ var updateIssue = (params) => Effect_exports.gen(function* () {
|
|
|
172587
172665
|
}
|
|
172588
172666
|
}
|
|
172589
172667
|
if (params.status !== void 0) {
|
|
172590
|
-
const allStatuses = yield* client.findAll(
|
|
172591
|
-
tracker2.class.IssueStatus,
|
|
172592
|
-
{}
|
|
172593
|
-
);
|
|
172594
172668
|
const statusFilter = params.status.toLowerCase();
|
|
172595
|
-
const matchingStatus =
|
|
172669
|
+
const matchingStatus = statuses.find(
|
|
172596
172670
|
(s) => s.name.toLowerCase() === statusFilter
|
|
172597
172671
|
);
|
|
172598
172672
|
if (matchingStatus === void 0) {
|
|
@@ -172622,7 +172696,7 @@ var updateIssue = (params) => Effect_exports.gen(function* () {
|
|
|
172622
172696
|
}
|
|
172623
172697
|
if (Object.keys(updateOps).length > 0) {
|
|
172624
172698
|
yield* client.updateDoc(
|
|
172625
|
-
|
|
172699
|
+
tracker3.class.Issue,
|
|
172626
172700
|
project3._id,
|
|
172627
172701
|
issue2._id,
|
|
172628
172702
|
updateOps
|
|
@@ -172631,12 +172705,12 @@ var updateIssue = (params) => Effect_exports.gen(function* () {
|
|
|
172631
172705
|
return { identifier: issue2.identifier, updated: true };
|
|
172632
172706
|
});
|
|
172633
172707
|
var addLabel = (params) => Effect_exports.gen(function* () {
|
|
172634
|
-
const { client, issue: issue2, project: project3 } = yield*
|
|
172708
|
+
const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue(params);
|
|
172635
172709
|
const existingLabels = yield* client.findAll(
|
|
172636
172710
|
tags3.class.TagReference,
|
|
172637
172711
|
{
|
|
172638
172712
|
attachedTo: issue2._id,
|
|
172639
|
-
attachedToClass:
|
|
172713
|
+
attachedToClass: tracker3.class.Issue
|
|
172640
172714
|
}
|
|
172641
172715
|
);
|
|
172642
172716
|
const labelTitle = params.label.trim();
|
|
@@ -172651,7 +172725,7 @@ var addLabel = (params) => Effect_exports.gen(function* () {
|
|
|
172651
172725
|
tags3.class.TagElement,
|
|
172652
172726
|
{
|
|
172653
172727
|
title: labelTitle,
|
|
172654
|
-
targetClass:
|
|
172728
|
+
targetClass: tracker3.class.Issue
|
|
172655
172729
|
}
|
|
172656
172730
|
);
|
|
172657
172731
|
if (tagElement === void 0) {
|
|
@@ -172659,13 +172733,13 @@ var addLabel = (params) => Effect_exports.gen(function* () {
|
|
|
172659
172733
|
const tagElementData = {
|
|
172660
172734
|
title: labelTitle,
|
|
172661
172735
|
description: "",
|
|
172662
|
-
targetClass:
|
|
172736
|
+
targetClass: tracker3.class.Issue,
|
|
172663
172737
|
color,
|
|
172664
|
-
category:
|
|
172738
|
+
category: tracker3.category.Other
|
|
172665
172739
|
};
|
|
172666
172740
|
yield* client.createDoc(
|
|
172667
172741
|
tags3.class.TagElement,
|
|
172668
|
-
|
|
172742
|
+
core3.space.Workspace,
|
|
172669
172743
|
tagElementData,
|
|
172670
172744
|
tagElementId
|
|
172671
172745
|
);
|
|
@@ -172686,16 +172760,16 @@ var addLabel = (params) => Effect_exports.gen(function* () {
|
|
|
172686
172760
|
tags3.class.TagReference,
|
|
172687
172761
|
project3._id,
|
|
172688
172762
|
issue2._id,
|
|
172689
|
-
|
|
172763
|
+
tracker3.class.Issue,
|
|
172690
172764
|
"labels",
|
|
172691
172765
|
tagRefData
|
|
172692
172766
|
);
|
|
172693
172767
|
return { identifier: issue2.identifier, labelAdded: true };
|
|
172694
172768
|
});
|
|
172695
172769
|
var deleteIssue = (params) => Effect_exports.gen(function* () {
|
|
172696
|
-
const { client, issue: issue2, project: project3 } = yield*
|
|
172770
|
+
const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue(params);
|
|
172697
172771
|
yield* client.removeDoc(
|
|
172698
|
-
|
|
172772
|
+
tracker3.class.Issue,
|
|
172699
172773
|
project3._id,
|
|
172700
172774
|
issue2._id
|
|
172701
172775
|
);
|
|
@@ -172769,7 +172843,7 @@ var issueTools = [
|
|
|
172769
172843
|
// src/huly/operations/milestones.ts
|
|
172770
172844
|
var import_core19 = __toESM(require_lib4(), 1);
|
|
172771
172845
|
var import_tracker2 = __toESM(require_lib26(), 1);
|
|
172772
|
-
var
|
|
172846
|
+
var tracker4 = require_lib26().default;
|
|
172773
172847
|
var milestoneStatusToString = (status) => {
|
|
172774
172848
|
switch (status) {
|
|
172775
172849
|
case import_tracker2.MilestoneStatus.Planned:
|
|
@@ -172800,21 +172874,10 @@ var stringToMilestoneStatus = (status) => {
|
|
|
172800
172874
|
throw new Error("Invalid milestone status");
|
|
172801
172875
|
}
|
|
172802
172876
|
};
|
|
172803
|
-
var findProject3 = (projectIdentifier) => Effect_exports.gen(function* () {
|
|
172804
|
-
const client = yield* HulyClient;
|
|
172805
|
-
const project3 = yield* client.findOne(
|
|
172806
|
-
tracker3.class.Project,
|
|
172807
|
-
{ identifier: projectIdentifier }
|
|
172808
|
-
);
|
|
172809
|
-
if (project3 === void 0) {
|
|
172810
|
-
return yield* new ProjectNotFoundError({ identifier: projectIdentifier });
|
|
172811
|
-
}
|
|
172812
|
-
return { client, project: project3 };
|
|
172813
|
-
});
|
|
172814
172877
|
var findProjectAndMilestone = (params) => Effect_exports.gen(function* () {
|
|
172815
|
-
const { client, project: project3 } = yield*
|
|
172878
|
+
const { client, project: project3 } = yield* findProject(params.project);
|
|
172816
172879
|
let milestone = yield* client.findOne(
|
|
172817
|
-
|
|
172880
|
+
tracker4.class.Milestone,
|
|
172818
172881
|
{
|
|
172819
172882
|
space: project3._id,
|
|
172820
172883
|
_id: params.milestone
|
|
@@ -172822,7 +172885,7 @@ var findProjectAndMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
172822
172885
|
);
|
|
172823
172886
|
if (milestone === void 0) {
|
|
172824
172887
|
milestone = yield* client.findOne(
|
|
172825
|
-
|
|
172888
|
+
tracker4.class.Milestone,
|
|
172826
172889
|
{
|
|
172827
172890
|
space: project3._id,
|
|
172828
172891
|
label: params.milestone
|
|
@@ -172837,30 +172900,11 @@ var findProjectAndMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
172837
172900
|
}
|
|
172838
172901
|
return { client, project: project3, milestone };
|
|
172839
172902
|
});
|
|
172840
|
-
var parseIssueIdentifier3 = (identifier2, projectIdentifier) => {
|
|
172841
|
-
const idStr = String(identifier2).trim();
|
|
172842
|
-
const match16 = idStr.match(/^([A-Z]+)-(\d+)$/i);
|
|
172843
|
-
if (match16) {
|
|
172844
|
-
return {
|
|
172845
|
-
fullIdentifier: `${match16[1].toUpperCase()}-${match16[2]}`,
|
|
172846
|
-
number: parseInt(match16[2], 10)
|
|
172847
|
-
};
|
|
172848
|
-
}
|
|
172849
|
-
const numMatch = idStr.match(/^\d+$/);
|
|
172850
|
-
if (numMatch) {
|
|
172851
|
-
const num = parseInt(idStr, 10);
|
|
172852
|
-
return {
|
|
172853
|
-
fullIdentifier: `${projectIdentifier.toUpperCase()}-${num}`,
|
|
172854
|
-
number: num
|
|
172855
|
-
};
|
|
172856
|
-
}
|
|
172857
|
-
return { fullIdentifier: idStr, number: null };
|
|
172858
|
-
};
|
|
172859
172903
|
var listMilestones = (params) => Effect_exports.gen(function* () {
|
|
172860
|
-
const { client, project: project3 } = yield*
|
|
172904
|
+
const { client, project: project3 } = yield* findProject(params.project);
|
|
172861
172905
|
const limit = Math.min(params.limit ?? 50, 200);
|
|
172862
172906
|
const milestones = yield* client.findAll(
|
|
172863
|
-
|
|
172907
|
+
tracker4.class.Milestone,
|
|
172864
172908
|
{ space: project3._id },
|
|
172865
172909
|
{
|
|
172866
172910
|
limit,
|
|
@@ -172891,7 +172935,7 @@ var getMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
172891
172935
|
return result;
|
|
172892
172936
|
});
|
|
172893
172937
|
var createMilestone = (params) => Effect_exports.gen(function* () {
|
|
172894
|
-
const { client, project: project3 } = yield*
|
|
172938
|
+
const { client, project: project3 } = yield* findProject(params.project);
|
|
172895
172939
|
const milestoneId = (0, import_core19.generateId)();
|
|
172896
172940
|
const milestoneData = {
|
|
172897
172941
|
label: params.label,
|
|
@@ -172901,7 +172945,7 @@ var createMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
172901
172945
|
comments: 0
|
|
172902
172946
|
};
|
|
172903
172947
|
yield* client.createDoc(
|
|
172904
|
-
|
|
172948
|
+
tracker4.class.Milestone,
|
|
172905
172949
|
project3._id,
|
|
172906
172950
|
milestoneData,
|
|
172907
172951
|
milestoneId
|
|
@@ -172927,7 +172971,7 @@ var updateMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
172927
172971
|
return { id: String(milestone._id), updated: false };
|
|
172928
172972
|
}
|
|
172929
172973
|
yield* client.updateDoc(
|
|
172930
|
-
|
|
172974
|
+
tracker4.class.Milestone,
|
|
172931
172975
|
project3._id,
|
|
172932
172976
|
milestone._id,
|
|
172933
172977
|
updateOps
|
|
@@ -172935,13 +172979,13 @@ var updateMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
172935
172979
|
return { id: String(milestone._id), updated: true };
|
|
172936
172980
|
});
|
|
172937
172981
|
var setIssueMilestone = (params) => Effect_exports.gen(function* () {
|
|
172938
|
-
const { client, project: project3 } = yield*
|
|
172939
|
-
const { fullIdentifier, number: number9 } =
|
|
172982
|
+
const { client, project: project3 } = yield* findProject(params.project);
|
|
172983
|
+
const { fullIdentifier, number: number9 } = parseIssueIdentifier(
|
|
172940
172984
|
params.identifier,
|
|
172941
172985
|
params.project
|
|
172942
172986
|
);
|
|
172943
172987
|
let issue2 = yield* client.findOne(
|
|
172944
|
-
|
|
172988
|
+
tracker4.class.Issue,
|
|
172945
172989
|
{
|
|
172946
172990
|
space: project3._id,
|
|
172947
172991
|
identifier: fullIdentifier
|
|
@@ -172949,7 +172993,7 @@ var setIssueMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
172949
172993
|
);
|
|
172950
172994
|
if (issue2 === void 0 && number9 !== null) {
|
|
172951
172995
|
issue2 = yield* client.findOne(
|
|
172952
|
-
|
|
172996
|
+
tracker4.class.Issue,
|
|
172953
172997
|
{
|
|
172954
172998
|
space: project3._id,
|
|
172955
172999
|
number: number9
|
|
@@ -172957,7 +173001,7 @@ var setIssueMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
172957
173001
|
);
|
|
172958
173002
|
}
|
|
172959
173003
|
if (issue2 === void 0) {
|
|
172960
|
-
return yield* new
|
|
173004
|
+
return yield* new IssueNotFoundError2({
|
|
172961
173005
|
identifier: params.identifier,
|
|
172962
173006
|
project: params.project
|
|
172963
173007
|
});
|
|
@@ -172965,7 +173009,7 @@ var setIssueMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
172965
173009
|
let milestoneRef = null;
|
|
172966
173010
|
if (params.milestone !== null) {
|
|
172967
173011
|
let milestone = yield* client.findOne(
|
|
172968
|
-
|
|
173012
|
+
tracker4.class.Milestone,
|
|
172969
173013
|
{
|
|
172970
173014
|
space: project3._id,
|
|
172971
173015
|
_id: params.milestone
|
|
@@ -172973,7 +173017,7 @@ var setIssueMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
172973
173017
|
);
|
|
172974
173018
|
if (milestone === void 0) {
|
|
172975
173019
|
milestone = yield* client.findOne(
|
|
172976
|
-
|
|
173020
|
+
tracker4.class.Milestone,
|
|
172977
173021
|
{
|
|
172978
173022
|
space: project3._id,
|
|
172979
173023
|
label: params.milestone
|
|
@@ -172989,7 +173033,7 @@ var setIssueMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
172989
173033
|
milestoneRef = milestone._id;
|
|
172990
173034
|
}
|
|
172991
173035
|
yield* client.updateDoc(
|
|
172992
|
-
|
|
173036
|
+
tracker4.class.Issue,
|
|
172993
173037
|
project3._id,
|
|
172994
173038
|
issue2._id,
|
|
172995
173039
|
{ milestone: milestoneRef }
|
|
@@ -172999,7 +173043,7 @@ var setIssueMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
172999
173043
|
var deleteMilestone = (params) => Effect_exports.gen(function* () {
|
|
173000
173044
|
const { client, milestone, project: project3 } = yield* findProjectAndMilestone(params);
|
|
173001
173045
|
yield* client.removeDoc(
|
|
173002
|
-
|
|
173046
|
+
tracker4.class.Milestone,
|
|
173003
173047
|
project3._id,
|
|
173004
173048
|
milestone._id
|
|
173005
173049
|
);
|
|
@@ -173073,7 +173117,7 @@ var milestoneTools = [
|
|
|
173073
173117
|
// src/huly/operations/projects.ts
|
|
173074
173118
|
var import_core20 = __toESM(require_lib4(), 1);
|
|
173075
173119
|
var import_tracker3 = __toESM(require_lib26(), 1);
|
|
173076
|
-
var
|
|
173120
|
+
var tracker5 = require_lib26().default;
|
|
173077
173121
|
var listProjects = (params) => Effect_exports.gen(function* () {
|
|
173078
173122
|
const client = yield* HulyClient;
|
|
173079
173123
|
const query = {};
|
|
@@ -173082,7 +173126,7 @@ var listProjects = (params) => Effect_exports.gen(function* () {
|
|
|
173082
173126
|
}
|
|
173083
173127
|
const limit = Math.min(params.limit ?? 50, 200);
|
|
173084
173128
|
const projects = yield* client.findAll(
|
|
173085
|
-
|
|
173129
|
+
tracker5.class.Project,
|
|
173086
173130
|
query,
|
|
173087
173131
|
{
|
|
173088
173132
|
limit,
|
|
@@ -173148,65 +173192,11 @@ var storageTools = [
|
|
|
173148
173192
|
var import_calendar5 = __toESM(require_lib23(), 1);
|
|
173149
173193
|
var import_core21 = __toESM(require_lib4(), 1);
|
|
173150
173194
|
var import_tracker4 = __toESM(require_lib26(), 1);
|
|
173151
|
-
var
|
|
173195
|
+
var tracker6 = require_lib26().default;
|
|
173152
173196
|
var contact5 = require_lib24().default;
|
|
173153
173197
|
var time3 = require_lib32().default;
|
|
173154
|
-
var parseIssueIdentifier4 = (identifier2, projectIdentifier) => {
|
|
173155
|
-
const idStr = String(identifier2).trim();
|
|
173156
|
-
const match16 = idStr.match(/^([A-Z]+)-(\d+)$/i);
|
|
173157
|
-
if (match16) {
|
|
173158
|
-
return {
|
|
173159
|
-
fullIdentifier: `${match16[1].toUpperCase()}-${match16[2]}`,
|
|
173160
|
-
number: parseInt(match16[2], 10)
|
|
173161
|
-
};
|
|
173162
|
-
}
|
|
173163
|
-
const numMatch = idStr.match(/^\d+$/);
|
|
173164
|
-
if (numMatch) {
|
|
173165
|
-
const num = parseInt(idStr, 10);
|
|
173166
|
-
return {
|
|
173167
|
-
fullIdentifier: `${projectIdentifier.toUpperCase()}-${num}`,
|
|
173168
|
-
number: num
|
|
173169
|
-
};
|
|
173170
|
-
}
|
|
173171
|
-
return { fullIdentifier: idStr, number: null };
|
|
173172
|
-
};
|
|
173173
|
-
var findProject4 = (projectIdentifier) => Effect_exports.gen(function* () {
|
|
173174
|
-
const client = yield* HulyClient;
|
|
173175
|
-
const project3 = yield* client.findOne(
|
|
173176
|
-
tracker5.class.Project,
|
|
173177
|
-
{ identifier: projectIdentifier }
|
|
173178
|
-
);
|
|
173179
|
-
if (project3 === void 0) {
|
|
173180
|
-
return yield* new ProjectNotFoundError({ identifier: projectIdentifier });
|
|
173181
|
-
}
|
|
173182
|
-
return { client, project: project3 };
|
|
173183
|
-
});
|
|
173184
|
-
var findProjectAndIssue3 = (params) => Effect_exports.gen(function* () {
|
|
173185
|
-
const { client, project: project3 } = yield* findProject4(params.project);
|
|
173186
|
-
const { fullIdentifier, number: number9 } = parseIssueIdentifier4(
|
|
173187
|
-
params.identifier,
|
|
173188
|
-
params.project
|
|
173189
|
-
);
|
|
173190
|
-
let issue2 = yield* client.findOne(
|
|
173191
|
-
tracker5.class.Issue,
|
|
173192
|
-
{ space: project3._id, identifier: fullIdentifier }
|
|
173193
|
-
);
|
|
173194
|
-
if (issue2 === void 0 && number9 !== null) {
|
|
173195
|
-
issue2 = yield* client.findOne(
|
|
173196
|
-
tracker5.class.Issue,
|
|
173197
|
-
{ space: project3._id, number: number9 }
|
|
173198
|
-
);
|
|
173199
|
-
}
|
|
173200
|
-
if (issue2 === void 0) {
|
|
173201
|
-
return yield* new IssueNotFoundError({
|
|
173202
|
-
identifier: params.identifier,
|
|
173203
|
-
project: params.project
|
|
173204
|
-
});
|
|
173205
|
-
}
|
|
173206
|
-
return { client, project: project3, issue: issue2 };
|
|
173207
|
-
});
|
|
173208
173198
|
var logTime = (params) => Effect_exports.gen(function* () {
|
|
173209
|
-
const { client, issue: issue2, project: project3 } = yield*
|
|
173199
|
+
const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue({
|
|
173210
173200
|
project: params.project,
|
|
173211
173201
|
identifier: params.identifier
|
|
173212
173202
|
});
|
|
@@ -173218,10 +173208,10 @@ var logTime = (params) => Effect_exports.gen(function* () {
|
|
|
173218
173208
|
description: params.description ?? ""
|
|
173219
173209
|
};
|
|
173220
173210
|
yield* client.addCollection(
|
|
173221
|
-
|
|
173211
|
+
tracker6.class.TimeSpendReport,
|
|
173222
173212
|
project3._id,
|
|
173223
173213
|
issue2._id,
|
|
173224
|
-
|
|
173214
|
+
tracker6.class.Issue,
|
|
173225
173215
|
"reports",
|
|
173226
173216
|
reportData,
|
|
173227
173217
|
reportId
|
|
@@ -173234,7 +173224,7 @@ var logTime = (params) => Effect_exports.gen(function* () {
|
|
|
173234
173224
|
updateOps.remainingTime = newRemaining;
|
|
173235
173225
|
}
|
|
173236
173226
|
yield* client.updateDoc(
|
|
173237
|
-
|
|
173227
|
+
tracker6.class.Issue,
|
|
173238
173228
|
project3._id,
|
|
173239
173229
|
issue2._id,
|
|
173240
173230
|
updateOps
|
|
@@ -173242,12 +173232,12 @@ var logTime = (params) => Effect_exports.gen(function* () {
|
|
|
173242
173232
|
return { reportId: String(reportId), identifier: issue2.identifier };
|
|
173243
173233
|
});
|
|
173244
173234
|
var getTimeReport = (params) => Effect_exports.gen(function* () {
|
|
173245
|
-
const { client, issue: issue2 } = yield*
|
|
173235
|
+
const { client, issue: issue2 } = yield* findProjectAndIssue({
|
|
173246
173236
|
project: params.project,
|
|
173247
173237
|
identifier: params.identifier
|
|
173248
173238
|
});
|
|
173249
173239
|
const reports = yield* client.findAll(
|
|
173250
|
-
|
|
173240
|
+
tracker6.class.TimeSpendReport,
|
|
173251
173241
|
{ attachedTo: issue2._id },
|
|
173252
173242
|
{ sort: { date: import_core21.SortingOrder.Descending } }
|
|
173253
173243
|
);
|
|
@@ -173282,7 +173272,7 @@ var listTimeSpendReports = (params) => Effect_exports.gen(function* () {
|
|
|
173282
173272
|
const query = {};
|
|
173283
173273
|
if (params.project !== void 0) {
|
|
173284
173274
|
const project3 = yield* client.findOne(
|
|
173285
|
-
|
|
173275
|
+
tracker6.class.Project,
|
|
173286
173276
|
{ identifier: params.project }
|
|
173287
173277
|
);
|
|
173288
173278
|
if (project3 === void 0) {
|
|
@@ -173298,13 +173288,13 @@ var listTimeSpendReports = (params) => Effect_exports.gen(function* () {
|
|
|
173298
173288
|
}
|
|
173299
173289
|
const limit = Math.min(params.limit ?? 50, 200);
|
|
173300
173290
|
const reports = yield* client.findAll(
|
|
173301
|
-
|
|
173291
|
+
tracker6.class.TimeSpendReport,
|
|
173302
173292
|
query,
|
|
173303
173293
|
{ limit, sort: { date: import_core21.SortingOrder.Descending } }
|
|
173304
173294
|
);
|
|
173305
173295
|
const issueIds = [...new Set(reports.map((r) => r.attachedTo))];
|
|
173306
173296
|
const issues = issueIds.length > 0 ? yield* client.findAll(
|
|
173307
|
-
|
|
173297
|
+
tracker6.class.Issue,
|
|
173308
173298
|
{ _id: { $in: issueIds } }
|
|
173309
173299
|
) : [];
|
|
173310
173300
|
const issueMap = new Map(issues.map((i) => [String(i._id), i.identifier]));
|
|
@@ -173328,7 +173318,7 @@ var listTimeSpendReports = (params) => Effect_exports.gen(function* () {
|
|
|
173328
173318
|
}));
|
|
173329
173319
|
});
|
|
173330
173320
|
var getDetailedTimeReport = (params) => Effect_exports.gen(function* () {
|
|
173331
|
-
const { client, project: project3 } = yield*
|
|
173321
|
+
const { client, project: project3 } = yield* findProject(params.project);
|
|
173332
173322
|
const query = { space: project3._id };
|
|
173333
173323
|
if (params.from !== void 0 || params.to !== void 0) {
|
|
173334
173324
|
const dateFilter = {};
|
|
@@ -173337,13 +173327,13 @@ var getDetailedTimeReport = (params) => Effect_exports.gen(function* () {
|
|
|
173337
173327
|
query.date = dateFilter;
|
|
173338
173328
|
}
|
|
173339
173329
|
const reports = yield* client.findAll(
|
|
173340
|
-
|
|
173330
|
+
tracker6.class.TimeSpendReport,
|
|
173341
173331
|
query,
|
|
173342
173332
|
{ sort: { date: import_core21.SortingOrder.Descending } }
|
|
173343
173333
|
);
|
|
173344
173334
|
const issueIds = [...new Set(reports.map((r) => r.attachedTo))];
|
|
173345
173335
|
const issues = issueIds.length > 0 ? yield* client.findAll(
|
|
173346
|
-
|
|
173336
|
+
tracker6.class.Issue,
|
|
173347
173337
|
{ _id: { $in: issueIds } }
|
|
173348
173338
|
) : [];
|
|
173349
173339
|
const issueMap = new Map(issues.map((i) => [String(i._id), i]));
|
|
@@ -173450,8 +173440,8 @@ var createWorkSlot = (params) => Effect_exports.gen(function* () {
|
|
|
173450
173440
|
reminders: [],
|
|
173451
173441
|
visibility: "public",
|
|
173452
173442
|
eventId: "",
|
|
173453
|
-
calendar:
|
|
173454
|
-
user:
|
|
173443
|
+
calendar: "",
|
|
173444
|
+
user: "",
|
|
173455
173445
|
blockTime: false
|
|
173456
173446
|
};
|
|
173457
173447
|
yield* client.addCollection(
|
|
@@ -173466,7 +173456,7 @@ var createWorkSlot = (params) => Effect_exports.gen(function* () {
|
|
|
173466
173456
|
return { slotId: String(slotId) };
|
|
173467
173457
|
});
|
|
173468
173458
|
var startTimer = (params) => Effect_exports.gen(function* () {
|
|
173469
|
-
const { issue: issue2 } = yield*
|
|
173459
|
+
const { issue: issue2 } = yield* findProjectAndIssue({
|
|
173470
173460
|
project: params.project,
|
|
173471
173461
|
identifier: params.identifier
|
|
173472
173462
|
});
|
|
@@ -173477,7 +173467,7 @@ var startTimer = (params) => Effect_exports.gen(function* () {
|
|
|
173477
173467
|
};
|
|
173478
173468
|
});
|
|
173479
173469
|
var stopTimer = (params) => Effect_exports.gen(function* () {
|
|
173480
|
-
const { issue: issue2 } = yield*
|
|
173470
|
+
const { issue: issue2 } = yield* findProjectAndIssue({
|
|
173481
173471
|
project: params.project,
|
|
173482
173472
|
identifier: params.identifier
|
|
173483
173473
|
});
|
|
@@ -173682,9 +173672,17 @@ var McpServerService = class _McpServerService extends Context_exports.Tag("@hul
|
|
|
173682
173672
|
};
|
|
173683
173673
|
process.on("SIGINT", cleanup);
|
|
173684
173674
|
process.on("SIGTERM", cleanup);
|
|
173675
|
+
if (config3.autoExit) {
|
|
173676
|
+
process.stdin.on("end", cleanup);
|
|
173677
|
+
process.stdin.on("close", cleanup);
|
|
173678
|
+
}
|
|
173685
173679
|
return Effect_exports.sync(() => {
|
|
173686
173680
|
process.off("SIGINT", cleanup);
|
|
173687
173681
|
process.off("SIGTERM", cleanup);
|
|
173682
|
+
if (config3.autoExit) {
|
|
173683
|
+
process.stdin.off("end", cleanup);
|
|
173684
|
+
process.stdin.off("close", cleanup);
|
|
173685
|
+
}
|
|
173688
173686
|
});
|
|
173689
173687
|
});
|
|
173690
173688
|
yield* Effect_exports.tryPromise({
|
|
@@ -173773,7 +173771,10 @@ var getHttpPort = Config_exports.integer("MCP_HTTP_PORT").pipe(
|
|
|
173773
173771
|
var getHttpHost = Config_exports.string("MCP_HTTP_HOST").pipe(
|
|
173774
173772
|
Config_exports.withDefault("127.0.0.1")
|
|
173775
173773
|
);
|
|
173776
|
-
var
|
|
173774
|
+
var getAutoExit = Config_exports.boolean("MCP_AUTO_EXIT").pipe(
|
|
173775
|
+
Config_exports.withDefault(false)
|
|
173776
|
+
);
|
|
173777
|
+
var buildAppLayer = (transport, httpPort, httpHost, autoExit) => {
|
|
173777
173778
|
const configLayer = HulyConfigService.layer;
|
|
173778
173779
|
const hulyClientLayer = HulyClient.layer.pipe(
|
|
173779
173780
|
Layer_exports.provide(configLayer)
|
|
@@ -173785,7 +173786,8 @@ var buildAppLayer = (transport, httpPort, httpHost) => {
|
|
|
173785
173786
|
const mcpServerLayer = McpServerService.layer({
|
|
173786
173787
|
transport,
|
|
173787
173788
|
httpPort,
|
|
173788
|
-
httpHost
|
|
173789
|
+
httpHost,
|
|
173790
|
+
autoExit
|
|
173789
173791
|
}).pipe(Layer_exports.provide(combinedClientLayer));
|
|
173790
173792
|
return Layer_exports.merge(mcpServerLayer, HttpServerFactoryService.defaultLayer);
|
|
173791
173793
|
};
|
|
@@ -173793,7 +173795,8 @@ var main = Effect_exports.gen(function* () {
|
|
|
173793
173795
|
const transport = yield* getTransportType;
|
|
173794
173796
|
const httpPort = yield* getHttpPort;
|
|
173795
173797
|
const httpHost = yield* getHttpHost;
|
|
173796
|
-
const
|
|
173798
|
+
const autoExit = yield* getAutoExit;
|
|
173799
|
+
const appLayer = buildAppLayer(transport, httpPort, httpHost, autoExit);
|
|
173797
173800
|
yield* Effect_exports.gen(function* () {
|
|
173798
173801
|
const server = yield* McpServerService;
|
|
173799
173802
|
yield* server.run();
|