@eigenpal/cli 0.10.16 → 0.10.18
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 +312 -2747
- package/dist/skill/reference/step-types.md +2 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17080,139 +17080,8 @@ 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
|
-
|
|
17210
17083
|
// ../types/src/core/index.ts
|
|
17211
|
-
var init_core3 =
|
|
17212
|
-
init_common();
|
|
17213
|
-
init_ids();
|
|
17214
|
-
init_pagination();
|
|
17215
|
-
});
|
|
17084
|
+
var init_core3 = () => {};
|
|
17216
17085
|
|
|
17217
17086
|
// ../types/src/files/legacy-boundary.ts
|
|
17218
17087
|
var LEGACY_FILE_REF_COMPATIBILITY;
|
|
@@ -17237,9 +17106,6 @@ var init_legacy_boundary = __esm(() => {
|
|
|
17237
17106
|
function isRuntimeFileRef(input) {
|
|
17238
17107
|
return RuntimeFileRefSchema.safeParse(input).success;
|
|
17239
17108
|
}
|
|
17240
|
-
function isFilePathDescriptor(input) {
|
|
17241
|
-
return FilePathDescriptorSchema.safeParse(input).success;
|
|
17242
|
-
}
|
|
17243
17109
|
function isResolvedProcessorFile(input) {
|
|
17244
17110
|
return ResolvedProcessorFileSchema.safeParse(input).success;
|
|
17245
17111
|
}
|
|
@@ -17462,2407 +17328,11 @@ var init_scoped_file_ref = __esm(() => {
|
|
|
17462
17328
|
]);
|
|
17463
17329
|
});
|
|
17464
17330
|
|
|
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
|
-
|
|
19855
17331
|
// ../types/src/processor/index.ts
|
|
19856
|
-
var
|
|
19857
|
-
init_processor();
|
|
19858
|
-
init_execution();
|
|
19859
|
-
init_configs();
|
|
19860
|
-
});
|
|
17332
|
+
var init_processor = () => {};
|
|
19861
17333
|
|
|
19862
17334
|
// ../types/src/parser/index.ts
|
|
19863
|
-
var
|
|
19864
|
-
init_parser();
|
|
19865
|
-
});
|
|
17335
|
+
var init_parser = () => {};
|
|
19866
17336
|
|
|
19867
17337
|
// ../types/src/otel/semantic-conventions.ts
|
|
19868
17338
|
function mapLLMAttributes(attrs) {
|
|
@@ -22900,9 +20370,9 @@ var require_validate = __commonJS((exports) => {
|
|
|
22900
20370
|
}
|
|
22901
20371
|
let expr = data;
|
|
22902
20372
|
const segments = jsonPointer.split("/");
|
|
22903
|
-
for (const
|
|
22904
|
-
if (
|
|
22905
|
-
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(
|
|
20373
|
+
for (const segment of segments) {
|
|
20374
|
+
if (segment) {
|
|
20375
|
+
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
|
|
22906
20376
|
expr = (0, codegen_1._)`${expr} && ${data}`;
|
|
22907
20377
|
}
|
|
22908
20378
|
}
|
|
@@ -23182,7 +20652,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
23182
20652
|
});
|
|
23183
20653
|
|
|
23184
20654
|
// ../../node_modules/fast-uri/lib/utils.js
|
|
23185
|
-
var
|
|
20655
|
+
var require_utils = __commonJS((exports, module) => {
|
|
23186
20656
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
23187
20657
|
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);
|
|
23188
20658
|
function stringArrayToHexStripped(input) {
|
|
@@ -23438,7 +20908,7 @@ var require_utils3 = __commonJS((exports, module) => {
|
|
|
23438
20908
|
|
|
23439
20909
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
23440
20910
|
var require_schemes = __commonJS((exports, module) => {
|
|
23441
|
-
var { isUUID } =
|
|
20911
|
+
var { isUUID } = require_utils();
|
|
23442
20912
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
23443
20913
|
var supportedSchemeNames = [
|
|
23444
20914
|
"http",
|
|
@@ -23612,7 +21082,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
23612
21082
|
|
|
23613
21083
|
// ../../node_modules/fast-uri/index.js
|
|
23614
21084
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
23615
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } =
|
|
21085
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
|
|
23616
21086
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
23617
21087
|
function normalize(uri, options) {
|
|
23618
21088
|
if (typeof uri === "string") {
|
|
@@ -26022,7 +23492,7 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
26022
23492
|
});
|
|
26023
23493
|
|
|
26024
23494
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
26025
|
-
var
|
|
23495
|
+
var require_types = __commonJS((exports) => {
|
|
26026
23496
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26027
23497
|
exports.DiscrError = undefined;
|
|
26028
23498
|
var DiscrError;
|
|
@@ -26036,7 +23506,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
26036
23506
|
var require_discriminator = __commonJS((exports) => {
|
|
26037
23507
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26038
23508
|
var codegen_1 = require_codegen();
|
|
26039
|
-
var types_1 =
|
|
23509
|
+
var types_1 = require_types();
|
|
26040
23510
|
var compile_1 = require_compile();
|
|
26041
23511
|
var ref_error_1 = require_ref_error();
|
|
26042
23512
|
var util_1 = require_util();
|
|
@@ -26964,6 +24434,24 @@ var init_validation = __esm(() => {
|
|
|
26964
24434
|
init_workspace_schema();
|
|
26965
24435
|
});
|
|
26966
24436
|
|
|
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
|
+
|
|
26967
24455
|
// ../../node_modules/@babel/parser/lib/index.js
|
|
26968
24456
|
var require_lib = __commonJS((exports) => {
|
|
26969
24457
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -27377,12 +24865,12 @@ var require_lib = __commonJS((exports) => {
|
|
|
27377
24865
|
}
|
|
27378
24866
|
const ParseErrorConstructors = {};
|
|
27379
24867
|
for (const reasonCode of Object.keys(argument)) {
|
|
27380
|
-
const
|
|
27381
|
-
const _ref = typeof
|
|
27382
|
-
message: () =>
|
|
27383
|
-
} : typeof
|
|
27384
|
-
message:
|
|
27385
|
-
} :
|
|
24868
|
+
const template = argument[reasonCode];
|
|
24869
|
+
const _ref = typeof template === "string" ? {
|
|
24870
|
+
message: () => template
|
|
24871
|
+
} : typeof template === "function" ? {
|
|
24872
|
+
message: template
|
|
24873
|
+
} : template, {
|
|
27386
24874
|
message
|
|
27387
24875
|
} = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
27388
24876
|
const toMessage = typeof message === "string" ? () => message : message;
|
|
@@ -41855,7 +39343,7 @@ var require_keywords = __commonJS((exports) => {
|
|
|
41855
39343
|
});
|
|
41856
39344
|
|
|
41857
39345
|
// ../../node_modules/sucrase/dist/parser/tokenizer/types.js
|
|
41858
|
-
var
|
|
39346
|
+
var require_types2 = __commonJS((exports) => {
|
|
41859
39347
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41860
39348
|
var TokenType;
|
|
41861
39349
|
(function(TokenType2) {
|
|
@@ -41919,8 +39407,8 @@ var require_types3 = __commonJS((exports) => {
|
|
|
41919
39407
|
TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
|
|
41920
39408
|
const arrow = 22528;
|
|
41921
39409
|
TokenType2[TokenType2["arrow"] = arrow] = "arrow";
|
|
41922
|
-
const
|
|
41923
|
-
TokenType2[TokenType2["template"] =
|
|
39410
|
+
const template = 23552;
|
|
39411
|
+
TokenType2[TokenType2["template"] = template] = "template";
|
|
41924
39412
|
const ellipsis = 24576;
|
|
41925
39413
|
TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
|
|
41926
39414
|
const backQuote = 25600;
|
|
@@ -42339,7 +39827,7 @@ var require_types3 = __commonJS((exports) => {
|
|
|
42339
39827
|
var require_state = __commonJS((exports) => {
|
|
42340
39828
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42341
39829
|
var _keywords = require_keywords();
|
|
42342
|
-
var _types =
|
|
39830
|
+
var _types = require_types2();
|
|
42343
39831
|
|
|
42344
39832
|
class Scope {
|
|
42345
39833
|
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
|
|
@@ -42725,7 +40213,7 @@ var require_base = __commonJS((exports) => {
|
|
|
42725
40213
|
var require_util2 = __commonJS((exports) => {
|
|
42726
40214
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42727
40215
|
var _index = require_tokenizer();
|
|
42728
|
-
var _types =
|
|
40216
|
+
var _types = require_types2();
|
|
42729
40217
|
var _charcodes = require_charcodes();
|
|
42730
40218
|
var _base = require_base();
|
|
42731
40219
|
function isContextual(contextualKeyword) {
|
|
@@ -42887,7 +40375,7 @@ var require_identifier = __commonJS((exports) => {
|
|
|
42887
40375
|
var require_readWordTree = __commonJS((exports) => {
|
|
42888
40376
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42889
40377
|
var _keywords = require_keywords();
|
|
42890
|
-
var _types =
|
|
40378
|
+
var _types = require_types2();
|
|
42891
40379
|
var READ_WORD_TREE = new Int32Array([
|
|
42892
40380
|
-1,
|
|
42893
40381
|
27,
|
|
@@ -51865,7 +49353,7 @@ var require_readWord = __commonJS((exports) => {
|
|
|
51865
49353
|
var _identifier = require_identifier();
|
|
51866
49354
|
var _index = require_tokenizer();
|
|
51867
49355
|
var _readWordTree = require_readWordTree();
|
|
51868
|
-
var _types =
|
|
49356
|
+
var _types = require_types2();
|
|
51869
49357
|
function readWord() {
|
|
51870
49358
|
let treePos = 0;
|
|
51871
49359
|
let code = 0;
|
|
@@ -51931,7 +49419,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
51931
49419
|
var _keywords = require_keywords();
|
|
51932
49420
|
var _readWord = require_readWord();
|
|
51933
49421
|
var _readWord2 = _interopRequireDefault(_readWord);
|
|
51934
|
-
var _types =
|
|
49422
|
+
var _types = require_types2();
|
|
51935
49423
|
var IdentifierRole;
|
|
51936
49424
|
(function(IdentifierRole2) {
|
|
51937
49425
|
const Access = 0;
|
|
@@ -52648,7 +50136,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
52648
50136
|
// ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
|
|
52649
50137
|
var require_getImportExportSpecifierInfo = __commonJS((exports) => {
|
|
52650
50138
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52651
|
-
var _types =
|
|
50139
|
+
var _types = require_types2();
|
|
52652
50140
|
function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
|
|
52653
50141
|
let endIndex = index + 1;
|
|
52654
50142
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
@@ -53001,7 +50489,7 @@ var require_JSXTransformer = __commonJS((exports) => {
|
|
|
53001
50489
|
var _xhtml = require_xhtml();
|
|
53002
50490
|
var _xhtml2 = _interopRequireDefault(_xhtml);
|
|
53003
50491
|
var _tokenizer = require_tokenizer();
|
|
53004
|
-
var _types =
|
|
50492
|
+
var _types = require_types2();
|
|
53005
50493
|
var _charcodes = require_charcodes();
|
|
53006
50494
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
53007
50495
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -53505,7 +50993,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
|
|
|
53505
50993
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
53506
50994
|
}
|
|
53507
50995
|
var _tokenizer = require_tokenizer();
|
|
53508
|
-
var _types =
|
|
50996
|
+
var _types = require_types2();
|
|
53509
50997
|
var _JSXTransformer = require_JSXTransformer();
|
|
53510
50998
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
53511
50999
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -53544,7 +51032,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
|
|
|
53544
51032
|
}
|
|
53545
51033
|
var _tokenizer = require_tokenizer();
|
|
53546
51034
|
var _keywords = require_keywords();
|
|
53547
|
-
var _types =
|
|
51035
|
+
var _types = require_types2();
|
|
53548
51036
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
53549
51037
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
53550
51038
|
var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
|
|
@@ -54315,18 +51803,18 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
|
|
|
54315
51803
|
continue;
|
|
54316
51804
|
let genColumn = 0;
|
|
54317
51805
|
for (let j = 0;j < line.length; j++) {
|
|
54318
|
-
const
|
|
51806
|
+
const segment = line[j];
|
|
54319
51807
|
if (j > 0)
|
|
54320
51808
|
writer.write(comma);
|
|
54321
|
-
genColumn = encodeInteger(writer,
|
|
54322
|
-
if (
|
|
51809
|
+
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
51810
|
+
if (segment.length === 1)
|
|
54323
51811
|
continue;
|
|
54324
|
-
sourcesIndex = encodeInteger(writer,
|
|
54325
|
-
sourceLine = encodeInteger(writer,
|
|
54326
|
-
sourceColumn = encodeInteger(writer,
|
|
54327
|
-
if (
|
|
51812
|
+
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
51813
|
+
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
51814
|
+
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
51815
|
+
if (segment.length === 4)
|
|
54328
51816
|
continue;
|
|
54329
|
-
namesIndex = encodeInteger(writer,
|
|
51817
|
+
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
54330
51818
|
}
|
|
54331
51819
|
}
|
|
54332
51820
|
return writer.flush();
|
|
@@ -54881,11 +52369,11 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
54881
52369
|
const index = traceSegmentInternal(segments, cast(map2)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
|
|
54882
52370
|
if (index === -1)
|
|
54883
52371
|
return OMapping(null, null, null, null);
|
|
54884
|
-
const
|
|
54885
|
-
if (
|
|
52372
|
+
const segment = segments[index];
|
|
52373
|
+
if (segment.length === 1)
|
|
54886
52374
|
return OMapping(null, null, null, null);
|
|
54887
52375
|
const { names, resolvedSources } = map2;
|
|
54888
|
-
return OMapping(resolvedSources[
|
|
52376
|
+
return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
|
|
54889
52377
|
}
|
|
54890
52378
|
function generatedPositionFor(map2, needle) {
|
|
54891
52379
|
const { source, line, column, bias } = needle;
|
|
@@ -54998,8 +52486,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
54998
52486
|
const max = upperBound(segments, matchedColumn, min);
|
|
54999
52487
|
const result = [];
|
|
55000
52488
|
for (;min <= max; min++) {
|
|
55001
|
-
const
|
|
55002
|
-
result.push(GMapping(
|
|
52489
|
+
const segment = segments[min];
|
|
52490
|
+
result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
|
|
55003
52491
|
}
|
|
55004
52492
|
return result;
|
|
55005
52493
|
}
|
|
@@ -55027,8 +52515,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
55027
52515
|
const index = traceSegmentInternal(segments, memo, line, column, bias);
|
|
55028
52516
|
if (index === -1)
|
|
55029
52517
|
return GMapping(null, null);
|
|
55030
|
-
const
|
|
55031
|
-
return GMapping(
|
|
52518
|
+
const segment = segments[index];
|
|
52519
|
+
return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
|
|
55032
52520
|
}
|
|
55033
52521
|
});
|
|
55034
52522
|
});
|
|
@@ -55579,7 +53067,7 @@ var require_HelperManager = __commonJS((exports) => {
|
|
|
55579
53067
|
var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
55580
53068
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55581
53069
|
var _tokenizer = require_tokenizer();
|
|
55582
|
-
var _types =
|
|
53070
|
+
var _types = require_types2();
|
|
55583
53071
|
function identifyShadowedGlobals(tokens, scopes, globalNames) {
|
|
55584
53072
|
if (!hasShadowedGlobals(tokens, globalNames)) {
|
|
55585
53073
|
return;
|
|
@@ -55644,7 +53132,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
|
55644
53132
|
// ../../node_modules/sucrase/dist/util/getIdentifierNames.js
|
|
55645
53133
|
var require_getIdentifierNames = __commonJS((exports) => {
|
|
55646
53134
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55647
|
-
var _types =
|
|
53135
|
+
var _types = require_types2();
|
|
55648
53136
|
function getIdentifierNames(code, tokens) {
|
|
55649
53137
|
const names = [];
|
|
55650
53138
|
for (const token of tokens) {
|
|
@@ -55820,7 +53308,7 @@ var require_util3 = __commonJS((exports) => {
|
|
|
55820
53308
|
});
|
|
55821
53309
|
|
|
55822
53310
|
// ../../node_modules/ts-interface-checker/dist/types.js
|
|
55823
|
-
var
|
|
53311
|
+
var require_types3 = __commonJS((exports) => {
|
|
55824
53312
|
var __extends = exports && exports.__extends || function() {
|
|
55825
53313
|
var extendStatics = function(d, b) {
|
|
55826
53314
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -56420,9 +53908,9 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
56420
53908
|
};
|
|
56421
53909
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56422
53910
|
exports.Checker = exports.createCheckers = undefined;
|
|
56423
|
-
var types_1 =
|
|
53911
|
+
var types_1 = require_types3();
|
|
56424
53912
|
var util_1 = require_util3();
|
|
56425
|
-
var types_2 =
|
|
53913
|
+
var types_2 = require_types3();
|
|
56426
53914
|
Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
|
|
56427
53915
|
return types_2.TArray;
|
|
56428
53916
|
} });
|
|
@@ -56704,7 +54192,7 @@ var require_lval = __commonJS((exports) => {
|
|
|
56704
54192
|
var _typescript = require_typescript();
|
|
56705
54193
|
var _index = require_tokenizer();
|
|
56706
54194
|
var _keywords = require_keywords();
|
|
56707
|
-
var _types =
|
|
54195
|
+
var _types = require_types2();
|
|
56708
54196
|
var _base = require_base();
|
|
56709
54197
|
var _expression = require_expression();
|
|
56710
54198
|
var _util = require_util2();
|
|
@@ -56836,7 +54324,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
56836
54324
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56837
54325
|
var _index = require_tokenizer();
|
|
56838
54326
|
var _keywords = require_keywords();
|
|
56839
|
-
var _types =
|
|
54327
|
+
var _types = require_types2();
|
|
56840
54328
|
var _base = require_base();
|
|
56841
54329
|
var _expression = require_expression();
|
|
56842
54330
|
var _lval = require_lval();
|
|
@@ -58098,7 +55586,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
58098
55586
|
var require_jsx = __commonJS((exports) => {
|
|
58099
55587
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58100
55588
|
var _index = require_tokenizer();
|
|
58101
|
-
var _types =
|
|
55589
|
+
var _types = require_types2();
|
|
58102
55590
|
var _base = require_base();
|
|
58103
55591
|
var _expression = require_expression();
|
|
58104
55592
|
var _util = require_util2();
|
|
@@ -58361,10 +55849,10 @@ var require_jsx = __commonJS((exports) => {
|
|
|
58361
55849
|
});
|
|
58362
55850
|
|
|
58363
55851
|
// ../../node_modules/sucrase/dist/parser/plugins/types.js
|
|
58364
|
-
var
|
|
55852
|
+
var require_types4 = __commonJS((exports) => {
|
|
58365
55853
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58366
55854
|
var _index = require_tokenizer();
|
|
58367
|
-
var _types =
|
|
55855
|
+
var _types = require_types2();
|
|
58368
55856
|
var _base = require_base();
|
|
58369
55857
|
var _expression = require_expression();
|
|
58370
55858
|
var _flow = require_flow();
|
|
@@ -58397,12 +55885,12 @@ var require_expression = __commonJS((exports) => {
|
|
|
58397
55885
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58398
55886
|
var _flow = require_flow();
|
|
58399
55887
|
var _index = require_jsx();
|
|
58400
|
-
var _types =
|
|
55888
|
+
var _types = require_types4();
|
|
58401
55889
|
var _typescript = require_typescript();
|
|
58402
55890
|
var _index3 = require_tokenizer();
|
|
58403
55891
|
var _keywords = require_keywords();
|
|
58404
55892
|
var _state = require_state();
|
|
58405
|
-
var _types3 =
|
|
55893
|
+
var _types3 = require_types2();
|
|
58406
55894
|
var _charcodes = require_charcodes();
|
|
58407
55895
|
var _identifier = require_identifier();
|
|
58408
55896
|
var _base = require_base();
|
|
@@ -59118,7 +56606,7 @@ var require_flow = __commonJS((exports) => {
|
|
|
59118
56606
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59119
56607
|
var _index = require_tokenizer();
|
|
59120
56608
|
var _keywords = require_keywords();
|
|
59121
|
-
var _types =
|
|
56609
|
+
var _types = require_types2();
|
|
59122
56610
|
var _base = require_base();
|
|
59123
56611
|
var _expression = require_expression();
|
|
59124
56612
|
var _statement = require_statement();
|
|
@@ -59993,7 +57481,7 @@ var require_statement = __commonJS((exports) => {
|
|
|
59993
57481
|
var _tokenizer = require_tokenizer();
|
|
59994
57482
|
var _keywords = require_keywords();
|
|
59995
57483
|
var _state = require_state();
|
|
59996
|
-
var _types =
|
|
57484
|
+
var _types = require_types2();
|
|
59997
57485
|
var _charcodes = require_charcodes();
|
|
59998
57486
|
var _base = require_base();
|
|
59999
57487
|
var _expression = require_expression();
|
|
@@ -61028,7 +58516,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
61028
58516
|
function _interopRequireDefault(obj) {
|
|
61029
58517
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
61030
58518
|
}
|
|
61031
|
-
var _types =
|
|
58519
|
+
var _types = require_types2();
|
|
61032
58520
|
var _isAsyncOperation = require_isAsyncOperation();
|
|
61033
58521
|
var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
|
|
61034
58522
|
|
|
@@ -61286,7 +58774,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
61286
58774
|
var require_getClassInfo = __commonJS((exports) => {
|
|
61287
58775
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61288
58776
|
var _keywords = require_keywords();
|
|
61289
|
-
var _types =
|
|
58777
|
+
var _types = require_types2();
|
|
61290
58778
|
function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
|
|
61291
58779
|
const snapshot = tokens.snapshot();
|
|
61292
58780
|
const headerInfo = processClassHeader(tokens);
|
|
@@ -61524,7 +59012,7 @@ var require_getClassInfo = __commonJS((exports) => {
|
|
|
61524
59012
|
// ../../node_modules/sucrase/dist/util/elideImportEquals.js
|
|
61525
59013
|
var require_elideImportEquals = __commonJS((exports) => {
|
|
61526
59014
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61527
|
-
var _types =
|
|
59015
|
+
var _types = require_types2();
|
|
61528
59016
|
function elideImportEquals(tokens) {
|
|
61529
59017
|
tokens.removeInitialToken();
|
|
61530
59018
|
tokens.removeToken();
|
|
@@ -61548,7 +59036,7 @@ var require_elideImportEquals = __commonJS((exports) => {
|
|
|
61548
59036
|
var require_getDeclarationInfo = __commonJS((exports) => {
|
|
61549
59037
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61550
59038
|
var _tokenizer = require_tokenizer();
|
|
61551
|
-
var _types =
|
|
59039
|
+
var _types = require_types2();
|
|
61552
59040
|
var EMPTY_DECLARATION_INFO = {
|
|
61553
59041
|
typeDeclarations: new Set,
|
|
61554
59042
|
valueDeclarations: new Set
|
|
@@ -61576,7 +59064,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
|
|
|
61576
59064
|
var require_isExportFrom = __commonJS((exports) => {
|
|
61577
59065
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61578
59066
|
var _keywords = require_keywords();
|
|
61579
|
-
var _types =
|
|
59067
|
+
var _types = require_types2();
|
|
61580
59068
|
function isExportFrom(tokens) {
|
|
61581
59069
|
let closeBraceIndex = tokens.currentIndex();
|
|
61582
59070
|
while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
|
@@ -61591,7 +59079,7 @@ var require_isExportFrom = __commonJS((exports) => {
|
|
|
61591
59079
|
var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
61592
59080
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61593
59081
|
var _keywords = require_keywords();
|
|
61594
|
-
var _types =
|
|
59082
|
+
var _types = require_types2();
|
|
61595
59083
|
function removeMaybeImportAttributes(tokens) {
|
|
61596
59084
|
if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
|
|
61597
59085
|
tokens.removeToken();
|
|
@@ -61606,7 +59094,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
|
61606
59094
|
// ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
|
|
61607
59095
|
var require_shouldElideDefaultExport = __commonJS((exports) => {
|
|
61608
59096
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61609
|
-
var _types =
|
|
59097
|
+
var _types = require_types2();
|
|
61610
59098
|
function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
|
|
61611
59099
|
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
|
|
61612
59100
|
return false;
|
|
@@ -61637,7 +59125,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
|
|
|
61637
59125
|
}
|
|
61638
59126
|
var _tokenizer = require_tokenizer();
|
|
61639
59127
|
var _keywords = require_keywords();
|
|
61640
|
-
var _types =
|
|
59128
|
+
var _types = require_types2();
|
|
61641
59129
|
var _elideImportEquals = require_elideImportEquals();
|
|
61642
59130
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
61643
59131
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -62279,7 +59767,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
|
|
|
62279
59767
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62280
59768
|
}
|
|
62281
59769
|
var _keywords = require_keywords();
|
|
62282
|
-
var _types =
|
|
59770
|
+
var _types = require_types2();
|
|
62283
59771
|
var _elideImportEquals = require_elideImportEquals();
|
|
62284
59772
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
62285
59773
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -62549,7 +60037,7 @@ var require_FlowTransformer = __commonJS((exports) => {
|
|
|
62549
60037
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62550
60038
|
}
|
|
62551
60039
|
var _keywords = require_keywords();
|
|
62552
|
-
var _types =
|
|
60040
|
+
var _types = require_types2();
|
|
62553
60041
|
var _Transformer = require_Transformer();
|
|
62554
60042
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62555
60043
|
|
|
@@ -62669,7 +60157,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
|
|
|
62669
60157
|
}
|
|
62670
60158
|
return value;
|
|
62671
60159
|
}
|
|
62672
|
-
var _types =
|
|
60160
|
+
var _types = require_types2();
|
|
62673
60161
|
var _Transformer = require_Transformer();
|
|
62674
60162
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62675
60163
|
var JEST_GLOBAL_NAME = "jest";
|
|
@@ -62743,7 +60231,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
|
|
|
62743
60231
|
function _interopRequireDefault(obj) {
|
|
62744
60232
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62745
60233
|
}
|
|
62746
|
-
var _types =
|
|
60234
|
+
var _types = require_types2();
|
|
62747
60235
|
var _Transformer = require_Transformer();
|
|
62748
60236
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62749
60237
|
|
|
@@ -62772,7 +60260,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
|
|
|
62772
60260
|
function _interopRequireDefault(obj) {
|
|
62773
60261
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62774
60262
|
}
|
|
62775
|
-
var _types =
|
|
60263
|
+
var _types = require_types2();
|
|
62776
60264
|
var _Transformer = require_Transformer();
|
|
62777
60265
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62778
60266
|
|
|
@@ -62800,7 +60288,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
|
|
|
62800
60288
|
function _interopRequireDefault(obj) {
|
|
62801
60289
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62802
60290
|
}
|
|
62803
|
-
var _types =
|
|
60291
|
+
var _types = require_types2();
|
|
62804
60292
|
var _Transformer = require_Transformer();
|
|
62805
60293
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62806
60294
|
|
|
@@ -62916,7 +60404,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
|
|
|
62916
60404
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62917
60405
|
}
|
|
62918
60406
|
var _tokenizer = require_tokenizer();
|
|
62919
|
-
var _types =
|
|
60407
|
+
var _types = require_types2();
|
|
62920
60408
|
var _Transformer = require_Transformer();
|
|
62921
60409
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62922
60410
|
|
|
@@ -63167,7 +60655,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
|
|
|
63167
60655
|
function _interopRequireDefault(obj) {
|
|
63168
60656
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63169
60657
|
}
|
|
63170
|
-
var _types =
|
|
60658
|
+
var _types = require_types2();
|
|
63171
60659
|
var _isIdentifier = require_isIdentifier();
|
|
63172
60660
|
var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
|
|
63173
60661
|
var _Transformer = require_Transformer();
|
|
@@ -63313,7 +60801,7 @@ var require_RootTransformer = __commonJS((exports) => {
|
|
|
63313
60801
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63314
60802
|
}
|
|
63315
60803
|
var _keywords = require_keywords();
|
|
63316
|
-
var _types =
|
|
60804
|
+
var _types = require_types2();
|
|
63317
60805
|
var _getClassInfo = require_getClassInfo();
|
|
63318
60806
|
var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
|
|
63319
60807
|
var _CJSImportTransformer = require_CJSImportTransformer();
|
|
@@ -63712,7 +61200,7 @@ var require_formatTokens = __commonJS((exports) => {
|
|
|
63712
61200
|
}
|
|
63713
61201
|
var _linesandcolumns = require_build();
|
|
63714
61202
|
var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
|
|
63715
|
-
var _types =
|
|
61203
|
+
var _types = require_types2();
|
|
63716
61204
|
function formatTokens(code, tokens) {
|
|
63717
61205
|
if (tokens.length === 0) {
|
|
63718
61206
|
return "";
|
|
@@ -63777,7 +61265,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
|
|
|
63777
61265
|
function _interopRequireDefault(obj) {
|
|
63778
61266
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63779
61267
|
}
|
|
63780
|
-
var _types =
|
|
61268
|
+
var _types = require_types2();
|
|
63781
61269
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
63782
61270
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
63783
61271
|
function getTSImportedNames(tokens) {
|
|
@@ -64162,7 +61650,7 @@ function describeUnsupportedType(nodeType) {
|
|
|
64162
61650
|
function compileTypedScript(opts) {
|
|
64163
61651
|
let ast;
|
|
64164
61652
|
try {
|
|
64165
|
-
ast =
|
|
61653
|
+
ast = import_parser2.parse(opts.source, {
|
|
64166
61654
|
sourceType: "script",
|
|
64167
61655
|
plugins: ["typescript"],
|
|
64168
61656
|
ranges: true
|
|
@@ -64414,9 +61902,9 @@ function stripCommentsAndStrings(s) {
|
|
|
64414
61902
|
out = out.replace(/`(\\.|[^`\\])*`/g, "``");
|
|
64415
61903
|
return out;
|
|
64416
61904
|
}
|
|
64417
|
-
var
|
|
61905
|
+
var import_parser2, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
|
|
64418
61906
|
var init_compile = __esm(() => {
|
|
64419
|
-
|
|
61907
|
+
import_parser2 = __toESM(require_lib(), 1);
|
|
64420
61908
|
import_sucrase = __toESM(require_dist3(), 1);
|
|
64421
61909
|
EVALUATOR_PARAM_NAMES = ["expected", "actual"];
|
|
64422
61910
|
});
|
|
@@ -64651,8 +62139,8 @@ function getAllStepJsonSchemas() {
|
|
|
64651
62139
|
category: def.category,
|
|
64652
62140
|
name: def.name,
|
|
64653
62141
|
description: def.description,
|
|
64654
|
-
configSchema:
|
|
64655
|
-
outputSchema:
|
|
62142
|
+
configSchema: toJsonSchema2(def.configSchema),
|
|
62143
|
+
outputSchema: toJsonSchema2(def.outputSchema),
|
|
64656
62144
|
configInWith: def.configInWith
|
|
64657
62145
|
}));
|
|
64658
62146
|
}
|
|
@@ -64714,6 +62202,8 @@ var init_step_configs = __esm(() => {
|
|
|
64714
62202
|
llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
|
|
64715
62203
|
maxConcurrency: exports_external.number().min(1).max(10).default(3).optional().describe("Max concurrent VLM batch requests"),
|
|
64716
62204
|
pagesPerBatch: exports_external.number().min(1).max(20).default(5).optional().describe("Number of page images per VLM request"),
|
|
62205
|
+
pdfRenderScale: exports_external.number().min(1).max(4).default(1).optional().describe("Scale factor for rendering PDF pages before VLM parsing. Higher values produce sharper images at larger payload sizes."),
|
|
62206
|
+
imageQuality: exports_external.number().int().min(1).max(100).default(85).optional().describe("JPEG quality for rendered PDF page images sent to VLM parsing. Higher values reduce compression artifacts at larger payload sizes."),
|
|
64717
62207
|
prompt: exports_external.string().optional().describe("Custom extraction prompt"),
|
|
64718
62208
|
languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
|
|
64719
62209
|
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown").optional().describe("Format for extracted text. `markdown` (default) keeps structure and is best for LLM extraction; `plain` is unstyled text; `djot`/`html` preserve more layout. Only the native (Kreuzberg) parser respects this — OCR/VLM always emit markdown."),
|
|
@@ -65380,6 +62870,81 @@ var init_actions = __esm(() => {
|
|
|
65380
62870
|
ACTION_TYPES = ActionTypeSchema.options;
|
|
65381
62871
|
});
|
|
65382
62872
|
|
|
62873
|
+
// ../types/src/processor/execution.ts
|
|
62874
|
+
function asTuple(values) {
|
|
62875
|
+
return values;
|
|
62876
|
+
}
|
|
62877
|
+
var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
|
|
62878
|
+
var init_execution = __esm(() => {
|
|
62879
|
+
init_zod();
|
|
62880
|
+
WorkflowExecutionStatusValue2 = {
|
|
62881
|
+
CREATED: "created",
|
|
62882
|
+
PENDING: "pending",
|
|
62883
|
+
RUNNING: "running",
|
|
62884
|
+
WAITING: "waiting",
|
|
62885
|
+
COMPLETED: "completed",
|
|
62886
|
+
FAILED: "failed",
|
|
62887
|
+
CANCELLED: "cancelled"
|
|
62888
|
+
};
|
|
62889
|
+
WorkflowExecutionStatusSchema2 = exports_external.enum([
|
|
62890
|
+
WorkflowExecutionStatusValue2.CREATED,
|
|
62891
|
+
WorkflowExecutionStatusValue2.PENDING,
|
|
62892
|
+
WorkflowExecutionStatusValue2.RUNNING,
|
|
62893
|
+
WorkflowExecutionStatusValue2.WAITING,
|
|
62894
|
+
WorkflowExecutionStatusValue2.COMPLETED,
|
|
62895
|
+
WorkflowExecutionStatusValue2.FAILED,
|
|
62896
|
+
WorkflowExecutionStatusValue2.CANCELLED
|
|
62897
|
+
]);
|
|
62898
|
+
StepExecutionStatusValue2 = {
|
|
62899
|
+
PENDING: "pending",
|
|
62900
|
+
RUNNING: "running",
|
|
62901
|
+
SUCCESS: "success",
|
|
62902
|
+
FAILURE: "failure",
|
|
62903
|
+
WAITING: "waiting",
|
|
62904
|
+
SKIPPED: "skipped"
|
|
62905
|
+
};
|
|
62906
|
+
StepExecutionStatusSchema2 = exports_external.enum([
|
|
62907
|
+
StepExecutionStatusValue2.PENDING,
|
|
62908
|
+
StepExecutionStatusValue2.RUNNING,
|
|
62909
|
+
StepExecutionStatusValue2.SUCCESS,
|
|
62910
|
+
StepExecutionStatusValue2.FAILURE,
|
|
62911
|
+
StepExecutionStatusValue2.WAITING,
|
|
62912
|
+
StepExecutionStatusValue2.SKIPPED
|
|
62913
|
+
]);
|
|
62914
|
+
TriggerTypeValue2 = {
|
|
62915
|
+
MANUAL: "manual",
|
|
62916
|
+
API: "api",
|
|
62917
|
+
WEBHOOK: "webhook",
|
|
62918
|
+
SCHEDULE: "schedule",
|
|
62919
|
+
EMAIL: "email",
|
|
62920
|
+
EVAL: "eval",
|
|
62921
|
+
CLI: "cli"
|
|
62922
|
+
};
|
|
62923
|
+
TriggerTypeSchema2 = exports_external.enum([
|
|
62924
|
+
TriggerTypeValue2.MANUAL,
|
|
62925
|
+
TriggerTypeValue2.API,
|
|
62926
|
+
TriggerTypeValue2.WEBHOOK,
|
|
62927
|
+
TriggerTypeValue2.SCHEDULE,
|
|
62928
|
+
TriggerTypeValue2.EMAIL,
|
|
62929
|
+
TriggerTypeValue2.EVAL,
|
|
62930
|
+
TriggerTypeValue2.CLI
|
|
62931
|
+
]);
|
|
62932
|
+
ExecutionTypeValue2 = {
|
|
62933
|
+
PROD: "prod",
|
|
62934
|
+
EVAL: "eval",
|
|
62935
|
+
PLAYGROUND: "playground"
|
|
62936
|
+
};
|
|
62937
|
+
ExecutionTypeSchema2 = exports_external.enum([
|
|
62938
|
+
ExecutionTypeValue2.PROD,
|
|
62939
|
+
ExecutionTypeValue2.EVAL,
|
|
62940
|
+
ExecutionTypeValue2.PLAYGROUND
|
|
62941
|
+
]);
|
|
62942
|
+
WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
|
|
62943
|
+
STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
|
|
62944
|
+
TRIGGER_TYPES2 = TriggerTypeSchema2.options;
|
|
62945
|
+
EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
|
|
62946
|
+
});
|
|
62947
|
+
|
|
65383
62948
|
// ../types/src/workflow/workflow.ts
|
|
65384
62949
|
function suggestWorkflowName(raw) {
|
|
65385
62950
|
return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
|
|
@@ -65460,11 +63025,11 @@ var init_workflow = __esm(() => {
|
|
|
65460
63025
|
ManualTriggerMethodSchema = exports_external.object({
|
|
65461
63026
|
type: exports_external.literal("manual"),
|
|
65462
63027
|
enabled: exports_external.boolean().optional(),
|
|
65463
|
-
inputSchema:
|
|
63028
|
+
inputSchema: JsonSchemaSchema2.optional()
|
|
65464
63029
|
});
|
|
65465
63030
|
ApiTriggerMethodSchema = exports_external.object({
|
|
65466
63031
|
type: exports_external.literal("api"),
|
|
65467
|
-
inputSchema:
|
|
63032
|
+
inputSchema: JsonSchemaSchema2.optional()
|
|
65468
63033
|
});
|
|
65469
63034
|
EmailTriggerMethodSchema = exports_external.object({
|
|
65470
63035
|
type: exports_external.literal("email"),
|
|
@@ -65503,8 +63068,8 @@ var init_workflow = __esm(() => {
|
|
|
65503
63068
|
yamlContent: exports_external.string(),
|
|
65504
63069
|
definition: WorkflowDefinitionSchema,
|
|
65505
63070
|
isCurrent: exports_external.boolean().default(true),
|
|
65506
|
-
createdAt:
|
|
65507
|
-
updatedAt:
|
|
63071
|
+
createdAt: TimestampSchema2,
|
|
63072
|
+
updatedAt: TimestampSchema2.optional(),
|
|
65508
63073
|
createdBy: exports_external.string()
|
|
65509
63074
|
});
|
|
65510
63075
|
CreateWorkflowDefinitionSchema = exports_external.object({
|
|
@@ -65686,14 +63251,14 @@ function isFileOutput(value) {
|
|
|
65686
63251
|
function isWorkflowResult(value) {
|
|
65687
63252
|
return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
|
|
65688
63253
|
}
|
|
65689
|
-
var
|
|
63254
|
+
var WorkflowExecutionStatusSchema3, StepExecutionStatusSchema3, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
65690
63255
|
var init_execution2 = __esm(() => {
|
|
65691
63256
|
init_zod();
|
|
65692
63257
|
init_common();
|
|
65693
63258
|
init_execution();
|
|
65694
63259
|
init_workflow();
|
|
65695
|
-
|
|
65696
|
-
|
|
63260
|
+
WorkflowExecutionStatusSchema3 = WorkflowExecutionStatusSchema2;
|
|
63261
|
+
StepExecutionStatusSchema3 = StepExecutionStatusSchema2;
|
|
65697
63262
|
ScopeEntryTypeSchema = exports_external.enum([
|
|
65698
63263
|
"root",
|
|
65699
63264
|
"if-then",
|
|
@@ -65715,7 +63280,7 @@ var init_execution2 = __esm(() => {
|
|
|
65715
63280
|
ScopeStackSchema = exports_external.array(ScopeEntrySchema);
|
|
65716
63281
|
StepResultSchema = exports_external.object({
|
|
65717
63282
|
output: exports_external.unknown(),
|
|
65718
|
-
status:
|
|
63283
|
+
status: StepExecutionStatusSchema3
|
|
65719
63284
|
});
|
|
65720
63285
|
ExecutionContextSchema = exports_external.object({
|
|
65721
63286
|
input: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
@@ -65743,7 +63308,7 @@ var init_execution2 = __esm(() => {
|
|
|
65743
63308
|
triggerType: exports_external.string(),
|
|
65744
63309
|
triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
|
|
65745
63310
|
overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
|
|
65746
|
-
status:
|
|
63311
|
+
status: WorkflowExecutionStatusSchema3,
|
|
65747
63312
|
scopeStack: ScopeStackSchema,
|
|
65748
63313
|
currentStepIndex: exports_external.number(),
|
|
65749
63314
|
stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
|
|
@@ -65751,15 +63316,15 @@ var init_execution2 = __esm(() => {
|
|
|
65751
63316
|
error: exports_external.string().nullable(),
|
|
65752
63317
|
priority: exports_external.number().default(50),
|
|
65753
63318
|
leaseId: exports_external.string().nullable(),
|
|
65754
|
-
leaseExpiresAt:
|
|
63319
|
+
leaseExpiresAt: TimestampSchema2.nullable(),
|
|
65755
63320
|
workerId: exports_external.string().nullable(),
|
|
65756
63321
|
maxRetries: exports_external.number().default(0),
|
|
65757
63322
|
originalExecutionId: exports_external.string().nullable().optional(),
|
|
65758
63323
|
previousExecutionId: exports_external.string().nullable().optional(),
|
|
65759
63324
|
retryNumber: exports_external.number().default(0),
|
|
65760
|
-
createdAt:
|
|
65761
|
-
startedAt:
|
|
65762
|
-
completedAt:
|
|
63325
|
+
createdAt: TimestampSchema2,
|
|
63326
|
+
startedAt: TimestampSchema2.nullable(),
|
|
63327
|
+
completedAt: TimestampSchema2.nullable(),
|
|
65763
63328
|
createdBy: exports_external.string().nullable()
|
|
65764
63329
|
});
|
|
65765
63330
|
StepExecutionSchema = exports_external.object({
|
|
@@ -65776,12 +63341,12 @@ var init_execution2 = __esm(() => {
|
|
|
65776
63341
|
stepAttempt: exports_external.number().default(0),
|
|
65777
63342
|
inputData: exports_external.unknown().nullable(),
|
|
65778
63343
|
outputData: exports_external.unknown().nullable(),
|
|
65779
|
-
status:
|
|
63344
|
+
status: StepExecutionStatusSchema3,
|
|
65780
63345
|
error: exports_external.string().nullable(),
|
|
65781
63346
|
overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
|
|
65782
63347
|
durationMs: exports_external.number().nullable(),
|
|
65783
|
-
startedAt:
|
|
65784
|
-
completedAt:
|
|
63348
|
+
startedAt: TimestampSchema2.nullable(),
|
|
63349
|
+
completedAt: TimestampSchema2.nullable()
|
|
65785
63350
|
});
|
|
65786
63351
|
ConnectorSchema = exports_external.object({
|
|
65787
63352
|
id: exports_external.string(),
|
|
@@ -65792,8 +63357,8 @@ var init_execution2 = __esm(() => {
|
|
|
65792
63357
|
config: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
65793
63358
|
inputSchema: exports_external.unknown().optional(),
|
|
65794
63359
|
outputSchema: exports_external.unknown().optional(),
|
|
65795
|
-
createdAt:
|
|
65796
|
-
updatedAt:
|
|
63360
|
+
createdAt: TimestampSchema2,
|
|
63361
|
+
updatedAt: TimestampSchema2.optional(),
|
|
65797
63362
|
createdBy: exports_external.string()
|
|
65798
63363
|
});
|
|
65799
63364
|
WorkflowFileOutputSchema = exports_external.object({
|
|
@@ -66716,8 +64281,8 @@ function parseRunTarget(target) {
|
|
|
66716
64281
|
if (root !== "agents") {
|
|
66717
64282
|
throw new Error(`Agent target must be rooted at "agents.", got "${idOrSlug2}"`);
|
|
66718
64283
|
}
|
|
66719
|
-
for (const
|
|
66720
|
-
RunTargetSegmentSchema.parse(
|
|
64284
|
+
for (const segment of segments) {
|
|
64285
|
+
RunTargetSegmentSchema.parse(segment);
|
|
66721
64286
|
}
|
|
66722
64287
|
const packagePath = packageName.split(".").join("/");
|
|
66723
64288
|
const [, ...slugParts] = packagePath.split("/");
|
|
@@ -66830,9 +64395,9 @@ var init_grammar = __esm(() => {
|
|
|
66830
64395
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
66831
64396
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
66832
64397
|
}
|
|
66833
|
-
for (const
|
|
66834
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
66835
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
64398
|
+
for (const segment of parts.slice(1)) {
|
|
64399
|
+
if (!SourcePackageSegmentSchema.safeParse(segment).success) {
|
|
64400
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
|
|
66836
64401
|
}
|
|
66837
64402
|
}
|
|
66838
64403
|
});
|
|
@@ -66848,9 +64413,9 @@ var init_grammar = __esm(() => {
|
|
|
66848
64413
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
66849
64414
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
66850
64415
|
}
|
|
66851
|
-
for (const
|
|
66852
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
66853
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
64416
|
+
for (const segment of parts.slice(1)) {
|
|
64417
|
+
if (!SourcePackageSegmentSchema.safeParse(segment).success) {
|
|
64418
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
|
|
66854
64419
|
}
|
|
66855
64420
|
}
|
|
66856
64421
|
});
|
|
@@ -66944,9 +64509,9 @@ var init_grammar = __esm(() => {
|
|
|
66944
64509
|
});
|
|
66945
64510
|
return;
|
|
66946
64511
|
}
|
|
66947
|
-
for (const
|
|
66948
|
-
if (!RunTargetSegmentSchema.safeParse(
|
|
66949
|
-
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${
|
|
64512
|
+
for (const segment of parts.slice(1)) {
|
|
64513
|
+
if (!RunTargetSegmentSchema.safeParse(segment).success) {
|
|
64514
|
+
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment}` });
|
|
66950
64515
|
}
|
|
66951
64516
|
}
|
|
66952
64517
|
if (ref) {
|
|
@@ -67698,7 +65263,7 @@ function fromBig(n, le = false) {
|
|
|
67698
65263
|
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
67699
65264
|
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
67700
65265
|
}
|
|
67701
|
-
function
|
|
65266
|
+
function split(lst, le = false) {
|
|
67702
65267
|
const len = lst.length;
|
|
67703
65268
|
let Ah = new Uint32Array(len);
|
|
67704
65269
|
let Al = new Uint32Array(len);
|
|
@@ -67878,7 +65443,7 @@ var init_sha2 = __esm(() => {
|
|
|
67878
65443
|
super(28);
|
|
67879
65444
|
}
|
|
67880
65445
|
};
|
|
67881
|
-
K512 = /* @__PURE__ */ (() =>
|
|
65446
|
+
K512 = /* @__PURE__ */ (() => split([
|
|
67882
65447
|
"0x428a2f98d728ae22",
|
|
67883
65448
|
"0x7137449123ef65cd",
|
|
67884
65449
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -68267,11 +65832,11 @@ function walkGrammar(node, parts) {
|
|
|
68267
65832
|
}
|
|
68268
65833
|
return current;
|
|
68269
65834
|
}
|
|
68270
|
-
function normalizeTemplate(
|
|
68271
|
-
return
|
|
65835
|
+
function normalizeTemplate(template) {
|
|
65836
|
+
return template.endsWith("/") ? template.slice(0, -1) : template;
|
|
68272
65837
|
}
|
|
68273
|
-
function renderTemplate(
|
|
68274
|
-
return normalizeTemplate(
|
|
65838
|
+
function renderTemplate(template, params) {
|
|
65839
|
+
return normalizeTemplate(template).split("/").flatMap((part) => {
|
|
68275
65840
|
if (!part.startsWith(":")) {
|
|
68276
65841
|
return [part];
|
|
68277
65842
|
}
|
|
@@ -68281,36 +65846,36 @@ function renderTemplate(template2, params) {
|
|
|
68281
65846
|
throw new Error(`Missing S3 path parameter: ${part}`);
|
|
68282
65847
|
}
|
|
68283
65848
|
if (name === "path") {
|
|
68284
|
-
return value.split("/").map((
|
|
65849
|
+
return value.split("/").map((segment) => assertSegment("path", segment));
|
|
68285
65850
|
}
|
|
68286
65851
|
return [assertSegment(String(name), value)];
|
|
68287
65852
|
});
|
|
68288
65853
|
}
|
|
68289
|
-
function buildS3Path(tenantId,
|
|
65854
|
+
function buildS3Path(tenantId, template, params) {
|
|
68290
65855
|
const tenant = assertSegment("tenantId", tenantId);
|
|
68291
|
-
const parts = renderTemplate(
|
|
65856
|
+
const parts = renderTemplate(template, params);
|
|
68292
65857
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
68293
|
-
if (
|
|
68294
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
65858
|
+
if (template.endsWith("/") && node === PATH_LEAF) {
|
|
65859
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
68295
65860
|
}
|
|
68296
65861
|
const path = ["tenants", tenant, ...parts].join("/");
|
|
68297
|
-
return
|
|
65862
|
+
return template.endsWith("/") ? `${path}/` : path;
|
|
68298
65863
|
}
|
|
68299
|
-
function buildS3PathSuffix(
|
|
68300
|
-
const parts = renderTemplate(
|
|
65864
|
+
function buildS3PathSuffix(template, params) {
|
|
65865
|
+
const parts = renderTemplate(template, params);
|
|
68301
65866
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
68302
|
-
if (
|
|
68303
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
65867
|
+
if (template.endsWith("/") && node === PATH_LEAF) {
|
|
65868
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
68304
65869
|
}
|
|
68305
65870
|
const path = parts.join("/");
|
|
68306
|
-
return
|
|
65871
|
+
return template.endsWith("/") ? `${path}/` : path;
|
|
68307
65872
|
}
|
|
68308
65873
|
function stripTenantPrefix(key) {
|
|
68309
65874
|
return key.replace(TENANT_PREFIX_RX, "");
|
|
68310
65875
|
}
|
|
68311
|
-
function matchS3Path(
|
|
65876
|
+
function matchS3Path(template, key) {
|
|
68312
65877
|
const keyParts = stripTenantPrefix(key).split("/");
|
|
68313
|
-
const templateParts = normalizeTemplate(
|
|
65878
|
+
const templateParts = normalizeTemplate(template).split("/");
|
|
68314
65879
|
const params = {};
|
|
68315
65880
|
let keyIndex = 0;
|
|
68316
65881
|
for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
|
|
@@ -68329,7 +65894,7 @@ function matchS3Path(template2, key) {
|
|
|
68329
65894
|
if (rest.length === 0)
|
|
68330
65895
|
return null;
|
|
68331
65896
|
try {
|
|
68332
|
-
params.path = rest.map((
|
|
65897
|
+
params.path = rest.map((segment) => assertSegment("path", segment)).join("/");
|
|
68333
65898
|
walkGrammar(S3_PATH_GRAMMAR, keyParts);
|
|
68334
65899
|
} catch {
|
|
68335
65900
|
return null;
|
|
@@ -68363,23 +65928,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
|
|
|
68363
65928
|
}
|
|
68364
65929
|
return assertSegment("tenantId", tenantId);
|
|
68365
65930
|
};
|
|
68366
|
-
const build = (
|
|
65931
|
+
const build = (template, params) => {
|
|
68367
65932
|
const tenant = resolveTenantId(params);
|
|
68368
|
-
const parts = renderTemplate(
|
|
65933
|
+
const parts = renderTemplate(template, params ?? {});
|
|
68369
65934
|
const node = walkGrammar(grammarNode, parts);
|
|
68370
|
-
if (
|
|
68371
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
65935
|
+
if (template.endsWith("/") && node === PATH_LEAF) {
|
|
65936
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
68372
65937
|
}
|
|
68373
65938
|
const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
|
|
68374
|
-
return
|
|
65939
|
+
return template.endsWith("/") ? `${path}/` : path;
|
|
68375
65940
|
};
|
|
68376
65941
|
const builder = build;
|
|
68377
|
-
builder.at = (
|
|
65942
|
+
builder.at = (template, params) => {
|
|
68378
65943
|
const tenant = resolveTenantId(params);
|
|
68379
|
-
const parts = renderTemplate(
|
|
65944
|
+
const parts = renderTemplate(template, params ?? {});
|
|
68380
65945
|
const nextNode = walkGrammar(grammarNode, parts);
|
|
68381
|
-
if (
|
|
68382
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
65946
|
+
if (template.endsWith("/") && nextNode === PATH_LEAF) {
|
|
65947
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
68383
65948
|
}
|
|
68384
65949
|
return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
|
|
68385
65950
|
};
|
|
@@ -68764,7 +66329,7 @@ __export(exports_src, {
|
|
|
68764
66329
|
SplitConfigSchema: () => SplitConfigSchema,
|
|
68765
66330
|
SpanTypes: () => SpanTypes,
|
|
68766
66331
|
SpanKindMap: () => SpanKindMap,
|
|
68767
|
-
SpanKind: () =>
|
|
66332
|
+
SpanKind: () => SpanKind,
|
|
68768
66333
|
SourceVersionRefSchema: () => SourceVersionRefSchema,
|
|
68769
66334
|
SourceSecretsFileSchema: () => SourceSecretsFileSchema,
|
|
68770
66335
|
SourcePackageTypeSchema: () => SourcePackageTypeSchema,
|
|
@@ -68870,7 +66435,7 @@ __export(exports_src, {
|
|
|
68870
66435
|
GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
|
|
68871
66436
|
ForeachStepSchema: () => ForeachStepSchema,
|
|
68872
66437
|
FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
|
|
68873
|
-
FilePathDescriptorSchema: () =>
|
|
66438
|
+
FilePathDescriptorSchema: () => FilePathDescriptorSchema2,
|
|
68874
66439
|
FileIngressRefSchema: () => FileIngressRefSchema,
|
|
68875
66440
|
FileIdIngressRefSchema: () => FileIdIngressRefSchema,
|
|
68876
66441
|
FailStepSchema: () => FailStepSchema,
|
|
@@ -68993,8 +66558,8 @@ var init_src = __esm(() => {
|
|
|
68993
66558
|
init_legacy_boundary();
|
|
68994
66559
|
init_runtime_file_ref();
|
|
68995
66560
|
init_scoped_file_ref();
|
|
68996
|
-
|
|
68997
|
-
|
|
66561
|
+
init_processor();
|
|
66562
|
+
init_parser();
|
|
68998
66563
|
init_otel();
|
|
68999
66564
|
init_execution_row();
|
|
69000
66565
|
init_run_expand();
|
|
@@ -69907,7 +67472,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
69907
67472
|
else
|
|
69908
67473
|
end = lineWidth - indentAtStart;
|
|
69909
67474
|
}
|
|
69910
|
-
let
|
|
67475
|
+
let split2 = undefined;
|
|
69911
67476
|
let prev = undefined;
|
|
69912
67477
|
let overflow = false;
|
|
69913
67478
|
let i = -1;
|
|
@@ -69941,20 +67506,20 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
69941
67506
|
if (mode === FOLD_BLOCK)
|
|
69942
67507
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
69943
67508
|
end = i + indent.length + endStep;
|
|
69944
|
-
|
|
67509
|
+
split2 = undefined;
|
|
69945
67510
|
} else {
|
|
69946
67511
|
if (ch === " " && prev && prev !== " " && prev !== `
|
|
69947
67512
|
` && prev !== "\t") {
|
|
69948
67513
|
const next = text[i + 1];
|
|
69949
67514
|
if (next && next !== " " && next !== `
|
|
69950
67515
|
` && next !== "\t")
|
|
69951
|
-
|
|
67516
|
+
split2 = i;
|
|
69952
67517
|
}
|
|
69953
67518
|
if (i >= end) {
|
|
69954
|
-
if (
|
|
69955
|
-
folds.push(
|
|
69956
|
-
end =
|
|
69957
|
-
|
|
67519
|
+
if (split2) {
|
|
67520
|
+
folds.push(split2);
|
|
67521
|
+
end = split2 + endStep;
|
|
67522
|
+
split2 = undefined;
|
|
69958
67523
|
} else if (mode === FOLD_QUOTED) {
|
|
69959
67524
|
while (prev === " " || prev === "\t") {
|
|
69960
67525
|
prev = ch;
|
|
@@ -69967,7 +67532,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
69967
67532
|
folds.push(j);
|
|
69968
67533
|
escapedFolds[j] = true;
|
|
69969
67534
|
end = j + endStep;
|
|
69970
|
-
|
|
67535
|
+
split2 = undefined;
|
|
69971
67536
|
} else {
|
|
69972
67537
|
overflow = true;
|
|
69973
67538
|
}
|
|
@@ -70601,7 +68166,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
70601
68166
|
var identity = require_identity();
|
|
70602
68167
|
var Scalar = require_Scalar();
|
|
70603
68168
|
var MERGE_KEY = "<<";
|
|
70604
|
-
var
|
|
68169
|
+
var merge2 = {
|
|
70605
68170
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
70606
68171
|
default: "key",
|
|
70607
68172
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -70611,7 +68176,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
70611
68176
|
}),
|
|
70612
68177
|
stringify: () => MERGE_KEY
|
|
70613
68178
|
};
|
|
70614
|
-
var isMergeKey = (ctx, key) => (
|
|
68179
|
+
var isMergeKey = (ctx, key) => (merge2.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge2.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default);
|
|
70615
68180
|
function addMergeToJSMap(ctx, map2, value) {
|
|
70616
68181
|
const source = resolveAliasValue(ctx, value);
|
|
70617
68182
|
if (identity.isSeq(source))
|
|
@@ -70650,21 +68215,21 @@ var require_merge = __commonJS((exports) => {
|
|
|
70650
68215
|
}
|
|
70651
68216
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
70652
68217
|
exports.isMergeKey = isMergeKey;
|
|
70653
|
-
exports.merge =
|
|
68218
|
+
exports.merge = merge2;
|
|
70654
68219
|
});
|
|
70655
68220
|
|
|
70656
68221
|
// ../../node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
70657
68222
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
70658
68223
|
var log = require_log();
|
|
70659
|
-
var
|
|
68224
|
+
var merge2 = require_merge();
|
|
70660
68225
|
var stringify = require_stringify();
|
|
70661
68226
|
var identity = require_identity();
|
|
70662
68227
|
var toJS = require_toJS();
|
|
70663
68228
|
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
70664
68229
|
if (identity.isNode(key) && key.addToJSMap)
|
|
70665
68230
|
key.addToJSMap(ctx, map2, value);
|
|
70666
|
-
else if (
|
|
70667
|
-
|
|
68231
|
+
else if (merge2.isMergeKey(ctx, key))
|
|
68232
|
+
merge2.addMergeToJSMap(ctx, map2, value);
|
|
70668
68233
|
else {
|
|
70669
68234
|
const jsKey = toJS.toJS(key, "", ctx);
|
|
70670
68235
|
if (map2 instanceof Map) {
|
|
@@ -71940,7 +69505,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
71940
69505
|
var bool = require_bool2();
|
|
71941
69506
|
var float = require_float2();
|
|
71942
69507
|
var int2 = require_int2();
|
|
71943
|
-
var
|
|
69508
|
+
var merge2 = require_merge();
|
|
71944
69509
|
var omap = require_omap();
|
|
71945
69510
|
var pairs = require_pairs();
|
|
71946
69511
|
var set2 = require_set();
|
|
@@ -71960,7 +69525,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
71960
69525
|
float.floatExp,
|
|
71961
69526
|
float.float,
|
|
71962
69527
|
binary.binary,
|
|
71963
|
-
|
|
69528
|
+
merge2.merge,
|
|
71964
69529
|
omap.omap,
|
|
71965
69530
|
pairs.pairs,
|
|
71966
69531
|
set2.set,
|
|
@@ -71983,7 +69548,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
71983
69548
|
var schema = require_schema();
|
|
71984
69549
|
var schema$1 = require_schema2();
|
|
71985
69550
|
var binary = require_binary();
|
|
71986
|
-
var
|
|
69551
|
+
var merge2 = require_merge();
|
|
71987
69552
|
var omap = require_omap();
|
|
71988
69553
|
var pairs = require_pairs();
|
|
71989
69554
|
var schema$2 = require_schema3();
|
|
@@ -72008,7 +69573,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72008
69573
|
intOct: int2.intOct,
|
|
72009
69574
|
intTime: timestamp.intTime,
|
|
72010
69575
|
map: map2.map,
|
|
72011
|
-
merge:
|
|
69576
|
+
merge: merge2.merge,
|
|
72012
69577
|
null: _null4.nullTag,
|
|
72013
69578
|
omap: omap.omap,
|
|
72014
69579
|
pairs: pairs.pairs,
|
|
@@ -72018,7 +69583,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72018
69583
|
};
|
|
72019
69584
|
var coreKnownTags = {
|
|
72020
69585
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
72021
|
-
"tag:yaml.org,2002:merge":
|
|
69586
|
+
"tag:yaml.org,2002:merge": merge2.merge,
|
|
72022
69587
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
72023
69588
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
72024
69589
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -72027,7 +69592,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72027
69592
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
72028
69593
|
const schemaTags = schemas3.get(schemaName);
|
|
72029
69594
|
if (schemaTags && !customTags) {
|
|
72030
|
-
return addMergeTag && !schemaTags.includes(
|
|
69595
|
+
return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
|
|
72031
69596
|
}
|
|
72032
69597
|
let tags = schemaTags;
|
|
72033
69598
|
if (!tags) {
|
|
@@ -72045,7 +69610,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72045
69610
|
tags = customTags(tags.slice());
|
|
72046
69611
|
}
|
|
72047
69612
|
if (addMergeTag)
|
|
72048
|
-
tags = tags.concat(
|
|
69613
|
+
tags = tags.concat(merge2.merge);
|
|
72049
69614
|
return tags.reduce((tags2, tag) => {
|
|
72050
69615
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
72051
69616
|
if (!tagObj) {
|
|
@@ -72072,11 +69637,11 @@ var require_Schema = __commonJS((exports) => {
|
|
|
72072
69637
|
var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
72073
69638
|
|
|
72074
69639
|
class Schema {
|
|
72075
|
-
constructor({ compat: compat2, customTags, merge:
|
|
69640
|
+
constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
72076
69641
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
72077
69642
|
this.name = typeof schema === "string" && schema || "core";
|
|
72078
69643
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
72079
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
69644
|
+
this.tags = tags.getTags(customTags, this.name, merge2);
|
|
72080
69645
|
this.toStringOptions = toStringDefaults ?? null;
|
|
72081
69646
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
72082
69647
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -73299,13 +70864,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
73299
70864
|
return { mode, indent, chomp, comment, length };
|
|
73300
70865
|
}
|
|
73301
70866
|
function splitLines(source) {
|
|
73302
|
-
const
|
|
73303
|
-
const first =
|
|
70867
|
+
const split2 = source.split(/\n( *)/);
|
|
70868
|
+
const first = split2[0];
|
|
73304
70869
|
const m = first.match(/^( *)/);
|
|
73305
70870
|
const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
|
|
73306
70871
|
const lines = [line0];
|
|
73307
|
-
for (let i = 1;i <
|
|
73308
|
-
lines.push([
|
|
70872
|
+
for (let i = 1;i < split2.length; i += 2)
|
|
70873
|
+
lines.push([split2[i], split2[i + 1]]);
|
|
73309
70874
|
return lines;
|
|
73310
70875
|
}
|
|
73311
70876
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -76319,7 +73884,7 @@ var init_main = __esm(() => {
|
|
|
76319
73884
|
});
|
|
76320
73885
|
|
|
76321
73886
|
// ../../node_modules/sisteransi/src/index.js
|
|
76322
|
-
var
|
|
73887
|
+
var require_src = __commonJS((exports, module) => {
|
|
76323
73888
|
var ESC2 = "\x1B";
|
|
76324
73889
|
var CSI2 = `${ESC2}[`;
|
|
76325
73890
|
var beep = "\x07";
|
|
@@ -76662,7 +74227,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
|
|
|
76662
74227
|
}, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
|
|
76663
74228
|
var init_dist3 = __esm(() => {
|
|
76664
74229
|
init_main();
|
|
76665
|
-
import_sisteransi = __toESM(
|
|
74230
|
+
import_sisteransi = __toESM(require_src(), 1);
|
|
76666
74231
|
G = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
76667
74232
|
K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
76668
74233
|
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)}` } } };
|
|
@@ -78005,7 +75570,7 @@ var init_dist4 = __esm(() => {
|
|
|
78005
75570
|
init_dist3();
|
|
78006
75571
|
init_main();
|
|
78007
75572
|
init_dist2();
|
|
78008
|
-
import_sisteransi2 = __toESM(
|
|
75573
|
+
import_sisteransi2 = __toESM(require_src(), 1);
|
|
78009
75574
|
tt2 = te();
|
|
78010
75575
|
_t = w2("◆", "*");
|
|
78011
75576
|
ot2 = w2("■", "x");
|
|
@@ -171497,7 +169062,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
|
|
|
171497
169062
|
__defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
171498
169063
|
}
|
|
171499
169064
|
return to5;
|
|
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,
|
|
169065
|
+
}, __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_utils2, 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_utils3, require_tasks, require_async, require_sync, require_fs2, require_settings, require_out, require_queue_microtask, require_run_parallel, require_constants3, require_fs3, require_utils4, 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_semver, require_compare, require_gte, require_pseudomap, require_map2, require_yallist, require_lru_cache, require_sigmund, require_fnmatch, require_ini, require_package, require_src2, require_js_tokens, require_readlines, require_ignore, index_exports, Diff = class {
|
|
171501
169066
|
diff(oldStr, newStr, options8 = {}) {
|
|
171502
169067
|
let callback;
|
|
171503
169068
|
if (typeof options8 === "function") {
|
|
@@ -172519,7 +170084,7 @@ var init_prettier = __esm(() => {
|
|
|
172519
170084
|
};
|
|
172520
170085
|
}
|
|
172521
170086
|
});
|
|
172522
|
-
|
|
170087
|
+
require_utils2 = __commonJS2({
|
|
172523
170088
|
"node_modules/braces/lib/utils.js"(exports) {
|
|
172524
170089
|
exports.isInteger = (num) => {
|
|
172525
170090
|
if (typeof num === "number") {
|
|
@@ -172608,7 +170173,7 @@ var init_prettier = __esm(() => {
|
|
|
172608
170173
|
});
|
|
172609
170174
|
require_stringify2 = __commonJS2({
|
|
172610
170175
|
"node_modules/braces/lib/stringify.js"(exports, module) {
|
|
172611
|
-
var utils2 =
|
|
170176
|
+
var utils2 = require_utils2();
|
|
172612
170177
|
module.exports = (ast, options8 = {}) => {
|
|
172613
170178
|
const stringify2 = (node, parent = {}) => {
|
|
172614
170179
|
const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
|
|
@@ -173062,7 +170627,7 @@ var init_prettier = __esm(() => {
|
|
|
173062
170627
|
require_compile2 = __commonJS2({
|
|
173063
170628
|
"node_modules/braces/lib/compile.js"(exports, module) {
|
|
173064
170629
|
var fill2 = require_fill_range();
|
|
173065
|
-
var utils2 =
|
|
170630
|
+
var utils2 = require_utils2();
|
|
173066
170631
|
var compile = (ast, options8 = {}) => {
|
|
173067
170632
|
const walk2 = (node, parent = {}) => {
|
|
173068
170633
|
const invalidBlock = utils2.isInvalidBrace(parent);
|
|
@@ -173112,7 +170677,7 @@ var init_prettier = __esm(() => {
|
|
|
173112
170677
|
"node_modules/braces/lib/expand.js"(exports, module) {
|
|
173113
170678
|
var fill2 = require_fill_range();
|
|
173114
170679
|
var stringify2 = require_stringify2();
|
|
173115
|
-
var utils2 =
|
|
170680
|
+
var utils2 = require_utils2();
|
|
173116
170681
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
173117
170682
|
const result = [];
|
|
173118
170683
|
queue = [].concat(queue);
|
|
@@ -175311,8 +172876,8 @@ var init_prettier = __esm(() => {
|
|
|
175311
172876
|
var Stream = __require2("stream");
|
|
175312
172877
|
var PassThrough = Stream.PassThrough;
|
|
175313
172878
|
var slice = Array.prototype.slice;
|
|
175314
|
-
module.exports =
|
|
175315
|
-
function
|
|
172879
|
+
module.exports = merge2;
|
|
172880
|
+
function merge2() {
|
|
175316
172881
|
const streamsQueue = [];
|
|
175317
172882
|
const args = slice.call(arguments);
|
|
175318
172883
|
let merging = false;
|
|
@@ -175426,9 +172991,9 @@ var init_prettier = __esm(() => {
|
|
|
175426
172991
|
"node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
175427
172992
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175428
172993
|
exports.merge = undefined;
|
|
175429
|
-
var
|
|
172994
|
+
var merge2 = require_merge2();
|
|
175430
172995
|
function merge3(streams) {
|
|
175431
|
-
const mergedStream =
|
|
172996
|
+
const mergedStream = merge2(streams);
|
|
175432
172997
|
streams.forEach((stream) => {
|
|
175433
172998
|
stream.once("error", (error52) => mergedStream.emit("error", error52));
|
|
175434
172999
|
});
|
|
@@ -175456,7 +173021,7 @@ var init_prettier = __esm(() => {
|
|
|
175456
173021
|
exports.isEmpty = isEmpty;
|
|
175457
173022
|
}
|
|
175458
173023
|
});
|
|
175459
|
-
|
|
173024
|
+
require_utils3 = __commonJS2({
|
|
175460
173025
|
"node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
175461
173026
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175462
173027
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
@@ -175480,7 +173045,7 @@ var init_prettier = __esm(() => {
|
|
|
175480
173045
|
"node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
175481
173046
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175482
173047
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
175483
|
-
var utils2 =
|
|
173048
|
+
var utils2 = require_utils3();
|
|
175484
173049
|
function generate(input, settings) {
|
|
175485
173050
|
const patterns = processPatterns(input, settings);
|
|
175486
173051
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -175789,7 +173354,7 @@ var init_prettier = __esm(() => {
|
|
|
175789
173354
|
exports.createDirentFromStats = createDirentFromStats;
|
|
175790
173355
|
}
|
|
175791
173356
|
});
|
|
175792
|
-
|
|
173357
|
+
require_utils4 = __commonJS2({
|
|
175793
173358
|
"node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
175794
173359
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175795
173360
|
exports.fs = undefined;
|
|
@@ -175817,7 +173382,7 @@ var init_prettier = __esm(() => {
|
|
|
175817
173382
|
var fsStat = require_out();
|
|
175818
173383
|
var rpl = require_run_parallel();
|
|
175819
173384
|
var constants_1 = require_constants3();
|
|
175820
|
-
var utils2 =
|
|
173385
|
+
var utils2 = require_utils4();
|
|
175821
173386
|
var common = require_common();
|
|
175822
173387
|
function read3(directory, settings, callback) {
|
|
175823
173388
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -175923,7 +173488,7 @@ var init_prettier = __esm(() => {
|
|
|
175923
173488
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
175924
173489
|
var fsStat = require_out();
|
|
175925
173490
|
var constants_1 = require_constants3();
|
|
175926
|
-
var utils2 =
|
|
173491
|
+
var utils2 = require_utils4();
|
|
175927
173492
|
var common = require_common();
|
|
175928
173493
|
function read3(directory, settings) {
|
|
175929
173494
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -176703,7 +174268,7 @@ var init_prettier = __esm(() => {
|
|
|
176703
174268
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176704
174269
|
var path15 = __require2("path");
|
|
176705
174270
|
var fsStat = require_out();
|
|
176706
|
-
var utils2 =
|
|
174271
|
+
var utils2 = require_utils3();
|
|
176707
174272
|
var Reader = class {
|
|
176708
174273
|
constructor(_settings) {
|
|
176709
174274
|
this._settings = _settings;
|
|
@@ -176827,7 +174392,7 @@ var init_prettier = __esm(() => {
|
|
|
176827
174392
|
require_matcher = __commonJS2({
|
|
176828
174393
|
"node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
176829
174394
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176830
|
-
var utils2 =
|
|
174395
|
+
var utils2 = require_utils3();
|
|
176831
174396
|
var Matcher = class {
|
|
176832
174397
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
176833
174398
|
this._patterns = _patterns;
|
|
@@ -176866,7 +174431,7 @@ var init_prettier = __esm(() => {
|
|
|
176866
174431
|
});
|
|
176867
174432
|
}
|
|
176868
174433
|
_splitSegmentsIntoSections(segments) {
|
|
176869
|
-
return utils2.array.splitWhen(segments, (
|
|
174434
|
+
return utils2.array.splitWhen(segments, (segment) => segment.dynamic && utils2.pattern.hasGlobStar(segment.pattern));
|
|
176870
174435
|
}
|
|
176871
174436
|
};
|
|
176872
174437
|
exports.default = Matcher;
|
|
@@ -176887,11 +174452,11 @@ var init_prettier = __esm(() => {
|
|
|
176887
174452
|
return true;
|
|
176888
174453
|
}
|
|
176889
174454
|
const match = parts.every((part, index) => {
|
|
176890
|
-
const
|
|
176891
|
-
if (
|
|
174455
|
+
const segment = pattern.segments[index];
|
|
174456
|
+
if (segment.dynamic && segment.patternRe.test(part)) {
|
|
176892
174457
|
return true;
|
|
176893
174458
|
}
|
|
176894
|
-
if (!
|
|
174459
|
+
if (!segment.dynamic && segment.pattern === part) {
|
|
176895
174460
|
return true;
|
|
176896
174461
|
}
|
|
176897
174462
|
return false;
|
|
@@ -176909,7 +174474,7 @@ var init_prettier = __esm(() => {
|
|
|
176909
174474
|
require_deep = __commonJS2({
|
|
176910
174475
|
"node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
176911
174476
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176912
|
-
var utils2 =
|
|
174477
|
+
var utils2 = require_utils3();
|
|
176913
174478
|
var partial_1 = require_partial();
|
|
176914
174479
|
var DeepFilter = class {
|
|
176915
174480
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -176971,7 +174536,7 @@ var init_prettier = __esm(() => {
|
|
|
176971
174536
|
require_entry = __commonJS2({
|
|
176972
174537
|
"node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
176973
174538
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176974
|
-
var utils2 =
|
|
174539
|
+
var utils2 = require_utils3();
|
|
176975
174540
|
var EntryFilter = class {
|
|
176976
174541
|
constructor(_settings, _micromatchOptions) {
|
|
176977
174542
|
this._settings = _settings;
|
|
@@ -177056,7 +174621,7 @@ var init_prettier = __esm(() => {
|
|
|
177056
174621
|
require_error2 = __commonJS2({
|
|
177057
174622
|
"node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
177058
174623
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177059
|
-
var utils2 =
|
|
174624
|
+
var utils2 = require_utils3();
|
|
177060
174625
|
var ErrorFilter = class {
|
|
177061
174626
|
constructor(_settings) {
|
|
177062
174627
|
this._settings = _settings;
|
|
@@ -177074,7 +174639,7 @@ var init_prettier = __esm(() => {
|
|
|
177074
174639
|
require_entry2 = __commonJS2({
|
|
177075
174640
|
"node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
177076
174641
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177077
|
-
var utils2 =
|
|
174642
|
+
var utils2 = require_utils3();
|
|
177078
174643
|
var EntryTransformer = class {
|
|
177079
174644
|
constructor(_settings) {
|
|
177080
174645
|
this._settings = _settings;
|
|
@@ -177342,7 +174907,7 @@ var init_prettier = __esm(() => {
|
|
|
177342
174907
|
var stream_1 = require_stream4();
|
|
177343
174908
|
var sync_1 = require_sync6();
|
|
177344
174909
|
var settings_1 = require_settings4();
|
|
177345
|
-
var utils2 =
|
|
174910
|
+
var utils2 = require_utils3();
|
|
177346
174911
|
async function FastGlob(source2, options8) {
|
|
177347
174912
|
assertPatternsInput(source2);
|
|
177348
174913
|
const works = getWorks(source2, async_1.default, options8);
|
|
@@ -177660,7 +175225,7 @@ var init_prettier = __esm(() => {
|
|
|
177660
175225
|
};
|
|
177661
175226
|
}
|
|
177662
175227
|
});
|
|
177663
|
-
|
|
175228
|
+
require_semver = __commonJS2({
|
|
177664
175229
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
177665
175230
|
var debug = require_debug();
|
|
177666
175231
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
|
|
@@ -177930,7 +175495,7 @@ var init_prettier = __esm(() => {
|
|
|
177930
175495
|
});
|
|
177931
175496
|
require_compare = __commonJS2({
|
|
177932
175497
|
"node_modules/semver/functions/compare.js"(exports, module) {
|
|
177933
|
-
var SemVer =
|
|
175498
|
+
var SemVer = require_semver();
|
|
177934
175499
|
var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
|
|
177935
175500
|
module.exports = compare;
|
|
177936
175501
|
}
|
|
@@ -179663,7 +177228,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
179663
177228
|
};
|
|
179664
177229
|
}
|
|
179665
177230
|
});
|
|
179666
|
-
|
|
177231
|
+
require_src2 = __commonJS2({
|
|
179667
177232
|
"node_modules/editorconfig/src/index.js"(exports) {
|
|
179668
177233
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
179669
177234
|
return new (P9 || (P9 = Promise))(function(resolve32, reject) {
|
|
@@ -181126,7 +178691,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
181126
178691
|
mockable_default = mockable.mocked;
|
|
181127
178692
|
import_micromatch = __toESM2(require_micromatch(), 1);
|
|
181128
178693
|
partition_default = partition2;
|
|
181129
|
-
import_editorconfig = __toESM2(
|
|
178694
|
+
import_editorconfig = __toESM2(require_src2(), 1);
|
|
181130
178695
|
iterate_directory_up_default = iterateDirectoryUp;
|
|
181131
178696
|
FileSearcher = class extends Searcher {
|
|
181132
178697
|
findInDirectory = findFile;
|
|
@@ -183722,7 +181287,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
|
|
|
183722
181287
|
// package.json
|
|
183723
181288
|
var package_default = {
|
|
183724
181289
|
name: "@eigenpal/cli",
|
|
183725
|
-
version: "0.10.
|
|
181290
|
+
version: "0.10.18",
|
|
183726
181291
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
183727
181292
|
keywords: [
|
|
183728
181293
|
"eigenpal",
|
|
@@ -185236,7 +182801,7 @@ async function pushCurrentBranch(input) {
|
|
|
185236
182801
|
function slugifyPackageSegment(value) {
|
|
185237
182802
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
185238
182803
|
}
|
|
185239
|
-
function packagePathForTemplate(
|
|
182804
|
+
function packagePathForTemplate(template, name) {
|
|
185240
182805
|
const slug = slugifyPackageSegment(name);
|
|
185241
182806
|
if (!slug)
|
|
185242
182807
|
throw new Error("Package name must include at least one letter or number.");
|
|
@@ -185248,7 +182813,7 @@ function packagePathForTemplate(template2, name) {
|
|
|
185248
182813
|
knowledge: "resources/knowledge",
|
|
185249
182814
|
evaluator: "evaluators"
|
|
185250
182815
|
};
|
|
185251
|
-
const root = rootByTemplate[
|
|
182816
|
+
const root = rootByTemplate[template];
|
|
185252
182817
|
if (!root)
|
|
185253
182818
|
throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
|
|
185254
182819
|
return SourcePackagePathSchema.parse(`${root}/${slug}`);
|
|
@@ -185657,12 +183222,12 @@ function archivePackage(input) {
|
|
|
185657
183222
|
runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
|
|
185658
183223
|
cwd: input.gitRoot
|
|
185659
183224
|
});
|
|
185660
|
-
const
|
|
183225
|
+
const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
185661
183226
|
cwd: input.outDir,
|
|
185662
183227
|
encoding: "utf8"
|
|
185663
183228
|
});
|
|
185664
|
-
if (
|
|
185665
|
-
throw new Error(
|
|
183229
|
+
if (extract.status !== 0)
|
|
183230
|
+
throw new Error(extract.stderr.trim() || "tar extraction failed");
|
|
185666
183231
|
} finally {
|
|
185667
183232
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
185668
183233
|
}
|
|
@@ -185691,12 +183256,12 @@ async function tryHostedArchive(input) {
|
|
|
185691
183256
|
const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
|
|
185692
183257
|
try {
|
|
185693
183258
|
writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
|
|
185694
|
-
const
|
|
183259
|
+
const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
185695
183260
|
cwd: input.outDir,
|
|
185696
183261
|
encoding: "utf8"
|
|
185697
183262
|
});
|
|
185698
|
-
if (
|
|
185699
|
-
throw new Error(
|
|
183263
|
+
if (extract.status !== 0)
|
|
183264
|
+
throw new Error(extract.stderr.trim() || "tar extraction failed");
|
|
185700
183265
|
return true;
|
|
185701
183266
|
} finally {
|
|
185702
183267
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
@@ -190051,18 +187616,18 @@ async function init(name, opts) {
|
|
|
190051
187616
|
if (existsSync11(target) && readdirSync2(target).length > 0) {
|
|
190052
187617
|
throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
|
|
190053
187618
|
}
|
|
190054
|
-
let
|
|
187619
|
+
let template;
|
|
190055
187620
|
if (opts.template) {
|
|
190056
187621
|
if (!isTemplateName(opts.template)) {
|
|
190057
187622
|
throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
|
|
190058
187623
|
}
|
|
190059
|
-
|
|
187624
|
+
template = opts.template;
|
|
190060
187625
|
} else if (opts.yes || !process.stdin.isTTY) {
|
|
190061
|
-
|
|
187626
|
+
template = "blank";
|
|
190062
187627
|
} else {
|
|
190063
|
-
|
|
187628
|
+
template = await promptForTemplate();
|
|
190064
187629
|
}
|
|
190065
|
-
const sourceRoot = join2(resolveTemplatesRoot(),
|
|
187630
|
+
const sourceRoot = join2(resolveTemplatesRoot(), template);
|
|
190066
187631
|
if (!existsSync11(sourceRoot)) {
|
|
190067
187632
|
throw new Error(`Template directory missing on disk: ${sourceRoot}`);
|
|
190068
187633
|
}
|