@eigenpal/cli 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2730 -292
- package/dist/skill/reference/workflow-yaml.md +4 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17080,14 +17080,2478 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
17080
17080
|
module.exports.createColors = createColors;
|
|
17081
17081
|
});
|
|
17082
17082
|
|
|
17083
|
+
// ../../node_modules/nanoid/url-alphabet/index.js
|
|
17084
|
+
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
17085
|
+
|
|
17086
|
+
// ../../node_modules/nanoid/index.js
|
|
17087
|
+
import { webcrypto as crypto } from "node:crypto";
|
|
17088
|
+
function fillPool(bytes) {
|
|
17089
|
+
if (!pool || pool.length < bytes) {
|
|
17090
|
+
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
17091
|
+
crypto.getRandomValues(pool);
|
|
17092
|
+
poolOffset = 0;
|
|
17093
|
+
} else if (poolOffset + bytes > pool.length) {
|
|
17094
|
+
crypto.getRandomValues(pool);
|
|
17095
|
+
poolOffset = 0;
|
|
17096
|
+
}
|
|
17097
|
+
poolOffset += bytes;
|
|
17098
|
+
}
|
|
17099
|
+
function nanoid3(size = 21) {
|
|
17100
|
+
fillPool(size |= 0);
|
|
17101
|
+
let id = "";
|
|
17102
|
+
for (let i = poolOffset - size;i < poolOffset; i++) {
|
|
17103
|
+
id += urlAlphabet[pool[i] & 63];
|
|
17104
|
+
}
|
|
17105
|
+
return id;
|
|
17106
|
+
}
|
|
17107
|
+
var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset;
|
|
17108
|
+
var init_nanoid = () => {};
|
|
17109
|
+
|
|
17110
|
+
// ../types/src/core/common.ts
|
|
17111
|
+
function generateId(prefix) {
|
|
17112
|
+
const id = nanoid3();
|
|
17113
|
+
return prefix ? `${prefix}_${id}` : id;
|
|
17114
|
+
}
|
|
17115
|
+
function toJsonSchema(schema) {
|
|
17116
|
+
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
17117
|
+
}
|
|
17118
|
+
var ID_PREFIXES, TimestampSchema, JsonSchemaSchema, BaseEntitySchema;
|
|
17119
|
+
var init_common = __esm(() => {
|
|
17120
|
+
init_nanoid();
|
|
17121
|
+
init_zod();
|
|
17122
|
+
ID_PREFIXES = {
|
|
17123
|
+
WORKFLOW: "wf",
|
|
17124
|
+
WORKFLOW_VERSION: "wfv",
|
|
17125
|
+
WORKFLOW_HISTORY: "wfh",
|
|
17126
|
+
JOB: "job",
|
|
17127
|
+
EXECUTION: "exec",
|
|
17128
|
+
STEP_EXECUTION: "step",
|
|
17129
|
+
FILE: "file",
|
|
17130
|
+
TEMPLATE: "tmpl",
|
|
17131
|
+
USER: "user",
|
|
17132
|
+
TENANT: "org",
|
|
17133
|
+
TENANT_INVITE: "inv",
|
|
17134
|
+
API_KEY: "eig",
|
|
17135
|
+
PROCESSOR: "proc",
|
|
17136
|
+
AI_PROVIDER: "aip",
|
|
17137
|
+
ACCOUNT: "acct",
|
|
17138
|
+
SESSION: "sess",
|
|
17139
|
+
VERIFICATION: "vrf",
|
|
17140
|
+
DATASET: "ds",
|
|
17141
|
+
DATASET_EXAMPLE: "dex",
|
|
17142
|
+
EXPERIMENT: "exp",
|
|
17143
|
+
EXPERIMENT_RUN: "exr",
|
|
17144
|
+
EXPERIMENT_EVALUATION: "evl",
|
|
17145
|
+
EVAL_EXAMPLE: "evx",
|
|
17146
|
+
EVAL_RESULT: "evr",
|
|
17147
|
+
EVAL_BATCH: "evb",
|
|
17148
|
+
TABLE_ROW: "row",
|
|
17149
|
+
FOLDER: "fldr",
|
|
17150
|
+
AGENT_WORKFLOW: "awf",
|
|
17151
|
+
AGENT_EXECUTION: "aex",
|
|
17152
|
+
AGENT_EXAMPLE: "aeg",
|
|
17153
|
+
AGENT_VERSION: "avr",
|
|
17154
|
+
AGENT_TRAINING_SESSION: "ats",
|
|
17155
|
+
AGENT_EXPERIMENT: "aexp",
|
|
17156
|
+
AGENT_EMAIL_ALIAS: "aea",
|
|
17157
|
+
AGENT_EMAIL_INVOCATION: "aei",
|
|
17158
|
+
AUTOMATION_TRIGGER: "atr",
|
|
17159
|
+
SANDBOX_WS_TOKEN: "sws"
|
|
17160
|
+
};
|
|
17161
|
+
TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
17162
|
+
return typeof val === "string" ? new Date(val) : val;
|
|
17163
|
+
});
|
|
17164
|
+
JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
17165
|
+
BaseEntitySchema = exports_external.object({
|
|
17166
|
+
id: exports_external.string(),
|
|
17167
|
+
createdAt: TimestampSchema.optional(),
|
|
17168
|
+
updatedAt: TimestampSchema.optional()
|
|
17169
|
+
});
|
|
17170
|
+
});
|
|
17171
|
+
|
|
17172
|
+
// ../types/src/core/ids.ts
|
|
17173
|
+
var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
|
|
17174
|
+
var init_ids = __esm(() => {
|
|
17175
|
+
PROCESSOR_IDS = {
|
|
17176
|
+
MERGE: "builtin/merge",
|
|
17177
|
+
DOCUMENT_PARSER: "builtin/parser",
|
|
17178
|
+
EXTRACT: "builtin/extract",
|
|
17179
|
+
SPLIT: "builtin/split",
|
|
17180
|
+
CLASSIFY: "builtin/classify",
|
|
17181
|
+
TEMPLATE: "builtin/template",
|
|
17182
|
+
PDF_EMBEDDER: "builtin/pdf-embedder",
|
|
17183
|
+
XLSX_TO_JSON: "builtin/xlsx-to-json"
|
|
17184
|
+
};
|
|
17185
|
+
PARSER_IDS = {
|
|
17186
|
+
KREUZBERG: "builtin/kreuzberg",
|
|
17187
|
+
OCR: "builtin/ocr",
|
|
17188
|
+
LLM_VISION: "builtin/llm-vision"
|
|
17189
|
+
};
|
|
17190
|
+
INPUT_KINDS = {
|
|
17191
|
+
DOCUMENT: "document",
|
|
17192
|
+
PAYLOAD: "payload"
|
|
17193
|
+
};
|
|
17194
|
+
});
|
|
17195
|
+
|
|
17196
|
+
// ../types/src/core/pagination.ts
|
|
17197
|
+
var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
|
|
17198
|
+
var init_pagination = __esm(() => {
|
|
17199
|
+
init_zod();
|
|
17200
|
+
PaginationParamsSchema = exports_external.object({
|
|
17201
|
+
limit: exports_external.coerce.number().int().min(1).max(100).default(50),
|
|
17202
|
+
offset: exports_external.coerce.number().int().min(0).default(0)
|
|
17203
|
+
});
|
|
17204
|
+
});
|
|
17205
|
+
|
|
17083
17206
|
// ../types/src/core/index.ts
|
|
17084
|
-
var init_core3 = () => {
|
|
17207
|
+
var init_core3 = __esm(() => {
|
|
17208
|
+
init_common();
|
|
17209
|
+
init_ids();
|
|
17210
|
+
init_pagination();
|
|
17211
|
+
});
|
|
17212
|
+
|
|
17213
|
+
// ../../node_modules/@opentelemetry/api/build/src/version.js
|
|
17214
|
+
var require_version = __commonJS((exports) => {
|
|
17215
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17216
|
+
exports.VERSION = undefined;
|
|
17217
|
+
exports.VERSION = "1.9.1";
|
|
17218
|
+
});
|
|
17219
|
+
|
|
17220
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
|
|
17221
|
+
var require_semver = __commonJS((exports) => {
|
|
17222
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17223
|
+
exports.isCompatible = exports._makeCompatibilityCheck = undefined;
|
|
17224
|
+
var version_1 = require_version();
|
|
17225
|
+
var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
17226
|
+
function _makeCompatibilityCheck(ownVersion) {
|
|
17227
|
+
const acceptedVersions = new Set([ownVersion]);
|
|
17228
|
+
const rejectedVersions = new Set;
|
|
17229
|
+
const myVersionMatch = ownVersion.match(re);
|
|
17230
|
+
if (!myVersionMatch) {
|
|
17231
|
+
return () => false;
|
|
17232
|
+
}
|
|
17233
|
+
const ownVersionParsed = {
|
|
17234
|
+
major: +myVersionMatch[1],
|
|
17235
|
+
minor: +myVersionMatch[2],
|
|
17236
|
+
patch: +myVersionMatch[3],
|
|
17237
|
+
prerelease: myVersionMatch[4]
|
|
17238
|
+
};
|
|
17239
|
+
if (ownVersionParsed.prerelease != null) {
|
|
17240
|
+
return function isExactmatch(globalVersion) {
|
|
17241
|
+
return globalVersion === ownVersion;
|
|
17242
|
+
};
|
|
17243
|
+
}
|
|
17244
|
+
function _reject(v) {
|
|
17245
|
+
rejectedVersions.add(v);
|
|
17246
|
+
return false;
|
|
17247
|
+
}
|
|
17248
|
+
function _accept(v) {
|
|
17249
|
+
acceptedVersions.add(v);
|
|
17250
|
+
return true;
|
|
17251
|
+
}
|
|
17252
|
+
return function isCompatible(globalVersion) {
|
|
17253
|
+
if (acceptedVersions.has(globalVersion)) {
|
|
17254
|
+
return true;
|
|
17255
|
+
}
|
|
17256
|
+
if (rejectedVersions.has(globalVersion)) {
|
|
17257
|
+
return false;
|
|
17258
|
+
}
|
|
17259
|
+
const globalVersionMatch = globalVersion.match(re);
|
|
17260
|
+
if (!globalVersionMatch) {
|
|
17261
|
+
return _reject(globalVersion);
|
|
17262
|
+
}
|
|
17263
|
+
const globalVersionParsed = {
|
|
17264
|
+
major: +globalVersionMatch[1],
|
|
17265
|
+
minor: +globalVersionMatch[2],
|
|
17266
|
+
patch: +globalVersionMatch[3],
|
|
17267
|
+
prerelease: globalVersionMatch[4]
|
|
17268
|
+
};
|
|
17269
|
+
if (globalVersionParsed.prerelease != null) {
|
|
17270
|
+
return _reject(globalVersion);
|
|
17271
|
+
}
|
|
17272
|
+
if (ownVersionParsed.major !== globalVersionParsed.major) {
|
|
17273
|
+
return _reject(globalVersion);
|
|
17274
|
+
}
|
|
17275
|
+
if (ownVersionParsed.major === 0) {
|
|
17276
|
+
if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
|
|
17277
|
+
return _accept(globalVersion);
|
|
17278
|
+
}
|
|
17279
|
+
return _reject(globalVersion);
|
|
17280
|
+
}
|
|
17281
|
+
if (ownVersionParsed.minor <= globalVersionParsed.minor) {
|
|
17282
|
+
return _accept(globalVersion);
|
|
17283
|
+
}
|
|
17284
|
+
return _reject(globalVersion);
|
|
17285
|
+
};
|
|
17286
|
+
}
|
|
17287
|
+
exports._makeCompatibilityCheck = _makeCompatibilityCheck;
|
|
17288
|
+
exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
|
|
17289
|
+
});
|
|
17290
|
+
|
|
17291
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
|
|
17292
|
+
var require_global_utils = __commonJS((exports) => {
|
|
17293
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17294
|
+
exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
|
|
17295
|
+
var version_1 = require_version();
|
|
17296
|
+
var semver_1 = require_semver();
|
|
17297
|
+
var major = version_1.VERSION.split(".")[0];
|
|
17298
|
+
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
|
|
17299
|
+
var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
17300
|
+
function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
17301
|
+
var _a3;
|
|
17302
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
|
|
17303
|
+
version: version_1.VERSION
|
|
17304
|
+
};
|
|
17305
|
+
if (!allowOverride && api2[type]) {
|
|
17306
|
+
const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
|
|
17307
|
+
diag.error(err.stack || err.message);
|
|
17308
|
+
return false;
|
|
17309
|
+
}
|
|
17310
|
+
if (api2.version !== version_1.VERSION) {
|
|
17311
|
+
const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
|
|
17312
|
+
diag.error(err.stack || err.message);
|
|
17313
|
+
return false;
|
|
17314
|
+
}
|
|
17315
|
+
api2[type] = instance;
|
|
17316
|
+
diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
|
|
17317
|
+
return true;
|
|
17318
|
+
}
|
|
17319
|
+
exports.registerGlobal = registerGlobal;
|
|
17320
|
+
function getGlobal(type) {
|
|
17321
|
+
var _a3, _b;
|
|
17322
|
+
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
|
|
17323
|
+
if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
|
|
17324
|
+
return;
|
|
17325
|
+
}
|
|
17326
|
+
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
|
|
17327
|
+
}
|
|
17328
|
+
exports.getGlobal = getGlobal;
|
|
17329
|
+
function unregisterGlobal(type, diag) {
|
|
17330
|
+
diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
|
|
17331
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
17332
|
+
if (api2) {
|
|
17333
|
+
delete api2[type];
|
|
17334
|
+
}
|
|
17335
|
+
}
|
|
17336
|
+
exports.unregisterGlobal = unregisterGlobal;
|
|
17337
|
+
});
|
|
17338
|
+
|
|
17339
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
|
|
17340
|
+
var require_ComponentLogger = __commonJS((exports) => {
|
|
17341
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17342
|
+
exports.DiagComponentLogger = undefined;
|
|
17343
|
+
var global_utils_1 = require_global_utils();
|
|
17344
|
+
|
|
17345
|
+
class DiagComponentLogger {
|
|
17346
|
+
constructor(props) {
|
|
17347
|
+
this._namespace = props.namespace || "DiagComponentLogger";
|
|
17348
|
+
}
|
|
17349
|
+
debug(...args) {
|
|
17350
|
+
return logProxy("debug", this._namespace, args);
|
|
17351
|
+
}
|
|
17352
|
+
error(...args) {
|
|
17353
|
+
return logProxy("error", this._namespace, args);
|
|
17354
|
+
}
|
|
17355
|
+
info(...args) {
|
|
17356
|
+
return logProxy("info", this._namespace, args);
|
|
17357
|
+
}
|
|
17358
|
+
warn(...args) {
|
|
17359
|
+
return logProxy("warn", this._namespace, args);
|
|
17360
|
+
}
|
|
17361
|
+
verbose(...args) {
|
|
17362
|
+
return logProxy("verbose", this._namespace, args);
|
|
17363
|
+
}
|
|
17364
|
+
}
|
|
17365
|
+
exports.DiagComponentLogger = DiagComponentLogger;
|
|
17366
|
+
function logProxy(funcName, namespace, args) {
|
|
17367
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17368
|
+
if (!logger) {
|
|
17369
|
+
return;
|
|
17370
|
+
}
|
|
17371
|
+
return logger[funcName](namespace, ...args);
|
|
17372
|
+
}
|
|
17373
|
+
});
|
|
17374
|
+
|
|
17375
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/types.js
|
|
17376
|
+
var require_types = __commonJS((exports) => {
|
|
17377
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17378
|
+
exports.DiagLogLevel = undefined;
|
|
17379
|
+
var DiagLogLevel;
|
|
17380
|
+
(function(DiagLogLevel2) {
|
|
17381
|
+
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
17382
|
+
DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
|
|
17383
|
+
DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
|
|
17384
|
+
DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
|
|
17385
|
+
DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
|
|
17386
|
+
DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
|
|
17387
|
+
DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
|
|
17388
|
+
})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
|
|
17389
|
+
});
|
|
17390
|
+
|
|
17391
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
|
|
17392
|
+
var require_logLevelLogger = __commonJS((exports) => {
|
|
17393
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17394
|
+
exports.createLogLevelDiagLogger = undefined;
|
|
17395
|
+
var types_1 = require_types();
|
|
17396
|
+
function createLogLevelDiagLogger(maxLevel, logger) {
|
|
17397
|
+
if (maxLevel < types_1.DiagLogLevel.NONE) {
|
|
17398
|
+
maxLevel = types_1.DiagLogLevel.NONE;
|
|
17399
|
+
} else if (maxLevel > types_1.DiagLogLevel.ALL) {
|
|
17400
|
+
maxLevel = types_1.DiagLogLevel.ALL;
|
|
17401
|
+
}
|
|
17402
|
+
logger = logger || {};
|
|
17403
|
+
function _filterFunc(funcName, theLevel) {
|
|
17404
|
+
const theFunc = logger[funcName];
|
|
17405
|
+
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
17406
|
+
return theFunc.bind(logger);
|
|
17407
|
+
}
|
|
17408
|
+
return function() {};
|
|
17409
|
+
}
|
|
17410
|
+
return {
|
|
17411
|
+
error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
|
|
17412
|
+
warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
|
|
17413
|
+
info: _filterFunc("info", types_1.DiagLogLevel.INFO),
|
|
17414
|
+
debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
|
|
17415
|
+
verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
|
|
17416
|
+
};
|
|
17417
|
+
}
|
|
17418
|
+
exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
|
|
17419
|
+
});
|
|
17420
|
+
|
|
17421
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/diag.js
|
|
17422
|
+
var require_diag = __commonJS((exports) => {
|
|
17423
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17424
|
+
exports.DiagAPI = undefined;
|
|
17425
|
+
var ComponentLogger_1 = require_ComponentLogger();
|
|
17426
|
+
var logLevelLogger_1 = require_logLevelLogger();
|
|
17427
|
+
var types_1 = require_types();
|
|
17428
|
+
var global_utils_1 = require_global_utils();
|
|
17429
|
+
var API_NAME = "diag";
|
|
17430
|
+
|
|
17431
|
+
class DiagAPI {
|
|
17432
|
+
static instance() {
|
|
17433
|
+
if (!this._instance) {
|
|
17434
|
+
this._instance = new DiagAPI;
|
|
17435
|
+
}
|
|
17436
|
+
return this._instance;
|
|
17437
|
+
}
|
|
17438
|
+
constructor() {
|
|
17439
|
+
function _logProxy(funcName) {
|
|
17440
|
+
return function(...args) {
|
|
17441
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17442
|
+
if (!logger)
|
|
17443
|
+
return;
|
|
17444
|
+
return logger[funcName](...args);
|
|
17445
|
+
};
|
|
17446
|
+
}
|
|
17447
|
+
const self2 = this;
|
|
17448
|
+
const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
|
|
17449
|
+
var _a3, _b, _c;
|
|
17450
|
+
if (logger === self2) {
|
|
17451
|
+
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
17452
|
+
self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
|
|
17453
|
+
return false;
|
|
17454
|
+
}
|
|
17455
|
+
if (typeof optionsOrLogLevel === "number") {
|
|
17456
|
+
optionsOrLogLevel = {
|
|
17457
|
+
logLevel: optionsOrLogLevel
|
|
17458
|
+
};
|
|
17459
|
+
}
|
|
17460
|
+
const oldLogger = (0, global_utils_1.getGlobal)("diag");
|
|
17461
|
+
const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
|
|
17462
|
+
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
17463
|
+
const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
|
|
17464
|
+
oldLogger.warn(`Current logger will be overwritten from ${stack}`);
|
|
17465
|
+
newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
|
|
17466
|
+
}
|
|
17467
|
+
return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
|
|
17468
|
+
};
|
|
17469
|
+
self2.setLogger = setLogger;
|
|
17470
|
+
self2.disable = () => {
|
|
17471
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, self2);
|
|
17472
|
+
};
|
|
17473
|
+
self2.createComponentLogger = (options) => {
|
|
17474
|
+
return new ComponentLogger_1.DiagComponentLogger(options);
|
|
17475
|
+
};
|
|
17476
|
+
self2.verbose = _logProxy("verbose");
|
|
17477
|
+
self2.debug = _logProxy("debug");
|
|
17478
|
+
self2.info = _logProxy("info");
|
|
17479
|
+
self2.warn = _logProxy("warn");
|
|
17480
|
+
self2.error = _logProxy("error");
|
|
17481
|
+
}
|
|
17482
|
+
}
|
|
17483
|
+
exports.DiagAPI = DiagAPI;
|
|
17484
|
+
});
|
|
17485
|
+
|
|
17486
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
|
|
17487
|
+
var require_baggage_impl = __commonJS((exports) => {
|
|
17488
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17489
|
+
exports.BaggageImpl = undefined;
|
|
17490
|
+
|
|
17491
|
+
class BaggageImpl {
|
|
17492
|
+
constructor(entries) {
|
|
17493
|
+
this._entries = entries ? new Map(entries) : new Map;
|
|
17494
|
+
}
|
|
17495
|
+
getEntry(key) {
|
|
17496
|
+
const entry = this._entries.get(key);
|
|
17497
|
+
if (!entry) {
|
|
17498
|
+
return;
|
|
17499
|
+
}
|
|
17500
|
+
return Object.assign({}, entry);
|
|
17501
|
+
}
|
|
17502
|
+
getAllEntries() {
|
|
17503
|
+
return Array.from(this._entries.entries());
|
|
17504
|
+
}
|
|
17505
|
+
setEntry(key, entry) {
|
|
17506
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17507
|
+
newBaggage._entries.set(key, entry);
|
|
17508
|
+
return newBaggage;
|
|
17509
|
+
}
|
|
17510
|
+
removeEntry(key) {
|
|
17511
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17512
|
+
newBaggage._entries.delete(key);
|
|
17513
|
+
return newBaggage;
|
|
17514
|
+
}
|
|
17515
|
+
removeEntries(...keys) {
|
|
17516
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17517
|
+
for (const key of keys) {
|
|
17518
|
+
newBaggage._entries.delete(key);
|
|
17519
|
+
}
|
|
17520
|
+
return newBaggage;
|
|
17521
|
+
}
|
|
17522
|
+
clear() {
|
|
17523
|
+
return new BaggageImpl;
|
|
17524
|
+
}
|
|
17525
|
+
}
|
|
17526
|
+
exports.BaggageImpl = BaggageImpl;
|
|
17527
|
+
});
|
|
17528
|
+
|
|
17529
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
|
|
17530
|
+
var require_symbol = __commonJS((exports) => {
|
|
17531
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17532
|
+
exports.baggageEntryMetadataSymbol = undefined;
|
|
17533
|
+
exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
|
|
17534
|
+
});
|
|
17535
|
+
|
|
17536
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
|
|
17537
|
+
var require_utils = __commonJS((exports) => {
|
|
17538
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17539
|
+
exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
|
|
17540
|
+
var diag_1 = require_diag();
|
|
17541
|
+
var baggage_impl_1 = require_baggage_impl();
|
|
17542
|
+
var symbol_1 = require_symbol();
|
|
17543
|
+
var diag = diag_1.DiagAPI.instance();
|
|
17544
|
+
function createBaggage(entries = {}) {
|
|
17545
|
+
return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
|
|
17546
|
+
}
|
|
17547
|
+
exports.createBaggage = createBaggage;
|
|
17548
|
+
function baggageEntryMetadataFromString(str) {
|
|
17549
|
+
if (typeof str !== "string") {
|
|
17550
|
+
diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
|
|
17551
|
+
str = "";
|
|
17552
|
+
}
|
|
17553
|
+
return {
|
|
17554
|
+
__TYPE__: symbol_1.baggageEntryMetadataSymbol,
|
|
17555
|
+
toString() {
|
|
17556
|
+
return str;
|
|
17557
|
+
}
|
|
17558
|
+
};
|
|
17559
|
+
}
|
|
17560
|
+
exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
|
|
17561
|
+
});
|
|
17562
|
+
|
|
17563
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/context.js
|
|
17564
|
+
var require_context = __commonJS((exports) => {
|
|
17565
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17566
|
+
exports.ROOT_CONTEXT = exports.createContextKey = undefined;
|
|
17567
|
+
function createContextKey(description) {
|
|
17568
|
+
return Symbol.for(description);
|
|
17569
|
+
}
|
|
17570
|
+
exports.createContextKey = createContextKey;
|
|
17571
|
+
|
|
17572
|
+
class BaseContext {
|
|
17573
|
+
constructor(parentContext) {
|
|
17574
|
+
const self2 = this;
|
|
17575
|
+
self2._currentContext = parentContext ? new Map(parentContext) : new Map;
|
|
17576
|
+
self2.getValue = (key) => self2._currentContext.get(key);
|
|
17577
|
+
self2.setValue = (key, value) => {
|
|
17578
|
+
const context = new BaseContext(self2._currentContext);
|
|
17579
|
+
context._currentContext.set(key, value);
|
|
17580
|
+
return context;
|
|
17581
|
+
};
|
|
17582
|
+
self2.deleteValue = (key) => {
|
|
17583
|
+
const context = new BaseContext(self2._currentContext);
|
|
17584
|
+
context._currentContext.delete(key);
|
|
17585
|
+
return context;
|
|
17586
|
+
};
|
|
17587
|
+
}
|
|
17588
|
+
}
|
|
17589
|
+
exports.ROOT_CONTEXT = new BaseContext;
|
|
17590
|
+
});
|
|
17591
|
+
|
|
17592
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
|
|
17593
|
+
var require_consoleLogger = __commonJS((exports) => {
|
|
17594
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17595
|
+
exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
|
|
17596
|
+
var consoleMap = [
|
|
17597
|
+
{ n: "error", c: "error" },
|
|
17598
|
+
{ n: "warn", c: "warn" },
|
|
17599
|
+
{ n: "info", c: "info" },
|
|
17600
|
+
{ n: "debug", c: "debug" },
|
|
17601
|
+
{ n: "verbose", c: "trace" }
|
|
17602
|
+
];
|
|
17603
|
+
exports._originalConsoleMethods = {};
|
|
17604
|
+
if (typeof console !== "undefined") {
|
|
17605
|
+
const keys = [
|
|
17606
|
+
"error",
|
|
17607
|
+
"warn",
|
|
17608
|
+
"info",
|
|
17609
|
+
"debug",
|
|
17610
|
+
"trace",
|
|
17611
|
+
"log"
|
|
17612
|
+
];
|
|
17613
|
+
for (const key of keys) {
|
|
17614
|
+
if (typeof console[key] === "function") {
|
|
17615
|
+
exports._originalConsoleMethods[key] = console[key];
|
|
17616
|
+
}
|
|
17617
|
+
}
|
|
17618
|
+
}
|
|
17619
|
+
|
|
17620
|
+
class DiagConsoleLogger {
|
|
17621
|
+
constructor() {
|
|
17622
|
+
function _consoleFunc(funcName) {
|
|
17623
|
+
return function(...args) {
|
|
17624
|
+
let theFunc = exports._originalConsoleMethods[funcName];
|
|
17625
|
+
if (typeof theFunc !== "function") {
|
|
17626
|
+
theFunc = exports._originalConsoleMethods["log"];
|
|
17627
|
+
}
|
|
17628
|
+
if (typeof theFunc !== "function" && console) {
|
|
17629
|
+
theFunc = console[funcName];
|
|
17630
|
+
if (typeof theFunc !== "function") {
|
|
17631
|
+
theFunc = console.log;
|
|
17632
|
+
}
|
|
17633
|
+
}
|
|
17634
|
+
if (typeof theFunc === "function") {
|
|
17635
|
+
return theFunc.apply(console, args);
|
|
17636
|
+
}
|
|
17637
|
+
};
|
|
17638
|
+
}
|
|
17639
|
+
for (let i = 0;i < consoleMap.length; i++) {
|
|
17640
|
+
this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
|
|
17641
|
+
}
|
|
17642
|
+
}
|
|
17643
|
+
}
|
|
17644
|
+
exports.DiagConsoleLogger = DiagConsoleLogger;
|
|
17645
|
+
});
|
|
17646
|
+
|
|
17647
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
|
|
17648
|
+
var require_NoopMeter = __commonJS((exports) => {
|
|
17649
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17650
|
+
exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_GAUGE_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopGaugeMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = undefined;
|
|
17651
|
+
|
|
17652
|
+
class NoopMeter {
|
|
17653
|
+
constructor() {}
|
|
17654
|
+
createGauge(_name, _options) {
|
|
17655
|
+
return exports.NOOP_GAUGE_METRIC;
|
|
17656
|
+
}
|
|
17657
|
+
createHistogram(_name, _options) {
|
|
17658
|
+
return exports.NOOP_HISTOGRAM_METRIC;
|
|
17659
|
+
}
|
|
17660
|
+
createCounter(_name, _options) {
|
|
17661
|
+
return exports.NOOP_COUNTER_METRIC;
|
|
17662
|
+
}
|
|
17663
|
+
createUpDownCounter(_name, _options) {
|
|
17664
|
+
return exports.NOOP_UP_DOWN_COUNTER_METRIC;
|
|
17665
|
+
}
|
|
17666
|
+
createObservableGauge(_name, _options) {
|
|
17667
|
+
return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
|
|
17668
|
+
}
|
|
17669
|
+
createObservableCounter(_name, _options) {
|
|
17670
|
+
return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
|
|
17671
|
+
}
|
|
17672
|
+
createObservableUpDownCounter(_name, _options) {
|
|
17673
|
+
return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
17674
|
+
}
|
|
17675
|
+
addBatchObservableCallback(_callback, _observables) {}
|
|
17676
|
+
removeBatchObservableCallback(_callback) {}
|
|
17677
|
+
}
|
|
17678
|
+
exports.NoopMeter = NoopMeter;
|
|
17679
|
+
|
|
17680
|
+
class NoopMetric {
|
|
17681
|
+
}
|
|
17682
|
+
exports.NoopMetric = NoopMetric;
|
|
17683
|
+
|
|
17684
|
+
class NoopCounterMetric extends NoopMetric {
|
|
17685
|
+
add(_value, _attributes) {}
|
|
17686
|
+
}
|
|
17687
|
+
exports.NoopCounterMetric = NoopCounterMetric;
|
|
17688
|
+
|
|
17689
|
+
class NoopUpDownCounterMetric extends NoopMetric {
|
|
17690
|
+
add(_value, _attributes) {}
|
|
17691
|
+
}
|
|
17692
|
+
exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
|
|
17693
|
+
|
|
17694
|
+
class NoopGaugeMetric extends NoopMetric {
|
|
17695
|
+
record(_value, _attributes) {}
|
|
17696
|
+
}
|
|
17697
|
+
exports.NoopGaugeMetric = NoopGaugeMetric;
|
|
17698
|
+
|
|
17699
|
+
class NoopHistogramMetric extends NoopMetric {
|
|
17700
|
+
record(_value, _attributes) {}
|
|
17701
|
+
}
|
|
17702
|
+
exports.NoopHistogramMetric = NoopHistogramMetric;
|
|
17703
|
+
|
|
17704
|
+
class NoopObservableMetric {
|
|
17705
|
+
addCallback(_callback) {}
|
|
17706
|
+
removeCallback(_callback) {}
|
|
17707
|
+
}
|
|
17708
|
+
exports.NoopObservableMetric = NoopObservableMetric;
|
|
17709
|
+
|
|
17710
|
+
class NoopObservableCounterMetric extends NoopObservableMetric {
|
|
17711
|
+
}
|
|
17712
|
+
exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
|
|
17713
|
+
|
|
17714
|
+
class NoopObservableGaugeMetric extends NoopObservableMetric {
|
|
17715
|
+
}
|
|
17716
|
+
exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
|
|
17717
|
+
|
|
17718
|
+
class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
|
|
17719
|
+
}
|
|
17720
|
+
exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
|
|
17721
|
+
exports.NOOP_METER = new NoopMeter;
|
|
17722
|
+
exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
|
|
17723
|
+
exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
|
|
17724
|
+
exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
|
|
17725
|
+
exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
|
|
17726
|
+
exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
|
|
17727
|
+
exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
|
|
17728
|
+
exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
|
|
17729
|
+
function createNoopMeter() {
|
|
17730
|
+
return exports.NOOP_METER;
|
|
17731
|
+
}
|
|
17732
|
+
exports.createNoopMeter = createNoopMeter;
|
|
17733
|
+
});
|
|
17734
|
+
|
|
17735
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
|
|
17736
|
+
var require_Metric = __commonJS((exports) => {
|
|
17737
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17738
|
+
exports.ValueType = undefined;
|
|
17739
|
+
var ValueType;
|
|
17740
|
+
(function(ValueType2) {
|
|
17741
|
+
ValueType2[ValueType2["INT"] = 0] = "INT";
|
|
17742
|
+
ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
|
|
17743
|
+
})(ValueType = exports.ValueType || (exports.ValueType = {}));
|
|
17744
|
+
});
|
|
17745
|
+
|
|
17746
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
|
|
17747
|
+
var require_TextMapPropagator = __commonJS((exports) => {
|
|
17748
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17749
|
+
exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
|
|
17750
|
+
exports.defaultTextMapGetter = {
|
|
17751
|
+
get(carrier, key) {
|
|
17752
|
+
if (carrier == null) {
|
|
17753
|
+
return;
|
|
17754
|
+
}
|
|
17755
|
+
return carrier[key];
|
|
17756
|
+
},
|
|
17757
|
+
keys(carrier) {
|
|
17758
|
+
if (carrier == null) {
|
|
17759
|
+
return [];
|
|
17760
|
+
}
|
|
17761
|
+
return Object.keys(carrier);
|
|
17762
|
+
}
|
|
17763
|
+
};
|
|
17764
|
+
exports.defaultTextMapSetter = {
|
|
17765
|
+
set(carrier, key, value) {
|
|
17766
|
+
if (carrier == null) {
|
|
17767
|
+
return;
|
|
17768
|
+
}
|
|
17769
|
+
carrier[key] = value;
|
|
17770
|
+
}
|
|
17771
|
+
};
|
|
17772
|
+
});
|
|
17773
|
+
|
|
17774
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
|
|
17775
|
+
var require_NoopContextManager = __commonJS((exports) => {
|
|
17776
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17777
|
+
exports.NoopContextManager = undefined;
|
|
17778
|
+
var context_1 = require_context();
|
|
17779
|
+
|
|
17780
|
+
class NoopContextManager {
|
|
17781
|
+
active() {
|
|
17782
|
+
return context_1.ROOT_CONTEXT;
|
|
17783
|
+
}
|
|
17784
|
+
with(_context, fn, thisArg, ...args) {
|
|
17785
|
+
return fn.call(thisArg, ...args);
|
|
17786
|
+
}
|
|
17787
|
+
bind(_context, target) {
|
|
17788
|
+
return target;
|
|
17789
|
+
}
|
|
17790
|
+
enable() {
|
|
17791
|
+
return this;
|
|
17792
|
+
}
|
|
17793
|
+
disable() {
|
|
17794
|
+
return this;
|
|
17795
|
+
}
|
|
17796
|
+
}
|
|
17797
|
+
exports.NoopContextManager = NoopContextManager;
|
|
17798
|
+
});
|
|
17799
|
+
|
|
17800
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/context.js
|
|
17801
|
+
var require_context2 = __commonJS((exports) => {
|
|
17802
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17803
|
+
exports.ContextAPI = undefined;
|
|
17804
|
+
var NoopContextManager_1 = require_NoopContextManager();
|
|
17805
|
+
var global_utils_1 = require_global_utils();
|
|
17806
|
+
var diag_1 = require_diag();
|
|
17807
|
+
var API_NAME = "context";
|
|
17808
|
+
var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
|
|
17809
|
+
|
|
17810
|
+
class ContextAPI {
|
|
17811
|
+
constructor() {}
|
|
17812
|
+
static getInstance() {
|
|
17813
|
+
if (!this._instance) {
|
|
17814
|
+
this._instance = new ContextAPI;
|
|
17815
|
+
}
|
|
17816
|
+
return this._instance;
|
|
17817
|
+
}
|
|
17818
|
+
setGlobalContextManager(contextManager) {
|
|
17819
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
|
|
17820
|
+
}
|
|
17821
|
+
active() {
|
|
17822
|
+
return this._getContextManager().active();
|
|
17823
|
+
}
|
|
17824
|
+
with(context, fn, thisArg, ...args) {
|
|
17825
|
+
return this._getContextManager().with(context, fn, thisArg, ...args);
|
|
17826
|
+
}
|
|
17827
|
+
bind(context, target) {
|
|
17828
|
+
return this._getContextManager().bind(context, target);
|
|
17829
|
+
}
|
|
17830
|
+
_getContextManager() {
|
|
17831
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
|
|
17832
|
+
}
|
|
17833
|
+
disable() {
|
|
17834
|
+
this._getContextManager().disable();
|
|
17835
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
17836
|
+
}
|
|
17837
|
+
}
|
|
17838
|
+
exports.ContextAPI = ContextAPI;
|
|
17839
|
+
});
|
|
17840
|
+
|
|
17841
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
|
|
17842
|
+
var require_trace_flags = __commonJS((exports) => {
|
|
17843
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17844
|
+
exports.TraceFlags = undefined;
|
|
17845
|
+
var TraceFlags;
|
|
17846
|
+
(function(TraceFlags2) {
|
|
17847
|
+
TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
|
|
17848
|
+
TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
|
|
17849
|
+
})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
|
|
17850
|
+
});
|
|
17851
|
+
|
|
17852
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
|
|
17853
|
+
var require_invalid_span_constants = __commonJS((exports) => {
|
|
17854
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17855
|
+
exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
|
|
17856
|
+
var trace_flags_1 = require_trace_flags();
|
|
17857
|
+
exports.INVALID_SPANID = "0000000000000000";
|
|
17858
|
+
exports.INVALID_TRACEID = "00000000000000000000000000000000";
|
|
17859
|
+
exports.INVALID_SPAN_CONTEXT = {
|
|
17860
|
+
traceId: exports.INVALID_TRACEID,
|
|
17861
|
+
spanId: exports.INVALID_SPANID,
|
|
17862
|
+
traceFlags: trace_flags_1.TraceFlags.NONE
|
|
17863
|
+
};
|
|
17864
|
+
});
|
|
17865
|
+
|
|
17866
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
|
|
17867
|
+
var require_NonRecordingSpan = __commonJS((exports) => {
|
|
17868
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17869
|
+
exports.NonRecordingSpan = undefined;
|
|
17870
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
17871
|
+
|
|
17872
|
+
class NonRecordingSpan {
|
|
17873
|
+
constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
|
|
17874
|
+
this._spanContext = spanContext;
|
|
17875
|
+
}
|
|
17876
|
+
spanContext() {
|
|
17877
|
+
return this._spanContext;
|
|
17878
|
+
}
|
|
17879
|
+
setAttribute(_key, _value) {
|
|
17880
|
+
return this;
|
|
17881
|
+
}
|
|
17882
|
+
setAttributes(_attributes) {
|
|
17883
|
+
return this;
|
|
17884
|
+
}
|
|
17885
|
+
addEvent(_name, _attributes) {
|
|
17886
|
+
return this;
|
|
17887
|
+
}
|
|
17888
|
+
addLink(_link) {
|
|
17889
|
+
return this;
|
|
17890
|
+
}
|
|
17891
|
+
addLinks(_links) {
|
|
17892
|
+
return this;
|
|
17893
|
+
}
|
|
17894
|
+
setStatus(_status) {
|
|
17895
|
+
return this;
|
|
17896
|
+
}
|
|
17897
|
+
updateName(_name) {
|
|
17898
|
+
return this;
|
|
17899
|
+
}
|
|
17900
|
+
end(_endTime) {}
|
|
17901
|
+
isRecording() {
|
|
17902
|
+
return false;
|
|
17903
|
+
}
|
|
17904
|
+
recordException(_exception, _time) {}
|
|
17905
|
+
}
|
|
17906
|
+
exports.NonRecordingSpan = NonRecordingSpan;
|
|
17907
|
+
});
|
|
17908
|
+
|
|
17909
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
|
|
17910
|
+
var require_context_utils = __commonJS((exports) => {
|
|
17911
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17912
|
+
exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
|
|
17913
|
+
var context_1 = require_context();
|
|
17914
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
17915
|
+
var context_2 = require_context2();
|
|
17916
|
+
var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
|
|
17917
|
+
function getSpan(context) {
|
|
17918
|
+
return context.getValue(SPAN_KEY) || undefined;
|
|
17919
|
+
}
|
|
17920
|
+
exports.getSpan = getSpan;
|
|
17921
|
+
function getActiveSpan() {
|
|
17922
|
+
return getSpan(context_2.ContextAPI.getInstance().active());
|
|
17923
|
+
}
|
|
17924
|
+
exports.getActiveSpan = getActiveSpan;
|
|
17925
|
+
function setSpan(context, span) {
|
|
17926
|
+
return context.setValue(SPAN_KEY, span);
|
|
17927
|
+
}
|
|
17928
|
+
exports.setSpan = setSpan;
|
|
17929
|
+
function deleteSpan(context) {
|
|
17930
|
+
return context.deleteValue(SPAN_KEY);
|
|
17931
|
+
}
|
|
17932
|
+
exports.deleteSpan = deleteSpan;
|
|
17933
|
+
function setSpanContext(context, spanContext) {
|
|
17934
|
+
return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
|
|
17935
|
+
}
|
|
17936
|
+
exports.setSpanContext = setSpanContext;
|
|
17937
|
+
function getSpanContext(context) {
|
|
17938
|
+
var _a3;
|
|
17939
|
+
return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
|
|
17940
|
+
}
|
|
17941
|
+
exports.getSpanContext = getSpanContext;
|
|
17942
|
+
});
|
|
17943
|
+
|
|
17944
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
|
|
17945
|
+
var require_spancontext_utils = __commonJS((exports) => {
|
|
17946
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17947
|
+
exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
|
|
17948
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
17949
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
17950
|
+
var isHex = new Uint8Array([
|
|
17951
|
+
0,
|
|
17952
|
+
0,
|
|
17953
|
+
0,
|
|
17954
|
+
0,
|
|
17955
|
+
0,
|
|
17956
|
+
0,
|
|
17957
|
+
0,
|
|
17958
|
+
0,
|
|
17959
|
+
0,
|
|
17960
|
+
0,
|
|
17961
|
+
0,
|
|
17962
|
+
0,
|
|
17963
|
+
0,
|
|
17964
|
+
0,
|
|
17965
|
+
0,
|
|
17966
|
+
0,
|
|
17967
|
+
0,
|
|
17968
|
+
0,
|
|
17969
|
+
0,
|
|
17970
|
+
0,
|
|
17971
|
+
0,
|
|
17972
|
+
0,
|
|
17973
|
+
0,
|
|
17974
|
+
0,
|
|
17975
|
+
0,
|
|
17976
|
+
0,
|
|
17977
|
+
0,
|
|
17978
|
+
0,
|
|
17979
|
+
0,
|
|
17980
|
+
0,
|
|
17981
|
+
0,
|
|
17982
|
+
0,
|
|
17983
|
+
0,
|
|
17984
|
+
0,
|
|
17985
|
+
0,
|
|
17986
|
+
0,
|
|
17987
|
+
0,
|
|
17988
|
+
0,
|
|
17989
|
+
0,
|
|
17990
|
+
0,
|
|
17991
|
+
0,
|
|
17992
|
+
0,
|
|
17993
|
+
0,
|
|
17994
|
+
0,
|
|
17995
|
+
0,
|
|
17996
|
+
0,
|
|
17997
|
+
0,
|
|
17998
|
+
0,
|
|
17999
|
+
1,
|
|
18000
|
+
1,
|
|
18001
|
+
1,
|
|
18002
|
+
1,
|
|
18003
|
+
1,
|
|
18004
|
+
1,
|
|
18005
|
+
1,
|
|
18006
|
+
1,
|
|
18007
|
+
1,
|
|
18008
|
+
1,
|
|
18009
|
+
0,
|
|
18010
|
+
0,
|
|
18011
|
+
0,
|
|
18012
|
+
0,
|
|
18013
|
+
0,
|
|
18014
|
+
0,
|
|
18015
|
+
0,
|
|
18016
|
+
1,
|
|
18017
|
+
1,
|
|
18018
|
+
1,
|
|
18019
|
+
1,
|
|
18020
|
+
1,
|
|
18021
|
+
1,
|
|
18022
|
+
0,
|
|
18023
|
+
0,
|
|
18024
|
+
0,
|
|
18025
|
+
0,
|
|
18026
|
+
0,
|
|
18027
|
+
0,
|
|
18028
|
+
0,
|
|
18029
|
+
0,
|
|
18030
|
+
0,
|
|
18031
|
+
0,
|
|
18032
|
+
0,
|
|
18033
|
+
0,
|
|
18034
|
+
0,
|
|
18035
|
+
0,
|
|
18036
|
+
0,
|
|
18037
|
+
0,
|
|
18038
|
+
0,
|
|
18039
|
+
0,
|
|
18040
|
+
0,
|
|
18041
|
+
0,
|
|
18042
|
+
0,
|
|
18043
|
+
0,
|
|
18044
|
+
0,
|
|
18045
|
+
0,
|
|
18046
|
+
0,
|
|
18047
|
+
0,
|
|
18048
|
+
1,
|
|
18049
|
+
1,
|
|
18050
|
+
1,
|
|
18051
|
+
1,
|
|
18052
|
+
1,
|
|
18053
|
+
1
|
|
18054
|
+
]);
|
|
18055
|
+
function isValidHex(id, length) {
|
|
18056
|
+
if (typeof id !== "string" || id.length !== length)
|
|
18057
|
+
return false;
|
|
18058
|
+
let r = 0;
|
|
18059
|
+
for (let i = 0;i < id.length; i += 4) {
|
|
18060
|
+
r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
18061
|
+
}
|
|
18062
|
+
return r === length;
|
|
18063
|
+
}
|
|
18064
|
+
function isValidTraceId(traceId) {
|
|
18065
|
+
return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
|
|
18066
|
+
}
|
|
18067
|
+
exports.isValidTraceId = isValidTraceId;
|
|
18068
|
+
function isValidSpanId(spanId) {
|
|
18069
|
+
return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
|
|
18070
|
+
}
|
|
18071
|
+
exports.isValidSpanId = isValidSpanId;
|
|
18072
|
+
function isSpanContextValid(spanContext) {
|
|
18073
|
+
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
18074
|
+
}
|
|
18075
|
+
exports.isSpanContextValid = isSpanContextValid;
|
|
18076
|
+
function wrapSpanContext(spanContext) {
|
|
18077
|
+
return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
|
|
18078
|
+
}
|
|
18079
|
+
exports.wrapSpanContext = wrapSpanContext;
|
|
18080
|
+
});
|
|
18081
|
+
|
|
18082
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
|
|
18083
|
+
var require_NoopTracer = __commonJS((exports) => {
|
|
18084
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18085
|
+
exports.NoopTracer = undefined;
|
|
18086
|
+
var context_1 = require_context2();
|
|
18087
|
+
var context_utils_1 = require_context_utils();
|
|
18088
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18089
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18090
|
+
var contextApi = context_1.ContextAPI.getInstance();
|
|
18091
|
+
|
|
18092
|
+
class NoopTracer {
|
|
18093
|
+
startSpan(name, options, context = contextApi.active()) {
|
|
18094
|
+
const root = Boolean(options === null || options === undefined ? undefined : options.root);
|
|
18095
|
+
if (root) {
|
|
18096
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18097
|
+
}
|
|
18098
|
+
const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
|
|
18099
|
+
if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
|
|
18100
|
+
return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
|
|
18101
|
+
} else {
|
|
18102
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18103
|
+
}
|
|
18104
|
+
}
|
|
18105
|
+
startActiveSpan(name, arg2, arg3, arg4) {
|
|
18106
|
+
let opts;
|
|
18107
|
+
let ctx;
|
|
18108
|
+
let fn;
|
|
18109
|
+
if (arguments.length < 2) {
|
|
18110
|
+
return;
|
|
18111
|
+
} else if (arguments.length === 2) {
|
|
18112
|
+
fn = arg2;
|
|
18113
|
+
} else if (arguments.length === 3) {
|
|
18114
|
+
opts = arg2;
|
|
18115
|
+
fn = arg3;
|
|
18116
|
+
} else {
|
|
18117
|
+
opts = arg2;
|
|
18118
|
+
ctx = arg3;
|
|
18119
|
+
fn = arg4;
|
|
18120
|
+
}
|
|
18121
|
+
const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
|
|
18122
|
+
const span = this.startSpan(name, opts, parentContext);
|
|
18123
|
+
const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
|
|
18124
|
+
return contextApi.with(contextWithSpanSet, fn, undefined, span);
|
|
18125
|
+
}
|
|
18126
|
+
}
|
|
18127
|
+
exports.NoopTracer = NoopTracer;
|
|
18128
|
+
function isSpanContext(spanContext) {
|
|
18129
|
+
return spanContext !== null && typeof spanContext === "object" && "spanId" in spanContext && typeof spanContext["spanId"] === "string" && "traceId" in spanContext && typeof spanContext["traceId"] === "string" && "traceFlags" in spanContext && typeof spanContext["traceFlags"] === "number";
|
|
18130
|
+
}
|
|
18131
|
+
});
|
|
18132
|
+
|
|
18133
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
|
|
18134
|
+
var require_ProxyTracer = __commonJS((exports) => {
|
|
18135
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18136
|
+
exports.ProxyTracer = undefined;
|
|
18137
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18138
|
+
var NOOP_TRACER = new NoopTracer_1.NoopTracer;
|
|
18139
|
+
|
|
18140
|
+
class ProxyTracer {
|
|
18141
|
+
constructor(provider, name, version2, options) {
|
|
18142
|
+
this._provider = provider;
|
|
18143
|
+
this.name = name;
|
|
18144
|
+
this.version = version2;
|
|
18145
|
+
this.options = options;
|
|
18146
|
+
}
|
|
18147
|
+
startSpan(name, options, context) {
|
|
18148
|
+
return this._getTracer().startSpan(name, options, context);
|
|
18149
|
+
}
|
|
18150
|
+
startActiveSpan(_name, _options, _context, _fn) {
|
|
18151
|
+
const tracer = this._getTracer();
|
|
18152
|
+
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
18153
|
+
}
|
|
18154
|
+
_getTracer() {
|
|
18155
|
+
if (this._delegate) {
|
|
18156
|
+
return this._delegate;
|
|
18157
|
+
}
|
|
18158
|
+
const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
18159
|
+
if (!tracer) {
|
|
18160
|
+
return NOOP_TRACER;
|
|
18161
|
+
}
|
|
18162
|
+
this._delegate = tracer;
|
|
18163
|
+
return this._delegate;
|
|
18164
|
+
}
|
|
18165
|
+
}
|
|
18166
|
+
exports.ProxyTracer = ProxyTracer;
|
|
18167
|
+
});
|
|
18168
|
+
|
|
18169
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
|
|
18170
|
+
var require_NoopTracerProvider = __commonJS((exports) => {
|
|
18171
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18172
|
+
exports.NoopTracerProvider = undefined;
|
|
18173
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18174
|
+
|
|
18175
|
+
class NoopTracerProvider {
|
|
18176
|
+
getTracer(_name, _version, _options) {
|
|
18177
|
+
return new NoopTracer_1.NoopTracer;
|
|
18178
|
+
}
|
|
18179
|
+
}
|
|
18180
|
+
exports.NoopTracerProvider = NoopTracerProvider;
|
|
18181
|
+
});
|
|
18182
|
+
|
|
18183
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
|
|
18184
|
+
var require_ProxyTracerProvider = __commonJS((exports) => {
|
|
18185
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18186
|
+
exports.ProxyTracerProvider = undefined;
|
|
18187
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
18188
|
+
var NoopTracerProvider_1 = require_NoopTracerProvider();
|
|
18189
|
+
var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
|
|
18190
|
+
|
|
18191
|
+
class ProxyTracerProvider {
|
|
18192
|
+
getTracer(name, version2, options) {
|
|
18193
|
+
var _a3;
|
|
18194
|
+
return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
|
|
18195
|
+
}
|
|
18196
|
+
getDelegate() {
|
|
18197
|
+
var _a3;
|
|
18198
|
+
return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
|
|
18199
|
+
}
|
|
18200
|
+
setDelegate(delegate) {
|
|
18201
|
+
this._delegate = delegate;
|
|
18202
|
+
}
|
|
18203
|
+
getDelegateTracer(name, version2, options) {
|
|
18204
|
+
var _a3;
|
|
18205
|
+
return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
|
|
18206
|
+
}
|
|
18207
|
+
}
|
|
18208
|
+
exports.ProxyTracerProvider = ProxyTracerProvider;
|
|
18209
|
+
});
|
|
18210
|
+
|
|
18211
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
|
|
18212
|
+
var require_SamplingResult = __commonJS((exports) => {
|
|
18213
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18214
|
+
exports.SamplingDecision = undefined;
|
|
18215
|
+
var SamplingDecision;
|
|
18216
|
+
(function(SamplingDecision2) {
|
|
18217
|
+
SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
|
|
18218
|
+
SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
|
|
18219
|
+
SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
|
|
18220
|
+
})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
|
|
18221
|
+
});
|
|
18222
|
+
|
|
18223
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
|
|
18224
|
+
var require_span_kind = __commonJS((exports) => {
|
|
18225
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18226
|
+
exports.SpanKind = undefined;
|
|
18227
|
+
var SpanKind;
|
|
18228
|
+
(function(SpanKind2) {
|
|
18229
|
+
SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
|
|
18230
|
+
SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
|
|
18231
|
+
SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
|
|
18232
|
+
SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
|
|
18233
|
+
SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
|
|
18234
|
+
})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
|
|
18235
|
+
});
|
|
18236
|
+
|
|
18237
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/status.js
|
|
18238
|
+
var require_status = __commonJS((exports) => {
|
|
18239
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18240
|
+
exports.SpanStatusCode = undefined;
|
|
18241
|
+
var SpanStatusCode;
|
|
18242
|
+
(function(SpanStatusCode2) {
|
|
18243
|
+
SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
|
|
18244
|
+
SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
|
|
18245
|
+
SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
|
|
18246
|
+
})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
|
|
18247
|
+
});
|
|
18248
|
+
|
|
18249
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
|
|
18250
|
+
var require_tracestate_validators = __commonJS((exports) => {
|
|
18251
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18252
|
+
exports.validateValue = exports.validateKey = undefined;
|
|
18253
|
+
var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
18254
|
+
var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
|
|
18255
|
+
var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
18256
|
+
var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
18257
|
+
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
18258
|
+
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
18259
|
+
function validateKey(key) {
|
|
18260
|
+
return VALID_KEY_REGEX.test(key);
|
|
18261
|
+
}
|
|
18262
|
+
exports.validateKey = validateKey;
|
|
18263
|
+
function validateValue(value) {
|
|
18264
|
+
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
18265
|
+
}
|
|
18266
|
+
exports.validateValue = validateValue;
|
|
18267
|
+
});
|
|
18268
|
+
|
|
18269
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
|
|
18270
|
+
var require_tracestate_impl = __commonJS((exports) => {
|
|
18271
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18272
|
+
exports.TraceStateImpl = undefined;
|
|
18273
|
+
var tracestate_validators_1 = require_tracestate_validators();
|
|
18274
|
+
var MAX_TRACE_STATE_ITEMS = 32;
|
|
18275
|
+
var MAX_TRACE_STATE_LEN = 512;
|
|
18276
|
+
var LIST_MEMBERS_SEPARATOR = ",";
|
|
18277
|
+
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
18278
|
+
|
|
18279
|
+
class TraceStateImpl {
|
|
18280
|
+
constructor(rawTraceState) {
|
|
18281
|
+
this._internalState = new Map;
|
|
18282
|
+
if (rawTraceState)
|
|
18283
|
+
this._parse(rawTraceState);
|
|
18284
|
+
}
|
|
18285
|
+
set(key, value) {
|
|
18286
|
+
const traceState = this._clone();
|
|
18287
|
+
if (traceState._internalState.has(key)) {
|
|
18288
|
+
traceState._internalState.delete(key);
|
|
18289
|
+
}
|
|
18290
|
+
traceState._internalState.set(key, value);
|
|
18291
|
+
return traceState;
|
|
18292
|
+
}
|
|
18293
|
+
unset(key) {
|
|
18294
|
+
const traceState = this._clone();
|
|
18295
|
+
traceState._internalState.delete(key);
|
|
18296
|
+
return traceState;
|
|
18297
|
+
}
|
|
18298
|
+
get(key) {
|
|
18299
|
+
return this._internalState.get(key);
|
|
18300
|
+
}
|
|
18301
|
+
serialize() {
|
|
18302
|
+
return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
|
|
18303
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
|
|
18304
|
+
return agg;
|
|
18305
|
+
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
18306
|
+
}
|
|
18307
|
+
_parse(rawTraceState) {
|
|
18308
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
18309
|
+
return;
|
|
18310
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
|
|
18311
|
+
const listMember = part.trim();
|
|
18312
|
+
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
18313
|
+
if (i !== -1) {
|
|
18314
|
+
const key = listMember.slice(0, i);
|
|
18315
|
+
const value = listMember.slice(i + 1, part.length);
|
|
18316
|
+
if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
|
|
18317
|
+
agg.set(key, value);
|
|
18318
|
+
}
|
|
18319
|
+
}
|
|
18320
|
+
return agg;
|
|
18321
|
+
}, new Map);
|
|
18322
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
18323
|
+
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
18324
|
+
}
|
|
18325
|
+
}
|
|
18326
|
+
_keys() {
|
|
18327
|
+
return Array.from(this._internalState.keys()).reverse();
|
|
18328
|
+
}
|
|
18329
|
+
_clone() {
|
|
18330
|
+
const traceState = new TraceStateImpl;
|
|
18331
|
+
traceState._internalState = new Map(this._internalState);
|
|
18332
|
+
return traceState;
|
|
18333
|
+
}
|
|
18334
|
+
}
|
|
18335
|
+
exports.TraceStateImpl = TraceStateImpl;
|
|
18336
|
+
});
|
|
18337
|
+
|
|
18338
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
|
|
18339
|
+
var require_utils2 = __commonJS((exports) => {
|
|
18340
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18341
|
+
exports.createTraceState = undefined;
|
|
18342
|
+
var tracestate_impl_1 = require_tracestate_impl();
|
|
18343
|
+
function createTraceState(rawTraceState) {
|
|
18344
|
+
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
|
|
18345
|
+
}
|
|
18346
|
+
exports.createTraceState = createTraceState;
|
|
18347
|
+
});
|
|
18348
|
+
|
|
18349
|
+
// ../../node_modules/@opentelemetry/api/build/src/context-api.js
|
|
18350
|
+
var require_context_api = __commonJS((exports) => {
|
|
18351
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18352
|
+
exports.context = undefined;
|
|
18353
|
+
var context_1 = require_context2();
|
|
18354
|
+
exports.context = context_1.ContextAPI.getInstance();
|
|
18355
|
+
});
|
|
18356
|
+
|
|
18357
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag-api.js
|
|
18358
|
+
var require_diag_api = __commonJS((exports) => {
|
|
18359
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18360
|
+
exports.diag = undefined;
|
|
18361
|
+
var diag_1 = require_diag();
|
|
18362
|
+
exports.diag = diag_1.DiagAPI.instance();
|
|
18363
|
+
});
|
|
18364
|
+
|
|
18365
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
|
|
18366
|
+
var require_NoopMeterProvider = __commonJS((exports) => {
|
|
18367
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18368
|
+
exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
|
|
18369
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
18370
|
+
|
|
18371
|
+
class NoopMeterProvider {
|
|
18372
|
+
getMeter(_name, _version, _options) {
|
|
18373
|
+
return NoopMeter_1.NOOP_METER;
|
|
18374
|
+
}
|
|
18375
|
+
}
|
|
18376
|
+
exports.NoopMeterProvider = NoopMeterProvider;
|
|
18377
|
+
exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
|
|
18378
|
+
});
|
|
18379
|
+
|
|
18380
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
|
|
18381
|
+
var require_metrics = __commonJS((exports) => {
|
|
18382
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18383
|
+
exports.MetricsAPI = undefined;
|
|
18384
|
+
var NoopMeterProvider_1 = require_NoopMeterProvider();
|
|
18385
|
+
var global_utils_1 = require_global_utils();
|
|
18386
|
+
var diag_1 = require_diag();
|
|
18387
|
+
var API_NAME = "metrics";
|
|
18388
|
+
|
|
18389
|
+
class MetricsAPI {
|
|
18390
|
+
constructor() {}
|
|
18391
|
+
static getInstance() {
|
|
18392
|
+
if (!this._instance) {
|
|
18393
|
+
this._instance = new MetricsAPI;
|
|
18394
|
+
}
|
|
18395
|
+
return this._instance;
|
|
18396
|
+
}
|
|
18397
|
+
setGlobalMeterProvider(provider) {
|
|
18398
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
|
|
18399
|
+
}
|
|
18400
|
+
getMeterProvider() {
|
|
18401
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
|
|
18402
|
+
}
|
|
18403
|
+
getMeter(name, version2, options) {
|
|
18404
|
+
return this.getMeterProvider().getMeter(name, version2, options);
|
|
18405
|
+
}
|
|
18406
|
+
disable() {
|
|
18407
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18408
|
+
}
|
|
18409
|
+
}
|
|
18410
|
+
exports.MetricsAPI = MetricsAPI;
|
|
18411
|
+
});
|
|
18412
|
+
|
|
18413
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
|
|
18414
|
+
var require_metrics_api = __commonJS((exports) => {
|
|
18415
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18416
|
+
exports.metrics = undefined;
|
|
18417
|
+
var metrics_1 = require_metrics();
|
|
18418
|
+
exports.metrics = metrics_1.MetricsAPI.getInstance();
|
|
18419
|
+
});
|
|
18420
|
+
|
|
18421
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
|
|
18422
|
+
var require_NoopTextMapPropagator = __commonJS((exports) => {
|
|
18423
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18424
|
+
exports.NoopTextMapPropagator = undefined;
|
|
18425
|
+
|
|
18426
|
+
class NoopTextMapPropagator {
|
|
18427
|
+
inject(_context, _carrier) {}
|
|
18428
|
+
extract(context, _carrier) {
|
|
18429
|
+
return context;
|
|
18430
|
+
}
|
|
18431
|
+
fields() {
|
|
18432
|
+
return [];
|
|
18433
|
+
}
|
|
18434
|
+
}
|
|
18435
|
+
exports.NoopTextMapPropagator = NoopTextMapPropagator;
|
|
18436
|
+
});
|
|
18437
|
+
|
|
18438
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
|
|
18439
|
+
var require_context_helpers = __commonJS((exports) => {
|
|
18440
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18441
|
+
exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
|
|
18442
|
+
var context_1 = require_context2();
|
|
18443
|
+
var context_2 = require_context();
|
|
18444
|
+
var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
|
|
18445
|
+
function getBaggage(context) {
|
|
18446
|
+
return context.getValue(BAGGAGE_KEY) || undefined;
|
|
18447
|
+
}
|
|
18448
|
+
exports.getBaggage = getBaggage;
|
|
18449
|
+
function getActiveBaggage() {
|
|
18450
|
+
return getBaggage(context_1.ContextAPI.getInstance().active());
|
|
18451
|
+
}
|
|
18452
|
+
exports.getActiveBaggage = getActiveBaggage;
|
|
18453
|
+
function setBaggage(context, baggage) {
|
|
18454
|
+
return context.setValue(BAGGAGE_KEY, baggage);
|
|
18455
|
+
}
|
|
18456
|
+
exports.setBaggage = setBaggage;
|
|
18457
|
+
function deleteBaggage(context) {
|
|
18458
|
+
return context.deleteValue(BAGGAGE_KEY);
|
|
18459
|
+
}
|
|
18460
|
+
exports.deleteBaggage = deleteBaggage;
|
|
18461
|
+
});
|
|
18462
|
+
|
|
18463
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
|
|
18464
|
+
var require_propagation = __commonJS((exports) => {
|
|
18465
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18466
|
+
exports.PropagationAPI = undefined;
|
|
18467
|
+
var global_utils_1 = require_global_utils();
|
|
18468
|
+
var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
|
|
18469
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18470
|
+
var context_helpers_1 = require_context_helpers();
|
|
18471
|
+
var utils_1 = require_utils();
|
|
18472
|
+
var diag_1 = require_diag();
|
|
18473
|
+
var API_NAME = "propagation";
|
|
18474
|
+
var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
|
|
18475
|
+
|
|
18476
|
+
class PropagationAPI {
|
|
18477
|
+
constructor() {
|
|
18478
|
+
this.createBaggage = utils_1.createBaggage;
|
|
18479
|
+
this.getBaggage = context_helpers_1.getBaggage;
|
|
18480
|
+
this.getActiveBaggage = context_helpers_1.getActiveBaggage;
|
|
18481
|
+
this.setBaggage = context_helpers_1.setBaggage;
|
|
18482
|
+
this.deleteBaggage = context_helpers_1.deleteBaggage;
|
|
18483
|
+
}
|
|
18484
|
+
static getInstance() {
|
|
18485
|
+
if (!this._instance) {
|
|
18486
|
+
this._instance = new PropagationAPI;
|
|
18487
|
+
}
|
|
18488
|
+
return this._instance;
|
|
18489
|
+
}
|
|
18490
|
+
setGlobalPropagator(propagator) {
|
|
18491
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
|
|
18492
|
+
}
|
|
18493
|
+
inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
|
|
18494
|
+
return this._getGlobalPropagator().inject(context, carrier, setter);
|
|
18495
|
+
}
|
|
18496
|
+
extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
|
|
18497
|
+
return this._getGlobalPropagator().extract(context, carrier, getter);
|
|
18498
|
+
}
|
|
18499
|
+
fields() {
|
|
18500
|
+
return this._getGlobalPropagator().fields();
|
|
18501
|
+
}
|
|
18502
|
+
disable() {
|
|
18503
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18504
|
+
}
|
|
18505
|
+
_getGlobalPropagator() {
|
|
18506
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
|
|
18507
|
+
}
|
|
18508
|
+
}
|
|
18509
|
+
exports.PropagationAPI = PropagationAPI;
|
|
18510
|
+
});
|
|
18511
|
+
|
|
18512
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
|
|
18513
|
+
var require_propagation_api = __commonJS((exports) => {
|
|
18514
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18515
|
+
exports.propagation = undefined;
|
|
18516
|
+
var propagation_1 = require_propagation();
|
|
18517
|
+
exports.propagation = propagation_1.PropagationAPI.getInstance();
|
|
18518
|
+
});
|
|
18519
|
+
|
|
18520
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/trace.js
|
|
18521
|
+
var require_trace = __commonJS((exports) => {
|
|
18522
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18523
|
+
exports.TraceAPI = undefined;
|
|
18524
|
+
var global_utils_1 = require_global_utils();
|
|
18525
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18526
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18527
|
+
var context_utils_1 = require_context_utils();
|
|
18528
|
+
var diag_1 = require_diag();
|
|
18529
|
+
var API_NAME = "trace";
|
|
18530
|
+
|
|
18531
|
+
class TraceAPI {
|
|
18532
|
+
constructor() {
|
|
18533
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18534
|
+
this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
|
|
18535
|
+
this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
|
|
18536
|
+
this.deleteSpan = context_utils_1.deleteSpan;
|
|
18537
|
+
this.getSpan = context_utils_1.getSpan;
|
|
18538
|
+
this.getActiveSpan = context_utils_1.getActiveSpan;
|
|
18539
|
+
this.getSpanContext = context_utils_1.getSpanContext;
|
|
18540
|
+
this.setSpan = context_utils_1.setSpan;
|
|
18541
|
+
this.setSpanContext = context_utils_1.setSpanContext;
|
|
18542
|
+
}
|
|
18543
|
+
static getInstance() {
|
|
18544
|
+
if (!this._instance) {
|
|
18545
|
+
this._instance = new TraceAPI;
|
|
18546
|
+
}
|
|
18547
|
+
return this._instance;
|
|
18548
|
+
}
|
|
18549
|
+
setGlobalTracerProvider(provider) {
|
|
18550
|
+
const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
|
|
18551
|
+
if (success3) {
|
|
18552
|
+
this._proxyTracerProvider.setDelegate(provider);
|
|
18553
|
+
}
|
|
18554
|
+
return success3;
|
|
18555
|
+
}
|
|
18556
|
+
getTracerProvider() {
|
|
18557
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
|
|
18558
|
+
}
|
|
18559
|
+
getTracer(name, version2) {
|
|
18560
|
+
return this.getTracerProvider().getTracer(name, version2);
|
|
18561
|
+
}
|
|
18562
|
+
disable() {
|
|
18563
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18564
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18565
|
+
}
|
|
18566
|
+
}
|
|
18567
|
+
exports.TraceAPI = TraceAPI;
|
|
18568
|
+
});
|
|
18569
|
+
|
|
18570
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace-api.js
|
|
18571
|
+
var require_trace_api = __commonJS((exports) => {
|
|
18572
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18573
|
+
exports.trace = undefined;
|
|
18574
|
+
var trace_1 = require_trace();
|
|
18575
|
+
exports.trace = trace_1.TraceAPI.getInstance();
|
|
18576
|
+
});
|
|
18577
|
+
|
|
18578
|
+
// ../../node_modules/@opentelemetry/api/build/src/index.js
|
|
18579
|
+
var require_src = __commonJS((exports) => {
|
|
18580
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18581
|
+
exports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = undefined;
|
|
18582
|
+
var utils_1 = require_utils();
|
|
18583
|
+
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
|
|
18584
|
+
return utils_1.baggageEntryMetadataFromString;
|
|
18585
|
+
} });
|
|
18586
|
+
var context_1 = require_context();
|
|
18587
|
+
Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
|
|
18588
|
+
return context_1.createContextKey;
|
|
18589
|
+
} });
|
|
18590
|
+
Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
|
|
18591
|
+
return context_1.ROOT_CONTEXT;
|
|
18592
|
+
} });
|
|
18593
|
+
var consoleLogger_1 = require_consoleLogger();
|
|
18594
|
+
Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
|
|
18595
|
+
return consoleLogger_1.DiagConsoleLogger;
|
|
18596
|
+
} });
|
|
18597
|
+
var types_1 = require_types();
|
|
18598
|
+
Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
|
|
18599
|
+
return types_1.DiagLogLevel;
|
|
18600
|
+
} });
|
|
18601
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
18602
|
+
Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
|
|
18603
|
+
return NoopMeter_1.createNoopMeter;
|
|
18604
|
+
} });
|
|
18605
|
+
var Metric_1 = require_Metric();
|
|
18606
|
+
Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
|
|
18607
|
+
return Metric_1.ValueType;
|
|
18608
|
+
} });
|
|
18609
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18610
|
+
Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
|
|
18611
|
+
return TextMapPropagator_1.defaultTextMapGetter;
|
|
18612
|
+
} });
|
|
18613
|
+
Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
|
|
18614
|
+
return TextMapPropagator_1.defaultTextMapSetter;
|
|
18615
|
+
} });
|
|
18616
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
18617
|
+
Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
|
|
18618
|
+
return ProxyTracer_1.ProxyTracer;
|
|
18619
|
+
} });
|
|
18620
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18621
|
+
Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
|
|
18622
|
+
return ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18623
|
+
} });
|
|
18624
|
+
var SamplingResult_1 = require_SamplingResult();
|
|
18625
|
+
Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
|
|
18626
|
+
return SamplingResult_1.SamplingDecision;
|
|
18627
|
+
} });
|
|
18628
|
+
var span_kind_1 = require_span_kind();
|
|
18629
|
+
Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
|
|
18630
|
+
return span_kind_1.SpanKind;
|
|
18631
|
+
} });
|
|
18632
|
+
var status_1 = require_status();
|
|
18633
|
+
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
|
|
18634
|
+
return status_1.SpanStatusCode;
|
|
18635
|
+
} });
|
|
18636
|
+
var trace_flags_1 = require_trace_flags();
|
|
18637
|
+
Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
|
|
18638
|
+
return trace_flags_1.TraceFlags;
|
|
18639
|
+
} });
|
|
18640
|
+
var utils_2 = require_utils2();
|
|
18641
|
+
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
|
|
18642
|
+
return utils_2.createTraceState;
|
|
18643
|
+
} });
|
|
18644
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18645
|
+
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
|
|
18646
|
+
return spancontext_utils_1.isSpanContextValid;
|
|
18647
|
+
} });
|
|
18648
|
+
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
|
|
18649
|
+
return spancontext_utils_1.isValidTraceId;
|
|
18650
|
+
} });
|
|
18651
|
+
Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
|
|
18652
|
+
return spancontext_utils_1.isValidSpanId;
|
|
18653
|
+
} });
|
|
18654
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18655
|
+
Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
|
|
18656
|
+
return invalid_span_constants_1.INVALID_SPANID;
|
|
18657
|
+
} });
|
|
18658
|
+
Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
|
|
18659
|
+
return invalid_span_constants_1.INVALID_TRACEID;
|
|
18660
|
+
} });
|
|
18661
|
+
Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
|
|
18662
|
+
return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
|
|
18663
|
+
} });
|
|
18664
|
+
var context_api_1 = require_context_api();
|
|
18665
|
+
Object.defineProperty(exports, "context", { enumerable: true, get: function() {
|
|
18666
|
+
return context_api_1.context;
|
|
18667
|
+
} });
|
|
18668
|
+
var diag_api_1 = require_diag_api();
|
|
18669
|
+
Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
|
|
18670
|
+
return diag_api_1.diag;
|
|
18671
|
+
} });
|
|
18672
|
+
var metrics_api_1 = require_metrics_api();
|
|
18673
|
+
Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
|
|
18674
|
+
return metrics_api_1.metrics;
|
|
18675
|
+
} });
|
|
18676
|
+
var propagation_api_1 = require_propagation_api();
|
|
18677
|
+
Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
|
|
18678
|
+
return propagation_api_1.propagation;
|
|
18679
|
+
} });
|
|
18680
|
+
var trace_api_1 = require_trace_api();
|
|
18681
|
+
Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
|
|
18682
|
+
return trace_api_1.trace;
|
|
18683
|
+
} });
|
|
18684
|
+
exports.default = {
|
|
18685
|
+
context: context_api_1.context,
|
|
18686
|
+
diag: diag_api_1.diag,
|
|
18687
|
+
metrics: metrics_api_1.metrics,
|
|
18688
|
+
propagation: propagation_api_1.propagation,
|
|
18689
|
+
trace: trace_api_1.trace
|
|
18690
|
+
};
|
|
18691
|
+
});
|
|
18692
|
+
|
|
18693
|
+
// ../types/src/processor/processor.ts
|
|
18694
|
+
var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
|
|
18695
|
+
var init_processor = __esm(() => {
|
|
18696
|
+
init_zod();
|
|
18697
|
+
init_common();
|
|
18698
|
+
import_api = __toESM(require_src(), 1);
|
|
18699
|
+
noopTracingContext = {
|
|
18700
|
+
traceId: "",
|
|
18701
|
+
getActiveSpan() {
|
|
18702
|
+
return;
|
|
18703
|
+
},
|
|
18704
|
+
async withSpan(_name, _options, fn) {
|
|
18705
|
+
const noopSpan = {
|
|
18706
|
+
spanContext: () => ({
|
|
18707
|
+
traceId: "",
|
|
18708
|
+
spanId: "",
|
|
18709
|
+
traceFlags: 0
|
|
18710
|
+
}),
|
|
18711
|
+
setAttribute: () => noopSpan,
|
|
18712
|
+
setAttributes: () => noopSpan,
|
|
18713
|
+
addEvent: () => noopSpan,
|
|
18714
|
+
addLink: () => noopSpan,
|
|
18715
|
+
addLinks: () => noopSpan,
|
|
18716
|
+
setStatus: () => noopSpan,
|
|
18717
|
+
updateName: () => noopSpan,
|
|
18718
|
+
end: () => {},
|
|
18719
|
+
isRecording: () => false,
|
|
18720
|
+
recordException: () => {}
|
|
18721
|
+
};
|
|
18722
|
+
return fn(noopSpan);
|
|
18723
|
+
}
|
|
18724
|
+
};
|
|
18725
|
+
ProcessorPortSchema = exports_external.object({
|
|
18726
|
+
name: exports_external.string(),
|
|
18727
|
+
schema: JsonSchemaSchema,
|
|
18728
|
+
required: exports_external.boolean().default(true)
|
|
18729
|
+
});
|
|
18730
|
+
ProcessorDefinitionSchema = exports_external.object({
|
|
18731
|
+
id: exports_external.string(),
|
|
18732
|
+
name: exports_external.string(),
|
|
18733
|
+
description: exports_external.string().optional(),
|
|
18734
|
+
inputSchema: JsonSchemaSchema,
|
|
18735
|
+
outputSchema: JsonSchemaSchema,
|
|
18736
|
+
configSchema: JsonSchemaSchema.optional(),
|
|
18737
|
+
inputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
18738
|
+
outputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
18739
|
+
isBuiltin: exports_external.boolean().default(true),
|
|
18740
|
+
pluginName: exports_external.string().optional()
|
|
18741
|
+
});
|
|
18742
|
+
ProcessorExecutionContextSchema = exports_external.object({
|
|
18743
|
+
jobId: exports_external.string(),
|
|
18744
|
+
stepId: exports_external.string(),
|
|
18745
|
+
tenantId: exports_external.string(),
|
|
18746
|
+
workflowId: exports_external.string(),
|
|
18747
|
+
workerId: exports_external.string().optional()
|
|
18748
|
+
});
|
|
18749
|
+
((TraceStatus2) => {
|
|
18750
|
+
TraceStatus2["PENDING"] = "pending";
|
|
18751
|
+
TraceStatus2["RUNNING"] = "running";
|
|
18752
|
+
TraceStatus2["COMPLETED"] = "completed";
|
|
18753
|
+
TraceStatus2["FAILED"] = "failed";
|
|
18754
|
+
})(TraceStatus ||= {});
|
|
18755
|
+
});
|
|
18756
|
+
|
|
18757
|
+
// ../types/src/processor/execution.ts
|
|
18758
|
+
function asTuple(values) {
|
|
18759
|
+
return values;
|
|
18760
|
+
}
|
|
18761
|
+
var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
|
|
18762
|
+
var init_execution = __esm(() => {
|
|
18763
|
+
init_zod();
|
|
18764
|
+
WorkflowExecutionStatusValue = {
|
|
18765
|
+
CREATED: "created",
|
|
18766
|
+
PENDING: "pending",
|
|
18767
|
+
RUNNING: "running",
|
|
18768
|
+
WAITING: "waiting",
|
|
18769
|
+
COMPLETED: "completed",
|
|
18770
|
+
FAILED: "failed",
|
|
18771
|
+
CANCELLED: "cancelled"
|
|
18772
|
+
};
|
|
18773
|
+
WorkflowExecutionStatusSchema = exports_external.enum([
|
|
18774
|
+
WorkflowExecutionStatusValue.CREATED,
|
|
18775
|
+
WorkflowExecutionStatusValue.PENDING,
|
|
18776
|
+
WorkflowExecutionStatusValue.RUNNING,
|
|
18777
|
+
WorkflowExecutionStatusValue.WAITING,
|
|
18778
|
+
WorkflowExecutionStatusValue.COMPLETED,
|
|
18779
|
+
WorkflowExecutionStatusValue.FAILED,
|
|
18780
|
+
WorkflowExecutionStatusValue.CANCELLED
|
|
18781
|
+
]);
|
|
18782
|
+
StepExecutionStatusValue = {
|
|
18783
|
+
PENDING: "pending",
|
|
18784
|
+
RUNNING: "running",
|
|
18785
|
+
SUCCESS: "success",
|
|
18786
|
+
FAILURE: "failure",
|
|
18787
|
+
WAITING: "waiting",
|
|
18788
|
+
SKIPPED: "skipped"
|
|
18789
|
+
};
|
|
18790
|
+
StepExecutionStatusSchema = exports_external.enum([
|
|
18791
|
+
StepExecutionStatusValue.PENDING,
|
|
18792
|
+
StepExecutionStatusValue.RUNNING,
|
|
18793
|
+
StepExecutionStatusValue.SUCCESS,
|
|
18794
|
+
StepExecutionStatusValue.FAILURE,
|
|
18795
|
+
StepExecutionStatusValue.WAITING,
|
|
18796
|
+
StepExecutionStatusValue.SKIPPED
|
|
18797
|
+
]);
|
|
18798
|
+
TriggerTypeValue = {
|
|
18799
|
+
MANUAL: "manual",
|
|
18800
|
+
API: "api",
|
|
18801
|
+
WEBHOOK: "webhook",
|
|
18802
|
+
SCHEDULE: "schedule",
|
|
18803
|
+
EMAIL: "email",
|
|
18804
|
+
EVAL: "eval",
|
|
18805
|
+
CLI: "cli"
|
|
18806
|
+
};
|
|
18807
|
+
TriggerTypeSchema = exports_external.enum([
|
|
18808
|
+
TriggerTypeValue.MANUAL,
|
|
18809
|
+
TriggerTypeValue.API,
|
|
18810
|
+
TriggerTypeValue.WEBHOOK,
|
|
18811
|
+
TriggerTypeValue.SCHEDULE,
|
|
18812
|
+
TriggerTypeValue.EMAIL,
|
|
18813
|
+
TriggerTypeValue.EVAL,
|
|
18814
|
+
TriggerTypeValue.CLI
|
|
18815
|
+
]);
|
|
18816
|
+
ExecutionTypeValue = {
|
|
18817
|
+
PROD: "prod",
|
|
18818
|
+
EVAL: "eval",
|
|
18819
|
+
PLAYGROUND: "playground"
|
|
18820
|
+
};
|
|
18821
|
+
ExecutionTypeSchema = exports_external.enum([
|
|
18822
|
+
ExecutionTypeValue.PROD,
|
|
18823
|
+
ExecutionTypeValue.EVAL,
|
|
18824
|
+
ExecutionTypeValue.PLAYGROUND
|
|
18825
|
+
]);
|
|
18826
|
+
WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
|
|
18827
|
+
STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
|
|
18828
|
+
TRIGGER_TYPES = TriggerTypeSchema.options;
|
|
18829
|
+
EXECUTION_TYPES = ExecutionTypeSchema.options;
|
|
18830
|
+
});
|
|
18831
|
+
|
|
18832
|
+
// ../types/src/processor/configs/classify.ts
|
|
18833
|
+
var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
|
|
18834
|
+
var init_classify = __esm(() => {
|
|
18835
|
+
init_zod();
|
|
18836
|
+
ClassifyInputSchema = exports_external.object({
|
|
18837
|
+
content: exports_external.string().optional().describe("Text content to classify"),
|
|
18838
|
+
text: exports_external.string().optional().describe("Text content (alternative to content)")
|
|
18839
|
+
}).refine((data) => !!(data.content || data.text), {
|
|
18840
|
+
message: "Either content or text must be provided"
|
|
18841
|
+
});
|
|
18842
|
+
ClassifyLabelSchema = exports_external.object({
|
|
18843
|
+
name: exports_external.string().min(1).describe("Label value returned in output.label"),
|
|
18844
|
+
description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
|
|
18845
|
+
});
|
|
18846
|
+
ClassifyConfigSchema = exports_external.object({
|
|
18847
|
+
labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
|
|
18848
|
+
prompt: exports_external.string().optional().describe("Optional classification instructions appended to the system prompt. Use to clarify edge cases or emphasize evidence the model should weigh."),
|
|
18849
|
+
provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
|
|
18850
|
+
model: exports_external.string().optional().describe("Model override"),
|
|
18851
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
|
|
18852
|
+
});
|
|
18853
|
+
ClassifyOutputSchema = exports_external.object({
|
|
18854
|
+
label: exports_external.string().describe("The selected label name"),
|
|
18855
|
+
confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
|
|
18856
|
+
reason: exports_external.string().describe("Short justification for the chosen label")
|
|
18857
|
+
});
|
|
18858
|
+
});
|
|
18859
|
+
|
|
18860
|
+
// ../types/src/parser/parser.ts
|
|
18861
|
+
function resolveEffectiveMimeType(filename, declaredMimeType) {
|
|
18862
|
+
const ext = filename.split(".").pop()?.toLowerCase();
|
|
18863
|
+
if (!ext)
|
|
18864
|
+
return declaredMimeType;
|
|
18865
|
+
const extensionMime = EXTENSION_TO_MIME[ext];
|
|
18866
|
+
return extensionMime ?? declaredMimeType;
|
|
18867
|
+
}
|
|
18868
|
+
function getParserCategory(mimeType) {
|
|
18869
|
+
const normalized = mimeType.toLowerCase().trim();
|
|
18870
|
+
if (ParserCategory.PLAINTEXT.includes(normalized)) {
|
|
18871
|
+
return "plaintext";
|
|
18872
|
+
}
|
|
18873
|
+
if (ParserCategory.OFFICE.includes(normalized)) {
|
|
18874
|
+
return "office";
|
|
18875
|
+
}
|
|
18876
|
+
if (ParserCategory.DOCUMENT.includes(normalized)) {
|
|
18877
|
+
return "document";
|
|
18878
|
+
}
|
|
18879
|
+
return null;
|
|
18880
|
+
}
|
|
18881
|
+
function requiresSpecializedParser(mimeType) {
|
|
18882
|
+
return getParserCategory(mimeType) === "document";
|
|
18883
|
+
}
|
|
18884
|
+
function getAllSupportedMimeTypes() {
|
|
18885
|
+
return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
|
|
18886
|
+
}
|
|
18887
|
+
function getSupportedFormatsLabel() {
|
|
18888
|
+
const allMimes = getAllSupportedMimeTypes();
|
|
18889
|
+
const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
|
|
18890
|
+
return labels.join(", ");
|
|
18891
|
+
}
|
|
18892
|
+
var OFFICE_MIME_TYPES, ParserCategory, ParserTypeSchema, DocumentMetadataSchema, ParseUsageSchema, CoordinateUnitSchema, PointSchema, BoundingRegionSchema, PositionedTextSchema, TableCellSchema, ExtractedTableSchema, LayoutElementTypeSchema, LayoutElementSchema, PageResultSchema, ParseResultSchema, ParseOptionsSchema, ParserInputSchema, EXTENSION_TO_MIME, MIME_TO_LABEL;
|
|
18893
|
+
var init_parser = __esm(() => {
|
|
18894
|
+
init_zod();
|
|
18895
|
+
OFFICE_MIME_TYPES = [
|
|
18896
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
18897
|
+
"application/msword",
|
|
18898
|
+
"application/vnd.oasis.opendocument.text",
|
|
18899
|
+
"application/rtf",
|
|
18900
|
+
"text/rtf",
|
|
18901
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
18902
|
+
"application/vnd.ms-excel",
|
|
18903
|
+
"application/vnd.ms-excel.sheet.macroenabled.12",
|
|
18904
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
18905
|
+
"application/vnd.oasis.opendocument.spreadsheet",
|
|
18906
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
18907
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
18908
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
18909
|
+
"application/vnd.ms-powerpoint",
|
|
18910
|
+
"application/vnd.oasis.opendocument.presentation",
|
|
18911
|
+
"message/rfc822",
|
|
18912
|
+
"application/vnd.ms-outlook",
|
|
18913
|
+
"application/epub+zip"
|
|
18914
|
+
];
|
|
18915
|
+
ParserCategory = {
|
|
18916
|
+
PLAINTEXT: [
|
|
18917
|
+
"text/plain",
|
|
18918
|
+
"text/markdown",
|
|
18919
|
+
"text/csv",
|
|
18920
|
+
"text/tab-separated-values",
|
|
18921
|
+
"text/html",
|
|
18922
|
+
"text/xml",
|
|
18923
|
+
"application/json",
|
|
18924
|
+
"application/x-yaml",
|
|
18925
|
+
"application/toml",
|
|
18926
|
+
"image/svg+xml",
|
|
18927
|
+
"text/x-rst",
|
|
18928
|
+
"text/x-org",
|
|
18929
|
+
"application/x-latex",
|
|
18930
|
+
"application/x-ipynb+json",
|
|
18931
|
+
"application/x-bibtex",
|
|
18932
|
+
"application/docbook+xml",
|
|
18933
|
+
"application/x-fictionbook+xml"
|
|
18934
|
+
],
|
|
18935
|
+
OFFICE: [...OFFICE_MIME_TYPES],
|
|
18936
|
+
DOCUMENT: [
|
|
18937
|
+
"application/pdf",
|
|
18938
|
+
"image/png",
|
|
18939
|
+
"image/jpeg",
|
|
18940
|
+
"image/webp",
|
|
18941
|
+
"image/tiff",
|
|
18942
|
+
"image/gif",
|
|
18943
|
+
"image/bmp"
|
|
18944
|
+
]
|
|
18945
|
+
};
|
|
18946
|
+
ParserTypeSchema = exports_external.enum([
|
|
18947
|
+
"plaintext",
|
|
18948
|
+
"office",
|
|
18949
|
+
"llm-vision",
|
|
18950
|
+
"ocr"
|
|
18951
|
+
]);
|
|
18952
|
+
DocumentMetadataSchema = exports_external.object({
|
|
18953
|
+
filename: exports_external.string(),
|
|
18954
|
+
mimeType: exports_external.string(),
|
|
18955
|
+
size: exports_external.number().describe("File size in bytes"),
|
|
18956
|
+
storageRef: exports_external.string().optional().describe("Storage reference for the original file")
|
|
18957
|
+
});
|
|
18958
|
+
ParseUsageSchema = exports_external.object({
|
|
18959
|
+
pageCount: exports_external.number(),
|
|
18960
|
+
processingTimeMs: exports_external.number().optional()
|
|
18961
|
+
});
|
|
18962
|
+
CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
|
|
18963
|
+
PointSchema = exports_external.object({
|
|
18964
|
+
x: exports_external.number(),
|
|
18965
|
+
y: exports_external.number()
|
|
18966
|
+
});
|
|
18967
|
+
BoundingRegionSchema = exports_external.object({
|
|
18968
|
+
polygon: exports_external.array(PointSchema).min(3),
|
|
18969
|
+
unit: CoordinateUnitSchema,
|
|
18970
|
+
pageIndex: exports_external.number()
|
|
18971
|
+
});
|
|
18972
|
+
PositionedTextSchema = exports_external.object({
|
|
18973
|
+
text: exports_external.string(),
|
|
18974
|
+
confidence: exports_external.number().min(0).max(1).optional(),
|
|
18975
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
18976
|
+
});
|
|
18977
|
+
TableCellSchema = exports_external.object({
|
|
18978
|
+
content: exports_external.string(),
|
|
18979
|
+
rowIndex: exports_external.number(),
|
|
18980
|
+
columnIndex: exports_external.number(),
|
|
18981
|
+
rowSpan: exports_external.number().default(1),
|
|
18982
|
+
columnSpan: exports_external.number().default(1),
|
|
18983
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
18984
|
+
});
|
|
18985
|
+
ExtractedTableSchema = exports_external.object({
|
|
18986
|
+
cells: exports_external.array(TableCellSchema),
|
|
18987
|
+
rowCount: exports_external.number(),
|
|
18988
|
+
columnCount: exports_external.number(),
|
|
18989
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
18990
|
+
});
|
|
18991
|
+
LayoutElementTypeSchema = exports_external.enum([
|
|
18992
|
+
"paragraph",
|
|
18993
|
+
"title",
|
|
18994
|
+
"sectionHeading",
|
|
18995
|
+
"pageHeader",
|
|
18996
|
+
"pageFooter",
|
|
18997
|
+
"pageNumber",
|
|
18998
|
+
"footnote",
|
|
18999
|
+
"table",
|
|
19000
|
+
"figure",
|
|
19001
|
+
"formulaBlock"
|
|
19002
|
+
]);
|
|
19003
|
+
LayoutElementSchema = exports_external.object({
|
|
19004
|
+
type: LayoutElementTypeSchema,
|
|
19005
|
+
content: exports_external.string(),
|
|
19006
|
+
table: ExtractedTableSchema.optional(),
|
|
19007
|
+
caption: exports_external.string().optional(),
|
|
19008
|
+
figureId: exports_external.string().optional(),
|
|
19009
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19010
|
+
});
|
|
19011
|
+
PageResultSchema = exports_external.object({
|
|
19012
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19013
|
+
text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
|
|
19014
|
+
pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
|
|
19015
|
+
layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
|
|
19016
|
+
words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
|
|
19017
|
+
lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
|
|
19018
|
+
tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
|
|
19019
|
+
width: exports_external.number().optional().describe("Page width"),
|
|
19020
|
+
height: exports_external.number().optional().describe("Page height"),
|
|
19021
|
+
unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
|
|
19022
|
+
confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
|
|
19023
|
+
});
|
|
19024
|
+
ParseResultSchema = exports_external.object({
|
|
19025
|
+
document: DocumentMetadataSchema,
|
|
19026
|
+
usage: ParseUsageSchema,
|
|
19027
|
+
pages: exports_external.array(PageResultSchema),
|
|
19028
|
+
text: exports_external.string().describe("Combined text from all pages"),
|
|
19029
|
+
parserType: ParserTypeSchema,
|
|
19030
|
+
parserVersion: exports_external.string().optional(),
|
|
19031
|
+
model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
|
|
19032
|
+
rawResponse: exports_external.unknown().optional()
|
|
19033
|
+
});
|
|
19034
|
+
ParseOptionsSchema = exports_external.object({
|
|
19035
|
+
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
|
|
19036
|
+
ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
|
|
19037
|
+
includeWordPositions: exports_external.boolean().default(false),
|
|
19038
|
+
includeLinePositions: exports_external.boolean().default(false),
|
|
19039
|
+
extractTables: exports_external.boolean().default(true),
|
|
19040
|
+
provider: exports_external.string().optional().describe("LLM provider ID to use"),
|
|
19041
|
+
model: exports_external.string().optional(),
|
|
19042
|
+
maxConcurrency: exports_external.number().min(1).max(30).default(3),
|
|
19043
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5),
|
|
19044
|
+
prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
|
|
19045
|
+
languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
|
|
19046
|
+
tenantId: exports_external.string().optional()
|
|
19047
|
+
});
|
|
19048
|
+
ParserInputSchema = exports_external.object({
|
|
19049
|
+
data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
|
|
19050
|
+
filename: exports_external.string(),
|
|
19051
|
+
mimeType: exports_external.string(),
|
|
19052
|
+
options: ParseOptionsSchema.optional()
|
|
19053
|
+
});
|
|
19054
|
+
EXTENSION_TO_MIME = {
|
|
19055
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19056
|
+
doc: "application/msword",
|
|
19057
|
+
odt: "application/vnd.oasis.opendocument.text",
|
|
19058
|
+
rtf: "application/rtf",
|
|
19059
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19060
|
+
xls: "application/vnd.ms-excel",
|
|
19061
|
+
xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19062
|
+
xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19063
|
+
ods: "application/vnd.oasis.opendocument.spreadsheet",
|
|
19064
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19065
|
+
ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19066
|
+
pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19067
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
19068
|
+
odp: "application/vnd.oasis.opendocument.presentation",
|
|
19069
|
+
eml: "message/rfc822",
|
|
19070
|
+
msg: "application/vnd.ms-outlook",
|
|
19071
|
+
epub: "application/epub+zip",
|
|
19072
|
+
pdf: "application/pdf",
|
|
19073
|
+
png: "image/png",
|
|
19074
|
+
jpg: "image/jpeg",
|
|
19075
|
+
jpeg: "image/jpeg",
|
|
19076
|
+
webp: "image/webp",
|
|
19077
|
+
tiff: "image/tiff",
|
|
19078
|
+
tif: "image/tiff",
|
|
19079
|
+
gif: "image/gif",
|
|
19080
|
+
bmp: "image/bmp",
|
|
19081
|
+
svg: "image/svg+xml",
|
|
19082
|
+
txt: "text/plain",
|
|
19083
|
+
md: "text/markdown",
|
|
19084
|
+
markdown: "text/markdown",
|
|
19085
|
+
csv: "text/csv",
|
|
19086
|
+
tsv: "text/tab-separated-values",
|
|
19087
|
+
html: "text/html",
|
|
19088
|
+
htm: "text/html",
|
|
19089
|
+
xml: "text/xml",
|
|
19090
|
+
json: "application/json",
|
|
19091
|
+
yaml: "application/x-yaml",
|
|
19092
|
+
yml: "application/x-yaml",
|
|
19093
|
+
toml: "application/toml",
|
|
19094
|
+
rst: "text/x-rst",
|
|
19095
|
+
org: "text/x-org",
|
|
19096
|
+
tex: "application/x-latex",
|
|
19097
|
+
latex: "application/x-latex",
|
|
19098
|
+
ipynb: "application/x-ipynb+json",
|
|
19099
|
+
bib: "application/x-bibtex",
|
|
19100
|
+
dbk: "application/docbook+xml",
|
|
19101
|
+
docbook: "application/docbook+xml",
|
|
19102
|
+
fb2: "application/x-fictionbook+xml"
|
|
19103
|
+
};
|
|
19104
|
+
MIME_TO_LABEL = {
|
|
19105
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
|
|
19106
|
+
"application/msword": "DOC",
|
|
19107
|
+
"application/vnd.oasis.opendocument.text": "ODT",
|
|
19108
|
+
"application/rtf": "RTF",
|
|
19109
|
+
"text/rtf": "RTF",
|
|
19110
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
|
|
19111
|
+
"application/vnd.ms-excel": "XLS",
|
|
19112
|
+
"application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
|
|
19113
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
|
|
19114
|
+
"application/vnd.oasis.opendocument.spreadsheet": "ODS",
|
|
19115
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
|
|
19116
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
|
|
19117
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
|
|
19118
|
+
"application/vnd.ms-powerpoint": "PPT",
|
|
19119
|
+
"application/vnd.oasis.opendocument.presentation": "ODP",
|
|
19120
|
+
"message/rfc822": "EML",
|
|
19121
|
+
"application/vnd.ms-outlook": "MSG",
|
|
19122
|
+
"application/epub+zip": "EPUB",
|
|
19123
|
+
"application/pdf": "PDF",
|
|
19124
|
+
"image/png": "PNG",
|
|
19125
|
+
"image/jpeg": "JPEG",
|
|
19126
|
+
"image/webp": "WebP",
|
|
19127
|
+
"image/tiff": "TIFF",
|
|
19128
|
+
"image/gif": "GIF",
|
|
19129
|
+
"image/bmp": "BMP",
|
|
19130
|
+
"image/svg+xml": "SVG",
|
|
19131
|
+
"text/plain": "TXT",
|
|
19132
|
+
"text/markdown": "Markdown",
|
|
19133
|
+
"text/csv": "CSV",
|
|
19134
|
+
"text/tab-separated-values": "TSV",
|
|
19135
|
+
"text/html": "HTML",
|
|
19136
|
+
"text/xml": "XML",
|
|
19137
|
+
"application/json": "JSON",
|
|
19138
|
+
"application/x-yaml": "YAML",
|
|
19139
|
+
"application/toml": "TOML",
|
|
19140
|
+
"text/x-rst": "RST",
|
|
19141
|
+
"text/x-org": "Org",
|
|
19142
|
+
"application/x-latex": "LaTeX",
|
|
19143
|
+
"application/x-ipynb+json": "Jupyter",
|
|
19144
|
+
"application/x-bibtex": "BibTeX",
|
|
19145
|
+
"application/docbook+xml": "DocBook",
|
|
19146
|
+
"application/x-fictionbook+xml": "FB2"
|
|
19147
|
+
};
|
|
19148
|
+
});
|
|
19149
|
+
|
|
19150
|
+
// ../types/src/processor/configs/document-parser.ts
|
|
19151
|
+
function isFilePathDescriptor(input) {
|
|
19152
|
+
return FilePathDescriptorSchema.safeParse(input).success;
|
|
19153
|
+
}
|
|
19154
|
+
var FileIdInputSchema, LocalFileRefSchema, S3FileRefSchema, InlineFileRefSchema, FilePathDescriptorSchema, DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
|
|
19155
|
+
var init_document_parser = __esm(() => {
|
|
19156
|
+
init_zod();
|
|
19157
|
+
init_parser();
|
|
19158
|
+
FileIdInputSchema = exports_external.object({
|
|
19159
|
+
fileId: exports_external.string().describe("File ID from files table"),
|
|
19160
|
+
filename: exports_external.string().optional().describe("Original filename (for inline files)"),
|
|
19161
|
+
mimeType: exports_external.string().optional().describe("MIME type (for inline files)")
|
|
19162
|
+
});
|
|
19163
|
+
LocalFileRefSchema = exports_external.object({
|
|
19164
|
+
kind: exports_external.literal("local"),
|
|
19165
|
+
path: exports_external.string().describe("Absolute path to a file on disk"),
|
|
19166
|
+
filename: exports_external.string().describe("Original filename"),
|
|
19167
|
+
mimeType: exports_external.string().describe("MIME type of the file")
|
|
19168
|
+
});
|
|
19169
|
+
S3FileRefSchema = exports_external.object({
|
|
19170
|
+
kind: exports_external.literal("s3"),
|
|
19171
|
+
ref: exports_external.string().describe("Storage key (suffix-only, prefix added by adapter)"),
|
|
19172
|
+
filename: exports_external.string().describe("Original filename"),
|
|
19173
|
+
mimeType: exports_external.string().describe("MIME type of the file")
|
|
19174
|
+
});
|
|
19175
|
+
InlineFileRefSchema = exports_external.object({
|
|
19176
|
+
kind: exports_external.literal("inline"),
|
|
19177
|
+
base64: exports_external.string().describe("Base64-encoded file bytes"),
|
|
19178
|
+
filename: exports_external.string().describe("Original filename"),
|
|
19179
|
+
mimeType: exports_external.string().describe("MIME type of the file")
|
|
19180
|
+
});
|
|
19181
|
+
FilePathDescriptorSchema = exports_external.discriminatedUnion("kind", [
|
|
19182
|
+
LocalFileRefSchema,
|
|
19183
|
+
S3FileRefSchema,
|
|
19184
|
+
InlineFileRefSchema
|
|
19185
|
+
]);
|
|
19186
|
+
DocumentParserInputSchema = exports_external.union([FileIdInputSchema, FilePathDescriptorSchema]);
|
|
19187
|
+
DocumentParserOutputSchema = ParseResultSchema;
|
|
19188
|
+
DocumentParserConfigSchema = exports_external.object({
|
|
19189
|
+
ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
|
|
19190
|
+
llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
|
|
19191
|
+
maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
|
|
19192
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
|
|
19193
|
+
prompt: exports_external.string().optional().describe("Custom extraction prompt"),
|
|
19194
|
+
nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
|
|
19195
|
+
languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
|
|
19196
|
+
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown").optional().describe("Format for extracted text. Only the native (Kreuzberg) parser uses this — OCR/VLM always emit markdown.")
|
|
19197
|
+
}).prefault({});
|
|
19198
|
+
});
|
|
19199
|
+
|
|
19200
|
+
// ../types/src/processor/configs/extract.ts
|
|
19201
|
+
var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
|
|
19202
|
+
var init_extract = __esm(() => {
|
|
19203
|
+
init_zod();
|
|
19204
|
+
ExtractInputSchema = exports_external.object({
|
|
19205
|
+
content: exports_external.string().optional().describe("Text content to extract from"),
|
|
19206
|
+
text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
|
|
19207
|
+
contentType: exports_external.enum(["text", "image"]).default("text"),
|
|
19208
|
+
imageData: exports_external.string().optional(),
|
|
19209
|
+
imageMimeType: exports_external.string().optional()
|
|
19210
|
+
}).refine((data) => data.content || data.text, {
|
|
19211
|
+
message: "Either content or text must be provided"
|
|
19212
|
+
});
|
|
19213
|
+
ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema");
|
|
19214
|
+
ExtractConfigSchema = exports_external.object({
|
|
19215
|
+
schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
|
|
19216
|
+
prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
|
|
19217
|
+
provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
|
|
19218
|
+
model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
|
|
19219
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit.")
|
|
19220
|
+
});
|
|
19221
|
+
});
|
|
19222
|
+
|
|
19223
|
+
// ../types/src/processor/configs/merge.ts
|
|
19224
|
+
var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
|
|
19225
|
+
var init_merge = __esm(() => {
|
|
19226
|
+
init_zod();
|
|
19227
|
+
MergeConfigSchema = exports_external.object({
|
|
19228
|
+
preservePortNames: exports_external.boolean().default(true),
|
|
19229
|
+
outputKey: exports_external.string().optional()
|
|
19230
|
+
});
|
|
19231
|
+
MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
19232
|
+
MergeOutputSchema = exports_external.object({
|
|
19233
|
+
items: exports_external.array(exports_external.unknown()),
|
|
19234
|
+
count: exports_external.number(),
|
|
19235
|
+
merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
19236
|
+
});
|
|
19237
|
+
});
|
|
19238
|
+
|
|
19239
|
+
// ../types/src/processor/configs/pdf-embedder.ts
|
|
19240
|
+
var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
|
|
19241
|
+
var init_pdf_embedder = __esm(() => {
|
|
19242
|
+
init_zod();
|
|
19243
|
+
init_parser();
|
|
19244
|
+
PdfEmbedderInputSchema = exports_external.object({
|
|
19245
|
+
fileId: exports_external.string().describe("File ID from files table"),
|
|
19246
|
+
parseResult: exports_external.object({
|
|
19247
|
+
pages: exports_external.array(PageResultSchema),
|
|
19248
|
+
text: exports_external.string().optional()
|
|
19249
|
+
}).describe("Parse result from ai.parse step (must include word positions)")
|
|
19250
|
+
});
|
|
19251
|
+
PdfEmbedderOutputSchema = exports_external.object({
|
|
19252
|
+
fileId: exports_external.string().describe("File ID from files table"),
|
|
19253
|
+
pageCount: exports_external.number().describe("Number of pages in the output PDF"),
|
|
19254
|
+
wordCount: exports_external.number().describe("Number of words embedded"),
|
|
19255
|
+
text: exports_external.string().describe("Extracted text (from parse step)")
|
|
19256
|
+
});
|
|
19257
|
+
PdfEmbedderConfigSchema = exports_external.object({
|
|
19258
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
|
|
19259
|
+
confidenceThreshold: exports_external.number().min(0).max(1).default(0.7).describe("Minimum OCR confidence (0-1) to include a word. Lower = more words but more errors")
|
|
19260
|
+
}).prefault({});
|
|
19261
|
+
});
|
|
19262
|
+
|
|
19263
|
+
// ../types/src/processor/configs/split.ts
|
|
19264
|
+
var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema, SplitOutputSchema;
|
|
19265
|
+
var init_split = __esm(() => {
|
|
19266
|
+
init_zod();
|
|
19267
|
+
SplitInputSchema = exports_external.object({
|
|
19268
|
+
pages: exports_external.array(exports_external.object({
|
|
19269
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19270
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19271
|
+
pageName: exports_external.string().optional()
|
|
19272
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19273
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19274
|
+
SplitConfigSchema = exports_external.object({
|
|
19275
|
+
sections: exports_external.array(exports_external.object({
|
|
19276
|
+
name: exports_external.string().min(1).describe("Stable id for the section"),
|
|
19277
|
+
description: exports_external.string().min(1).describe("What this section looks like in the document. Use the document's own terminology (e.g. 'Príloha 2 / Anlage 2') and visual cues."),
|
|
19278
|
+
required: exports_external.boolean().optional().describe('If true, log a warn when this section is not found, and lean the LLM toward expecting it. Default: false (Reducto-style "may be absent").'),
|
|
19279
|
+
endHints: exports_external.array(exports_external.string()).optional().describe('Natural-language hints fed to the LLM about what marks the END of this section (e.g. ["PRÍPAD PORUŠENIA ZMLUVY", "*Koniec prílohy*", "the next chapter heading"]). The LLM uses these as guidance — not a regex match — so casing variants, missing diacritics, and multilingual phrasings still close the section correctly. The LLM emits a structured end_anchor per section it judges closed; deterministic merge applies it.')
|
|
19280
|
+
})).min(1),
|
|
19281
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19282
|
+
provider: exports_external.string().optional().describe('Provider ID from eigenpal.config.yaml (e.g. "openai-gpt5.4-mini"). Falls back to the tenant default LLM provider when omitted.'),
|
|
19283
|
+
windowTokenBudget: exports_external.number().int().positive().optional().describe("Per-window token ceiling. Defaults to env SPLIT_WINDOW_TOKEN_BUDGET or 20000. Smaller windows give sharper anchors on contract-style documents (less competing context for the LLM to mis-anchor on); 50k–100k when sections routinely exceed per-window page count.")
|
|
19284
|
+
});
|
|
19285
|
+
ConfidenceLevelSchema = exports_external.enum(["low", "medium", "high"]).describe("LLM confidence as a coarse enum. Numeric (0..1) confidences cluster at 0.85–0.95 and gradations are noise; low/medium/high is reliable.");
|
|
19286
|
+
SplitOutputSchema = exports_external.object({
|
|
19287
|
+
splits: exports_external.array(exports_external.object({
|
|
19288
|
+
name: exports_external.string(),
|
|
19289
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19290
|
+
confidence: ConfidenceLevelSchema.describe("LLM confidence at the start anchor: low | medium | high."),
|
|
19291
|
+
notes: exports_external.string(),
|
|
19292
|
+
evidence: exports_external.object({
|
|
19293
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
|
|
19294
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
|
|
19295
|
+
}).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
|
|
19296
|
+
end_evidence: exports_external.object({
|
|
19297
|
+
end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
|
|
19298
|
+
confidence: ConfidenceLevelSchema,
|
|
19299
|
+
notes: exports_external.string().describe("LLM justification for the end. Pairs with start-anchor `notes` so a reconciliation pass can judge whether the section is correctly bounded.")
|
|
19300
|
+
}).optional().describe("Set when the LLM flagged a section close (matched against `endHints` or detected end-of-section markers). Absent when the section was closed by deterministic continuity-fill (next section start - 1)."),
|
|
19301
|
+
text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
|
|
19302
|
+
pages: exports_external.array(exports_external.object({
|
|
19303
|
+
pageIndex: exports_external.number().int(),
|
|
19304
|
+
text: exports_external.string(),
|
|
19305
|
+
pageName: exports_external.string().optional(),
|
|
19306
|
+
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
|
|
19307
|
+
})).describe("Raw per-page records covered by this split (in page order). Use when downstream needs to iterate page-by-page rather than treating the section as one blob."),
|
|
19308
|
+
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19309
|
+
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19310
|
+
}))
|
|
19311
|
+
});
|
|
19312
|
+
});
|
|
19313
|
+
|
|
19314
|
+
// ../types/src/processor/configs/template.ts
|
|
19315
|
+
var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
|
|
19316
|
+
var init_template = __esm(() => {
|
|
19317
|
+
init_zod();
|
|
19318
|
+
TemplateInputSchema = exports_external.object({
|
|
19319
|
+
data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
|
|
19320
|
+
});
|
|
19321
|
+
TemplateOutputSchema = exports_external.object({
|
|
19322
|
+
fileId: exports_external.string().describe("File ID from files table")
|
|
19323
|
+
});
|
|
19324
|
+
TemplateConfigSchema = exports_external.object({
|
|
19325
|
+
templateId: exports_external.string().describe("ID of the template from templates table"),
|
|
19326
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
|
|
19327
|
+
highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
|
|
19328
|
+
notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
|
|
19329
|
+
});
|
|
19330
|
+
});
|
|
19331
|
+
|
|
19332
|
+
// ../types/src/processor/configs/xlsx-to-json.ts
|
|
19333
|
+
var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
|
|
19334
|
+
var init_xlsx_to_json = __esm(() => {
|
|
19335
|
+
init_zod();
|
|
19336
|
+
init_document_parser();
|
|
19337
|
+
XlsxToJsonInputSchema = exports_external.union([FileIdInputSchema, FilePathDescriptorSchema]);
|
|
19338
|
+
XlsxToJsonOutputSchema = exports_external.object({
|
|
19339
|
+
rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
|
|
19340
|
+
fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
|
|
19341
|
+
});
|
|
19342
|
+
XlsxToJsonConfigSchema = exports_external.object({
|
|
19343
|
+
sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
|
|
19344
|
+
outputCsv: exports_external.boolean().default(false).optional(),
|
|
19345
|
+
outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
|
|
19346
|
+
});
|
|
19347
|
+
});
|
|
19348
|
+
|
|
19349
|
+
// ../types/src/processor/configs/react-hook-form.ts
|
|
19350
|
+
function extractFieldMetadata(schema) {
|
|
19351
|
+
const fields = [];
|
|
19352
|
+
let inner = schema;
|
|
19353
|
+
while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
|
|
19354
|
+
inner = inner.unwrap();
|
|
19355
|
+
}
|
|
19356
|
+
if (inner instanceof exports_external.ZodObject) {
|
|
19357
|
+
for (const [name, fieldSchema] of Object.entries(inner.shape)) {
|
|
19358
|
+
fields.push(extractSingleFieldMetadata(name, fieldSchema));
|
|
19359
|
+
}
|
|
19360
|
+
}
|
|
19361
|
+
return fields;
|
|
19362
|
+
}
|
|
19363
|
+
function extractSingleFieldMetadata(name, schema) {
|
|
19364
|
+
let current = schema;
|
|
19365
|
+
let required2 = true;
|
|
19366
|
+
let defaultValue = undefined;
|
|
19367
|
+
let description = current.description;
|
|
19368
|
+
while (true) {
|
|
19369
|
+
if (current instanceof exports_external.ZodOptional) {
|
|
19370
|
+
required2 = false;
|
|
19371
|
+
current = current.unwrap();
|
|
19372
|
+
} else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
|
|
19373
|
+
defaultValue = current._def.defaultValue;
|
|
19374
|
+
current = current.unwrap();
|
|
19375
|
+
} else {
|
|
19376
|
+
break;
|
|
19377
|
+
}
|
|
19378
|
+
description ??= current.description;
|
|
19379
|
+
}
|
|
19380
|
+
const base = { name, type: "unknown", required: required2, description, defaultValue };
|
|
19381
|
+
if (current instanceof exports_external.ZodString)
|
|
19382
|
+
return { ...base, type: "string" };
|
|
19383
|
+
if (current instanceof exports_external.ZodNumber) {
|
|
19384
|
+
let min;
|
|
19385
|
+
let max;
|
|
19386
|
+
for (const c of current._def.checks ?? []) {
|
|
19387
|
+
const def = c._zod.def;
|
|
19388
|
+
if (def.check === "greater_than")
|
|
19389
|
+
min = def.value;
|
|
19390
|
+
if (def.check === "less_than")
|
|
19391
|
+
max = def.value;
|
|
19392
|
+
}
|
|
19393
|
+
return { ...base, type: "number", min, max };
|
|
19394
|
+
}
|
|
19395
|
+
if (current instanceof exports_external.ZodBoolean)
|
|
19396
|
+
return { ...base, type: "boolean" };
|
|
19397
|
+
if (current instanceof exports_external.ZodEnum) {
|
|
19398
|
+
return { ...base, type: "enum", enumValues: current.options };
|
|
19399
|
+
}
|
|
19400
|
+
if (current instanceof exports_external.ZodArray)
|
|
19401
|
+
return { ...base, type: "array" };
|
|
19402
|
+
if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
|
|
19403
|
+
return { ...base, type: "object" };
|
|
19404
|
+
}
|
|
19405
|
+
return base;
|
|
19406
|
+
}
|
|
19407
|
+
function getConfigFieldMetadata(processorId) {
|
|
19408
|
+
const schema = getConfigSchema(processorId);
|
|
19409
|
+
if (!schema)
|
|
19410
|
+
return;
|
|
19411
|
+
return extractFieldMetadata(schema);
|
|
19412
|
+
}
|
|
19413
|
+
function getConfigDefaults(processorId) {
|
|
19414
|
+
const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19415
|
+
if (!schema)
|
|
19416
|
+
return {};
|
|
19417
|
+
try {
|
|
19418
|
+
const result = schema.safeParse({});
|
|
19419
|
+
if (result.success) {
|
|
19420
|
+
return result.data;
|
|
19421
|
+
}
|
|
19422
|
+
} catch {}
|
|
19423
|
+
const fields = extractFieldMetadata(schema);
|
|
19424
|
+
const defaults = {};
|
|
19425
|
+
for (const field of fields) {
|
|
19426
|
+
if (field.defaultValue !== undefined) {
|
|
19427
|
+
defaults[field.name] = field.defaultValue;
|
|
19428
|
+
}
|
|
19429
|
+
}
|
|
19430
|
+
return defaults;
|
|
19431
|
+
}
|
|
19432
|
+
function validateConfig(processorId, config2) {
|
|
19433
|
+
const schema = getConfigSchema(processorId);
|
|
19434
|
+
if (!schema) {
|
|
19435
|
+
return { valid: true, errors: {} };
|
|
19436
|
+
}
|
|
19437
|
+
const result = schema.safeParse(config2);
|
|
19438
|
+
if (result.success) {
|
|
19439
|
+
return { valid: true, errors: {} };
|
|
19440
|
+
}
|
|
19441
|
+
const errors3 = {};
|
|
19442
|
+
for (const issue2 of result.error.issues) {
|
|
19443
|
+
const path = issue2.path.join(".");
|
|
19444
|
+
errors3[path] = issue2.message;
|
|
19445
|
+
}
|
|
19446
|
+
return { valid: false, errors: errors3 };
|
|
19447
|
+
}
|
|
19448
|
+
var init_react_hook_form = __esm(() => {
|
|
19449
|
+
init_zod();
|
|
19450
|
+
init_configs();
|
|
19451
|
+
});
|
|
19452
|
+
|
|
19453
|
+
// ../types/src/processor/configs/index.ts
|
|
19454
|
+
function getProcessorSchemas(processorId) {
|
|
19455
|
+
return PROCESSOR_SCHEMAS[processorId];
|
|
19456
|
+
}
|
|
19457
|
+
function getConfigSchema(processorId) {
|
|
19458
|
+
return PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19459
|
+
}
|
|
19460
|
+
function getAllProcessorJsonSchemas() {
|
|
19461
|
+
return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
|
|
19462
|
+
id: p.id,
|
|
19463
|
+
inputSchema: toJsonSchema(p.inputSchema),
|
|
19464
|
+
outputSchema: toJsonSchema(p.outputSchema),
|
|
19465
|
+
configSchema: toJsonSchema(p.configSchema)
|
|
19466
|
+
}));
|
|
19467
|
+
}
|
|
19468
|
+
function listProcessorIds() {
|
|
19469
|
+
return Object.keys(PROCESSOR_SCHEMAS);
|
|
19470
|
+
}
|
|
19471
|
+
var PROCESSOR_SCHEMAS;
|
|
19472
|
+
var init_configs = __esm(() => {
|
|
19473
|
+
init_common();
|
|
19474
|
+
init_ids();
|
|
19475
|
+
init_classify();
|
|
19476
|
+
init_document_parser();
|
|
19477
|
+
init_extract();
|
|
19478
|
+
init_merge();
|
|
19479
|
+
init_pdf_embedder();
|
|
19480
|
+
init_split();
|
|
19481
|
+
init_template();
|
|
19482
|
+
init_xlsx_to_json();
|
|
19483
|
+
init_react_hook_form();
|
|
19484
|
+
init_classify();
|
|
19485
|
+
init_document_parser();
|
|
19486
|
+
init_extract();
|
|
19487
|
+
init_merge();
|
|
19488
|
+
init_pdf_embedder();
|
|
19489
|
+
init_split();
|
|
19490
|
+
init_template();
|
|
19491
|
+
init_xlsx_to_json();
|
|
19492
|
+
PROCESSOR_SCHEMAS = {
|
|
19493
|
+
[PROCESSOR_IDS.EXTRACT]: {
|
|
19494
|
+
id: PROCESSOR_IDS.EXTRACT,
|
|
19495
|
+
inputSchema: ExtractInputSchema,
|
|
19496
|
+
outputSchema: ExtractOutputSchema,
|
|
19497
|
+
configSchema: ExtractConfigSchema
|
|
19498
|
+
},
|
|
19499
|
+
[PROCESSOR_IDS.DOCUMENT_PARSER]: {
|
|
19500
|
+
id: PROCESSOR_IDS.DOCUMENT_PARSER,
|
|
19501
|
+
inputSchema: DocumentParserInputSchema,
|
|
19502
|
+
outputSchema: DocumentParserOutputSchema,
|
|
19503
|
+
configSchema: DocumentParserConfigSchema
|
|
19504
|
+
},
|
|
19505
|
+
[PROCESSOR_IDS.MERGE]: {
|
|
19506
|
+
id: PROCESSOR_IDS.MERGE,
|
|
19507
|
+
inputSchema: MergeInputSchema,
|
|
19508
|
+
outputSchema: MergeOutputSchema,
|
|
19509
|
+
configSchema: MergeConfigSchema
|
|
19510
|
+
},
|
|
19511
|
+
[PROCESSOR_IDS.TEMPLATE]: {
|
|
19512
|
+
id: PROCESSOR_IDS.TEMPLATE,
|
|
19513
|
+
inputSchema: TemplateInputSchema,
|
|
19514
|
+
outputSchema: TemplateOutputSchema,
|
|
19515
|
+
configSchema: TemplateConfigSchema
|
|
19516
|
+
},
|
|
19517
|
+
[PROCESSOR_IDS.PDF_EMBEDDER]: {
|
|
19518
|
+
id: PROCESSOR_IDS.PDF_EMBEDDER,
|
|
19519
|
+
inputSchema: PdfEmbedderInputSchema,
|
|
19520
|
+
outputSchema: PdfEmbedderOutputSchema,
|
|
19521
|
+
configSchema: PdfEmbedderConfigSchema
|
|
19522
|
+
},
|
|
19523
|
+
[PROCESSOR_IDS.SPLIT]: {
|
|
19524
|
+
id: PROCESSOR_IDS.SPLIT,
|
|
19525
|
+
inputSchema: SplitInputSchema,
|
|
19526
|
+
outputSchema: SplitOutputSchema,
|
|
19527
|
+
configSchema: SplitConfigSchema
|
|
19528
|
+
},
|
|
19529
|
+
[PROCESSOR_IDS.CLASSIFY]: {
|
|
19530
|
+
id: PROCESSOR_IDS.CLASSIFY,
|
|
19531
|
+
inputSchema: ClassifyInputSchema,
|
|
19532
|
+
outputSchema: ClassifyOutputSchema,
|
|
19533
|
+
configSchema: ClassifyConfigSchema
|
|
19534
|
+
},
|
|
19535
|
+
[PROCESSOR_IDS.XLSX_TO_JSON]: {
|
|
19536
|
+
id: PROCESSOR_IDS.XLSX_TO_JSON,
|
|
19537
|
+
inputSchema: XlsxToJsonInputSchema,
|
|
19538
|
+
outputSchema: XlsxToJsonOutputSchema,
|
|
19539
|
+
configSchema: XlsxToJsonConfigSchema
|
|
19540
|
+
}
|
|
19541
|
+
};
|
|
19542
|
+
});
|
|
17085
19543
|
|
|
17086
19544
|
// ../types/src/processor/index.ts
|
|
17087
|
-
var
|
|
19545
|
+
var init_processor2 = __esm(() => {
|
|
19546
|
+
init_processor();
|
|
19547
|
+
init_execution();
|
|
19548
|
+
init_configs();
|
|
19549
|
+
});
|
|
17088
19550
|
|
|
17089
19551
|
// ../types/src/parser/index.ts
|
|
17090
|
-
var
|
|
19552
|
+
var init_parser2 = __esm(() => {
|
|
19553
|
+
init_parser();
|
|
19554
|
+
});
|
|
17091
19555
|
|
|
17092
19556
|
// ../types/src/otel/semantic-conventions.ts
|
|
17093
19557
|
function mapLLMAttributes(attrs) {
|
|
@@ -20407,7 +22871,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
20407
22871
|
});
|
|
20408
22872
|
|
|
20409
22873
|
// ../../node_modules/fast-uri/lib/utils.js
|
|
20410
|
-
var
|
|
22874
|
+
var require_utils3 = __commonJS((exports, module) => {
|
|
20411
22875
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
20412
22876
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
20413
22877
|
function stringArrayToHexStripped(input) {
|
|
@@ -20663,7 +23127,7 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
20663
23127
|
|
|
20664
23128
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
20665
23129
|
var require_schemes = __commonJS((exports, module) => {
|
|
20666
|
-
var { isUUID } =
|
|
23130
|
+
var { isUUID } = require_utils3();
|
|
20667
23131
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
20668
23132
|
var supportedSchemeNames = [
|
|
20669
23133
|
"http",
|
|
@@ -20837,7 +23301,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
20837
23301
|
|
|
20838
23302
|
// ../../node_modules/fast-uri/index.js
|
|
20839
23303
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
20840
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } =
|
|
23304
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils3();
|
|
20841
23305
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
20842
23306
|
function normalize(uri, options) {
|
|
20843
23307
|
if (typeof uri === "string") {
|
|
@@ -23247,7 +25711,7 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
23247
25711
|
});
|
|
23248
25712
|
|
|
23249
25713
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
23250
|
-
var
|
|
25714
|
+
var require_types2 = __commonJS((exports) => {
|
|
23251
25715
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23252
25716
|
exports.DiscrError = undefined;
|
|
23253
25717
|
var DiscrError;
|
|
@@ -23261,7 +25725,7 @@ var require_types = __commonJS((exports) => {
|
|
|
23261
25725
|
var require_discriminator = __commonJS((exports) => {
|
|
23262
25726
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23263
25727
|
var codegen_1 = require_codegen();
|
|
23264
|
-
var types_1 =
|
|
25728
|
+
var types_1 = require_types2();
|
|
23265
25729
|
var compile_1 = require_compile();
|
|
23266
25730
|
var ref_error_1 = require_ref_error();
|
|
23267
25731
|
var util_1 = require_util();
|
|
@@ -24194,24 +26658,6 @@ var init_validation = __esm(() => {
|
|
|
24194
26658
|
init_workspace_schema();
|
|
24195
26659
|
});
|
|
24196
26660
|
|
|
24197
|
-
// ../types/src/core/common.ts
|
|
24198
|
-
function toJsonSchema2(schema) {
|
|
24199
|
-
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
24200
|
-
}
|
|
24201
|
-
var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
|
|
24202
|
-
var init_common = __esm(() => {
|
|
24203
|
-
init_zod();
|
|
24204
|
-
TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
24205
|
-
return typeof val === "string" ? new Date(val) : val;
|
|
24206
|
-
});
|
|
24207
|
-
JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
24208
|
-
BaseEntitySchema2 = exports_external.object({
|
|
24209
|
-
id: exports_external.string(),
|
|
24210
|
-
createdAt: TimestampSchema2.optional(),
|
|
24211
|
-
updatedAt: TimestampSchema2.optional()
|
|
24212
|
-
});
|
|
24213
|
-
});
|
|
24214
|
-
|
|
24215
26661
|
// ../../node_modules/@babel/parser/lib/index.js
|
|
24216
26662
|
var require_lib = __commonJS((exports) => {
|
|
24217
26663
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -24625,12 +27071,12 @@ var require_lib = __commonJS((exports) => {
|
|
|
24625
27071
|
}
|
|
24626
27072
|
const ParseErrorConstructors = {};
|
|
24627
27073
|
for (const reasonCode of Object.keys(argument)) {
|
|
24628
|
-
const
|
|
24629
|
-
const _ref = typeof
|
|
24630
|
-
message: () =>
|
|
24631
|
-
} : typeof
|
|
24632
|
-
message:
|
|
24633
|
-
} :
|
|
27074
|
+
const template2 = argument[reasonCode];
|
|
27075
|
+
const _ref = typeof template2 === "string" ? {
|
|
27076
|
+
message: () => template2
|
|
27077
|
+
} : typeof template2 === "function" ? {
|
|
27078
|
+
message: template2
|
|
27079
|
+
} : template2, {
|
|
24634
27080
|
message
|
|
24635
27081
|
} = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
24636
27082
|
const toMessage = typeof message === "string" ? () => message : message;
|
|
@@ -39103,7 +41549,7 @@ var require_keywords = __commonJS((exports) => {
|
|
|
39103
41549
|
});
|
|
39104
41550
|
|
|
39105
41551
|
// ../../node_modules/sucrase/dist/parser/tokenizer/types.js
|
|
39106
|
-
var
|
|
41552
|
+
var require_types3 = __commonJS((exports) => {
|
|
39107
41553
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39108
41554
|
var TokenType;
|
|
39109
41555
|
(function(TokenType2) {
|
|
@@ -39167,8 +41613,8 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39167
41613
|
TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
|
|
39168
41614
|
const arrow = 22528;
|
|
39169
41615
|
TokenType2[TokenType2["arrow"] = arrow] = "arrow";
|
|
39170
|
-
const
|
|
39171
|
-
TokenType2[TokenType2["template"] =
|
|
41616
|
+
const template2 = 23552;
|
|
41617
|
+
TokenType2[TokenType2["template"] = template2] = "template";
|
|
39172
41618
|
const ellipsis = 24576;
|
|
39173
41619
|
TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
|
|
39174
41620
|
const backQuote = 25600;
|
|
@@ -39587,7 +42033,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39587
42033
|
var require_state = __commonJS((exports) => {
|
|
39588
42034
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39589
42035
|
var _keywords = require_keywords();
|
|
39590
|
-
var _types =
|
|
42036
|
+
var _types = require_types3();
|
|
39591
42037
|
|
|
39592
42038
|
class Scope {
|
|
39593
42039
|
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
|
|
@@ -39973,7 +42419,7 @@ var require_base = __commonJS((exports) => {
|
|
|
39973
42419
|
var require_util2 = __commonJS((exports) => {
|
|
39974
42420
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39975
42421
|
var _index = require_tokenizer();
|
|
39976
|
-
var _types =
|
|
42422
|
+
var _types = require_types3();
|
|
39977
42423
|
var _charcodes = require_charcodes();
|
|
39978
42424
|
var _base = require_base();
|
|
39979
42425
|
function isContextual(contextualKeyword) {
|
|
@@ -40135,7 +42581,7 @@ var require_identifier = __commonJS((exports) => {
|
|
|
40135
42581
|
var require_readWordTree = __commonJS((exports) => {
|
|
40136
42582
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40137
42583
|
var _keywords = require_keywords();
|
|
40138
|
-
var _types =
|
|
42584
|
+
var _types = require_types3();
|
|
40139
42585
|
var READ_WORD_TREE = new Int32Array([
|
|
40140
42586
|
-1,
|
|
40141
42587
|
27,
|
|
@@ -49113,7 +51559,7 @@ var require_readWord = __commonJS((exports) => {
|
|
|
49113
51559
|
var _identifier = require_identifier();
|
|
49114
51560
|
var _index = require_tokenizer();
|
|
49115
51561
|
var _readWordTree = require_readWordTree();
|
|
49116
|
-
var _types =
|
|
51562
|
+
var _types = require_types3();
|
|
49117
51563
|
function readWord() {
|
|
49118
51564
|
let treePos = 0;
|
|
49119
51565
|
let code = 0;
|
|
@@ -49179,7 +51625,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
49179
51625
|
var _keywords = require_keywords();
|
|
49180
51626
|
var _readWord = require_readWord();
|
|
49181
51627
|
var _readWord2 = _interopRequireDefault(_readWord);
|
|
49182
|
-
var _types =
|
|
51628
|
+
var _types = require_types3();
|
|
49183
51629
|
var IdentifierRole;
|
|
49184
51630
|
(function(IdentifierRole2) {
|
|
49185
51631
|
const Access = 0;
|
|
@@ -49896,7 +52342,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
49896
52342
|
// ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
|
|
49897
52343
|
var require_getImportExportSpecifierInfo = __commonJS((exports) => {
|
|
49898
52344
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49899
|
-
var _types =
|
|
52345
|
+
var _types = require_types3();
|
|
49900
52346
|
function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
|
|
49901
52347
|
let endIndex = index + 1;
|
|
49902
52348
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
@@ -50249,7 +52695,7 @@ var require_JSXTransformer = __commonJS((exports) => {
|
|
|
50249
52695
|
var _xhtml = require_xhtml();
|
|
50250
52696
|
var _xhtml2 = _interopRequireDefault(_xhtml);
|
|
50251
52697
|
var _tokenizer = require_tokenizer();
|
|
50252
|
-
var _types =
|
|
52698
|
+
var _types = require_types3();
|
|
50253
52699
|
var _charcodes = require_charcodes();
|
|
50254
52700
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
50255
52701
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -50753,7 +53199,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
|
|
|
50753
53199
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
50754
53200
|
}
|
|
50755
53201
|
var _tokenizer = require_tokenizer();
|
|
50756
|
-
var _types =
|
|
53202
|
+
var _types = require_types3();
|
|
50757
53203
|
var _JSXTransformer = require_JSXTransformer();
|
|
50758
53204
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
50759
53205
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -50792,7 +53238,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
|
|
|
50792
53238
|
}
|
|
50793
53239
|
var _tokenizer = require_tokenizer();
|
|
50794
53240
|
var _keywords = require_keywords();
|
|
50795
|
-
var _types =
|
|
53241
|
+
var _types = require_types3();
|
|
50796
53242
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
50797
53243
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
50798
53244
|
var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
|
|
@@ -52827,7 +55273,7 @@ var require_HelperManager = __commonJS((exports) => {
|
|
|
52827
55273
|
var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
52828
55274
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52829
55275
|
var _tokenizer = require_tokenizer();
|
|
52830
|
-
var _types =
|
|
55276
|
+
var _types = require_types3();
|
|
52831
55277
|
function identifyShadowedGlobals(tokens, scopes, globalNames) {
|
|
52832
55278
|
if (!hasShadowedGlobals(tokens, globalNames)) {
|
|
52833
55279
|
return;
|
|
@@ -52892,7 +55338,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
|
52892
55338
|
// ../../node_modules/sucrase/dist/util/getIdentifierNames.js
|
|
52893
55339
|
var require_getIdentifierNames = __commonJS((exports) => {
|
|
52894
55340
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52895
|
-
var _types =
|
|
55341
|
+
var _types = require_types3();
|
|
52896
55342
|
function getIdentifierNames(code, tokens) {
|
|
52897
55343
|
const names = [];
|
|
52898
55344
|
for (const token of tokens) {
|
|
@@ -53068,7 +55514,7 @@ var require_util3 = __commonJS((exports) => {
|
|
|
53068
55514
|
});
|
|
53069
55515
|
|
|
53070
55516
|
// ../../node_modules/ts-interface-checker/dist/types.js
|
|
53071
|
-
var
|
|
55517
|
+
var require_types4 = __commonJS((exports) => {
|
|
53072
55518
|
var __extends = exports && exports.__extends || function() {
|
|
53073
55519
|
var extendStatics = function(d, b) {
|
|
53074
55520
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -53668,9 +56114,9 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
53668
56114
|
};
|
|
53669
56115
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53670
56116
|
exports.Checker = exports.createCheckers = undefined;
|
|
53671
|
-
var types_1 =
|
|
56117
|
+
var types_1 = require_types4();
|
|
53672
56118
|
var util_1 = require_util3();
|
|
53673
|
-
var types_2 =
|
|
56119
|
+
var types_2 = require_types4();
|
|
53674
56120
|
Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
|
|
53675
56121
|
return types_2.TArray;
|
|
53676
56122
|
} });
|
|
@@ -53952,7 +56398,7 @@ var require_lval = __commonJS((exports) => {
|
|
|
53952
56398
|
var _typescript = require_typescript();
|
|
53953
56399
|
var _index = require_tokenizer();
|
|
53954
56400
|
var _keywords = require_keywords();
|
|
53955
|
-
var _types =
|
|
56401
|
+
var _types = require_types3();
|
|
53956
56402
|
var _base = require_base();
|
|
53957
56403
|
var _expression = require_expression();
|
|
53958
56404
|
var _util = require_util2();
|
|
@@ -54084,7 +56530,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
54084
56530
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54085
56531
|
var _index = require_tokenizer();
|
|
54086
56532
|
var _keywords = require_keywords();
|
|
54087
|
-
var _types =
|
|
56533
|
+
var _types = require_types3();
|
|
54088
56534
|
var _base = require_base();
|
|
54089
56535
|
var _expression = require_expression();
|
|
54090
56536
|
var _lval = require_lval();
|
|
@@ -55346,7 +57792,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
55346
57792
|
var require_jsx = __commonJS((exports) => {
|
|
55347
57793
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55348
57794
|
var _index = require_tokenizer();
|
|
55349
|
-
var _types =
|
|
57795
|
+
var _types = require_types3();
|
|
55350
57796
|
var _base = require_base();
|
|
55351
57797
|
var _expression = require_expression();
|
|
55352
57798
|
var _util = require_util2();
|
|
@@ -55609,10 +58055,10 @@ var require_jsx = __commonJS((exports) => {
|
|
|
55609
58055
|
});
|
|
55610
58056
|
|
|
55611
58057
|
// ../../node_modules/sucrase/dist/parser/plugins/types.js
|
|
55612
|
-
var
|
|
58058
|
+
var require_types5 = __commonJS((exports) => {
|
|
55613
58059
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55614
58060
|
var _index = require_tokenizer();
|
|
55615
|
-
var _types =
|
|
58061
|
+
var _types = require_types3();
|
|
55616
58062
|
var _base = require_base();
|
|
55617
58063
|
var _expression = require_expression();
|
|
55618
58064
|
var _flow = require_flow();
|
|
@@ -55645,12 +58091,12 @@ var require_expression = __commonJS((exports) => {
|
|
|
55645
58091
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55646
58092
|
var _flow = require_flow();
|
|
55647
58093
|
var _index = require_jsx();
|
|
55648
|
-
var _types =
|
|
58094
|
+
var _types = require_types5();
|
|
55649
58095
|
var _typescript = require_typescript();
|
|
55650
58096
|
var _index3 = require_tokenizer();
|
|
55651
58097
|
var _keywords = require_keywords();
|
|
55652
58098
|
var _state = require_state();
|
|
55653
|
-
var _types3 =
|
|
58099
|
+
var _types3 = require_types3();
|
|
55654
58100
|
var _charcodes = require_charcodes();
|
|
55655
58101
|
var _identifier = require_identifier();
|
|
55656
58102
|
var _base = require_base();
|
|
@@ -56366,7 +58812,7 @@ var require_flow = __commonJS((exports) => {
|
|
|
56366
58812
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56367
58813
|
var _index = require_tokenizer();
|
|
56368
58814
|
var _keywords = require_keywords();
|
|
56369
|
-
var _types =
|
|
58815
|
+
var _types = require_types3();
|
|
56370
58816
|
var _base = require_base();
|
|
56371
58817
|
var _expression = require_expression();
|
|
56372
58818
|
var _statement = require_statement();
|
|
@@ -57241,7 +59687,7 @@ var require_statement = __commonJS((exports) => {
|
|
|
57241
59687
|
var _tokenizer = require_tokenizer();
|
|
57242
59688
|
var _keywords = require_keywords();
|
|
57243
59689
|
var _state = require_state();
|
|
57244
|
-
var _types =
|
|
59690
|
+
var _types = require_types3();
|
|
57245
59691
|
var _charcodes = require_charcodes();
|
|
57246
59692
|
var _base = require_base();
|
|
57247
59693
|
var _expression = require_expression();
|
|
@@ -58276,7 +60722,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58276
60722
|
function _interopRequireDefault(obj) {
|
|
58277
60723
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
58278
60724
|
}
|
|
58279
|
-
var _types =
|
|
60725
|
+
var _types = require_types3();
|
|
58280
60726
|
var _isAsyncOperation = require_isAsyncOperation();
|
|
58281
60727
|
var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
|
|
58282
60728
|
|
|
@@ -58534,7 +60980,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58534
60980
|
var require_getClassInfo = __commonJS((exports) => {
|
|
58535
60981
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58536
60982
|
var _keywords = require_keywords();
|
|
58537
|
-
var _types =
|
|
60983
|
+
var _types = require_types3();
|
|
58538
60984
|
function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
|
|
58539
60985
|
const snapshot = tokens.snapshot();
|
|
58540
60986
|
const headerInfo = processClassHeader(tokens);
|
|
@@ -58772,7 +61218,7 @@ var require_getClassInfo = __commonJS((exports) => {
|
|
|
58772
61218
|
// ../../node_modules/sucrase/dist/util/elideImportEquals.js
|
|
58773
61219
|
var require_elideImportEquals = __commonJS((exports) => {
|
|
58774
61220
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58775
|
-
var _types =
|
|
61221
|
+
var _types = require_types3();
|
|
58776
61222
|
function elideImportEquals(tokens) {
|
|
58777
61223
|
tokens.removeInitialToken();
|
|
58778
61224
|
tokens.removeToken();
|
|
@@ -58796,7 +61242,7 @@ var require_elideImportEquals = __commonJS((exports) => {
|
|
|
58796
61242
|
var require_getDeclarationInfo = __commonJS((exports) => {
|
|
58797
61243
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58798
61244
|
var _tokenizer = require_tokenizer();
|
|
58799
|
-
var _types =
|
|
61245
|
+
var _types = require_types3();
|
|
58800
61246
|
var EMPTY_DECLARATION_INFO = {
|
|
58801
61247
|
typeDeclarations: new Set,
|
|
58802
61248
|
valueDeclarations: new Set
|
|
@@ -58824,7 +61270,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
|
|
|
58824
61270
|
var require_isExportFrom = __commonJS((exports) => {
|
|
58825
61271
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58826
61272
|
var _keywords = require_keywords();
|
|
58827
|
-
var _types =
|
|
61273
|
+
var _types = require_types3();
|
|
58828
61274
|
function isExportFrom(tokens) {
|
|
58829
61275
|
let closeBraceIndex = tokens.currentIndex();
|
|
58830
61276
|
while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
|
@@ -58839,7 +61285,7 @@ var require_isExportFrom = __commonJS((exports) => {
|
|
|
58839
61285
|
var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
58840
61286
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58841
61287
|
var _keywords = require_keywords();
|
|
58842
|
-
var _types =
|
|
61288
|
+
var _types = require_types3();
|
|
58843
61289
|
function removeMaybeImportAttributes(tokens) {
|
|
58844
61290
|
if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
|
|
58845
61291
|
tokens.removeToken();
|
|
@@ -58854,7 +61300,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
|
58854
61300
|
// ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
|
|
58855
61301
|
var require_shouldElideDefaultExport = __commonJS((exports) => {
|
|
58856
61302
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58857
|
-
var _types =
|
|
61303
|
+
var _types = require_types3();
|
|
58858
61304
|
function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
|
|
58859
61305
|
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
|
|
58860
61306
|
return false;
|
|
@@ -58885,7 +61331,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
|
|
|
58885
61331
|
}
|
|
58886
61332
|
var _tokenizer = require_tokenizer();
|
|
58887
61333
|
var _keywords = require_keywords();
|
|
58888
|
-
var _types =
|
|
61334
|
+
var _types = require_types3();
|
|
58889
61335
|
var _elideImportEquals = require_elideImportEquals();
|
|
58890
61336
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
58891
61337
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -59527,7 +61973,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
|
|
|
59527
61973
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
59528
61974
|
}
|
|
59529
61975
|
var _keywords = require_keywords();
|
|
59530
|
-
var _types =
|
|
61976
|
+
var _types = require_types3();
|
|
59531
61977
|
var _elideImportEquals = require_elideImportEquals();
|
|
59532
61978
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
59533
61979
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -59797,7 +62243,7 @@ var require_FlowTransformer = __commonJS((exports) => {
|
|
|
59797
62243
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
59798
62244
|
}
|
|
59799
62245
|
var _keywords = require_keywords();
|
|
59800
|
-
var _types =
|
|
62246
|
+
var _types = require_types3();
|
|
59801
62247
|
var _Transformer = require_Transformer();
|
|
59802
62248
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
59803
62249
|
|
|
@@ -59917,7 +62363,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
|
|
|
59917
62363
|
}
|
|
59918
62364
|
return value;
|
|
59919
62365
|
}
|
|
59920
|
-
var _types =
|
|
62366
|
+
var _types = require_types3();
|
|
59921
62367
|
var _Transformer = require_Transformer();
|
|
59922
62368
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
59923
62369
|
var JEST_GLOBAL_NAME = "jest";
|
|
@@ -59991,7 +62437,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
|
|
|
59991
62437
|
function _interopRequireDefault(obj) {
|
|
59992
62438
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
59993
62439
|
}
|
|
59994
|
-
var _types =
|
|
62440
|
+
var _types = require_types3();
|
|
59995
62441
|
var _Transformer = require_Transformer();
|
|
59996
62442
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
59997
62443
|
|
|
@@ -60020,7 +62466,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
|
|
|
60020
62466
|
function _interopRequireDefault(obj) {
|
|
60021
62467
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60022
62468
|
}
|
|
60023
|
-
var _types =
|
|
62469
|
+
var _types = require_types3();
|
|
60024
62470
|
var _Transformer = require_Transformer();
|
|
60025
62471
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60026
62472
|
|
|
@@ -60048,7 +62494,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
|
|
|
60048
62494
|
function _interopRequireDefault(obj) {
|
|
60049
62495
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60050
62496
|
}
|
|
60051
|
-
var _types =
|
|
62497
|
+
var _types = require_types3();
|
|
60052
62498
|
var _Transformer = require_Transformer();
|
|
60053
62499
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60054
62500
|
|
|
@@ -60164,7 +62610,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
|
|
|
60164
62610
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60165
62611
|
}
|
|
60166
62612
|
var _tokenizer = require_tokenizer();
|
|
60167
|
-
var _types =
|
|
62613
|
+
var _types = require_types3();
|
|
60168
62614
|
var _Transformer = require_Transformer();
|
|
60169
62615
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60170
62616
|
|
|
@@ -60415,7 +62861,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
|
|
|
60415
62861
|
function _interopRequireDefault(obj) {
|
|
60416
62862
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60417
62863
|
}
|
|
60418
|
-
var _types =
|
|
62864
|
+
var _types = require_types3();
|
|
60419
62865
|
var _isIdentifier = require_isIdentifier();
|
|
60420
62866
|
var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
|
|
60421
62867
|
var _Transformer = require_Transformer();
|
|
@@ -60561,7 +63007,7 @@ var require_RootTransformer = __commonJS((exports) => {
|
|
|
60561
63007
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60562
63008
|
}
|
|
60563
63009
|
var _keywords = require_keywords();
|
|
60564
|
-
var _types =
|
|
63010
|
+
var _types = require_types3();
|
|
60565
63011
|
var _getClassInfo = require_getClassInfo();
|
|
60566
63012
|
var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
|
|
60567
63013
|
var _CJSImportTransformer = require_CJSImportTransformer();
|
|
@@ -60960,7 +63406,7 @@ var require_formatTokens = __commonJS((exports) => {
|
|
|
60960
63406
|
}
|
|
60961
63407
|
var _linesandcolumns = require_build();
|
|
60962
63408
|
var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
|
|
60963
|
-
var _types =
|
|
63409
|
+
var _types = require_types3();
|
|
60964
63410
|
function formatTokens(code, tokens) {
|
|
60965
63411
|
if (tokens.length === 0) {
|
|
60966
63412
|
return "";
|
|
@@ -61025,7 +63471,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
|
|
|
61025
63471
|
function _interopRequireDefault(obj) {
|
|
61026
63472
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
61027
63473
|
}
|
|
61028
|
-
var _types =
|
|
63474
|
+
var _types = require_types3();
|
|
61029
63475
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
61030
63476
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
61031
63477
|
function getTSImportedNames(tokens) {
|
|
@@ -61410,7 +63856,7 @@ function describeUnsupportedType(nodeType) {
|
|
|
61410
63856
|
function compileTypedScript(opts) {
|
|
61411
63857
|
let ast;
|
|
61412
63858
|
try {
|
|
61413
|
-
ast =
|
|
63859
|
+
ast = import_parser4.parse(opts.source, {
|
|
61414
63860
|
sourceType: "script",
|
|
61415
63861
|
plugins: ["typescript"],
|
|
61416
63862
|
ranges: true
|
|
@@ -61662,9 +64108,9 @@ function stripCommentsAndStrings(s) {
|
|
|
61662
64108
|
out = out.replace(/`(\\.|[^`\\])*`/g, "``");
|
|
61663
64109
|
return out;
|
|
61664
64110
|
}
|
|
61665
|
-
var
|
|
64111
|
+
var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
|
|
61666
64112
|
var init_compile = __esm(() => {
|
|
61667
|
-
|
|
64113
|
+
import_parser4 = __toESM(require_lib(), 1);
|
|
61668
64114
|
import_sucrase = __toESM(require_dist3(), 1);
|
|
61669
64115
|
EVALUATOR_PARAM_NAMES = ["expected", "actual"];
|
|
61670
64116
|
});
|
|
@@ -61878,8 +64324,8 @@ function getAllStepJsonSchemas() {
|
|
|
61878
64324
|
category: def.category,
|
|
61879
64325
|
name: def.name,
|
|
61880
64326
|
description: def.description,
|
|
61881
|
-
configSchema:
|
|
61882
|
-
outputSchema:
|
|
64327
|
+
configSchema: toJsonSchema(def.configSchema),
|
|
64328
|
+
outputSchema: toJsonSchema(def.outputSchema),
|
|
61883
64329
|
configInWith: def.configInWith
|
|
61884
64330
|
}));
|
|
61885
64331
|
}
|
|
@@ -62525,81 +64971,6 @@ var init_actions = __esm(() => {
|
|
|
62525
64971
|
ACTION_TYPES = ActionTypeSchema.options;
|
|
62526
64972
|
});
|
|
62527
64973
|
|
|
62528
|
-
// ../types/src/processor/execution.ts
|
|
62529
|
-
function asTuple(values) {
|
|
62530
|
-
return values;
|
|
62531
|
-
}
|
|
62532
|
-
var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
|
|
62533
|
-
var init_execution = __esm(() => {
|
|
62534
|
-
init_zod();
|
|
62535
|
-
WorkflowExecutionStatusValue2 = {
|
|
62536
|
-
CREATED: "created",
|
|
62537
|
-
PENDING: "pending",
|
|
62538
|
-
RUNNING: "running",
|
|
62539
|
-
WAITING: "waiting",
|
|
62540
|
-
COMPLETED: "completed",
|
|
62541
|
-
FAILED: "failed",
|
|
62542
|
-
CANCELLED: "cancelled"
|
|
62543
|
-
};
|
|
62544
|
-
WorkflowExecutionStatusSchema2 = exports_external.enum([
|
|
62545
|
-
WorkflowExecutionStatusValue2.CREATED,
|
|
62546
|
-
WorkflowExecutionStatusValue2.PENDING,
|
|
62547
|
-
WorkflowExecutionStatusValue2.RUNNING,
|
|
62548
|
-
WorkflowExecutionStatusValue2.WAITING,
|
|
62549
|
-
WorkflowExecutionStatusValue2.COMPLETED,
|
|
62550
|
-
WorkflowExecutionStatusValue2.FAILED,
|
|
62551
|
-
WorkflowExecutionStatusValue2.CANCELLED
|
|
62552
|
-
]);
|
|
62553
|
-
StepExecutionStatusValue2 = {
|
|
62554
|
-
PENDING: "pending",
|
|
62555
|
-
RUNNING: "running",
|
|
62556
|
-
SUCCESS: "success",
|
|
62557
|
-
FAILURE: "failure",
|
|
62558
|
-
WAITING: "waiting",
|
|
62559
|
-
SKIPPED: "skipped"
|
|
62560
|
-
};
|
|
62561
|
-
StepExecutionStatusSchema2 = exports_external.enum([
|
|
62562
|
-
StepExecutionStatusValue2.PENDING,
|
|
62563
|
-
StepExecutionStatusValue2.RUNNING,
|
|
62564
|
-
StepExecutionStatusValue2.SUCCESS,
|
|
62565
|
-
StepExecutionStatusValue2.FAILURE,
|
|
62566
|
-
StepExecutionStatusValue2.WAITING,
|
|
62567
|
-
StepExecutionStatusValue2.SKIPPED
|
|
62568
|
-
]);
|
|
62569
|
-
TriggerTypeValue2 = {
|
|
62570
|
-
MANUAL: "manual",
|
|
62571
|
-
API: "api",
|
|
62572
|
-
WEBHOOK: "webhook",
|
|
62573
|
-
SCHEDULE: "schedule",
|
|
62574
|
-
EMAIL: "email",
|
|
62575
|
-
EVAL: "eval",
|
|
62576
|
-
CLI: "cli"
|
|
62577
|
-
};
|
|
62578
|
-
TriggerTypeSchema2 = exports_external.enum([
|
|
62579
|
-
TriggerTypeValue2.MANUAL,
|
|
62580
|
-
TriggerTypeValue2.API,
|
|
62581
|
-
TriggerTypeValue2.WEBHOOK,
|
|
62582
|
-
TriggerTypeValue2.SCHEDULE,
|
|
62583
|
-
TriggerTypeValue2.EMAIL,
|
|
62584
|
-
TriggerTypeValue2.EVAL,
|
|
62585
|
-
TriggerTypeValue2.CLI
|
|
62586
|
-
]);
|
|
62587
|
-
ExecutionTypeValue2 = {
|
|
62588
|
-
PROD: "prod",
|
|
62589
|
-
EVAL: "eval",
|
|
62590
|
-
PLAYGROUND: "playground"
|
|
62591
|
-
};
|
|
62592
|
-
ExecutionTypeSchema2 = exports_external.enum([
|
|
62593
|
-
ExecutionTypeValue2.PROD,
|
|
62594
|
-
ExecutionTypeValue2.EVAL,
|
|
62595
|
-
ExecutionTypeValue2.PLAYGROUND
|
|
62596
|
-
]);
|
|
62597
|
-
WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
|
|
62598
|
-
STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
|
|
62599
|
-
TRIGGER_TYPES2 = TriggerTypeSchema2.options;
|
|
62600
|
-
EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
|
|
62601
|
-
});
|
|
62602
|
-
|
|
62603
64974
|
// ../types/src/workflow/workflow.ts
|
|
62604
64975
|
function suggestWorkflowName(raw) {
|
|
62605
64976
|
return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
|
|
@@ -62635,11 +65006,11 @@ var init_workflow = __esm(() => {
|
|
|
62635
65006
|
});
|
|
62636
65007
|
ManualTriggerMethodSchema = exports_external.object({
|
|
62637
65008
|
type: exports_external.literal("manual"),
|
|
62638
|
-
inputSchema:
|
|
65009
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
62639
65010
|
});
|
|
62640
65011
|
ApiTriggerMethodSchema = exports_external.object({
|
|
62641
65012
|
type: exports_external.literal("api"),
|
|
62642
|
-
inputSchema:
|
|
65013
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
62643
65014
|
});
|
|
62644
65015
|
EmailTriggerMethodSchema = exports_external.object({
|
|
62645
65016
|
type: exports_external.literal("email"),
|
|
@@ -62678,8 +65049,8 @@ var init_workflow = __esm(() => {
|
|
|
62678
65049
|
yamlContent: exports_external.string(),
|
|
62679
65050
|
definition: WorkflowDefinitionSchema,
|
|
62680
65051
|
isCurrent: exports_external.boolean().default(true),
|
|
62681
|
-
createdAt:
|
|
62682
|
-
updatedAt:
|
|
65052
|
+
createdAt: TimestampSchema,
|
|
65053
|
+
updatedAt: TimestampSchema.optional(),
|
|
62683
65054
|
createdBy: exports_external.string()
|
|
62684
65055
|
});
|
|
62685
65056
|
CreateWorkflowDefinitionSchema = exports_external.object({
|
|
@@ -62861,14 +65232,14 @@ function isFileOutput(value) {
|
|
|
62861
65232
|
function isWorkflowResult(value) {
|
|
62862
65233
|
return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
|
|
62863
65234
|
}
|
|
62864
|
-
var
|
|
65235
|
+
var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
62865
65236
|
var init_execution2 = __esm(() => {
|
|
62866
65237
|
init_zod();
|
|
62867
65238
|
init_common();
|
|
62868
65239
|
init_execution();
|
|
62869
65240
|
init_workflow();
|
|
62870
|
-
|
|
62871
|
-
|
|
65241
|
+
WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
|
|
65242
|
+
StepExecutionStatusSchema2 = StepExecutionStatusSchema;
|
|
62872
65243
|
ScopeEntryTypeSchema = exports_external.enum([
|
|
62873
65244
|
"root",
|
|
62874
65245
|
"if-then",
|
|
@@ -62890,7 +65261,7 @@ var init_execution2 = __esm(() => {
|
|
|
62890
65261
|
ScopeStackSchema = exports_external.array(ScopeEntrySchema);
|
|
62891
65262
|
StepResultSchema = exports_external.object({
|
|
62892
65263
|
output: exports_external.unknown(),
|
|
62893
|
-
status:
|
|
65264
|
+
status: StepExecutionStatusSchema2
|
|
62894
65265
|
});
|
|
62895
65266
|
ExecutionContextSchema = exports_external.object({
|
|
62896
65267
|
input: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
@@ -62918,7 +65289,7 @@ var init_execution2 = __esm(() => {
|
|
|
62918
65289
|
triggerType: exports_external.string(),
|
|
62919
65290
|
triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
|
|
62920
65291
|
overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
|
|
62921
|
-
status:
|
|
65292
|
+
status: WorkflowExecutionStatusSchema2,
|
|
62922
65293
|
scopeStack: ScopeStackSchema,
|
|
62923
65294
|
currentStepIndex: exports_external.number(),
|
|
62924
65295
|
stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
|
|
@@ -62926,15 +65297,15 @@ var init_execution2 = __esm(() => {
|
|
|
62926
65297
|
error: exports_external.string().nullable(),
|
|
62927
65298
|
priority: exports_external.number().default(50),
|
|
62928
65299
|
leaseId: exports_external.string().nullable(),
|
|
62929
|
-
leaseExpiresAt:
|
|
65300
|
+
leaseExpiresAt: TimestampSchema.nullable(),
|
|
62930
65301
|
workerId: exports_external.string().nullable(),
|
|
62931
65302
|
maxRetries: exports_external.number().default(0),
|
|
62932
65303
|
originalExecutionId: exports_external.string().nullable().optional(),
|
|
62933
65304
|
previousExecutionId: exports_external.string().nullable().optional(),
|
|
62934
65305
|
retryNumber: exports_external.number().default(0),
|
|
62935
|
-
createdAt:
|
|
62936
|
-
startedAt:
|
|
62937
|
-
completedAt:
|
|
65306
|
+
createdAt: TimestampSchema,
|
|
65307
|
+
startedAt: TimestampSchema.nullable(),
|
|
65308
|
+
completedAt: TimestampSchema.nullable(),
|
|
62938
65309
|
createdBy: exports_external.string().nullable()
|
|
62939
65310
|
});
|
|
62940
65311
|
StepExecutionSchema = exports_external.object({
|
|
@@ -62951,12 +65322,12 @@ var init_execution2 = __esm(() => {
|
|
|
62951
65322
|
stepAttempt: exports_external.number().default(0),
|
|
62952
65323
|
inputData: exports_external.unknown().nullable(),
|
|
62953
65324
|
outputData: exports_external.unknown().nullable(),
|
|
62954
|
-
status:
|
|
65325
|
+
status: StepExecutionStatusSchema2,
|
|
62955
65326
|
error: exports_external.string().nullable(),
|
|
62956
65327
|
overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
|
|
62957
65328
|
durationMs: exports_external.number().nullable(),
|
|
62958
|
-
startedAt:
|
|
62959
|
-
completedAt:
|
|
65329
|
+
startedAt: TimestampSchema.nullable(),
|
|
65330
|
+
completedAt: TimestampSchema.nullable()
|
|
62960
65331
|
});
|
|
62961
65332
|
ConnectorSchema = exports_external.object({
|
|
62962
65333
|
id: exports_external.string(),
|
|
@@ -62967,8 +65338,8 @@ var init_execution2 = __esm(() => {
|
|
|
62967
65338
|
config: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
62968
65339
|
inputSchema: exports_external.unknown().optional(),
|
|
62969
65340
|
outputSchema: exports_external.unknown().optional(),
|
|
62970
|
-
createdAt:
|
|
62971
|
-
updatedAt:
|
|
65341
|
+
createdAt: TimestampSchema,
|
|
65342
|
+
updatedAt: TimestampSchema.optional(),
|
|
62972
65343
|
createdBy: exports_external.string()
|
|
62973
65344
|
});
|
|
62974
65345
|
WorkflowFileOutputSchema = exports_external.object({
|
|
@@ -64331,6 +66702,66 @@ var init_git_source = __esm(() => {
|
|
|
64331
66702
|
init_secrets();
|
|
64332
66703
|
});
|
|
64333
66704
|
|
|
66705
|
+
// ../types/src/automation/triggers.ts
|
|
66706
|
+
function workflowMethodEnabled(methods, type) {
|
|
66707
|
+
return methods.some((method) => method.type === type);
|
|
66708
|
+
}
|
|
66709
|
+
function triggersFromWorkflowDefinition(definition) {
|
|
66710
|
+
if (definition.kind === "block")
|
|
66711
|
+
return [];
|
|
66712
|
+
const methods = getTriggerMethods(definition);
|
|
66713
|
+
return [
|
|
66714
|
+
{ type: "api", enabled: workflowMethodEnabled(methods, "api") },
|
|
66715
|
+
{ type: "manual", enabled: workflowMethodEnabled(methods, "manual") },
|
|
66716
|
+
{ type: "email", enabled: workflowMethodEnabled(methods, "email") },
|
|
66717
|
+
{ type: "cron", enabled: false }
|
|
66718
|
+
];
|
|
66719
|
+
}
|
|
66720
|
+
function triggersFromGitManifest(triggers) {
|
|
66721
|
+
const emailEnabled = triggers?.email?.enabled ?? (triggers?.email?.aliases?.length ?? 0) > 0;
|
|
66722
|
+
return [
|
|
66723
|
+
{ type: "api", enabled: triggers?.api ?? true },
|
|
66724
|
+
{ type: "email", enabled: emailEnabled },
|
|
66725
|
+
{ type: "manual", enabled: true },
|
|
66726
|
+
{ type: "cron", enabled: false }
|
|
66727
|
+
];
|
|
66728
|
+
}
|
|
66729
|
+
function isAgentEmailExplicitlyDisabled(config2) {
|
|
66730
|
+
if (!config2 || typeof config2 !== "object" || Array.isArray(config2))
|
|
66731
|
+
return false;
|
|
66732
|
+
const triggers = config2.triggers;
|
|
66733
|
+
if (!triggers || typeof triggers !== "object" || Array.isArray(triggers))
|
|
66734
|
+
return false;
|
|
66735
|
+
const email3 = triggers.email;
|
|
66736
|
+
if (!email3 || typeof email3 !== "object" || Array.isArray(email3))
|
|
66737
|
+
return false;
|
|
66738
|
+
if (!("enabled" in email3))
|
|
66739
|
+
return false;
|
|
66740
|
+
return email3.enabled === false;
|
|
66741
|
+
}
|
|
66742
|
+
function triggersFromAgentConfig(input) {
|
|
66743
|
+
const triggers = workflowTriggerConfigSchema.parse(input.config && typeof input.config === "object" && !Array.isArray(input.config) ? input.config.triggers : undefined);
|
|
66744
|
+
const emailEnabled = input.hasActiveEmailAliases && !isAgentEmailExplicitlyDisabled(input.config);
|
|
66745
|
+
return [
|
|
66746
|
+
{ type: "api", enabled: triggers.api.enabled },
|
|
66747
|
+
{
|
|
66748
|
+
type: "email",
|
|
66749
|
+
enabled: emailEnabled
|
|
66750
|
+
},
|
|
66751
|
+
{ type: "manual", enabled: true },
|
|
66752
|
+
{ type: "cron", enabled: false }
|
|
66753
|
+
];
|
|
66754
|
+
}
|
|
66755
|
+
function isAutomationTriggerEnabled(rows, type) {
|
|
66756
|
+
return rows.find((row) => row.type === type)?.enabled ?? false;
|
|
66757
|
+
}
|
|
66758
|
+
var AUTOMATION_TRIGGER_TYPES;
|
|
66759
|
+
var init_triggers = __esm(() => {
|
|
66760
|
+
init_email_trigger();
|
|
66761
|
+
init_workflow();
|
|
66762
|
+
AUTOMATION_TRIGGER_TYPES = ["api", "email", "manual", "cron"];
|
|
66763
|
+
});
|
|
66764
|
+
|
|
64334
66765
|
// ../types/src/api/display-path.ts
|
|
64335
66766
|
function displayApiPath(path) {
|
|
64336
66767
|
return path.replace(/\{([^{}/]+)\}/g, ":$1");
|
|
@@ -64463,11 +66894,11 @@ function walkGrammar(node, parts) {
|
|
|
64463
66894
|
}
|
|
64464
66895
|
return current;
|
|
64465
66896
|
}
|
|
64466
|
-
function normalizeTemplate(
|
|
64467
|
-
return
|
|
66897
|
+
function normalizeTemplate(template2) {
|
|
66898
|
+
return template2.endsWith("/") ? template2.slice(0, -1) : template2;
|
|
64468
66899
|
}
|
|
64469
|
-
function renderTemplate(
|
|
64470
|
-
return normalizeTemplate(
|
|
66900
|
+
function renderTemplate(template2, params) {
|
|
66901
|
+
return normalizeTemplate(template2).split("/").flatMap((part) => {
|
|
64471
66902
|
if (!part.startsWith(":")) {
|
|
64472
66903
|
return [part];
|
|
64473
66904
|
}
|
|
@@ -64482,15 +66913,15 @@ function renderTemplate(template, params) {
|
|
|
64482
66913
|
return [assertSegment(String(name), value)];
|
|
64483
66914
|
});
|
|
64484
66915
|
}
|
|
64485
|
-
function buildS3Path(tenantId,
|
|
66916
|
+
function buildS3Path(tenantId, template2, params) {
|
|
64486
66917
|
const tenant = assertSegment("tenantId", tenantId);
|
|
64487
|
-
const parts = renderTemplate(
|
|
66918
|
+
const parts = renderTemplate(template2, params);
|
|
64488
66919
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
64489
|
-
if (
|
|
64490
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66920
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
66921
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
64491
66922
|
}
|
|
64492
66923
|
const path = ["tenants", tenant, ...parts].join("/");
|
|
64493
|
-
return
|
|
66924
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
64494
66925
|
}
|
|
64495
66926
|
function createBuilder(grammarNode, prefixSegments, boundTenantId) {
|
|
64496
66927
|
const resolveTenantId = (params) => {
|
|
@@ -64500,23 +66931,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
|
|
|
64500
66931
|
}
|
|
64501
66932
|
return assertSegment("tenantId", tenantId);
|
|
64502
66933
|
};
|
|
64503
|
-
const build = (
|
|
66934
|
+
const build = (template2, params) => {
|
|
64504
66935
|
const tenant = resolveTenantId(params);
|
|
64505
|
-
const parts = renderTemplate(
|
|
66936
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
64506
66937
|
const node = walkGrammar(grammarNode, parts);
|
|
64507
|
-
if (
|
|
64508
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66938
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
66939
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
64509
66940
|
}
|
|
64510
66941
|
const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
|
|
64511
|
-
return
|
|
66942
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
64512
66943
|
};
|
|
64513
66944
|
const builder = build;
|
|
64514
|
-
builder.at = (
|
|
66945
|
+
builder.at = (template2, params) => {
|
|
64515
66946
|
const tenant = resolveTenantId(params);
|
|
64516
|
-
const parts = renderTemplate(
|
|
66947
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
64517
66948
|
const nextNode = walkGrammar(grammarNode, parts);
|
|
64518
|
-
if (
|
|
64519
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66949
|
+
if (template2.endsWith("/") && nextNode === PATH_LEAF) {
|
|
66950
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
64520
66951
|
}
|
|
64521
66952
|
return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
|
|
64522
66953
|
};
|
|
@@ -64642,6 +67073,9 @@ __export(exports_src, {
|
|
|
64642
67073
|
validateOutput: () => validateOutput,
|
|
64643
67074
|
validateInput: () => validateInput,
|
|
64644
67075
|
validateConfig: () => validateConfig,
|
|
67076
|
+
triggersFromWorkflowDefinition: () => triggersFromWorkflowDefinition,
|
|
67077
|
+
triggersFromGitManifest: () => triggersFromGitManifest,
|
|
67078
|
+
triggersFromAgentConfig: () => triggersFromAgentConfig,
|
|
64645
67079
|
toJsonSchema: () => toJsonSchema,
|
|
64646
67080
|
suppressRequiredMissingErrorsForSchemaFileFields: () => suppressRequiredMissingErrorsForSchemaFileFields,
|
|
64647
67081
|
suggestWorkflowName: () => suggestWorkflowName,
|
|
@@ -64693,6 +67127,8 @@ __export(exports_src, {
|
|
|
64693
67127
|
isLocalAgentResourcePath: () => isLocalAgentResourcePath,
|
|
64694
67128
|
isFilePathDescriptor: () => isFilePathDescriptor,
|
|
64695
67129
|
isFileOutput: () => isFileOutput,
|
|
67130
|
+
isAutomationTriggerEnabled: () => isAutomationTriggerEnabled,
|
|
67131
|
+
isAgentEmailExplicitlyDisabled: () => isAgentEmailExplicitlyDisabled,
|
|
64696
67132
|
hasTriggerMethod: () => hasTriggerMethod,
|
|
64697
67133
|
goldenFileSatisfiedInResult: () => goldenFileSatisfiedInResult,
|
|
64698
67134
|
getTriggerMethods: () => getTriggerMethods,
|
|
@@ -64812,7 +67248,7 @@ __export(exports_src, {
|
|
|
64812
67248
|
SplitConfigSchema: () => SplitConfigSchema,
|
|
64813
67249
|
SpanTypes: () => SpanTypes,
|
|
64814
67250
|
SpanKindMap: () => SpanKindMap,
|
|
64815
|
-
SpanKind: () => SpanKind,
|
|
67251
|
+
SpanKind: () => import_api.SpanKind,
|
|
64816
67252
|
SourceVersionRefSchema: () => SourceVersionRefSchema,
|
|
64817
67253
|
SourceSecretsFileSchema: () => SourceSecretsFileSchema,
|
|
64818
67254
|
SourcePackageTypeSchema: () => SourcePackageTypeSchema,
|
|
@@ -65008,13 +67444,14 @@ __export(exports_src, {
|
|
|
65008
67444
|
ActionInvokeWorkflowConfigSchema: () => ActionInvokeWorkflowConfigSchema,
|
|
65009
67445
|
ActionHttpOutputSchema: () => ActionHttpOutputSchema,
|
|
65010
67446
|
ActionHttpConfigSchema: () => ActionHttpConfigSchema,
|
|
67447
|
+
AUTOMATION_TRIGGER_TYPES: () => AUTOMATION_TRIGGER_TYPES,
|
|
65011
67448
|
AIStepSchema: () => AIStepSchema,
|
|
65012
67449
|
ACTION_TYPES: () => ACTION_TYPES
|
|
65013
67450
|
});
|
|
65014
67451
|
var init_src = __esm(() => {
|
|
65015
67452
|
init_core3();
|
|
65016
|
-
|
|
65017
|
-
|
|
67453
|
+
init_processor2();
|
|
67454
|
+
init_parser2();
|
|
65018
67455
|
init_otel();
|
|
65019
67456
|
init_execution_row();
|
|
65020
67457
|
init_run_expand();
|
|
@@ -65024,6 +67461,7 @@ var init_src = __esm(() => {
|
|
|
65024
67461
|
init_workflow2();
|
|
65025
67462
|
init_eval();
|
|
65026
67463
|
init_git_source();
|
|
67464
|
+
init_triggers();
|
|
65027
67465
|
init_typed_script();
|
|
65028
67466
|
});
|
|
65029
67467
|
|
|
@@ -65925,7 +68363,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
65925
68363
|
else
|
|
65926
68364
|
end = lineWidth - indentAtStart;
|
|
65927
68365
|
}
|
|
65928
|
-
let
|
|
68366
|
+
let split2 = undefined;
|
|
65929
68367
|
let prev = undefined;
|
|
65930
68368
|
let overflow = false;
|
|
65931
68369
|
let i = -1;
|
|
@@ -65959,20 +68397,20 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
65959
68397
|
if (mode === FOLD_BLOCK)
|
|
65960
68398
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
65961
68399
|
end = i + indent.length + endStep;
|
|
65962
|
-
|
|
68400
|
+
split2 = undefined;
|
|
65963
68401
|
} else {
|
|
65964
68402
|
if (ch === " " && prev && prev !== " " && prev !== `
|
|
65965
68403
|
` && prev !== "\t") {
|
|
65966
68404
|
const next = text[i + 1];
|
|
65967
68405
|
if (next && next !== " " && next !== `
|
|
65968
68406
|
` && next !== "\t")
|
|
65969
|
-
|
|
68407
|
+
split2 = i;
|
|
65970
68408
|
}
|
|
65971
68409
|
if (i >= end) {
|
|
65972
|
-
if (
|
|
65973
|
-
folds.push(
|
|
65974
|
-
end =
|
|
65975
|
-
|
|
68410
|
+
if (split2) {
|
|
68411
|
+
folds.push(split2);
|
|
68412
|
+
end = split2 + endStep;
|
|
68413
|
+
split2 = undefined;
|
|
65976
68414
|
} else if (mode === FOLD_QUOTED) {
|
|
65977
68415
|
while (prev === " " || prev === "\t") {
|
|
65978
68416
|
prev = ch;
|
|
@@ -65985,7 +68423,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
65985
68423
|
folds.push(j);
|
|
65986
68424
|
escapedFolds[j] = true;
|
|
65987
68425
|
end = j + endStep;
|
|
65988
|
-
|
|
68426
|
+
split2 = undefined;
|
|
65989
68427
|
} else {
|
|
65990
68428
|
overflow = true;
|
|
65991
68429
|
}
|
|
@@ -66619,7 +69057,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
66619
69057
|
var identity = require_identity();
|
|
66620
69058
|
var Scalar = require_Scalar();
|
|
66621
69059
|
var MERGE_KEY = "<<";
|
|
66622
|
-
var
|
|
69060
|
+
var merge3 = {
|
|
66623
69061
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
66624
69062
|
default: "key",
|
|
66625
69063
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -66629,7 +69067,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
66629
69067
|
}),
|
|
66630
69068
|
stringify: () => MERGE_KEY
|
|
66631
69069
|
};
|
|
66632
|
-
var isMergeKey = (ctx, key) => (
|
|
69070
|
+
var isMergeKey = (ctx, key) => (merge3.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge3.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
|
66633
69071
|
function addMergeToJSMap(ctx, map2, value) {
|
|
66634
69072
|
const source = resolveAliasValue(ctx, value);
|
|
66635
69073
|
if (identity.isSeq(source))
|
|
@@ -66668,21 +69106,21 @@ var require_merge = __commonJS((exports) => {
|
|
|
66668
69106
|
}
|
|
66669
69107
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
66670
69108
|
exports.isMergeKey = isMergeKey;
|
|
66671
|
-
exports.merge =
|
|
69109
|
+
exports.merge = merge3;
|
|
66672
69110
|
});
|
|
66673
69111
|
|
|
66674
69112
|
// node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
66675
69113
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
66676
69114
|
var log = require_log();
|
|
66677
|
-
var
|
|
69115
|
+
var merge3 = require_merge();
|
|
66678
69116
|
var stringify = require_stringify();
|
|
66679
69117
|
var identity = require_identity();
|
|
66680
69118
|
var toJS = require_toJS();
|
|
66681
69119
|
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
66682
69120
|
if (identity.isNode(key) && key.addToJSMap)
|
|
66683
69121
|
key.addToJSMap(ctx, map2, value);
|
|
66684
|
-
else if (
|
|
66685
|
-
|
|
69122
|
+
else if (merge3.isMergeKey(ctx, key))
|
|
69123
|
+
merge3.addMergeToJSMap(ctx, map2, value);
|
|
66686
69124
|
else {
|
|
66687
69125
|
const jsKey = toJS.toJS(key, "", ctx);
|
|
66688
69126
|
if (map2 instanceof Map) {
|
|
@@ -67958,7 +70396,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
67958
70396
|
var bool = require_bool2();
|
|
67959
70397
|
var float = require_float2();
|
|
67960
70398
|
var int2 = require_int2();
|
|
67961
|
-
var
|
|
70399
|
+
var merge3 = require_merge();
|
|
67962
70400
|
var omap = require_omap();
|
|
67963
70401
|
var pairs = require_pairs();
|
|
67964
70402
|
var set2 = require_set();
|
|
@@ -67978,7 +70416,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
67978
70416
|
float.floatExp,
|
|
67979
70417
|
float.float,
|
|
67980
70418
|
binary.binary,
|
|
67981
|
-
|
|
70419
|
+
merge3.merge,
|
|
67982
70420
|
omap.omap,
|
|
67983
70421
|
pairs.pairs,
|
|
67984
70422
|
set2.set,
|
|
@@ -68001,7 +70439,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
68001
70439
|
var schema = require_schema();
|
|
68002
70440
|
var schema$1 = require_schema2();
|
|
68003
70441
|
var binary = require_binary();
|
|
68004
|
-
var
|
|
70442
|
+
var merge3 = require_merge();
|
|
68005
70443
|
var omap = require_omap();
|
|
68006
70444
|
var pairs = require_pairs();
|
|
68007
70445
|
var schema$2 = require_schema3();
|
|
@@ -68026,7 +70464,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
68026
70464
|
intOct: int2.intOct,
|
|
68027
70465
|
intTime: timestamp.intTime,
|
|
68028
70466
|
map: map2.map,
|
|
68029
|
-
merge:
|
|
70467
|
+
merge: merge3.merge,
|
|
68030
70468
|
null: _null4.nullTag,
|
|
68031
70469
|
omap: omap.omap,
|
|
68032
70470
|
pairs: pairs.pairs,
|
|
@@ -68036,7 +70474,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
68036
70474
|
};
|
|
68037
70475
|
var coreKnownTags = {
|
|
68038
70476
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
68039
|
-
"tag:yaml.org,2002:merge":
|
|
70477
|
+
"tag:yaml.org,2002:merge": merge3.merge,
|
|
68040
70478
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
68041
70479
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
68042
70480
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -68045,7 +70483,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
68045
70483
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
68046
70484
|
const schemaTags = schemas3.get(schemaName);
|
|
68047
70485
|
if (schemaTags && !customTags) {
|
|
68048
|
-
return addMergeTag && !schemaTags.includes(
|
|
70486
|
+
return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
|
|
68049
70487
|
}
|
|
68050
70488
|
let tags = schemaTags;
|
|
68051
70489
|
if (!tags) {
|
|
@@ -68063,7 +70501,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
68063
70501
|
tags = customTags(tags.slice());
|
|
68064
70502
|
}
|
|
68065
70503
|
if (addMergeTag)
|
|
68066
|
-
tags = tags.concat(
|
|
70504
|
+
tags = tags.concat(merge3.merge);
|
|
68067
70505
|
return tags.reduce((tags2, tag) => {
|
|
68068
70506
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
68069
70507
|
if (!tagObj) {
|
|
@@ -68090,11 +70528,11 @@ var require_Schema = __commonJS((exports) => {
|
|
|
68090
70528
|
var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
68091
70529
|
|
|
68092
70530
|
class Schema {
|
|
68093
|
-
constructor({ compat: compat2, customTags, merge:
|
|
70531
|
+
constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
68094
70532
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
68095
70533
|
this.name = typeof schema === "string" && schema || "core";
|
|
68096
70534
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
68097
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
70535
|
+
this.tags = tags.getTags(customTags, this.name, merge3);
|
|
68098
70536
|
this.toStringOptions = toStringDefaults ?? null;
|
|
68099
70537
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
68100
70538
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -69317,13 +71755,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
69317
71755
|
return { mode, indent, chomp, comment, length };
|
|
69318
71756
|
}
|
|
69319
71757
|
function splitLines(source) {
|
|
69320
|
-
const
|
|
69321
|
-
const first =
|
|
71758
|
+
const split2 = source.split(/\n( *)/);
|
|
71759
|
+
const first = split2[0];
|
|
69322
71760
|
const m = first.match(/^( *)/);
|
|
69323
71761
|
const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
|
|
69324
71762
|
const lines = [line0];
|
|
69325
|
-
for (let i = 1;i <
|
|
69326
|
-
lines.push([
|
|
71763
|
+
for (let i = 1;i < split2.length; i += 2)
|
|
71764
|
+
lines.push([split2[i], split2[i + 1]]);
|
|
69327
71765
|
return lines;
|
|
69328
71766
|
}
|
|
69329
71767
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -72337,7 +74775,7 @@ var init_main = __esm(() => {
|
|
|
72337
74775
|
});
|
|
72338
74776
|
|
|
72339
74777
|
// ../../node_modules/sisteransi/src/index.js
|
|
72340
|
-
var
|
|
74778
|
+
var require_src2 = __commonJS((exports, module) => {
|
|
72341
74779
|
var ESC2 = "\x1B";
|
|
72342
74780
|
var CSI2 = `${ESC2}[`;
|
|
72343
74781
|
var beep = "\x07";
|
|
@@ -72680,7 +75118,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
|
|
|
72680
75118
|
}, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
|
|
72681
75119
|
var init_dist3 = __esm(() => {
|
|
72682
75120
|
init_main();
|
|
72683
|
-
import_sisteransi = __toESM(
|
|
75121
|
+
import_sisteransi = __toESM(require_src2(), 1);
|
|
72684
75122
|
G = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
72685
75123
|
K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
72686
75124
|
h = { actions: new Set(G), aliases: new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["\x03", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...K], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t) => `There are only ${r} days in ${t}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
|
|
@@ -74023,7 +76461,7 @@ var init_dist4 = __esm(() => {
|
|
|
74023
76461
|
init_dist3();
|
|
74024
76462
|
init_main();
|
|
74025
76463
|
init_dist2();
|
|
74026
|
-
import_sisteransi2 = __toESM(
|
|
76464
|
+
import_sisteransi2 = __toESM(require_src2(), 1);
|
|
74027
76465
|
tt2 = te();
|
|
74028
76466
|
_t = w2("◆", "*");
|
|
74029
76467
|
ot2 = w2("■", "x");
|
|
@@ -167515,7 +169953,7 @@ var require2, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
|
|
|
167515
169953
|
__defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
167516
169954
|
}
|
|
167517
169955
|
return to5;
|
|
167518
|
-
}, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target, mod)), require_array, require_errno, require_fs, require_path, require_is_extglob, require_is_glob, require_glob_parent,
|
|
169956
|
+
}, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target, mod)), require_array, require_errno, require_fs, require_path, require_is_extglob, require_is_glob, require_glob_parent, require_utils4, require_stringify2, require_is_number, require_to_regex_range, require_fill_range, require_compile2, require_expand, require_constants, require_parse, require_braces, require_constants2, require_utils22, require_scan, require_parse2, require_picomatch, require_picomatch2, require_micromatch, require_pattern2, require_merge2, require_stream, require_string2, require_utils32, require_tasks, require_async, require_sync, require_fs2, require_settings, require_out, require_queue_microtask, require_run_parallel, require_constants3, require_fs3, require_utils42, require_common, require_async2, require_sync2, require_fs4, require_settings2, require_out2, require_reusify, require_queue, require_common2, require_reader, require_async3, require_async4, require_stream2, require_sync3, require_sync4, require_settings3, require_out3, require_reader2, require_stream3, require_async5, require_matcher, require_partial, require_deep, require_entry, require_error2, require_entry2, require_provider, require_async6, require_stream4, require_sync5, require_sync6, require_settings4, require_out4, require_picocolors2, require_debug, require_constants4, require_re, require_parse_options, require_identifiers, require_semver2, require_compare, require_gte, require_pseudomap, require_map2, require_yallist, require_lru_cache, require_sigmund, require_fnmatch, require_ini, require_package, require_src3, require_js_tokens, require_readlines, require_ignore, index_exports, Diff = class {
|
|
167519
169957
|
diff(oldStr, newStr, options8 = {}) {
|
|
167520
169958
|
let callback;
|
|
167521
169959
|
if (typeof options8 === "function") {
|
|
@@ -168537,7 +170975,7 @@ var init_prettier = __esm(() => {
|
|
|
168537
170975
|
};
|
|
168538
170976
|
}
|
|
168539
170977
|
});
|
|
168540
|
-
|
|
170978
|
+
require_utils4 = __commonJS2({
|
|
168541
170979
|
"node_modules/braces/lib/utils.js"(exports) {
|
|
168542
170980
|
exports.isInteger = (num) => {
|
|
168543
170981
|
if (typeof num === "number") {
|
|
@@ -168626,7 +171064,7 @@ var init_prettier = __esm(() => {
|
|
|
168626
171064
|
});
|
|
168627
171065
|
require_stringify2 = __commonJS2({
|
|
168628
171066
|
"node_modules/braces/lib/stringify.js"(exports, module) {
|
|
168629
|
-
var utils2 =
|
|
171067
|
+
var utils2 = require_utils4();
|
|
168630
171068
|
module.exports = (ast, options8 = {}) => {
|
|
168631
171069
|
const stringify2 = (node, parent = {}) => {
|
|
168632
171070
|
const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
|
|
@@ -169080,7 +171518,7 @@ var init_prettier = __esm(() => {
|
|
|
169080
171518
|
require_compile2 = __commonJS2({
|
|
169081
171519
|
"node_modules/braces/lib/compile.js"(exports, module) {
|
|
169082
171520
|
var fill2 = require_fill_range();
|
|
169083
|
-
var utils2 =
|
|
171521
|
+
var utils2 = require_utils4();
|
|
169084
171522
|
var compile = (ast, options8 = {}) => {
|
|
169085
171523
|
const walk2 = (node, parent = {}) => {
|
|
169086
171524
|
const invalidBlock = utils2.isInvalidBrace(parent);
|
|
@@ -169130,7 +171568,7 @@ var init_prettier = __esm(() => {
|
|
|
169130
171568
|
"node_modules/braces/lib/expand.js"(exports, module) {
|
|
169131
171569
|
var fill2 = require_fill_range();
|
|
169132
171570
|
var stringify2 = require_stringify2();
|
|
169133
|
-
var utils2 =
|
|
171571
|
+
var utils2 = require_utils4();
|
|
169134
171572
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
169135
171573
|
const result = [];
|
|
169136
171574
|
queue = [].concat(queue);
|
|
@@ -171329,8 +173767,8 @@ var init_prettier = __esm(() => {
|
|
|
171329
173767
|
var Stream = __require2("stream");
|
|
171330
173768
|
var PassThrough = Stream.PassThrough;
|
|
171331
173769
|
var slice = Array.prototype.slice;
|
|
171332
|
-
module.exports =
|
|
171333
|
-
function
|
|
173770
|
+
module.exports = merge22;
|
|
173771
|
+
function merge22() {
|
|
171334
173772
|
const streamsQueue = [];
|
|
171335
173773
|
const args = slice.call(arguments);
|
|
171336
173774
|
let merging = false;
|
|
@@ -171444,9 +173882,9 @@ var init_prettier = __esm(() => {
|
|
|
171444
173882
|
"node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
171445
173883
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
171446
173884
|
exports.merge = undefined;
|
|
171447
|
-
var
|
|
173885
|
+
var merge22 = require_merge2();
|
|
171448
173886
|
function merge3(streams) {
|
|
171449
|
-
const mergedStream =
|
|
173887
|
+
const mergedStream = merge22(streams);
|
|
171450
173888
|
streams.forEach((stream) => {
|
|
171451
173889
|
stream.once("error", (error52) => mergedStream.emit("error", error52));
|
|
171452
173890
|
});
|
|
@@ -171474,7 +173912,7 @@ var init_prettier = __esm(() => {
|
|
|
171474
173912
|
exports.isEmpty = isEmpty;
|
|
171475
173913
|
}
|
|
171476
173914
|
});
|
|
171477
|
-
|
|
173915
|
+
require_utils32 = __commonJS2({
|
|
171478
173916
|
"node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
171479
173917
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
171480
173918
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
@@ -171498,7 +173936,7 @@ var init_prettier = __esm(() => {
|
|
|
171498
173936
|
"node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
171499
173937
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
171500
173938
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
171501
|
-
var utils2 =
|
|
173939
|
+
var utils2 = require_utils32();
|
|
171502
173940
|
function generate(input, settings) {
|
|
171503
173941
|
const patterns = processPatterns(input, settings);
|
|
171504
173942
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -171807,7 +174245,7 @@ var init_prettier = __esm(() => {
|
|
|
171807
174245
|
exports.createDirentFromStats = createDirentFromStats;
|
|
171808
174246
|
}
|
|
171809
174247
|
});
|
|
171810
|
-
|
|
174248
|
+
require_utils42 = __commonJS2({
|
|
171811
174249
|
"node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
171812
174250
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
171813
174251
|
exports.fs = undefined;
|
|
@@ -171835,7 +174273,7 @@ var init_prettier = __esm(() => {
|
|
|
171835
174273
|
var fsStat = require_out();
|
|
171836
174274
|
var rpl = require_run_parallel();
|
|
171837
174275
|
var constants_1 = require_constants3();
|
|
171838
|
-
var utils2 =
|
|
174276
|
+
var utils2 = require_utils42();
|
|
171839
174277
|
var common = require_common();
|
|
171840
174278
|
function read3(directory, settings, callback) {
|
|
171841
174279
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -171941,7 +174379,7 @@ var init_prettier = __esm(() => {
|
|
|
171941
174379
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
171942
174380
|
var fsStat = require_out();
|
|
171943
174381
|
var constants_1 = require_constants3();
|
|
171944
|
-
var utils2 =
|
|
174382
|
+
var utils2 = require_utils42();
|
|
171945
174383
|
var common = require_common();
|
|
171946
174384
|
function read3(directory, settings) {
|
|
171947
174385
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -172721,7 +175159,7 @@ var init_prettier = __esm(() => {
|
|
|
172721
175159
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
172722
175160
|
var path15 = __require2("path");
|
|
172723
175161
|
var fsStat = require_out();
|
|
172724
|
-
var utils2 =
|
|
175162
|
+
var utils2 = require_utils32();
|
|
172725
175163
|
var Reader = class {
|
|
172726
175164
|
constructor(_settings) {
|
|
172727
175165
|
this._settings = _settings;
|
|
@@ -172845,7 +175283,7 @@ var init_prettier = __esm(() => {
|
|
|
172845
175283
|
require_matcher = __commonJS2({
|
|
172846
175284
|
"node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
172847
175285
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
172848
|
-
var utils2 =
|
|
175286
|
+
var utils2 = require_utils32();
|
|
172849
175287
|
var Matcher = class {
|
|
172850
175288
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
172851
175289
|
this._patterns = _patterns;
|
|
@@ -172927,7 +175365,7 @@ var init_prettier = __esm(() => {
|
|
|
172927
175365
|
require_deep = __commonJS2({
|
|
172928
175366
|
"node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
172929
175367
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
172930
|
-
var utils2 =
|
|
175368
|
+
var utils2 = require_utils32();
|
|
172931
175369
|
var partial_1 = require_partial();
|
|
172932
175370
|
var DeepFilter = class {
|
|
172933
175371
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -172989,7 +175427,7 @@ var init_prettier = __esm(() => {
|
|
|
172989
175427
|
require_entry = __commonJS2({
|
|
172990
175428
|
"node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
172991
175429
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
172992
|
-
var utils2 =
|
|
175430
|
+
var utils2 = require_utils32();
|
|
172993
175431
|
var EntryFilter = class {
|
|
172994
175432
|
constructor(_settings, _micromatchOptions) {
|
|
172995
175433
|
this._settings = _settings;
|
|
@@ -173074,7 +175512,7 @@ var init_prettier = __esm(() => {
|
|
|
173074
175512
|
require_error2 = __commonJS2({
|
|
173075
175513
|
"node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
173076
175514
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173077
|
-
var utils2 =
|
|
175515
|
+
var utils2 = require_utils32();
|
|
173078
175516
|
var ErrorFilter = class {
|
|
173079
175517
|
constructor(_settings) {
|
|
173080
175518
|
this._settings = _settings;
|
|
@@ -173092,7 +175530,7 @@ var init_prettier = __esm(() => {
|
|
|
173092
175530
|
require_entry2 = __commonJS2({
|
|
173093
175531
|
"node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
173094
175532
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173095
|
-
var utils2 =
|
|
175533
|
+
var utils2 = require_utils32();
|
|
173096
175534
|
var EntryTransformer = class {
|
|
173097
175535
|
constructor(_settings) {
|
|
173098
175536
|
this._settings = _settings;
|
|
@@ -173360,7 +175798,7 @@ var init_prettier = __esm(() => {
|
|
|
173360
175798
|
var stream_1 = require_stream4();
|
|
173361
175799
|
var sync_1 = require_sync6();
|
|
173362
175800
|
var settings_1 = require_settings4();
|
|
173363
|
-
var utils2 =
|
|
175801
|
+
var utils2 = require_utils32();
|
|
173364
175802
|
async function FastGlob(source2, options8) {
|
|
173365
175803
|
assertPatternsInput(source2);
|
|
173366
175804
|
const works = getWorks(source2, async_1.default, options8);
|
|
@@ -173678,7 +176116,7 @@ var init_prettier = __esm(() => {
|
|
|
173678
176116
|
};
|
|
173679
176117
|
}
|
|
173680
176118
|
});
|
|
173681
|
-
|
|
176119
|
+
require_semver2 = __commonJS2({
|
|
173682
176120
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
173683
176121
|
var debug = require_debug();
|
|
173684
176122
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
|
|
@@ -173948,7 +176386,7 @@ var init_prettier = __esm(() => {
|
|
|
173948
176386
|
});
|
|
173949
176387
|
require_compare = __commonJS2({
|
|
173950
176388
|
"node_modules/semver/functions/compare.js"(exports, module) {
|
|
173951
|
-
var SemVer =
|
|
176389
|
+
var SemVer = require_semver2();
|
|
173952
176390
|
var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
|
|
173953
176391
|
module.exports = compare;
|
|
173954
176392
|
}
|
|
@@ -175681,7 +178119,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
175681
178119
|
};
|
|
175682
178120
|
}
|
|
175683
178121
|
});
|
|
175684
|
-
|
|
178122
|
+
require_src3 = __commonJS2({
|
|
175685
178123
|
"node_modules/editorconfig/src/index.js"(exports) {
|
|
175686
178124
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
175687
178125
|
return new (P9 || (P9 = Promise))(function(resolve32, reject) {
|
|
@@ -177144,7 +179582,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
177144
179582
|
mockable_default = mockable.mocked;
|
|
177145
179583
|
import_micromatch = __toESM2(require_micromatch(), 1);
|
|
177146
179584
|
partition_default = partition2;
|
|
177147
|
-
import_editorconfig = __toESM2(
|
|
179585
|
+
import_editorconfig = __toESM2(require_src3(), 1);
|
|
177148
179586
|
iterate_directory_up_default = iterateDirectoryUp;
|
|
177149
179587
|
FileSearcher = class extends Searcher {
|
|
177150
179588
|
findInDirectory = findFile;
|
|
@@ -180615,7 +183053,7 @@ var require_foldFlowLines2 = __commonJS((exports) => {
|
|
|
180615
183053
|
else
|
|
180616
183054
|
end = lineWidth - indentAtStart;
|
|
180617
183055
|
}
|
|
180618
|
-
let
|
|
183056
|
+
let split2 = undefined;
|
|
180619
183057
|
let prev = undefined;
|
|
180620
183058
|
let overflow = false;
|
|
180621
183059
|
let i5 = -1;
|
|
@@ -180649,20 +183087,20 @@ var require_foldFlowLines2 = __commonJS((exports) => {
|
|
|
180649
183087
|
if (mode === FOLD_BLOCK)
|
|
180650
183088
|
i5 = consumeMoreIndentedLines(text, i5, indent3.length);
|
|
180651
183089
|
end = i5 + indent3.length + endStep;
|
|
180652
|
-
|
|
183090
|
+
split2 = undefined;
|
|
180653
183091
|
} else {
|
|
180654
183092
|
if (ch2 === " " && prev && prev !== " " && prev !== `
|
|
180655
183093
|
` && prev !== "\t") {
|
|
180656
183094
|
const next = text[i5 + 1];
|
|
180657
183095
|
if (next && next !== " " && next !== `
|
|
180658
183096
|
` && next !== "\t")
|
|
180659
|
-
|
|
183097
|
+
split2 = i5;
|
|
180660
183098
|
}
|
|
180661
183099
|
if (i5 >= end) {
|
|
180662
|
-
if (
|
|
180663
|
-
folds.push(
|
|
180664
|
-
end =
|
|
180665
|
-
|
|
183100
|
+
if (split2) {
|
|
183101
|
+
folds.push(split2);
|
|
183102
|
+
end = split2 + endStep;
|
|
183103
|
+
split2 = undefined;
|
|
180666
183104
|
} else if (mode === FOLD_QUOTED) {
|
|
180667
183105
|
while (prev === " " || prev === "\t") {
|
|
180668
183106
|
prev = ch2;
|
|
@@ -180675,7 +183113,7 @@ var require_foldFlowLines2 = __commonJS((exports) => {
|
|
|
180675
183113
|
folds.push(j11);
|
|
180676
183114
|
escapedFolds[j11] = true;
|
|
180677
183115
|
end = j11 + endStep;
|
|
180678
|
-
|
|
183116
|
+
split2 = undefined;
|
|
180679
183117
|
} else {
|
|
180680
183118
|
overflow = true;
|
|
180681
183119
|
}
|
|
@@ -181309,7 +183747,7 @@ var require_merge3 = __commonJS((exports) => {
|
|
|
181309
183747
|
var identity = require_identity2();
|
|
181310
183748
|
var Scalar = require_Scalar2();
|
|
181311
183749
|
var MERGE_KEY = "<<";
|
|
181312
|
-
var
|
|
183750
|
+
var merge3 = {
|
|
181313
183751
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
181314
183752
|
default: "key",
|
|
181315
183753
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -181319,7 +183757,7 @@ var require_merge3 = __commonJS((exports) => {
|
|
|
181319
183757
|
}),
|
|
181320
183758
|
stringify: () => MERGE_KEY
|
|
181321
183759
|
};
|
|
181322
|
-
var isMergeKey = (ctx, key2) => (
|
|
183760
|
+
var isMergeKey = (ctx, key2) => (merge3.identify(key2) || identity.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge3.identify(key2.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
|
181323
183761
|
function addMergeToJSMap(ctx, map2, value) {
|
|
181324
183762
|
const source2 = resolveAliasValue(ctx, value);
|
|
181325
183763
|
if (identity.isSeq(source2))
|
|
@@ -181358,21 +183796,21 @@ var require_merge3 = __commonJS((exports) => {
|
|
|
181358
183796
|
}
|
|
181359
183797
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
181360
183798
|
exports.isMergeKey = isMergeKey;
|
|
181361
|
-
exports.merge =
|
|
183799
|
+
exports.merge = merge3;
|
|
181362
183800
|
});
|
|
181363
183801
|
|
|
181364
183802
|
// ../workflow-yaml/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
181365
183803
|
var require_addPairToJSMap2 = __commonJS((exports) => {
|
|
181366
183804
|
var log = require_log2();
|
|
181367
|
-
var
|
|
183805
|
+
var merge3 = require_merge3();
|
|
181368
183806
|
var stringify = require_stringify3();
|
|
181369
183807
|
var identity = require_identity2();
|
|
181370
183808
|
var toJS = require_toJS2();
|
|
181371
183809
|
function addPairToJSMap(ctx, map2, { key: key2, value }) {
|
|
181372
183810
|
if (identity.isNode(key2) && key2.addToJSMap)
|
|
181373
183811
|
key2.addToJSMap(ctx, map2, value);
|
|
181374
|
-
else if (
|
|
181375
|
-
|
|
183812
|
+
else if (merge3.isMergeKey(ctx, key2))
|
|
183813
|
+
merge3.addMergeToJSMap(ctx, map2, value);
|
|
181376
183814
|
else {
|
|
181377
183815
|
const jsKey = toJS.toJS(key2, "", ctx);
|
|
181378
183816
|
if (map2 instanceof Map) {
|
|
@@ -182648,7 +185086,7 @@ var require_schema6 = __commonJS((exports) => {
|
|
|
182648
185086
|
var bool = require_bool4();
|
|
182649
185087
|
var float = require_float4();
|
|
182650
185088
|
var int2 = require_int4();
|
|
182651
|
-
var
|
|
185089
|
+
var merge3 = require_merge3();
|
|
182652
185090
|
var omap = require_omap2();
|
|
182653
185091
|
var pairs = require_pairs2();
|
|
182654
185092
|
var set2 = require_set2();
|
|
@@ -182668,7 +185106,7 @@ var require_schema6 = __commonJS((exports) => {
|
|
|
182668
185106
|
float.floatExp,
|
|
182669
185107
|
float.float,
|
|
182670
185108
|
binary.binary,
|
|
182671
|
-
|
|
185109
|
+
merge3.merge,
|
|
182672
185110
|
omap.omap,
|
|
182673
185111
|
pairs.pairs,
|
|
182674
185112
|
set2.set,
|
|
@@ -182691,7 +185129,7 @@ var require_tags2 = __commonJS((exports) => {
|
|
|
182691
185129
|
var schema = require_schema4();
|
|
182692
185130
|
var schema$1 = require_schema5();
|
|
182693
185131
|
var binary = require_binary2();
|
|
182694
|
-
var
|
|
185132
|
+
var merge3 = require_merge3();
|
|
182695
185133
|
var omap = require_omap2();
|
|
182696
185134
|
var pairs = require_pairs2();
|
|
182697
185135
|
var schema$2 = require_schema6();
|
|
@@ -182716,7 +185154,7 @@ var require_tags2 = __commonJS((exports) => {
|
|
|
182716
185154
|
intOct: int2.intOct,
|
|
182717
185155
|
intTime: timestamp.intTime,
|
|
182718
185156
|
map: map2.map,
|
|
182719
|
-
merge:
|
|
185157
|
+
merge: merge3.merge,
|
|
182720
185158
|
null: _null4.nullTag,
|
|
182721
185159
|
omap: omap.omap,
|
|
182722
185160
|
pairs: pairs.pairs,
|
|
@@ -182726,7 +185164,7 @@ var require_tags2 = __commonJS((exports) => {
|
|
|
182726
185164
|
};
|
|
182727
185165
|
var coreKnownTags = {
|
|
182728
185166
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
182729
|
-
"tag:yaml.org,2002:merge":
|
|
185167
|
+
"tag:yaml.org,2002:merge": merge3.merge,
|
|
182730
185168
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
182731
185169
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
182732
185170
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -182735,7 +185173,7 @@ var require_tags2 = __commonJS((exports) => {
|
|
|
182735
185173
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
182736
185174
|
const schemaTags = schemas3.get(schemaName);
|
|
182737
185175
|
if (schemaTags && !customTags) {
|
|
182738
|
-
return addMergeTag && !schemaTags.includes(
|
|
185176
|
+
return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
|
|
182739
185177
|
}
|
|
182740
185178
|
let tags = schemaTags;
|
|
182741
185179
|
if (!tags) {
|
|
@@ -182753,7 +185191,7 @@ var require_tags2 = __commonJS((exports) => {
|
|
|
182753
185191
|
tags = customTags(tags.slice());
|
|
182754
185192
|
}
|
|
182755
185193
|
if (addMergeTag)
|
|
182756
|
-
tags = tags.concat(
|
|
185194
|
+
tags = tags.concat(merge3.merge);
|
|
182757
185195
|
return tags.reduce((tags2, tag) => {
|
|
182758
185196
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
182759
185197
|
if (!tagObj) {
|
|
@@ -182780,11 +185218,11 @@ var require_Schema2 = __commonJS((exports) => {
|
|
|
182780
185218
|
var sortMapEntriesByKey = (a5, b8) => a5.key < b8.key ? -1 : a5.key > b8.key ? 1 : 0;
|
|
182781
185219
|
|
|
182782
185220
|
class Schema2 {
|
|
182783
|
-
constructor({ compat: compat2, customTags, merge:
|
|
185221
|
+
constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
182784
185222
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
182785
185223
|
this.name = typeof schema === "string" && schema || "core";
|
|
182786
185224
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
182787
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
185225
|
+
this.tags = tags.getTags(customTags, this.name, merge3);
|
|
182788
185226
|
this.toStringOptions = toStringDefaults ?? null;
|
|
182789
185227
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
182790
185228
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -184007,13 +186445,13 @@ var require_resolve_block_scalar2 = __commonJS((exports) => {
|
|
|
184007
186445
|
return { mode, indent: indent3, chomp, comment, length };
|
|
184008
186446
|
}
|
|
184009
186447
|
function splitLines2(source2) {
|
|
184010
|
-
const
|
|
184011
|
-
const first =
|
|
186448
|
+
const split2 = source2.split(/\n( *)/);
|
|
186449
|
+
const first = split2[0];
|
|
184012
186450
|
const m7 = first.match(/^( *)/);
|
|
184013
186451
|
const line0 = m7?.[1] ? [m7[1], first.slice(m7[1].length)] : ["", first];
|
|
184014
186452
|
const lines = [line0];
|
|
184015
|
-
for (let i5 = 1;i5 <
|
|
184016
|
-
lines.push([
|
|
186453
|
+
for (let i5 = 1;i5 < split2.length; i5 += 2)
|
|
186454
|
+
lines.push([split2[i5], split2[i5 + 1]]);
|
|
184017
186455
|
return lines;
|
|
184018
186456
|
}
|
|
184019
186457
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -186661,7 +189099,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
|
|
|
186661
189099
|
// package.json
|
|
186662
189100
|
var package_default = {
|
|
186663
189101
|
name: "@eigenpal/cli",
|
|
186664
|
-
version: "0.7.
|
|
189102
|
+
version: "0.7.1",
|
|
186665
189103
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
186666
189104
|
keywords: [
|
|
186667
189105
|
"eigenpal",
|
|
@@ -188160,7 +190598,7 @@ async function pushCurrentBranch(input) {
|
|
|
188160
190598
|
function slugifyPackageSegment(value) {
|
|
188161
190599
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
188162
190600
|
}
|
|
188163
|
-
function packagePathForTemplate(
|
|
190601
|
+
function packagePathForTemplate(template2, name) {
|
|
188164
190602
|
const slug = slugifyPackageSegment(name);
|
|
188165
190603
|
if (!slug)
|
|
188166
190604
|
throw new Error("Package name must include at least one letter or number.");
|
|
@@ -188172,7 +190610,7 @@ function packagePathForTemplate(template, name) {
|
|
|
188172
190610
|
knowledge: "resources/knowledge",
|
|
188173
190611
|
evaluator: "evaluators"
|
|
188174
190612
|
};
|
|
188175
|
-
const root = rootByTemplate[
|
|
190613
|
+
const root = rootByTemplate[template2];
|
|
188176
190614
|
if (!root)
|
|
188177
190615
|
throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
|
|
188178
190616
|
return SourcePackagePathSchema.parse(`${root}/${slug}`);
|
|
@@ -188581,12 +191019,12 @@ function archivePackage(input) {
|
|
|
188581
191019
|
runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
|
|
188582
191020
|
cwd: input.gitRoot
|
|
188583
191021
|
});
|
|
188584
|
-
const
|
|
191022
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
188585
191023
|
cwd: input.outDir,
|
|
188586
191024
|
encoding: "utf8"
|
|
188587
191025
|
});
|
|
188588
|
-
if (
|
|
188589
|
-
throw new Error(
|
|
191026
|
+
if (extract2.status !== 0)
|
|
191027
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
188590
191028
|
} finally {
|
|
188591
191029
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
188592
191030
|
}
|
|
@@ -188615,12 +191053,12 @@ async function tryHostedArchive(input) {
|
|
|
188615
191053
|
const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
|
|
188616
191054
|
try {
|
|
188617
191055
|
writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
|
|
188618
|
-
const
|
|
191056
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
188619
191057
|
cwd: input.outDir,
|
|
188620
191058
|
encoding: "utf8"
|
|
188621
191059
|
});
|
|
188622
|
-
if (
|
|
188623
|
-
throw new Error(
|
|
191060
|
+
if (extract2.status !== 0)
|
|
191061
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
188624
191062
|
return true;
|
|
188625
191063
|
} finally {
|
|
188626
191064
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
@@ -191962,18 +194400,18 @@ async function init(name, opts) {
|
|
|
191962
194400
|
if (existsSync10(target) && readdirSync2(target).length > 0) {
|
|
191963
194401
|
throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
|
|
191964
194402
|
}
|
|
191965
|
-
let
|
|
194403
|
+
let template2;
|
|
191966
194404
|
if (opts.template) {
|
|
191967
194405
|
if (!isTemplateName(opts.template)) {
|
|
191968
194406
|
throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
|
|
191969
194407
|
}
|
|
191970
|
-
|
|
194408
|
+
template2 = opts.template;
|
|
191971
194409
|
} else if (opts.yes || !process.stdin.isTTY) {
|
|
191972
|
-
|
|
194410
|
+
template2 = "blank";
|
|
191973
194411
|
} else {
|
|
191974
|
-
|
|
194412
|
+
template2 = await promptForTemplate();
|
|
191975
194413
|
}
|
|
191976
|
-
const sourceRoot = join2(resolveTemplatesRoot(),
|
|
194414
|
+
const sourceRoot = join2(resolveTemplatesRoot(), template2);
|
|
191977
194415
|
if (!existsSync10(sourceRoot)) {
|
|
191978
194416
|
throw new Error(`Template directory missing on disk: ${sourceRoot}`);
|
|
191979
194417
|
}
|