@firfi/huly-mcp 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +133 -970
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +21 -21
package/dist/index.cjs
CHANGED
|
@@ -83977,891 +83977,6 @@ var require_lib20 = __commonJS({
|
|
|
83977
83977
|
}
|
|
83978
83978
|
});
|
|
83979
83979
|
|
|
83980
|
-
// node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/platform.js
|
|
83981
|
-
var require_platform2 = __commonJS({
|
|
83982
|
-
"node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/platform.js"(exports2, module2) {
|
|
83983
|
-
"use strict";
|
|
83984
|
-
var __defProp2 = Object.defineProperty;
|
|
83985
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
83986
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
83987
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
83988
|
-
var __name = (target, value3) => __defProp2(target, "name", { value: value3, configurable: true });
|
|
83989
|
-
var __export2 = (target, all8) => {
|
|
83990
|
-
for (var name in all8)
|
|
83991
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
83992
|
-
};
|
|
83993
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
83994
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
83995
|
-
for (let key of __getOwnPropNames2(from))
|
|
83996
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
83997
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
83998
|
-
}
|
|
83999
|
-
return to;
|
|
84000
|
-
};
|
|
84001
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
84002
|
-
var platform_exports = {};
|
|
84003
|
-
__export2(platform_exports, {
|
|
84004
|
-
_EmbeddedId: () => _EmbeddedId,
|
|
84005
|
-
_ID_SEPARATOR: () => _ID_SEPARATOR,
|
|
84006
|
-
default: () => platform_default,
|
|
84007
|
-
getEmbeddedLabel: () => getEmbeddedLabel,
|
|
84008
|
-
mergeIds: () => mergeIds,
|
|
84009
|
-
platformId: () => platformId,
|
|
84010
|
-
plugin: () => plugin
|
|
84011
|
-
});
|
|
84012
|
-
module2.exports = __toCommonJS2(platform_exports);
|
|
84013
|
-
var _ID_SEPARATOR = ":";
|
|
84014
|
-
var _EmbeddedId = "embedded";
|
|
84015
|
-
function identify(result, prefix, namespace) {
|
|
84016
|
-
for (const key in namespace) {
|
|
84017
|
-
const value3 = namespace[key];
|
|
84018
|
-
if (typeof result[key] === "string") {
|
|
84019
|
-
throw new Error(`'identify' overwrites '${key}' for ${prefix}`);
|
|
84020
|
-
}
|
|
84021
|
-
const ident = prefix + _ID_SEPARATOR + key;
|
|
84022
|
-
result[key] = typeof value3 === "string" ? ident : identify(result[key] ?? {}, ident, value3);
|
|
84023
|
-
}
|
|
84024
|
-
return result;
|
|
84025
|
-
}
|
|
84026
|
-
__name(identify, "identify");
|
|
84027
|
-
function getEmbeddedLabel(str) {
|
|
84028
|
-
return _EmbeddedId + _ID_SEPARATOR + _EmbeddedId + _ID_SEPARATOR + str;
|
|
84029
|
-
}
|
|
84030
|
-
__name(getEmbeddedLabel, "getEmbeddedLabel");
|
|
84031
|
-
function plugin(plugin2, namespace) {
|
|
84032
|
-
return identify({}, plugin2, namespace);
|
|
84033
|
-
}
|
|
84034
|
-
__name(plugin, "plugin");
|
|
84035
|
-
function mergeIds(plugin2, ns, merge10) {
|
|
84036
|
-
return identify({ ...ns }, plugin2, merge10);
|
|
84037
|
-
}
|
|
84038
|
-
__name(mergeIds, "mergeIds");
|
|
84039
|
-
var platformId = "platform";
|
|
84040
|
-
var platform_default = plugin(platformId, {
|
|
84041
|
-
status: {
|
|
84042
|
-
OK: "",
|
|
84043
|
-
BadError: "",
|
|
84044
|
-
UnknownError: "",
|
|
84045
|
-
InvalidId: "",
|
|
84046
|
-
ConnectionClosed: "",
|
|
84047
|
-
LoadingPlugin: "",
|
|
84048
|
-
NoLocationForPlugin: "",
|
|
84049
|
-
ResourceNotFound: "",
|
|
84050
|
-
NoLoaderForStrings: "",
|
|
84051
|
-
BadRequest: "",
|
|
84052
|
-
Forbidden: "",
|
|
84053
|
-
// 403
|
|
84054
|
-
Unauthorized: "",
|
|
84055
|
-
// 401
|
|
84056
|
-
TokenExpired: "",
|
|
84057
|
-
// 401
|
|
84058
|
-
TokenNotActive: "",
|
|
84059
|
-
// 401
|
|
84060
|
-
PasswordExpired: "",
|
|
84061
|
-
// 401
|
|
84062
|
-
Conflict: "",
|
|
84063
|
-
// 409
|
|
84064
|
-
ExpiredLink: "",
|
|
84065
|
-
UnknownMethod: "",
|
|
84066
|
-
InternalServerError: "",
|
|
84067
|
-
MaintenanceWarning: "",
|
|
84068
|
-
MaintenanceWarningTime: "",
|
|
84069
|
-
AccountNotFound: "",
|
|
84070
|
-
AccountMismatch: "",
|
|
84071
|
-
AccountNotConfirmed: "",
|
|
84072
|
-
WorkspaceNotFound: "",
|
|
84073
|
-
WorkspaceArchived: "",
|
|
84074
|
-
WorkspaceMigration: "",
|
|
84075
|
-
SocialIdNotFound: "",
|
|
84076
|
-
SocialIdNotConfirmed: "",
|
|
84077
|
-
SocialIdAlreadyConfirmed: "",
|
|
84078
|
-
IntegrationExists: "",
|
|
84079
|
-
IntegrationAlreadyExists: "",
|
|
84080
|
-
IntegrationNotFound: "",
|
|
84081
|
-
IntegrationSecretAlreadyExists: "",
|
|
84082
|
-
IntegrationSecretNotFound: "",
|
|
84083
|
-
PersonNotFound: "",
|
|
84084
|
-
InvalidPassword: "",
|
|
84085
|
-
PasswordLoginLocked: "",
|
|
84086
|
-
AccountAlreadyExists: "",
|
|
84087
|
-
WorkspaceAlreadyExists: "",
|
|
84088
|
-
WorkspaceRateLimit: "",
|
|
84089
|
-
WorkspaceLimitReached: "",
|
|
84090
|
-
InvalidOtp: "",
|
|
84091
|
-
InviteNotFound: "",
|
|
84092
|
-
MailboxError: "",
|
|
84093
|
-
SocialIdAlreadyExists: "",
|
|
84094
|
-
ReadOnlyAccount: "",
|
|
84095
|
-
RegularAccount: "",
|
|
84096
|
-
SystemAccount: ""
|
|
84097
|
-
},
|
|
84098
|
-
metadata: {
|
|
84099
|
-
locale: "",
|
|
84100
|
-
LoadHelper: ""
|
|
84101
|
-
}
|
|
84102
|
-
});
|
|
84103
|
-
}
|
|
84104
|
-
});
|
|
84105
|
-
|
|
84106
|
-
// node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/status.js
|
|
84107
|
-
var require_status3 = __commonJS({
|
|
84108
|
-
"node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/status.js"(exports2, module2) {
|
|
84109
|
-
"use strict";
|
|
84110
|
-
var __create2 = Object.create;
|
|
84111
|
-
var __defProp2 = Object.defineProperty;
|
|
84112
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
84113
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
84114
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
84115
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
84116
|
-
var __name = (target, value3) => __defProp2(target, "name", { value: value3, configurable: true });
|
|
84117
|
-
var __export2 = (target, all8) => {
|
|
84118
|
-
for (var name in all8)
|
|
84119
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
84120
|
-
};
|
|
84121
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
84122
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
84123
|
-
for (let key of __getOwnPropNames2(from))
|
|
84124
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
84125
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
84126
|
-
}
|
|
84127
|
-
return to;
|
|
84128
|
-
};
|
|
84129
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
84130
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
84131
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
84132
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
84133
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
84134
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
84135
|
-
mod
|
|
84136
|
-
));
|
|
84137
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
84138
|
-
var status_exports = {};
|
|
84139
|
-
__export2(status_exports, {
|
|
84140
|
-
ERROR: () => ERROR,
|
|
84141
|
-
OK: () => OK2,
|
|
84142
|
-
PlatformError: () => PlatformError2,
|
|
84143
|
-
Severity: () => Severity,
|
|
84144
|
-
Status: () => Status,
|
|
84145
|
-
UNAUTHORIZED: () => UNAUTHORIZED,
|
|
84146
|
-
unknownError: () => unknownError,
|
|
84147
|
-
unknownStatus: () => unknownStatus
|
|
84148
|
-
});
|
|
84149
|
-
module2.exports = __toCommonJS2(status_exports);
|
|
84150
|
-
var import_platform2 = __toESM2(require_platform2());
|
|
84151
|
-
var Severity = /* @__PURE__ */ ((Severity2) => {
|
|
84152
|
-
Severity2["OK"] = "OK";
|
|
84153
|
-
Severity2["INFO"] = "INFO";
|
|
84154
|
-
Severity2["WARNING"] = "WARNING";
|
|
84155
|
-
Severity2["ERROR"] = "ERROR";
|
|
84156
|
-
return Severity2;
|
|
84157
|
-
})(Severity || {});
|
|
84158
|
-
var Status = class {
|
|
84159
|
-
static {
|
|
84160
|
-
__name(this, "Status");
|
|
84161
|
-
}
|
|
84162
|
-
severity;
|
|
84163
|
-
code;
|
|
84164
|
-
params;
|
|
84165
|
-
constructor(severity, code, params) {
|
|
84166
|
-
this.severity = severity;
|
|
84167
|
-
this.code = code;
|
|
84168
|
-
this.params = params;
|
|
84169
|
-
}
|
|
84170
|
-
};
|
|
84171
|
-
var PlatformError2 = class extends Error {
|
|
84172
|
-
static {
|
|
84173
|
-
__name(this, "PlatformError");
|
|
84174
|
-
}
|
|
84175
|
-
status;
|
|
84176
|
-
constructor(status) {
|
|
84177
|
-
super(`${status.severity}: ${status.code} ${JSON.stringify(status.params)}`);
|
|
84178
|
-
this.status = status;
|
|
84179
|
-
}
|
|
84180
|
-
};
|
|
84181
|
-
var OK2 = new Status("OK", import_platform2.default.status.OK, {});
|
|
84182
|
-
var ERROR = new Status("ERROR", import_platform2.default.status.BadError, {});
|
|
84183
|
-
var UNAUTHORIZED = new Status("ERROR", import_platform2.default.status.Unauthorized, {});
|
|
84184
|
-
function unknownStatus(message) {
|
|
84185
|
-
return new Status("ERROR", import_platform2.default.status.UnknownError, { message });
|
|
84186
|
-
}
|
|
84187
|
-
__name(unknownStatus, "unknownStatus");
|
|
84188
|
-
function unknownError(err) {
|
|
84189
|
-
if (err instanceof PlatformError2) return err.status;
|
|
84190
|
-
if (err instanceof Error) return unknownStatus(err.message);
|
|
84191
|
-
if (typeof err === "string") return unknownStatus(err);
|
|
84192
|
-
return ERROR;
|
|
84193
|
-
}
|
|
84194
|
-
__name(unknownError, "unknownError");
|
|
84195
|
-
}
|
|
84196
|
-
});
|
|
84197
|
-
|
|
84198
|
-
// node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/event.js
|
|
84199
|
-
var require_event2 = __commonJS({
|
|
84200
|
-
"node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/event.js"(exports2, module2) {
|
|
84201
|
-
"use strict";
|
|
84202
|
-
var __defProp2 = Object.defineProperty;
|
|
84203
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
84204
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
84205
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
84206
|
-
var __name = (target, value3) => __defProp2(target, "name", { value: value3, configurable: true });
|
|
84207
|
-
var __export2 = (target, all8) => {
|
|
84208
|
-
for (var name in all8)
|
|
84209
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
84210
|
-
};
|
|
84211
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
84212
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
84213
|
-
for (let key of __getOwnPropNames2(from))
|
|
84214
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
84215
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
84216
|
-
}
|
|
84217
|
-
return to;
|
|
84218
|
-
};
|
|
84219
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
84220
|
-
var event_exports = {};
|
|
84221
|
-
__export2(event_exports, {
|
|
84222
|
-
PlatformEvent: () => PlatformEvent,
|
|
84223
|
-
addEventListener: () => addEventListener,
|
|
84224
|
-
broadcastEvent: () => broadcastEvent,
|
|
84225
|
-
monitor: () => monitor,
|
|
84226
|
-
removeEventListener: () => removeEventListener,
|
|
84227
|
-
setPlatformStatus: () => setPlatformStatus
|
|
84228
|
-
});
|
|
84229
|
-
module2.exports = __toCommonJS2(event_exports);
|
|
84230
|
-
var import_status = require_status3();
|
|
84231
|
-
var PlatformEvent = "platform-event";
|
|
84232
|
-
var eventListeners = /* @__PURE__ */ new Map();
|
|
84233
|
-
function addEventListener(event, listener) {
|
|
84234
|
-
const listeners = eventListeners.get(event);
|
|
84235
|
-
if (listeners !== void 0) {
|
|
84236
|
-
listeners.push(listener);
|
|
84237
|
-
} else {
|
|
84238
|
-
eventListeners.set(event, [listener]);
|
|
84239
|
-
}
|
|
84240
|
-
}
|
|
84241
|
-
__name(addEventListener, "addEventListener");
|
|
84242
|
-
function removeEventListener(event, listener) {
|
|
84243
|
-
const listeners = eventListeners.get(event);
|
|
84244
|
-
if (listeners !== void 0) {
|
|
84245
|
-
listeners.splice(listeners.indexOf(listener), 1);
|
|
84246
|
-
}
|
|
84247
|
-
}
|
|
84248
|
-
__name(removeEventListener, "removeEventListener");
|
|
84249
|
-
async function broadcastEvent(event, data) {
|
|
84250
|
-
const listeners = eventListeners.get(event);
|
|
84251
|
-
if (listeners !== void 0) {
|
|
84252
|
-
const promises = listeners.map(async (listener) => {
|
|
84253
|
-
await listener(event, data);
|
|
84254
|
-
});
|
|
84255
|
-
await Promise.all(promises);
|
|
84256
|
-
}
|
|
84257
|
-
}
|
|
84258
|
-
__name(broadcastEvent, "broadcastEvent");
|
|
84259
|
-
async function setPlatformStatus(status) {
|
|
84260
|
-
if (status.severity === import_status.Severity.ERROR) {
|
|
84261
|
-
console.trace("Platform Error Status", status);
|
|
84262
|
-
}
|
|
84263
|
-
await broadcastEvent(PlatformEvent, status);
|
|
84264
|
-
}
|
|
84265
|
-
__name(setPlatformStatus, "setPlatformStatus");
|
|
84266
|
-
async function monitor(status, promise4) {
|
|
84267
|
-
void setPlatformStatus(status);
|
|
84268
|
-
try {
|
|
84269
|
-
const result = await promise4;
|
|
84270
|
-
void setPlatformStatus(import_status.OK);
|
|
84271
|
-
return result;
|
|
84272
|
-
} catch (err) {
|
|
84273
|
-
void setPlatformStatus((0, import_status.unknownError)(err));
|
|
84274
|
-
console.error(err);
|
|
84275
|
-
throw err;
|
|
84276
|
-
}
|
|
84277
|
-
}
|
|
84278
|
-
__name(monitor, "monitor");
|
|
84279
|
-
}
|
|
84280
|
-
});
|
|
84281
|
-
|
|
84282
|
-
// node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/ident.js
|
|
84283
|
-
var require_ident2 = __commonJS({
|
|
84284
|
-
"node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/ident.js"(exports2, module2) {
|
|
84285
|
-
"use strict";
|
|
84286
|
-
var __create2 = Object.create;
|
|
84287
|
-
var __defProp2 = Object.defineProperty;
|
|
84288
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
84289
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
84290
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
84291
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
84292
|
-
var __name = (target, value3) => __defProp2(target, "name", { value: value3, configurable: true });
|
|
84293
|
-
var __export2 = (target, all8) => {
|
|
84294
|
-
for (var name in all8)
|
|
84295
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
84296
|
-
};
|
|
84297
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
84298
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
84299
|
-
for (let key of __getOwnPropNames2(from))
|
|
84300
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
84301
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
84302
|
-
}
|
|
84303
|
-
return to;
|
|
84304
|
-
};
|
|
84305
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
84306
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
84307
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
84308
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
84309
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
84310
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
84311
|
-
mod
|
|
84312
|
-
));
|
|
84313
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
84314
|
-
var ident_exports = {};
|
|
84315
|
-
__export2(ident_exports, {
|
|
84316
|
-
_parseId: () => _parseId
|
|
84317
|
-
});
|
|
84318
|
-
module2.exports = __toCommonJS2(ident_exports);
|
|
84319
|
-
var import_status = require_status3();
|
|
84320
|
-
var import_platform2 = __toESM2(require_platform2());
|
|
84321
|
-
function _parseId(id) {
|
|
84322
|
-
const path2 = id.split(import_platform2._ID_SEPARATOR);
|
|
84323
|
-
if (path2.length < 3) {
|
|
84324
|
-
throw new import_status.PlatformError(new import_status.Status(import_status.Severity.ERROR, import_platform2.default.status.InvalidId, { id }));
|
|
84325
|
-
}
|
|
84326
|
-
return {
|
|
84327
|
-
component: path2[0],
|
|
84328
|
-
kind: path2[1],
|
|
84329
|
-
name: path2.slice(2).join(import_platform2._ID_SEPARATOR)
|
|
84330
|
-
};
|
|
84331
|
-
}
|
|
84332
|
-
__name(_parseId, "_parseId");
|
|
84333
|
-
}
|
|
84334
|
-
});
|
|
84335
|
-
|
|
84336
|
-
// node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/metadata.js
|
|
84337
|
-
var require_metadata2 = __commonJS({
|
|
84338
|
-
"node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/metadata.js"(exports2, module2) {
|
|
84339
|
-
"use strict";
|
|
84340
|
-
var __defProp2 = Object.defineProperty;
|
|
84341
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
84342
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
84343
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
84344
|
-
var __name = (target, value3) => __defProp2(target, "name", { value: value3, configurable: true });
|
|
84345
|
-
var __export2 = (target, all8) => {
|
|
84346
|
-
for (var name in all8)
|
|
84347
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
84348
|
-
};
|
|
84349
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
84350
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
84351
|
-
for (let key of __getOwnPropNames2(from))
|
|
84352
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
84353
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
84354
|
-
}
|
|
84355
|
-
return to;
|
|
84356
|
-
};
|
|
84357
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
84358
|
-
var metadata_exports = {};
|
|
84359
|
-
__export2(metadata_exports, {
|
|
84360
|
-
getMetadata: () => getMetadata,
|
|
84361
|
-
loadMetadata: () => loadMetadata,
|
|
84362
|
-
setMetadata: () => setMetadata
|
|
84363
|
-
});
|
|
84364
|
-
module2.exports = __toCommonJS2(metadata_exports);
|
|
84365
|
-
var metadata = /* @__PURE__ */ new Map();
|
|
84366
|
-
function getMetadata(id) {
|
|
84367
|
-
return metadata.get(id);
|
|
84368
|
-
}
|
|
84369
|
-
__name(getMetadata, "getMetadata");
|
|
84370
|
-
function setMetadata(id, value3) {
|
|
84371
|
-
metadata.set(id, value3);
|
|
84372
|
-
}
|
|
84373
|
-
__name(setMetadata, "setMetadata");
|
|
84374
|
-
function loadMetadata(ids3, data) {
|
|
84375
|
-
for (const key in ids3) {
|
|
84376
|
-
const id = ids3[key];
|
|
84377
|
-
const resource = data[key];
|
|
84378
|
-
if (resource === void 0) {
|
|
84379
|
-
throw new Error(`no metadata provided, key: ${key}, id: ${String(id)}`);
|
|
84380
|
-
}
|
|
84381
|
-
metadata.set(id, resource);
|
|
84382
|
-
}
|
|
84383
|
-
}
|
|
84384
|
-
__name(loadMetadata, "loadMetadata");
|
|
84385
|
-
}
|
|
84386
|
-
});
|
|
84387
|
-
|
|
84388
|
-
// node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/i18n.js
|
|
84389
|
-
var require_i18n2 = __commonJS({
|
|
84390
|
-
"node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/i18n.js"(exports2, module2) {
|
|
84391
|
-
"use strict";
|
|
84392
|
-
var __create2 = Object.create;
|
|
84393
|
-
var __defProp2 = Object.defineProperty;
|
|
84394
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
84395
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
84396
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
84397
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
84398
|
-
var __name = (target, value3) => __defProp2(target, "name", { value: value3, configurable: true });
|
|
84399
|
-
var __export2 = (target, all8) => {
|
|
84400
|
-
for (var name in all8)
|
|
84401
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
84402
|
-
};
|
|
84403
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
84404
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
84405
|
-
for (let key of __getOwnPropNames2(from))
|
|
84406
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
84407
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
84408
|
-
}
|
|
84409
|
-
return to;
|
|
84410
|
-
};
|
|
84411
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
84412
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
84413
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
84414
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
84415
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
84416
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
84417
|
-
mod
|
|
84418
|
-
));
|
|
84419
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
84420
|
-
var i18n_exports = {};
|
|
84421
|
-
__export2(i18n_exports, {
|
|
84422
|
-
addStringsLoader: () => addStringsLoader,
|
|
84423
|
-
loadPluginStrings: () => loadPluginStrings,
|
|
84424
|
-
translate: () => translate,
|
|
84425
|
-
translateCB: () => translateCB
|
|
84426
|
-
});
|
|
84427
|
-
module2.exports = __toCommonJS2(i18n_exports);
|
|
84428
|
-
var import_intl_messageformat = require_intl_messageformat();
|
|
84429
|
-
var import_event = require_event2();
|
|
84430
|
-
var import_ident = require_ident2();
|
|
84431
|
-
var import_status = require_status3();
|
|
84432
|
-
var import_metadata = require_metadata2();
|
|
84433
|
-
var import_platform2 = __toESM2(require_platform2());
|
|
84434
|
-
var loaders = /* @__PURE__ */ new Map();
|
|
84435
|
-
var translations = /* @__PURE__ */ new Map();
|
|
84436
|
-
var cache = /* @__PURE__ */ new Map();
|
|
84437
|
-
var englishTranslationsForMissing = /* @__PURE__ */ new Map();
|
|
84438
|
-
function addStringsLoader(plugin, loader) {
|
|
84439
|
-
loaders.set(plugin, loader);
|
|
84440
|
-
}
|
|
84441
|
-
__name(addStringsLoader, "addStringsLoader");
|
|
84442
|
-
async function loadPluginStrings(locale, force = false) {
|
|
84443
|
-
if (force) {
|
|
84444
|
-
cache.clear();
|
|
84445
|
-
}
|
|
84446
|
-
for (const [plugin] of loaders) {
|
|
84447
|
-
const localtTanslations = translations.get(locale) ?? /* @__PURE__ */ new Map();
|
|
84448
|
-
if (!translations.has(locale)) {
|
|
84449
|
-
translations.set(locale, localtTanslations);
|
|
84450
|
-
}
|
|
84451
|
-
let messages = localtTanslations.get(plugin);
|
|
84452
|
-
if (messages === void 0 || force) {
|
|
84453
|
-
messages = await loadTranslationsForComponent(plugin, locale);
|
|
84454
|
-
localtTanslations.set(plugin, messages);
|
|
84455
|
-
}
|
|
84456
|
-
}
|
|
84457
|
-
}
|
|
84458
|
-
__name(loadPluginStrings, "loadPluginStrings");
|
|
84459
|
-
async function loadTranslationsForComponent(plugin, locale) {
|
|
84460
|
-
const loader = loaders.get(plugin);
|
|
84461
|
-
if (loader === void 0) {
|
|
84462
|
-
const status = new import_status.Status(import_status.Severity.ERROR, import_platform2.default.status.NoLoaderForStrings, { plugin });
|
|
84463
|
-
await (0, import_event.setPlatformStatus)(status);
|
|
84464
|
-
return status;
|
|
84465
|
-
}
|
|
84466
|
-
try {
|
|
84467
|
-
return await loader(locale);
|
|
84468
|
-
} catch (err) {
|
|
84469
|
-
console.error("No translations found for plugin", plugin, err);
|
|
84470
|
-
try {
|
|
84471
|
-
return await loader("en");
|
|
84472
|
-
} catch (err2) {
|
|
84473
|
-
const status = (0, import_status.unknownError)(err2);
|
|
84474
|
-
await (0, import_event.setPlatformStatus)(status);
|
|
84475
|
-
return status;
|
|
84476
|
-
}
|
|
84477
|
-
}
|
|
84478
|
-
}
|
|
84479
|
-
__name(loadTranslationsForComponent, "loadTranslationsForComponent");
|
|
84480
|
-
function getCachedTranslation(id, locale) {
|
|
84481
|
-
const localtTanslations = translations.get(locale);
|
|
84482
|
-
if (localtTanslations === void 0) {
|
|
84483
|
-
return void 0;
|
|
84484
|
-
}
|
|
84485
|
-
const messages = localtTanslations.get(id.component);
|
|
84486
|
-
if (messages === void 0) {
|
|
84487
|
-
return void 0;
|
|
84488
|
-
}
|
|
84489
|
-
if (messages instanceof import_status.Status) {
|
|
84490
|
-
return messages;
|
|
84491
|
-
}
|
|
84492
|
-
if (id.kind !== void 0) {
|
|
84493
|
-
if (messages[id.kind]?.[id.name] !== void 0) {
|
|
84494
|
-
return messages[id.kind]?.[id.name];
|
|
84495
|
-
}
|
|
84496
|
-
}
|
|
84497
|
-
}
|
|
84498
|
-
__name(getCachedTranslation, "getCachedTranslation");
|
|
84499
|
-
async function getTranslation(id, locale) {
|
|
84500
|
-
try {
|
|
84501
|
-
const localtTanslations = translations.get(locale) ?? /* @__PURE__ */ new Map();
|
|
84502
|
-
if (!translations.has(locale)) {
|
|
84503
|
-
translations.set(locale, localtTanslations);
|
|
84504
|
-
}
|
|
84505
|
-
let messages = localtTanslations.get(id.component);
|
|
84506
|
-
if (messages === void 0) {
|
|
84507
|
-
messages = await loadTranslationsForComponent(id.component, locale);
|
|
84508
|
-
localtTanslations.set(id.component, messages);
|
|
84509
|
-
}
|
|
84510
|
-
if (messages instanceof import_status.Status) {
|
|
84511
|
-
return messages;
|
|
84512
|
-
}
|
|
84513
|
-
if (id.kind !== void 0) {
|
|
84514
|
-
if (messages[id.kind]?.[id.name] !== void 0) {
|
|
84515
|
-
return messages[id.kind]?.[id.name];
|
|
84516
|
-
} else {
|
|
84517
|
-
let eng = englishTranslationsForMissing.get(id.component);
|
|
84518
|
-
if (eng === void 0) {
|
|
84519
|
-
eng = await loadTranslationsForComponent(id.component, "en");
|
|
84520
|
-
englishTranslationsForMissing.set(id.component, eng);
|
|
84521
|
-
}
|
|
84522
|
-
if (eng instanceof import_status.Status) {
|
|
84523
|
-
return eng;
|
|
84524
|
-
}
|
|
84525
|
-
return eng[id.kind]?.[id.name];
|
|
84526
|
-
}
|
|
84527
|
-
} else {
|
|
84528
|
-
return messages[id.name];
|
|
84529
|
-
}
|
|
84530
|
-
} catch (err) {
|
|
84531
|
-
const status = (0, import_status.unknownError)(err);
|
|
84532
|
-
await (0, import_event.setPlatformStatus)(status);
|
|
84533
|
-
return status;
|
|
84534
|
-
}
|
|
84535
|
-
}
|
|
84536
|
-
__name(getTranslation, "getTranslation");
|
|
84537
|
-
async function translate(message, params, language) {
|
|
84538
|
-
const locale = language ?? (0, import_metadata.getMetadata)(import_platform2.default.metadata.locale) ?? "en";
|
|
84539
|
-
const localCache = cache.get(locale) ?? /* @__PURE__ */ new Map();
|
|
84540
|
-
if (!cache.has(locale)) {
|
|
84541
|
-
cache.set(locale, localCache);
|
|
84542
|
-
}
|
|
84543
|
-
const compiled = localCache.get(message);
|
|
84544
|
-
if (compiled !== void 0) {
|
|
84545
|
-
if (compiled instanceof import_status.Status) {
|
|
84546
|
-
return message;
|
|
84547
|
-
}
|
|
84548
|
-
return compiled.format(params);
|
|
84549
|
-
} else {
|
|
84550
|
-
try {
|
|
84551
|
-
const id = (0, import_ident._parseId)(message);
|
|
84552
|
-
if (id.component === import_platform2._EmbeddedId) {
|
|
84553
|
-
return id.name;
|
|
84554
|
-
}
|
|
84555
|
-
const translation = getCachedTranslation(id, locale) ?? await getTranslation(id, locale) ?? message;
|
|
84556
|
-
if (translation instanceof import_status.Status) {
|
|
84557
|
-
localCache.set(message, translation);
|
|
84558
|
-
return message;
|
|
84559
|
-
}
|
|
84560
|
-
const compiled2 = new import_intl_messageformat.IntlMessageFormat(translation, locale, void 0, { ignoreTag: true });
|
|
84561
|
-
localCache.set(message, compiled2);
|
|
84562
|
-
return compiled2.format(params);
|
|
84563
|
-
} catch (err) {
|
|
84564
|
-
const status = (0, import_status.unknownError)(err);
|
|
84565
|
-
void (0, import_event.setPlatformStatus)(status);
|
|
84566
|
-
localCache.set(message, status);
|
|
84567
|
-
return message;
|
|
84568
|
-
}
|
|
84569
|
-
}
|
|
84570
|
-
}
|
|
84571
|
-
__name(translate, "translate");
|
|
84572
|
-
function translateCB(message, params, language, resolve2) {
|
|
84573
|
-
const locale = language ?? (0, import_metadata.getMetadata)(import_platform2.default.metadata.locale) ?? "en";
|
|
84574
|
-
const localCache = cache.get(locale) ?? /* @__PURE__ */ new Map();
|
|
84575
|
-
if (!cache.has(locale)) {
|
|
84576
|
-
cache.set(locale, localCache);
|
|
84577
|
-
}
|
|
84578
|
-
const compiled = localCache.get(message);
|
|
84579
|
-
if (compiled !== void 0) {
|
|
84580
|
-
if (compiled instanceof import_status.Status) {
|
|
84581
|
-
resolve2(message);
|
|
84582
|
-
return;
|
|
84583
|
-
}
|
|
84584
|
-
resolve2(compiled.format(params));
|
|
84585
|
-
} else {
|
|
84586
|
-
let id;
|
|
84587
|
-
try {
|
|
84588
|
-
id = (0, import_ident._parseId)(message);
|
|
84589
|
-
if (id.component === import_platform2._EmbeddedId) {
|
|
84590
|
-
resolve2(id.name);
|
|
84591
|
-
return;
|
|
84592
|
-
}
|
|
84593
|
-
} catch (err) {
|
|
84594
|
-
const status = (0, import_status.unknownError)(err);
|
|
84595
|
-
void (0, import_event.setPlatformStatus)(status);
|
|
84596
|
-
localCache.set(message, status);
|
|
84597
|
-
resolve2(message);
|
|
84598
|
-
return;
|
|
84599
|
-
}
|
|
84600
|
-
const translation = getCachedTranslation(id, locale);
|
|
84601
|
-
if (translation === void 0 || translation instanceof import_status.Status) {
|
|
84602
|
-
void translate(message, params, language).then((res) => {
|
|
84603
|
-
resolve2(res);
|
|
84604
|
-
}).catch((err) => {
|
|
84605
|
-
const status = (0, import_status.unknownError)(err);
|
|
84606
|
-
void (0, import_event.setPlatformStatus)(status);
|
|
84607
|
-
localCache.set(message, status);
|
|
84608
|
-
resolve2(message);
|
|
84609
|
-
});
|
|
84610
|
-
return;
|
|
84611
|
-
}
|
|
84612
|
-
const compiled2 = new import_intl_messageformat.IntlMessageFormat(translation, locale, void 0, { ignoreTag: true });
|
|
84613
|
-
localCache.set(message, compiled2);
|
|
84614
|
-
resolve2(compiled2.format(params));
|
|
84615
|
-
}
|
|
84616
|
-
}
|
|
84617
|
-
__name(translateCB, "translateCB");
|
|
84618
|
-
}
|
|
84619
|
-
});
|
|
84620
|
-
|
|
84621
|
-
// node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/resource.js
|
|
84622
|
-
var require_resource2 = __commonJS({
|
|
84623
|
-
"node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/resource.js"(exports2, module2) {
|
|
84624
|
-
"use strict";
|
|
84625
|
-
var __create2 = Object.create;
|
|
84626
|
-
var __defProp2 = Object.defineProperty;
|
|
84627
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
84628
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
84629
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
84630
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
84631
|
-
var __name = (target, value3) => __defProp2(target, "name", { value: value3, configurable: true });
|
|
84632
|
-
var __export2 = (target, all8) => {
|
|
84633
|
-
for (var name in all8)
|
|
84634
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
84635
|
-
};
|
|
84636
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
84637
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
84638
|
-
for (let key of __getOwnPropNames2(from))
|
|
84639
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
84640
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
84641
|
-
}
|
|
84642
|
-
return to;
|
|
84643
|
-
};
|
|
84644
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
84645
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
84646
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
84647
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
84648
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
84649
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
84650
|
-
mod
|
|
84651
|
-
));
|
|
84652
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
84653
|
-
var resource_exports = {};
|
|
84654
|
-
__export2(resource_exports, {
|
|
84655
|
-
addLocation: () => addLocation,
|
|
84656
|
-
getPlugins: () => getPlugins,
|
|
84657
|
-
getResource: () => getResource,
|
|
84658
|
-
getResourceC: () => getResourceC,
|
|
84659
|
-
getResourceP: () => getResourceP,
|
|
84660
|
-
getResourcePlugin: () => getResourcePlugin
|
|
84661
|
-
});
|
|
84662
|
-
module2.exports = __toCommonJS2(resource_exports);
|
|
84663
|
-
var import_event = require_event2();
|
|
84664
|
-
var import_ident = require_ident2();
|
|
84665
|
-
var import_status = require_status3();
|
|
84666
|
-
var import_metadata = require_metadata2();
|
|
84667
|
-
var import_platform2 = __toESM2(require_platform2());
|
|
84668
|
-
var locations = /* @__PURE__ */ new Map();
|
|
84669
|
-
function addLocation(plugin, module22) {
|
|
84670
|
-
locations.set(plugin, module22);
|
|
84671
|
-
}
|
|
84672
|
-
__name(addLocation, "addLocation");
|
|
84673
|
-
function getPlugins() {
|
|
84674
|
-
return Array.from(locations.keys());
|
|
84675
|
-
}
|
|
84676
|
-
__name(getPlugins, "getPlugins");
|
|
84677
|
-
function getLocation(plugin) {
|
|
84678
|
-
const location = locations.get(plugin);
|
|
84679
|
-
if (location === void 0) {
|
|
84680
|
-
throw new import_status.PlatformError(
|
|
84681
|
-
new import_status.Status(import_status.Severity.ERROR, import_platform2.default.status.NoLocationForPlugin, {
|
|
84682
|
-
plugin
|
|
84683
|
-
})
|
|
84684
|
-
);
|
|
84685
|
-
}
|
|
84686
|
-
return location;
|
|
84687
|
-
}
|
|
84688
|
-
__name(getLocation, "getLocation");
|
|
84689
|
-
var loading = /* @__PURE__ */ new Map();
|
|
84690
|
-
function loadPlugin(id) {
|
|
84691
|
-
let pluginLoader = loading.get(id);
|
|
84692
|
-
if (pluginLoader === void 0) {
|
|
84693
|
-
const status = new import_status.Status(import_status.Severity.INFO, import_platform2.default.status.LoadingPlugin, {
|
|
84694
|
-
plugin: id
|
|
84695
|
-
});
|
|
84696
|
-
const loadHelper = (0, import_metadata.getMetadata)(import_platform2.default.metadata.LoadHelper);
|
|
84697
|
-
const locationLoader = getLocation(id);
|
|
84698
|
-
pluginLoader = (0, import_event.monitor)(status, loadHelper !== void 0 ? loadHelper(locationLoader) : locationLoader()).then(
|
|
84699
|
-
async (plugin) => {
|
|
84700
|
-
try {
|
|
84701
|
-
if (typeof plugin.default === "object") {
|
|
84702
|
-
return await plugin.default.default();
|
|
84703
|
-
}
|
|
84704
|
-
return await plugin.default();
|
|
84705
|
-
} catch (err) {
|
|
84706
|
-
console.error(err);
|
|
84707
|
-
throw err;
|
|
84708
|
-
}
|
|
84709
|
-
}
|
|
84710
|
-
);
|
|
84711
|
-
loading.set(id, pluginLoader);
|
|
84712
|
-
}
|
|
84713
|
-
return pluginLoader;
|
|
84714
|
-
}
|
|
84715
|
-
__name(loadPlugin, "loadPlugin");
|
|
84716
|
-
var cachedResource = /* @__PURE__ */ new Map();
|
|
84717
|
-
async function getResource(resource) {
|
|
84718
|
-
const cached5 = cachedResource.get(resource);
|
|
84719
|
-
if (cached5 !== void 0) {
|
|
84720
|
-
return cached5;
|
|
84721
|
-
}
|
|
84722
|
-
const info = (0, import_ident._parseId)(resource);
|
|
84723
|
-
let resources = loading.get(info.component) ?? loadPlugin(info.component);
|
|
84724
|
-
if (resources instanceof Promise) {
|
|
84725
|
-
resources = await resources;
|
|
84726
|
-
loading.set(info.component, resources);
|
|
84727
|
-
}
|
|
84728
|
-
const value3 = resources[info.kind]?.[info.name];
|
|
84729
|
-
if (value3 === void 0) {
|
|
84730
|
-
throw new import_status.PlatformError(new import_status.Status(import_status.Severity.ERROR, import_platform2.default.status.ResourceNotFound, { resource }));
|
|
84731
|
-
}
|
|
84732
|
-
cachedResource.set(resource, value3);
|
|
84733
|
-
return value3;
|
|
84734
|
-
}
|
|
84735
|
-
__name(getResource, "getResource");
|
|
84736
|
-
function getResourceP(resource) {
|
|
84737
|
-
return cachedResource.get(resource) ?? getResource(resource);
|
|
84738
|
-
}
|
|
84739
|
-
__name(getResourceP, "getResourceP");
|
|
84740
|
-
function getResourceC(resource, callback) {
|
|
84741
|
-
if (resource === void 0) {
|
|
84742
|
-
callback(void 0);
|
|
84743
|
-
return;
|
|
84744
|
-
}
|
|
84745
|
-
const cached5 = cachedResource.get(resource);
|
|
84746
|
-
if (cached5 !== void 0) {
|
|
84747
|
-
callback(cached5);
|
|
84748
|
-
} else {
|
|
84749
|
-
void getResource(resource).then((r) => {
|
|
84750
|
-
callback(r);
|
|
84751
|
-
}).catch(() => {
|
|
84752
|
-
callback(void 0);
|
|
84753
|
-
});
|
|
84754
|
-
}
|
|
84755
|
-
}
|
|
84756
|
-
__name(getResourceC, "getResourceC");
|
|
84757
|
-
function getResourcePlugin(resource) {
|
|
84758
|
-
const info = (0, import_ident._parseId)(resource);
|
|
84759
|
-
return info.component;
|
|
84760
|
-
}
|
|
84761
|
-
__name(getResourcePlugin, "getResourcePlugin");
|
|
84762
|
-
}
|
|
84763
|
-
});
|
|
84764
|
-
|
|
84765
|
-
// node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/testUtils.js
|
|
84766
|
-
var require_testUtils2 = __commonJS({
|
|
84767
|
-
"node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/testUtils.js"(exports2, module2) {
|
|
84768
|
-
"use strict";
|
|
84769
|
-
var __defProp2 = Object.defineProperty;
|
|
84770
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
84771
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
84772
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
84773
|
-
var __name = (target, value3) => __defProp2(target, "name", { value: value3, configurable: true });
|
|
84774
|
-
var __export2 = (target, all8) => {
|
|
84775
|
-
for (var name in all8)
|
|
84776
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
84777
|
-
};
|
|
84778
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
84779
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
84780
|
-
for (let key of __getOwnPropNames2(from))
|
|
84781
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
84782
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
84783
|
-
}
|
|
84784
|
-
return to;
|
|
84785
|
-
};
|
|
84786
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
84787
|
-
var testUtils_exports = {};
|
|
84788
|
-
__export2(testUtils_exports, {
|
|
84789
|
-
makeLocalesTest: () => makeLocalesTest
|
|
84790
|
-
});
|
|
84791
|
-
module2.exports = __toCommonJS2(testUtils_exports);
|
|
84792
|
-
function makeLocaleMatcher(target) {
|
|
84793
|
-
return Object.entries(target).reduce(
|
|
84794
|
-
(obj, [key, value3]) => ({
|
|
84795
|
-
...obj,
|
|
84796
|
-
[key]: typeof value3 === "string" ? expect.any(String) : makeLocaleMatcher(value3)
|
|
84797
|
-
}),
|
|
84798
|
-
{}
|
|
84799
|
-
);
|
|
84800
|
-
}
|
|
84801
|
-
__name(makeLocaleMatcher, "makeLocaleMatcher");
|
|
84802
|
-
var langs = ["en", "ru"];
|
|
84803
|
-
function makeLocalesTest(loader) {
|
|
84804
|
-
return async () => {
|
|
84805
|
-
const [target, ...rest] = await Promise.all(langs.map(loader));
|
|
84806
|
-
const matcher = makeLocaleMatcher(target);
|
|
84807
|
-
rest.forEach((loc) => {
|
|
84808
|
-
expect(loc).toEqual(matcher);
|
|
84809
|
-
});
|
|
84810
|
-
};
|
|
84811
|
-
}
|
|
84812
|
-
__name(makeLocalesTest, "makeLocalesTest");
|
|
84813
|
-
}
|
|
84814
|
-
});
|
|
84815
|
-
|
|
84816
|
-
// node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/index.js
|
|
84817
|
-
var require_lib21 = __commonJS({
|
|
84818
|
-
"node_modules/.pnpm/@hcengineering+platform@0.7.19/node_modules/@hcengineering/platform/lib/index.js"(exports2, module2) {
|
|
84819
|
-
"use strict";
|
|
84820
|
-
var __create2 = Object.create;
|
|
84821
|
-
var __defProp2 = Object.defineProperty;
|
|
84822
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
84823
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
84824
|
-
var __getProtoOf2 = Object.getPrototypeOf;
|
|
84825
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
84826
|
-
var __export2 = (target, all8) => {
|
|
84827
|
-
for (var name in all8)
|
|
84828
|
-
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
84829
|
-
};
|
|
84830
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
84831
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
84832
|
-
for (let key of __getOwnPropNames2(from))
|
|
84833
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
84834
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
84835
|
-
}
|
|
84836
|
-
return to;
|
|
84837
|
-
};
|
|
84838
|
-
var __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
|
|
84839
|
-
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
84840
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
84841
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
84842
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
84843
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
84844
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
84845
|
-
mod
|
|
84846
|
-
));
|
|
84847
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
84848
|
-
var index_exports2 = {};
|
|
84849
|
-
__export2(index_exports2, {
|
|
84850
|
-
default: () => import_platform2.default
|
|
84851
|
-
});
|
|
84852
|
-
module2.exports = __toCommonJS2(index_exports2);
|
|
84853
|
-
__reExport2(index_exports2, require_event2(), module2.exports);
|
|
84854
|
-
__reExport2(index_exports2, require_i18n2(), module2.exports);
|
|
84855
|
-
__reExport2(index_exports2, require_metadata2(), module2.exports);
|
|
84856
|
-
__reExport2(index_exports2, require_platform2(), module2.exports);
|
|
84857
|
-
__reExport2(index_exports2, require_ident2(), module2.exports);
|
|
84858
|
-
var import_platform2 = __toESM2(require_platform2());
|
|
84859
|
-
__reExport2(index_exports2, require_resource2(), module2.exports);
|
|
84860
|
-
__reExport2(index_exports2, require_status3(), module2.exports);
|
|
84861
|
-
__reExport2(index_exports2, require_testUtils2(), module2.exports);
|
|
84862
|
-
}
|
|
84863
|
-
});
|
|
84864
|
-
|
|
84865
83980
|
// node_modules/.pnpm/@hcengineering+tracker@0.7.0/node_modules/@hcengineering/tracker/lib/analytics.js
|
|
84866
83981
|
var require_analytics = __commonJS({
|
|
84867
83982
|
"node_modules/.pnpm/@hcengineering+tracker@0.7.0/node_modules/@hcengineering/tracker/lib/analytics.js"(exports2, module2) {
|
|
@@ -84916,7 +84031,7 @@ var require_analytics = __commonJS({
|
|
|
84916
84031
|
});
|
|
84917
84032
|
|
|
84918
84033
|
// node_modules/.pnpm/@hcengineering+tracker@0.7.0/node_modules/@hcengineering/tracker/lib/index.js
|
|
84919
|
-
var
|
|
84034
|
+
var require_lib21 = __commonJS({
|
|
84920
84035
|
"node_modules/.pnpm/@hcengineering+tracker@0.7.0/node_modules/@hcengineering/tracker/lib/index.js"(exports2, module2) {
|
|
84921
84036
|
"use strict";
|
|
84922
84037
|
var __defProp2 = Object.defineProperty;
|
|
@@ -84951,7 +84066,7 @@ var require_lib22 = __commonJS({
|
|
|
84951
84066
|
trackerId: () => trackerId
|
|
84952
84067
|
});
|
|
84953
84068
|
module2.exports = __toCommonJS2(index_exports2);
|
|
84954
|
-
var import_platform2 =
|
|
84069
|
+
var import_platform2 = require_lib();
|
|
84955
84070
|
__reExport2(index_exports2, require_analytics(), module2.exports);
|
|
84956
84071
|
__reExport2(index_exports2, require_analytics(), module2.exports);
|
|
84957
84072
|
var TimeReportDayType2 = /* @__PURE__ */ ((TimeReportDayType22) => {
|
|
@@ -85186,7 +84301,7 @@ var require_lib22 = __commonJS({
|
|
|
85186
84301
|
});
|
|
85187
84302
|
|
|
85188
84303
|
// node_modules/.pnpm/@hcengineering+activity@0.7.0/node_modules/@hcengineering/activity/lib/index.js
|
|
85189
|
-
var
|
|
84304
|
+
var require_lib22 = __commonJS({
|
|
85190
84305
|
"node_modules/.pnpm/@hcengineering+activity@0.7.0/node_modules/@hcengineering/activity/lib/index.js"(exports2, module2) {
|
|
85191
84306
|
"use strict";
|
|
85192
84307
|
var __defProp2 = Object.defineProperty;
|
|
@@ -85212,7 +84327,7 @@ var require_lib23 = __commonJS({
|
|
|
85212
84327
|
default: () => index_default
|
|
85213
84328
|
});
|
|
85214
84329
|
module2.exports = __toCommonJS2(index_exports2);
|
|
85215
|
-
var import_platform2 =
|
|
84330
|
+
var import_platform2 = require_lib();
|
|
85216
84331
|
var activityId = "activity";
|
|
85217
84332
|
var index_default = (0, import_platform2.plugin)(activityId, {
|
|
85218
84333
|
mixin: {
|
|
@@ -85355,7 +84470,7 @@ var require_analytics2 = __commonJS({
|
|
|
85355
84470
|
});
|
|
85356
84471
|
|
|
85357
84472
|
// node_modules/.pnpm/@hcengineering+attachment@0.7.0/node_modules/@hcengineering/attachment/lib/index.js
|
|
85358
|
-
var
|
|
84473
|
+
var require_lib23 = __commonJS({
|
|
85359
84474
|
"node_modules/.pnpm/@hcengineering+attachment@0.7.0/node_modules/@hcengineering/attachment/lib/index.js"(exports2, module2) {
|
|
85360
84475
|
"use strict";
|
|
85361
84476
|
var __defProp2 = Object.defineProperty;
|
|
@@ -85382,7 +84497,7 @@ var require_lib24 = __commonJS({
|
|
|
85382
84497
|
default: () => index_default
|
|
85383
84498
|
});
|
|
85384
84499
|
module2.exports = __toCommonJS2(index_exports2);
|
|
85385
|
-
var import_platform2 =
|
|
84500
|
+
var import_platform2 = require_lib();
|
|
85386
84501
|
__reExport2(index_exports2, require_analytics2(), module2.exports);
|
|
85387
84502
|
var attachmentId = "attachment";
|
|
85388
84503
|
var index_default = (0, import_platform2.plugin)(attachmentId, {
|
|
@@ -85482,7 +84597,7 @@ var require_utils11 = __commonJS({
|
|
|
85482
84597
|
});
|
|
85483
84598
|
module2.exports = __toCommonJS2(utils_exports);
|
|
85484
84599
|
var import_core45 = require_lib4();
|
|
85485
|
-
var import__ = __toESM2(
|
|
84600
|
+
var import__ = __toESM2(require_lib24());
|
|
85486
84601
|
function getInstance(event, date7) {
|
|
85487
84602
|
const diff8 = event.dueDate - event.date;
|
|
85488
84603
|
return {
|
|
@@ -85850,7 +84965,7 @@ var require_utils11 = __commonJS({
|
|
|
85850
84965
|
});
|
|
85851
84966
|
|
|
85852
84967
|
// node_modules/.pnpm/@hcengineering+calendar@0.7.0/node_modules/@hcengineering/calendar/lib/index.js
|
|
85853
|
-
var
|
|
84968
|
+
var require_lib24 = __commonJS({
|
|
85854
84969
|
"node_modules/.pnpm/@hcengineering+calendar@0.7.0/node_modules/@hcengineering/calendar/lib/index.js"(exports2, module2) {
|
|
85855
84970
|
"use strict";
|
|
85856
84971
|
var __defProp2 = Object.defineProperty;
|
|
@@ -85880,7 +84995,7 @@ var require_lib25 = __commonJS({
|
|
|
85880
84995
|
default: () => index_default
|
|
85881
84996
|
});
|
|
85882
84997
|
module2.exports = __toCommonJS2(index_exports2);
|
|
85883
|
-
var import_platform2 =
|
|
84998
|
+
var import_platform2 = require_lib();
|
|
85884
84999
|
__reExport2(index_exports2, require_utils11(), module2.exports);
|
|
85885
85000
|
var AccessLevel4 = /* @__PURE__ */ ((AccessLevel22) => {
|
|
85886
85001
|
AccessLevel22["FreeBusyReader"] = "freeBusyReader";
|
|
@@ -86063,7 +85178,7 @@ var require_analytics3 = __commonJS({
|
|
|
86063
85178
|
});
|
|
86064
85179
|
|
|
86065
85180
|
// node_modules/.pnpm/@hcengineering+card@0.7.0/node_modules/@hcengineering/card/lib/index.js
|
|
86066
|
-
var
|
|
85181
|
+
var require_lib25 = __commonJS({
|
|
86067
85182
|
"node_modules/.pnpm/@hcengineering+card@0.7.0/node_modules/@hcengineering/card/lib/index.js"(exports2, module2) {
|
|
86068
85183
|
"use strict";
|
|
86069
85184
|
var __defProp2 = Object.defineProperty;
|
|
@@ -86091,7 +85206,7 @@ var require_lib26 = __commonJS({
|
|
|
86091
85206
|
default: () => index_default
|
|
86092
85207
|
});
|
|
86093
85208
|
module2.exports = __toCommonJS2(index_exports2);
|
|
86094
|
-
var import_platform2 =
|
|
85209
|
+
var import_platform2 = require_lib();
|
|
86095
85210
|
__reExport2(index_exports2, require_analytics3(), module2.exports);
|
|
86096
85211
|
var cardId = "card";
|
|
86097
85212
|
var DOMAIN_CARD = "card";
|
|
@@ -86221,7 +85336,7 @@ var require_utils12 = __commonJS({
|
|
|
86221
85336
|
module2.exports = __toCommonJS2(utils_exports);
|
|
86222
85337
|
var import_fast_equals = require_cjs();
|
|
86223
85338
|
var import_core45 = __toESM2(require_lib4());
|
|
86224
|
-
var import__ = __toESM2(
|
|
85339
|
+
var import__ = __toESM2(require_lib26());
|
|
86225
85340
|
async function getDirectChannel(client, me, employeeAccount) {
|
|
86226
85341
|
const accIds = [me, employeeAccount].sort();
|
|
86227
85342
|
const existingDms = await client.findAll(import__.default.class.DirectMessage, {});
|
|
@@ -86277,7 +85392,7 @@ var require_analytics4 = __commonJS({
|
|
|
86277
85392
|
});
|
|
86278
85393
|
|
|
86279
85394
|
// node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/index.js
|
|
86280
|
-
var
|
|
85395
|
+
var require_lib26 = __commonJS({
|
|
86281
85396
|
"node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/index.js"(exports2, module2) {
|
|
86282
85397
|
"use strict";
|
|
86283
85398
|
var __defProp2 = Object.defineProperty;
|
|
@@ -86304,7 +85419,7 @@ var require_lib27 = __commonJS({
|
|
|
86304
85419
|
default: () => index_default
|
|
86305
85420
|
});
|
|
86306
85421
|
module2.exports = __toCommonJS2(index_exports2);
|
|
86307
|
-
var import_platform2 =
|
|
85422
|
+
var import_platform2 = require_lib();
|
|
86308
85423
|
__reExport2(index_exports2, require_utils12(), module2.exports);
|
|
86309
85424
|
__reExport2(index_exports2, require_analytics4(), module2.exports);
|
|
86310
85425
|
var chunterId = "chunter";
|
|
@@ -86535,7 +85650,7 @@ var require_cache4 = __commonJS({
|
|
|
86535
85650
|
});
|
|
86536
85651
|
module2.exports = __toCommonJS2(cache_exports);
|
|
86537
85652
|
var import_core45 = __toESM2(require_lib4());
|
|
86538
|
-
var import__ = __toESM2(
|
|
85653
|
+
var import__ = __toESM2(require_lib27());
|
|
86539
85654
|
function isCreateTx(tx) {
|
|
86540
85655
|
return tx._class === import_core45.default.class.TxCreateDoc;
|
|
86541
85656
|
}
|
|
@@ -86797,8 +85912,8 @@ var require_utils13 = __commonJS({
|
|
|
86797
85912
|
});
|
|
86798
85913
|
module2.exports = __toCommonJS2(utils_exports);
|
|
86799
85914
|
var import_core45 = require_lib4();
|
|
86800
|
-
var import_platform2 =
|
|
86801
|
-
var import__ = __toESM2(
|
|
85915
|
+
var import_platform2 = require_lib();
|
|
85916
|
+
var import__ = __toESM2(require_lib27());
|
|
86802
85917
|
var import_types12 = require_types9();
|
|
86803
85918
|
var import_cache2 = __toESM2(require_cache4());
|
|
86804
85919
|
var currentEmployee;
|
|
@@ -87483,8 +86598,8 @@ var require_avatar = __commonJS({
|
|
|
87483
86598
|
getAvatarUrlInfo: () => getAvatarUrlInfo
|
|
87484
86599
|
});
|
|
87485
86600
|
module2.exports = __toCommonJS2(avatar_exports);
|
|
87486
|
-
var import_platform2 =
|
|
87487
|
-
var import__ = __toESM2(
|
|
86601
|
+
var import_platform2 = require_lib();
|
|
86602
|
+
var import__ = __toESM2(require_lib27());
|
|
87488
86603
|
var providers = /* @__PURE__ */ new Map();
|
|
87489
86604
|
async function getAvatarProvider(client, providerId) {
|
|
87490
86605
|
const provider = providers.get(providerId);
|
|
@@ -87530,7 +86645,7 @@ var require_avatar = __commonJS({
|
|
|
87530
86645
|
});
|
|
87531
86646
|
|
|
87532
86647
|
// node_modules/.pnpm/@hcengineering+contact@0.7.0/node_modules/@hcengineering/contact/lib/index.js
|
|
87533
|
-
var
|
|
86648
|
+
var require_lib27 = __commonJS({
|
|
87534
86649
|
"node_modules/.pnpm/@hcengineering+contact@0.7.0/node_modules/@hcengineering/contact/lib/index.js"(exports2, module2) {
|
|
87535
86650
|
"use strict";
|
|
87536
86651
|
var __defProp2 = Object.defineProperty;
|
|
@@ -87559,7 +86674,7 @@ var require_lib28 = __commonJS({
|
|
|
87559
86674
|
default: () => index_default
|
|
87560
86675
|
});
|
|
87561
86676
|
module2.exports = __toCommonJS2(index_exports2);
|
|
87562
|
-
var import_platform2 =
|
|
86677
|
+
var import_platform2 = require_lib();
|
|
87563
86678
|
__reExport2(index_exports2, require_types9(), module2.exports);
|
|
87564
86679
|
__reExport2(index_exports2, require_utils13(), module2.exports);
|
|
87565
86680
|
__reExport2(index_exports2, require_analytics5(), module2.exports);
|
|
@@ -87807,7 +86922,7 @@ var require_plugin2 = __commonJS({
|
|
|
87807
86922
|
documentPlugin: () => documentPlugin2
|
|
87808
86923
|
});
|
|
87809
86924
|
module2.exports = __toCommonJS2(plugin_exports);
|
|
87810
|
-
var import_platform2 =
|
|
86925
|
+
var import_platform2 = require_lib();
|
|
87811
86926
|
var documentId = "document";
|
|
87812
86927
|
var documentPlugin2 = (0, import_platform2.plugin)(documentId, {
|
|
87813
86928
|
class: {
|
|
@@ -87984,7 +87099,7 @@ var require_utils14 = __commonJS({
|
|
|
87984
87099
|
});
|
|
87985
87100
|
|
|
87986
87101
|
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/index.js
|
|
87987
|
-
var
|
|
87102
|
+
var require_lib28 = __commonJS({
|
|
87988
87103
|
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/index.js"(exports2, module2) {
|
|
87989
87104
|
"use strict";
|
|
87990
87105
|
var __defProp2 = Object.defineProperty;
|
|
@@ -88042,7 +87157,7 @@ var require_types11 = __commonJS({
|
|
|
88042
87157
|
});
|
|
88043
87158
|
|
|
88044
87159
|
// node_modules/.pnpm/@hcengineering+notification@0.7.0/node_modules/@hcengineering/notification/lib/index.js
|
|
88045
|
-
var
|
|
87160
|
+
var require_lib29 = __commonJS({
|
|
88046
87161
|
"node_modules/.pnpm/@hcengineering+notification@0.7.0/node_modules/@hcengineering/notification/lib/index.js"(exports2, module2) {
|
|
88047
87162
|
"use strict";
|
|
88048
87163
|
var __defProp2 = Object.defineProperty;
|
|
@@ -88072,7 +87187,7 @@ var require_lib30 = __commonJS({
|
|
|
88072
87187
|
notificationId: () => notificationId
|
|
88073
87188
|
});
|
|
88074
87189
|
module2.exports = __toCommonJS2(index_exports2);
|
|
88075
|
-
var import_platform2 =
|
|
87190
|
+
var import_platform2 = require_lib();
|
|
88076
87191
|
__reExport2(index_exports2, require_types11(), module2.exports);
|
|
88077
87192
|
var DOMAIN_NOTIFICATION = "notification";
|
|
88078
87193
|
var DOMAIN_DOC_NOTIFY = "notification-dnc";
|
|
@@ -88229,7 +87344,7 @@ var require_analytics7 = __commonJS({
|
|
|
88229
87344
|
});
|
|
88230
87345
|
|
|
88231
87346
|
// node_modules/.pnpm/@hcengineering+tags@0.7.0/node_modules/@hcengineering/tags/lib/index.js
|
|
88232
|
-
var
|
|
87347
|
+
var require_lib30 = __commonJS({
|
|
88233
87348
|
"node_modules/.pnpm/@hcengineering+tags@0.7.0/node_modules/@hcengineering/tags/lib/index.js"(exports2, module2) {
|
|
88234
87349
|
"use strict";
|
|
88235
87350
|
var __defProp2 = Object.defineProperty;
|
|
@@ -88258,7 +87373,7 @@ var require_lib31 = __commonJS({
|
|
|
88258
87373
|
tagsId: () => tagsId
|
|
88259
87374
|
});
|
|
88260
87375
|
module2.exports = __toCommonJS2(index_exports2);
|
|
88261
|
-
var import_platform2 =
|
|
87376
|
+
var import_platform2 = require_lib();
|
|
88262
87377
|
__reExport2(index_exports2, require_analytics7(), module2.exports);
|
|
88263
87378
|
var tagsId = "tags";
|
|
88264
87379
|
var tagsPlugin = (0, import_platform2.plugin)(tagsId, {
|
|
@@ -89413,7 +88528,7 @@ var require_lexoRank2 = __commonJS({
|
|
|
89413
88528
|
});
|
|
89414
88529
|
|
|
89415
88530
|
// node_modules/.pnpm/lexorank@1.0.5/node_modules/lexorank/lib/index.js
|
|
89416
|
-
var
|
|
88531
|
+
var require_lib31 = __commonJS({
|
|
89417
88532
|
"node_modules/.pnpm/lexorank@1.0.5/node_modules/lexorank/lib/index.js"(exports2) {
|
|
89418
88533
|
"use strict";
|
|
89419
88534
|
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -89477,7 +88592,7 @@ var require_utils15 = __commonJS({
|
|
|
89477
88592
|
});
|
|
89478
88593
|
module2.exports = __toCommonJS2(utils_exports);
|
|
89479
88594
|
var import_lexoRankBucket = __toESM2(require_lexoRankBucket());
|
|
89480
|
-
var import_lexorank =
|
|
88595
|
+
var import_lexorank = require_lib31();
|
|
89481
88596
|
function genRanks(count3) {
|
|
89482
88597
|
const sys = new import_lexorank.LexoNumeralSystem36();
|
|
89483
88598
|
const base = 36;
|
|
@@ -89522,7 +88637,7 @@ var require_utils15 = __commonJS({
|
|
|
89522
88637
|
});
|
|
89523
88638
|
|
|
89524
88639
|
// node_modules/.pnpm/@hcengineering+rank@0.7.18/node_modules/@hcengineering/rank/lib/index.js
|
|
89525
|
-
var
|
|
88640
|
+
var require_lib32 = __commonJS({
|
|
89526
88641
|
"node_modules/.pnpm/@hcengineering+rank@0.7.18/node_modules/@hcengineering/rank/lib/index.js"(exports2, module2) {
|
|
89527
88642
|
"use strict";
|
|
89528
88643
|
var __defProp2 = Object.defineProperty;
|
|
@@ -89595,10 +88710,10 @@ var require_utils16 = __commonJS({
|
|
|
89595
88710
|
});
|
|
89596
88711
|
module2.exports = __toCommonJS2(utils_exports);
|
|
89597
88712
|
var import_core45 = __toESM2(require_lib4());
|
|
89598
|
-
var import_platform2 =
|
|
89599
|
-
var import__ = __toESM2(
|
|
89600
|
-
var import_rank4 =
|
|
89601
|
-
var import_rank22 =
|
|
88713
|
+
var import_platform2 = require_lib();
|
|
88714
|
+
var import__ = __toESM2(require_lib33());
|
|
88715
|
+
var import_rank4 = require_lib32();
|
|
88716
|
+
var import_rank22 = require_lib32();
|
|
89602
88717
|
var calcRank = /* @__PURE__ */ __name((prev, next4) => {
|
|
89603
88718
|
return (0, import_rank4.makeRank)(prev?.rank, next4?.rank);
|
|
89604
88719
|
}, "calcRank");
|
|
@@ -89802,7 +88917,7 @@ var require_utils16 = __commonJS({
|
|
|
89802
88917
|
});
|
|
89803
88918
|
|
|
89804
88919
|
// node_modules/.pnpm/@hcengineering+task@0.7.0/node_modules/@hcengineering/task/lib/index.js
|
|
89805
|
-
var
|
|
88920
|
+
var require_lib33 = __commonJS({
|
|
89806
88921
|
"node_modules/.pnpm/@hcengineering+task@0.7.0/node_modules/@hcengineering/task/lib/index.js"(exports2, module2) {
|
|
89807
88922
|
"use strict";
|
|
89808
88923
|
var __defProp2 = Object.defineProperty;
|
|
@@ -89830,7 +88945,7 @@ var require_lib34 = __commonJS({
|
|
|
89830
88945
|
taskId: () => taskId
|
|
89831
88946
|
});
|
|
89832
88947
|
module2.exports = __toCommonJS2(index_exports2);
|
|
89833
|
-
var import_platform2 =
|
|
88948
|
+
var import_platform2 = require_lib();
|
|
89834
88949
|
__reExport2(index_exports2, require_utils16(), module2.exports);
|
|
89835
88950
|
var TaskOrdering = /* @__PURE__ */ ((TaskOrdering2) => {
|
|
89836
88951
|
TaskOrdering2["State"] = "state";
|
|
@@ -89972,7 +89087,7 @@ var require_analytics8 = __commonJS({
|
|
|
89972
89087
|
});
|
|
89973
89088
|
|
|
89974
89089
|
// node_modules/.pnpm/@hcengineering+time@0.7.0/node_modules/@hcengineering/time/lib/index.js
|
|
89975
|
-
var
|
|
89090
|
+
var require_lib34 = __commonJS({
|
|
89976
89091
|
"node_modules/.pnpm/@hcengineering+time@0.7.0/node_modules/@hcengineering/time/lib/index.js"(exports2, module2) {
|
|
89977
89092
|
"use strict";
|
|
89978
89093
|
var __defProp2 = Object.defineProperty;
|
|
@@ -90000,7 +89115,7 @@ var require_lib35 = __commonJS({
|
|
|
90000
89115
|
timeId: () => timeId
|
|
90001
89116
|
});
|
|
90002
89117
|
module2.exports = __toCommonJS2(index_exports2);
|
|
90003
|
-
var import_platform2 =
|
|
89118
|
+
var import_platform2 = require_lib();
|
|
90004
89119
|
__reExport2(index_exports2, require_analytics8(), module2.exports);
|
|
90005
89120
|
var timeId = "time";
|
|
90006
89121
|
var ToDoPriority = /* @__PURE__ */ ((ToDoPriority2) => {
|
|
@@ -95261,7 +94376,7 @@ var require_streams = __commonJS({
|
|
|
95261
94376
|
});
|
|
95262
94377
|
|
|
95263
94378
|
// node_modules/.pnpm/iconv-lite@0.7.2/node_modules/iconv-lite/lib/index.js
|
|
95264
|
-
var
|
|
94379
|
+
var require_lib35 = __commonJS({
|
|
95265
94380
|
"node_modules/.pnpm/iconv-lite@0.7.2/node_modules/iconv-lite/lib/index.js"(exports2, module2) {
|
|
95266
94381
|
"use strict";
|
|
95267
94382
|
var Buffer2 = require_safer().Buffer;
|
|
@@ -95437,7 +94552,7 @@ var require_raw_body = __commonJS({
|
|
|
95437
94552
|
var asyncHooks = tryRequireAsyncHooks();
|
|
95438
94553
|
var bytes = require_bytes();
|
|
95439
94554
|
var createError = require_http_errors();
|
|
95440
|
-
var iconv =
|
|
94555
|
+
var iconv = require_lib35();
|
|
95441
94556
|
var unpipe = require_unpipe();
|
|
95442
94557
|
module2.exports = getRawBody;
|
|
95443
94558
|
var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: /;
|
|
@@ -105609,7 +104724,7 @@ var require_read = __commonJS({
|
|
|
105609
104724
|
"use strict";
|
|
105610
104725
|
var createError = require_http_errors();
|
|
105611
104726
|
var getBody = require_raw_body();
|
|
105612
|
-
var iconv =
|
|
104727
|
+
var iconv = require_lib35();
|
|
105613
104728
|
var onFinished = require_on_finished();
|
|
105614
104729
|
var zlib = require("node:zlib");
|
|
105615
104730
|
var hasBody = require_type_is().hasBody;
|
|
@@ -108377,7 +107492,7 @@ var require_parse3 = __commonJS({
|
|
|
108377
107492
|
});
|
|
108378
107493
|
|
|
108379
107494
|
// node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/index.js
|
|
108380
|
-
var
|
|
107495
|
+
var require_lib36 = __commonJS({
|
|
108381
107496
|
"node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/index.js"(exports2, module2) {
|
|
108382
107497
|
"use strict";
|
|
108383
107498
|
var stringify2 = require_stringify3();
|
|
@@ -108398,7 +107513,7 @@ var require_urlencoded = __commonJS({
|
|
|
108398
107513
|
var createError = require_http_errors();
|
|
108399
107514
|
var debug = require_src()("body-parser:urlencoded");
|
|
108400
107515
|
var read = require_read();
|
|
108401
|
-
var qs =
|
|
107516
|
+
var qs = require_lib36();
|
|
108402
107517
|
var { normalizeOptions } = require_utils17();
|
|
108403
107518
|
module2.exports = urlencoded;
|
|
108404
107519
|
function urlencoded(options) {
|
|
@@ -109779,7 +108894,7 @@ var require_utils19 = __commonJS({
|
|
|
109779
108894
|
var etag = require_etag();
|
|
109780
108895
|
var mime = require_mime_types();
|
|
109781
108896
|
var proxyaddr = require_proxy_addr();
|
|
109782
|
-
var qs =
|
|
108897
|
+
var qs = require_lib36();
|
|
109783
108898
|
var querystring = require("node:querystring");
|
|
109784
108899
|
var { Buffer: Buffer2 } = require("node:buffer");
|
|
109785
108900
|
exports2.methods = METHODS.map((method) => method.toLowerCase());
|
|
@@ -119739,7 +118854,7 @@ var require_format2 = __commonJS({
|
|
|
119739
118854
|
});
|
|
119740
118855
|
|
|
119741
118856
|
// node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/metadata.js
|
|
119742
|
-
var
|
|
118857
|
+
var require_metadata2 = __commonJS({
|
|
119743
118858
|
"node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/metadata.js"(exports2) {
|
|
119744
118859
|
"use strict";
|
|
119745
118860
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -119770,7 +118885,7 @@ var require_draft7 = __commonJS({
|
|
|
119770
118885
|
var validation_1 = require_validation();
|
|
119771
118886
|
var applicator_1 = require_applicator();
|
|
119772
118887
|
var format_1 = require_format2();
|
|
119773
|
-
var metadata_1 =
|
|
118888
|
+
var metadata_1 = require_metadata2();
|
|
119774
118889
|
var draft7Vocabularies = [
|
|
119775
118890
|
core_1.default,
|
|
119776
118891
|
validation_1.default,
|
|
@@ -151427,7 +150542,7 @@ var concatLink = (host, path2) => {
|
|
|
151427
150542
|
};
|
|
151428
150543
|
|
|
151429
150544
|
// src/huly/auth-utils.ts
|
|
151430
|
-
var import_platform = __toESM(
|
|
150545
|
+
var import_platform = __toESM(require_lib(), 1);
|
|
151431
150546
|
|
|
151432
150547
|
// src/huly/errors-base.ts
|
|
151433
150548
|
var HulyError = class extends Schema_exports.TaggedError()("HulyError", {
|
|
@@ -152201,7 +151316,7 @@ var path = __toESM(require("node:path"), 1);
|
|
|
152201
151316
|
var import_api_client2 = __toESM(require_lib20(), 1);
|
|
152202
151317
|
|
|
152203
151318
|
// src/huly/operations/shared.ts
|
|
152204
|
-
var import_tracker = __toESM(
|
|
151319
|
+
var import_tracker = __toESM(require_lib21(), 1);
|
|
152205
151320
|
|
|
152206
151321
|
// src/domain/schemas/shared.ts
|
|
152207
151322
|
var MAX_LIMIT = 200;
|
|
@@ -152311,19 +151426,19 @@ var TestResultIdentifier = NonEmptyString2.pipe(Schema_exports.brand("TestResult
|
|
|
152311
151426
|
var normalizeForComparison = (s) => s.replace(/[-_ ]/g, "").toLowerCase();
|
|
152312
151427
|
|
|
152313
151428
|
// src/huly/huly-plugins.ts
|
|
152314
|
-
var activity =
|
|
152315
|
-
var attachment =
|
|
152316
|
-
var calendar =
|
|
152317
|
-
var cardPlugin =
|
|
152318
|
-
var chunter =
|
|
152319
|
-
var contact =
|
|
151429
|
+
var activity = require_lib22().default;
|
|
151430
|
+
var attachment = require_lib23().default;
|
|
151431
|
+
var calendar = require_lib24().default;
|
|
151432
|
+
var cardPlugin = require_lib25().default;
|
|
151433
|
+
var chunter = require_lib26().default;
|
|
151434
|
+
var contact = require_lib27().default;
|
|
152320
151435
|
var core = require_lib4().default;
|
|
152321
|
-
var documentPlugin =
|
|
152322
|
-
var notification =
|
|
152323
|
-
var tags =
|
|
152324
|
-
var task =
|
|
152325
|
-
var time =
|
|
152326
|
-
var tracker =
|
|
151436
|
+
var documentPlugin = require_lib28().default;
|
|
151437
|
+
var notification = require_lib29().default;
|
|
151438
|
+
var tags = require_lib30().default;
|
|
151439
|
+
var task = require_lib33().default;
|
|
151440
|
+
var time = require_lib34().default;
|
|
151441
|
+
var tracker = require_lib21().default;
|
|
152327
151442
|
|
|
152328
151443
|
// src/huly/operations/query-helpers.ts
|
|
152329
151444
|
var escapeLikeWildcards = (input) => input.replace(/\\/g, "\\\\").replace(/%/g, "\\%").replace(/_/g, "\\_");
|
|
@@ -172081,7 +171196,7 @@ var PostHog = class extends PostHogBackendClient {
|
|
|
172081
171196
|
};
|
|
172082
171197
|
|
|
172083
171198
|
// src/version.ts
|
|
172084
|
-
var VERSION = true ? "0.
|
|
171199
|
+
var VERSION = true ? "0.3.0" : "0.0.0-dev";
|
|
172085
171200
|
|
|
172086
171201
|
// src/telemetry/posthog.ts
|
|
172087
171202
|
var POSTHOG_API_KEY = "phc_TGfFqCGdnF0p68wuFzd5WSw1IsBvOJW0YgoMJDyZPjm";
|
|
@@ -172913,7 +172028,7 @@ var import_core23 = __toESM(require_lib4(), 1);
|
|
|
172913
172028
|
|
|
172914
172029
|
// src/huly/operations/documents.ts
|
|
172915
172030
|
var import_core22 = __toESM(require_lib4(), 1);
|
|
172916
|
-
var import_rank = __toESM(
|
|
172031
|
+
var import_rank = __toESM(require_lib32(), 1);
|
|
172917
172032
|
|
|
172918
172033
|
// src/huly/operations/documents-edit.ts
|
|
172919
172034
|
var editDocument = (params) => Effect_exports.gen(function* () {
|
|
@@ -174156,7 +173271,7 @@ var parseCreateRecurringEventParams = Schema_exports.decodeUnknown(CreateRecurri
|
|
|
174156
173271
|
var parseListEventInstancesParams = Schema_exports.decodeUnknown(ListEventInstancesParamsSchema);
|
|
174157
173272
|
|
|
174158
173273
|
// src/huly/operations/calendar.ts
|
|
174159
|
-
var import_calendar2 = __toESM(
|
|
173274
|
+
var import_calendar2 = __toESM(require_lib24(), 1);
|
|
174160
173275
|
var import_core25 = __toESM(require_lib4(), 1);
|
|
174161
173276
|
|
|
174162
173277
|
// src/huly/operations/calendar-shared.ts
|
|
@@ -174214,7 +173329,7 @@ var resolveEventInputs = (client, params, eventClass, eventId) => Effect_exports
|
|
|
174214
173329
|
});
|
|
174215
173330
|
|
|
174216
173331
|
// src/huly/operations/calendar-recurring.ts
|
|
174217
|
-
var import_calendar = __toESM(
|
|
173332
|
+
var import_calendar = __toESM(require_lib24(), 1);
|
|
174218
173333
|
var import_core24 = __toESM(require_lib4(), 1);
|
|
174219
173334
|
var hulyRuleToRule = (rule) => ({
|
|
174220
173335
|
freq: rule.freq,
|
|
@@ -177412,7 +176527,7 @@ var parseRunTestPlanParams = Schema_exports.decodeUnknown(RunTestPlanParamsSchem
|
|
|
177412
176527
|
|
|
177413
176528
|
// src/huly/operations/cards.ts
|
|
177414
176529
|
var import_core26 = __toESM(require_lib4(), 1);
|
|
177415
|
-
var import_rank2 = __toESM(
|
|
176530
|
+
var import_rank2 = __toESM(require_lib32(), 1);
|
|
177416
176531
|
var findCardSpace = (identifier2) => Effect_exports.gen(function* () {
|
|
177417
176532
|
const client = yield* HulyClient;
|
|
177418
176533
|
const cardSpace = yield* findByNameOrId(
|
|
@@ -178203,7 +177318,7 @@ var commentTools = [
|
|
|
178203
177318
|
];
|
|
178204
177319
|
|
|
178205
177320
|
// src/huly/operations/contacts.ts
|
|
178206
|
-
var import_contact = __toESM(
|
|
177321
|
+
var import_contact = __toESM(require_lib27(), 1);
|
|
178207
177322
|
var import_core29 = __toESM(require_lib4(), 1);
|
|
178208
177323
|
var formatName = (firstName, lastName) => `${lastName},${firstName}`;
|
|
178209
177324
|
var parseName = (name) => {
|
|
@@ -179314,7 +178429,7 @@ var import_core34 = __toESM(require_lib4(), 1);
|
|
|
179314
178429
|
|
|
179315
178430
|
// src/huly/operations/issues-move.ts
|
|
179316
178431
|
var import_core31 = __toESM(require_lib4(), 1);
|
|
179317
|
-
var import_tracker2 = __toESM(
|
|
178432
|
+
var import_tracker2 = __toESM(require_lib21(), 1);
|
|
179318
178433
|
var addLabel = (params) => Effect_exports.gen(function* () {
|
|
179319
178434
|
const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue(params);
|
|
179320
178435
|
const existingLabels = yield* client.findAll(
|
|
@@ -179474,7 +178589,7 @@ var updateDescendantParents = (client, spaceId, parentIssue, parentNewParents) =
|
|
|
179474
178589
|
|
|
179475
178590
|
// src/huly/operations/issues-read.ts
|
|
179476
178591
|
var import_core32 = __toESM(require_lib4(), 1);
|
|
179477
|
-
var import_tracker3 = __toESM(
|
|
178592
|
+
var import_tracker3 = __toESM(require_lib21(), 1);
|
|
179478
178593
|
var resolveStatusName = (statuses, statusId) => {
|
|
179479
178594
|
const statusDoc = statuses.find((s) => s._id === statusId);
|
|
179480
178595
|
return statusDoc?.name ?? "Unknown";
|
|
@@ -179645,8 +178760,8 @@ var getIssue = (params) => Effect_exports.gen(function* () {
|
|
|
179645
178760
|
|
|
179646
178761
|
// src/huly/operations/issues-write.ts
|
|
179647
178762
|
var import_core33 = __toESM(require_lib4(), 1);
|
|
179648
|
-
var import_rank3 = __toESM(
|
|
179649
|
-
var import_tracker4 = __toESM(
|
|
178763
|
+
var import_rank3 = __toESM(require_lib32(), 1);
|
|
178764
|
+
var import_tracker4 = __toESM(require_lib21(), 1);
|
|
179650
178765
|
var TxIncResult = Schema_exports.Struct({
|
|
179651
178766
|
object: Schema_exports.Struct({
|
|
179652
178767
|
sequence: Schema_exports.Number
|
|
@@ -180784,7 +179899,7 @@ var labelTools = [
|
|
|
180784
179899
|
|
|
180785
179900
|
// src/huly/operations/milestones.ts
|
|
180786
179901
|
var import_core37 = __toESM(require_lib4(), 1);
|
|
180787
|
-
var import_tracker5 = __toESM(
|
|
179902
|
+
var import_tracker5 = __toESM(require_lib21(), 1);
|
|
180788
179903
|
var milestoneStatusToStringMap = {
|
|
180789
179904
|
[import_tracker5.MilestoneStatus.Planned]: "planned",
|
|
180790
179905
|
[import_tracker5.MilestoneStatus.InProgress]: "in-progress",
|
|
@@ -181396,7 +180511,7 @@ var notificationTools = [
|
|
|
181396
180511
|
|
|
181397
180512
|
// src/huly/operations/projects.ts
|
|
181398
180513
|
var import_core39 = __toESM(require_lib4(), 1);
|
|
181399
|
-
var import_tracker6 = __toESM(
|
|
180514
|
+
var import_tracker6 = __toESM(require_lib21(), 1);
|
|
181400
180515
|
var listProjects = (params) => Effect_exports.gen(function* () {
|
|
181401
180516
|
const client = yield* HulyClient;
|
|
181402
180517
|
const query = {};
|
|
@@ -182844,9 +181959,9 @@ var testManagementPlansTools = [
|
|
|
182844
181959
|
];
|
|
182845
181960
|
|
|
182846
181961
|
// src/huly/operations/time.ts
|
|
182847
|
-
var import_calendar6 = __toESM(
|
|
181962
|
+
var import_calendar6 = __toESM(require_lib24(), 1);
|
|
182848
181963
|
var import_core43 = __toESM(require_lib4(), 1);
|
|
182849
|
-
var import_tracker7 = __toESM(
|
|
181964
|
+
var import_tracker7 = __toESM(require_lib21(), 1);
|
|
182850
181965
|
var serverPopulatedCalendar = toRef("");
|
|
182851
181966
|
var serverPopulatedPersonId = "";
|
|
182852
181967
|
var refAsPersonId = (ref) => ref;
|
|
@@ -183522,6 +182637,40 @@ var toolRegistry = buildRegistry(allTools);
|
|
|
183522
182637
|
var TOOL_DEFINITIONS = Object.fromEntries(toolRegistry.tools);
|
|
183523
182638
|
|
|
183524
182639
|
// src/mcp/server.ts
|
|
182640
|
+
var NPM_PACKAGE_NAME = "@firfi/huly-mcp";
|
|
182641
|
+
var VERSION_TOOL_NAME = "get_version";
|
|
182642
|
+
var versionToolDefinition = {
|
|
182643
|
+
name: VERSION_TOOL_NAME,
|
|
182644
|
+
description: "Returns the current version of this Huly MCP server and the latest version available on npm.",
|
|
182645
|
+
inputSchema: { type: "object", properties: {} },
|
|
182646
|
+
annotations: {
|
|
182647
|
+
title: "Get Version",
|
|
182648
|
+
readOnlyHint: true,
|
|
182649
|
+
destructiveHint: false,
|
|
182650
|
+
idempotentHint: true,
|
|
182651
|
+
openWorldHint: true
|
|
182652
|
+
}
|
|
182653
|
+
};
|
|
182654
|
+
var NPM_FETCH_TIMEOUT_MS = 5e3;
|
|
182655
|
+
var fetchLatestNpmVersion = async () => {
|
|
182656
|
+
try {
|
|
182657
|
+
const res = await fetch(`https://registry.npmjs.org/${NPM_PACKAGE_NAME}/latest`, {
|
|
182658
|
+
signal: AbortSignal.timeout(NPM_FETCH_TIMEOUT_MS)
|
|
182659
|
+
});
|
|
182660
|
+
if (!res.ok) return "unknown";
|
|
182661
|
+
const data = await res.json();
|
|
182662
|
+
if (typeof data === "object" && data !== null && "version" in data && typeof data.version === "string") {
|
|
182663
|
+
return data.version;
|
|
182664
|
+
}
|
|
182665
|
+
return "unknown";
|
|
182666
|
+
} catch {
|
|
182667
|
+
return "unknown";
|
|
182668
|
+
}
|
|
182669
|
+
};
|
|
182670
|
+
var handleVersionTool = async () => {
|
|
182671
|
+
const latest = await fetchLatestNpmVersion();
|
|
182672
|
+
return createSuccessResponse({ current: VERSION, latest });
|
|
182673
|
+
};
|
|
183525
182674
|
var isObjectSchema = (schema) => "type" in schema && schema.type === "object";
|
|
183526
182675
|
var McpServerError = class extends Schema_exports.TaggedError()(
|
|
183527
182676
|
"McpServerError",
|
|
@@ -183578,15 +182727,18 @@ var createMcpServer = (resolveClients, telemetry, registry2) => {
|
|
|
183578
182727
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
183579
182728
|
telemetry.firstListTools();
|
|
183580
182729
|
return {
|
|
183581
|
-
tools:
|
|
183582
|
-
|
|
183583
|
-
|
|
183584
|
-
|
|
183585
|
-
|
|
183586
|
-
|
|
183587
|
-
|
|
183588
|
-
|
|
183589
|
-
|
|
182730
|
+
tools: [
|
|
182731
|
+
versionToolDefinition,
|
|
182732
|
+
...registry2.definitions.flatMap((tool) => {
|
|
182733
|
+
if (!isObjectSchema(tool.inputSchema)) return [];
|
|
182734
|
+
return [{
|
|
182735
|
+
name: tool.name,
|
|
182736
|
+
description: tool.description,
|
|
182737
|
+
inputSchema: tool.inputSchema,
|
|
182738
|
+
annotations: resolveAnnotations(tool)
|
|
182739
|
+
}];
|
|
182740
|
+
})
|
|
182741
|
+
]
|
|
183590
182742
|
};
|
|
183591
182743
|
});
|
|
183592
182744
|
server.setRequestHandler(CallToolRequestSchema, async (request2) => {
|
|
@@ -183595,6 +182747,19 @@ var createMcpServer = (resolveClients, telemetry, registry2) => {
|
|
|
183595
182747
|
const { arguments: args2, name } = request2.params;
|
|
183596
182748
|
const start3 = Date.now();
|
|
183597
182749
|
const inputBytes = JSON.stringify(args2 ?? {}).length;
|
|
182750
|
+
const computeOutputBytes = (response2) => response2.content.reduce((sum2, c) => sum2 + c.text.length, 0);
|
|
182751
|
+
if (name === VERSION_TOOL_NAME) {
|
|
182752
|
+
const versionResponse = await handleVersionTool();
|
|
182753
|
+
const durationMs2 = Date.now() - start3;
|
|
182754
|
+
telemetry.toolCalled({
|
|
182755
|
+
toolName: name,
|
|
182756
|
+
status: "success",
|
|
182757
|
+
durationMs: durationMs2,
|
|
182758
|
+
inputBytes,
|
|
182759
|
+
outputBytes: computeOutputBytes(versionResponse)
|
|
182760
|
+
});
|
|
182761
|
+
return toMcpResponse(versionResponse);
|
|
182762
|
+
}
|
|
183598
182763
|
const deriveEditMode = () => {
|
|
183599
182764
|
if (name !== "edit_document" || args2 === void 0) return void 0;
|
|
183600
182765
|
if ("old_text" in args2) return "search_and_replace";
|
|
@@ -183602,7 +182767,6 @@ var createMcpServer = (resolveClients, telemetry, registry2) => {
|
|
|
183602
182767
|
return "title_only";
|
|
183603
182768
|
};
|
|
183604
182769
|
const editMode = deriveEditMode();
|
|
183605
|
-
const computeOutputBytes = (response2) => response2.content.reduce((sum2, c) => sum2 + c.text.length, 0);
|
|
183606
182770
|
let clients;
|
|
183607
182771
|
try {
|
|
183608
182772
|
clients = await resolveClients();
|
|
@@ -183909,7 +183073,6 @@ undici/lib/web/fetch/body.js:
|
|
|
183909
183073
|
undici/lib/web/websocket/frame.js:
|
|
183910
183074
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
183911
183075
|
|
|
183912
|
-
@hcengineering/platform/lib/platform.js:
|
|
183913
183076
|
@hcengineering/platform/lib/platform.js:
|
|
183914
183077
|
(*!
|
|
183915
183078
|
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|