@eigenpal/cli 0.10.13 → 0.10.15
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 +2759 -316
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17080,8 +17080,139 @@ 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
|
+
RUN_REVIEW: "rev",
|
|
17149
|
+
RUN_REVIEW_CORRECTION: "rvc",
|
|
17150
|
+
TABLE_ROW: "row",
|
|
17151
|
+
FOLDER: "fldr",
|
|
17152
|
+
AGENT_WORKFLOW: "awf",
|
|
17153
|
+
AGENT_EXECUTION: "aex",
|
|
17154
|
+
AGENT_EXAMPLE: "aeg",
|
|
17155
|
+
AGENT_VERSION: "avr",
|
|
17156
|
+
AGENT_TRAINING_SESSION: "ats",
|
|
17157
|
+
AGENT_EXPERIMENT: "aexp",
|
|
17158
|
+
AGENT_EMAIL_ALIAS: "aea",
|
|
17159
|
+
AGENT_EMAIL_INVOCATION: "aei",
|
|
17160
|
+
AUTOMATION_TRIGGER: "atr",
|
|
17161
|
+
FILE_SOURCE_CONFIG: "fsc",
|
|
17162
|
+
SANDBOX_WS_TOKEN: "sws"
|
|
17163
|
+
};
|
|
17164
|
+
TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
17165
|
+
return typeof val === "string" ? new Date(val) : val;
|
|
17166
|
+
});
|
|
17167
|
+
JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
17168
|
+
BaseEntitySchema = exports_external.object({
|
|
17169
|
+
id: exports_external.string(),
|
|
17170
|
+
createdAt: TimestampSchema.optional(),
|
|
17171
|
+
updatedAt: TimestampSchema.optional()
|
|
17172
|
+
});
|
|
17173
|
+
});
|
|
17174
|
+
|
|
17175
|
+
// ../types/src/core/ids.ts
|
|
17176
|
+
var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
|
|
17177
|
+
var init_ids = __esm(() => {
|
|
17178
|
+
PROCESSOR_IDS = {
|
|
17179
|
+
MERGE: "builtin/merge",
|
|
17180
|
+
DOCUMENT_PARSER: "builtin/parser",
|
|
17181
|
+
EXTRACT: "builtin/extract",
|
|
17182
|
+
SPLIT: "builtin/split",
|
|
17183
|
+
SEGMENT: "builtin/segment",
|
|
17184
|
+
CLASSIFY: "builtin/classify",
|
|
17185
|
+
TEMPLATE: "builtin/template",
|
|
17186
|
+
PDF_EMBEDDER: "builtin/pdf-embedder",
|
|
17187
|
+
XLSX_TO_JSON: "builtin/xlsx-to-json"
|
|
17188
|
+
};
|
|
17189
|
+
PARSER_IDS = {
|
|
17190
|
+
KREUZBERG: "builtin/kreuzberg",
|
|
17191
|
+
OCR: "builtin/ocr",
|
|
17192
|
+
LLM_VISION: "builtin/llm-vision"
|
|
17193
|
+
};
|
|
17194
|
+
INPUT_KINDS = {
|
|
17195
|
+
DOCUMENT: "document",
|
|
17196
|
+
PAYLOAD: "payload"
|
|
17197
|
+
};
|
|
17198
|
+
});
|
|
17199
|
+
|
|
17200
|
+
// ../types/src/core/pagination.ts
|
|
17201
|
+
var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
|
|
17202
|
+
var init_pagination = __esm(() => {
|
|
17203
|
+
init_zod();
|
|
17204
|
+
PaginationParamsSchema = exports_external.object({
|
|
17205
|
+
limit: exports_external.coerce.number().int().min(1).max(100).default(50),
|
|
17206
|
+
offset: exports_external.coerce.number().int().min(0).default(0)
|
|
17207
|
+
});
|
|
17208
|
+
});
|
|
17209
|
+
|
|
17083
17210
|
// ../types/src/core/index.ts
|
|
17084
|
-
var init_core3 = () => {
|
|
17211
|
+
var init_core3 = __esm(() => {
|
|
17212
|
+
init_common();
|
|
17213
|
+
init_ids();
|
|
17214
|
+
init_pagination();
|
|
17215
|
+
});
|
|
17085
17216
|
|
|
17086
17217
|
// ../types/src/files/legacy-boundary.ts
|
|
17087
17218
|
var LEGACY_FILE_REF_COMPATIBILITY;
|
|
@@ -17106,6 +17237,9 @@ var init_legacy_boundary = __esm(() => {
|
|
|
17106
17237
|
function isRuntimeFileRef(input) {
|
|
17107
17238
|
return RuntimeFileRefSchema.safeParse(input).success;
|
|
17108
17239
|
}
|
|
17240
|
+
function isFilePathDescriptor(input) {
|
|
17241
|
+
return FilePathDescriptorSchema.safeParse(input).success;
|
|
17242
|
+
}
|
|
17109
17243
|
function isResolvedProcessorFile(input) {
|
|
17110
17244
|
return ResolvedProcessorFileSchema.safeParse(input).success;
|
|
17111
17245
|
}
|
|
@@ -17328,11 +17462,2407 @@ var init_scoped_file_ref = __esm(() => {
|
|
|
17328
17462
|
]);
|
|
17329
17463
|
});
|
|
17330
17464
|
|
|
17465
|
+
// ../../node_modules/@opentelemetry/api/build/src/version.js
|
|
17466
|
+
var require_version = __commonJS((exports) => {
|
|
17467
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17468
|
+
exports.VERSION = undefined;
|
|
17469
|
+
exports.VERSION = "1.9.1";
|
|
17470
|
+
});
|
|
17471
|
+
|
|
17472
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
|
|
17473
|
+
var require_semver = __commonJS((exports) => {
|
|
17474
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17475
|
+
exports.isCompatible = exports._makeCompatibilityCheck = undefined;
|
|
17476
|
+
var version_1 = require_version();
|
|
17477
|
+
var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
17478
|
+
function _makeCompatibilityCheck(ownVersion) {
|
|
17479
|
+
const acceptedVersions = new Set([ownVersion]);
|
|
17480
|
+
const rejectedVersions = new Set;
|
|
17481
|
+
const myVersionMatch = ownVersion.match(re);
|
|
17482
|
+
if (!myVersionMatch) {
|
|
17483
|
+
return () => false;
|
|
17484
|
+
}
|
|
17485
|
+
const ownVersionParsed = {
|
|
17486
|
+
major: +myVersionMatch[1],
|
|
17487
|
+
minor: +myVersionMatch[2],
|
|
17488
|
+
patch: +myVersionMatch[3],
|
|
17489
|
+
prerelease: myVersionMatch[4]
|
|
17490
|
+
};
|
|
17491
|
+
if (ownVersionParsed.prerelease != null) {
|
|
17492
|
+
return function isExactmatch(globalVersion) {
|
|
17493
|
+
return globalVersion === ownVersion;
|
|
17494
|
+
};
|
|
17495
|
+
}
|
|
17496
|
+
function _reject(v) {
|
|
17497
|
+
rejectedVersions.add(v);
|
|
17498
|
+
return false;
|
|
17499
|
+
}
|
|
17500
|
+
function _accept(v) {
|
|
17501
|
+
acceptedVersions.add(v);
|
|
17502
|
+
return true;
|
|
17503
|
+
}
|
|
17504
|
+
return function isCompatible(globalVersion) {
|
|
17505
|
+
if (acceptedVersions.has(globalVersion)) {
|
|
17506
|
+
return true;
|
|
17507
|
+
}
|
|
17508
|
+
if (rejectedVersions.has(globalVersion)) {
|
|
17509
|
+
return false;
|
|
17510
|
+
}
|
|
17511
|
+
const globalVersionMatch = globalVersion.match(re);
|
|
17512
|
+
if (!globalVersionMatch) {
|
|
17513
|
+
return _reject(globalVersion);
|
|
17514
|
+
}
|
|
17515
|
+
const globalVersionParsed = {
|
|
17516
|
+
major: +globalVersionMatch[1],
|
|
17517
|
+
minor: +globalVersionMatch[2],
|
|
17518
|
+
patch: +globalVersionMatch[3],
|
|
17519
|
+
prerelease: globalVersionMatch[4]
|
|
17520
|
+
};
|
|
17521
|
+
if (globalVersionParsed.prerelease != null) {
|
|
17522
|
+
return _reject(globalVersion);
|
|
17523
|
+
}
|
|
17524
|
+
if (ownVersionParsed.major !== globalVersionParsed.major) {
|
|
17525
|
+
return _reject(globalVersion);
|
|
17526
|
+
}
|
|
17527
|
+
if (ownVersionParsed.major === 0) {
|
|
17528
|
+
if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
|
|
17529
|
+
return _accept(globalVersion);
|
|
17530
|
+
}
|
|
17531
|
+
return _reject(globalVersion);
|
|
17532
|
+
}
|
|
17533
|
+
if (ownVersionParsed.minor <= globalVersionParsed.minor) {
|
|
17534
|
+
return _accept(globalVersion);
|
|
17535
|
+
}
|
|
17536
|
+
return _reject(globalVersion);
|
|
17537
|
+
};
|
|
17538
|
+
}
|
|
17539
|
+
exports._makeCompatibilityCheck = _makeCompatibilityCheck;
|
|
17540
|
+
exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
|
|
17541
|
+
});
|
|
17542
|
+
|
|
17543
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
|
|
17544
|
+
var require_global_utils = __commonJS((exports) => {
|
|
17545
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17546
|
+
exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
|
|
17547
|
+
var version_1 = require_version();
|
|
17548
|
+
var semver_1 = require_semver();
|
|
17549
|
+
var major = version_1.VERSION.split(".")[0];
|
|
17550
|
+
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
|
|
17551
|
+
var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
17552
|
+
function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
17553
|
+
var _a3;
|
|
17554
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
|
|
17555
|
+
version: version_1.VERSION
|
|
17556
|
+
};
|
|
17557
|
+
if (!allowOverride && api2[type]) {
|
|
17558
|
+
const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
|
|
17559
|
+
diag.error(err.stack || err.message);
|
|
17560
|
+
return false;
|
|
17561
|
+
}
|
|
17562
|
+
if (api2.version !== version_1.VERSION) {
|
|
17563
|
+
const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
|
|
17564
|
+
diag.error(err.stack || err.message);
|
|
17565
|
+
return false;
|
|
17566
|
+
}
|
|
17567
|
+
api2[type] = instance;
|
|
17568
|
+
diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
|
|
17569
|
+
return true;
|
|
17570
|
+
}
|
|
17571
|
+
exports.registerGlobal = registerGlobal;
|
|
17572
|
+
function getGlobal(type) {
|
|
17573
|
+
var _a3, _b;
|
|
17574
|
+
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
|
|
17575
|
+
if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
|
|
17576
|
+
return;
|
|
17577
|
+
}
|
|
17578
|
+
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
|
|
17579
|
+
}
|
|
17580
|
+
exports.getGlobal = getGlobal;
|
|
17581
|
+
function unregisterGlobal(type, diag) {
|
|
17582
|
+
diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
|
|
17583
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
17584
|
+
if (api2) {
|
|
17585
|
+
delete api2[type];
|
|
17586
|
+
}
|
|
17587
|
+
}
|
|
17588
|
+
exports.unregisterGlobal = unregisterGlobal;
|
|
17589
|
+
});
|
|
17590
|
+
|
|
17591
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
|
|
17592
|
+
var require_ComponentLogger = __commonJS((exports) => {
|
|
17593
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17594
|
+
exports.DiagComponentLogger = undefined;
|
|
17595
|
+
var global_utils_1 = require_global_utils();
|
|
17596
|
+
|
|
17597
|
+
class DiagComponentLogger {
|
|
17598
|
+
constructor(props) {
|
|
17599
|
+
this._namespace = props.namespace || "DiagComponentLogger";
|
|
17600
|
+
}
|
|
17601
|
+
debug(...args) {
|
|
17602
|
+
return logProxy("debug", this._namespace, args);
|
|
17603
|
+
}
|
|
17604
|
+
error(...args) {
|
|
17605
|
+
return logProxy("error", this._namespace, args);
|
|
17606
|
+
}
|
|
17607
|
+
info(...args) {
|
|
17608
|
+
return logProxy("info", this._namespace, args);
|
|
17609
|
+
}
|
|
17610
|
+
warn(...args) {
|
|
17611
|
+
return logProxy("warn", this._namespace, args);
|
|
17612
|
+
}
|
|
17613
|
+
verbose(...args) {
|
|
17614
|
+
return logProxy("verbose", this._namespace, args);
|
|
17615
|
+
}
|
|
17616
|
+
}
|
|
17617
|
+
exports.DiagComponentLogger = DiagComponentLogger;
|
|
17618
|
+
function logProxy(funcName, namespace, args) {
|
|
17619
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17620
|
+
if (!logger) {
|
|
17621
|
+
return;
|
|
17622
|
+
}
|
|
17623
|
+
return logger[funcName](namespace, ...args);
|
|
17624
|
+
}
|
|
17625
|
+
});
|
|
17626
|
+
|
|
17627
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/types.js
|
|
17628
|
+
var require_types = __commonJS((exports) => {
|
|
17629
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17630
|
+
exports.DiagLogLevel = undefined;
|
|
17631
|
+
var DiagLogLevel;
|
|
17632
|
+
(function(DiagLogLevel2) {
|
|
17633
|
+
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
17634
|
+
DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
|
|
17635
|
+
DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
|
|
17636
|
+
DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
|
|
17637
|
+
DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
|
|
17638
|
+
DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
|
|
17639
|
+
DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
|
|
17640
|
+
})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
|
|
17641
|
+
});
|
|
17642
|
+
|
|
17643
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
|
|
17644
|
+
var require_logLevelLogger = __commonJS((exports) => {
|
|
17645
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17646
|
+
exports.createLogLevelDiagLogger = undefined;
|
|
17647
|
+
var types_1 = require_types();
|
|
17648
|
+
function createLogLevelDiagLogger(maxLevel, logger) {
|
|
17649
|
+
if (maxLevel < types_1.DiagLogLevel.NONE) {
|
|
17650
|
+
maxLevel = types_1.DiagLogLevel.NONE;
|
|
17651
|
+
} else if (maxLevel > types_1.DiagLogLevel.ALL) {
|
|
17652
|
+
maxLevel = types_1.DiagLogLevel.ALL;
|
|
17653
|
+
}
|
|
17654
|
+
logger = logger || {};
|
|
17655
|
+
function _filterFunc(funcName, theLevel) {
|
|
17656
|
+
const theFunc = logger[funcName];
|
|
17657
|
+
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
17658
|
+
return theFunc.bind(logger);
|
|
17659
|
+
}
|
|
17660
|
+
return function() {};
|
|
17661
|
+
}
|
|
17662
|
+
return {
|
|
17663
|
+
error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
|
|
17664
|
+
warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
|
|
17665
|
+
info: _filterFunc("info", types_1.DiagLogLevel.INFO),
|
|
17666
|
+
debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
|
|
17667
|
+
verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
|
|
17668
|
+
};
|
|
17669
|
+
}
|
|
17670
|
+
exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
|
|
17671
|
+
});
|
|
17672
|
+
|
|
17673
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/diag.js
|
|
17674
|
+
var require_diag = __commonJS((exports) => {
|
|
17675
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17676
|
+
exports.DiagAPI = undefined;
|
|
17677
|
+
var ComponentLogger_1 = require_ComponentLogger();
|
|
17678
|
+
var logLevelLogger_1 = require_logLevelLogger();
|
|
17679
|
+
var types_1 = require_types();
|
|
17680
|
+
var global_utils_1 = require_global_utils();
|
|
17681
|
+
var API_NAME = "diag";
|
|
17682
|
+
|
|
17683
|
+
class DiagAPI {
|
|
17684
|
+
static instance() {
|
|
17685
|
+
if (!this._instance) {
|
|
17686
|
+
this._instance = new DiagAPI;
|
|
17687
|
+
}
|
|
17688
|
+
return this._instance;
|
|
17689
|
+
}
|
|
17690
|
+
constructor() {
|
|
17691
|
+
function _logProxy(funcName) {
|
|
17692
|
+
return function(...args) {
|
|
17693
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17694
|
+
if (!logger)
|
|
17695
|
+
return;
|
|
17696
|
+
return logger[funcName](...args);
|
|
17697
|
+
};
|
|
17698
|
+
}
|
|
17699
|
+
const self2 = this;
|
|
17700
|
+
const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
|
|
17701
|
+
var _a3, _b, _c;
|
|
17702
|
+
if (logger === self2) {
|
|
17703
|
+
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
17704
|
+
self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
|
|
17705
|
+
return false;
|
|
17706
|
+
}
|
|
17707
|
+
if (typeof optionsOrLogLevel === "number") {
|
|
17708
|
+
optionsOrLogLevel = {
|
|
17709
|
+
logLevel: optionsOrLogLevel
|
|
17710
|
+
};
|
|
17711
|
+
}
|
|
17712
|
+
const oldLogger = (0, global_utils_1.getGlobal)("diag");
|
|
17713
|
+
const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
|
|
17714
|
+
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
17715
|
+
const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
|
|
17716
|
+
oldLogger.warn(`Current logger will be overwritten from ${stack}`);
|
|
17717
|
+
newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
|
|
17718
|
+
}
|
|
17719
|
+
return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
|
|
17720
|
+
};
|
|
17721
|
+
self2.setLogger = setLogger;
|
|
17722
|
+
self2.disable = () => {
|
|
17723
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, self2);
|
|
17724
|
+
};
|
|
17725
|
+
self2.createComponentLogger = (options) => {
|
|
17726
|
+
return new ComponentLogger_1.DiagComponentLogger(options);
|
|
17727
|
+
};
|
|
17728
|
+
self2.verbose = _logProxy("verbose");
|
|
17729
|
+
self2.debug = _logProxy("debug");
|
|
17730
|
+
self2.info = _logProxy("info");
|
|
17731
|
+
self2.warn = _logProxy("warn");
|
|
17732
|
+
self2.error = _logProxy("error");
|
|
17733
|
+
}
|
|
17734
|
+
}
|
|
17735
|
+
exports.DiagAPI = DiagAPI;
|
|
17736
|
+
});
|
|
17737
|
+
|
|
17738
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
|
|
17739
|
+
var require_baggage_impl = __commonJS((exports) => {
|
|
17740
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17741
|
+
exports.BaggageImpl = undefined;
|
|
17742
|
+
|
|
17743
|
+
class BaggageImpl {
|
|
17744
|
+
constructor(entries) {
|
|
17745
|
+
this._entries = entries ? new Map(entries) : new Map;
|
|
17746
|
+
}
|
|
17747
|
+
getEntry(key) {
|
|
17748
|
+
const entry = this._entries.get(key);
|
|
17749
|
+
if (!entry) {
|
|
17750
|
+
return;
|
|
17751
|
+
}
|
|
17752
|
+
return Object.assign({}, entry);
|
|
17753
|
+
}
|
|
17754
|
+
getAllEntries() {
|
|
17755
|
+
return Array.from(this._entries.entries());
|
|
17756
|
+
}
|
|
17757
|
+
setEntry(key, entry) {
|
|
17758
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17759
|
+
newBaggage._entries.set(key, entry);
|
|
17760
|
+
return newBaggage;
|
|
17761
|
+
}
|
|
17762
|
+
removeEntry(key) {
|
|
17763
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17764
|
+
newBaggage._entries.delete(key);
|
|
17765
|
+
return newBaggage;
|
|
17766
|
+
}
|
|
17767
|
+
removeEntries(...keys) {
|
|
17768
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17769
|
+
for (const key of keys) {
|
|
17770
|
+
newBaggage._entries.delete(key);
|
|
17771
|
+
}
|
|
17772
|
+
return newBaggage;
|
|
17773
|
+
}
|
|
17774
|
+
clear() {
|
|
17775
|
+
return new BaggageImpl;
|
|
17776
|
+
}
|
|
17777
|
+
}
|
|
17778
|
+
exports.BaggageImpl = BaggageImpl;
|
|
17779
|
+
});
|
|
17780
|
+
|
|
17781
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
|
|
17782
|
+
var require_symbol = __commonJS((exports) => {
|
|
17783
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17784
|
+
exports.baggageEntryMetadataSymbol = undefined;
|
|
17785
|
+
exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
|
|
17786
|
+
});
|
|
17787
|
+
|
|
17788
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
|
|
17789
|
+
var require_utils = __commonJS((exports) => {
|
|
17790
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17791
|
+
exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
|
|
17792
|
+
var diag_1 = require_diag();
|
|
17793
|
+
var baggage_impl_1 = require_baggage_impl();
|
|
17794
|
+
var symbol_1 = require_symbol();
|
|
17795
|
+
var diag = diag_1.DiagAPI.instance();
|
|
17796
|
+
function createBaggage(entries = {}) {
|
|
17797
|
+
return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
|
|
17798
|
+
}
|
|
17799
|
+
exports.createBaggage = createBaggage;
|
|
17800
|
+
function baggageEntryMetadataFromString(str) {
|
|
17801
|
+
if (typeof str !== "string") {
|
|
17802
|
+
diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
|
|
17803
|
+
str = "";
|
|
17804
|
+
}
|
|
17805
|
+
return {
|
|
17806
|
+
__TYPE__: symbol_1.baggageEntryMetadataSymbol,
|
|
17807
|
+
toString() {
|
|
17808
|
+
return str;
|
|
17809
|
+
}
|
|
17810
|
+
};
|
|
17811
|
+
}
|
|
17812
|
+
exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
|
|
17813
|
+
});
|
|
17814
|
+
|
|
17815
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/context.js
|
|
17816
|
+
var require_context = __commonJS((exports) => {
|
|
17817
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17818
|
+
exports.ROOT_CONTEXT = exports.createContextKey = undefined;
|
|
17819
|
+
function createContextKey(description) {
|
|
17820
|
+
return Symbol.for(description);
|
|
17821
|
+
}
|
|
17822
|
+
exports.createContextKey = createContextKey;
|
|
17823
|
+
|
|
17824
|
+
class BaseContext {
|
|
17825
|
+
constructor(parentContext) {
|
|
17826
|
+
const self2 = this;
|
|
17827
|
+
self2._currentContext = parentContext ? new Map(parentContext) : new Map;
|
|
17828
|
+
self2.getValue = (key) => self2._currentContext.get(key);
|
|
17829
|
+
self2.setValue = (key, value) => {
|
|
17830
|
+
const context = new BaseContext(self2._currentContext);
|
|
17831
|
+
context._currentContext.set(key, value);
|
|
17832
|
+
return context;
|
|
17833
|
+
};
|
|
17834
|
+
self2.deleteValue = (key) => {
|
|
17835
|
+
const context = new BaseContext(self2._currentContext);
|
|
17836
|
+
context._currentContext.delete(key);
|
|
17837
|
+
return context;
|
|
17838
|
+
};
|
|
17839
|
+
}
|
|
17840
|
+
}
|
|
17841
|
+
exports.ROOT_CONTEXT = new BaseContext;
|
|
17842
|
+
});
|
|
17843
|
+
|
|
17844
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
|
|
17845
|
+
var require_consoleLogger = __commonJS((exports) => {
|
|
17846
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17847
|
+
exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
|
|
17848
|
+
var consoleMap = [
|
|
17849
|
+
{ n: "error", c: "error" },
|
|
17850
|
+
{ n: "warn", c: "warn" },
|
|
17851
|
+
{ n: "info", c: "info" },
|
|
17852
|
+
{ n: "debug", c: "debug" },
|
|
17853
|
+
{ n: "verbose", c: "trace" }
|
|
17854
|
+
];
|
|
17855
|
+
exports._originalConsoleMethods = {};
|
|
17856
|
+
if (typeof console !== "undefined") {
|
|
17857
|
+
const keys = [
|
|
17858
|
+
"error",
|
|
17859
|
+
"warn",
|
|
17860
|
+
"info",
|
|
17861
|
+
"debug",
|
|
17862
|
+
"trace",
|
|
17863
|
+
"log"
|
|
17864
|
+
];
|
|
17865
|
+
for (const key of keys) {
|
|
17866
|
+
if (typeof console[key] === "function") {
|
|
17867
|
+
exports._originalConsoleMethods[key] = console[key];
|
|
17868
|
+
}
|
|
17869
|
+
}
|
|
17870
|
+
}
|
|
17871
|
+
|
|
17872
|
+
class DiagConsoleLogger {
|
|
17873
|
+
constructor() {
|
|
17874
|
+
function _consoleFunc(funcName) {
|
|
17875
|
+
return function(...args) {
|
|
17876
|
+
let theFunc = exports._originalConsoleMethods[funcName];
|
|
17877
|
+
if (typeof theFunc !== "function") {
|
|
17878
|
+
theFunc = exports._originalConsoleMethods["log"];
|
|
17879
|
+
}
|
|
17880
|
+
if (typeof theFunc !== "function" && console) {
|
|
17881
|
+
theFunc = console[funcName];
|
|
17882
|
+
if (typeof theFunc !== "function") {
|
|
17883
|
+
theFunc = console.log;
|
|
17884
|
+
}
|
|
17885
|
+
}
|
|
17886
|
+
if (typeof theFunc === "function") {
|
|
17887
|
+
return theFunc.apply(console, args);
|
|
17888
|
+
}
|
|
17889
|
+
};
|
|
17890
|
+
}
|
|
17891
|
+
for (let i = 0;i < consoleMap.length; i++) {
|
|
17892
|
+
this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
|
|
17893
|
+
}
|
|
17894
|
+
}
|
|
17895
|
+
}
|
|
17896
|
+
exports.DiagConsoleLogger = DiagConsoleLogger;
|
|
17897
|
+
});
|
|
17898
|
+
|
|
17899
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
|
|
17900
|
+
var require_NoopMeter = __commonJS((exports) => {
|
|
17901
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17902
|
+
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;
|
|
17903
|
+
|
|
17904
|
+
class NoopMeter {
|
|
17905
|
+
constructor() {}
|
|
17906
|
+
createGauge(_name, _options) {
|
|
17907
|
+
return exports.NOOP_GAUGE_METRIC;
|
|
17908
|
+
}
|
|
17909
|
+
createHistogram(_name, _options) {
|
|
17910
|
+
return exports.NOOP_HISTOGRAM_METRIC;
|
|
17911
|
+
}
|
|
17912
|
+
createCounter(_name, _options) {
|
|
17913
|
+
return exports.NOOP_COUNTER_METRIC;
|
|
17914
|
+
}
|
|
17915
|
+
createUpDownCounter(_name, _options) {
|
|
17916
|
+
return exports.NOOP_UP_DOWN_COUNTER_METRIC;
|
|
17917
|
+
}
|
|
17918
|
+
createObservableGauge(_name, _options) {
|
|
17919
|
+
return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
|
|
17920
|
+
}
|
|
17921
|
+
createObservableCounter(_name, _options) {
|
|
17922
|
+
return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
|
|
17923
|
+
}
|
|
17924
|
+
createObservableUpDownCounter(_name, _options) {
|
|
17925
|
+
return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
17926
|
+
}
|
|
17927
|
+
addBatchObservableCallback(_callback, _observables) {}
|
|
17928
|
+
removeBatchObservableCallback(_callback) {}
|
|
17929
|
+
}
|
|
17930
|
+
exports.NoopMeter = NoopMeter;
|
|
17931
|
+
|
|
17932
|
+
class NoopMetric {
|
|
17933
|
+
}
|
|
17934
|
+
exports.NoopMetric = NoopMetric;
|
|
17935
|
+
|
|
17936
|
+
class NoopCounterMetric extends NoopMetric {
|
|
17937
|
+
add(_value, _attributes) {}
|
|
17938
|
+
}
|
|
17939
|
+
exports.NoopCounterMetric = NoopCounterMetric;
|
|
17940
|
+
|
|
17941
|
+
class NoopUpDownCounterMetric extends NoopMetric {
|
|
17942
|
+
add(_value, _attributes) {}
|
|
17943
|
+
}
|
|
17944
|
+
exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
|
|
17945
|
+
|
|
17946
|
+
class NoopGaugeMetric extends NoopMetric {
|
|
17947
|
+
record(_value, _attributes) {}
|
|
17948
|
+
}
|
|
17949
|
+
exports.NoopGaugeMetric = NoopGaugeMetric;
|
|
17950
|
+
|
|
17951
|
+
class NoopHistogramMetric extends NoopMetric {
|
|
17952
|
+
record(_value, _attributes) {}
|
|
17953
|
+
}
|
|
17954
|
+
exports.NoopHistogramMetric = NoopHistogramMetric;
|
|
17955
|
+
|
|
17956
|
+
class NoopObservableMetric {
|
|
17957
|
+
addCallback(_callback) {}
|
|
17958
|
+
removeCallback(_callback) {}
|
|
17959
|
+
}
|
|
17960
|
+
exports.NoopObservableMetric = NoopObservableMetric;
|
|
17961
|
+
|
|
17962
|
+
class NoopObservableCounterMetric extends NoopObservableMetric {
|
|
17963
|
+
}
|
|
17964
|
+
exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
|
|
17965
|
+
|
|
17966
|
+
class NoopObservableGaugeMetric extends NoopObservableMetric {
|
|
17967
|
+
}
|
|
17968
|
+
exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
|
|
17969
|
+
|
|
17970
|
+
class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
|
|
17971
|
+
}
|
|
17972
|
+
exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
|
|
17973
|
+
exports.NOOP_METER = new NoopMeter;
|
|
17974
|
+
exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
|
|
17975
|
+
exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
|
|
17976
|
+
exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
|
|
17977
|
+
exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
|
|
17978
|
+
exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
|
|
17979
|
+
exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
|
|
17980
|
+
exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
|
|
17981
|
+
function createNoopMeter() {
|
|
17982
|
+
return exports.NOOP_METER;
|
|
17983
|
+
}
|
|
17984
|
+
exports.createNoopMeter = createNoopMeter;
|
|
17985
|
+
});
|
|
17986
|
+
|
|
17987
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
|
|
17988
|
+
var require_Metric = __commonJS((exports) => {
|
|
17989
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17990
|
+
exports.ValueType = undefined;
|
|
17991
|
+
var ValueType;
|
|
17992
|
+
(function(ValueType2) {
|
|
17993
|
+
ValueType2[ValueType2["INT"] = 0] = "INT";
|
|
17994
|
+
ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
|
|
17995
|
+
})(ValueType = exports.ValueType || (exports.ValueType = {}));
|
|
17996
|
+
});
|
|
17997
|
+
|
|
17998
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
|
|
17999
|
+
var require_TextMapPropagator = __commonJS((exports) => {
|
|
18000
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18001
|
+
exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
|
|
18002
|
+
exports.defaultTextMapGetter = {
|
|
18003
|
+
get(carrier, key) {
|
|
18004
|
+
if (carrier == null) {
|
|
18005
|
+
return;
|
|
18006
|
+
}
|
|
18007
|
+
return carrier[key];
|
|
18008
|
+
},
|
|
18009
|
+
keys(carrier) {
|
|
18010
|
+
if (carrier == null) {
|
|
18011
|
+
return [];
|
|
18012
|
+
}
|
|
18013
|
+
return Object.keys(carrier);
|
|
18014
|
+
}
|
|
18015
|
+
};
|
|
18016
|
+
exports.defaultTextMapSetter = {
|
|
18017
|
+
set(carrier, key, value) {
|
|
18018
|
+
if (carrier == null) {
|
|
18019
|
+
return;
|
|
18020
|
+
}
|
|
18021
|
+
carrier[key] = value;
|
|
18022
|
+
}
|
|
18023
|
+
};
|
|
18024
|
+
});
|
|
18025
|
+
|
|
18026
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
|
|
18027
|
+
var require_NoopContextManager = __commonJS((exports) => {
|
|
18028
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18029
|
+
exports.NoopContextManager = undefined;
|
|
18030
|
+
var context_1 = require_context();
|
|
18031
|
+
|
|
18032
|
+
class NoopContextManager {
|
|
18033
|
+
active() {
|
|
18034
|
+
return context_1.ROOT_CONTEXT;
|
|
18035
|
+
}
|
|
18036
|
+
with(_context, fn, thisArg, ...args) {
|
|
18037
|
+
return fn.call(thisArg, ...args);
|
|
18038
|
+
}
|
|
18039
|
+
bind(_context, target) {
|
|
18040
|
+
return target;
|
|
18041
|
+
}
|
|
18042
|
+
enable() {
|
|
18043
|
+
return this;
|
|
18044
|
+
}
|
|
18045
|
+
disable() {
|
|
18046
|
+
return this;
|
|
18047
|
+
}
|
|
18048
|
+
}
|
|
18049
|
+
exports.NoopContextManager = NoopContextManager;
|
|
18050
|
+
});
|
|
18051
|
+
|
|
18052
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/context.js
|
|
18053
|
+
var require_context2 = __commonJS((exports) => {
|
|
18054
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18055
|
+
exports.ContextAPI = undefined;
|
|
18056
|
+
var NoopContextManager_1 = require_NoopContextManager();
|
|
18057
|
+
var global_utils_1 = require_global_utils();
|
|
18058
|
+
var diag_1 = require_diag();
|
|
18059
|
+
var API_NAME = "context";
|
|
18060
|
+
var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
|
|
18061
|
+
|
|
18062
|
+
class ContextAPI {
|
|
18063
|
+
constructor() {}
|
|
18064
|
+
static getInstance() {
|
|
18065
|
+
if (!this._instance) {
|
|
18066
|
+
this._instance = new ContextAPI;
|
|
18067
|
+
}
|
|
18068
|
+
return this._instance;
|
|
18069
|
+
}
|
|
18070
|
+
setGlobalContextManager(contextManager) {
|
|
18071
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
|
|
18072
|
+
}
|
|
18073
|
+
active() {
|
|
18074
|
+
return this._getContextManager().active();
|
|
18075
|
+
}
|
|
18076
|
+
with(context, fn, thisArg, ...args) {
|
|
18077
|
+
return this._getContextManager().with(context, fn, thisArg, ...args);
|
|
18078
|
+
}
|
|
18079
|
+
bind(context, target) {
|
|
18080
|
+
return this._getContextManager().bind(context, target);
|
|
18081
|
+
}
|
|
18082
|
+
_getContextManager() {
|
|
18083
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
|
|
18084
|
+
}
|
|
18085
|
+
disable() {
|
|
18086
|
+
this._getContextManager().disable();
|
|
18087
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18088
|
+
}
|
|
18089
|
+
}
|
|
18090
|
+
exports.ContextAPI = ContextAPI;
|
|
18091
|
+
});
|
|
18092
|
+
|
|
18093
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
|
|
18094
|
+
var require_trace_flags = __commonJS((exports) => {
|
|
18095
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18096
|
+
exports.TraceFlags = undefined;
|
|
18097
|
+
var TraceFlags;
|
|
18098
|
+
(function(TraceFlags2) {
|
|
18099
|
+
TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
|
|
18100
|
+
TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
|
|
18101
|
+
})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
|
|
18102
|
+
});
|
|
18103
|
+
|
|
18104
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
|
|
18105
|
+
var require_invalid_span_constants = __commonJS((exports) => {
|
|
18106
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18107
|
+
exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
|
|
18108
|
+
var trace_flags_1 = require_trace_flags();
|
|
18109
|
+
exports.INVALID_SPANID = "0000000000000000";
|
|
18110
|
+
exports.INVALID_TRACEID = "00000000000000000000000000000000";
|
|
18111
|
+
exports.INVALID_SPAN_CONTEXT = {
|
|
18112
|
+
traceId: exports.INVALID_TRACEID,
|
|
18113
|
+
spanId: exports.INVALID_SPANID,
|
|
18114
|
+
traceFlags: trace_flags_1.TraceFlags.NONE
|
|
18115
|
+
};
|
|
18116
|
+
});
|
|
18117
|
+
|
|
18118
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
|
|
18119
|
+
var require_NonRecordingSpan = __commonJS((exports) => {
|
|
18120
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18121
|
+
exports.NonRecordingSpan = undefined;
|
|
18122
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18123
|
+
|
|
18124
|
+
class NonRecordingSpan {
|
|
18125
|
+
constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
|
|
18126
|
+
this._spanContext = spanContext;
|
|
18127
|
+
}
|
|
18128
|
+
spanContext() {
|
|
18129
|
+
return this._spanContext;
|
|
18130
|
+
}
|
|
18131
|
+
setAttribute(_key, _value) {
|
|
18132
|
+
return this;
|
|
18133
|
+
}
|
|
18134
|
+
setAttributes(_attributes) {
|
|
18135
|
+
return this;
|
|
18136
|
+
}
|
|
18137
|
+
addEvent(_name, _attributes) {
|
|
18138
|
+
return this;
|
|
18139
|
+
}
|
|
18140
|
+
addLink(_link) {
|
|
18141
|
+
return this;
|
|
18142
|
+
}
|
|
18143
|
+
addLinks(_links) {
|
|
18144
|
+
return this;
|
|
18145
|
+
}
|
|
18146
|
+
setStatus(_status) {
|
|
18147
|
+
return this;
|
|
18148
|
+
}
|
|
18149
|
+
updateName(_name) {
|
|
18150
|
+
return this;
|
|
18151
|
+
}
|
|
18152
|
+
end(_endTime) {}
|
|
18153
|
+
isRecording() {
|
|
18154
|
+
return false;
|
|
18155
|
+
}
|
|
18156
|
+
recordException(_exception, _time) {}
|
|
18157
|
+
}
|
|
18158
|
+
exports.NonRecordingSpan = NonRecordingSpan;
|
|
18159
|
+
});
|
|
18160
|
+
|
|
18161
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
|
|
18162
|
+
var require_context_utils = __commonJS((exports) => {
|
|
18163
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18164
|
+
exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
|
|
18165
|
+
var context_1 = require_context();
|
|
18166
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18167
|
+
var context_2 = require_context2();
|
|
18168
|
+
var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
|
|
18169
|
+
function getSpan(context) {
|
|
18170
|
+
return context.getValue(SPAN_KEY) || undefined;
|
|
18171
|
+
}
|
|
18172
|
+
exports.getSpan = getSpan;
|
|
18173
|
+
function getActiveSpan() {
|
|
18174
|
+
return getSpan(context_2.ContextAPI.getInstance().active());
|
|
18175
|
+
}
|
|
18176
|
+
exports.getActiveSpan = getActiveSpan;
|
|
18177
|
+
function setSpan(context, span) {
|
|
18178
|
+
return context.setValue(SPAN_KEY, span);
|
|
18179
|
+
}
|
|
18180
|
+
exports.setSpan = setSpan;
|
|
18181
|
+
function deleteSpan(context) {
|
|
18182
|
+
return context.deleteValue(SPAN_KEY);
|
|
18183
|
+
}
|
|
18184
|
+
exports.deleteSpan = deleteSpan;
|
|
18185
|
+
function setSpanContext(context, spanContext) {
|
|
18186
|
+
return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
|
|
18187
|
+
}
|
|
18188
|
+
exports.setSpanContext = setSpanContext;
|
|
18189
|
+
function getSpanContext(context) {
|
|
18190
|
+
var _a3;
|
|
18191
|
+
return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
|
|
18192
|
+
}
|
|
18193
|
+
exports.getSpanContext = getSpanContext;
|
|
18194
|
+
});
|
|
18195
|
+
|
|
18196
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
|
|
18197
|
+
var require_spancontext_utils = __commonJS((exports) => {
|
|
18198
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18199
|
+
exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
|
|
18200
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18201
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18202
|
+
var isHex = new Uint8Array([
|
|
18203
|
+
0,
|
|
18204
|
+
0,
|
|
18205
|
+
0,
|
|
18206
|
+
0,
|
|
18207
|
+
0,
|
|
18208
|
+
0,
|
|
18209
|
+
0,
|
|
18210
|
+
0,
|
|
18211
|
+
0,
|
|
18212
|
+
0,
|
|
18213
|
+
0,
|
|
18214
|
+
0,
|
|
18215
|
+
0,
|
|
18216
|
+
0,
|
|
18217
|
+
0,
|
|
18218
|
+
0,
|
|
18219
|
+
0,
|
|
18220
|
+
0,
|
|
18221
|
+
0,
|
|
18222
|
+
0,
|
|
18223
|
+
0,
|
|
18224
|
+
0,
|
|
18225
|
+
0,
|
|
18226
|
+
0,
|
|
18227
|
+
0,
|
|
18228
|
+
0,
|
|
18229
|
+
0,
|
|
18230
|
+
0,
|
|
18231
|
+
0,
|
|
18232
|
+
0,
|
|
18233
|
+
0,
|
|
18234
|
+
0,
|
|
18235
|
+
0,
|
|
18236
|
+
0,
|
|
18237
|
+
0,
|
|
18238
|
+
0,
|
|
18239
|
+
0,
|
|
18240
|
+
0,
|
|
18241
|
+
0,
|
|
18242
|
+
0,
|
|
18243
|
+
0,
|
|
18244
|
+
0,
|
|
18245
|
+
0,
|
|
18246
|
+
0,
|
|
18247
|
+
0,
|
|
18248
|
+
0,
|
|
18249
|
+
0,
|
|
18250
|
+
0,
|
|
18251
|
+
1,
|
|
18252
|
+
1,
|
|
18253
|
+
1,
|
|
18254
|
+
1,
|
|
18255
|
+
1,
|
|
18256
|
+
1,
|
|
18257
|
+
1,
|
|
18258
|
+
1,
|
|
18259
|
+
1,
|
|
18260
|
+
1,
|
|
18261
|
+
0,
|
|
18262
|
+
0,
|
|
18263
|
+
0,
|
|
18264
|
+
0,
|
|
18265
|
+
0,
|
|
18266
|
+
0,
|
|
18267
|
+
0,
|
|
18268
|
+
1,
|
|
18269
|
+
1,
|
|
18270
|
+
1,
|
|
18271
|
+
1,
|
|
18272
|
+
1,
|
|
18273
|
+
1,
|
|
18274
|
+
0,
|
|
18275
|
+
0,
|
|
18276
|
+
0,
|
|
18277
|
+
0,
|
|
18278
|
+
0,
|
|
18279
|
+
0,
|
|
18280
|
+
0,
|
|
18281
|
+
0,
|
|
18282
|
+
0,
|
|
18283
|
+
0,
|
|
18284
|
+
0,
|
|
18285
|
+
0,
|
|
18286
|
+
0,
|
|
18287
|
+
0,
|
|
18288
|
+
0,
|
|
18289
|
+
0,
|
|
18290
|
+
0,
|
|
18291
|
+
0,
|
|
18292
|
+
0,
|
|
18293
|
+
0,
|
|
18294
|
+
0,
|
|
18295
|
+
0,
|
|
18296
|
+
0,
|
|
18297
|
+
0,
|
|
18298
|
+
0,
|
|
18299
|
+
0,
|
|
18300
|
+
1,
|
|
18301
|
+
1,
|
|
18302
|
+
1,
|
|
18303
|
+
1,
|
|
18304
|
+
1,
|
|
18305
|
+
1
|
|
18306
|
+
]);
|
|
18307
|
+
function isValidHex(id, length) {
|
|
18308
|
+
if (typeof id !== "string" || id.length !== length)
|
|
18309
|
+
return false;
|
|
18310
|
+
let r = 0;
|
|
18311
|
+
for (let i = 0;i < id.length; i += 4) {
|
|
18312
|
+
r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
18313
|
+
}
|
|
18314
|
+
return r === length;
|
|
18315
|
+
}
|
|
18316
|
+
function isValidTraceId(traceId) {
|
|
18317
|
+
return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
|
|
18318
|
+
}
|
|
18319
|
+
exports.isValidTraceId = isValidTraceId;
|
|
18320
|
+
function isValidSpanId(spanId) {
|
|
18321
|
+
return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
|
|
18322
|
+
}
|
|
18323
|
+
exports.isValidSpanId = isValidSpanId;
|
|
18324
|
+
function isSpanContextValid(spanContext) {
|
|
18325
|
+
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
18326
|
+
}
|
|
18327
|
+
exports.isSpanContextValid = isSpanContextValid;
|
|
18328
|
+
function wrapSpanContext(spanContext) {
|
|
18329
|
+
return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
|
|
18330
|
+
}
|
|
18331
|
+
exports.wrapSpanContext = wrapSpanContext;
|
|
18332
|
+
});
|
|
18333
|
+
|
|
18334
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
|
|
18335
|
+
var require_NoopTracer = __commonJS((exports) => {
|
|
18336
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18337
|
+
exports.NoopTracer = undefined;
|
|
18338
|
+
var context_1 = require_context2();
|
|
18339
|
+
var context_utils_1 = require_context_utils();
|
|
18340
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18341
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18342
|
+
var contextApi = context_1.ContextAPI.getInstance();
|
|
18343
|
+
|
|
18344
|
+
class NoopTracer {
|
|
18345
|
+
startSpan(name, options, context = contextApi.active()) {
|
|
18346
|
+
const root = Boolean(options === null || options === undefined ? undefined : options.root);
|
|
18347
|
+
if (root) {
|
|
18348
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18349
|
+
}
|
|
18350
|
+
const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
|
|
18351
|
+
if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
|
|
18352
|
+
return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
|
|
18353
|
+
} else {
|
|
18354
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18355
|
+
}
|
|
18356
|
+
}
|
|
18357
|
+
startActiveSpan(name, arg2, arg3, arg4) {
|
|
18358
|
+
let opts;
|
|
18359
|
+
let ctx;
|
|
18360
|
+
let fn;
|
|
18361
|
+
if (arguments.length < 2) {
|
|
18362
|
+
return;
|
|
18363
|
+
} else if (arguments.length === 2) {
|
|
18364
|
+
fn = arg2;
|
|
18365
|
+
} else if (arguments.length === 3) {
|
|
18366
|
+
opts = arg2;
|
|
18367
|
+
fn = arg3;
|
|
18368
|
+
} else {
|
|
18369
|
+
opts = arg2;
|
|
18370
|
+
ctx = arg3;
|
|
18371
|
+
fn = arg4;
|
|
18372
|
+
}
|
|
18373
|
+
const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
|
|
18374
|
+
const span = this.startSpan(name, opts, parentContext);
|
|
18375
|
+
const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
|
|
18376
|
+
return contextApi.with(contextWithSpanSet, fn, undefined, span);
|
|
18377
|
+
}
|
|
18378
|
+
}
|
|
18379
|
+
exports.NoopTracer = NoopTracer;
|
|
18380
|
+
function isSpanContext(spanContext) {
|
|
18381
|
+
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";
|
|
18382
|
+
}
|
|
18383
|
+
});
|
|
18384
|
+
|
|
18385
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
|
|
18386
|
+
var require_ProxyTracer = __commonJS((exports) => {
|
|
18387
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18388
|
+
exports.ProxyTracer = undefined;
|
|
18389
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18390
|
+
var NOOP_TRACER = new NoopTracer_1.NoopTracer;
|
|
18391
|
+
|
|
18392
|
+
class ProxyTracer {
|
|
18393
|
+
constructor(provider, name, version2, options) {
|
|
18394
|
+
this._provider = provider;
|
|
18395
|
+
this.name = name;
|
|
18396
|
+
this.version = version2;
|
|
18397
|
+
this.options = options;
|
|
18398
|
+
}
|
|
18399
|
+
startSpan(name, options, context) {
|
|
18400
|
+
return this._getTracer().startSpan(name, options, context);
|
|
18401
|
+
}
|
|
18402
|
+
startActiveSpan(_name, _options, _context, _fn) {
|
|
18403
|
+
const tracer = this._getTracer();
|
|
18404
|
+
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
18405
|
+
}
|
|
18406
|
+
_getTracer() {
|
|
18407
|
+
if (this._delegate) {
|
|
18408
|
+
return this._delegate;
|
|
18409
|
+
}
|
|
18410
|
+
const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
18411
|
+
if (!tracer) {
|
|
18412
|
+
return NOOP_TRACER;
|
|
18413
|
+
}
|
|
18414
|
+
this._delegate = tracer;
|
|
18415
|
+
return this._delegate;
|
|
18416
|
+
}
|
|
18417
|
+
}
|
|
18418
|
+
exports.ProxyTracer = ProxyTracer;
|
|
18419
|
+
});
|
|
18420
|
+
|
|
18421
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
|
|
18422
|
+
var require_NoopTracerProvider = __commonJS((exports) => {
|
|
18423
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18424
|
+
exports.NoopTracerProvider = undefined;
|
|
18425
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18426
|
+
|
|
18427
|
+
class NoopTracerProvider {
|
|
18428
|
+
getTracer(_name, _version, _options) {
|
|
18429
|
+
return new NoopTracer_1.NoopTracer;
|
|
18430
|
+
}
|
|
18431
|
+
}
|
|
18432
|
+
exports.NoopTracerProvider = NoopTracerProvider;
|
|
18433
|
+
});
|
|
18434
|
+
|
|
18435
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
|
|
18436
|
+
var require_ProxyTracerProvider = __commonJS((exports) => {
|
|
18437
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18438
|
+
exports.ProxyTracerProvider = undefined;
|
|
18439
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
18440
|
+
var NoopTracerProvider_1 = require_NoopTracerProvider();
|
|
18441
|
+
var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
|
|
18442
|
+
|
|
18443
|
+
class ProxyTracerProvider {
|
|
18444
|
+
getTracer(name, version2, options) {
|
|
18445
|
+
var _a3;
|
|
18446
|
+
return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
|
|
18447
|
+
}
|
|
18448
|
+
getDelegate() {
|
|
18449
|
+
var _a3;
|
|
18450
|
+
return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
|
|
18451
|
+
}
|
|
18452
|
+
setDelegate(delegate) {
|
|
18453
|
+
this._delegate = delegate;
|
|
18454
|
+
}
|
|
18455
|
+
getDelegateTracer(name, version2, options) {
|
|
18456
|
+
var _a3;
|
|
18457
|
+
return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
|
|
18458
|
+
}
|
|
18459
|
+
}
|
|
18460
|
+
exports.ProxyTracerProvider = ProxyTracerProvider;
|
|
18461
|
+
});
|
|
18462
|
+
|
|
18463
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
|
|
18464
|
+
var require_SamplingResult = __commonJS((exports) => {
|
|
18465
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18466
|
+
exports.SamplingDecision = undefined;
|
|
18467
|
+
var SamplingDecision;
|
|
18468
|
+
(function(SamplingDecision2) {
|
|
18469
|
+
SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
|
|
18470
|
+
SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
|
|
18471
|
+
SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
|
|
18472
|
+
})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
|
|
18473
|
+
});
|
|
18474
|
+
|
|
18475
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
|
|
18476
|
+
var require_span_kind = __commonJS((exports) => {
|
|
18477
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18478
|
+
exports.SpanKind = undefined;
|
|
18479
|
+
var SpanKind;
|
|
18480
|
+
(function(SpanKind2) {
|
|
18481
|
+
SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
|
|
18482
|
+
SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
|
|
18483
|
+
SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
|
|
18484
|
+
SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
|
|
18485
|
+
SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
|
|
18486
|
+
})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
|
|
18487
|
+
});
|
|
18488
|
+
|
|
18489
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/status.js
|
|
18490
|
+
var require_status = __commonJS((exports) => {
|
|
18491
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18492
|
+
exports.SpanStatusCode = undefined;
|
|
18493
|
+
var SpanStatusCode;
|
|
18494
|
+
(function(SpanStatusCode2) {
|
|
18495
|
+
SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
|
|
18496
|
+
SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
|
|
18497
|
+
SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
|
|
18498
|
+
})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
|
|
18499
|
+
});
|
|
18500
|
+
|
|
18501
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
|
|
18502
|
+
var require_tracestate_validators = __commonJS((exports) => {
|
|
18503
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18504
|
+
exports.validateValue = exports.validateKey = undefined;
|
|
18505
|
+
var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
18506
|
+
var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
|
|
18507
|
+
var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
18508
|
+
var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
18509
|
+
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
18510
|
+
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
18511
|
+
function validateKey(key) {
|
|
18512
|
+
return VALID_KEY_REGEX.test(key);
|
|
18513
|
+
}
|
|
18514
|
+
exports.validateKey = validateKey;
|
|
18515
|
+
function validateValue(value) {
|
|
18516
|
+
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
18517
|
+
}
|
|
18518
|
+
exports.validateValue = validateValue;
|
|
18519
|
+
});
|
|
18520
|
+
|
|
18521
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
|
|
18522
|
+
var require_tracestate_impl = __commonJS((exports) => {
|
|
18523
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18524
|
+
exports.TraceStateImpl = undefined;
|
|
18525
|
+
var tracestate_validators_1 = require_tracestate_validators();
|
|
18526
|
+
var MAX_TRACE_STATE_ITEMS = 32;
|
|
18527
|
+
var MAX_TRACE_STATE_LEN = 512;
|
|
18528
|
+
var LIST_MEMBERS_SEPARATOR = ",";
|
|
18529
|
+
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
18530
|
+
|
|
18531
|
+
class TraceStateImpl {
|
|
18532
|
+
constructor(rawTraceState) {
|
|
18533
|
+
this._internalState = new Map;
|
|
18534
|
+
if (rawTraceState)
|
|
18535
|
+
this._parse(rawTraceState);
|
|
18536
|
+
}
|
|
18537
|
+
set(key, value) {
|
|
18538
|
+
const traceState = this._clone();
|
|
18539
|
+
if (traceState._internalState.has(key)) {
|
|
18540
|
+
traceState._internalState.delete(key);
|
|
18541
|
+
}
|
|
18542
|
+
traceState._internalState.set(key, value);
|
|
18543
|
+
return traceState;
|
|
18544
|
+
}
|
|
18545
|
+
unset(key) {
|
|
18546
|
+
const traceState = this._clone();
|
|
18547
|
+
traceState._internalState.delete(key);
|
|
18548
|
+
return traceState;
|
|
18549
|
+
}
|
|
18550
|
+
get(key) {
|
|
18551
|
+
return this._internalState.get(key);
|
|
18552
|
+
}
|
|
18553
|
+
serialize() {
|
|
18554
|
+
return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
|
|
18555
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
|
|
18556
|
+
return agg;
|
|
18557
|
+
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
18558
|
+
}
|
|
18559
|
+
_parse(rawTraceState) {
|
|
18560
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
18561
|
+
return;
|
|
18562
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
|
|
18563
|
+
const listMember = part.trim();
|
|
18564
|
+
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
18565
|
+
if (i !== -1) {
|
|
18566
|
+
const key = listMember.slice(0, i);
|
|
18567
|
+
const value = listMember.slice(i + 1, part.length);
|
|
18568
|
+
if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
|
|
18569
|
+
agg.set(key, value);
|
|
18570
|
+
}
|
|
18571
|
+
}
|
|
18572
|
+
return agg;
|
|
18573
|
+
}, new Map);
|
|
18574
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
18575
|
+
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
18576
|
+
}
|
|
18577
|
+
}
|
|
18578
|
+
_keys() {
|
|
18579
|
+
return Array.from(this._internalState.keys()).reverse();
|
|
18580
|
+
}
|
|
18581
|
+
_clone() {
|
|
18582
|
+
const traceState = new TraceStateImpl;
|
|
18583
|
+
traceState._internalState = new Map(this._internalState);
|
|
18584
|
+
return traceState;
|
|
18585
|
+
}
|
|
18586
|
+
}
|
|
18587
|
+
exports.TraceStateImpl = TraceStateImpl;
|
|
18588
|
+
});
|
|
18589
|
+
|
|
18590
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
|
|
18591
|
+
var require_utils2 = __commonJS((exports) => {
|
|
18592
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18593
|
+
exports.createTraceState = undefined;
|
|
18594
|
+
var tracestate_impl_1 = require_tracestate_impl();
|
|
18595
|
+
function createTraceState(rawTraceState) {
|
|
18596
|
+
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
|
|
18597
|
+
}
|
|
18598
|
+
exports.createTraceState = createTraceState;
|
|
18599
|
+
});
|
|
18600
|
+
|
|
18601
|
+
// ../../node_modules/@opentelemetry/api/build/src/context-api.js
|
|
18602
|
+
var require_context_api = __commonJS((exports) => {
|
|
18603
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18604
|
+
exports.context = undefined;
|
|
18605
|
+
var context_1 = require_context2();
|
|
18606
|
+
exports.context = context_1.ContextAPI.getInstance();
|
|
18607
|
+
});
|
|
18608
|
+
|
|
18609
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag-api.js
|
|
18610
|
+
var require_diag_api = __commonJS((exports) => {
|
|
18611
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18612
|
+
exports.diag = undefined;
|
|
18613
|
+
var diag_1 = require_diag();
|
|
18614
|
+
exports.diag = diag_1.DiagAPI.instance();
|
|
18615
|
+
});
|
|
18616
|
+
|
|
18617
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
|
|
18618
|
+
var require_NoopMeterProvider = __commonJS((exports) => {
|
|
18619
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18620
|
+
exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
|
|
18621
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
18622
|
+
|
|
18623
|
+
class NoopMeterProvider {
|
|
18624
|
+
getMeter(_name, _version, _options) {
|
|
18625
|
+
return NoopMeter_1.NOOP_METER;
|
|
18626
|
+
}
|
|
18627
|
+
}
|
|
18628
|
+
exports.NoopMeterProvider = NoopMeterProvider;
|
|
18629
|
+
exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
|
|
18630
|
+
});
|
|
18631
|
+
|
|
18632
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
|
|
18633
|
+
var require_metrics = __commonJS((exports) => {
|
|
18634
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18635
|
+
exports.MetricsAPI = undefined;
|
|
18636
|
+
var NoopMeterProvider_1 = require_NoopMeterProvider();
|
|
18637
|
+
var global_utils_1 = require_global_utils();
|
|
18638
|
+
var diag_1 = require_diag();
|
|
18639
|
+
var API_NAME = "metrics";
|
|
18640
|
+
|
|
18641
|
+
class MetricsAPI {
|
|
18642
|
+
constructor() {}
|
|
18643
|
+
static getInstance() {
|
|
18644
|
+
if (!this._instance) {
|
|
18645
|
+
this._instance = new MetricsAPI;
|
|
18646
|
+
}
|
|
18647
|
+
return this._instance;
|
|
18648
|
+
}
|
|
18649
|
+
setGlobalMeterProvider(provider) {
|
|
18650
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
|
|
18651
|
+
}
|
|
18652
|
+
getMeterProvider() {
|
|
18653
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
|
|
18654
|
+
}
|
|
18655
|
+
getMeter(name, version2, options) {
|
|
18656
|
+
return this.getMeterProvider().getMeter(name, version2, options);
|
|
18657
|
+
}
|
|
18658
|
+
disable() {
|
|
18659
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18660
|
+
}
|
|
18661
|
+
}
|
|
18662
|
+
exports.MetricsAPI = MetricsAPI;
|
|
18663
|
+
});
|
|
18664
|
+
|
|
18665
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
|
|
18666
|
+
var require_metrics_api = __commonJS((exports) => {
|
|
18667
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18668
|
+
exports.metrics = undefined;
|
|
18669
|
+
var metrics_1 = require_metrics();
|
|
18670
|
+
exports.metrics = metrics_1.MetricsAPI.getInstance();
|
|
18671
|
+
});
|
|
18672
|
+
|
|
18673
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
|
|
18674
|
+
var require_NoopTextMapPropagator = __commonJS((exports) => {
|
|
18675
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18676
|
+
exports.NoopTextMapPropagator = undefined;
|
|
18677
|
+
|
|
18678
|
+
class NoopTextMapPropagator {
|
|
18679
|
+
inject(_context, _carrier) {}
|
|
18680
|
+
extract(context, _carrier) {
|
|
18681
|
+
return context;
|
|
18682
|
+
}
|
|
18683
|
+
fields() {
|
|
18684
|
+
return [];
|
|
18685
|
+
}
|
|
18686
|
+
}
|
|
18687
|
+
exports.NoopTextMapPropagator = NoopTextMapPropagator;
|
|
18688
|
+
});
|
|
18689
|
+
|
|
18690
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
|
|
18691
|
+
var require_context_helpers = __commonJS((exports) => {
|
|
18692
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18693
|
+
exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
|
|
18694
|
+
var context_1 = require_context2();
|
|
18695
|
+
var context_2 = require_context();
|
|
18696
|
+
var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
|
|
18697
|
+
function getBaggage(context) {
|
|
18698
|
+
return context.getValue(BAGGAGE_KEY) || undefined;
|
|
18699
|
+
}
|
|
18700
|
+
exports.getBaggage = getBaggage;
|
|
18701
|
+
function getActiveBaggage() {
|
|
18702
|
+
return getBaggage(context_1.ContextAPI.getInstance().active());
|
|
18703
|
+
}
|
|
18704
|
+
exports.getActiveBaggage = getActiveBaggage;
|
|
18705
|
+
function setBaggage(context, baggage) {
|
|
18706
|
+
return context.setValue(BAGGAGE_KEY, baggage);
|
|
18707
|
+
}
|
|
18708
|
+
exports.setBaggage = setBaggage;
|
|
18709
|
+
function deleteBaggage(context) {
|
|
18710
|
+
return context.deleteValue(BAGGAGE_KEY);
|
|
18711
|
+
}
|
|
18712
|
+
exports.deleteBaggage = deleteBaggage;
|
|
18713
|
+
});
|
|
18714
|
+
|
|
18715
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
|
|
18716
|
+
var require_propagation = __commonJS((exports) => {
|
|
18717
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18718
|
+
exports.PropagationAPI = undefined;
|
|
18719
|
+
var global_utils_1 = require_global_utils();
|
|
18720
|
+
var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
|
|
18721
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18722
|
+
var context_helpers_1 = require_context_helpers();
|
|
18723
|
+
var utils_1 = require_utils();
|
|
18724
|
+
var diag_1 = require_diag();
|
|
18725
|
+
var API_NAME = "propagation";
|
|
18726
|
+
var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
|
|
18727
|
+
|
|
18728
|
+
class PropagationAPI {
|
|
18729
|
+
constructor() {
|
|
18730
|
+
this.createBaggage = utils_1.createBaggage;
|
|
18731
|
+
this.getBaggage = context_helpers_1.getBaggage;
|
|
18732
|
+
this.getActiveBaggage = context_helpers_1.getActiveBaggage;
|
|
18733
|
+
this.setBaggage = context_helpers_1.setBaggage;
|
|
18734
|
+
this.deleteBaggage = context_helpers_1.deleteBaggage;
|
|
18735
|
+
}
|
|
18736
|
+
static getInstance() {
|
|
18737
|
+
if (!this._instance) {
|
|
18738
|
+
this._instance = new PropagationAPI;
|
|
18739
|
+
}
|
|
18740
|
+
return this._instance;
|
|
18741
|
+
}
|
|
18742
|
+
setGlobalPropagator(propagator) {
|
|
18743
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
|
|
18744
|
+
}
|
|
18745
|
+
inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
|
|
18746
|
+
return this._getGlobalPropagator().inject(context, carrier, setter);
|
|
18747
|
+
}
|
|
18748
|
+
extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
|
|
18749
|
+
return this._getGlobalPropagator().extract(context, carrier, getter);
|
|
18750
|
+
}
|
|
18751
|
+
fields() {
|
|
18752
|
+
return this._getGlobalPropagator().fields();
|
|
18753
|
+
}
|
|
18754
|
+
disable() {
|
|
18755
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18756
|
+
}
|
|
18757
|
+
_getGlobalPropagator() {
|
|
18758
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
|
|
18759
|
+
}
|
|
18760
|
+
}
|
|
18761
|
+
exports.PropagationAPI = PropagationAPI;
|
|
18762
|
+
});
|
|
18763
|
+
|
|
18764
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
|
|
18765
|
+
var require_propagation_api = __commonJS((exports) => {
|
|
18766
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18767
|
+
exports.propagation = undefined;
|
|
18768
|
+
var propagation_1 = require_propagation();
|
|
18769
|
+
exports.propagation = propagation_1.PropagationAPI.getInstance();
|
|
18770
|
+
});
|
|
18771
|
+
|
|
18772
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/trace.js
|
|
18773
|
+
var require_trace = __commonJS((exports) => {
|
|
18774
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18775
|
+
exports.TraceAPI = undefined;
|
|
18776
|
+
var global_utils_1 = require_global_utils();
|
|
18777
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18778
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18779
|
+
var context_utils_1 = require_context_utils();
|
|
18780
|
+
var diag_1 = require_diag();
|
|
18781
|
+
var API_NAME = "trace";
|
|
18782
|
+
|
|
18783
|
+
class TraceAPI {
|
|
18784
|
+
constructor() {
|
|
18785
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18786
|
+
this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
|
|
18787
|
+
this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
|
|
18788
|
+
this.deleteSpan = context_utils_1.deleteSpan;
|
|
18789
|
+
this.getSpan = context_utils_1.getSpan;
|
|
18790
|
+
this.getActiveSpan = context_utils_1.getActiveSpan;
|
|
18791
|
+
this.getSpanContext = context_utils_1.getSpanContext;
|
|
18792
|
+
this.setSpan = context_utils_1.setSpan;
|
|
18793
|
+
this.setSpanContext = context_utils_1.setSpanContext;
|
|
18794
|
+
}
|
|
18795
|
+
static getInstance() {
|
|
18796
|
+
if (!this._instance) {
|
|
18797
|
+
this._instance = new TraceAPI;
|
|
18798
|
+
}
|
|
18799
|
+
return this._instance;
|
|
18800
|
+
}
|
|
18801
|
+
setGlobalTracerProvider(provider) {
|
|
18802
|
+
const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
|
|
18803
|
+
if (success3) {
|
|
18804
|
+
this._proxyTracerProvider.setDelegate(provider);
|
|
18805
|
+
}
|
|
18806
|
+
return success3;
|
|
18807
|
+
}
|
|
18808
|
+
getTracerProvider() {
|
|
18809
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
|
|
18810
|
+
}
|
|
18811
|
+
getTracer(name, version2) {
|
|
18812
|
+
return this.getTracerProvider().getTracer(name, version2);
|
|
18813
|
+
}
|
|
18814
|
+
disable() {
|
|
18815
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18816
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18817
|
+
}
|
|
18818
|
+
}
|
|
18819
|
+
exports.TraceAPI = TraceAPI;
|
|
18820
|
+
});
|
|
18821
|
+
|
|
18822
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace-api.js
|
|
18823
|
+
var require_trace_api = __commonJS((exports) => {
|
|
18824
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18825
|
+
exports.trace = undefined;
|
|
18826
|
+
var trace_1 = require_trace();
|
|
18827
|
+
exports.trace = trace_1.TraceAPI.getInstance();
|
|
18828
|
+
});
|
|
18829
|
+
|
|
18830
|
+
// ../../node_modules/@opentelemetry/api/build/src/index.js
|
|
18831
|
+
var require_src = __commonJS((exports) => {
|
|
18832
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18833
|
+
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;
|
|
18834
|
+
var utils_1 = require_utils();
|
|
18835
|
+
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
|
|
18836
|
+
return utils_1.baggageEntryMetadataFromString;
|
|
18837
|
+
} });
|
|
18838
|
+
var context_1 = require_context();
|
|
18839
|
+
Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
|
|
18840
|
+
return context_1.createContextKey;
|
|
18841
|
+
} });
|
|
18842
|
+
Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
|
|
18843
|
+
return context_1.ROOT_CONTEXT;
|
|
18844
|
+
} });
|
|
18845
|
+
var consoleLogger_1 = require_consoleLogger();
|
|
18846
|
+
Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
|
|
18847
|
+
return consoleLogger_1.DiagConsoleLogger;
|
|
18848
|
+
} });
|
|
18849
|
+
var types_1 = require_types();
|
|
18850
|
+
Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
|
|
18851
|
+
return types_1.DiagLogLevel;
|
|
18852
|
+
} });
|
|
18853
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
18854
|
+
Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
|
|
18855
|
+
return NoopMeter_1.createNoopMeter;
|
|
18856
|
+
} });
|
|
18857
|
+
var Metric_1 = require_Metric();
|
|
18858
|
+
Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
|
|
18859
|
+
return Metric_1.ValueType;
|
|
18860
|
+
} });
|
|
18861
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18862
|
+
Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
|
|
18863
|
+
return TextMapPropagator_1.defaultTextMapGetter;
|
|
18864
|
+
} });
|
|
18865
|
+
Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
|
|
18866
|
+
return TextMapPropagator_1.defaultTextMapSetter;
|
|
18867
|
+
} });
|
|
18868
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
18869
|
+
Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
|
|
18870
|
+
return ProxyTracer_1.ProxyTracer;
|
|
18871
|
+
} });
|
|
18872
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18873
|
+
Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
|
|
18874
|
+
return ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18875
|
+
} });
|
|
18876
|
+
var SamplingResult_1 = require_SamplingResult();
|
|
18877
|
+
Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
|
|
18878
|
+
return SamplingResult_1.SamplingDecision;
|
|
18879
|
+
} });
|
|
18880
|
+
var span_kind_1 = require_span_kind();
|
|
18881
|
+
Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
|
|
18882
|
+
return span_kind_1.SpanKind;
|
|
18883
|
+
} });
|
|
18884
|
+
var status_1 = require_status();
|
|
18885
|
+
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
|
|
18886
|
+
return status_1.SpanStatusCode;
|
|
18887
|
+
} });
|
|
18888
|
+
var trace_flags_1 = require_trace_flags();
|
|
18889
|
+
Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
|
|
18890
|
+
return trace_flags_1.TraceFlags;
|
|
18891
|
+
} });
|
|
18892
|
+
var utils_2 = require_utils2();
|
|
18893
|
+
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
|
|
18894
|
+
return utils_2.createTraceState;
|
|
18895
|
+
} });
|
|
18896
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18897
|
+
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
|
|
18898
|
+
return spancontext_utils_1.isSpanContextValid;
|
|
18899
|
+
} });
|
|
18900
|
+
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
|
|
18901
|
+
return spancontext_utils_1.isValidTraceId;
|
|
18902
|
+
} });
|
|
18903
|
+
Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
|
|
18904
|
+
return spancontext_utils_1.isValidSpanId;
|
|
18905
|
+
} });
|
|
18906
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18907
|
+
Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
|
|
18908
|
+
return invalid_span_constants_1.INVALID_SPANID;
|
|
18909
|
+
} });
|
|
18910
|
+
Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
|
|
18911
|
+
return invalid_span_constants_1.INVALID_TRACEID;
|
|
18912
|
+
} });
|
|
18913
|
+
Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
|
|
18914
|
+
return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
|
|
18915
|
+
} });
|
|
18916
|
+
var context_api_1 = require_context_api();
|
|
18917
|
+
Object.defineProperty(exports, "context", { enumerable: true, get: function() {
|
|
18918
|
+
return context_api_1.context;
|
|
18919
|
+
} });
|
|
18920
|
+
var diag_api_1 = require_diag_api();
|
|
18921
|
+
Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
|
|
18922
|
+
return diag_api_1.diag;
|
|
18923
|
+
} });
|
|
18924
|
+
var metrics_api_1 = require_metrics_api();
|
|
18925
|
+
Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
|
|
18926
|
+
return metrics_api_1.metrics;
|
|
18927
|
+
} });
|
|
18928
|
+
var propagation_api_1 = require_propagation_api();
|
|
18929
|
+
Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
|
|
18930
|
+
return propagation_api_1.propagation;
|
|
18931
|
+
} });
|
|
18932
|
+
var trace_api_1 = require_trace_api();
|
|
18933
|
+
Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
|
|
18934
|
+
return trace_api_1.trace;
|
|
18935
|
+
} });
|
|
18936
|
+
exports.default = {
|
|
18937
|
+
context: context_api_1.context,
|
|
18938
|
+
diag: diag_api_1.diag,
|
|
18939
|
+
metrics: metrics_api_1.metrics,
|
|
18940
|
+
propagation: propagation_api_1.propagation,
|
|
18941
|
+
trace: trace_api_1.trace
|
|
18942
|
+
};
|
|
18943
|
+
});
|
|
18944
|
+
|
|
18945
|
+
// ../types/src/processor/processor.ts
|
|
18946
|
+
var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
|
|
18947
|
+
var init_processor = __esm(() => {
|
|
18948
|
+
init_zod();
|
|
18949
|
+
init_common();
|
|
18950
|
+
import_api = __toESM(require_src(), 1);
|
|
18951
|
+
noopTracingContext = {
|
|
18952
|
+
traceId: "",
|
|
18953
|
+
getActiveSpan() {
|
|
18954
|
+
return;
|
|
18955
|
+
},
|
|
18956
|
+
async withSpan(_name, _options, fn) {
|
|
18957
|
+
const noopSpan = {
|
|
18958
|
+
spanContext: () => ({
|
|
18959
|
+
traceId: "",
|
|
18960
|
+
spanId: "",
|
|
18961
|
+
traceFlags: 0
|
|
18962
|
+
}),
|
|
18963
|
+
setAttribute: () => noopSpan,
|
|
18964
|
+
setAttributes: () => noopSpan,
|
|
18965
|
+
addEvent: () => noopSpan,
|
|
18966
|
+
addLink: () => noopSpan,
|
|
18967
|
+
addLinks: () => noopSpan,
|
|
18968
|
+
setStatus: () => noopSpan,
|
|
18969
|
+
updateName: () => noopSpan,
|
|
18970
|
+
end: () => {},
|
|
18971
|
+
isRecording: () => false,
|
|
18972
|
+
recordException: () => {}
|
|
18973
|
+
};
|
|
18974
|
+
return fn(noopSpan);
|
|
18975
|
+
}
|
|
18976
|
+
};
|
|
18977
|
+
ProcessorPortSchema = exports_external.object({
|
|
18978
|
+
name: exports_external.string(),
|
|
18979
|
+
schema: JsonSchemaSchema,
|
|
18980
|
+
required: exports_external.boolean().default(true)
|
|
18981
|
+
});
|
|
18982
|
+
ProcessorDefinitionSchema = exports_external.object({
|
|
18983
|
+
id: exports_external.string(),
|
|
18984
|
+
name: exports_external.string(),
|
|
18985
|
+
description: exports_external.string().optional(),
|
|
18986
|
+
inputSchema: JsonSchemaSchema,
|
|
18987
|
+
outputSchema: JsonSchemaSchema,
|
|
18988
|
+
configSchema: JsonSchemaSchema.optional(),
|
|
18989
|
+
inputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
18990
|
+
outputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
18991
|
+
isBuiltin: exports_external.boolean().default(true),
|
|
18992
|
+
pluginName: exports_external.string().optional()
|
|
18993
|
+
});
|
|
18994
|
+
ProcessorExecutionContextSchema = exports_external.object({
|
|
18995
|
+
jobId: exports_external.string(),
|
|
18996
|
+
stepId: exports_external.string(),
|
|
18997
|
+
tenantId: exports_external.string(),
|
|
18998
|
+
automationId: exports_external.string().optional(),
|
|
18999
|
+
workflowId: exports_external.string(),
|
|
19000
|
+
workerId: exports_external.string().optional()
|
|
19001
|
+
});
|
|
19002
|
+
((TraceStatus2) => {
|
|
19003
|
+
TraceStatus2["PENDING"] = "pending";
|
|
19004
|
+
TraceStatus2["RUNNING"] = "running";
|
|
19005
|
+
TraceStatus2["COMPLETED"] = "completed";
|
|
19006
|
+
TraceStatus2["FAILED"] = "failed";
|
|
19007
|
+
})(TraceStatus ||= {});
|
|
19008
|
+
});
|
|
19009
|
+
|
|
19010
|
+
// ../types/src/processor/execution.ts
|
|
19011
|
+
function asTuple(values) {
|
|
19012
|
+
return values;
|
|
19013
|
+
}
|
|
19014
|
+
var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
|
|
19015
|
+
var init_execution = __esm(() => {
|
|
19016
|
+
init_zod();
|
|
19017
|
+
WorkflowExecutionStatusValue = {
|
|
19018
|
+
CREATED: "created",
|
|
19019
|
+
PENDING: "pending",
|
|
19020
|
+
RUNNING: "running",
|
|
19021
|
+
WAITING: "waiting",
|
|
19022
|
+
COMPLETED: "completed",
|
|
19023
|
+
FAILED: "failed",
|
|
19024
|
+
CANCELLED: "cancelled"
|
|
19025
|
+
};
|
|
19026
|
+
WorkflowExecutionStatusSchema = exports_external.enum([
|
|
19027
|
+
WorkflowExecutionStatusValue.CREATED,
|
|
19028
|
+
WorkflowExecutionStatusValue.PENDING,
|
|
19029
|
+
WorkflowExecutionStatusValue.RUNNING,
|
|
19030
|
+
WorkflowExecutionStatusValue.WAITING,
|
|
19031
|
+
WorkflowExecutionStatusValue.COMPLETED,
|
|
19032
|
+
WorkflowExecutionStatusValue.FAILED,
|
|
19033
|
+
WorkflowExecutionStatusValue.CANCELLED
|
|
19034
|
+
]);
|
|
19035
|
+
StepExecutionStatusValue = {
|
|
19036
|
+
PENDING: "pending",
|
|
19037
|
+
RUNNING: "running",
|
|
19038
|
+
SUCCESS: "success",
|
|
19039
|
+
FAILURE: "failure",
|
|
19040
|
+
WAITING: "waiting",
|
|
19041
|
+
SKIPPED: "skipped"
|
|
19042
|
+
};
|
|
19043
|
+
StepExecutionStatusSchema = exports_external.enum([
|
|
19044
|
+
StepExecutionStatusValue.PENDING,
|
|
19045
|
+
StepExecutionStatusValue.RUNNING,
|
|
19046
|
+
StepExecutionStatusValue.SUCCESS,
|
|
19047
|
+
StepExecutionStatusValue.FAILURE,
|
|
19048
|
+
StepExecutionStatusValue.WAITING,
|
|
19049
|
+
StepExecutionStatusValue.SKIPPED
|
|
19050
|
+
]);
|
|
19051
|
+
TriggerTypeValue = {
|
|
19052
|
+
MANUAL: "manual",
|
|
19053
|
+
API: "api",
|
|
19054
|
+
WEBHOOK: "webhook",
|
|
19055
|
+
SCHEDULE: "schedule",
|
|
19056
|
+
EMAIL: "email",
|
|
19057
|
+
EVAL: "eval",
|
|
19058
|
+
CLI: "cli"
|
|
19059
|
+
};
|
|
19060
|
+
TriggerTypeSchema = exports_external.enum([
|
|
19061
|
+
TriggerTypeValue.MANUAL,
|
|
19062
|
+
TriggerTypeValue.API,
|
|
19063
|
+
TriggerTypeValue.WEBHOOK,
|
|
19064
|
+
TriggerTypeValue.SCHEDULE,
|
|
19065
|
+
TriggerTypeValue.EMAIL,
|
|
19066
|
+
TriggerTypeValue.EVAL,
|
|
19067
|
+
TriggerTypeValue.CLI
|
|
19068
|
+
]);
|
|
19069
|
+
ExecutionTypeValue = {
|
|
19070
|
+
PROD: "prod",
|
|
19071
|
+
EVAL: "eval",
|
|
19072
|
+
PLAYGROUND: "playground"
|
|
19073
|
+
};
|
|
19074
|
+
ExecutionTypeSchema = exports_external.enum([
|
|
19075
|
+
ExecutionTypeValue.PROD,
|
|
19076
|
+
ExecutionTypeValue.EVAL,
|
|
19077
|
+
ExecutionTypeValue.PLAYGROUND
|
|
19078
|
+
]);
|
|
19079
|
+
WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
|
|
19080
|
+
STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
|
|
19081
|
+
TRIGGER_TYPES = TriggerTypeSchema.options;
|
|
19082
|
+
EXECUTION_TYPES = ExecutionTypeSchema.options;
|
|
19083
|
+
});
|
|
19084
|
+
|
|
19085
|
+
// ../types/src/processor/configs/classify.ts
|
|
19086
|
+
var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
|
|
19087
|
+
var init_classify = __esm(() => {
|
|
19088
|
+
init_zod();
|
|
19089
|
+
ClassifyInputSchema = exports_external.object({
|
|
19090
|
+
content: exports_external.string().optional().describe("Text content to classify"),
|
|
19091
|
+
text: exports_external.string().optional().describe("Text content (alternative to content)")
|
|
19092
|
+
}).refine((data) => !!(data.content || data.text), {
|
|
19093
|
+
message: "Either content or text must be provided"
|
|
19094
|
+
});
|
|
19095
|
+
ClassifyLabelSchema = exports_external.object({
|
|
19096
|
+
name: exports_external.string().min(1).describe("Label value returned in output.label"),
|
|
19097
|
+
description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
|
|
19098
|
+
});
|
|
19099
|
+
ClassifyConfigSchema = exports_external.object({
|
|
19100
|
+
labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
|
|
19101
|
+
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."),
|
|
19102
|
+
provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
|
|
19103
|
+
model: exports_external.string().optional().describe("Model override"),
|
|
19104
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
|
|
19105
|
+
});
|
|
19106
|
+
ClassifyOutputSchema = exports_external.object({
|
|
19107
|
+
label: exports_external.string().describe("The selected label name"),
|
|
19108
|
+
confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
|
|
19109
|
+
reason: exports_external.string().describe("Short justification for the chosen label")
|
|
19110
|
+
});
|
|
19111
|
+
});
|
|
19112
|
+
|
|
19113
|
+
// ../types/src/parser/parser.ts
|
|
19114
|
+
function resolveEffectiveMimeType(filename, declaredMimeType) {
|
|
19115
|
+
const ext = filename.split(".").pop()?.toLowerCase();
|
|
19116
|
+
if (!ext)
|
|
19117
|
+
return declaredMimeType;
|
|
19118
|
+
const extensionMime = EXTENSION_TO_MIME[ext];
|
|
19119
|
+
return extensionMime ?? declaredMimeType;
|
|
19120
|
+
}
|
|
19121
|
+
function mimeTypeForExtension(extension) {
|
|
19122
|
+
return EXTENSION_TO_MIME[extension.replace(/^\./, "").toLowerCase()];
|
|
19123
|
+
}
|
|
19124
|
+
function extensionForMimeType(mimeType) {
|
|
19125
|
+
const base = mimeType.split(";")[0]?.trim().toLowerCase();
|
|
19126
|
+
return base ? MIME_TO_EXTENSION[base] : undefined;
|
|
19127
|
+
}
|
|
19128
|
+
function getParserCategory(mimeType) {
|
|
19129
|
+
const normalized = mimeType.toLowerCase().trim();
|
|
19130
|
+
if (ParserCategory.PLAINTEXT.includes(normalized)) {
|
|
19131
|
+
return "plaintext";
|
|
19132
|
+
}
|
|
19133
|
+
if (ParserCategory.OFFICE.includes(normalized)) {
|
|
19134
|
+
return "office";
|
|
19135
|
+
}
|
|
19136
|
+
if (ParserCategory.DOCUMENT.includes(normalized)) {
|
|
19137
|
+
return "document";
|
|
19138
|
+
}
|
|
19139
|
+
return null;
|
|
19140
|
+
}
|
|
19141
|
+
function requiresSpecializedParser(mimeType) {
|
|
19142
|
+
return getParserCategory(mimeType) === "document";
|
|
19143
|
+
}
|
|
19144
|
+
function getAllSupportedMimeTypes() {
|
|
19145
|
+
return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
|
|
19146
|
+
}
|
|
19147
|
+
function getSupportedFormatsLabel() {
|
|
19148
|
+
const allMimes = getAllSupportedMimeTypes();
|
|
19149
|
+
const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
|
|
19150
|
+
return labels.join(", ");
|
|
19151
|
+
}
|
|
19152
|
+
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_EXTENSION, MIME_TO_LABEL;
|
|
19153
|
+
var init_parser = __esm(() => {
|
|
19154
|
+
init_zod();
|
|
19155
|
+
OFFICE_MIME_TYPES = [
|
|
19156
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19157
|
+
"application/msword",
|
|
19158
|
+
"application/vnd.oasis.opendocument.text",
|
|
19159
|
+
"application/rtf",
|
|
19160
|
+
"text/rtf",
|
|
19161
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19162
|
+
"application/vnd.ms-excel",
|
|
19163
|
+
"application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19164
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19165
|
+
"application/vnd.oasis.opendocument.spreadsheet",
|
|
19166
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19167
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19168
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19169
|
+
"application/vnd.ms-powerpoint",
|
|
19170
|
+
"application/vnd.oasis.opendocument.presentation",
|
|
19171
|
+
"message/rfc822",
|
|
19172
|
+
"application/vnd.ms-outlook",
|
|
19173
|
+
"application/epub+zip"
|
|
19174
|
+
];
|
|
19175
|
+
ParserCategory = {
|
|
19176
|
+
PLAINTEXT: [
|
|
19177
|
+
"text/plain",
|
|
19178
|
+
"text/markdown",
|
|
19179
|
+
"text/csv",
|
|
19180
|
+
"text/tab-separated-values",
|
|
19181
|
+
"text/html",
|
|
19182
|
+
"text/xml",
|
|
19183
|
+
"application/json",
|
|
19184
|
+
"application/x-yaml",
|
|
19185
|
+
"application/toml",
|
|
19186
|
+
"image/svg+xml",
|
|
19187
|
+
"text/x-rst",
|
|
19188
|
+
"text/x-org",
|
|
19189
|
+
"application/x-latex",
|
|
19190
|
+
"application/x-ipynb+json",
|
|
19191
|
+
"application/x-bibtex",
|
|
19192
|
+
"application/docbook+xml",
|
|
19193
|
+
"application/x-fictionbook+xml"
|
|
19194
|
+
],
|
|
19195
|
+
OFFICE: [...OFFICE_MIME_TYPES],
|
|
19196
|
+
DOCUMENT: [
|
|
19197
|
+
"application/pdf",
|
|
19198
|
+
"image/png",
|
|
19199
|
+
"image/jpeg",
|
|
19200
|
+
"image/webp",
|
|
19201
|
+
"image/tiff",
|
|
19202
|
+
"image/gif",
|
|
19203
|
+
"image/bmp"
|
|
19204
|
+
]
|
|
19205
|
+
};
|
|
19206
|
+
ParserTypeSchema = exports_external.enum([
|
|
19207
|
+
"plaintext",
|
|
19208
|
+
"office",
|
|
19209
|
+
"llm-vision",
|
|
19210
|
+
"ocr"
|
|
19211
|
+
]);
|
|
19212
|
+
DocumentMetadataSchema = exports_external.object({
|
|
19213
|
+
filename: exports_external.string(),
|
|
19214
|
+
mimeType: exports_external.string(),
|
|
19215
|
+
size: exports_external.number().describe("File size in bytes"),
|
|
19216
|
+
storageRef: exports_external.string().optional().describe("Storage reference for the original file")
|
|
19217
|
+
});
|
|
19218
|
+
ParseUsageSchema = exports_external.object({
|
|
19219
|
+
pageCount: exports_external.number(),
|
|
19220
|
+
processingTimeMs: exports_external.number().optional()
|
|
19221
|
+
});
|
|
19222
|
+
CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
|
|
19223
|
+
PointSchema = exports_external.object({
|
|
19224
|
+
x: exports_external.number(),
|
|
19225
|
+
y: exports_external.number()
|
|
19226
|
+
});
|
|
19227
|
+
BoundingRegionSchema = exports_external.object({
|
|
19228
|
+
polygon: exports_external.array(PointSchema).min(3),
|
|
19229
|
+
unit: CoordinateUnitSchema,
|
|
19230
|
+
pageIndex: exports_external.number()
|
|
19231
|
+
});
|
|
19232
|
+
PositionedTextSchema = exports_external.object({
|
|
19233
|
+
text: exports_external.string(),
|
|
19234
|
+
confidence: exports_external.number().min(0).max(1).optional(),
|
|
19235
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19236
|
+
});
|
|
19237
|
+
TableCellSchema = exports_external.object({
|
|
19238
|
+
content: exports_external.string(),
|
|
19239
|
+
rowIndex: exports_external.number(),
|
|
19240
|
+
columnIndex: exports_external.number(),
|
|
19241
|
+
rowSpan: exports_external.number().default(1),
|
|
19242
|
+
columnSpan: exports_external.number().default(1),
|
|
19243
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19244
|
+
});
|
|
19245
|
+
ExtractedTableSchema = exports_external.object({
|
|
19246
|
+
cells: exports_external.array(TableCellSchema),
|
|
19247
|
+
rowCount: exports_external.number(),
|
|
19248
|
+
columnCount: exports_external.number(),
|
|
19249
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19250
|
+
});
|
|
19251
|
+
LayoutElementTypeSchema = exports_external.enum([
|
|
19252
|
+
"paragraph",
|
|
19253
|
+
"title",
|
|
19254
|
+
"sectionHeading",
|
|
19255
|
+
"pageHeader",
|
|
19256
|
+
"pageFooter",
|
|
19257
|
+
"pageNumber",
|
|
19258
|
+
"footnote",
|
|
19259
|
+
"table",
|
|
19260
|
+
"figure",
|
|
19261
|
+
"formulaBlock"
|
|
19262
|
+
]);
|
|
19263
|
+
LayoutElementSchema = exports_external.object({
|
|
19264
|
+
type: LayoutElementTypeSchema,
|
|
19265
|
+
content: exports_external.string(),
|
|
19266
|
+
table: ExtractedTableSchema.optional(),
|
|
19267
|
+
caption: exports_external.string().optional(),
|
|
19268
|
+
figureId: exports_external.string().optional(),
|
|
19269
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19270
|
+
});
|
|
19271
|
+
PageResultSchema = exports_external.object({
|
|
19272
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19273
|
+
text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
|
|
19274
|
+
pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
|
|
19275
|
+
layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
|
|
19276
|
+
words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
|
|
19277
|
+
lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
|
|
19278
|
+
tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
|
|
19279
|
+
width: exports_external.number().optional().describe("Page width"),
|
|
19280
|
+
height: exports_external.number().optional().describe("Page height"),
|
|
19281
|
+
unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
|
|
19282
|
+
confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
|
|
19283
|
+
});
|
|
19284
|
+
ParseResultSchema = exports_external.object({
|
|
19285
|
+
document: DocumentMetadataSchema,
|
|
19286
|
+
usage: ParseUsageSchema,
|
|
19287
|
+
pages: exports_external.array(PageResultSchema),
|
|
19288
|
+
text: exports_external.string().describe("Combined text from all pages"),
|
|
19289
|
+
parserType: ParserTypeSchema,
|
|
19290
|
+
parserVersion: exports_external.string().optional(),
|
|
19291
|
+
model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
|
|
19292
|
+
rawResponse: exports_external.unknown().optional()
|
|
19293
|
+
});
|
|
19294
|
+
ParseOptionsSchema = exports_external.object({
|
|
19295
|
+
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
|
|
19296
|
+
ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
|
|
19297
|
+
includeWordPositions: exports_external.boolean().default(false),
|
|
19298
|
+
includeLinePositions: exports_external.boolean().default(false),
|
|
19299
|
+
extractTables: exports_external.boolean().default(true),
|
|
19300
|
+
provider: exports_external.string().optional().describe("LLM provider ID to use"),
|
|
19301
|
+
model: exports_external.string().optional(),
|
|
19302
|
+
maxConcurrency: exports_external.number().min(1).max(30).default(3),
|
|
19303
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5),
|
|
19304
|
+
prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
|
|
19305
|
+
languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
|
|
19306
|
+
tenantId: exports_external.string().optional()
|
|
19307
|
+
});
|
|
19308
|
+
ParserInputSchema = exports_external.object({
|
|
19309
|
+
data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
|
|
19310
|
+
filename: exports_external.string(),
|
|
19311
|
+
mimeType: exports_external.string(),
|
|
19312
|
+
options: ParseOptionsSchema.optional()
|
|
19313
|
+
});
|
|
19314
|
+
EXTENSION_TO_MIME = {
|
|
19315
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19316
|
+
doc: "application/msword",
|
|
19317
|
+
odt: "application/vnd.oasis.opendocument.text",
|
|
19318
|
+
rtf: "application/rtf",
|
|
19319
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19320
|
+
xls: "application/vnd.ms-excel",
|
|
19321
|
+
xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19322
|
+
xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19323
|
+
ods: "application/vnd.oasis.opendocument.spreadsheet",
|
|
19324
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19325
|
+
ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19326
|
+
pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19327
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
19328
|
+
odp: "application/vnd.oasis.opendocument.presentation",
|
|
19329
|
+
eml: "message/rfc822",
|
|
19330
|
+
msg: "application/vnd.ms-outlook",
|
|
19331
|
+
epub: "application/epub+zip",
|
|
19332
|
+
pdf: "application/pdf",
|
|
19333
|
+
png: "image/png",
|
|
19334
|
+
jpg: "image/jpeg",
|
|
19335
|
+
jpeg: "image/jpeg",
|
|
19336
|
+
webp: "image/webp",
|
|
19337
|
+
tiff: "image/tiff",
|
|
19338
|
+
tif: "image/tiff",
|
|
19339
|
+
gif: "image/gif",
|
|
19340
|
+
bmp: "image/bmp",
|
|
19341
|
+
svg: "image/svg+xml",
|
|
19342
|
+
txt: "text/plain",
|
|
19343
|
+
md: "text/markdown",
|
|
19344
|
+
markdown: "text/markdown",
|
|
19345
|
+
csv: "text/csv",
|
|
19346
|
+
tsv: "text/tab-separated-values",
|
|
19347
|
+
html: "text/html",
|
|
19348
|
+
htm: "text/html",
|
|
19349
|
+
xml: "text/xml",
|
|
19350
|
+
json: "application/json",
|
|
19351
|
+
yaml: "application/x-yaml",
|
|
19352
|
+
yml: "application/x-yaml",
|
|
19353
|
+
toml: "application/toml",
|
|
19354
|
+
rst: "text/x-rst",
|
|
19355
|
+
org: "text/x-org",
|
|
19356
|
+
tex: "application/x-latex",
|
|
19357
|
+
latex: "application/x-latex",
|
|
19358
|
+
ipynb: "application/x-ipynb+json",
|
|
19359
|
+
bib: "application/x-bibtex",
|
|
19360
|
+
dbk: "application/docbook+xml",
|
|
19361
|
+
docbook: "application/docbook+xml",
|
|
19362
|
+
fb2: "application/x-fictionbook+xml"
|
|
19363
|
+
};
|
|
19364
|
+
MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
|
|
19365
|
+
if (!(mime in acc))
|
|
19366
|
+
acc[mime] = ext;
|
|
19367
|
+
return acc;
|
|
19368
|
+
}, {});
|
|
19369
|
+
MIME_TO_LABEL = {
|
|
19370
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
|
|
19371
|
+
"application/msword": "DOC",
|
|
19372
|
+
"application/vnd.oasis.opendocument.text": "ODT",
|
|
19373
|
+
"application/rtf": "RTF",
|
|
19374
|
+
"text/rtf": "RTF",
|
|
19375
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
|
|
19376
|
+
"application/vnd.ms-excel": "XLS",
|
|
19377
|
+
"application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
|
|
19378
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
|
|
19379
|
+
"application/vnd.oasis.opendocument.spreadsheet": "ODS",
|
|
19380
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
|
|
19381
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
|
|
19382
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
|
|
19383
|
+
"application/vnd.ms-powerpoint": "PPT",
|
|
19384
|
+
"application/vnd.oasis.opendocument.presentation": "ODP",
|
|
19385
|
+
"message/rfc822": "EML",
|
|
19386
|
+
"application/vnd.ms-outlook": "MSG",
|
|
19387
|
+
"application/epub+zip": "EPUB",
|
|
19388
|
+
"application/pdf": "PDF",
|
|
19389
|
+
"image/png": "PNG",
|
|
19390
|
+
"image/jpeg": "JPEG",
|
|
19391
|
+
"image/webp": "WebP",
|
|
19392
|
+
"image/tiff": "TIFF",
|
|
19393
|
+
"image/gif": "GIF",
|
|
19394
|
+
"image/bmp": "BMP",
|
|
19395
|
+
"image/svg+xml": "SVG",
|
|
19396
|
+
"text/plain": "TXT",
|
|
19397
|
+
"text/markdown": "Markdown",
|
|
19398
|
+
"text/csv": "CSV",
|
|
19399
|
+
"text/tab-separated-values": "TSV",
|
|
19400
|
+
"text/html": "HTML",
|
|
19401
|
+
"text/xml": "XML",
|
|
19402
|
+
"application/json": "JSON",
|
|
19403
|
+
"application/x-yaml": "YAML",
|
|
19404
|
+
"application/toml": "TOML",
|
|
19405
|
+
"text/x-rst": "RST",
|
|
19406
|
+
"text/x-org": "Org",
|
|
19407
|
+
"application/x-latex": "LaTeX",
|
|
19408
|
+
"application/x-ipynb+json": "Jupyter",
|
|
19409
|
+
"application/x-bibtex": "BibTeX",
|
|
19410
|
+
"application/docbook+xml": "DocBook",
|
|
19411
|
+
"application/x-fictionbook+xml": "FB2"
|
|
19412
|
+
};
|
|
19413
|
+
});
|
|
19414
|
+
|
|
19415
|
+
// ../types/src/processor/configs/document-parser.ts
|
|
19416
|
+
var DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
|
|
19417
|
+
var init_document_parser = __esm(() => {
|
|
19418
|
+
init_zod();
|
|
19419
|
+
init_runtime_file_ref();
|
|
19420
|
+
init_parser();
|
|
19421
|
+
DocumentParserInputSchema = ResolvedProcessorFileSchema;
|
|
19422
|
+
DocumentParserOutputSchema = ParseResultSchema;
|
|
19423
|
+
DocumentParserConfigSchema = exports_external.object({
|
|
19424
|
+
ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
|
|
19425
|
+
llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
|
|
19426
|
+
maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
|
|
19427
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
|
|
19428
|
+
prompt: exports_external.string().optional().describe("Custom extraction prompt"),
|
|
19429
|
+
nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
|
|
19430
|
+
languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
|
|
19431
|
+
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.")
|
|
19432
|
+
}).prefault({});
|
|
19433
|
+
});
|
|
19434
|
+
|
|
19435
|
+
// ../types/src/processor/configs/extract.ts
|
|
19436
|
+
var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
|
|
19437
|
+
var init_extract = __esm(() => {
|
|
19438
|
+
init_zod();
|
|
19439
|
+
ExtractInputSchema = exports_external.object({
|
|
19440
|
+
content: exports_external.string().optional().describe("Text content to extract from"),
|
|
19441
|
+
text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
|
|
19442
|
+
contentType: exports_external.enum(["text", "image"]).default("text"),
|
|
19443
|
+
imageData: exports_external.string().optional(),
|
|
19444
|
+
imageMimeType: exports_external.string().optional()
|
|
19445
|
+
}).refine((data) => data.content || data.text, {
|
|
19446
|
+
message: "Either content or text must be provided"
|
|
19447
|
+
});
|
|
19448
|
+
ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema");
|
|
19449
|
+
ExtractConfigSchema = exports_external.object({
|
|
19450
|
+
schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
|
|
19451
|
+
prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
|
|
19452
|
+
provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
|
|
19453
|
+
model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
|
|
19454
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit."),
|
|
19455
|
+
grounded: exports_external.boolean().optional().describe("When true, run a grounding pass over the schema fields and attach per-field source spans + confidence under a `_grounding` key, flagging ungrounded/fuzzy fields for human review. Grounding always calls OpenAI directly (independent of the extract provider) and requires OPENAI_API_KEY."),
|
|
19456
|
+
groundingModel: exports_external.string().optional().describe("Provider/model for the grounding pass. Defaults to the workspace default LLM; grounding runs against OpenAI, so pick an OpenAI-compatible model."),
|
|
19457
|
+
groundingExamples: exports_external.array(exports_external.object({
|
|
19458
|
+
text: exports_external.string(),
|
|
19459
|
+
extractions: exports_external.array(exports_external.object({ field: exports_external.string(), text: exports_external.string() }))
|
|
19460
|
+
})).optional().describe("Few-shot examples for grounding (verbatim source text per field). Optional."),
|
|
19461
|
+
reviewOn: exports_external.enum(["medium_or_low", "low_only"]).optional().describe("Which grounding confidences flag a field for review. Default: medium_or_low.")
|
|
19462
|
+
});
|
|
19463
|
+
});
|
|
19464
|
+
|
|
19465
|
+
// ../types/src/processor/configs/merge.ts
|
|
19466
|
+
var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
|
|
19467
|
+
var init_merge = __esm(() => {
|
|
19468
|
+
init_zod();
|
|
19469
|
+
MergeConfigSchema = exports_external.object({
|
|
19470
|
+
preservePortNames: exports_external.boolean().default(true),
|
|
19471
|
+
outputKey: exports_external.string().optional()
|
|
19472
|
+
});
|
|
19473
|
+
MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
19474
|
+
MergeOutputSchema = exports_external.object({
|
|
19475
|
+
items: exports_external.array(exports_external.unknown()),
|
|
19476
|
+
count: exports_external.number(),
|
|
19477
|
+
merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
19478
|
+
});
|
|
19479
|
+
});
|
|
19480
|
+
|
|
19481
|
+
// ../types/src/processor/configs/pdf-embedder.ts
|
|
19482
|
+
var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
|
|
19483
|
+
var init_pdf_embedder = __esm(() => {
|
|
19484
|
+
init_zod();
|
|
19485
|
+
init_runtime_file_ref();
|
|
19486
|
+
init_parser();
|
|
19487
|
+
PdfEmbedderInputSchema = exports_external.object({
|
|
19488
|
+
file: ResolvedProcessorFileSchema.describe("Resolved source file handle"),
|
|
19489
|
+
parseResult: exports_external.object({
|
|
19490
|
+
pages: exports_external.array(PageResultSchema),
|
|
19491
|
+
text: exports_external.string().optional()
|
|
19492
|
+
}).describe("Parse result from ai.parse step (must include word positions)")
|
|
19493
|
+
});
|
|
19494
|
+
PdfEmbedderOutputSchema = exports_external.object({
|
|
19495
|
+
fileId: exports_external.string().describe("File ID from files table"),
|
|
19496
|
+
pageCount: exports_external.number().describe("Number of pages in the output PDF"),
|
|
19497
|
+
wordCount: exports_external.number().describe("Number of words embedded"),
|
|
19498
|
+
text: exports_external.string().describe("Extracted text (from parse step)")
|
|
19499
|
+
});
|
|
19500
|
+
PdfEmbedderConfigSchema = exports_external.object({
|
|
19501
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
|
|
19502
|
+
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")
|
|
19503
|
+
}).prefault({});
|
|
19504
|
+
});
|
|
19505
|
+
|
|
19506
|
+
// ../types/src/processor/configs/segment.ts
|
|
19507
|
+
var SegmentInputSchema, SEGMENT_UNKNOWN_TYPE = "unknown", SegmentConfigSchema, ConfidenceLevelSchema, SegmentSummarySchema, SegmentOutputSchema;
|
|
19508
|
+
var init_segment = __esm(() => {
|
|
19509
|
+
init_zod();
|
|
19510
|
+
SegmentInputSchema = exports_external.object({
|
|
19511
|
+
pages: exports_external.array(exports_external.object({
|
|
19512
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19513
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19514
|
+
pageName: exports_external.string().optional()
|
|
19515
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19516
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19517
|
+
SegmentConfigSchema = exports_external.object({
|
|
19518
|
+
documentTypes: exports_external.array(exports_external.object({
|
|
19519
|
+
name: exports_external.string().min(1).describe('Type label returned in documents[].type (e.g. "timesheet", "deal-memo").'),
|
|
19520
|
+
description: exports_external.string().optional().describe("What this document type looks like — headings, layout, vocabulary, and the visual cues that mark its FIRST page. Fed to the LLM as guidance for both boundary detection and typing.")
|
|
19521
|
+
})).min(1).describe('The document-type taxonomy. The LLM tags each detected document with one of these names, or the reserved "unknown" type when none fit.'),
|
|
19522
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19523
|
+
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.'),
|
|
19524
|
+
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 boundaries on dense batches; larger windows when documents routinely exceed the per-window page count.")
|
|
19525
|
+
});
|
|
19526
|
+
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.");
|
|
19527
|
+
SegmentSummarySchema = exports_external.object({
|
|
19528
|
+
total: exports_external.number().int().describe("Total documents discovered in the batch."),
|
|
19529
|
+
labelled: exports_external.number().int().describe('Documents assigned a known taxonomy type (type !== "unknown").'),
|
|
19530
|
+
unlabelled: exports_external.number().int().describe('Documents the segmenter could not label (type === "unknown") — escalate to a human.'),
|
|
19531
|
+
lowConfidence: exports_external.number().int().describe('Documents whose boundary/type confidence is "low" — also worth human review.'),
|
|
19532
|
+
byType: exports_external.record(exports_external.string(), exports_external.number().int()).describe('Per-type document counts, keyed by type name (includes "unknown").'),
|
|
19533
|
+
needsReview: exports_external.array(exports_external.object({
|
|
19534
|
+
index: exports_external.number().int(),
|
|
19535
|
+
type: exports_external.string(),
|
|
19536
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19537
|
+
reason: exports_external.enum(["unlabelled", "low_confidence"]).describe("Why this document should be escalated to a human operator."),
|
|
19538
|
+
notes: exports_external.string()
|
|
19539
|
+
})).describe("The exact documents to escalate to a human operator, with the reason for each.")
|
|
19540
|
+
});
|
|
19541
|
+
SegmentOutputSchema = exports_external.object({
|
|
19542
|
+
summary: SegmentSummarySchema.describe("Batch-level escalation summary: labelled vs unlabelled counts and the documents needing human review."),
|
|
19543
|
+
documents: exports_external.array(exports_external.object({
|
|
19544
|
+
index: exports_external.number().int().describe("0-based position of this document in the batch, in page order."),
|
|
19545
|
+
type: exports_external.string().describe('Chosen type name from the taxonomy, or "unknown" when none fit.'),
|
|
19546
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]).describe("Inclusive [startPage, endPage], 0-based, matching input pageIndex."),
|
|
19547
|
+
confidence: ConfidenceLevelSchema.describe("LLM confidence at the document boundary + type: low | medium | high."),
|
|
19548
|
+
notes: exports_external.string().describe("Short prose citing what marked this page as a new document."),
|
|
19549
|
+
evidence: exports_external.object({
|
|
19550
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading/title text the LLM cited as the document start"),
|
|
19551
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where the start appears")
|
|
19552
|
+
}).optional().describe("Structured start evidence — for downstream parsing without regex over `notes`."),
|
|
19553
|
+
text: exports_external.string().describe("Joined per-page text for this document, ready for ai.extract"),
|
|
19554
|
+
pages: exports_external.array(exports_external.object({
|
|
19555
|
+
pageIndex: exports_external.number().int(),
|
|
19556
|
+
text: exports_external.string(),
|
|
19557
|
+
pageName: exports_external.string().optional(),
|
|
19558
|
+
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM boundary (direct evidence) or filled in by continuity")
|
|
19559
|
+
})).describe("Raw per-page records covered by this document, in page order."),
|
|
19560
|
+
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19561
|
+
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19562
|
+
}))
|
|
19563
|
+
});
|
|
19564
|
+
});
|
|
19565
|
+
|
|
19566
|
+
// ../types/src/processor/configs/split.ts
|
|
19567
|
+
var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema2, SplitOutputSchema;
|
|
19568
|
+
var init_split = __esm(() => {
|
|
19569
|
+
init_zod();
|
|
19570
|
+
SplitInputSchema = exports_external.object({
|
|
19571
|
+
pages: exports_external.array(exports_external.object({
|
|
19572
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19573
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19574
|
+
pageName: exports_external.string().optional()
|
|
19575
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19576
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19577
|
+
SplitConfigSchema = exports_external.object({
|
|
19578
|
+
sections: exports_external.array(exports_external.object({
|
|
19579
|
+
name: exports_external.string().min(1).describe("Stable id for the section"),
|
|
19580
|
+
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."),
|
|
19581
|
+
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").'),
|
|
19582
|
+
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.')
|
|
19583
|
+
})).min(1),
|
|
19584
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19585
|
+
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.'),
|
|
19586
|
+
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.")
|
|
19587
|
+
});
|
|
19588
|
+
ConfidenceLevelSchema2 = 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.");
|
|
19589
|
+
SplitOutputSchema = exports_external.object({
|
|
19590
|
+
splits: exports_external.array(exports_external.object({
|
|
19591
|
+
name: exports_external.string(),
|
|
19592
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19593
|
+
confidence: ConfidenceLevelSchema2.describe("LLM confidence at the start anchor: low | medium | high."),
|
|
19594
|
+
notes: exports_external.string(),
|
|
19595
|
+
evidence: exports_external.object({
|
|
19596
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
|
|
19597
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
|
|
19598
|
+
}).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
|
|
19599
|
+
end_evidence: exports_external.object({
|
|
19600
|
+
end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
|
|
19601
|
+
confidence: ConfidenceLevelSchema2,
|
|
19602
|
+
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.")
|
|
19603
|
+
}).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)."),
|
|
19604
|
+
text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
|
|
19605
|
+
pages: exports_external.array(exports_external.object({
|
|
19606
|
+
pageIndex: exports_external.number().int(),
|
|
19607
|
+
text: exports_external.string(),
|
|
19608
|
+
pageName: exports_external.string().optional(),
|
|
19609
|
+
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
|
|
19610
|
+
})).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."),
|
|
19611
|
+
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19612
|
+
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19613
|
+
}))
|
|
19614
|
+
});
|
|
19615
|
+
});
|
|
19616
|
+
|
|
19617
|
+
// ../types/src/processor/configs/template.ts
|
|
19618
|
+
var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
|
|
19619
|
+
var init_template = __esm(() => {
|
|
19620
|
+
init_zod();
|
|
19621
|
+
TemplateInputSchema = exports_external.object({
|
|
19622
|
+
data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
|
|
19623
|
+
});
|
|
19624
|
+
TemplateOutputSchema = exports_external.object({
|
|
19625
|
+
fileId: exports_external.string().describe("File ID from files table")
|
|
19626
|
+
});
|
|
19627
|
+
TemplateConfigSchema = exports_external.object({
|
|
19628
|
+
templateId: exports_external.string().describe("ID of the template from templates table"),
|
|
19629
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
|
|
19630
|
+
highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
|
|
19631
|
+
notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
|
|
19632
|
+
});
|
|
19633
|
+
});
|
|
19634
|
+
|
|
19635
|
+
// ../types/src/processor/configs/xlsx-to-json.ts
|
|
19636
|
+
var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
|
|
19637
|
+
var init_xlsx_to_json = __esm(() => {
|
|
19638
|
+
init_zod();
|
|
19639
|
+
init_runtime_file_ref();
|
|
19640
|
+
XlsxToJsonInputSchema = ResolvedProcessorFileSchema;
|
|
19641
|
+
XlsxToJsonOutputSchema = exports_external.object({
|
|
19642
|
+
rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
|
|
19643
|
+
fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
|
|
19644
|
+
});
|
|
19645
|
+
XlsxToJsonConfigSchema = exports_external.object({
|
|
19646
|
+
sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
|
|
19647
|
+
outputCsv: exports_external.boolean().default(false).optional(),
|
|
19648
|
+
outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
|
|
19649
|
+
});
|
|
19650
|
+
});
|
|
19651
|
+
|
|
19652
|
+
// ../types/src/processor/configs/react-hook-form.ts
|
|
19653
|
+
function extractFieldMetadata(schema) {
|
|
19654
|
+
const fields = [];
|
|
19655
|
+
let inner = schema;
|
|
19656
|
+
while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
|
|
19657
|
+
inner = inner.unwrap();
|
|
19658
|
+
}
|
|
19659
|
+
if (inner instanceof exports_external.ZodObject) {
|
|
19660
|
+
for (const [name, fieldSchema] of Object.entries(inner.shape)) {
|
|
19661
|
+
fields.push(extractSingleFieldMetadata(name, fieldSchema));
|
|
19662
|
+
}
|
|
19663
|
+
}
|
|
19664
|
+
return fields;
|
|
19665
|
+
}
|
|
19666
|
+
function extractSingleFieldMetadata(name, schema) {
|
|
19667
|
+
let current = schema;
|
|
19668
|
+
let required2 = true;
|
|
19669
|
+
let defaultValue = undefined;
|
|
19670
|
+
let description = current.description;
|
|
19671
|
+
while (true) {
|
|
19672
|
+
if (current instanceof exports_external.ZodOptional) {
|
|
19673
|
+
required2 = false;
|
|
19674
|
+
current = current.unwrap();
|
|
19675
|
+
} else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
|
|
19676
|
+
defaultValue = current._def.defaultValue;
|
|
19677
|
+
current = current.unwrap();
|
|
19678
|
+
} else {
|
|
19679
|
+
break;
|
|
19680
|
+
}
|
|
19681
|
+
description ??= current.description;
|
|
19682
|
+
}
|
|
19683
|
+
const base = { name, type: "unknown", required: required2, description, defaultValue };
|
|
19684
|
+
if (current instanceof exports_external.ZodString)
|
|
19685
|
+
return { ...base, type: "string" };
|
|
19686
|
+
if (current instanceof exports_external.ZodNumber) {
|
|
19687
|
+
let min;
|
|
19688
|
+
let max;
|
|
19689
|
+
for (const c of current._def.checks ?? []) {
|
|
19690
|
+
const def = c._zod.def;
|
|
19691
|
+
if (def.check === "greater_than")
|
|
19692
|
+
min = def.value;
|
|
19693
|
+
if (def.check === "less_than")
|
|
19694
|
+
max = def.value;
|
|
19695
|
+
}
|
|
19696
|
+
return { ...base, type: "number", min, max };
|
|
19697
|
+
}
|
|
19698
|
+
if (current instanceof exports_external.ZodBoolean)
|
|
19699
|
+
return { ...base, type: "boolean" };
|
|
19700
|
+
if (current instanceof exports_external.ZodEnum) {
|
|
19701
|
+
return { ...base, type: "enum", enumValues: current.options };
|
|
19702
|
+
}
|
|
19703
|
+
if (current instanceof exports_external.ZodArray)
|
|
19704
|
+
return { ...base, type: "array" };
|
|
19705
|
+
if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
|
|
19706
|
+
return { ...base, type: "object" };
|
|
19707
|
+
}
|
|
19708
|
+
return base;
|
|
19709
|
+
}
|
|
19710
|
+
function getConfigFieldMetadata(processorId) {
|
|
19711
|
+
const schema = getConfigSchema(processorId);
|
|
19712
|
+
if (!schema)
|
|
19713
|
+
return;
|
|
19714
|
+
return extractFieldMetadata(schema);
|
|
19715
|
+
}
|
|
19716
|
+
function getConfigDefaults(processorId) {
|
|
19717
|
+
const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19718
|
+
if (!schema)
|
|
19719
|
+
return {};
|
|
19720
|
+
try {
|
|
19721
|
+
const result = schema.safeParse({});
|
|
19722
|
+
if (result.success) {
|
|
19723
|
+
return result.data;
|
|
19724
|
+
}
|
|
19725
|
+
} catch {}
|
|
19726
|
+
const fields = extractFieldMetadata(schema);
|
|
19727
|
+
const defaults = {};
|
|
19728
|
+
for (const field of fields) {
|
|
19729
|
+
if (field.defaultValue !== undefined) {
|
|
19730
|
+
defaults[field.name] = field.defaultValue;
|
|
19731
|
+
}
|
|
19732
|
+
}
|
|
19733
|
+
return defaults;
|
|
19734
|
+
}
|
|
19735
|
+
function validateConfig(processorId, config2) {
|
|
19736
|
+
const schema = getConfigSchema(processorId);
|
|
19737
|
+
if (!schema) {
|
|
19738
|
+
return { valid: true, errors: {} };
|
|
19739
|
+
}
|
|
19740
|
+
const result = schema.safeParse(config2);
|
|
19741
|
+
if (result.success) {
|
|
19742
|
+
return { valid: true, errors: {} };
|
|
19743
|
+
}
|
|
19744
|
+
const errors3 = {};
|
|
19745
|
+
for (const issue2 of result.error.issues) {
|
|
19746
|
+
const path = issue2.path.join(".");
|
|
19747
|
+
errors3[path] = issue2.message;
|
|
19748
|
+
}
|
|
19749
|
+
return { valid: false, errors: errors3 };
|
|
19750
|
+
}
|
|
19751
|
+
var init_react_hook_form = __esm(() => {
|
|
19752
|
+
init_zod();
|
|
19753
|
+
init_configs();
|
|
19754
|
+
});
|
|
19755
|
+
|
|
19756
|
+
// ../types/src/processor/configs/index.ts
|
|
19757
|
+
function getProcessorSchemas(processorId) {
|
|
19758
|
+
return PROCESSOR_SCHEMAS[processorId];
|
|
19759
|
+
}
|
|
19760
|
+
function getConfigSchema(processorId) {
|
|
19761
|
+
return PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19762
|
+
}
|
|
19763
|
+
function getAllProcessorJsonSchemas() {
|
|
19764
|
+
return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
|
|
19765
|
+
id: p.id,
|
|
19766
|
+
inputSchema: toJsonSchema(p.inputSchema),
|
|
19767
|
+
outputSchema: toJsonSchema(p.outputSchema),
|
|
19768
|
+
configSchema: toJsonSchema(p.configSchema)
|
|
19769
|
+
}));
|
|
19770
|
+
}
|
|
19771
|
+
function listProcessorIds() {
|
|
19772
|
+
return Object.keys(PROCESSOR_SCHEMAS);
|
|
19773
|
+
}
|
|
19774
|
+
var PROCESSOR_SCHEMAS;
|
|
19775
|
+
var init_configs = __esm(() => {
|
|
19776
|
+
init_common();
|
|
19777
|
+
init_ids();
|
|
19778
|
+
init_classify();
|
|
19779
|
+
init_document_parser();
|
|
19780
|
+
init_extract();
|
|
19781
|
+
init_merge();
|
|
19782
|
+
init_pdf_embedder();
|
|
19783
|
+
init_segment();
|
|
19784
|
+
init_split();
|
|
19785
|
+
init_template();
|
|
19786
|
+
init_xlsx_to_json();
|
|
19787
|
+
init_react_hook_form();
|
|
19788
|
+
init_classify();
|
|
19789
|
+
init_document_parser();
|
|
19790
|
+
init_extract();
|
|
19791
|
+
init_merge();
|
|
19792
|
+
init_pdf_embedder();
|
|
19793
|
+
init_segment();
|
|
19794
|
+
init_split();
|
|
19795
|
+
init_template();
|
|
19796
|
+
init_xlsx_to_json();
|
|
19797
|
+
PROCESSOR_SCHEMAS = {
|
|
19798
|
+
[PROCESSOR_IDS.EXTRACT]: {
|
|
19799
|
+
id: PROCESSOR_IDS.EXTRACT,
|
|
19800
|
+
inputSchema: ExtractInputSchema,
|
|
19801
|
+
outputSchema: ExtractOutputSchema,
|
|
19802
|
+
configSchema: ExtractConfigSchema
|
|
19803
|
+
},
|
|
19804
|
+
[PROCESSOR_IDS.DOCUMENT_PARSER]: {
|
|
19805
|
+
id: PROCESSOR_IDS.DOCUMENT_PARSER,
|
|
19806
|
+
inputSchema: DocumentParserInputSchema,
|
|
19807
|
+
outputSchema: DocumentParserOutputSchema,
|
|
19808
|
+
configSchema: DocumentParserConfigSchema
|
|
19809
|
+
},
|
|
19810
|
+
[PROCESSOR_IDS.MERGE]: {
|
|
19811
|
+
id: PROCESSOR_IDS.MERGE,
|
|
19812
|
+
inputSchema: MergeInputSchema,
|
|
19813
|
+
outputSchema: MergeOutputSchema,
|
|
19814
|
+
configSchema: MergeConfigSchema
|
|
19815
|
+
},
|
|
19816
|
+
[PROCESSOR_IDS.TEMPLATE]: {
|
|
19817
|
+
id: PROCESSOR_IDS.TEMPLATE,
|
|
19818
|
+
inputSchema: TemplateInputSchema,
|
|
19819
|
+
outputSchema: TemplateOutputSchema,
|
|
19820
|
+
configSchema: TemplateConfigSchema
|
|
19821
|
+
},
|
|
19822
|
+
[PROCESSOR_IDS.PDF_EMBEDDER]: {
|
|
19823
|
+
id: PROCESSOR_IDS.PDF_EMBEDDER,
|
|
19824
|
+
inputSchema: PdfEmbedderInputSchema,
|
|
19825
|
+
outputSchema: PdfEmbedderOutputSchema,
|
|
19826
|
+
configSchema: PdfEmbedderConfigSchema
|
|
19827
|
+
},
|
|
19828
|
+
[PROCESSOR_IDS.SPLIT]: {
|
|
19829
|
+
id: PROCESSOR_IDS.SPLIT,
|
|
19830
|
+
inputSchema: SplitInputSchema,
|
|
19831
|
+
outputSchema: SplitOutputSchema,
|
|
19832
|
+
configSchema: SplitConfigSchema
|
|
19833
|
+
},
|
|
19834
|
+
[PROCESSOR_IDS.SEGMENT]: {
|
|
19835
|
+
id: PROCESSOR_IDS.SEGMENT,
|
|
19836
|
+
inputSchema: SegmentInputSchema,
|
|
19837
|
+
outputSchema: SegmentOutputSchema,
|
|
19838
|
+
configSchema: SegmentConfigSchema
|
|
19839
|
+
},
|
|
19840
|
+
[PROCESSOR_IDS.CLASSIFY]: {
|
|
19841
|
+
id: PROCESSOR_IDS.CLASSIFY,
|
|
19842
|
+
inputSchema: ClassifyInputSchema,
|
|
19843
|
+
outputSchema: ClassifyOutputSchema,
|
|
19844
|
+
configSchema: ClassifyConfigSchema
|
|
19845
|
+
},
|
|
19846
|
+
[PROCESSOR_IDS.XLSX_TO_JSON]: {
|
|
19847
|
+
id: PROCESSOR_IDS.XLSX_TO_JSON,
|
|
19848
|
+
inputSchema: XlsxToJsonInputSchema,
|
|
19849
|
+
outputSchema: XlsxToJsonOutputSchema,
|
|
19850
|
+
configSchema: XlsxToJsonConfigSchema
|
|
19851
|
+
}
|
|
19852
|
+
};
|
|
19853
|
+
});
|
|
19854
|
+
|
|
17331
19855
|
// ../types/src/processor/index.ts
|
|
17332
|
-
var
|
|
19856
|
+
var init_processor2 = __esm(() => {
|
|
19857
|
+
init_processor();
|
|
19858
|
+
init_execution();
|
|
19859
|
+
init_configs();
|
|
19860
|
+
});
|
|
17333
19861
|
|
|
17334
19862
|
// ../types/src/parser/index.ts
|
|
17335
|
-
var
|
|
19863
|
+
var init_parser2 = __esm(() => {
|
|
19864
|
+
init_parser();
|
|
19865
|
+
});
|
|
17336
19866
|
|
|
17337
19867
|
// ../types/src/otel/semantic-conventions.ts
|
|
17338
19868
|
function mapLLMAttributes(attrs) {
|
|
@@ -20370,9 +22900,9 @@ var require_validate = __commonJS((exports) => {
|
|
|
20370
22900
|
}
|
|
20371
22901
|
let expr = data;
|
|
20372
22902
|
const segments = jsonPointer.split("/");
|
|
20373
|
-
for (const
|
|
20374
|
-
if (
|
|
20375
|
-
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(
|
|
22903
|
+
for (const segment2 of segments) {
|
|
22904
|
+
if (segment2) {
|
|
22905
|
+
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment2))}`;
|
|
20376
22906
|
expr = (0, codegen_1._)`${expr} && ${data}`;
|
|
20377
22907
|
}
|
|
20378
22908
|
}
|
|
@@ -20652,7 +23182,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
20652
23182
|
});
|
|
20653
23183
|
|
|
20654
23184
|
// ../../node_modules/fast-uri/lib/utils.js
|
|
20655
|
-
var
|
|
23185
|
+
var require_utils3 = __commonJS((exports, module) => {
|
|
20656
23186
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
20657
23187
|
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);
|
|
20658
23188
|
function stringArrayToHexStripped(input) {
|
|
@@ -20908,7 +23438,7 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
20908
23438
|
|
|
20909
23439
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
20910
23440
|
var require_schemes = __commonJS((exports, module) => {
|
|
20911
|
-
var { isUUID } =
|
|
23441
|
+
var { isUUID } = require_utils3();
|
|
20912
23442
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
20913
23443
|
var supportedSchemeNames = [
|
|
20914
23444
|
"http",
|
|
@@ -21082,7 +23612,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
21082
23612
|
|
|
21083
23613
|
// ../../node_modules/fast-uri/index.js
|
|
21084
23614
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
21085
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } =
|
|
23615
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils3();
|
|
21086
23616
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
21087
23617
|
function normalize(uri, options) {
|
|
21088
23618
|
if (typeof uri === "string") {
|
|
@@ -23492,7 +26022,7 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
23492
26022
|
});
|
|
23493
26023
|
|
|
23494
26024
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
23495
|
-
var
|
|
26025
|
+
var require_types2 = __commonJS((exports) => {
|
|
23496
26026
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23497
26027
|
exports.DiscrError = undefined;
|
|
23498
26028
|
var DiscrError;
|
|
@@ -23506,7 +26036,7 @@ var require_types = __commonJS((exports) => {
|
|
|
23506
26036
|
var require_discriminator = __commonJS((exports) => {
|
|
23507
26037
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23508
26038
|
var codegen_1 = require_codegen();
|
|
23509
|
-
var types_1 =
|
|
26039
|
+
var types_1 = require_types2();
|
|
23510
26040
|
var compile_1 = require_compile();
|
|
23511
26041
|
var ref_error_1 = require_ref_error();
|
|
23512
26042
|
var util_1 = require_util();
|
|
@@ -24434,24 +26964,6 @@ var init_validation = __esm(() => {
|
|
|
24434
26964
|
init_workspace_schema();
|
|
24435
26965
|
});
|
|
24436
26966
|
|
|
24437
|
-
// ../types/src/core/common.ts
|
|
24438
|
-
function toJsonSchema2(schema) {
|
|
24439
|
-
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
24440
|
-
}
|
|
24441
|
-
var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
|
|
24442
|
-
var init_common = __esm(() => {
|
|
24443
|
-
init_zod();
|
|
24444
|
-
TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
24445
|
-
return typeof val === "string" ? new Date(val) : val;
|
|
24446
|
-
});
|
|
24447
|
-
JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
24448
|
-
BaseEntitySchema2 = exports_external.object({
|
|
24449
|
-
id: exports_external.string(),
|
|
24450
|
-
createdAt: TimestampSchema2.optional(),
|
|
24451
|
-
updatedAt: TimestampSchema2.optional()
|
|
24452
|
-
});
|
|
24453
|
-
});
|
|
24454
|
-
|
|
24455
26967
|
// ../../node_modules/@babel/parser/lib/index.js
|
|
24456
26968
|
var require_lib = __commonJS((exports) => {
|
|
24457
26969
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -24865,12 +27377,12 @@ var require_lib = __commonJS((exports) => {
|
|
|
24865
27377
|
}
|
|
24866
27378
|
const ParseErrorConstructors = {};
|
|
24867
27379
|
for (const reasonCode of Object.keys(argument)) {
|
|
24868
|
-
const
|
|
24869
|
-
const _ref = typeof
|
|
24870
|
-
message: () =>
|
|
24871
|
-
} : typeof
|
|
24872
|
-
message:
|
|
24873
|
-
} :
|
|
27380
|
+
const template2 = argument[reasonCode];
|
|
27381
|
+
const _ref = typeof template2 === "string" ? {
|
|
27382
|
+
message: () => template2
|
|
27383
|
+
} : typeof template2 === "function" ? {
|
|
27384
|
+
message: template2
|
|
27385
|
+
} : template2, {
|
|
24874
27386
|
message
|
|
24875
27387
|
} = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
24876
27388
|
const toMessage = typeof message === "string" ? () => message : message;
|
|
@@ -39343,7 +41855,7 @@ var require_keywords = __commonJS((exports) => {
|
|
|
39343
41855
|
});
|
|
39344
41856
|
|
|
39345
41857
|
// ../../node_modules/sucrase/dist/parser/tokenizer/types.js
|
|
39346
|
-
var
|
|
41858
|
+
var require_types3 = __commonJS((exports) => {
|
|
39347
41859
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39348
41860
|
var TokenType;
|
|
39349
41861
|
(function(TokenType2) {
|
|
@@ -39407,8 +41919,8 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39407
41919
|
TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
|
|
39408
41920
|
const arrow = 22528;
|
|
39409
41921
|
TokenType2[TokenType2["arrow"] = arrow] = "arrow";
|
|
39410
|
-
const
|
|
39411
|
-
TokenType2[TokenType2["template"] =
|
|
41922
|
+
const template2 = 23552;
|
|
41923
|
+
TokenType2[TokenType2["template"] = template2] = "template";
|
|
39412
41924
|
const ellipsis = 24576;
|
|
39413
41925
|
TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
|
|
39414
41926
|
const backQuote = 25600;
|
|
@@ -39827,7 +42339,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39827
42339
|
var require_state = __commonJS((exports) => {
|
|
39828
42340
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39829
42341
|
var _keywords = require_keywords();
|
|
39830
|
-
var _types =
|
|
42342
|
+
var _types = require_types3();
|
|
39831
42343
|
|
|
39832
42344
|
class Scope {
|
|
39833
42345
|
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
|
|
@@ -40213,7 +42725,7 @@ var require_base = __commonJS((exports) => {
|
|
|
40213
42725
|
var require_util2 = __commonJS((exports) => {
|
|
40214
42726
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40215
42727
|
var _index = require_tokenizer();
|
|
40216
|
-
var _types =
|
|
42728
|
+
var _types = require_types3();
|
|
40217
42729
|
var _charcodes = require_charcodes();
|
|
40218
42730
|
var _base = require_base();
|
|
40219
42731
|
function isContextual(contextualKeyword) {
|
|
@@ -40375,7 +42887,7 @@ var require_identifier = __commonJS((exports) => {
|
|
|
40375
42887
|
var require_readWordTree = __commonJS((exports) => {
|
|
40376
42888
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40377
42889
|
var _keywords = require_keywords();
|
|
40378
|
-
var _types =
|
|
42890
|
+
var _types = require_types3();
|
|
40379
42891
|
var READ_WORD_TREE = new Int32Array([
|
|
40380
42892
|
-1,
|
|
40381
42893
|
27,
|
|
@@ -49353,7 +51865,7 @@ var require_readWord = __commonJS((exports) => {
|
|
|
49353
51865
|
var _identifier = require_identifier();
|
|
49354
51866
|
var _index = require_tokenizer();
|
|
49355
51867
|
var _readWordTree = require_readWordTree();
|
|
49356
|
-
var _types =
|
|
51868
|
+
var _types = require_types3();
|
|
49357
51869
|
function readWord() {
|
|
49358
51870
|
let treePos = 0;
|
|
49359
51871
|
let code = 0;
|
|
@@ -49419,7 +51931,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
49419
51931
|
var _keywords = require_keywords();
|
|
49420
51932
|
var _readWord = require_readWord();
|
|
49421
51933
|
var _readWord2 = _interopRequireDefault(_readWord);
|
|
49422
|
-
var _types =
|
|
51934
|
+
var _types = require_types3();
|
|
49423
51935
|
var IdentifierRole;
|
|
49424
51936
|
(function(IdentifierRole2) {
|
|
49425
51937
|
const Access = 0;
|
|
@@ -50136,7 +52648,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
50136
52648
|
// ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
|
|
50137
52649
|
var require_getImportExportSpecifierInfo = __commonJS((exports) => {
|
|
50138
52650
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50139
|
-
var _types =
|
|
52651
|
+
var _types = require_types3();
|
|
50140
52652
|
function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
|
|
50141
52653
|
let endIndex = index + 1;
|
|
50142
52654
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
@@ -50489,7 +53001,7 @@ var require_JSXTransformer = __commonJS((exports) => {
|
|
|
50489
53001
|
var _xhtml = require_xhtml();
|
|
50490
53002
|
var _xhtml2 = _interopRequireDefault(_xhtml);
|
|
50491
53003
|
var _tokenizer = require_tokenizer();
|
|
50492
|
-
var _types =
|
|
53004
|
+
var _types = require_types3();
|
|
50493
53005
|
var _charcodes = require_charcodes();
|
|
50494
53006
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
50495
53007
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -50993,7 +53505,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
|
|
|
50993
53505
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
50994
53506
|
}
|
|
50995
53507
|
var _tokenizer = require_tokenizer();
|
|
50996
|
-
var _types =
|
|
53508
|
+
var _types = require_types3();
|
|
50997
53509
|
var _JSXTransformer = require_JSXTransformer();
|
|
50998
53510
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
50999
53511
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -51032,7 +53544,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
|
|
|
51032
53544
|
}
|
|
51033
53545
|
var _tokenizer = require_tokenizer();
|
|
51034
53546
|
var _keywords = require_keywords();
|
|
51035
|
-
var _types =
|
|
53547
|
+
var _types = require_types3();
|
|
51036
53548
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
51037
53549
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
51038
53550
|
var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
|
|
@@ -51803,18 +54315,18 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
|
|
|
51803
54315
|
continue;
|
|
51804
54316
|
let genColumn = 0;
|
|
51805
54317
|
for (let j = 0;j < line.length; j++) {
|
|
51806
|
-
const
|
|
54318
|
+
const segment2 = line[j];
|
|
51807
54319
|
if (j > 0)
|
|
51808
54320
|
writer.write(comma);
|
|
51809
|
-
genColumn = encodeInteger(writer,
|
|
51810
|
-
if (
|
|
54321
|
+
genColumn = encodeInteger(writer, segment2[0], genColumn);
|
|
54322
|
+
if (segment2.length === 1)
|
|
51811
54323
|
continue;
|
|
51812
|
-
sourcesIndex = encodeInteger(writer,
|
|
51813
|
-
sourceLine = encodeInteger(writer,
|
|
51814
|
-
sourceColumn = encodeInteger(writer,
|
|
51815
|
-
if (
|
|
54324
|
+
sourcesIndex = encodeInteger(writer, segment2[1], sourcesIndex);
|
|
54325
|
+
sourceLine = encodeInteger(writer, segment2[2], sourceLine);
|
|
54326
|
+
sourceColumn = encodeInteger(writer, segment2[3], sourceColumn);
|
|
54327
|
+
if (segment2.length === 4)
|
|
51816
54328
|
continue;
|
|
51817
|
-
namesIndex = encodeInteger(writer,
|
|
54329
|
+
namesIndex = encodeInteger(writer, segment2[4], namesIndex);
|
|
51818
54330
|
}
|
|
51819
54331
|
}
|
|
51820
54332
|
return writer.flush();
|
|
@@ -52369,11 +54881,11 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52369
54881
|
const index = traceSegmentInternal(segments, cast(map2)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
|
|
52370
54882
|
if (index === -1)
|
|
52371
54883
|
return OMapping(null, null, null, null);
|
|
52372
|
-
const
|
|
52373
|
-
if (
|
|
54884
|
+
const segment2 = segments[index];
|
|
54885
|
+
if (segment2.length === 1)
|
|
52374
54886
|
return OMapping(null, null, null, null);
|
|
52375
54887
|
const { names, resolvedSources } = map2;
|
|
52376
|
-
return OMapping(resolvedSources[
|
|
54888
|
+
return OMapping(resolvedSources[segment2[SOURCES_INDEX]], segment2[SOURCE_LINE] + 1, segment2[SOURCE_COLUMN], segment2.length === 5 ? names[segment2[NAMES_INDEX]] : null);
|
|
52377
54889
|
}
|
|
52378
54890
|
function generatedPositionFor(map2, needle) {
|
|
52379
54891
|
const { source, line, column, bias } = needle;
|
|
@@ -52486,8 +54998,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52486
54998
|
const max = upperBound(segments, matchedColumn, min);
|
|
52487
54999
|
const result = [];
|
|
52488
55000
|
for (;min <= max; min++) {
|
|
52489
|
-
const
|
|
52490
|
-
result.push(GMapping(
|
|
55001
|
+
const segment2 = segments[min];
|
|
55002
|
+
result.push(GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]));
|
|
52491
55003
|
}
|
|
52492
55004
|
return result;
|
|
52493
55005
|
}
|
|
@@ -52515,8 +55027,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52515
55027
|
const index = traceSegmentInternal(segments, memo, line, column, bias);
|
|
52516
55028
|
if (index === -1)
|
|
52517
55029
|
return GMapping(null, null);
|
|
52518
|
-
const
|
|
52519
|
-
return GMapping(
|
|
55030
|
+
const segment2 = segments[index];
|
|
55031
|
+
return GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]);
|
|
52520
55032
|
}
|
|
52521
55033
|
});
|
|
52522
55034
|
});
|
|
@@ -53067,7 +55579,7 @@ var require_HelperManager = __commonJS((exports) => {
|
|
|
53067
55579
|
var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
53068
55580
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53069
55581
|
var _tokenizer = require_tokenizer();
|
|
53070
|
-
var _types =
|
|
55582
|
+
var _types = require_types3();
|
|
53071
55583
|
function identifyShadowedGlobals(tokens, scopes, globalNames) {
|
|
53072
55584
|
if (!hasShadowedGlobals(tokens, globalNames)) {
|
|
53073
55585
|
return;
|
|
@@ -53132,7 +55644,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
|
53132
55644
|
// ../../node_modules/sucrase/dist/util/getIdentifierNames.js
|
|
53133
55645
|
var require_getIdentifierNames = __commonJS((exports) => {
|
|
53134
55646
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53135
|
-
var _types =
|
|
55647
|
+
var _types = require_types3();
|
|
53136
55648
|
function getIdentifierNames(code, tokens) {
|
|
53137
55649
|
const names = [];
|
|
53138
55650
|
for (const token of tokens) {
|
|
@@ -53308,7 +55820,7 @@ var require_util3 = __commonJS((exports) => {
|
|
|
53308
55820
|
});
|
|
53309
55821
|
|
|
53310
55822
|
// ../../node_modules/ts-interface-checker/dist/types.js
|
|
53311
|
-
var
|
|
55823
|
+
var require_types4 = __commonJS((exports) => {
|
|
53312
55824
|
var __extends = exports && exports.__extends || function() {
|
|
53313
55825
|
var extendStatics = function(d, b) {
|
|
53314
55826
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -53908,9 +56420,9 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
53908
56420
|
};
|
|
53909
56421
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53910
56422
|
exports.Checker = exports.createCheckers = undefined;
|
|
53911
|
-
var types_1 =
|
|
56423
|
+
var types_1 = require_types4();
|
|
53912
56424
|
var util_1 = require_util3();
|
|
53913
|
-
var types_2 =
|
|
56425
|
+
var types_2 = require_types4();
|
|
53914
56426
|
Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
|
|
53915
56427
|
return types_2.TArray;
|
|
53916
56428
|
} });
|
|
@@ -54192,7 +56704,7 @@ var require_lval = __commonJS((exports) => {
|
|
|
54192
56704
|
var _typescript = require_typescript();
|
|
54193
56705
|
var _index = require_tokenizer();
|
|
54194
56706
|
var _keywords = require_keywords();
|
|
54195
|
-
var _types =
|
|
56707
|
+
var _types = require_types3();
|
|
54196
56708
|
var _base = require_base();
|
|
54197
56709
|
var _expression = require_expression();
|
|
54198
56710
|
var _util = require_util2();
|
|
@@ -54324,7 +56836,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
54324
56836
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54325
56837
|
var _index = require_tokenizer();
|
|
54326
56838
|
var _keywords = require_keywords();
|
|
54327
|
-
var _types =
|
|
56839
|
+
var _types = require_types3();
|
|
54328
56840
|
var _base = require_base();
|
|
54329
56841
|
var _expression = require_expression();
|
|
54330
56842
|
var _lval = require_lval();
|
|
@@ -55586,7 +58098,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
55586
58098
|
var require_jsx = __commonJS((exports) => {
|
|
55587
58099
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55588
58100
|
var _index = require_tokenizer();
|
|
55589
|
-
var _types =
|
|
58101
|
+
var _types = require_types3();
|
|
55590
58102
|
var _base = require_base();
|
|
55591
58103
|
var _expression = require_expression();
|
|
55592
58104
|
var _util = require_util2();
|
|
@@ -55849,10 +58361,10 @@ var require_jsx = __commonJS((exports) => {
|
|
|
55849
58361
|
});
|
|
55850
58362
|
|
|
55851
58363
|
// ../../node_modules/sucrase/dist/parser/plugins/types.js
|
|
55852
|
-
var
|
|
58364
|
+
var require_types5 = __commonJS((exports) => {
|
|
55853
58365
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55854
58366
|
var _index = require_tokenizer();
|
|
55855
|
-
var _types =
|
|
58367
|
+
var _types = require_types3();
|
|
55856
58368
|
var _base = require_base();
|
|
55857
58369
|
var _expression = require_expression();
|
|
55858
58370
|
var _flow = require_flow();
|
|
@@ -55885,12 +58397,12 @@ var require_expression = __commonJS((exports) => {
|
|
|
55885
58397
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55886
58398
|
var _flow = require_flow();
|
|
55887
58399
|
var _index = require_jsx();
|
|
55888
|
-
var _types =
|
|
58400
|
+
var _types = require_types5();
|
|
55889
58401
|
var _typescript = require_typescript();
|
|
55890
58402
|
var _index3 = require_tokenizer();
|
|
55891
58403
|
var _keywords = require_keywords();
|
|
55892
58404
|
var _state = require_state();
|
|
55893
|
-
var _types3 =
|
|
58405
|
+
var _types3 = require_types3();
|
|
55894
58406
|
var _charcodes = require_charcodes();
|
|
55895
58407
|
var _identifier = require_identifier();
|
|
55896
58408
|
var _base = require_base();
|
|
@@ -56606,7 +59118,7 @@ var require_flow = __commonJS((exports) => {
|
|
|
56606
59118
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56607
59119
|
var _index = require_tokenizer();
|
|
56608
59120
|
var _keywords = require_keywords();
|
|
56609
|
-
var _types =
|
|
59121
|
+
var _types = require_types3();
|
|
56610
59122
|
var _base = require_base();
|
|
56611
59123
|
var _expression = require_expression();
|
|
56612
59124
|
var _statement = require_statement();
|
|
@@ -57481,7 +59993,7 @@ var require_statement = __commonJS((exports) => {
|
|
|
57481
59993
|
var _tokenizer = require_tokenizer();
|
|
57482
59994
|
var _keywords = require_keywords();
|
|
57483
59995
|
var _state = require_state();
|
|
57484
|
-
var _types =
|
|
59996
|
+
var _types = require_types3();
|
|
57485
59997
|
var _charcodes = require_charcodes();
|
|
57486
59998
|
var _base = require_base();
|
|
57487
59999
|
var _expression = require_expression();
|
|
@@ -58516,7 +61028,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58516
61028
|
function _interopRequireDefault(obj) {
|
|
58517
61029
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
58518
61030
|
}
|
|
58519
|
-
var _types =
|
|
61031
|
+
var _types = require_types3();
|
|
58520
61032
|
var _isAsyncOperation = require_isAsyncOperation();
|
|
58521
61033
|
var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
|
|
58522
61034
|
|
|
@@ -58774,7 +61286,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58774
61286
|
var require_getClassInfo = __commonJS((exports) => {
|
|
58775
61287
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58776
61288
|
var _keywords = require_keywords();
|
|
58777
|
-
var _types =
|
|
61289
|
+
var _types = require_types3();
|
|
58778
61290
|
function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
|
|
58779
61291
|
const snapshot = tokens.snapshot();
|
|
58780
61292
|
const headerInfo = processClassHeader(tokens);
|
|
@@ -59012,7 +61524,7 @@ var require_getClassInfo = __commonJS((exports) => {
|
|
|
59012
61524
|
// ../../node_modules/sucrase/dist/util/elideImportEquals.js
|
|
59013
61525
|
var require_elideImportEquals = __commonJS((exports) => {
|
|
59014
61526
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59015
|
-
var _types =
|
|
61527
|
+
var _types = require_types3();
|
|
59016
61528
|
function elideImportEquals(tokens) {
|
|
59017
61529
|
tokens.removeInitialToken();
|
|
59018
61530
|
tokens.removeToken();
|
|
@@ -59036,7 +61548,7 @@ var require_elideImportEquals = __commonJS((exports) => {
|
|
|
59036
61548
|
var require_getDeclarationInfo = __commonJS((exports) => {
|
|
59037
61549
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59038
61550
|
var _tokenizer = require_tokenizer();
|
|
59039
|
-
var _types =
|
|
61551
|
+
var _types = require_types3();
|
|
59040
61552
|
var EMPTY_DECLARATION_INFO = {
|
|
59041
61553
|
typeDeclarations: new Set,
|
|
59042
61554
|
valueDeclarations: new Set
|
|
@@ -59064,7 +61576,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
|
|
|
59064
61576
|
var require_isExportFrom = __commonJS((exports) => {
|
|
59065
61577
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59066
61578
|
var _keywords = require_keywords();
|
|
59067
|
-
var _types =
|
|
61579
|
+
var _types = require_types3();
|
|
59068
61580
|
function isExportFrom(tokens) {
|
|
59069
61581
|
let closeBraceIndex = tokens.currentIndex();
|
|
59070
61582
|
while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
|
@@ -59079,7 +61591,7 @@ var require_isExportFrom = __commonJS((exports) => {
|
|
|
59079
61591
|
var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
59080
61592
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59081
61593
|
var _keywords = require_keywords();
|
|
59082
|
-
var _types =
|
|
61594
|
+
var _types = require_types3();
|
|
59083
61595
|
function removeMaybeImportAttributes(tokens) {
|
|
59084
61596
|
if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
|
|
59085
61597
|
tokens.removeToken();
|
|
@@ -59094,7 +61606,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
|
59094
61606
|
// ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
|
|
59095
61607
|
var require_shouldElideDefaultExport = __commonJS((exports) => {
|
|
59096
61608
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59097
|
-
var _types =
|
|
61609
|
+
var _types = require_types3();
|
|
59098
61610
|
function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
|
|
59099
61611
|
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
|
|
59100
61612
|
return false;
|
|
@@ -59125,7 +61637,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
|
|
|
59125
61637
|
}
|
|
59126
61638
|
var _tokenizer = require_tokenizer();
|
|
59127
61639
|
var _keywords = require_keywords();
|
|
59128
|
-
var _types =
|
|
61640
|
+
var _types = require_types3();
|
|
59129
61641
|
var _elideImportEquals = require_elideImportEquals();
|
|
59130
61642
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
59131
61643
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -59767,7 +62279,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
|
|
|
59767
62279
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
59768
62280
|
}
|
|
59769
62281
|
var _keywords = require_keywords();
|
|
59770
|
-
var _types =
|
|
62282
|
+
var _types = require_types3();
|
|
59771
62283
|
var _elideImportEquals = require_elideImportEquals();
|
|
59772
62284
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
59773
62285
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -60037,7 +62549,7 @@ var require_FlowTransformer = __commonJS((exports) => {
|
|
|
60037
62549
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60038
62550
|
}
|
|
60039
62551
|
var _keywords = require_keywords();
|
|
60040
|
-
var _types =
|
|
62552
|
+
var _types = require_types3();
|
|
60041
62553
|
var _Transformer = require_Transformer();
|
|
60042
62554
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60043
62555
|
|
|
@@ -60157,7 +62669,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
|
|
|
60157
62669
|
}
|
|
60158
62670
|
return value;
|
|
60159
62671
|
}
|
|
60160
|
-
var _types =
|
|
62672
|
+
var _types = require_types3();
|
|
60161
62673
|
var _Transformer = require_Transformer();
|
|
60162
62674
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60163
62675
|
var JEST_GLOBAL_NAME = "jest";
|
|
@@ -60231,7 +62743,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
|
|
|
60231
62743
|
function _interopRequireDefault(obj) {
|
|
60232
62744
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60233
62745
|
}
|
|
60234
|
-
var _types =
|
|
62746
|
+
var _types = require_types3();
|
|
60235
62747
|
var _Transformer = require_Transformer();
|
|
60236
62748
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60237
62749
|
|
|
@@ -60260,7 +62772,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
|
|
|
60260
62772
|
function _interopRequireDefault(obj) {
|
|
60261
62773
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60262
62774
|
}
|
|
60263
|
-
var _types =
|
|
62775
|
+
var _types = require_types3();
|
|
60264
62776
|
var _Transformer = require_Transformer();
|
|
60265
62777
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60266
62778
|
|
|
@@ -60288,7 +62800,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
|
|
|
60288
62800
|
function _interopRequireDefault(obj) {
|
|
60289
62801
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60290
62802
|
}
|
|
60291
|
-
var _types =
|
|
62803
|
+
var _types = require_types3();
|
|
60292
62804
|
var _Transformer = require_Transformer();
|
|
60293
62805
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60294
62806
|
|
|
@@ -60404,7 +62916,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
|
|
|
60404
62916
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60405
62917
|
}
|
|
60406
62918
|
var _tokenizer = require_tokenizer();
|
|
60407
|
-
var _types =
|
|
62919
|
+
var _types = require_types3();
|
|
60408
62920
|
var _Transformer = require_Transformer();
|
|
60409
62921
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60410
62922
|
|
|
@@ -60655,7 +63167,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
|
|
|
60655
63167
|
function _interopRequireDefault(obj) {
|
|
60656
63168
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60657
63169
|
}
|
|
60658
|
-
var _types =
|
|
63170
|
+
var _types = require_types3();
|
|
60659
63171
|
var _isIdentifier = require_isIdentifier();
|
|
60660
63172
|
var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
|
|
60661
63173
|
var _Transformer = require_Transformer();
|
|
@@ -60801,7 +63313,7 @@ var require_RootTransformer = __commonJS((exports) => {
|
|
|
60801
63313
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60802
63314
|
}
|
|
60803
63315
|
var _keywords = require_keywords();
|
|
60804
|
-
var _types =
|
|
63316
|
+
var _types = require_types3();
|
|
60805
63317
|
var _getClassInfo = require_getClassInfo();
|
|
60806
63318
|
var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
|
|
60807
63319
|
var _CJSImportTransformer = require_CJSImportTransformer();
|
|
@@ -61200,7 +63712,7 @@ var require_formatTokens = __commonJS((exports) => {
|
|
|
61200
63712
|
}
|
|
61201
63713
|
var _linesandcolumns = require_build();
|
|
61202
63714
|
var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
|
|
61203
|
-
var _types =
|
|
63715
|
+
var _types = require_types3();
|
|
61204
63716
|
function formatTokens(code, tokens) {
|
|
61205
63717
|
if (tokens.length === 0) {
|
|
61206
63718
|
return "";
|
|
@@ -61265,7 +63777,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
|
|
|
61265
63777
|
function _interopRequireDefault(obj) {
|
|
61266
63778
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
61267
63779
|
}
|
|
61268
|
-
var _types =
|
|
63780
|
+
var _types = require_types3();
|
|
61269
63781
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
61270
63782
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
61271
63783
|
function getTSImportedNames(tokens) {
|
|
@@ -61650,7 +64162,7 @@ function describeUnsupportedType(nodeType) {
|
|
|
61650
64162
|
function compileTypedScript(opts) {
|
|
61651
64163
|
let ast;
|
|
61652
64164
|
try {
|
|
61653
|
-
ast =
|
|
64165
|
+
ast = import_parser4.parse(opts.source, {
|
|
61654
64166
|
sourceType: "script",
|
|
61655
64167
|
plugins: ["typescript"],
|
|
61656
64168
|
ranges: true
|
|
@@ -61902,9 +64414,9 @@ function stripCommentsAndStrings(s) {
|
|
|
61902
64414
|
out = out.replace(/`(\\.|[^`\\])*`/g, "``");
|
|
61903
64415
|
return out;
|
|
61904
64416
|
}
|
|
61905
|
-
var
|
|
64417
|
+
var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
|
|
61906
64418
|
var init_compile = __esm(() => {
|
|
61907
|
-
|
|
64419
|
+
import_parser4 = __toESM(require_lib(), 1);
|
|
61908
64420
|
import_sucrase = __toESM(require_dist3(), 1);
|
|
61909
64421
|
EVALUATOR_PARAM_NAMES = ["expected", "actual"];
|
|
61910
64422
|
});
|
|
@@ -62139,8 +64651,8 @@ function getAllStepJsonSchemas() {
|
|
|
62139
64651
|
category: def.category,
|
|
62140
64652
|
name: def.name,
|
|
62141
64653
|
description: def.description,
|
|
62142
|
-
configSchema:
|
|
62143
|
-
outputSchema:
|
|
64654
|
+
configSchema: toJsonSchema(def.configSchema),
|
|
64655
|
+
outputSchema: toJsonSchema(def.outputSchema),
|
|
62144
64656
|
configInWith: def.configInWith
|
|
62145
64657
|
}));
|
|
62146
64658
|
}
|
|
@@ -62868,81 +65380,6 @@ var init_actions = __esm(() => {
|
|
|
62868
65380
|
ACTION_TYPES = ActionTypeSchema.options;
|
|
62869
65381
|
});
|
|
62870
65382
|
|
|
62871
|
-
// ../types/src/processor/execution.ts
|
|
62872
|
-
function asTuple(values) {
|
|
62873
|
-
return values;
|
|
62874
|
-
}
|
|
62875
|
-
var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
|
|
62876
|
-
var init_execution = __esm(() => {
|
|
62877
|
-
init_zod();
|
|
62878
|
-
WorkflowExecutionStatusValue2 = {
|
|
62879
|
-
CREATED: "created",
|
|
62880
|
-
PENDING: "pending",
|
|
62881
|
-
RUNNING: "running",
|
|
62882
|
-
WAITING: "waiting",
|
|
62883
|
-
COMPLETED: "completed",
|
|
62884
|
-
FAILED: "failed",
|
|
62885
|
-
CANCELLED: "cancelled"
|
|
62886
|
-
};
|
|
62887
|
-
WorkflowExecutionStatusSchema2 = exports_external.enum([
|
|
62888
|
-
WorkflowExecutionStatusValue2.CREATED,
|
|
62889
|
-
WorkflowExecutionStatusValue2.PENDING,
|
|
62890
|
-
WorkflowExecutionStatusValue2.RUNNING,
|
|
62891
|
-
WorkflowExecutionStatusValue2.WAITING,
|
|
62892
|
-
WorkflowExecutionStatusValue2.COMPLETED,
|
|
62893
|
-
WorkflowExecutionStatusValue2.FAILED,
|
|
62894
|
-
WorkflowExecutionStatusValue2.CANCELLED
|
|
62895
|
-
]);
|
|
62896
|
-
StepExecutionStatusValue2 = {
|
|
62897
|
-
PENDING: "pending",
|
|
62898
|
-
RUNNING: "running",
|
|
62899
|
-
SUCCESS: "success",
|
|
62900
|
-
FAILURE: "failure",
|
|
62901
|
-
WAITING: "waiting",
|
|
62902
|
-
SKIPPED: "skipped"
|
|
62903
|
-
};
|
|
62904
|
-
StepExecutionStatusSchema2 = exports_external.enum([
|
|
62905
|
-
StepExecutionStatusValue2.PENDING,
|
|
62906
|
-
StepExecutionStatusValue2.RUNNING,
|
|
62907
|
-
StepExecutionStatusValue2.SUCCESS,
|
|
62908
|
-
StepExecutionStatusValue2.FAILURE,
|
|
62909
|
-
StepExecutionStatusValue2.WAITING,
|
|
62910
|
-
StepExecutionStatusValue2.SKIPPED
|
|
62911
|
-
]);
|
|
62912
|
-
TriggerTypeValue2 = {
|
|
62913
|
-
MANUAL: "manual",
|
|
62914
|
-
API: "api",
|
|
62915
|
-
WEBHOOK: "webhook",
|
|
62916
|
-
SCHEDULE: "schedule",
|
|
62917
|
-
EMAIL: "email",
|
|
62918
|
-
EVAL: "eval",
|
|
62919
|
-
CLI: "cli"
|
|
62920
|
-
};
|
|
62921
|
-
TriggerTypeSchema2 = exports_external.enum([
|
|
62922
|
-
TriggerTypeValue2.MANUAL,
|
|
62923
|
-
TriggerTypeValue2.API,
|
|
62924
|
-
TriggerTypeValue2.WEBHOOK,
|
|
62925
|
-
TriggerTypeValue2.SCHEDULE,
|
|
62926
|
-
TriggerTypeValue2.EMAIL,
|
|
62927
|
-
TriggerTypeValue2.EVAL,
|
|
62928
|
-
TriggerTypeValue2.CLI
|
|
62929
|
-
]);
|
|
62930
|
-
ExecutionTypeValue2 = {
|
|
62931
|
-
PROD: "prod",
|
|
62932
|
-
EVAL: "eval",
|
|
62933
|
-
PLAYGROUND: "playground"
|
|
62934
|
-
};
|
|
62935
|
-
ExecutionTypeSchema2 = exports_external.enum([
|
|
62936
|
-
ExecutionTypeValue2.PROD,
|
|
62937
|
-
ExecutionTypeValue2.EVAL,
|
|
62938
|
-
ExecutionTypeValue2.PLAYGROUND
|
|
62939
|
-
]);
|
|
62940
|
-
WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
|
|
62941
|
-
STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
|
|
62942
|
-
TRIGGER_TYPES2 = TriggerTypeSchema2.options;
|
|
62943
|
-
EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
|
|
62944
|
-
});
|
|
62945
|
-
|
|
62946
65383
|
// ../types/src/workflow/workflow.ts
|
|
62947
65384
|
function suggestWorkflowName(raw) {
|
|
62948
65385
|
return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
|
|
@@ -63023,11 +65460,11 @@ var init_workflow = __esm(() => {
|
|
|
63023
65460
|
ManualTriggerMethodSchema = exports_external.object({
|
|
63024
65461
|
type: exports_external.literal("manual"),
|
|
63025
65462
|
enabled: exports_external.boolean().optional(),
|
|
63026
|
-
inputSchema:
|
|
65463
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
63027
65464
|
});
|
|
63028
65465
|
ApiTriggerMethodSchema = exports_external.object({
|
|
63029
65466
|
type: exports_external.literal("api"),
|
|
63030
|
-
inputSchema:
|
|
65467
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
63031
65468
|
});
|
|
63032
65469
|
EmailTriggerMethodSchema = exports_external.object({
|
|
63033
65470
|
type: exports_external.literal("email"),
|
|
@@ -63066,8 +65503,8 @@ var init_workflow = __esm(() => {
|
|
|
63066
65503
|
yamlContent: exports_external.string(),
|
|
63067
65504
|
definition: WorkflowDefinitionSchema,
|
|
63068
65505
|
isCurrent: exports_external.boolean().default(true),
|
|
63069
|
-
createdAt:
|
|
63070
|
-
updatedAt:
|
|
65506
|
+
createdAt: TimestampSchema,
|
|
65507
|
+
updatedAt: TimestampSchema.optional(),
|
|
63071
65508
|
createdBy: exports_external.string()
|
|
63072
65509
|
});
|
|
63073
65510
|
CreateWorkflowDefinitionSchema = exports_external.object({
|
|
@@ -63249,14 +65686,14 @@ function isFileOutput(value) {
|
|
|
63249
65686
|
function isWorkflowResult(value) {
|
|
63250
65687
|
return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
|
|
63251
65688
|
}
|
|
63252
|
-
var
|
|
65689
|
+
var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
63253
65690
|
var init_execution2 = __esm(() => {
|
|
63254
65691
|
init_zod();
|
|
63255
65692
|
init_common();
|
|
63256
65693
|
init_execution();
|
|
63257
65694
|
init_workflow();
|
|
63258
|
-
|
|
63259
|
-
|
|
65695
|
+
WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
|
|
65696
|
+
StepExecutionStatusSchema2 = StepExecutionStatusSchema;
|
|
63260
65697
|
ScopeEntryTypeSchema = exports_external.enum([
|
|
63261
65698
|
"root",
|
|
63262
65699
|
"if-then",
|
|
@@ -63278,7 +65715,7 @@ var init_execution2 = __esm(() => {
|
|
|
63278
65715
|
ScopeStackSchema = exports_external.array(ScopeEntrySchema);
|
|
63279
65716
|
StepResultSchema = exports_external.object({
|
|
63280
65717
|
output: exports_external.unknown(),
|
|
63281
|
-
status:
|
|
65718
|
+
status: StepExecutionStatusSchema2
|
|
63282
65719
|
});
|
|
63283
65720
|
ExecutionContextSchema = exports_external.object({
|
|
63284
65721
|
input: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
@@ -63306,7 +65743,7 @@ var init_execution2 = __esm(() => {
|
|
|
63306
65743
|
triggerType: exports_external.string(),
|
|
63307
65744
|
triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
|
|
63308
65745
|
overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
|
|
63309
|
-
status:
|
|
65746
|
+
status: WorkflowExecutionStatusSchema2,
|
|
63310
65747
|
scopeStack: ScopeStackSchema,
|
|
63311
65748
|
currentStepIndex: exports_external.number(),
|
|
63312
65749
|
stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
|
|
@@ -63314,15 +65751,15 @@ var init_execution2 = __esm(() => {
|
|
|
63314
65751
|
error: exports_external.string().nullable(),
|
|
63315
65752
|
priority: exports_external.number().default(50),
|
|
63316
65753
|
leaseId: exports_external.string().nullable(),
|
|
63317
|
-
leaseExpiresAt:
|
|
65754
|
+
leaseExpiresAt: TimestampSchema.nullable(),
|
|
63318
65755
|
workerId: exports_external.string().nullable(),
|
|
63319
65756
|
maxRetries: exports_external.number().default(0),
|
|
63320
65757
|
originalExecutionId: exports_external.string().nullable().optional(),
|
|
63321
65758
|
previousExecutionId: exports_external.string().nullable().optional(),
|
|
63322
65759
|
retryNumber: exports_external.number().default(0),
|
|
63323
|
-
createdAt:
|
|
63324
|
-
startedAt:
|
|
63325
|
-
completedAt:
|
|
65760
|
+
createdAt: TimestampSchema,
|
|
65761
|
+
startedAt: TimestampSchema.nullable(),
|
|
65762
|
+
completedAt: TimestampSchema.nullable(),
|
|
63326
65763
|
createdBy: exports_external.string().nullable()
|
|
63327
65764
|
});
|
|
63328
65765
|
StepExecutionSchema = exports_external.object({
|
|
@@ -63339,12 +65776,12 @@ var init_execution2 = __esm(() => {
|
|
|
63339
65776
|
stepAttempt: exports_external.number().default(0),
|
|
63340
65777
|
inputData: exports_external.unknown().nullable(),
|
|
63341
65778
|
outputData: exports_external.unknown().nullable(),
|
|
63342
|
-
status:
|
|
65779
|
+
status: StepExecutionStatusSchema2,
|
|
63343
65780
|
error: exports_external.string().nullable(),
|
|
63344
65781
|
overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
|
|
63345
65782
|
durationMs: exports_external.number().nullable(),
|
|
63346
|
-
startedAt:
|
|
63347
|
-
completedAt:
|
|
65783
|
+
startedAt: TimestampSchema.nullable(),
|
|
65784
|
+
completedAt: TimestampSchema.nullable()
|
|
63348
65785
|
});
|
|
63349
65786
|
ConnectorSchema = exports_external.object({
|
|
63350
65787
|
id: exports_external.string(),
|
|
@@ -63355,8 +65792,8 @@ var init_execution2 = __esm(() => {
|
|
|
63355
65792
|
config: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
63356
65793
|
inputSchema: exports_external.unknown().optional(),
|
|
63357
65794
|
outputSchema: exports_external.unknown().optional(),
|
|
63358
|
-
createdAt:
|
|
63359
|
-
updatedAt:
|
|
65795
|
+
createdAt: TimestampSchema,
|
|
65796
|
+
updatedAt: TimestampSchema.optional(),
|
|
63360
65797
|
createdBy: exports_external.string()
|
|
63361
65798
|
});
|
|
63362
65799
|
WorkflowFileOutputSchema = exports_external.object({
|
|
@@ -63706,7 +66143,7 @@ function partialMatch(expected, actual, path, mismatches) {
|
|
|
63706
66143
|
}
|
|
63707
66144
|
let allMatch = true;
|
|
63708
66145
|
for (let i = 0;i < expected.length; i++) {
|
|
63709
|
-
const childPath = path ? `${path}
|
|
66146
|
+
const childPath = path ? `${path}[${i}]` : `[${i}]`;
|
|
63710
66147
|
if (!partialMatch(expected[i], actual[i], childPath, mismatches)) {
|
|
63711
66148
|
allMatch = false;
|
|
63712
66149
|
}
|
|
@@ -63877,7 +66314,7 @@ function formatZodError(source) {
|
|
|
63877
66314
|
severity: "error"
|
|
63878
66315
|
}));
|
|
63879
66316
|
}
|
|
63880
|
-
var DATASET_NAME_PATTERN, DatasetNameSchema, DatasetMetaSchema, DatasetImportModeSchema, DatasetImportRequestSchema, EvaluatorsImportRequestSchema, EvalResultsExportFormatSchema, ExperimentExportQuerySchema, EvalResultsExportQuerySchema, EvalResultExportRowSchema, EvalResultsExportJsonSchema, ERROR_HINTS;
|
|
66317
|
+
var DATASET_NAME_PATTERN, DatasetNameSchema, DatasetMetaSchema, DatasetImportModeSchema, DatasetImportRequestSchema, EvaluatorsImportRequestSchema, EvalResultsExportFormatSchema, BooleanQueryFlagSchema, ExperimentExportBaseQuerySchema, ExperimentExportAllQuerySchema, ExperimentExportQuerySchema, EvalResultsExportQuerySchema, EvalResultExportRowSchema, EvalResultsExportJsonSchema, ERROR_HINTS;
|
|
63881
66318
|
var init_dataset_archive = __esm(() => {
|
|
63882
66319
|
init_zod();
|
|
63883
66320
|
DATASET_NAME_PATTERN = /^[a-z0-9][a-z0-9-_]*$/;
|
|
@@ -63895,9 +66332,14 @@ var init_dataset_archive = __esm(() => {
|
|
|
63895
66332
|
yaml: exports_external.string().min(1, "yaml content is required").max(1048576, "evaluator YAML exceeds 1 MB")
|
|
63896
66333
|
});
|
|
63897
66334
|
EvalResultsExportFormatSchema = exports_external.enum(["csv", "json"]);
|
|
63898
|
-
|
|
66335
|
+
BooleanQueryFlagSchema = exports_external.enum(["true", "false", "1", "0"]).optional().transform((value) => value === "true" || value === "1");
|
|
66336
|
+
ExperimentExportBaseQuerySchema = exports_external.object({
|
|
63899
66337
|
format: EvalResultsExportFormatSchema
|
|
63900
66338
|
});
|
|
66339
|
+
ExperimentExportAllQuerySchema = ExperimentExportBaseQuerySchema;
|
|
66340
|
+
ExperimentExportQuerySchema = ExperimentExportBaseQuerySchema.extend({
|
|
66341
|
+
includeTrace: BooleanQueryFlagSchema
|
|
66342
|
+
});
|
|
63901
66343
|
EvalResultsExportQuerySchema = ExperimentExportQuerySchema;
|
|
63902
66344
|
EvalResultExportRowSchema = exports_external.object({
|
|
63903
66345
|
executionId: exports_external.string().min(1),
|
|
@@ -63946,7 +66388,7 @@ function combineEvalScores(results) {
|
|
|
63946
66388
|
let numerator = 0;
|
|
63947
66389
|
let denominator = 0;
|
|
63948
66390
|
for (const r of results) {
|
|
63949
|
-
if (r.weight <= 0)
|
|
66391
|
+
if (r.weight <= 0 || r.score === null)
|
|
63950
66392
|
continue;
|
|
63951
66393
|
numerator += r.score * r.weight;
|
|
63952
66394
|
denominator += r.weight;
|
|
@@ -64031,8 +66473,8 @@ var init_evaluator_config = __esm(() => {
|
|
|
64031
66473
|
passThreshold: ScoreInUnitInterval.optional()
|
|
64032
66474
|
});
|
|
64033
66475
|
EvaluatorResultSchema = exports_external.object({
|
|
64034
|
-
score: ScoreInUnitInterval,
|
|
64035
|
-
passed: exports_external.boolean(),
|
|
66476
|
+
score: ScoreInUnitInterval.nullable(),
|
|
66477
|
+
passed: exports_external.boolean().nullable(),
|
|
64036
66478
|
label: exports_external.string().optional(),
|
|
64037
66479
|
details: exports_external.unknown()
|
|
64038
66480
|
});
|
|
@@ -64274,8 +66716,8 @@ function parseRunTarget(target) {
|
|
|
64274
66716
|
if (root !== "agents") {
|
|
64275
66717
|
throw new Error(`Agent target must be rooted at "agents.", got "${idOrSlug2}"`);
|
|
64276
66718
|
}
|
|
64277
|
-
for (const
|
|
64278
|
-
RunTargetSegmentSchema.parse(
|
|
66719
|
+
for (const segment2 of segments) {
|
|
66720
|
+
RunTargetSegmentSchema.parse(segment2);
|
|
64279
66721
|
}
|
|
64280
66722
|
const packagePath = packageName.split(".").join("/");
|
|
64281
66723
|
const [, ...slugParts] = packagePath.split("/");
|
|
@@ -64388,9 +66830,9 @@ var init_grammar = __esm(() => {
|
|
|
64388
66830
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
64389
66831
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
64390
66832
|
}
|
|
64391
|
-
for (const
|
|
64392
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
64393
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
66833
|
+
for (const segment2 of parts.slice(1)) {
|
|
66834
|
+
if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
|
|
66835
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
|
|
64394
66836
|
}
|
|
64395
66837
|
}
|
|
64396
66838
|
});
|
|
@@ -64406,9 +66848,9 @@ var init_grammar = __esm(() => {
|
|
|
64406
66848
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
64407
66849
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
64408
66850
|
}
|
|
64409
|
-
for (const
|
|
64410
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
64411
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
66851
|
+
for (const segment2 of parts.slice(1)) {
|
|
66852
|
+
if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
|
|
66853
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
|
|
64412
66854
|
}
|
|
64413
66855
|
}
|
|
64414
66856
|
});
|
|
@@ -64502,9 +66944,9 @@ var init_grammar = __esm(() => {
|
|
|
64502
66944
|
});
|
|
64503
66945
|
return;
|
|
64504
66946
|
}
|
|
64505
|
-
for (const
|
|
64506
|
-
if (!RunTargetSegmentSchema.safeParse(
|
|
64507
|
-
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${
|
|
66947
|
+
for (const segment2 of parts.slice(1)) {
|
|
66948
|
+
if (!RunTargetSegmentSchema.safeParse(segment2).success) {
|
|
66949
|
+
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment2}` });
|
|
64508
66950
|
}
|
|
64509
66951
|
}
|
|
64510
66952
|
if (ref) {
|
|
@@ -65256,7 +67698,7 @@ function fromBig(n, le = false) {
|
|
|
65256
67698
|
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
65257
67699
|
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
65258
67700
|
}
|
|
65259
|
-
function
|
|
67701
|
+
function split2(lst, le = false) {
|
|
65260
67702
|
const len = lst.length;
|
|
65261
67703
|
let Ah = new Uint32Array(len);
|
|
65262
67704
|
let Al = new Uint32Array(len);
|
|
@@ -65436,7 +67878,7 @@ var init_sha2 = __esm(() => {
|
|
|
65436
67878
|
super(28);
|
|
65437
67879
|
}
|
|
65438
67880
|
};
|
|
65439
|
-
K512 = /* @__PURE__ */ (() =>
|
|
67881
|
+
K512 = /* @__PURE__ */ (() => split2([
|
|
65440
67882
|
"0x428a2f98d728ae22",
|
|
65441
67883
|
"0x7137449123ef65cd",
|
|
65442
67884
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -65825,11 +68267,11 @@ function walkGrammar(node, parts) {
|
|
|
65825
68267
|
}
|
|
65826
68268
|
return current;
|
|
65827
68269
|
}
|
|
65828
|
-
function normalizeTemplate(
|
|
65829
|
-
return
|
|
68270
|
+
function normalizeTemplate(template2) {
|
|
68271
|
+
return template2.endsWith("/") ? template2.slice(0, -1) : template2;
|
|
65830
68272
|
}
|
|
65831
|
-
function renderTemplate(
|
|
65832
|
-
return normalizeTemplate(
|
|
68273
|
+
function renderTemplate(template2, params) {
|
|
68274
|
+
return normalizeTemplate(template2).split("/").flatMap((part) => {
|
|
65833
68275
|
if (!part.startsWith(":")) {
|
|
65834
68276
|
return [part];
|
|
65835
68277
|
}
|
|
@@ -65839,36 +68281,36 @@ function renderTemplate(template, params) {
|
|
|
65839
68281
|
throw new Error(`Missing S3 path parameter: ${part}`);
|
|
65840
68282
|
}
|
|
65841
68283
|
if (name === "path") {
|
|
65842
|
-
return value.split("/").map((
|
|
68284
|
+
return value.split("/").map((segment2) => assertSegment("path", segment2));
|
|
65843
68285
|
}
|
|
65844
68286
|
return [assertSegment(String(name), value)];
|
|
65845
68287
|
});
|
|
65846
68288
|
}
|
|
65847
|
-
function buildS3Path(tenantId,
|
|
68289
|
+
function buildS3Path(tenantId, template2, params) {
|
|
65848
68290
|
const tenant = assertSegment("tenantId", tenantId);
|
|
65849
|
-
const parts = renderTemplate(
|
|
68291
|
+
const parts = renderTemplate(template2, params);
|
|
65850
68292
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
65851
|
-
if (
|
|
65852
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
68293
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
68294
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
65853
68295
|
}
|
|
65854
68296
|
const path = ["tenants", tenant, ...parts].join("/");
|
|
65855
|
-
return
|
|
68297
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
65856
68298
|
}
|
|
65857
|
-
function buildS3PathSuffix(
|
|
65858
|
-
const parts = renderTemplate(
|
|
68299
|
+
function buildS3PathSuffix(template2, params) {
|
|
68300
|
+
const parts = renderTemplate(template2, params);
|
|
65859
68301
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
65860
|
-
if (
|
|
65861
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
68302
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
68303
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
65862
68304
|
}
|
|
65863
68305
|
const path = parts.join("/");
|
|
65864
|
-
return
|
|
68306
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
65865
68307
|
}
|
|
65866
68308
|
function stripTenantPrefix(key) {
|
|
65867
68309
|
return key.replace(TENANT_PREFIX_RX, "");
|
|
65868
68310
|
}
|
|
65869
|
-
function matchS3Path(
|
|
68311
|
+
function matchS3Path(template2, key) {
|
|
65870
68312
|
const keyParts = stripTenantPrefix(key).split("/");
|
|
65871
|
-
const templateParts = normalizeTemplate(
|
|
68313
|
+
const templateParts = normalizeTemplate(template2).split("/");
|
|
65872
68314
|
const params = {};
|
|
65873
68315
|
let keyIndex = 0;
|
|
65874
68316
|
for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
|
|
@@ -65887,7 +68329,7 @@ function matchS3Path(template, key) {
|
|
|
65887
68329
|
if (rest.length === 0)
|
|
65888
68330
|
return null;
|
|
65889
68331
|
try {
|
|
65890
|
-
params.path = rest.map((
|
|
68332
|
+
params.path = rest.map((segment2) => assertSegment("path", segment2)).join("/");
|
|
65891
68333
|
walkGrammar(S3_PATH_GRAMMAR, keyParts);
|
|
65892
68334
|
} catch {
|
|
65893
68335
|
return null;
|
|
@@ -65921,23 +68363,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
|
|
|
65921
68363
|
}
|
|
65922
68364
|
return assertSegment("tenantId", tenantId);
|
|
65923
68365
|
};
|
|
65924
|
-
const build = (
|
|
68366
|
+
const build = (template2, params) => {
|
|
65925
68367
|
const tenant = resolveTenantId(params);
|
|
65926
|
-
const parts = renderTemplate(
|
|
68368
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
65927
68369
|
const node = walkGrammar(grammarNode, parts);
|
|
65928
|
-
if (
|
|
65929
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
68370
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
68371
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
65930
68372
|
}
|
|
65931
68373
|
const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
|
|
65932
|
-
return
|
|
68374
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
65933
68375
|
};
|
|
65934
68376
|
const builder = build;
|
|
65935
|
-
builder.at = (
|
|
68377
|
+
builder.at = (template2, params) => {
|
|
65936
68378
|
const tenant = resolveTenantId(params);
|
|
65937
|
-
const parts = renderTemplate(
|
|
68379
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
65938
68380
|
const nextNode = walkGrammar(grammarNode, parts);
|
|
65939
|
-
if (
|
|
65940
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
68381
|
+
if (template2.endsWith("/") && nextNode === PATH_LEAF) {
|
|
68382
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
65941
68383
|
}
|
|
65942
68384
|
return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
|
|
65943
68385
|
};
|
|
@@ -66322,7 +68764,7 @@ __export(exports_src, {
|
|
|
66322
68764
|
SplitConfigSchema: () => SplitConfigSchema,
|
|
66323
68765
|
SpanTypes: () => SpanTypes,
|
|
66324
68766
|
SpanKindMap: () => SpanKindMap,
|
|
66325
|
-
SpanKind: () => SpanKind,
|
|
68767
|
+
SpanKind: () => import_api.SpanKind,
|
|
66326
68768
|
SourceVersionRefSchema: () => SourceVersionRefSchema,
|
|
66327
68769
|
SourceSecretsFileSchema: () => SourceSecretsFileSchema,
|
|
66328
68770
|
SourcePackageTypeSchema: () => SourcePackageTypeSchema,
|
|
@@ -66428,7 +68870,7 @@ __export(exports_src, {
|
|
|
66428
68870
|
GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
|
|
66429
68871
|
ForeachStepSchema: () => ForeachStepSchema,
|
|
66430
68872
|
FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
|
|
66431
|
-
FilePathDescriptorSchema: () =>
|
|
68873
|
+
FilePathDescriptorSchema: () => FilePathDescriptorSchema,
|
|
66432
68874
|
FileIngressRefSchema: () => FileIngressRefSchema,
|
|
66433
68875
|
FileIdIngressRefSchema: () => FileIdIngressRefSchema,
|
|
66434
68876
|
FailStepSchema: () => FailStepSchema,
|
|
@@ -66437,6 +68879,7 @@ __export(exports_src, {
|
|
|
66437
68879
|
ExtractInputSchema: () => ExtractInputSchema,
|
|
66438
68880
|
ExtractConfigSchema: () => ExtractConfigSchema,
|
|
66439
68881
|
ExperimentExportQuerySchema: () => ExperimentExportQuerySchema,
|
|
68882
|
+
ExperimentExportAllQuerySchema: () => ExperimentExportAllQuerySchema,
|
|
66440
68883
|
ExpectedOutputSchema: () => ExpectedOutputSchema,
|
|
66441
68884
|
ExpectedOutputFilesSchema: () => ExpectedOutputFilesSchema,
|
|
66442
68885
|
ExpectedErrorSchema: () => ExpectedErrorSchema,
|
|
@@ -66550,8 +68993,8 @@ var init_src = __esm(() => {
|
|
|
66550
68993
|
init_legacy_boundary();
|
|
66551
68994
|
init_runtime_file_ref();
|
|
66552
68995
|
init_scoped_file_ref();
|
|
66553
|
-
|
|
66554
|
-
|
|
68996
|
+
init_processor2();
|
|
68997
|
+
init_parser2();
|
|
66555
68998
|
init_otel();
|
|
66556
68999
|
init_execution_row();
|
|
66557
69000
|
init_run_expand();
|
|
@@ -67464,7 +69907,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
67464
69907
|
else
|
|
67465
69908
|
end = lineWidth - indentAtStart;
|
|
67466
69909
|
}
|
|
67467
|
-
let
|
|
69910
|
+
let split3 = undefined;
|
|
67468
69911
|
let prev = undefined;
|
|
67469
69912
|
let overflow = false;
|
|
67470
69913
|
let i = -1;
|
|
@@ -67498,20 +69941,20 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
67498
69941
|
if (mode === FOLD_BLOCK)
|
|
67499
69942
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
67500
69943
|
end = i + indent.length + endStep;
|
|
67501
|
-
|
|
69944
|
+
split3 = undefined;
|
|
67502
69945
|
} else {
|
|
67503
69946
|
if (ch === " " && prev && prev !== " " && prev !== `
|
|
67504
69947
|
` && prev !== "\t") {
|
|
67505
69948
|
const next = text[i + 1];
|
|
67506
69949
|
if (next && next !== " " && next !== `
|
|
67507
69950
|
` && next !== "\t")
|
|
67508
|
-
|
|
69951
|
+
split3 = i;
|
|
67509
69952
|
}
|
|
67510
69953
|
if (i >= end) {
|
|
67511
|
-
if (
|
|
67512
|
-
folds.push(
|
|
67513
|
-
end =
|
|
67514
|
-
|
|
69954
|
+
if (split3) {
|
|
69955
|
+
folds.push(split3);
|
|
69956
|
+
end = split3 + endStep;
|
|
69957
|
+
split3 = undefined;
|
|
67515
69958
|
} else if (mode === FOLD_QUOTED) {
|
|
67516
69959
|
while (prev === " " || prev === "\t") {
|
|
67517
69960
|
prev = ch;
|
|
@@ -67524,7 +69967,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
67524
69967
|
folds.push(j);
|
|
67525
69968
|
escapedFolds[j] = true;
|
|
67526
69969
|
end = j + endStep;
|
|
67527
|
-
|
|
69970
|
+
split3 = undefined;
|
|
67528
69971
|
} else {
|
|
67529
69972
|
overflow = true;
|
|
67530
69973
|
}
|
|
@@ -68158,7 +70601,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
68158
70601
|
var identity = require_identity();
|
|
68159
70602
|
var Scalar = require_Scalar();
|
|
68160
70603
|
var MERGE_KEY = "<<";
|
|
68161
|
-
var
|
|
70604
|
+
var merge3 = {
|
|
68162
70605
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
68163
70606
|
default: "key",
|
|
68164
70607
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -68168,7 +70611,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
68168
70611
|
}),
|
|
68169
70612
|
stringify: () => MERGE_KEY
|
|
68170
70613
|
};
|
|
68171
|
-
var isMergeKey = (ctx, key) => (
|
|
70614
|
+
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);
|
|
68172
70615
|
function addMergeToJSMap(ctx, map2, value) {
|
|
68173
70616
|
const source = resolveAliasValue(ctx, value);
|
|
68174
70617
|
if (identity.isSeq(source))
|
|
@@ -68207,21 +70650,21 @@ var require_merge = __commonJS((exports) => {
|
|
|
68207
70650
|
}
|
|
68208
70651
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
68209
70652
|
exports.isMergeKey = isMergeKey;
|
|
68210
|
-
exports.merge =
|
|
70653
|
+
exports.merge = merge3;
|
|
68211
70654
|
});
|
|
68212
70655
|
|
|
68213
70656
|
// ../../node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
68214
70657
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
68215
70658
|
var log = require_log();
|
|
68216
|
-
var
|
|
70659
|
+
var merge3 = require_merge();
|
|
68217
70660
|
var stringify = require_stringify();
|
|
68218
70661
|
var identity = require_identity();
|
|
68219
70662
|
var toJS = require_toJS();
|
|
68220
70663
|
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
68221
70664
|
if (identity.isNode(key) && key.addToJSMap)
|
|
68222
70665
|
key.addToJSMap(ctx, map2, value);
|
|
68223
|
-
else if (
|
|
68224
|
-
|
|
70666
|
+
else if (merge3.isMergeKey(ctx, key))
|
|
70667
|
+
merge3.addMergeToJSMap(ctx, map2, value);
|
|
68225
70668
|
else {
|
|
68226
70669
|
const jsKey = toJS.toJS(key, "", ctx);
|
|
68227
70670
|
if (map2 instanceof Map) {
|
|
@@ -69497,7 +71940,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
69497
71940
|
var bool = require_bool2();
|
|
69498
71941
|
var float = require_float2();
|
|
69499
71942
|
var int2 = require_int2();
|
|
69500
|
-
var
|
|
71943
|
+
var merge3 = require_merge();
|
|
69501
71944
|
var omap = require_omap();
|
|
69502
71945
|
var pairs = require_pairs();
|
|
69503
71946
|
var set2 = require_set();
|
|
@@ -69517,7 +71960,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
69517
71960
|
float.floatExp,
|
|
69518
71961
|
float.float,
|
|
69519
71962
|
binary.binary,
|
|
69520
|
-
|
|
71963
|
+
merge3.merge,
|
|
69521
71964
|
omap.omap,
|
|
69522
71965
|
pairs.pairs,
|
|
69523
71966
|
set2.set,
|
|
@@ -69540,7 +71983,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
69540
71983
|
var schema = require_schema();
|
|
69541
71984
|
var schema$1 = require_schema2();
|
|
69542
71985
|
var binary = require_binary();
|
|
69543
|
-
var
|
|
71986
|
+
var merge3 = require_merge();
|
|
69544
71987
|
var omap = require_omap();
|
|
69545
71988
|
var pairs = require_pairs();
|
|
69546
71989
|
var schema$2 = require_schema3();
|
|
@@ -69565,7 +72008,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
69565
72008
|
intOct: int2.intOct,
|
|
69566
72009
|
intTime: timestamp.intTime,
|
|
69567
72010
|
map: map2.map,
|
|
69568
|
-
merge:
|
|
72011
|
+
merge: merge3.merge,
|
|
69569
72012
|
null: _null4.nullTag,
|
|
69570
72013
|
omap: omap.omap,
|
|
69571
72014
|
pairs: pairs.pairs,
|
|
@@ -69575,7 +72018,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
69575
72018
|
};
|
|
69576
72019
|
var coreKnownTags = {
|
|
69577
72020
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
69578
|
-
"tag:yaml.org,2002:merge":
|
|
72021
|
+
"tag:yaml.org,2002:merge": merge3.merge,
|
|
69579
72022
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
69580
72023
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
69581
72024
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -69584,7 +72027,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
69584
72027
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
69585
72028
|
const schemaTags = schemas3.get(schemaName);
|
|
69586
72029
|
if (schemaTags && !customTags) {
|
|
69587
|
-
return addMergeTag && !schemaTags.includes(
|
|
72030
|
+
return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
|
|
69588
72031
|
}
|
|
69589
72032
|
let tags = schemaTags;
|
|
69590
72033
|
if (!tags) {
|
|
@@ -69602,7 +72045,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
69602
72045
|
tags = customTags(tags.slice());
|
|
69603
72046
|
}
|
|
69604
72047
|
if (addMergeTag)
|
|
69605
|
-
tags = tags.concat(
|
|
72048
|
+
tags = tags.concat(merge3.merge);
|
|
69606
72049
|
return tags.reduce((tags2, tag) => {
|
|
69607
72050
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
69608
72051
|
if (!tagObj) {
|
|
@@ -69629,11 +72072,11 @@ var require_Schema = __commonJS((exports) => {
|
|
|
69629
72072
|
var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
69630
72073
|
|
|
69631
72074
|
class Schema {
|
|
69632
|
-
constructor({ compat: compat2, customTags, merge:
|
|
72075
|
+
constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
69633
72076
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
69634
72077
|
this.name = typeof schema === "string" && schema || "core";
|
|
69635
72078
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
69636
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
72079
|
+
this.tags = tags.getTags(customTags, this.name, merge3);
|
|
69637
72080
|
this.toStringOptions = toStringDefaults ?? null;
|
|
69638
72081
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
69639
72082
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -70856,13 +73299,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
70856
73299
|
return { mode, indent, chomp, comment, length };
|
|
70857
73300
|
}
|
|
70858
73301
|
function splitLines(source) {
|
|
70859
|
-
const
|
|
70860
|
-
const first =
|
|
73302
|
+
const split3 = source.split(/\n( *)/);
|
|
73303
|
+
const first = split3[0];
|
|
70861
73304
|
const m = first.match(/^( *)/);
|
|
70862
73305
|
const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
|
|
70863
73306
|
const lines = [line0];
|
|
70864
|
-
for (let i = 1;i <
|
|
70865
|
-
lines.push([
|
|
73307
|
+
for (let i = 1;i < split3.length; i += 2)
|
|
73308
|
+
lines.push([split3[i], split3[i + 1]]);
|
|
70866
73309
|
return lines;
|
|
70867
73310
|
}
|
|
70868
73311
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -73876,7 +76319,7 @@ var init_main = __esm(() => {
|
|
|
73876
76319
|
});
|
|
73877
76320
|
|
|
73878
76321
|
// ../../node_modules/sisteransi/src/index.js
|
|
73879
|
-
var
|
|
76322
|
+
var require_src2 = __commonJS((exports, module) => {
|
|
73880
76323
|
var ESC2 = "\x1B";
|
|
73881
76324
|
var CSI2 = `${ESC2}[`;
|
|
73882
76325
|
var beep = "\x07";
|
|
@@ -74219,7 +76662,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
|
|
|
74219
76662
|
}, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
|
|
74220
76663
|
var init_dist3 = __esm(() => {
|
|
74221
76664
|
init_main();
|
|
74222
|
-
import_sisteransi = __toESM(
|
|
76665
|
+
import_sisteransi = __toESM(require_src2(), 1);
|
|
74223
76666
|
G = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
74224
76667
|
K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
74225
76668
|
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)}` } } };
|
|
@@ -75562,7 +78005,7 @@ var init_dist4 = __esm(() => {
|
|
|
75562
78005
|
init_dist3();
|
|
75563
78006
|
init_main();
|
|
75564
78007
|
init_dist2();
|
|
75565
|
-
import_sisteransi2 = __toESM(
|
|
78008
|
+
import_sisteransi2 = __toESM(require_src2(), 1);
|
|
75566
78009
|
tt2 = te();
|
|
75567
78010
|
_t = w2("◆", "*");
|
|
75568
78011
|
ot2 = w2("■", "x");
|
|
@@ -169054,7 +171497,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
|
|
|
169054
171497
|
__defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
169055
171498
|
}
|
|
169056
171499
|
return to5;
|
|
169057
|
-
}, __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,
|
|
171500
|
+
}, __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 {
|
|
169058
171501
|
diff(oldStr, newStr, options8 = {}) {
|
|
169059
171502
|
let callback;
|
|
169060
171503
|
if (typeof options8 === "function") {
|
|
@@ -170076,7 +172519,7 @@ var init_prettier = __esm(() => {
|
|
|
170076
172519
|
};
|
|
170077
172520
|
}
|
|
170078
172521
|
});
|
|
170079
|
-
|
|
172522
|
+
require_utils4 = __commonJS2({
|
|
170080
172523
|
"node_modules/braces/lib/utils.js"(exports) {
|
|
170081
172524
|
exports.isInteger = (num) => {
|
|
170082
172525
|
if (typeof num === "number") {
|
|
@@ -170165,7 +172608,7 @@ var init_prettier = __esm(() => {
|
|
|
170165
172608
|
});
|
|
170166
172609
|
require_stringify2 = __commonJS2({
|
|
170167
172610
|
"node_modules/braces/lib/stringify.js"(exports, module) {
|
|
170168
|
-
var utils2 =
|
|
172611
|
+
var utils2 = require_utils4();
|
|
170169
172612
|
module.exports = (ast, options8 = {}) => {
|
|
170170
172613
|
const stringify2 = (node, parent = {}) => {
|
|
170171
172614
|
const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
|
|
@@ -170619,7 +173062,7 @@ var init_prettier = __esm(() => {
|
|
|
170619
173062
|
require_compile2 = __commonJS2({
|
|
170620
173063
|
"node_modules/braces/lib/compile.js"(exports, module) {
|
|
170621
173064
|
var fill2 = require_fill_range();
|
|
170622
|
-
var utils2 =
|
|
173065
|
+
var utils2 = require_utils4();
|
|
170623
173066
|
var compile = (ast, options8 = {}) => {
|
|
170624
173067
|
const walk2 = (node, parent = {}) => {
|
|
170625
173068
|
const invalidBlock = utils2.isInvalidBrace(parent);
|
|
@@ -170669,7 +173112,7 @@ var init_prettier = __esm(() => {
|
|
|
170669
173112
|
"node_modules/braces/lib/expand.js"(exports, module) {
|
|
170670
173113
|
var fill2 = require_fill_range();
|
|
170671
173114
|
var stringify2 = require_stringify2();
|
|
170672
|
-
var utils2 =
|
|
173115
|
+
var utils2 = require_utils4();
|
|
170673
173116
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
170674
173117
|
const result = [];
|
|
170675
173118
|
queue = [].concat(queue);
|
|
@@ -172868,8 +175311,8 @@ var init_prettier = __esm(() => {
|
|
|
172868
175311
|
var Stream = __require2("stream");
|
|
172869
175312
|
var PassThrough = Stream.PassThrough;
|
|
172870
175313
|
var slice = Array.prototype.slice;
|
|
172871
|
-
module.exports =
|
|
172872
|
-
function
|
|
175314
|
+
module.exports = merge22;
|
|
175315
|
+
function merge22() {
|
|
172873
175316
|
const streamsQueue = [];
|
|
172874
175317
|
const args = slice.call(arguments);
|
|
172875
175318
|
let merging = false;
|
|
@@ -172983,9 +175426,9 @@ var init_prettier = __esm(() => {
|
|
|
172983
175426
|
"node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
172984
175427
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
172985
175428
|
exports.merge = undefined;
|
|
172986
|
-
var
|
|
175429
|
+
var merge22 = require_merge2();
|
|
172987
175430
|
function merge3(streams) {
|
|
172988
|
-
const mergedStream =
|
|
175431
|
+
const mergedStream = merge22(streams);
|
|
172989
175432
|
streams.forEach((stream) => {
|
|
172990
175433
|
stream.once("error", (error52) => mergedStream.emit("error", error52));
|
|
172991
175434
|
});
|
|
@@ -173013,7 +175456,7 @@ var init_prettier = __esm(() => {
|
|
|
173013
175456
|
exports.isEmpty = isEmpty;
|
|
173014
175457
|
}
|
|
173015
175458
|
});
|
|
173016
|
-
|
|
175459
|
+
require_utils32 = __commonJS2({
|
|
173017
175460
|
"node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
173018
175461
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173019
175462
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
@@ -173037,7 +175480,7 @@ var init_prettier = __esm(() => {
|
|
|
173037
175480
|
"node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
173038
175481
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173039
175482
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
173040
|
-
var utils2 =
|
|
175483
|
+
var utils2 = require_utils32();
|
|
173041
175484
|
function generate(input, settings) {
|
|
173042
175485
|
const patterns = processPatterns(input, settings);
|
|
173043
175486
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -173346,7 +175789,7 @@ var init_prettier = __esm(() => {
|
|
|
173346
175789
|
exports.createDirentFromStats = createDirentFromStats;
|
|
173347
175790
|
}
|
|
173348
175791
|
});
|
|
173349
|
-
|
|
175792
|
+
require_utils42 = __commonJS2({
|
|
173350
175793
|
"node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
173351
175794
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173352
175795
|
exports.fs = undefined;
|
|
@@ -173374,7 +175817,7 @@ var init_prettier = __esm(() => {
|
|
|
173374
175817
|
var fsStat = require_out();
|
|
173375
175818
|
var rpl = require_run_parallel();
|
|
173376
175819
|
var constants_1 = require_constants3();
|
|
173377
|
-
var utils2 =
|
|
175820
|
+
var utils2 = require_utils42();
|
|
173378
175821
|
var common = require_common();
|
|
173379
175822
|
function read3(directory, settings, callback) {
|
|
173380
175823
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -173480,7 +175923,7 @@ var init_prettier = __esm(() => {
|
|
|
173480
175923
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
173481
175924
|
var fsStat = require_out();
|
|
173482
175925
|
var constants_1 = require_constants3();
|
|
173483
|
-
var utils2 =
|
|
175926
|
+
var utils2 = require_utils42();
|
|
173484
175927
|
var common = require_common();
|
|
173485
175928
|
function read3(directory, settings) {
|
|
173486
175929
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -174260,7 +176703,7 @@ var init_prettier = __esm(() => {
|
|
|
174260
176703
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174261
176704
|
var path15 = __require2("path");
|
|
174262
176705
|
var fsStat = require_out();
|
|
174263
|
-
var utils2 =
|
|
176706
|
+
var utils2 = require_utils32();
|
|
174264
176707
|
var Reader = class {
|
|
174265
176708
|
constructor(_settings) {
|
|
174266
176709
|
this._settings = _settings;
|
|
@@ -174384,7 +176827,7 @@ var init_prettier = __esm(() => {
|
|
|
174384
176827
|
require_matcher = __commonJS2({
|
|
174385
176828
|
"node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
174386
176829
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174387
|
-
var utils2 =
|
|
176830
|
+
var utils2 = require_utils32();
|
|
174388
176831
|
var Matcher = class {
|
|
174389
176832
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
174390
176833
|
this._patterns = _patterns;
|
|
@@ -174423,7 +176866,7 @@ var init_prettier = __esm(() => {
|
|
|
174423
176866
|
});
|
|
174424
176867
|
}
|
|
174425
176868
|
_splitSegmentsIntoSections(segments) {
|
|
174426
|
-
return utils2.array.splitWhen(segments, (
|
|
176869
|
+
return utils2.array.splitWhen(segments, (segment2) => segment2.dynamic && utils2.pattern.hasGlobStar(segment2.pattern));
|
|
174427
176870
|
}
|
|
174428
176871
|
};
|
|
174429
176872
|
exports.default = Matcher;
|
|
@@ -174444,11 +176887,11 @@ var init_prettier = __esm(() => {
|
|
|
174444
176887
|
return true;
|
|
174445
176888
|
}
|
|
174446
176889
|
const match = parts.every((part, index) => {
|
|
174447
|
-
const
|
|
174448
|
-
if (
|
|
176890
|
+
const segment2 = pattern.segments[index];
|
|
176891
|
+
if (segment2.dynamic && segment2.patternRe.test(part)) {
|
|
174449
176892
|
return true;
|
|
174450
176893
|
}
|
|
174451
|
-
if (!
|
|
176894
|
+
if (!segment2.dynamic && segment2.pattern === part) {
|
|
174452
176895
|
return true;
|
|
174453
176896
|
}
|
|
174454
176897
|
return false;
|
|
@@ -174466,7 +176909,7 @@ var init_prettier = __esm(() => {
|
|
|
174466
176909
|
require_deep = __commonJS2({
|
|
174467
176910
|
"node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
174468
176911
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174469
|
-
var utils2 =
|
|
176912
|
+
var utils2 = require_utils32();
|
|
174470
176913
|
var partial_1 = require_partial();
|
|
174471
176914
|
var DeepFilter = class {
|
|
174472
176915
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -174528,7 +176971,7 @@ var init_prettier = __esm(() => {
|
|
|
174528
176971
|
require_entry = __commonJS2({
|
|
174529
176972
|
"node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
174530
176973
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174531
|
-
var utils2 =
|
|
176974
|
+
var utils2 = require_utils32();
|
|
174532
176975
|
var EntryFilter = class {
|
|
174533
176976
|
constructor(_settings, _micromatchOptions) {
|
|
174534
176977
|
this._settings = _settings;
|
|
@@ -174613,7 +177056,7 @@ var init_prettier = __esm(() => {
|
|
|
174613
177056
|
require_error2 = __commonJS2({
|
|
174614
177057
|
"node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
174615
177058
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174616
|
-
var utils2 =
|
|
177059
|
+
var utils2 = require_utils32();
|
|
174617
177060
|
var ErrorFilter = class {
|
|
174618
177061
|
constructor(_settings) {
|
|
174619
177062
|
this._settings = _settings;
|
|
@@ -174631,7 +177074,7 @@ var init_prettier = __esm(() => {
|
|
|
174631
177074
|
require_entry2 = __commonJS2({
|
|
174632
177075
|
"node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
174633
177076
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174634
|
-
var utils2 =
|
|
177077
|
+
var utils2 = require_utils32();
|
|
174635
177078
|
var EntryTransformer = class {
|
|
174636
177079
|
constructor(_settings) {
|
|
174637
177080
|
this._settings = _settings;
|
|
@@ -174899,7 +177342,7 @@ var init_prettier = __esm(() => {
|
|
|
174899
177342
|
var stream_1 = require_stream4();
|
|
174900
177343
|
var sync_1 = require_sync6();
|
|
174901
177344
|
var settings_1 = require_settings4();
|
|
174902
|
-
var utils2 =
|
|
177345
|
+
var utils2 = require_utils32();
|
|
174903
177346
|
async function FastGlob(source2, options8) {
|
|
174904
177347
|
assertPatternsInput(source2);
|
|
174905
177348
|
const works = getWorks(source2, async_1.default, options8);
|
|
@@ -175217,7 +177660,7 @@ var init_prettier = __esm(() => {
|
|
|
175217
177660
|
};
|
|
175218
177661
|
}
|
|
175219
177662
|
});
|
|
175220
|
-
|
|
177663
|
+
require_semver2 = __commonJS2({
|
|
175221
177664
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
175222
177665
|
var debug = require_debug();
|
|
175223
177666
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
|
|
@@ -175487,7 +177930,7 @@ var init_prettier = __esm(() => {
|
|
|
175487
177930
|
});
|
|
175488
177931
|
require_compare = __commonJS2({
|
|
175489
177932
|
"node_modules/semver/functions/compare.js"(exports, module) {
|
|
175490
|
-
var SemVer =
|
|
177933
|
+
var SemVer = require_semver2();
|
|
175491
177934
|
var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
|
|
175492
177935
|
module.exports = compare;
|
|
175493
177936
|
}
|
|
@@ -177220,7 +179663,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
177220
179663
|
};
|
|
177221
179664
|
}
|
|
177222
179665
|
});
|
|
177223
|
-
|
|
179666
|
+
require_src3 = __commonJS2({
|
|
177224
179667
|
"node_modules/editorconfig/src/index.js"(exports) {
|
|
177225
179668
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
177226
179669
|
return new (P9 || (P9 = Promise))(function(resolve32, reject) {
|
|
@@ -178683,7 +181126,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
178683
181126
|
mockable_default = mockable.mocked;
|
|
178684
181127
|
import_micromatch = __toESM2(require_micromatch(), 1);
|
|
178685
181128
|
partition_default = partition2;
|
|
178686
|
-
import_editorconfig = __toESM2(
|
|
181129
|
+
import_editorconfig = __toESM2(require_src3(), 1);
|
|
178687
181130
|
iterate_directory_up_default = iterateDirectoryUp;
|
|
178688
181131
|
FileSearcher = class extends Searcher {
|
|
178689
181132
|
findInDirectory = findFile;
|
|
@@ -181279,7 +183722,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
|
|
|
181279
183722
|
// package.json
|
|
181280
183723
|
var package_default = {
|
|
181281
183724
|
name: "@eigenpal/cli",
|
|
181282
|
-
version: "0.10.
|
|
183725
|
+
version: "0.10.15",
|
|
181283
183726
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
181284
183727
|
keywords: [
|
|
181285
183728
|
"eigenpal",
|
|
@@ -182796,7 +185239,7 @@ async function pushCurrentBranch(input) {
|
|
|
182796
185239
|
function slugifyPackageSegment(value) {
|
|
182797
185240
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
182798
185241
|
}
|
|
182799
|
-
function packagePathForTemplate(
|
|
185242
|
+
function packagePathForTemplate(template2, name) {
|
|
182800
185243
|
const slug = slugifyPackageSegment(name);
|
|
182801
185244
|
if (!slug)
|
|
182802
185245
|
throw new Error("Package name must include at least one letter or number.");
|
|
@@ -182808,7 +185251,7 @@ function packagePathForTemplate(template, name) {
|
|
|
182808
185251
|
knowledge: "resources/knowledge",
|
|
182809
185252
|
evaluator: "evaluators"
|
|
182810
185253
|
};
|
|
182811
|
-
const root = rootByTemplate[
|
|
185254
|
+
const root = rootByTemplate[template2];
|
|
182812
185255
|
if (!root)
|
|
182813
185256
|
throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
|
|
182814
185257
|
return SourcePackagePathSchema.parse(`${root}/${slug}`);
|
|
@@ -183217,12 +185660,12 @@ function archivePackage(input) {
|
|
|
183217
185660
|
runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
|
|
183218
185661
|
cwd: input.gitRoot
|
|
183219
185662
|
});
|
|
183220
|
-
const
|
|
185663
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
183221
185664
|
cwd: input.outDir,
|
|
183222
185665
|
encoding: "utf8"
|
|
183223
185666
|
});
|
|
183224
|
-
if (
|
|
183225
|
-
throw new Error(
|
|
185667
|
+
if (extract2.status !== 0)
|
|
185668
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
183226
185669
|
} finally {
|
|
183227
185670
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
183228
185671
|
}
|
|
@@ -183251,12 +185694,12 @@ async function tryHostedArchive(input) {
|
|
|
183251
185694
|
const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
|
|
183252
185695
|
try {
|
|
183253
185696
|
writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
|
|
183254
|
-
const
|
|
185697
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
183255
185698
|
cwd: input.outDir,
|
|
183256
185699
|
encoding: "utf8"
|
|
183257
185700
|
});
|
|
183258
|
-
if (
|
|
183259
|
-
throw new Error(
|
|
185701
|
+
if (extract2.status !== 0)
|
|
185702
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
183260
185703
|
return true;
|
|
183261
185704
|
} finally {
|
|
183262
185705
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
@@ -187611,18 +190054,18 @@ async function init(name, opts) {
|
|
|
187611
190054
|
if (existsSync11(target) && readdirSync2(target).length > 0) {
|
|
187612
190055
|
throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
|
|
187613
190056
|
}
|
|
187614
|
-
let
|
|
190057
|
+
let template2;
|
|
187615
190058
|
if (opts.template) {
|
|
187616
190059
|
if (!isTemplateName(opts.template)) {
|
|
187617
190060
|
throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
|
|
187618
190061
|
}
|
|
187619
|
-
|
|
190062
|
+
template2 = opts.template;
|
|
187620
190063
|
} else if (opts.yes || !process.stdin.isTTY) {
|
|
187621
|
-
|
|
190064
|
+
template2 = "blank";
|
|
187622
190065
|
} else {
|
|
187623
|
-
|
|
190066
|
+
template2 = await promptForTemplate();
|
|
187624
190067
|
}
|
|
187625
|
-
const sourceRoot = join2(resolveTemplatesRoot(),
|
|
190068
|
+
const sourceRoot = join2(resolveTemplatesRoot(), template2);
|
|
187626
190069
|
if (!existsSync11(sourceRoot)) {
|
|
187627
190070
|
throw new Error(`Template directory missing on disk: ${sourceRoot}`);
|
|
187628
190071
|
}
|