@eigenpal/cli 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2670 -299
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17080,14 +17080,2478 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
17080
17080
|
module.exports.createColors = createColors;
|
|
17081
17081
|
});
|
|
17082
17082
|
|
|
17083
|
+
// ../../node_modules/nanoid/url-alphabet/index.js
|
|
17084
|
+
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
17085
|
+
|
|
17086
|
+
// ../../node_modules/nanoid/index.js
|
|
17087
|
+
import { webcrypto as crypto } from "node:crypto";
|
|
17088
|
+
function fillPool(bytes) {
|
|
17089
|
+
if (!pool || pool.length < bytes) {
|
|
17090
|
+
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
17091
|
+
crypto.getRandomValues(pool);
|
|
17092
|
+
poolOffset = 0;
|
|
17093
|
+
} else if (poolOffset + bytes > pool.length) {
|
|
17094
|
+
crypto.getRandomValues(pool);
|
|
17095
|
+
poolOffset = 0;
|
|
17096
|
+
}
|
|
17097
|
+
poolOffset += bytes;
|
|
17098
|
+
}
|
|
17099
|
+
function nanoid3(size = 21) {
|
|
17100
|
+
fillPool(size |= 0);
|
|
17101
|
+
let id = "";
|
|
17102
|
+
for (let i = poolOffset - size;i < poolOffset; i++) {
|
|
17103
|
+
id += urlAlphabet[pool[i] & 63];
|
|
17104
|
+
}
|
|
17105
|
+
return id;
|
|
17106
|
+
}
|
|
17107
|
+
var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset;
|
|
17108
|
+
var init_nanoid = () => {};
|
|
17109
|
+
|
|
17110
|
+
// ../types/src/core/common.ts
|
|
17111
|
+
function generateId(prefix) {
|
|
17112
|
+
const id = nanoid3();
|
|
17113
|
+
return prefix ? `${prefix}_${id}` : id;
|
|
17114
|
+
}
|
|
17115
|
+
function toJsonSchema(schema) {
|
|
17116
|
+
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
17117
|
+
}
|
|
17118
|
+
var ID_PREFIXES, TimestampSchema, JsonSchemaSchema, BaseEntitySchema;
|
|
17119
|
+
var init_common = __esm(() => {
|
|
17120
|
+
init_nanoid();
|
|
17121
|
+
init_zod();
|
|
17122
|
+
ID_PREFIXES = {
|
|
17123
|
+
WORKFLOW: "wf",
|
|
17124
|
+
WORKFLOW_VERSION: "wfv",
|
|
17125
|
+
WORKFLOW_HISTORY: "wfh",
|
|
17126
|
+
JOB: "job",
|
|
17127
|
+
EXECUTION: "exec",
|
|
17128
|
+
STEP_EXECUTION: "step",
|
|
17129
|
+
FILE: "file",
|
|
17130
|
+
TEMPLATE: "tmpl",
|
|
17131
|
+
USER: "user",
|
|
17132
|
+
TENANT: "org",
|
|
17133
|
+
TENANT_INVITE: "inv",
|
|
17134
|
+
API_KEY: "eig",
|
|
17135
|
+
PROCESSOR: "proc",
|
|
17136
|
+
AI_PROVIDER: "aip",
|
|
17137
|
+
ACCOUNT: "acct",
|
|
17138
|
+
SESSION: "sess",
|
|
17139
|
+
VERIFICATION: "vrf",
|
|
17140
|
+
DATASET: "ds",
|
|
17141
|
+
DATASET_EXAMPLE: "dex",
|
|
17142
|
+
EXPERIMENT: "exp",
|
|
17143
|
+
EXPERIMENT_RUN: "exr",
|
|
17144
|
+
EXPERIMENT_EVALUATION: "evl",
|
|
17145
|
+
EVAL_EXAMPLE: "evx",
|
|
17146
|
+
EVAL_RESULT: "evr",
|
|
17147
|
+
EVAL_BATCH: "evb",
|
|
17148
|
+
TABLE_ROW: "row",
|
|
17149
|
+
FOLDER: "fldr",
|
|
17150
|
+
AGENT_WORKFLOW: "awf",
|
|
17151
|
+
AGENT_EXECUTION: "aex",
|
|
17152
|
+
AGENT_EXAMPLE: "aeg",
|
|
17153
|
+
AGENT_VERSION: "avr",
|
|
17154
|
+
AGENT_TRAINING_SESSION: "ats",
|
|
17155
|
+
AGENT_EXPERIMENT: "aexp",
|
|
17156
|
+
AGENT_EMAIL_ALIAS: "aea",
|
|
17157
|
+
AGENT_EMAIL_INVOCATION: "aei",
|
|
17158
|
+
AUTOMATION_TRIGGER: "atr",
|
|
17159
|
+
SANDBOX_WS_TOKEN: "sws"
|
|
17160
|
+
};
|
|
17161
|
+
TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
17162
|
+
return typeof val === "string" ? new Date(val) : val;
|
|
17163
|
+
});
|
|
17164
|
+
JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
17165
|
+
BaseEntitySchema = exports_external.object({
|
|
17166
|
+
id: exports_external.string(),
|
|
17167
|
+
createdAt: TimestampSchema.optional(),
|
|
17168
|
+
updatedAt: TimestampSchema.optional()
|
|
17169
|
+
});
|
|
17170
|
+
});
|
|
17171
|
+
|
|
17172
|
+
// ../types/src/core/ids.ts
|
|
17173
|
+
var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
|
|
17174
|
+
var init_ids = __esm(() => {
|
|
17175
|
+
PROCESSOR_IDS = {
|
|
17176
|
+
MERGE: "builtin/merge",
|
|
17177
|
+
DOCUMENT_PARSER: "builtin/parser",
|
|
17178
|
+
EXTRACT: "builtin/extract",
|
|
17179
|
+
SPLIT: "builtin/split",
|
|
17180
|
+
CLASSIFY: "builtin/classify",
|
|
17181
|
+
TEMPLATE: "builtin/template",
|
|
17182
|
+
PDF_EMBEDDER: "builtin/pdf-embedder",
|
|
17183
|
+
XLSX_TO_JSON: "builtin/xlsx-to-json"
|
|
17184
|
+
};
|
|
17185
|
+
PARSER_IDS = {
|
|
17186
|
+
KREUZBERG: "builtin/kreuzberg",
|
|
17187
|
+
OCR: "builtin/ocr",
|
|
17188
|
+
LLM_VISION: "builtin/llm-vision"
|
|
17189
|
+
};
|
|
17190
|
+
INPUT_KINDS = {
|
|
17191
|
+
DOCUMENT: "document",
|
|
17192
|
+
PAYLOAD: "payload"
|
|
17193
|
+
};
|
|
17194
|
+
});
|
|
17195
|
+
|
|
17196
|
+
// ../types/src/core/pagination.ts
|
|
17197
|
+
var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
|
|
17198
|
+
var init_pagination = __esm(() => {
|
|
17199
|
+
init_zod();
|
|
17200
|
+
PaginationParamsSchema = exports_external.object({
|
|
17201
|
+
limit: exports_external.coerce.number().int().min(1).max(100).default(50),
|
|
17202
|
+
offset: exports_external.coerce.number().int().min(0).default(0)
|
|
17203
|
+
});
|
|
17204
|
+
});
|
|
17205
|
+
|
|
17083
17206
|
// ../types/src/core/index.ts
|
|
17084
|
-
var init_core3 = () => {
|
|
17207
|
+
var init_core3 = __esm(() => {
|
|
17208
|
+
init_common();
|
|
17209
|
+
init_ids();
|
|
17210
|
+
init_pagination();
|
|
17211
|
+
});
|
|
17212
|
+
|
|
17213
|
+
// ../../node_modules/@opentelemetry/api/build/src/version.js
|
|
17214
|
+
var require_version = __commonJS((exports) => {
|
|
17215
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17216
|
+
exports.VERSION = undefined;
|
|
17217
|
+
exports.VERSION = "1.9.1";
|
|
17218
|
+
});
|
|
17219
|
+
|
|
17220
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
|
|
17221
|
+
var require_semver = __commonJS((exports) => {
|
|
17222
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17223
|
+
exports.isCompatible = exports._makeCompatibilityCheck = undefined;
|
|
17224
|
+
var version_1 = require_version();
|
|
17225
|
+
var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
17226
|
+
function _makeCompatibilityCheck(ownVersion) {
|
|
17227
|
+
const acceptedVersions = new Set([ownVersion]);
|
|
17228
|
+
const rejectedVersions = new Set;
|
|
17229
|
+
const myVersionMatch = ownVersion.match(re);
|
|
17230
|
+
if (!myVersionMatch) {
|
|
17231
|
+
return () => false;
|
|
17232
|
+
}
|
|
17233
|
+
const ownVersionParsed = {
|
|
17234
|
+
major: +myVersionMatch[1],
|
|
17235
|
+
minor: +myVersionMatch[2],
|
|
17236
|
+
patch: +myVersionMatch[3],
|
|
17237
|
+
prerelease: myVersionMatch[4]
|
|
17238
|
+
};
|
|
17239
|
+
if (ownVersionParsed.prerelease != null) {
|
|
17240
|
+
return function isExactmatch(globalVersion) {
|
|
17241
|
+
return globalVersion === ownVersion;
|
|
17242
|
+
};
|
|
17243
|
+
}
|
|
17244
|
+
function _reject(v) {
|
|
17245
|
+
rejectedVersions.add(v);
|
|
17246
|
+
return false;
|
|
17247
|
+
}
|
|
17248
|
+
function _accept(v) {
|
|
17249
|
+
acceptedVersions.add(v);
|
|
17250
|
+
return true;
|
|
17251
|
+
}
|
|
17252
|
+
return function isCompatible(globalVersion) {
|
|
17253
|
+
if (acceptedVersions.has(globalVersion)) {
|
|
17254
|
+
return true;
|
|
17255
|
+
}
|
|
17256
|
+
if (rejectedVersions.has(globalVersion)) {
|
|
17257
|
+
return false;
|
|
17258
|
+
}
|
|
17259
|
+
const globalVersionMatch = globalVersion.match(re);
|
|
17260
|
+
if (!globalVersionMatch) {
|
|
17261
|
+
return _reject(globalVersion);
|
|
17262
|
+
}
|
|
17263
|
+
const globalVersionParsed = {
|
|
17264
|
+
major: +globalVersionMatch[1],
|
|
17265
|
+
minor: +globalVersionMatch[2],
|
|
17266
|
+
patch: +globalVersionMatch[3],
|
|
17267
|
+
prerelease: globalVersionMatch[4]
|
|
17268
|
+
};
|
|
17269
|
+
if (globalVersionParsed.prerelease != null) {
|
|
17270
|
+
return _reject(globalVersion);
|
|
17271
|
+
}
|
|
17272
|
+
if (ownVersionParsed.major !== globalVersionParsed.major) {
|
|
17273
|
+
return _reject(globalVersion);
|
|
17274
|
+
}
|
|
17275
|
+
if (ownVersionParsed.major === 0) {
|
|
17276
|
+
if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
|
|
17277
|
+
return _accept(globalVersion);
|
|
17278
|
+
}
|
|
17279
|
+
return _reject(globalVersion);
|
|
17280
|
+
}
|
|
17281
|
+
if (ownVersionParsed.minor <= globalVersionParsed.minor) {
|
|
17282
|
+
return _accept(globalVersion);
|
|
17283
|
+
}
|
|
17284
|
+
return _reject(globalVersion);
|
|
17285
|
+
};
|
|
17286
|
+
}
|
|
17287
|
+
exports._makeCompatibilityCheck = _makeCompatibilityCheck;
|
|
17288
|
+
exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
|
|
17289
|
+
});
|
|
17290
|
+
|
|
17291
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
|
|
17292
|
+
var require_global_utils = __commonJS((exports) => {
|
|
17293
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17294
|
+
exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
|
|
17295
|
+
var version_1 = require_version();
|
|
17296
|
+
var semver_1 = require_semver();
|
|
17297
|
+
var major = version_1.VERSION.split(".")[0];
|
|
17298
|
+
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
|
|
17299
|
+
var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
17300
|
+
function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
17301
|
+
var _a3;
|
|
17302
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
|
|
17303
|
+
version: version_1.VERSION
|
|
17304
|
+
};
|
|
17305
|
+
if (!allowOverride && api2[type]) {
|
|
17306
|
+
const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
|
|
17307
|
+
diag.error(err.stack || err.message);
|
|
17308
|
+
return false;
|
|
17309
|
+
}
|
|
17310
|
+
if (api2.version !== version_1.VERSION) {
|
|
17311
|
+
const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
|
|
17312
|
+
diag.error(err.stack || err.message);
|
|
17313
|
+
return false;
|
|
17314
|
+
}
|
|
17315
|
+
api2[type] = instance;
|
|
17316
|
+
diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
|
|
17317
|
+
return true;
|
|
17318
|
+
}
|
|
17319
|
+
exports.registerGlobal = registerGlobal;
|
|
17320
|
+
function getGlobal(type) {
|
|
17321
|
+
var _a3, _b;
|
|
17322
|
+
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
|
|
17323
|
+
if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
|
|
17324
|
+
return;
|
|
17325
|
+
}
|
|
17326
|
+
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
|
|
17327
|
+
}
|
|
17328
|
+
exports.getGlobal = getGlobal;
|
|
17329
|
+
function unregisterGlobal(type, diag) {
|
|
17330
|
+
diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
|
|
17331
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
17332
|
+
if (api2) {
|
|
17333
|
+
delete api2[type];
|
|
17334
|
+
}
|
|
17335
|
+
}
|
|
17336
|
+
exports.unregisterGlobal = unregisterGlobal;
|
|
17337
|
+
});
|
|
17338
|
+
|
|
17339
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
|
|
17340
|
+
var require_ComponentLogger = __commonJS((exports) => {
|
|
17341
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17342
|
+
exports.DiagComponentLogger = undefined;
|
|
17343
|
+
var global_utils_1 = require_global_utils();
|
|
17344
|
+
|
|
17345
|
+
class DiagComponentLogger {
|
|
17346
|
+
constructor(props) {
|
|
17347
|
+
this._namespace = props.namespace || "DiagComponentLogger";
|
|
17348
|
+
}
|
|
17349
|
+
debug(...args) {
|
|
17350
|
+
return logProxy("debug", this._namespace, args);
|
|
17351
|
+
}
|
|
17352
|
+
error(...args) {
|
|
17353
|
+
return logProxy("error", this._namespace, args);
|
|
17354
|
+
}
|
|
17355
|
+
info(...args) {
|
|
17356
|
+
return logProxy("info", this._namespace, args);
|
|
17357
|
+
}
|
|
17358
|
+
warn(...args) {
|
|
17359
|
+
return logProxy("warn", this._namespace, args);
|
|
17360
|
+
}
|
|
17361
|
+
verbose(...args) {
|
|
17362
|
+
return logProxy("verbose", this._namespace, args);
|
|
17363
|
+
}
|
|
17364
|
+
}
|
|
17365
|
+
exports.DiagComponentLogger = DiagComponentLogger;
|
|
17366
|
+
function logProxy(funcName, namespace, args) {
|
|
17367
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17368
|
+
if (!logger) {
|
|
17369
|
+
return;
|
|
17370
|
+
}
|
|
17371
|
+
return logger[funcName](namespace, ...args);
|
|
17372
|
+
}
|
|
17373
|
+
});
|
|
17374
|
+
|
|
17375
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/types.js
|
|
17376
|
+
var require_types = __commonJS((exports) => {
|
|
17377
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17378
|
+
exports.DiagLogLevel = undefined;
|
|
17379
|
+
var DiagLogLevel;
|
|
17380
|
+
(function(DiagLogLevel2) {
|
|
17381
|
+
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
17382
|
+
DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
|
|
17383
|
+
DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
|
|
17384
|
+
DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
|
|
17385
|
+
DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
|
|
17386
|
+
DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
|
|
17387
|
+
DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
|
|
17388
|
+
})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
|
|
17389
|
+
});
|
|
17390
|
+
|
|
17391
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
|
|
17392
|
+
var require_logLevelLogger = __commonJS((exports) => {
|
|
17393
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17394
|
+
exports.createLogLevelDiagLogger = undefined;
|
|
17395
|
+
var types_1 = require_types();
|
|
17396
|
+
function createLogLevelDiagLogger(maxLevel, logger) {
|
|
17397
|
+
if (maxLevel < types_1.DiagLogLevel.NONE) {
|
|
17398
|
+
maxLevel = types_1.DiagLogLevel.NONE;
|
|
17399
|
+
} else if (maxLevel > types_1.DiagLogLevel.ALL) {
|
|
17400
|
+
maxLevel = types_1.DiagLogLevel.ALL;
|
|
17401
|
+
}
|
|
17402
|
+
logger = logger || {};
|
|
17403
|
+
function _filterFunc(funcName, theLevel) {
|
|
17404
|
+
const theFunc = logger[funcName];
|
|
17405
|
+
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
17406
|
+
return theFunc.bind(logger);
|
|
17407
|
+
}
|
|
17408
|
+
return function() {};
|
|
17409
|
+
}
|
|
17410
|
+
return {
|
|
17411
|
+
error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
|
|
17412
|
+
warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
|
|
17413
|
+
info: _filterFunc("info", types_1.DiagLogLevel.INFO),
|
|
17414
|
+
debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
|
|
17415
|
+
verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
|
|
17416
|
+
};
|
|
17417
|
+
}
|
|
17418
|
+
exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
|
|
17419
|
+
});
|
|
17420
|
+
|
|
17421
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/diag.js
|
|
17422
|
+
var require_diag = __commonJS((exports) => {
|
|
17423
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17424
|
+
exports.DiagAPI = undefined;
|
|
17425
|
+
var ComponentLogger_1 = require_ComponentLogger();
|
|
17426
|
+
var logLevelLogger_1 = require_logLevelLogger();
|
|
17427
|
+
var types_1 = require_types();
|
|
17428
|
+
var global_utils_1 = require_global_utils();
|
|
17429
|
+
var API_NAME = "diag";
|
|
17430
|
+
|
|
17431
|
+
class DiagAPI {
|
|
17432
|
+
static instance() {
|
|
17433
|
+
if (!this._instance) {
|
|
17434
|
+
this._instance = new DiagAPI;
|
|
17435
|
+
}
|
|
17436
|
+
return this._instance;
|
|
17437
|
+
}
|
|
17438
|
+
constructor() {
|
|
17439
|
+
function _logProxy(funcName) {
|
|
17440
|
+
return function(...args) {
|
|
17441
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17442
|
+
if (!logger)
|
|
17443
|
+
return;
|
|
17444
|
+
return logger[funcName](...args);
|
|
17445
|
+
};
|
|
17446
|
+
}
|
|
17447
|
+
const self2 = this;
|
|
17448
|
+
const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
|
|
17449
|
+
var _a3, _b, _c;
|
|
17450
|
+
if (logger === self2) {
|
|
17451
|
+
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
17452
|
+
self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
|
|
17453
|
+
return false;
|
|
17454
|
+
}
|
|
17455
|
+
if (typeof optionsOrLogLevel === "number") {
|
|
17456
|
+
optionsOrLogLevel = {
|
|
17457
|
+
logLevel: optionsOrLogLevel
|
|
17458
|
+
};
|
|
17459
|
+
}
|
|
17460
|
+
const oldLogger = (0, global_utils_1.getGlobal)("diag");
|
|
17461
|
+
const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
|
|
17462
|
+
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
17463
|
+
const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
|
|
17464
|
+
oldLogger.warn(`Current logger will be overwritten from ${stack}`);
|
|
17465
|
+
newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
|
|
17466
|
+
}
|
|
17467
|
+
return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
|
|
17468
|
+
};
|
|
17469
|
+
self2.setLogger = setLogger;
|
|
17470
|
+
self2.disable = () => {
|
|
17471
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, self2);
|
|
17472
|
+
};
|
|
17473
|
+
self2.createComponentLogger = (options) => {
|
|
17474
|
+
return new ComponentLogger_1.DiagComponentLogger(options);
|
|
17475
|
+
};
|
|
17476
|
+
self2.verbose = _logProxy("verbose");
|
|
17477
|
+
self2.debug = _logProxy("debug");
|
|
17478
|
+
self2.info = _logProxy("info");
|
|
17479
|
+
self2.warn = _logProxy("warn");
|
|
17480
|
+
self2.error = _logProxy("error");
|
|
17481
|
+
}
|
|
17482
|
+
}
|
|
17483
|
+
exports.DiagAPI = DiagAPI;
|
|
17484
|
+
});
|
|
17485
|
+
|
|
17486
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
|
|
17487
|
+
var require_baggage_impl = __commonJS((exports) => {
|
|
17488
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17489
|
+
exports.BaggageImpl = undefined;
|
|
17490
|
+
|
|
17491
|
+
class BaggageImpl {
|
|
17492
|
+
constructor(entries) {
|
|
17493
|
+
this._entries = entries ? new Map(entries) : new Map;
|
|
17494
|
+
}
|
|
17495
|
+
getEntry(key) {
|
|
17496
|
+
const entry = this._entries.get(key);
|
|
17497
|
+
if (!entry) {
|
|
17498
|
+
return;
|
|
17499
|
+
}
|
|
17500
|
+
return Object.assign({}, entry);
|
|
17501
|
+
}
|
|
17502
|
+
getAllEntries() {
|
|
17503
|
+
return Array.from(this._entries.entries());
|
|
17504
|
+
}
|
|
17505
|
+
setEntry(key, entry) {
|
|
17506
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17507
|
+
newBaggage._entries.set(key, entry);
|
|
17508
|
+
return newBaggage;
|
|
17509
|
+
}
|
|
17510
|
+
removeEntry(key) {
|
|
17511
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17512
|
+
newBaggage._entries.delete(key);
|
|
17513
|
+
return newBaggage;
|
|
17514
|
+
}
|
|
17515
|
+
removeEntries(...keys) {
|
|
17516
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17517
|
+
for (const key of keys) {
|
|
17518
|
+
newBaggage._entries.delete(key);
|
|
17519
|
+
}
|
|
17520
|
+
return newBaggage;
|
|
17521
|
+
}
|
|
17522
|
+
clear() {
|
|
17523
|
+
return new BaggageImpl;
|
|
17524
|
+
}
|
|
17525
|
+
}
|
|
17526
|
+
exports.BaggageImpl = BaggageImpl;
|
|
17527
|
+
});
|
|
17528
|
+
|
|
17529
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
|
|
17530
|
+
var require_symbol = __commonJS((exports) => {
|
|
17531
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17532
|
+
exports.baggageEntryMetadataSymbol = undefined;
|
|
17533
|
+
exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
|
|
17534
|
+
});
|
|
17535
|
+
|
|
17536
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
|
|
17537
|
+
var require_utils = __commonJS((exports) => {
|
|
17538
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17539
|
+
exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
|
|
17540
|
+
var diag_1 = require_diag();
|
|
17541
|
+
var baggage_impl_1 = require_baggage_impl();
|
|
17542
|
+
var symbol_1 = require_symbol();
|
|
17543
|
+
var diag = diag_1.DiagAPI.instance();
|
|
17544
|
+
function createBaggage(entries = {}) {
|
|
17545
|
+
return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
|
|
17546
|
+
}
|
|
17547
|
+
exports.createBaggage = createBaggage;
|
|
17548
|
+
function baggageEntryMetadataFromString(str) {
|
|
17549
|
+
if (typeof str !== "string") {
|
|
17550
|
+
diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
|
|
17551
|
+
str = "";
|
|
17552
|
+
}
|
|
17553
|
+
return {
|
|
17554
|
+
__TYPE__: symbol_1.baggageEntryMetadataSymbol,
|
|
17555
|
+
toString() {
|
|
17556
|
+
return str;
|
|
17557
|
+
}
|
|
17558
|
+
};
|
|
17559
|
+
}
|
|
17560
|
+
exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
|
|
17561
|
+
});
|
|
17562
|
+
|
|
17563
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/context.js
|
|
17564
|
+
var require_context = __commonJS((exports) => {
|
|
17565
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17566
|
+
exports.ROOT_CONTEXT = exports.createContextKey = undefined;
|
|
17567
|
+
function createContextKey(description) {
|
|
17568
|
+
return Symbol.for(description);
|
|
17569
|
+
}
|
|
17570
|
+
exports.createContextKey = createContextKey;
|
|
17571
|
+
|
|
17572
|
+
class BaseContext {
|
|
17573
|
+
constructor(parentContext) {
|
|
17574
|
+
const self2 = this;
|
|
17575
|
+
self2._currentContext = parentContext ? new Map(parentContext) : new Map;
|
|
17576
|
+
self2.getValue = (key) => self2._currentContext.get(key);
|
|
17577
|
+
self2.setValue = (key, value) => {
|
|
17578
|
+
const context = new BaseContext(self2._currentContext);
|
|
17579
|
+
context._currentContext.set(key, value);
|
|
17580
|
+
return context;
|
|
17581
|
+
};
|
|
17582
|
+
self2.deleteValue = (key) => {
|
|
17583
|
+
const context = new BaseContext(self2._currentContext);
|
|
17584
|
+
context._currentContext.delete(key);
|
|
17585
|
+
return context;
|
|
17586
|
+
};
|
|
17587
|
+
}
|
|
17588
|
+
}
|
|
17589
|
+
exports.ROOT_CONTEXT = new BaseContext;
|
|
17590
|
+
});
|
|
17591
|
+
|
|
17592
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
|
|
17593
|
+
var require_consoleLogger = __commonJS((exports) => {
|
|
17594
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17595
|
+
exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
|
|
17596
|
+
var consoleMap = [
|
|
17597
|
+
{ n: "error", c: "error" },
|
|
17598
|
+
{ n: "warn", c: "warn" },
|
|
17599
|
+
{ n: "info", c: "info" },
|
|
17600
|
+
{ n: "debug", c: "debug" },
|
|
17601
|
+
{ n: "verbose", c: "trace" }
|
|
17602
|
+
];
|
|
17603
|
+
exports._originalConsoleMethods = {};
|
|
17604
|
+
if (typeof console !== "undefined") {
|
|
17605
|
+
const keys = [
|
|
17606
|
+
"error",
|
|
17607
|
+
"warn",
|
|
17608
|
+
"info",
|
|
17609
|
+
"debug",
|
|
17610
|
+
"trace",
|
|
17611
|
+
"log"
|
|
17612
|
+
];
|
|
17613
|
+
for (const key of keys) {
|
|
17614
|
+
if (typeof console[key] === "function") {
|
|
17615
|
+
exports._originalConsoleMethods[key] = console[key];
|
|
17616
|
+
}
|
|
17617
|
+
}
|
|
17618
|
+
}
|
|
17619
|
+
|
|
17620
|
+
class DiagConsoleLogger {
|
|
17621
|
+
constructor() {
|
|
17622
|
+
function _consoleFunc(funcName) {
|
|
17623
|
+
return function(...args) {
|
|
17624
|
+
let theFunc = exports._originalConsoleMethods[funcName];
|
|
17625
|
+
if (typeof theFunc !== "function") {
|
|
17626
|
+
theFunc = exports._originalConsoleMethods["log"];
|
|
17627
|
+
}
|
|
17628
|
+
if (typeof theFunc !== "function" && console) {
|
|
17629
|
+
theFunc = console[funcName];
|
|
17630
|
+
if (typeof theFunc !== "function") {
|
|
17631
|
+
theFunc = console.log;
|
|
17632
|
+
}
|
|
17633
|
+
}
|
|
17634
|
+
if (typeof theFunc === "function") {
|
|
17635
|
+
return theFunc.apply(console, args);
|
|
17636
|
+
}
|
|
17637
|
+
};
|
|
17638
|
+
}
|
|
17639
|
+
for (let i = 0;i < consoleMap.length; i++) {
|
|
17640
|
+
this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
|
|
17641
|
+
}
|
|
17642
|
+
}
|
|
17643
|
+
}
|
|
17644
|
+
exports.DiagConsoleLogger = DiagConsoleLogger;
|
|
17645
|
+
});
|
|
17646
|
+
|
|
17647
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
|
|
17648
|
+
var require_NoopMeter = __commonJS((exports) => {
|
|
17649
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17650
|
+
exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_GAUGE_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopGaugeMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = undefined;
|
|
17651
|
+
|
|
17652
|
+
class NoopMeter {
|
|
17653
|
+
constructor() {}
|
|
17654
|
+
createGauge(_name, _options) {
|
|
17655
|
+
return exports.NOOP_GAUGE_METRIC;
|
|
17656
|
+
}
|
|
17657
|
+
createHistogram(_name, _options) {
|
|
17658
|
+
return exports.NOOP_HISTOGRAM_METRIC;
|
|
17659
|
+
}
|
|
17660
|
+
createCounter(_name, _options) {
|
|
17661
|
+
return exports.NOOP_COUNTER_METRIC;
|
|
17662
|
+
}
|
|
17663
|
+
createUpDownCounter(_name, _options) {
|
|
17664
|
+
return exports.NOOP_UP_DOWN_COUNTER_METRIC;
|
|
17665
|
+
}
|
|
17666
|
+
createObservableGauge(_name, _options) {
|
|
17667
|
+
return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
|
|
17668
|
+
}
|
|
17669
|
+
createObservableCounter(_name, _options) {
|
|
17670
|
+
return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
|
|
17671
|
+
}
|
|
17672
|
+
createObservableUpDownCounter(_name, _options) {
|
|
17673
|
+
return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
17674
|
+
}
|
|
17675
|
+
addBatchObservableCallback(_callback, _observables) {}
|
|
17676
|
+
removeBatchObservableCallback(_callback) {}
|
|
17677
|
+
}
|
|
17678
|
+
exports.NoopMeter = NoopMeter;
|
|
17679
|
+
|
|
17680
|
+
class NoopMetric {
|
|
17681
|
+
}
|
|
17682
|
+
exports.NoopMetric = NoopMetric;
|
|
17683
|
+
|
|
17684
|
+
class NoopCounterMetric extends NoopMetric {
|
|
17685
|
+
add(_value, _attributes) {}
|
|
17686
|
+
}
|
|
17687
|
+
exports.NoopCounterMetric = NoopCounterMetric;
|
|
17688
|
+
|
|
17689
|
+
class NoopUpDownCounterMetric extends NoopMetric {
|
|
17690
|
+
add(_value, _attributes) {}
|
|
17691
|
+
}
|
|
17692
|
+
exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
|
|
17693
|
+
|
|
17694
|
+
class NoopGaugeMetric extends NoopMetric {
|
|
17695
|
+
record(_value, _attributes) {}
|
|
17696
|
+
}
|
|
17697
|
+
exports.NoopGaugeMetric = NoopGaugeMetric;
|
|
17698
|
+
|
|
17699
|
+
class NoopHistogramMetric extends NoopMetric {
|
|
17700
|
+
record(_value, _attributes) {}
|
|
17701
|
+
}
|
|
17702
|
+
exports.NoopHistogramMetric = NoopHistogramMetric;
|
|
17703
|
+
|
|
17704
|
+
class NoopObservableMetric {
|
|
17705
|
+
addCallback(_callback) {}
|
|
17706
|
+
removeCallback(_callback) {}
|
|
17707
|
+
}
|
|
17708
|
+
exports.NoopObservableMetric = NoopObservableMetric;
|
|
17709
|
+
|
|
17710
|
+
class NoopObservableCounterMetric extends NoopObservableMetric {
|
|
17711
|
+
}
|
|
17712
|
+
exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
|
|
17713
|
+
|
|
17714
|
+
class NoopObservableGaugeMetric extends NoopObservableMetric {
|
|
17715
|
+
}
|
|
17716
|
+
exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
|
|
17717
|
+
|
|
17718
|
+
class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
|
|
17719
|
+
}
|
|
17720
|
+
exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
|
|
17721
|
+
exports.NOOP_METER = new NoopMeter;
|
|
17722
|
+
exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
|
|
17723
|
+
exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
|
|
17724
|
+
exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
|
|
17725
|
+
exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
|
|
17726
|
+
exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
|
|
17727
|
+
exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
|
|
17728
|
+
exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
|
|
17729
|
+
function createNoopMeter() {
|
|
17730
|
+
return exports.NOOP_METER;
|
|
17731
|
+
}
|
|
17732
|
+
exports.createNoopMeter = createNoopMeter;
|
|
17733
|
+
});
|
|
17734
|
+
|
|
17735
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
|
|
17736
|
+
var require_Metric = __commonJS((exports) => {
|
|
17737
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17738
|
+
exports.ValueType = undefined;
|
|
17739
|
+
var ValueType;
|
|
17740
|
+
(function(ValueType2) {
|
|
17741
|
+
ValueType2[ValueType2["INT"] = 0] = "INT";
|
|
17742
|
+
ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
|
|
17743
|
+
})(ValueType = exports.ValueType || (exports.ValueType = {}));
|
|
17744
|
+
});
|
|
17745
|
+
|
|
17746
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
|
|
17747
|
+
var require_TextMapPropagator = __commonJS((exports) => {
|
|
17748
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17749
|
+
exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
|
|
17750
|
+
exports.defaultTextMapGetter = {
|
|
17751
|
+
get(carrier, key) {
|
|
17752
|
+
if (carrier == null) {
|
|
17753
|
+
return;
|
|
17754
|
+
}
|
|
17755
|
+
return carrier[key];
|
|
17756
|
+
},
|
|
17757
|
+
keys(carrier) {
|
|
17758
|
+
if (carrier == null) {
|
|
17759
|
+
return [];
|
|
17760
|
+
}
|
|
17761
|
+
return Object.keys(carrier);
|
|
17762
|
+
}
|
|
17763
|
+
};
|
|
17764
|
+
exports.defaultTextMapSetter = {
|
|
17765
|
+
set(carrier, key, value) {
|
|
17766
|
+
if (carrier == null) {
|
|
17767
|
+
return;
|
|
17768
|
+
}
|
|
17769
|
+
carrier[key] = value;
|
|
17770
|
+
}
|
|
17771
|
+
};
|
|
17772
|
+
});
|
|
17773
|
+
|
|
17774
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
|
|
17775
|
+
var require_NoopContextManager = __commonJS((exports) => {
|
|
17776
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17777
|
+
exports.NoopContextManager = undefined;
|
|
17778
|
+
var context_1 = require_context();
|
|
17779
|
+
|
|
17780
|
+
class NoopContextManager {
|
|
17781
|
+
active() {
|
|
17782
|
+
return context_1.ROOT_CONTEXT;
|
|
17783
|
+
}
|
|
17784
|
+
with(_context, fn, thisArg, ...args) {
|
|
17785
|
+
return fn.call(thisArg, ...args);
|
|
17786
|
+
}
|
|
17787
|
+
bind(_context, target) {
|
|
17788
|
+
return target;
|
|
17789
|
+
}
|
|
17790
|
+
enable() {
|
|
17791
|
+
return this;
|
|
17792
|
+
}
|
|
17793
|
+
disable() {
|
|
17794
|
+
return this;
|
|
17795
|
+
}
|
|
17796
|
+
}
|
|
17797
|
+
exports.NoopContextManager = NoopContextManager;
|
|
17798
|
+
});
|
|
17799
|
+
|
|
17800
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/context.js
|
|
17801
|
+
var require_context2 = __commonJS((exports) => {
|
|
17802
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17803
|
+
exports.ContextAPI = undefined;
|
|
17804
|
+
var NoopContextManager_1 = require_NoopContextManager();
|
|
17805
|
+
var global_utils_1 = require_global_utils();
|
|
17806
|
+
var diag_1 = require_diag();
|
|
17807
|
+
var API_NAME = "context";
|
|
17808
|
+
var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
|
|
17809
|
+
|
|
17810
|
+
class ContextAPI {
|
|
17811
|
+
constructor() {}
|
|
17812
|
+
static getInstance() {
|
|
17813
|
+
if (!this._instance) {
|
|
17814
|
+
this._instance = new ContextAPI;
|
|
17815
|
+
}
|
|
17816
|
+
return this._instance;
|
|
17817
|
+
}
|
|
17818
|
+
setGlobalContextManager(contextManager) {
|
|
17819
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
|
|
17820
|
+
}
|
|
17821
|
+
active() {
|
|
17822
|
+
return this._getContextManager().active();
|
|
17823
|
+
}
|
|
17824
|
+
with(context, fn, thisArg, ...args) {
|
|
17825
|
+
return this._getContextManager().with(context, fn, thisArg, ...args);
|
|
17826
|
+
}
|
|
17827
|
+
bind(context, target) {
|
|
17828
|
+
return this._getContextManager().bind(context, target);
|
|
17829
|
+
}
|
|
17830
|
+
_getContextManager() {
|
|
17831
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
|
|
17832
|
+
}
|
|
17833
|
+
disable() {
|
|
17834
|
+
this._getContextManager().disable();
|
|
17835
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
17836
|
+
}
|
|
17837
|
+
}
|
|
17838
|
+
exports.ContextAPI = ContextAPI;
|
|
17839
|
+
});
|
|
17840
|
+
|
|
17841
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
|
|
17842
|
+
var require_trace_flags = __commonJS((exports) => {
|
|
17843
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17844
|
+
exports.TraceFlags = undefined;
|
|
17845
|
+
var TraceFlags;
|
|
17846
|
+
(function(TraceFlags2) {
|
|
17847
|
+
TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
|
|
17848
|
+
TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
|
|
17849
|
+
})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
|
|
17850
|
+
});
|
|
17851
|
+
|
|
17852
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
|
|
17853
|
+
var require_invalid_span_constants = __commonJS((exports) => {
|
|
17854
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17855
|
+
exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
|
|
17856
|
+
var trace_flags_1 = require_trace_flags();
|
|
17857
|
+
exports.INVALID_SPANID = "0000000000000000";
|
|
17858
|
+
exports.INVALID_TRACEID = "00000000000000000000000000000000";
|
|
17859
|
+
exports.INVALID_SPAN_CONTEXT = {
|
|
17860
|
+
traceId: exports.INVALID_TRACEID,
|
|
17861
|
+
spanId: exports.INVALID_SPANID,
|
|
17862
|
+
traceFlags: trace_flags_1.TraceFlags.NONE
|
|
17863
|
+
};
|
|
17864
|
+
});
|
|
17865
|
+
|
|
17866
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
|
|
17867
|
+
var require_NonRecordingSpan = __commonJS((exports) => {
|
|
17868
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17869
|
+
exports.NonRecordingSpan = undefined;
|
|
17870
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
17871
|
+
|
|
17872
|
+
class NonRecordingSpan {
|
|
17873
|
+
constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
|
|
17874
|
+
this._spanContext = spanContext;
|
|
17875
|
+
}
|
|
17876
|
+
spanContext() {
|
|
17877
|
+
return this._spanContext;
|
|
17878
|
+
}
|
|
17879
|
+
setAttribute(_key, _value) {
|
|
17880
|
+
return this;
|
|
17881
|
+
}
|
|
17882
|
+
setAttributes(_attributes) {
|
|
17883
|
+
return this;
|
|
17884
|
+
}
|
|
17885
|
+
addEvent(_name, _attributes) {
|
|
17886
|
+
return this;
|
|
17887
|
+
}
|
|
17888
|
+
addLink(_link) {
|
|
17889
|
+
return this;
|
|
17890
|
+
}
|
|
17891
|
+
addLinks(_links) {
|
|
17892
|
+
return this;
|
|
17893
|
+
}
|
|
17894
|
+
setStatus(_status) {
|
|
17895
|
+
return this;
|
|
17896
|
+
}
|
|
17897
|
+
updateName(_name) {
|
|
17898
|
+
return this;
|
|
17899
|
+
}
|
|
17900
|
+
end(_endTime) {}
|
|
17901
|
+
isRecording() {
|
|
17902
|
+
return false;
|
|
17903
|
+
}
|
|
17904
|
+
recordException(_exception, _time) {}
|
|
17905
|
+
}
|
|
17906
|
+
exports.NonRecordingSpan = NonRecordingSpan;
|
|
17907
|
+
});
|
|
17908
|
+
|
|
17909
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
|
|
17910
|
+
var require_context_utils = __commonJS((exports) => {
|
|
17911
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17912
|
+
exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
|
|
17913
|
+
var context_1 = require_context();
|
|
17914
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
17915
|
+
var context_2 = require_context2();
|
|
17916
|
+
var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
|
|
17917
|
+
function getSpan(context) {
|
|
17918
|
+
return context.getValue(SPAN_KEY) || undefined;
|
|
17919
|
+
}
|
|
17920
|
+
exports.getSpan = getSpan;
|
|
17921
|
+
function getActiveSpan() {
|
|
17922
|
+
return getSpan(context_2.ContextAPI.getInstance().active());
|
|
17923
|
+
}
|
|
17924
|
+
exports.getActiveSpan = getActiveSpan;
|
|
17925
|
+
function setSpan(context, span) {
|
|
17926
|
+
return context.setValue(SPAN_KEY, span);
|
|
17927
|
+
}
|
|
17928
|
+
exports.setSpan = setSpan;
|
|
17929
|
+
function deleteSpan(context) {
|
|
17930
|
+
return context.deleteValue(SPAN_KEY);
|
|
17931
|
+
}
|
|
17932
|
+
exports.deleteSpan = deleteSpan;
|
|
17933
|
+
function setSpanContext(context, spanContext) {
|
|
17934
|
+
return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
|
|
17935
|
+
}
|
|
17936
|
+
exports.setSpanContext = setSpanContext;
|
|
17937
|
+
function getSpanContext(context) {
|
|
17938
|
+
var _a3;
|
|
17939
|
+
return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
|
|
17940
|
+
}
|
|
17941
|
+
exports.getSpanContext = getSpanContext;
|
|
17942
|
+
});
|
|
17943
|
+
|
|
17944
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
|
|
17945
|
+
var require_spancontext_utils = __commonJS((exports) => {
|
|
17946
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17947
|
+
exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
|
|
17948
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
17949
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
17950
|
+
var isHex = new Uint8Array([
|
|
17951
|
+
0,
|
|
17952
|
+
0,
|
|
17953
|
+
0,
|
|
17954
|
+
0,
|
|
17955
|
+
0,
|
|
17956
|
+
0,
|
|
17957
|
+
0,
|
|
17958
|
+
0,
|
|
17959
|
+
0,
|
|
17960
|
+
0,
|
|
17961
|
+
0,
|
|
17962
|
+
0,
|
|
17963
|
+
0,
|
|
17964
|
+
0,
|
|
17965
|
+
0,
|
|
17966
|
+
0,
|
|
17967
|
+
0,
|
|
17968
|
+
0,
|
|
17969
|
+
0,
|
|
17970
|
+
0,
|
|
17971
|
+
0,
|
|
17972
|
+
0,
|
|
17973
|
+
0,
|
|
17974
|
+
0,
|
|
17975
|
+
0,
|
|
17976
|
+
0,
|
|
17977
|
+
0,
|
|
17978
|
+
0,
|
|
17979
|
+
0,
|
|
17980
|
+
0,
|
|
17981
|
+
0,
|
|
17982
|
+
0,
|
|
17983
|
+
0,
|
|
17984
|
+
0,
|
|
17985
|
+
0,
|
|
17986
|
+
0,
|
|
17987
|
+
0,
|
|
17988
|
+
0,
|
|
17989
|
+
0,
|
|
17990
|
+
0,
|
|
17991
|
+
0,
|
|
17992
|
+
0,
|
|
17993
|
+
0,
|
|
17994
|
+
0,
|
|
17995
|
+
0,
|
|
17996
|
+
0,
|
|
17997
|
+
0,
|
|
17998
|
+
0,
|
|
17999
|
+
1,
|
|
18000
|
+
1,
|
|
18001
|
+
1,
|
|
18002
|
+
1,
|
|
18003
|
+
1,
|
|
18004
|
+
1,
|
|
18005
|
+
1,
|
|
18006
|
+
1,
|
|
18007
|
+
1,
|
|
18008
|
+
1,
|
|
18009
|
+
0,
|
|
18010
|
+
0,
|
|
18011
|
+
0,
|
|
18012
|
+
0,
|
|
18013
|
+
0,
|
|
18014
|
+
0,
|
|
18015
|
+
0,
|
|
18016
|
+
1,
|
|
18017
|
+
1,
|
|
18018
|
+
1,
|
|
18019
|
+
1,
|
|
18020
|
+
1,
|
|
18021
|
+
1,
|
|
18022
|
+
0,
|
|
18023
|
+
0,
|
|
18024
|
+
0,
|
|
18025
|
+
0,
|
|
18026
|
+
0,
|
|
18027
|
+
0,
|
|
18028
|
+
0,
|
|
18029
|
+
0,
|
|
18030
|
+
0,
|
|
18031
|
+
0,
|
|
18032
|
+
0,
|
|
18033
|
+
0,
|
|
18034
|
+
0,
|
|
18035
|
+
0,
|
|
18036
|
+
0,
|
|
18037
|
+
0,
|
|
18038
|
+
0,
|
|
18039
|
+
0,
|
|
18040
|
+
0,
|
|
18041
|
+
0,
|
|
18042
|
+
0,
|
|
18043
|
+
0,
|
|
18044
|
+
0,
|
|
18045
|
+
0,
|
|
18046
|
+
0,
|
|
18047
|
+
0,
|
|
18048
|
+
1,
|
|
18049
|
+
1,
|
|
18050
|
+
1,
|
|
18051
|
+
1,
|
|
18052
|
+
1,
|
|
18053
|
+
1
|
|
18054
|
+
]);
|
|
18055
|
+
function isValidHex(id, length) {
|
|
18056
|
+
if (typeof id !== "string" || id.length !== length)
|
|
18057
|
+
return false;
|
|
18058
|
+
let r = 0;
|
|
18059
|
+
for (let i = 0;i < id.length; i += 4) {
|
|
18060
|
+
r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
18061
|
+
}
|
|
18062
|
+
return r === length;
|
|
18063
|
+
}
|
|
18064
|
+
function isValidTraceId(traceId) {
|
|
18065
|
+
return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
|
|
18066
|
+
}
|
|
18067
|
+
exports.isValidTraceId = isValidTraceId;
|
|
18068
|
+
function isValidSpanId(spanId) {
|
|
18069
|
+
return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
|
|
18070
|
+
}
|
|
18071
|
+
exports.isValidSpanId = isValidSpanId;
|
|
18072
|
+
function isSpanContextValid(spanContext) {
|
|
18073
|
+
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
18074
|
+
}
|
|
18075
|
+
exports.isSpanContextValid = isSpanContextValid;
|
|
18076
|
+
function wrapSpanContext(spanContext) {
|
|
18077
|
+
return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
|
|
18078
|
+
}
|
|
18079
|
+
exports.wrapSpanContext = wrapSpanContext;
|
|
18080
|
+
});
|
|
18081
|
+
|
|
18082
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
|
|
18083
|
+
var require_NoopTracer = __commonJS((exports) => {
|
|
18084
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18085
|
+
exports.NoopTracer = undefined;
|
|
18086
|
+
var context_1 = require_context2();
|
|
18087
|
+
var context_utils_1 = require_context_utils();
|
|
18088
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18089
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18090
|
+
var contextApi = context_1.ContextAPI.getInstance();
|
|
18091
|
+
|
|
18092
|
+
class NoopTracer {
|
|
18093
|
+
startSpan(name, options, context = contextApi.active()) {
|
|
18094
|
+
const root = Boolean(options === null || options === undefined ? undefined : options.root);
|
|
18095
|
+
if (root) {
|
|
18096
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18097
|
+
}
|
|
18098
|
+
const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
|
|
18099
|
+
if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
|
|
18100
|
+
return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
|
|
18101
|
+
} else {
|
|
18102
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18103
|
+
}
|
|
18104
|
+
}
|
|
18105
|
+
startActiveSpan(name, arg2, arg3, arg4) {
|
|
18106
|
+
let opts;
|
|
18107
|
+
let ctx;
|
|
18108
|
+
let fn;
|
|
18109
|
+
if (arguments.length < 2) {
|
|
18110
|
+
return;
|
|
18111
|
+
} else if (arguments.length === 2) {
|
|
18112
|
+
fn = arg2;
|
|
18113
|
+
} else if (arguments.length === 3) {
|
|
18114
|
+
opts = arg2;
|
|
18115
|
+
fn = arg3;
|
|
18116
|
+
} else {
|
|
18117
|
+
opts = arg2;
|
|
18118
|
+
ctx = arg3;
|
|
18119
|
+
fn = arg4;
|
|
18120
|
+
}
|
|
18121
|
+
const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
|
|
18122
|
+
const span = this.startSpan(name, opts, parentContext);
|
|
18123
|
+
const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
|
|
18124
|
+
return contextApi.with(contextWithSpanSet, fn, undefined, span);
|
|
18125
|
+
}
|
|
18126
|
+
}
|
|
18127
|
+
exports.NoopTracer = NoopTracer;
|
|
18128
|
+
function isSpanContext(spanContext) {
|
|
18129
|
+
return spanContext !== null && typeof spanContext === "object" && "spanId" in spanContext && typeof spanContext["spanId"] === "string" && "traceId" in spanContext && typeof spanContext["traceId"] === "string" && "traceFlags" in spanContext && typeof spanContext["traceFlags"] === "number";
|
|
18130
|
+
}
|
|
18131
|
+
});
|
|
18132
|
+
|
|
18133
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
|
|
18134
|
+
var require_ProxyTracer = __commonJS((exports) => {
|
|
18135
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18136
|
+
exports.ProxyTracer = undefined;
|
|
18137
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18138
|
+
var NOOP_TRACER = new NoopTracer_1.NoopTracer;
|
|
18139
|
+
|
|
18140
|
+
class ProxyTracer {
|
|
18141
|
+
constructor(provider, name, version2, options) {
|
|
18142
|
+
this._provider = provider;
|
|
18143
|
+
this.name = name;
|
|
18144
|
+
this.version = version2;
|
|
18145
|
+
this.options = options;
|
|
18146
|
+
}
|
|
18147
|
+
startSpan(name, options, context) {
|
|
18148
|
+
return this._getTracer().startSpan(name, options, context);
|
|
18149
|
+
}
|
|
18150
|
+
startActiveSpan(_name, _options, _context, _fn) {
|
|
18151
|
+
const tracer = this._getTracer();
|
|
18152
|
+
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
18153
|
+
}
|
|
18154
|
+
_getTracer() {
|
|
18155
|
+
if (this._delegate) {
|
|
18156
|
+
return this._delegate;
|
|
18157
|
+
}
|
|
18158
|
+
const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
18159
|
+
if (!tracer) {
|
|
18160
|
+
return NOOP_TRACER;
|
|
18161
|
+
}
|
|
18162
|
+
this._delegate = tracer;
|
|
18163
|
+
return this._delegate;
|
|
18164
|
+
}
|
|
18165
|
+
}
|
|
18166
|
+
exports.ProxyTracer = ProxyTracer;
|
|
18167
|
+
});
|
|
18168
|
+
|
|
18169
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
|
|
18170
|
+
var require_NoopTracerProvider = __commonJS((exports) => {
|
|
18171
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18172
|
+
exports.NoopTracerProvider = undefined;
|
|
18173
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18174
|
+
|
|
18175
|
+
class NoopTracerProvider {
|
|
18176
|
+
getTracer(_name, _version, _options) {
|
|
18177
|
+
return new NoopTracer_1.NoopTracer;
|
|
18178
|
+
}
|
|
18179
|
+
}
|
|
18180
|
+
exports.NoopTracerProvider = NoopTracerProvider;
|
|
18181
|
+
});
|
|
18182
|
+
|
|
18183
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
|
|
18184
|
+
var require_ProxyTracerProvider = __commonJS((exports) => {
|
|
18185
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18186
|
+
exports.ProxyTracerProvider = undefined;
|
|
18187
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
18188
|
+
var NoopTracerProvider_1 = require_NoopTracerProvider();
|
|
18189
|
+
var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
|
|
18190
|
+
|
|
18191
|
+
class ProxyTracerProvider {
|
|
18192
|
+
getTracer(name, version2, options) {
|
|
18193
|
+
var _a3;
|
|
18194
|
+
return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
|
|
18195
|
+
}
|
|
18196
|
+
getDelegate() {
|
|
18197
|
+
var _a3;
|
|
18198
|
+
return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
|
|
18199
|
+
}
|
|
18200
|
+
setDelegate(delegate) {
|
|
18201
|
+
this._delegate = delegate;
|
|
18202
|
+
}
|
|
18203
|
+
getDelegateTracer(name, version2, options) {
|
|
18204
|
+
var _a3;
|
|
18205
|
+
return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
|
|
18206
|
+
}
|
|
18207
|
+
}
|
|
18208
|
+
exports.ProxyTracerProvider = ProxyTracerProvider;
|
|
18209
|
+
});
|
|
18210
|
+
|
|
18211
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
|
|
18212
|
+
var require_SamplingResult = __commonJS((exports) => {
|
|
18213
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18214
|
+
exports.SamplingDecision = undefined;
|
|
18215
|
+
var SamplingDecision;
|
|
18216
|
+
(function(SamplingDecision2) {
|
|
18217
|
+
SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
|
|
18218
|
+
SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
|
|
18219
|
+
SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
|
|
18220
|
+
})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
|
|
18221
|
+
});
|
|
18222
|
+
|
|
18223
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
|
|
18224
|
+
var require_span_kind = __commonJS((exports) => {
|
|
18225
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18226
|
+
exports.SpanKind = undefined;
|
|
18227
|
+
var SpanKind;
|
|
18228
|
+
(function(SpanKind2) {
|
|
18229
|
+
SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
|
|
18230
|
+
SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
|
|
18231
|
+
SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
|
|
18232
|
+
SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
|
|
18233
|
+
SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
|
|
18234
|
+
})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
|
|
18235
|
+
});
|
|
18236
|
+
|
|
18237
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/status.js
|
|
18238
|
+
var require_status = __commonJS((exports) => {
|
|
18239
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18240
|
+
exports.SpanStatusCode = undefined;
|
|
18241
|
+
var SpanStatusCode;
|
|
18242
|
+
(function(SpanStatusCode2) {
|
|
18243
|
+
SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
|
|
18244
|
+
SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
|
|
18245
|
+
SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
|
|
18246
|
+
})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
|
|
18247
|
+
});
|
|
18248
|
+
|
|
18249
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
|
|
18250
|
+
var require_tracestate_validators = __commonJS((exports) => {
|
|
18251
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18252
|
+
exports.validateValue = exports.validateKey = undefined;
|
|
18253
|
+
var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
18254
|
+
var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
|
|
18255
|
+
var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
18256
|
+
var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
18257
|
+
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
18258
|
+
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
18259
|
+
function validateKey(key) {
|
|
18260
|
+
return VALID_KEY_REGEX.test(key);
|
|
18261
|
+
}
|
|
18262
|
+
exports.validateKey = validateKey;
|
|
18263
|
+
function validateValue(value) {
|
|
18264
|
+
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
18265
|
+
}
|
|
18266
|
+
exports.validateValue = validateValue;
|
|
18267
|
+
});
|
|
18268
|
+
|
|
18269
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
|
|
18270
|
+
var require_tracestate_impl = __commonJS((exports) => {
|
|
18271
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18272
|
+
exports.TraceStateImpl = undefined;
|
|
18273
|
+
var tracestate_validators_1 = require_tracestate_validators();
|
|
18274
|
+
var MAX_TRACE_STATE_ITEMS = 32;
|
|
18275
|
+
var MAX_TRACE_STATE_LEN = 512;
|
|
18276
|
+
var LIST_MEMBERS_SEPARATOR = ",";
|
|
18277
|
+
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
18278
|
+
|
|
18279
|
+
class TraceStateImpl {
|
|
18280
|
+
constructor(rawTraceState) {
|
|
18281
|
+
this._internalState = new Map;
|
|
18282
|
+
if (rawTraceState)
|
|
18283
|
+
this._parse(rawTraceState);
|
|
18284
|
+
}
|
|
18285
|
+
set(key, value) {
|
|
18286
|
+
const traceState = this._clone();
|
|
18287
|
+
if (traceState._internalState.has(key)) {
|
|
18288
|
+
traceState._internalState.delete(key);
|
|
18289
|
+
}
|
|
18290
|
+
traceState._internalState.set(key, value);
|
|
18291
|
+
return traceState;
|
|
18292
|
+
}
|
|
18293
|
+
unset(key) {
|
|
18294
|
+
const traceState = this._clone();
|
|
18295
|
+
traceState._internalState.delete(key);
|
|
18296
|
+
return traceState;
|
|
18297
|
+
}
|
|
18298
|
+
get(key) {
|
|
18299
|
+
return this._internalState.get(key);
|
|
18300
|
+
}
|
|
18301
|
+
serialize() {
|
|
18302
|
+
return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
|
|
18303
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
|
|
18304
|
+
return agg;
|
|
18305
|
+
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
18306
|
+
}
|
|
18307
|
+
_parse(rawTraceState) {
|
|
18308
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
18309
|
+
return;
|
|
18310
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
|
|
18311
|
+
const listMember = part.trim();
|
|
18312
|
+
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
18313
|
+
if (i !== -1) {
|
|
18314
|
+
const key = listMember.slice(0, i);
|
|
18315
|
+
const value = listMember.slice(i + 1, part.length);
|
|
18316
|
+
if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
|
|
18317
|
+
agg.set(key, value);
|
|
18318
|
+
}
|
|
18319
|
+
}
|
|
18320
|
+
return agg;
|
|
18321
|
+
}, new Map);
|
|
18322
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
18323
|
+
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
18324
|
+
}
|
|
18325
|
+
}
|
|
18326
|
+
_keys() {
|
|
18327
|
+
return Array.from(this._internalState.keys()).reverse();
|
|
18328
|
+
}
|
|
18329
|
+
_clone() {
|
|
18330
|
+
const traceState = new TraceStateImpl;
|
|
18331
|
+
traceState._internalState = new Map(this._internalState);
|
|
18332
|
+
return traceState;
|
|
18333
|
+
}
|
|
18334
|
+
}
|
|
18335
|
+
exports.TraceStateImpl = TraceStateImpl;
|
|
18336
|
+
});
|
|
18337
|
+
|
|
18338
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
|
|
18339
|
+
var require_utils2 = __commonJS((exports) => {
|
|
18340
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18341
|
+
exports.createTraceState = undefined;
|
|
18342
|
+
var tracestate_impl_1 = require_tracestate_impl();
|
|
18343
|
+
function createTraceState(rawTraceState) {
|
|
18344
|
+
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
|
|
18345
|
+
}
|
|
18346
|
+
exports.createTraceState = createTraceState;
|
|
18347
|
+
});
|
|
18348
|
+
|
|
18349
|
+
// ../../node_modules/@opentelemetry/api/build/src/context-api.js
|
|
18350
|
+
var require_context_api = __commonJS((exports) => {
|
|
18351
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18352
|
+
exports.context = undefined;
|
|
18353
|
+
var context_1 = require_context2();
|
|
18354
|
+
exports.context = context_1.ContextAPI.getInstance();
|
|
18355
|
+
});
|
|
18356
|
+
|
|
18357
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag-api.js
|
|
18358
|
+
var require_diag_api = __commonJS((exports) => {
|
|
18359
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18360
|
+
exports.diag = undefined;
|
|
18361
|
+
var diag_1 = require_diag();
|
|
18362
|
+
exports.diag = diag_1.DiagAPI.instance();
|
|
18363
|
+
});
|
|
18364
|
+
|
|
18365
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
|
|
18366
|
+
var require_NoopMeterProvider = __commonJS((exports) => {
|
|
18367
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18368
|
+
exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
|
|
18369
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
18370
|
+
|
|
18371
|
+
class NoopMeterProvider {
|
|
18372
|
+
getMeter(_name, _version, _options) {
|
|
18373
|
+
return NoopMeter_1.NOOP_METER;
|
|
18374
|
+
}
|
|
18375
|
+
}
|
|
18376
|
+
exports.NoopMeterProvider = NoopMeterProvider;
|
|
18377
|
+
exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
|
|
18378
|
+
});
|
|
18379
|
+
|
|
18380
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
|
|
18381
|
+
var require_metrics = __commonJS((exports) => {
|
|
18382
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18383
|
+
exports.MetricsAPI = undefined;
|
|
18384
|
+
var NoopMeterProvider_1 = require_NoopMeterProvider();
|
|
18385
|
+
var global_utils_1 = require_global_utils();
|
|
18386
|
+
var diag_1 = require_diag();
|
|
18387
|
+
var API_NAME = "metrics";
|
|
18388
|
+
|
|
18389
|
+
class MetricsAPI {
|
|
18390
|
+
constructor() {}
|
|
18391
|
+
static getInstance() {
|
|
18392
|
+
if (!this._instance) {
|
|
18393
|
+
this._instance = new MetricsAPI;
|
|
18394
|
+
}
|
|
18395
|
+
return this._instance;
|
|
18396
|
+
}
|
|
18397
|
+
setGlobalMeterProvider(provider) {
|
|
18398
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
|
|
18399
|
+
}
|
|
18400
|
+
getMeterProvider() {
|
|
18401
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
|
|
18402
|
+
}
|
|
18403
|
+
getMeter(name, version2, options) {
|
|
18404
|
+
return this.getMeterProvider().getMeter(name, version2, options);
|
|
18405
|
+
}
|
|
18406
|
+
disable() {
|
|
18407
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18408
|
+
}
|
|
18409
|
+
}
|
|
18410
|
+
exports.MetricsAPI = MetricsAPI;
|
|
18411
|
+
});
|
|
18412
|
+
|
|
18413
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
|
|
18414
|
+
var require_metrics_api = __commonJS((exports) => {
|
|
18415
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18416
|
+
exports.metrics = undefined;
|
|
18417
|
+
var metrics_1 = require_metrics();
|
|
18418
|
+
exports.metrics = metrics_1.MetricsAPI.getInstance();
|
|
18419
|
+
});
|
|
18420
|
+
|
|
18421
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
|
|
18422
|
+
var require_NoopTextMapPropagator = __commonJS((exports) => {
|
|
18423
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18424
|
+
exports.NoopTextMapPropagator = undefined;
|
|
18425
|
+
|
|
18426
|
+
class NoopTextMapPropagator {
|
|
18427
|
+
inject(_context, _carrier) {}
|
|
18428
|
+
extract(context, _carrier) {
|
|
18429
|
+
return context;
|
|
18430
|
+
}
|
|
18431
|
+
fields() {
|
|
18432
|
+
return [];
|
|
18433
|
+
}
|
|
18434
|
+
}
|
|
18435
|
+
exports.NoopTextMapPropagator = NoopTextMapPropagator;
|
|
18436
|
+
});
|
|
18437
|
+
|
|
18438
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
|
|
18439
|
+
var require_context_helpers = __commonJS((exports) => {
|
|
18440
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18441
|
+
exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
|
|
18442
|
+
var context_1 = require_context2();
|
|
18443
|
+
var context_2 = require_context();
|
|
18444
|
+
var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
|
|
18445
|
+
function getBaggage(context) {
|
|
18446
|
+
return context.getValue(BAGGAGE_KEY) || undefined;
|
|
18447
|
+
}
|
|
18448
|
+
exports.getBaggage = getBaggage;
|
|
18449
|
+
function getActiveBaggage() {
|
|
18450
|
+
return getBaggage(context_1.ContextAPI.getInstance().active());
|
|
18451
|
+
}
|
|
18452
|
+
exports.getActiveBaggage = getActiveBaggage;
|
|
18453
|
+
function setBaggage(context, baggage) {
|
|
18454
|
+
return context.setValue(BAGGAGE_KEY, baggage);
|
|
18455
|
+
}
|
|
18456
|
+
exports.setBaggage = setBaggage;
|
|
18457
|
+
function deleteBaggage(context) {
|
|
18458
|
+
return context.deleteValue(BAGGAGE_KEY);
|
|
18459
|
+
}
|
|
18460
|
+
exports.deleteBaggage = deleteBaggage;
|
|
18461
|
+
});
|
|
18462
|
+
|
|
18463
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
|
|
18464
|
+
var require_propagation = __commonJS((exports) => {
|
|
18465
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18466
|
+
exports.PropagationAPI = undefined;
|
|
18467
|
+
var global_utils_1 = require_global_utils();
|
|
18468
|
+
var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
|
|
18469
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18470
|
+
var context_helpers_1 = require_context_helpers();
|
|
18471
|
+
var utils_1 = require_utils();
|
|
18472
|
+
var diag_1 = require_diag();
|
|
18473
|
+
var API_NAME = "propagation";
|
|
18474
|
+
var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
|
|
18475
|
+
|
|
18476
|
+
class PropagationAPI {
|
|
18477
|
+
constructor() {
|
|
18478
|
+
this.createBaggage = utils_1.createBaggage;
|
|
18479
|
+
this.getBaggage = context_helpers_1.getBaggage;
|
|
18480
|
+
this.getActiveBaggage = context_helpers_1.getActiveBaggage;
|
|
18481
|
+
this.setBaggage = context_helpers_1.setBaggage;
|
|
18482
|
+
this.deleteBaggage = context_helpers_1.deleteBaggage;
|
|
18483
|
+
}
|
|
18484
|
+
static getInstance() {
|
|
18485
|
+
if (!this._instance) {
|
|
18486
|
+
this._instance = new PropagationAPI;
|
|
18487
|
+
}
|
|
18488
|
+
return this._instance;
|
|
18489
|
+
}
|
|
18490
|
+
setGlobalPropagator(propagator) {
|
|
18491
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
|
|
18492
|
+
}
|
|
18493
|
+
inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
|
|
18494
|
+
return this._getGlobalPropagator().inject(context, carrier, setter);
|
|
18495
|
+
}
|
|
18496
|
+
extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
|
|
18497
|
+
return this._getGlobalPropagator().extract(context, carrier, getter);
|
|
18498
|
+
}
|
|
18499
|
+
fields() {
|
|
18500
|
+
return this._getGlobalPropagator().fields();
|
|
18501
|
+
}
|
|
18502
|
+
disable() {
|
|
18503
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18504
|
+
}
|
|
18505
|
+
_getGlobalPropagator() {
|
|
18506
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
|
|
18507
|
+
}
|
|
18508
|
+
}
|
|
18509
|
+
exports.PropagationAPI = PropagationAPI;
|
|
18510
|
+
});
|
|
18511
|
+
|
|
18512
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
|
|
18513
|
+
var require_propagation_api = __commonJS((exports) => {
|
|
18514
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18515
|
+
exports.propagation = undefined;
|
|
18516
|
+
var propagation_1 = require_propagation();
|
|
18517
|
+
exports.propagation = propagation_1.PropagationAPI.getInstance();
|
|
18518
|
+
});
|
|
18519
|
+
|
|
18520
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/trace.js
|
|
18521
|
+
var require_trace = __commonJS((exports) => {
|
|
18522
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18523
|
+
exports.TraceAPI = undefined;
|
|
18524
|
+
var global_utils_1 = require_global_utils();
|
|
18525
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18526
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18527
|
+
var context_utils_1 = require_context_utils();
|
|
18528
|
+
var diag_1 = require_diag();
|
|
18529
|
+
var API_NAME = "trace";
|
|
18530
|
+
|
|
18531
|
+
class TraceAPI {
|
|
18532
|
+
constructor() {
|
|
18533
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18534
|
+
this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
|
|
18535
|
+
this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
|
|
18536
|
+
this.deleteSpan = context_utils_1.deleteSpan;
|
|
18537
|
+
this.getSpan = context_utils_1.getSpan;
|
|
18538
|
+
this.getActiveSpan = context_utils_1.getActiveSpan;
|
|
18539
|
+
this.getSpanContext = context_utils_1.getSpanContext;
|
|
18540
|
+
this.setSpan = context_utils_1.setSpan;
|
|
18541
|
+
this.setSpanContext = context_utils_1.setSpanContext;
|
|
18542
|
+
}
|
|
18543
|
+
static getInstance() {
|
|
18544
|
+
if (!this._instance) {
|
|
18545
|
+
this._instance = new TraceAPI;
|
|
18546
|
+
}
|
|
18547
|
+
return this._instance;
|
|
18548
|
+
}
|
|
18549
|
+
setGlobalTracerProvider(provider) {
|
|
18550
|
+
const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
|
|
18551
|
+
if (success3) {
|
|
18552
|
+
this._proxyTracerProvider.setDelegate(provider);
|
|
18553
|
+
}
|
|
18554
|
+
return success3;
|
|
18555
|
+
}
|
|
18556
|
+
getTracerProvider() {
|
|
18557
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
|
|
18558
|
+
}
|
|
18559
|
+
getTracer(name, version2) {
|
|
18560
|
+
return this.getTracerProvider().getTracer(name, version2);
|
|
18561
|
+
}
|
|
18562
|
+
disable() {
|
|
18563
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18564
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18565
|
+
}
|
|
18566
|
+
}
|
|
18567
|
+
exports.TraceAPI = TraceAPI;
|
|
18568
|
+
});
|
|
18569
|
+
|
|
18570
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace-api.js
|
|
18571
|
+
var require_trace_api = __commonJS((exports) => {
|
|
18572
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18573
|
+
exports.trace = undefined;
|
|
18574
|
+
var trace_1 = require_trace();
|
|
18575
|
+
exports.trace = trace_1.TraceAPI.getInstance();
|
|
18576
|
+
});
|
|
18577
|
+
|
|
18578
|
+
// ../../node_modules/@opentelemetry/api/build/src/index.js
|
|
18579
|
+
var require_src = __commonJS((exports) => {
|
|
18580
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18581
|
+
exports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = undefined;
|
|
18582
|
+
var utils_1 = require_utils();
|
|
18583
|
+
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
|
|
18584
|
+
return utils_1.baggageEntryMetadataFromString;
|
|
18585
|
+
} });
|
|
18586
|
+
var context_1 = require_context();
|
|
18587
|
+
Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
|
|
18588
|
+
return context_1.createContextKey;
|
|
18589
|
+
} });
|
|
18590
|
+
Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
|
|
18591
|
+
return context_1.ROOT_CONTEXT;
|
|
18592
|
+
} });
|
|
18593
|
+
var consoleLogger_1 = require_consoleLogger();
|
|
18594
|
+
Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
|
|
18595
|
+
return consoleLogger_1.DiagConsoleLogger;
|
|
18596
|
+
} });
|
|
18597
|
+
var types_1 = require_types();
|
|
18598
|
+
Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
|
|
18599
|
+
return types_1.DiagLogLevel;
|
|
18600
|
+
} });
|
|
18601
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
18602
|
+
Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
|
|
18603
|
+
return NoopMeter_1.createNoopMeter;
|
|
18604
|
+
} });
|
|
18605
|
+
var Metric_1 = require_Metric();
|
|
18606
|
+
Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
|
|
18607
|
+
return Metric_1.ValueType;
|
|
18608
|
+
} });
|
|
18609
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18610
|
+
Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
|
|
18611
|
+
return TextMapPropagator_1.defaultTextMapGetter;
|
|
18612
|
+
} });
|
|
18613
|
+
Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
|
|
18614
|
+
return TextMapPropagator_1.defaultTextMapSetter;
|
|
18615
|
+
} });
|
|
18616
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
18617
|
+
Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
|
|
18618
|
+
return ProxyTracer_1.ProxyTracer;
|
|
18619
|
+
} });
|
|
18620
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18621
|
+
Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
|
|
18622
|
+
return ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18623
|
+
} });
|
|
18624
|
+
var SamplingResult_1 = require_SamplingResult();
|
|
18625
|
+
Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
|
|
18626
|
+
return SamplingResult_1.SamplingDecision;
|
|
18627
|
+
} });
|
|
18628
|
+
var span_kind_1 = require_span_kind();
|
|
18629
|
+
Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
|
|
18630
|
+
return span_kind_1.SpanKind;
|
|
18631
|
+
} });
|
|
18632
|
+
var status_1 = require_status();
|
|
18633
|
+
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
|
|
18634
|
+
return status_1.SpanStatusCode;
|
|
18635
|
+
} });
|
|
18636
|
+
var trace_flags_1 = require_trace_flags();
|
|
18637
|
+
Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
|
|
18638
|
+
return trace_flags_1.TraceFlags;
|
|
18639
|
+
} });
|
|
18640
|
+
var utils_2 = require_utils2();
|
|
18641
|
+
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
|
|
18642
|
+
return utils_2.createTraceState;
|
|
18643
|
+
} });
|
|
18644
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18645
|
+
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
|
|
18646
|
+
return spancontext_utils_1.isSpanContextValid;
|
|
18647
|
+
} });
|
|
18648
|
+
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
|
|
18649
|
+
return spancontext_utils_1.isValidTraceId;
|
|
18650
|
+
} });
|
|
18651
|
+
Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
|
|
18652
|
+
return spancontext_utils_1.isValidSpanId;
|
|
18653
|
+
} });
|
|
18654
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18655
|
+
Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
|
|
18656
|
+
return invalid_span_constants_1.INVALID_SPANID;
|
|
18657
|
+
} });
|
|
18658
|
+
Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
|
|
18659
|
+
return invalid_span_constants_1.INVALID_TRACEID;
|
|
18660
|
+
} });
|
|
18661
|
+
Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
|
|
18662
|
+
return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
|
|
18663
|
+
} });
|
|
18664
|
+
var context_api_1 = require_context_api();
|
|
18665
|
+
Object.defineProperty(exports, "context", { enumerable: true, get: function() {
|
|
18666
|
+
return context_api_1.context;
|
|
18667
|
+
} });
|
|
18668
|
+
var diag_api_1 = require_diag_api();
|
|
18669
|
+
Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
|
|
18670
|
+
return diag_api_1.diag;
|
|
18671
|
+
} });
|
|
18672
|
+
var metrics_api_1 = require_metrics_api();
|
|
18673
|
+
Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
|
|
18674
|
+
return metrics_api_1.metrics;
|
|
18675
|
+
} });
|
|
18676
|
+
var propagation_api_1 = require_propagation_api();
|
|
18677
|
+
Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
|
|
18678
|
+
return propagation_api_1.propagation;
|
|
18679
|
+
} });
|
|
18680
|
+
var trace_api_1 = require_trace_api();
|
|
18681
|
+
Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
|
|
18682
|
+
return trace_api_1.trace;
|
|
18683
|
+
} });
|
|
18684
|
+
exports.default = {
|
|
18685
|
+
context: context_api_1.context,
|
|
18686
|
+
diag: diag_api_1.diag,
|
|
18687
|
+
metrics: metrics_api_1.metrics,
|
|
18688
|
+
propagation: propagation_api_1.propagation,
|
|
18689
|
+
trace: trace_api_1.trace
|
|
18690
|
+
};
|
|
18691
|
+
});
|
|
18692
|
+
|
|
18693
|
+
// ../types/src/processor/processor.ts
|
|
18694
|
+
var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
|
|
18695
|
+
var init_processor = __esm(() => {
|
|
18696
|
+
init_zod();
|
|
18697
|
+
init_common();
|
|
18698
|
+
import_api = __toESM(require_src(), 1);
|
|
18699
|
+
noopTracingContext = {
|
|
18700
|
+
traceId: "",
|
|
18701
|
+
getActiveSpan() {
|
|
18702
|
+
return;
|
|
18703
|
+
},
|
|
18704
|
+
async withSpan(_name, _options, fn) {
|
|
18705
|
+
const noopSpan = {
|
|
18706
|
+
spanContext: () => ({
|
|
18707
|
+
traceId: "",
|
|
18708
|
+
spanId: "",
|
|
18709
|
+
traceFlags: 0
|
|
18710
|
+
}),
|
|
18711
|
+
setAttribute: () => noopSpan,
|
|
18712
|
+
setAttributes: () => noopSpan,
|
|
18713
|
+
addEvent: () => noopSpan,
|
|
18714
|
+
addLink: () => noopSpan,
|
|
18715
|
+
addLinks: () => noopSpan,
|
|
18716
|
+
setStatus: () => noopSpan,
|
|
18717
|
+
updateName: () => noopSpan,
|
|
18718
|
+
end: () => {},
|
|
18719
|
+
isRecording: () => false,
|
|
18720
|
+
recordException: () => {}
|
|
18721
|
+
};
|
|
18722
|
+
return fn(noopSpan);
|
|
18723
|
+
}
|
|
18724
|
+
};
|
|
18725
|
+
ProcessorPortSchema = exports_external.object({
|
|
18726
|
+
name: exports_external.string(),
|
|
18727
|
+
schema: JsonSchemaSchema,
|
|
18728
|
+
required: exports_external.boolean().default(true)
|
|
18729
|
+
});
|
|
18730
|
+
ProcessorDefinitionSchema = exports_external.object({
|
|
18731
|
+
id: exports_external.string(),
|
|
18732
|
+
name: exports_external.string(),
|
|
18733
|
+
description: exports_external.string().optional(),
|
|
18734
|
+
inputSchema: JsonSchemaSchema,
|
|
18735
|
+
outputSchema: JsonSchemaSchema,
|
|
18736
|
+
configSchema: JsonSchemaSchema.optional(),
|
|
18737
|
+
inputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
18738
|
+
outputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
18739
|
+
isBuiltin: exports_external.boolean().default(true),
|
|
18740
|
+
pluginName: exports_external.string().optional()
|
|
18741
|
+
});
|
|
18742
|
+
ProcessorExecutionContextSchema = exports_external.object({
|
|
18743
|
+
jobId: exports_external.string(),
|
|
18744
|
+
stepId: exports_external.string(),
|
|
18745
|
+
tenantId: exports_external.string(),
|
|
18746
|
+
workflowId: exports_external.string(),
|
|
18747
|
+
workerId: exports_external.string().optional()
|
|
18748
|
+
});
|
|
18749
|
+
((TraceStatus2) => {
|
|
18750
|
+
TraceStatus2["PENDING"] = "pending";
|
|
18751
|
+
TraceStatus2["RUNNING"] = "running";
|
|
18752
|
+
TraceStatus2["COMPLETED"] = "completed";
|
|
18753
|
+
TraceStatus2["FAILED"] = "failed";
|
|
18754
|
+
})(TraceStatus ||= {});
|
|
18755
|
+
});
|
|
18756
|
+
|
|
18757
|
+
// ../types/src/processor/execution.ts
|
|
18758
|
+
function asTuple(values) {
|
|
18759
|
+
return values;
|
|
18760
|
+
}
|
|
18761
|
+
var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
|
|
18762
|
+
var init_execution = __esm(() => {
|
|
18763
|
+
init_zod();
|
|
18764
|
+
WorkflowExecutionStatusValue = {
|
|
18765
|
+
CREATED: "created",
|
|
18766
|
+
PENDING: "pending",
|
|
18767
|
+
RUNNING: "running",
|
|
18768
|
+
WAITING: "waiting",
|
|
18769
|
+
COMPLETED: "completed",
|
|
18770
|
+
FAILED: "failed",
|
|
18771
|
+
CANCELLED: "cancelled"
|
|
18772
|
+
};
|
|
18773
|
+
WorkflowExecutionStatusSchema = exports_external.enum([
|
|
18774
|
+
WorkflowExecutionStatusValue.CREATED,
|
|
18775
|
+
WorkflowExecutionStatusValue.PENDING,
|
|
18776
|
+
WorkflowExecutionStatusValue.RUNNING,
|
|
18777
|
+
WorkflowExecutionStatusValue.WAITING,
|
|
18778
|
+
WorkflowExecutionStatusValue.COMPLETED,
|
|
18779
|
+
WorkflowExecutionStatusValue.FAILED,
|
|
18780
|
+
WorkflowExecutionStatusValue.CANCELLED
|
|
18781
|
+
]);
|
|
18782
|
+
StepExecutionStatusValue = {
|
|
18783
|
+
PENDING: "pending",
|
|
18784
|
+
RUNNING: "running",
|
|
18785
|
+
SUCCESS: "success",
|
|
18786
|
+
FAILURE: "failure",
|
|
18787
|
+
WAITING: "waiting",
|
|
18788
|
+
SKIPPED: "skipped"
|
|
18789
|
+
};
|
|
18790
|
+
StepExecutionStatusSchema = exports_external.enum([
|
|
18791
|
+
StepExecutionStatusValue.PENDING,
|
|
18792
|
+
StepExecutionStatusValue.RUNNING,
|
|
18793
|
+
StepExecutionStatusValue.SUCCESS,
|
|
18794
|
+
StepExecutionStatusValue.FAILURE,
|
|
18795
|
+
StepExecutionStatusValue.WAITING,
|
|
18796
|
+
StepExecutionStatusValue.SKIPPED
|
|
18797
|
+
]);
|
|
18798
|
+
TriggerTypeValue = {
|
|
18799
|
+
MANUAL: "manual",
|
|
18800
|
+
API: "api",
|
|
18801
|
+
WEBHOOK: "webhook",
|
|
18802
|
+
SCHEDULE: "schedule",
|
|
18803
|
+
EMAIL: "email",
|
|
18804
|
+
EVAL: "eval",
|
|
18805
|
+
CLI: "cli"
|
|
18806
|
+
};
|
|
18807
|
+
TriggerTypeSchema = exports_external.enum([
|
|
18808
|
+
TriggerTypeValue.MANUAL,
|
|
18809
|
+
TriggerTypeValue.API,
|
|
18810
|
+
TriggerTypeValue.WEBHOOK,
|
|
18811
|
+
TriggerTypeValue.SCHEDULE,
|
|
18812
|
+
TriggerTypeValue.EMAIL,
|
|
18813
|
+
TriggerTypeValue.EVAL,
|
|
18814
|
+
TriggerTypeValue.CLI
|
|
18815
|
+
]);
|
|
18816
|
+
ExecutionTypeValue = {
|
|
18817
|
+
PROD: "prod",
|
|
18818
|
+
EVAL: "eval",
|
|
18819
|
+
PLAYGROUND: "playground"
|
|
18820
|
+
};
|
|
18821
|
+
ExecutionTypeSchema = exports_external.enum([
|
|
18822
|
+
ExecutionTypeValue.PROD,
|
|
18823
|
+
ExecutionTypeValue.EVAL,
|
|
18824
|
+
ExecutionTypeValue.PLAYGROUND
|
|
18825
|
+
]);
|
|
18826
|
+
WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
|
|
18827
|
+
STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
|
|
18828
|
+
TRIGGER_TYPES = TriggerTypeSchema.options;
|
|
18829
|
+
EXECUTION_TYPES = ExecutionTypeSchema.options;
|
|
18830
|
+
});
|
|
18831
|
+
|
|
18832
|
+
// ../types/src/processor/configs/classify.ts
|
|
18833
|
+
var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
|
|
18834
|
+
var init_classify = __esm(() => {
|
|
18835
|
+
init_zod();
|
|
18836
|
+
ClassifyInputSchema = exports_external.object({
|
|
18837
|
+
content: exports_external.string().optional().describe("Text content to classify"),
|
|
18838
|
+
text: exports_external.string().optional().describe("Text content (alternative to content)")
|
|
18839
|
+
}).refine((data) => !!(data.content || data.text), {
|
|
18840
|
+
message: "Either content or text must be provided"
|
|
18841
|
+
});
|
|
18842
|
+
ClassifyLabelSchema = exports_external.object({
|
|
18843
|
+
name: exports_external.string().min(1).describe("Label value returned in output.label"),
|
|
18844
|
+
description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
|
|
18845
|
+
});
|
|
18846
|
+
ClassifyConfigSchema = exports_external.object({
|
|
18847
|
+
labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
|
|
18848
|
+
prompt: exports_external.string().optional().describe("Optional classification instructions appended to the system prompt. Use to clarify edge cases or emphasize evidence the model should weigh."),
|
|
18849
|
+
provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
|
|
18850
|
+
model: exports_external.string().optional().describe("Model override"),
|
|
18851
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
|
|
18852
|
+
});
|
|
18853
|
+
ClassifyOutputSchema = exports_external.object({
|
|
18854
|
+
label: exports_external.string().describe("The selected label name"),
|
|
18855
|
+
confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
|
|
18856
|
+
reason: exports_external.string().describe("Short justification for the chosen label")
|
|
18857
|
+
});
|
|
18858
|
+
});
|
|
18859
|
+
|
|
18860
|
+
// ../types/src/parser/parser.ts
|
|
18861
|
+
function resolveEffectiveMimeType(filename, declaredMimeType) {
|
|
18862
|
+
const ext = filename.split(".").pop()?.toLowerCase();
|
|
18863
|
+
if (!ext)
|
|
18864
|
+
return declaredMimeType;
|
|
18865
|
+
const extensionMime = EXTENSION_TO_MIME[ext];
|
|
18866
|
+
return extensionMime ?? declaredMimeType;
|
|
18867
|
+
}
|
|
18868
|
+
function getParserCategory(mimeType) {
|
|
18869
|
+
const normalized = mimeType.toLowerCase().trim();
|
|
18870
|
+
if (ParserCategory.PLAINTEXT.includes(normalized)) {
|
|
18871
|
+
return "plaintext";
|
|
18872
|
+
}
|
|
18873
|
+
if (ParserCategory.OFFICE.includes(normalized)) {
|
|
18874
|
+
return "office";
|
|
18875
|
+
}
|
|
18876
|
+
if (ParserCategory.DOCUMENT.includes(normalized)) {
|
|
18877
|
+
return "document";
|
|
18878
|
+
}
|
|
18879
|
+
return null;
|
|
18880
|
+
}
|
|
18881
|
+
function requiresSpecializedParser(mimeType) {
|
|
18882
|
+
return getParserCategory(mimeType) === "document";
|
|
18883
|
+
}
|
|
18884
|
+
function getAllSupportedMimeTypes() {
|
|
18885
|
+
return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
|
|
18886
|
+
}
|
|
18887
|
+
function getSupportedFormatsLabel() {
|
|
18888
|
+
const allMimes = getAllSupportedMimeTypes();
|
|
18889
|
+
const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
|
|
18890
|
+
return labels.join(", ");
|
|
18891
|
+
}
|
|
18892
|
+
var OFFICE_MIME_TYPES, ParserCategory, ParserTypeSchema, DocumentMetadataSchema, ParseUsageSchema, CoordinateUnitSchema, PointSchema, BoundingRegionSchema, PositionedTextSchema, TableCellSchema, ExtractedTableSchema, LayoutElementTypeSchema, LayoutElementSchema, PageResultSchema, ParseResultSchema, ParseOptionsSchema, ParserInputSchema, EXTENSION_TO_MIME, MIME_TO_LABEL;
|
|
18893
|
+
var init_parser = __esm(() => {
|
|
18894
|
+
init_zod();
|
|
18895
|
+
OFFICE_MIME_TYPES = [
|
|
18896
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
18897
|
+
"application/msword",
|
|
18898
|
+
"application/vnd.oasis.opendocument.text",
|
|
18899
|
+
"application/rtf",
|
|
18900
|
+
"text/rtf",
|
|
18901
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
18902
|
+
"application/vnd.ms-excel",
|
|
18903
|
+
"application/vnd.ms-excel.sheet.macroenabled.12",
|
|
18904
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
18905
|
+
"application/vnd.oasis.opendocument.spreadsheet",
|
|
18906
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
18907
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
18908
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
18909
|
+
"application/vnd.ms-powerpoint",
|
|
18910
|
+
"application/vnd.oasis.opendocument.presentation",
|
|
18911
|
+
"message/rfc822",
|
|
18912
|
+
"application/vnd.ms-outlook",
|
|
18913
|
+
"application/epub+zip"
|
|
18914
|
+
];
|
|
18915
|
+
ParserCategory = {
|
|
18916
|
+
PLAINTEXT: [
|
|
18917
|
+
"text/plain",
|
|
18918
|
+
"text/markdown",
|
|
18919
|
+
"text/csv",
|
|
18920
|
+
"text/tab-separated-values",
|
|
18921
|
+
"text/html",
|
|
18922
|
+
"text/xml",
|
|
18923
|
+
"application/json",
|
|
18924
|
+
"application/x-yaml",
|
|
18925
|
+
"application/toml",
|
|
18926
|
+
"image/svg+xml",
|
|
18927
|
+
"text/x-rst",
|
|
18928
|
+
"text/x-org",
|
|
18929
|
+
"application/x-latex",
|
|
18930
|
+
"application/x-ipynb+json",
|
|
18931
|
+
"application/x-bibtex",
|
|
18932
|
+
"application/docbook+xml",
|
|
18933
|
+
"application/x-fictionbook+xml"
|
|
18934
|
+
],
|
|
18935
|
+
OFFICE: [...OFFICE_MIME_TYPES],
|
|
18936
|
+
DOCUMENT: [
|
|
18937
|
+
"application/pdf",
|
|
18938
|
+
"image/png",
|
|
18939
|
+
"image/jpeg",
|
|
18940
|
+
"image/webp",
|
|
18941
|
+
"image/tiff",
|
|
18942
|
+
"image/gif",
|
|
18943
|
+
"image/bmp"
|
|
18944
|
+
]
|
|
18945
|
+
};
|
|
18946
|
+
ParserTypeSchema = exports_external.enum([
|
|
18947
|
+
"plaintext",
|
|
18948
|
+
"office",
|
|
18949
|
+
"llm-vision",
|
|
18950
|
+
"ocr"
|
|
18951
|
+
]);
|
|
18952
|
+
DocumentMetadataSchema = exports_external.object({
|
|
18953
|
+
filename: exports_external.string(),
|
|
18954
|
+
mimeType: exports_external.string(),
|
|
18955
|
+
size: exports_external.number().describe("File size in bytes"),
|
|
18956
|
+
storageRef: exports_external.string().optional().describe("Storage reference for the original file")
|
|
18957
|
+
});
|
|
18958
|
+
ParseUsageSchema = exports_external.object({
|
|
18959
|
+
pageCount: exports_external.number(),
|
|
18960
|
+
processingTimeMs: exports_external.number().optional()
|
|
18961
|
+
});
|
|
18962
|
+
CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
|
|
18963
|
+
PointSchema = exports_external.object({
|
|
18964
|
+
x: exports_external.number(),
|
|
18965
|
+
y: exports_external.number()
|
|
18966
|
+
});
|
|
18967
|
+
BoundingRegionSchema = exports_external.object({
|
|
18968
|
+
polygon: exports_external.array(PointSchema).min(3),
|
|
18969
|
+
unit: CoordinateUnitSchema,
|
|
18970
|
+
pageIndex: exports_external.number()
|
|
18971
|
+
});
|
|
18972
|
+
PositionedTextSchema = exports_external.object({
|
|
18973
|
+
text: exports_external.string(),
|
|
18974
|
+
confidence: exports_external.number().min(0).max(1).optional(),
|
|
18975
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
18976
|
+
});
|
|
18977
|
+
TableCellSchema = exports_external.object({
|
|
18978
|
+
content: exports_external.string(),
|
|
18979
|
+
rowIndex: exports_external.number(),
|
|
18980
|
+
columnIndex: exports_external.number(),
|
|
18981
|
+
rowSpan: exports_external.number().default(1),
|
|
18982
|
+
columnSpan: exports_external.number().default(1),
|
|
18983
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
18984
|
+
});
|
|
18985
|
+
ExtractedTableSchema = exports_external.object({
|
|
18986
|
+
cells: exports_external.array(TableCellSchema),
|
|
18987
|
+
rowCount: exports_external.number(),
|
|
18988
|
+
columnCount: exports_external.number(),
|
|
18989
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
18990
|
+
});
|
|
18991
|
+
LayoutElementTypeSchema = exports_external.enum([
|
|
18992
|
+
"paragraph",
|
|
18993
|
+
"title",
|
|
18994
|
+
"sectionHeading",
|
|
18995
|
+
"pageHeader",
|
|
18996
|
+
"pageFooter",
|
|
18997
|
+
"pageNumber",
|
|
18998
|
+
"footnote",
|
|
18999
|
+
"table",
|
|
19000
|
+
"figure",
|
|
19001
|
+
"formulaBlock"
|
|
19002
|
+
]);
|
|
19003
|
+
LayoutElementSchema = exports_external.object({
|
|
19004
|
+
type: LayoutElementTypeSchema,
|
|
19005
|
+
content: exports_external.string(),
|
|
19006
|
+
table: ExtractedTableSchema.optional(),
|
|
19007
|
+
caption: exports_external.string().optional(),
|
|
19008
|
+
figureId: exports_external.string().optional(),
|
|
19009
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19010
|
+
});
|
|
19011
|
+
PageResultSchema = exports_external.object({
|
|
19012
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19013
|
+
text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
|
|
19014
|
+
pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
|
|
19015
|
+
layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
|
|
19016
|
+
words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
|
|
19017
|
+
lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
|
|
19018
|
+
tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
|
|
19019
|
+
width: exports_external.number().optional().describe("Page width"),
|
|
19020
|
+
height: exports_external.number().optional().describe("Page height"),
|
|
19021
|
+
unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
|
|
19022
|
+
confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
|
|
19023
|
+
});
|
|
19024
|
+
ParseResultSchema = exports_external.object({
|
|
19025
|
+
document: DocumentMetadataSchema,
|
|
19026
|
+
usage: ParseUsageSchema,
|
|
19027
|
+
pages: exports_external.array(PageResultSchema),
|
|
19028
|
+
text: exports_external.string().describe("Combined text from all pages"),
|
|
19029
|
+
parserType: ParserTypeSchema,
|
|
19030
|
+
parserVersion: exports_external.string().optional(),
|
|
19031
|
+
model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
|
|
19032
|
+
rawResponse: exports_external.unknown().optional()
|
|
19033
|
+
});
|
|
19034
|
+
ParseOptionsSchema = exports_external.object({
|
|
19035
|
+
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
|
|
19036
|
+
ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
|
|
19037
|
+
includeWordPositions: exports_external.boolean().default(false),
|
|
19038
|
+
includeLinePositions: exports_external.boolean().default(false),
|
|
19039
|
+
extractTables: exports_external.boolean().default(true),
|
|
19040
|
+
provider: exports_external.string().optional().describe("LLM provider ID to use"),
|
|
19041
|
+
model: exports_external.string().optional(),
|
|
19042
|
+
maxConcurrency: exports_external.number().min(1).max(30).default(3),
|
|
19043
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5),
|
|
19044
|
+
prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
|
|
19045
|
+
languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
|
|
19046
|
+
tenantId: exports_external.string().optional()
|
|
19047
|
+
});
|
|
19048
|
+
ParserInputSchema = exports_external.object({
|
|
19049
|
+
data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
|
|
19050
|
+
filename: exports_external.string(),
|
|
19051
|
+
mimeType: exports_external.string(),
|
|
19052
|
+
options: ParseOptionsSchema.optional()
|
|
19053
|
+
});
|
|
19054
|
+
EXTENSION_TO_MIME = {
|
|
19055
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19056
|
+
doc: "application/msword",
|
|
19057
|
+
odt: "application/vnd.oasis.opendocument.text",
|
|
19058
|
+
rtf: "application/rtf",
|
|
19059
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19060
|
+
xls: "application/vnd.ms-excel",
|
|
19061
|
+
xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19062
|
+
xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19063
|
+
ods: "application/vnd.oasis.opendocument.spreadsheet",
|
|
19064
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19065
|
+
ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19066
|
+
pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19067
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
19068
|
+
odp: "application/vnd.oasis.opendocument.presentation",
|
|
19069
|
+
eml: "message/rfc822",
|
|
19070
|
+
msg: "application/vnd.ms-outlook",
|
|
19071
|
+
epub: "application/epub+zip",
|
|
19072
|
+
pdf: "application/pdf",
|
|
19073
|
+
png: "image/png",
|
|
19074
|
+
jpg: "image/jpeg",
|
|
19075
|
+
jpeg: "image/jpeg",
|
|
19076
|
+
webp: "image/webp",
|
|
19077
|
+
tiff: "image/tiff",
|
|
19078
|
+
tif: "image/tiff",
|
|
19079
|
+
gif: "image/gif",
|
|
19080
|
+
bmp: "image/bmp",
|
|
19081
|
+
svg: "image/svg+xml",
|
|
19082
|
+
txt: "text/plain",
|
|
19083
|
+
md: "text/markdown",
|
|
19084
|
+
markdown: "text/markdown",
|
|
19085
|
+
csv: "text/csv",
|
|
19086
|
+
tsv: "text/tab-separated-values",
|
|
19087
|
+
html: "text/html",
|
|
19088
|
+
htm: "text/html",
|
|
19089
|
+
xml: "text/xml",
|
|
19090
|
+
json: "application/json",
|
|
19091
|
+
yaml: "application/x-yaml",
|
|
19092
|
+
yml: "application/x-yaml",
|
|
19093
|
+
toml: "application/toml",
|
|
19094
|
+
rst: "text/x-rst",
|
|
19095
|
+
org: "text/x-org",
|
|
19096
|
+
tex: "application/x-latex",
|
|
19097
|
+
latex: "application/x-latex",
|
|
19098
|
+
ipynb: "application/x-ipynb+json",
|
|
19099
|
+
bib: "application/x-bibtex",
|
|
19100
|
+
dbk: "application/docbook+xml",
|
|
19101
|
+
docbook: "application/docbook+xml",
|
|
19102
|
+
fb2: "application/x-fictionbook+xml"
|
|
19103
|
+
};
|
|
19104
|
+
MIME_TO_LABEL = {
|
|
19105
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
|
|
19106
|
+
"application/msword": "DOC",
|
|
19107
|
+
"application/vnd.oasis.opendocument.text": "ODT",
|
|
19108
|
+
"application/rtf": "RTF",
|
|
19109
|
+
"text/rtf": "RTF",
|
|
19110
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
|
|
19111
|
+
"application/vnd.ms-excel": "XLS",
|
|
19112
|
+
"application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
|
|
19113
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
|
|
19114
|
+
"application/vnd.oasis.opendocument.spreadsheet": "ODS",
|
|
19115
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
|
|
19116
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
|
|
19117
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
|
|
19118
|
+
"application/vnd.ms-powerpoint": "PPT",
|
|
19119
|
+
"application/vnd.oasis.opendocument.presentation": "ODP",
|
|
19120
|
+
"message/rfc822": "EML",
|
|
19121
|
+
"application/vnd.ms-outlook": "MSG",
|
|
19122
|
+
"application/epub+zip": "EPUB",
|
|
19123
|
+
"application/pdf": "PDF",
|
|
19124
|
+
"image/png": "PNG",
|
|
19125
|
+
"image/jpeg": "JPEG",
|
|
19126
|
+
"image/webp": "WebP",
|
|
19127
|
+
"image/tiff": "TIFF",
|
|
19128
|
+
"image/gif": "GIF",
|
|
19129
|
+
"image/bmp": "BMP",
|
|
19130
|
+
"image/svg+xml": "SVG",
|
|
19131
|
+
"text/plain": "TXT",
|
|
19132
|
+
"text/markdown": "Markdown",
|
|
19133
|
+
"text/csv": "CSV",
|
|
19134
|
+
"text/tab-separated-values": "TSV",
|
|
19135
|
+
"text/html": "HTML",
|
|
19136
|
+
"text/xml": "XML",
|
|
19137
|
+
"application/json": "JSON",
|
|
19138
|
+
"application/x-yaml": "YAML",
|
|
19139
|
+
"application/toml": "TOML",
|
|
19140
|
+
"text/x-rst": "RST",
|
|
19141
|
+
"text/x-org": "Org",
|
|
19142
|
+
"application/x-latex": "LaTeX",
|
|
19143
|
+
"application/x-ipynb+json": "Jupyter",
|
|
19144
|
+
"application/x-bibtex": "BibTeX",
|
|
19145
|
+
"application/docbook+xml": "DocBook",
|
|
19146
|
+
"application/x-fictionbook+xml": "FB2"
|
|
19147
|
+
};
|
|
19148
|
+
});
|
|
19149
|
+
|
|
19150
|
+
// ../types/src/processor/configs/document-parser.ts
|
|
19151
|
+
function isFilePathDescriptor(input) {
|
|
19152
|
+
return FilePathDescriptorSchema.safeParse(input).success;
|
|
19153
|
+
}
|
|
19154
|
+
var FileIdInputSchema, LocalFileRefSchema, S3FileRefSchema, InlineFileRefSchema, FilePathDescriptorSchema, DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
|
|
19155
|
+
var init_document_parser = __esm(() => {
|
|
19156
|
+
init_zod();
|
|
19157
|
+
init_parser();
|
|
19158
|
+
FileIdInputSchema = exports_external.object({
|
|
19159
|
+
fileId: exports_external.string().describe("File ID from files table"),
|
|
19160
|
+
filename: exports_external.string().optional().describe("Original filename (for inline files)"),
|
|
19161
|
+
mimeType: exports_external.string().optional().describe("MIME type (for inline files)")
|
|
19162
|
+
});
|
|
19163
|
+
LocalFileRefSchema = exports_external.object({
|
|
19164
|
+
kind: exports_external.literal("local"),
|
|
19165
|
+
path: exports_external.string().describe("Absolute path to a file on disk"),
|
|
19166
|
+
filename: exports_external.string().describe("Original filename"),
|
|
19167
|
+
mimeType: exports_external.string().describe("MIME type of the file")
|
|
19168
|
+
});
|
|
19169
|
+
S3FileRefSchema = exports_external.object({
|
|
19170
|
+
kind: exports_external.literal("s3"),
|
|
19171
|
+
ref: exports_external.string().describe("Storage key (suffix-only, prefix added by adapter)"),
|
|
19172
|
+
filename: exports_external.string().describe("Original filename"),
|
|
19173
|
+
mimeType: exports_external.string().describe("MIME type of the file")
|
|
19174
|
+
});
|
|
19175
|
+
InlineFileRefSchema = exports_external.object({
|
|
19176
|
+
kind: exports_external.literal("inline"),
|
|
19177
|
+
base64: exports_external.string().describe("Base64-encoded file bytes"),
|
|
19178
|
+
filename: exports_external.string().describe("Original filename"),
|
|
19179
|
+
mimeType: exports_external.string().describe("MIME type of the file")
|
|
19180
|
+
});
|
|
19181
|
+
FilePathDescriptorSchema = exports_external.discriminatedUnion("kind", [
|
|
19182
|
+
LocalFileRefSchema,
|
|
19183
|
+
S3FileRefSchema,
|
|
19184
|
+
InlineFileRefSchema
|
|
19185
|
+
]);
|
|
19186
|
+
DocumentParserInputSchema = exports_external.union([FileIdInputSchema, FilePathDescriptorSchema]);
|
|
19187
|
+
DocumentParserOutputSchema = ParseResultSchema;
|
|
19188
|
+
DocumentParserConfigSchema = exports_external.object({
|
|
19189
|
+
ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
|
|
19190
|
+
llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
|
|
19191
|
+
maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
|
|
19192
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
|
|
19193
|
+
prompt: exports_external.string().optional().describe("Custom extraction prompt"),
|
|
19194
|
+
nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
|
|
19195
|
+
languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
|
|
19196
|
+
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown").optional().describe("Format for extracted text. Only the native (Kreuzberg) parser uses this — OCR/VLM always emit markdown.")
|
|
19197
|
+
}).prefault({});
|
|
19198
|
+
});
|
|
19199
|
+
|
|
19200
|
+
// ../types/src/processor/configs/extract.ts
|
|
19201
|
+
var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
|
|
19202
|
+
var init_extract = __esm(() => {
|
|
19203
|
+
init_zod();
|
|
19204
|
+
ExtractInputSchema = exports_external.object({
|
|
19205
|
+
content: exports_external.string().optional().describe("Text content to extract from"),
|
|
19206
|
+
text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
|
|
19207
|
+
contentType: exports_external.enum(["text", "image"]).default("text"),
|
|
19208
|
+
imageData: exports_external.string().optional(),
|
|
19209
|
+
imageMimeType: exports_external.string().optional()
|
|
19210
|
+
}).refine((data) => data.content || data.text, {
|
|
19211
|
+
message: "Either content or text must be provided"
|
|
19212
|
+
});
|
|
19213
|
+
ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema");
|
|
19214
|
+
ExtractConfigSchema = exports_external.object({
|
|
19215
|
+
schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
|
|
19216
|
+
prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
|
|
19217
|
+
provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
|
|
19218
|
+
model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
|
|
19219
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit.")
|
|
19220
|
+
});
|
|
19221
|
+
});
|
|
19222
|
+
|
|
19223
|
+
// ../types/src/processor/configs/merge.ts
|
|
19224
|
+
var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
|
|
19225
|
+
var init_merge = __esm(() => {
|
|
19226
|
+
init_zod();
|
|
19227
|
+
MergeConfigSchema = exports_external.object({
|
|
19228
|
+
preservePortNames: exports_external.boolean().default(true),
|
|
19229
|
+
outputKey: exports_external.string().optional()
|
|
19230
|
+
});
|
|
19231
|
+
MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
19232
|
+
MergeOutputSchema = exports_external.object({
|
|
19233
|
+
items: exports_external.array(exports_external.unknown()),
|
|
19234
|
+
count: exports_external.number(),
|
|
19235
|
+
merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
19236
|
+
});
|
|
19237
|
+
});
|
|
19238
|
+
|
|
19239
|
+
// ../types/src/processor/configs/pdf-embedder.ts
|
|
19240
|
+
var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
|
|
19241
|
+
var init_pdf_embedder = __esm(() => {
|
|
19242
|
+
init_zod();
|
|
19243
|
+
init_parser();
|
|
19244
|
+
PdfEmbedderInputSchema = exports_external.object({
|
|
19245
|
+
fileId: exports_external.string().describe("File ID from files table"),
|
|
19246
|
+
parseResult: exports_external.object({
|
|
19247
|
+
pages: exports_external.array(PageResultSchema),
|
|
19248
|
+
text: exports_external.string().optional()
|
|
19249
|
+
}).describe("Parse result from ai.parse step (must include word positions)")
|
|
19250
|
+
});
|
|
19251
|
+
PdfEmbedderOutputSchema = exports_external.object({
|
|
19252
|
+
fileId: exports_external.string().describe("File ID from files table"),
|
|
19253
|
+
pageCount: exports_external.number().describe("Number of pages in the output PDF"),
|
|
19254
|
+
wordCount: exports_external.number().describe("Number of words embedded"),
|
|
19255
|
+
text: exports_external.string().describe("Extracted text (from parse step)")
|
|
19256
|
+
});
|
|
19257
|
+
PdfEmbedderConfigSchema = exports_external.object({
|
|
19258
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
|
|
19259
|
+
confidenceThreshold: exports_external.number().min(0).max(1).default(0.7).describe("Minimum OCR confidence (0-1) to include a word. Lower = more words but more errors")
|
|
19260
|
+
}).prefault({});
|
|
19261
|
+
});
|
|
19262
|
+
|
|
19263
|
+
// ../types/src/processor/configs/split.ts
|
|
19264
|
+
var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema, SplitOutputSchema;
|
|
19265
|
+
var init_split = __esm(() => {
|
|
19266
|
+
init_zod();
|
|
19267
|
+
SplitInputSchema = exports_external.object({
|
|
19268
|
+
pages: exports_external.array(exports_external.object({
|
|
19269
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19270
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19271
|
+
pageName: exports_external.string().optional()
|
|
19272
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19273
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19274
|
+
SplitConfigSchema = exports_external.object({
|
|
19275
|
+
sections: exports_external.array(exports_external.object({
|
|
19276
|
+
name: exports_external.string().min(1).describe("Stable id for the section"),
|
|
19277
|
+
description: exports_external.string().min(1).describe("What this section looks like in the document. Use the document's own terminology (e.g. 'Príloha 2 / Anlage 2') and visual cues."),
|
|
19278
|
+
required: exports_external.boolean().optional().describe('If true, log a warn when this section is not found, and lean the LLM toward expecting it. Default: false (Reducto-style "may be absent").'),
|
|
19279
|
+
endHints: exports_external.array(exports_external.string()).optional().describe('Natural-language hints fed to the LLM about what marks the END of this section (e.g. ["PRÍPAD PORUŠENIA ZMLUVY", "*Koniec prílohy*", "the next chapter heading"]). The LLM uses these as guidance — not a regex match — so casing variants, missing diacritics, and multilingual phrasings still close the section correctly. The LLM emits a structured end_anchor per section it judges closed; deterministic merge applies it.')
|
|
19280
|
+
})).min(1),
|
|
19281
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19282
|
+
provider: exports_external.string().optional().describe('Provider ID from eigenpal.config.yaml (e.g. "openai-gpt5.4-mini"). Falls back to the tenant default LLM provider when omitted.'),
|
|
19283
|
+
windowTokenBudget: exports_external.number().int().positive().optional().describe("Per-window token ceiling. Defaults to env SPLIT_WINDOW_TOKEN_BUDGET or 20000. Smaller windows give sharper anchors on contract-style documents (less competing context for the LLM to mis-anchor on); 50k–100k when sections routinely exceed per-window page count.")
|
|
19284
|
+
});
|
|
19285
|
+
ConfidenceLevelSchema = exports_external.enum(["low", "medium", "high"]).describe("LLM confidence as a coarse enum. Numeric (0..1) confidences cluster at 0.85–0.95 and gradations are noise; low/medium/high is reliable.");
|
|
19286
|
+
SplitOutputSchema = exports_external.object({
|
|
19287
|
+
splits: exports_external.array(exports_external.object({
|
|
19288
|
+
name: exports_external.string(),
|
|
19289
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19290
|
+
confidence: ConfidenceLevelSchema.describe("LLM confidence at the start anchor: low | medium | high."),
|
|
19291
|
+
notes: exports_external.string(),
|
|
19292
|
+
evidence: exports_external.object({
|
|
19293
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
|
|
19294
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
|
|
19295
|
+
}).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
|
|
19296
|
+
end_evidence: exports_external.object({
|
|
19297
|
+
end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
|
|
19298
|
+
confidence: ConfidenceLevelSchema,
|
|
19299
|
+
notes: exports_external.string().describe("LLM justification for the end. Pairs with start-anchor `notes` so a reconciliation pass can judge whether the section is correctly bounded.")
|
|
19300
|
+
}).optional().describe("Set when the LLM flagged a section close (matched against `endHints` or detected end-of-section markers). Absent when the section was closed by deterministic continuity-fill (next section start - 1)."),
|
|
19301
|
+
text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
|
|
19302
|
+
pages: exports_external.array(exports_external.object({
|
|
19303
|
+
pageIndex: exports_external.number().int(),
|
|
19304
|
+
text: exports_external.string(),
|
|
19305
|
+
pageName: exports_external.string().optional(),
|
|
19306
|
+
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
|
|
19307
|
+
})).describe("Raw per-page records covered by this split (in page order). Use when downstream needs to iterate page-by-page rather than treating the section as one blob."),
|
|
19308
|
+
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19309
|
+
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19310
|
+
}))
|
|
19311
|
+
});
|
|
19312
|
+
});
|
|
19313
|
+
|
|
19314
|
+
// ../types/src/processor/configs/template.ts
|
|
19315
|
+
var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
|
|
19316
|
+
var init_template = __esm(() => {
|
|
19317
|
+
init_zod();
|
|
19318
|
+
TemplateInputSchema = exports_external.object({
|
|
19319
|
+
data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
|
|
19320
|
+
});
|
|
19321
|
+
TemplateOutputSchema = exports_external.object({
|
|
19322
|
+
fileId: exports_external.string().describe("File ID from files table")
|
|
19323
|
+
});
|
|
19324
|
+
TemplateConfigSchema = exports_external.object({
|
|
19325
|
+
templateId: exports_external.string().describe("ID of the template from templates table"),
|
|
19326
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
|
|
19327
|
+
highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
|
|
19328
|
+
notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
|
|
19329
|
+
});
|
|
19330
|
+
});
|
|
19331
|
+
|
|
19332
|
+
// ../types/src/processor/configs/xlsx-to-json.ts
|
|
19333
|
+
var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
|
|
19334
|
+
var init_xlsx_to_json = __esm(() => {
|
|
19335
|
+
init_zod();
|
|
19336
|
+
init_document_parser();
|
|
19337
|
+
XlsxToJsonInputSchema = exports_external.union([FileIdInputSchema, FilePathDescriptorSchema]);
|
|
19338
|
+
XlsxToJsonOutputSchema = exports_external.object({
|
|
19339
|
+
rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
|
|
19340
|
+
fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
|
|
19341
|
+
});
|
|
19342
|
+
XlsxToJsonConfigSchema = exports_external.object({
|
|
19343
|
+
sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
|
|
19344
|
+
outputCsv: exports_external.boolean().default(false).optional(),
|
|
19345
|
+
outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
|
|
19346
|
+
});
|
|
19347
|
+
});
|
|
19348
|
+
|
|
19349
|
+
// ../types/src/processor/configs/react-hook-form.ts
|
|
19350
|
+
function extractFieldMetadata(schema) {
|
|
19351
|
+
const fields = [];
|
|
19352
|
+
let inner = schema;
|
|
19353
|
+
while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
|
|
19354
|
+
inner = inner.unwrap();
|
|
19355
|
+
}
|
|
19356
|
+
if (inner instanceof exports_external.ZodObject) {
|
|
19357
|
+
for (const [name, fieldSchema] of Object.entries(inner.shape)) {
|
|
19358
|
+
fields.push(extractSingleFieldMetadata(name, fieldSchema));
|
|
19359
|
+
}
|
|
19360
|
+
}
|
|
19361
|
+
return fields;
|
|
19362
|
+
}
|
|
19363
|
+
function extractSingleFieldMetadata(name, schema) {
|
|
19364
|
+
let current = schema;
|
|
19365
|
+
let required2 = true;
|
|
19366
|
+
let defaultValue = undefined;
|
|
19367
|
+
let description = current.description;
|
|
19368
|
+
while (true) {
|
|
19369
|
+
if (current instanceof exports_external.ZodOptional) {
|
|
19370
|
+
required2 = false;
|
|
19371
|
+
current = current.unwrap();
|
|
19372
|
+
} else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
|
|
19373
|
+
defaultValue = current._def.defaultValue;
|
|
19374
|
+
current = current.unwrap();
|
|
19375
|
+
} else {
|
|
19376
|
+
break;
|
|
19377
|
+
}
|
|
19378
|
+
description ??= current.description;
|
|
19379
|
+
}
|
|
19380
|
+
const base = { name, type: "unknown", required: required2, description, defaultValue };
|
|
19381
|
+
if (current instanceof exports_external.ZodString)
|
|
19382
|
+
return { ...base, type: "string" };
|
|
19383
|
+
if (current instanceof exports_external.ZodNumber) {
|
|
19384
|
+
let min;
|
|
19385
|
+
let max;
|
|
19386
|
+
for (const c of current._def.checks ?? []) {
|
|
19387
|
+
const def = c._zod.def;
|
|
19388
|
+
if (def.check === "greater_than")
|
|
19389
|
+
min = def.value;
|
|
19390
|
+
if (def.check === "less_than")
|
|
19391
|
+
max = def.value;
|
|
19392
|
+
}
|
|
19393
|
+
return { ...base, type: "number", min, max };
|
|
19394
|
+
}
|
|
19395
|
+
if (current instanceof exports_external.ZodBoolean)
|
|
19396
|
+
return { ...base, type: "boolean" };
|
|
19397
|
+
if (current instanceof exports_external.ZodEnum) {
|
|
19398
|
+
return { ...base, type: "enum", enumValues: current.options };
|
|
19399
|
+
}
|
|
19400
|
+
if (current instanceof exports_external.ZodArray)
|
|
19401
|
+
return { ...base, type: "array" };
|
|
19402
|
+
if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
|
|
19403
|
+
return { ...base, type: "object" };
|
|
19404
|
+
}
|
|
19405
|
+
return base;
|
|
19406
|
+
}
|
|
19407
|
+
function getConfigFieldMetadata(processorId) {
|
|
19408
|
+
const schema = getConfigSchema(processorId);
|
|
19409
|
+
if (!schema)
|
|
19410
|
+
return;
|
|
19411
|
+
return extractFieldMetadata(schema);
|
|
19412
|
+
}
|
|
19413
|
+
function getConfigDefaults(processorId) {
|
|
19414
|
+
const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19415
|
+
if (!schema)
|
|
19416
|
+
return {};
|
|
19417
|
+
try {
|
|
19418
|
+
const result = schema.safeParse({});
|
|
19419
|
+
if (result.success) {
|
|
19420
|
+
return result.data;
|
|
19421
|
+
}
|
|
19422
|
+
} catch {}
|
|
19423
|
+
const fields = extractFieldMetadata(schema);
|
|
19424
|
+
const defaults = {};
|
|
19425
|
+
for (const field of fields) {
|
|
19426
|
+
if (field.defaultValue !== undefined) {
|
|
19427
|
+
defaults[field.name] = field.defaultValue;
|
|
19428
|
+
}
|
|
19429
|
+
}
|
|
19430
|
+
return defaults;
|
|
19431
|
+
}
|
|
19432
|
+
function validateConfig(processorId, config2) {
|
|
19433
|
+
const schema = getConfigSchema(processorId);
|
|
19434
|
+
if (!schema) {
|
|
19435
|
+
return { valid: true, errors: {} };
|
|
19436
|
+
}
|
|
19437
|
+
const result = schema.safeParse(config2);
|
|
19438
|
+
if (result.success) {
|
|
19439
|
+
return { valid: true, errors: {} };
|
|
19440
|
+
}
|
|
19441
|
+
const errors3 = {};
|
|
19442
|
+
for (const issue2 of result.error.issues) {
|
|
19443
|
+
const path = issue2.path.join(".");
|
|
19444
|
+
errors3[path] = issue2.message;
|
|
19445
|
+
}
|
|
19446
|
+
return { valid: false, errors: errors3 };
|
|
19447
|
+
}
|
|
19448
|
+
var init_react_hook_form = __esm(() => {
|
|
19449
|
+
init_zod();
|
|
19450
|
+
init_configs();
|
|
19451
|
+
});
|
|
19452
|
+
|
|
19453
|
+
// ../types/src/processor/configs/index.ts
|
|
19454
|
+
function getProcessorSchemas(processorId) {
|
|
19455
|
+
return PROCESSOR_SCHEMAS[processorId];
|
|
19456
|
+
}
|
|
19457
|
+
function getConfigSchema(processorId) {
|
|
19458
|
+
return PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19459
|
+
}
|
|
19460
|
+
function getAllProcessorJsonSchemas() {
|
|
19461
|
+
return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
|
|
19462
|
+
id: p.id,
|
|
19463
|
+
inputSchema: toJsonSchema(p.inputSchema),
|
|
19464
|
+
outputSchema: toJsonSchema(p.outputSchema),
|
|
19465
|
+
configSchema: toJsonSchema(p.configSchema)
|
|
19466
|
+
}));
|
|
19467
|
+
}
|
|
19468
|
+
function listProcessorIds() {
|
|
19469
|
+
return Object.keys(PROCESSOR_SCHEMAS);
|
|
19470
|
+
}
|
|
19471
|
+
var PROCESSOR_SCHEMAS;
|
|
19472
|
+
var init_configs = __esm(() => {
|
|
19473
|
+
init_common();
|
|
19474
|
+
init_ids();
|
|
19475
|
+
init_classify();
|
|
19476
|
+
init_document_parser();
|
|
19477
|
+
init_extract();
|
|
19478
|
+
init_merge();
|
|
19479
|
+
init_pdf_embedder();
|
|
19480
|
+
init_split();
|
|
19481
|
+
init_template();
|
|
19482
|
+
init_xlsx_to_json();
|
|
19483
|
+
init_react_hook_form();
|
|
19484
|
+
init_classify();
|
|
19485
|
+
init_document_parser();
|
|
19486
|
+
init_extract();
|
|
19487
|
+
init_merge();
|
|
19488
|
+
init_pdf_embedder();
|
|
19489
|
+
init_split();
|
|
19490
|
+
init_template();
|
|
19491
|
+
init_xlsx_to_json();
|
|
19492
|
+
PROCESSOR_SCHEMAS = {
|
|
19493
|
+
[PROCESSOR_IDS.EXTRACT]: {
|
|
19494
|
+
id: PROCESSOR_IDS.EXTRACT,
|
|
19495
|
+
inputSchema: ExtractInputSchema,
|
|
19496
|
+
outputSchema: ExtractOutputSchema,
|
|
19497
|
+
configSchema: ExtractConfigSchema
|
|
19498
|
+
},
|
|
19499
|
+
[PROCESSOR_IDS.DOCUMENT_PARSER]: {
|
|
19500
|
+
id: PROCESSOR_IDS.DOCUMENT_PARSER,
|
|
19501
|
+
inputSchema: DocumentParserInputSchema,
|
|
19502
|
+
outputSchema: DocumentParserOutputSchema,
|
|
19503
|
+
configSchema: DocumentParserConfigSchema
|
|
19504
|
+
},
|
|
19505
|
+
[PROCESSOR_IDS.MERGE]: {
|
|
19506
|
+
id: PROCESSOR_IDS.MERGE,
|
|
19507
|
+
inputSchema: MergeInputSchema,
|
|
19508
|
+
outputSchema: MergeOutputSchema,
|
|
19509
|
+
configSchema: MergeConfigSchema
|
|
19510
|
+
},
|
|
19511
|
+
[PROCESSOR_IDS.TEMPLATE]: {
|
|
19512
|
+
id: PROCESSOR_IDS.TEMPLATE,
|
|
19513
|
+
inputSchema: TemplateInputSchema,
|
|
19514
|
+
outputSchema: TemplateOutputSchema,
|
|
19515
|
+
configSchema: TemplateConfigSchema
|
|
19516
|
+
},
|
|
19517
|
+
[PROCESSOR_IDS.PDF_EMBEDDER]: {
|
|
19518
|
+
id: PROCESSOR_IDS.PDF_EMBEDDER,
|
|
19519
|
+
inputSchema: PdfEmbedderInputSchema,
|
|
19520
|
+
outputSchema: PdfEmbedderOutputSchema,
|
|
19521
|
+
configSchema: PdfEmbedderConfigSchema
|
|
19522
|
+
},
|
|
19523
|
+
[PROCESSOR_IDS.SPLIT]: {
|
|
19524
|
+
id: PROCESSOR_IDS.SPLIT,
|
|
19525
|
+
inputSchema: SplitInputSchema,
|
|
19526
|
+
outputSchema: SplitOutputSchema,
|
|
19527
|
+
configSchema: SplitConfigSchema
|
|
19528
|
+
},
|
|
19529
|
+
[PROCESSOR_IDS.CLASSIFY]: {
|
|
19530
|
+
id: PROCESSOR_IDS.CLASSIFY,
|
|
19531
|
+
inputSchema: ClassifyInputSchema,
|
|
19532
|
+
outputSchema: ClassifyOutputSchema,
|
|
19533
|
+
configSchema: ClassifyConfigSchema
|
|
19534
|
+
},
|
|
19535
|
+
[PROCESSOR_IDS.XLSX_TO_JSON]: {
|
|
19536
|
+
id: PROCESSOR_IDS.XLSX_TO_JSON,
|
|
19537
|
+
inputSchema: XlsxToJsonInputSchema,
|
|
19538
|
+
outputSchema: XlsxToJsonOutputSchema,
|
|
19539
|
+
configSchema: XlsxToJsonConfigSchema
|
|
19540
|
+
}
|
|
19541
|
+
};
|
|
19542
|
+
});
|
|
17085
19543
|
|
|
17086
19544
|
// ../types/src/processor/index.ts
|
|
17087
|
-
var
|
|
19545
|
+
var init_processor2 = __esm(() => {
|
|
19546
|
+
init_processor();
|
|
19547
|
+
init_execution();
|
|
19548
|
+
init_configs();
|
|
19549
|
+
});
|
|
17088
19550
|
|
|
17089
19551
|
// ../types/src/parser/index.ts
|
|
17090
|
-
var
|
|
19552
|
+
var init_parser2 = __esm(() => {
|
|
19553
|
+
init_parser();
|
|
19554
|
+
});
|
|
17091
19555
|
|
|
17092
19556
|
// ../types/src/otel/semantic-conventions.ts
|
|
17093
19557
|
function mapLLMAttributes(attrs) {
|
|
@@ -20407,7 +22871,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
20407
22871
|
});
|
|
20408
22872
|
|
|
20409
22873
|
// ../../node_modules/fast-uri/lib/utils.js
|
|
20410
|
-
var
|
|
22874
|
+
var require_utils3 = __commonJS((exports, module) => {
|
|
20411
22875
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
20412
22876
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
20413
22877
|
function stringArrayToHexStripped(input) {
|
|
@@ -20663,7 +23127,7 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
20663
23127
|
|
|
20664
23128
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
20665
23129
|
var require_schemes = __commonJS((exports, module) => {
|
|
20666
|
-
var { isUUID } =
|
|
23130
|
+
var { isUUID } = require_utils3();
|
|
20667
23131
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
20668
23132
|
var supportedSchemeNames = [
|
|
20669
23133
|
"http",
|
|
@@ -20837,7 +23301,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
20837
23301
|
|
|
20838
23302
|
// ../../node_modules/fast-uri/index.js
|
|
20839
23303
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
20840
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } =
|
|
23304
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils3();
|
|
20841
23305
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
20842
23306
|
function normalize(uri, options) {
|
|
20843
23307
|
if (typeof uri === "string") {
|
|
@@ -23247,7 +25711,7 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
23247
25711
|
});
|
|
23248
25712
|
|
|
23249
25713
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
23250
|
-
var
|
|
25714
|
+
var require_types2 = __commonJS((exports) => {
|
|
23251
25715
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23252
25716
|
exports.DiscrError = undefined;
|
|
23253
25717
|
var DiscrError;
|
|
@@ -23261,7 +25725,7 @@ var require_types = __commonJS((exports) => {
|
|
|
23261
25725
|
var require_discriminator = __commonJS((exports) => {
|
|
23262
25726
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23263
25727
|
var codegen_1 = require_codegen();
|
|
23264
|
-
var types_1 =
|
|
25728
|
+
var types_1 = require_types2();
|
|
23265
25729
|
var compile_1 = require_compile();
|
|
23266
25730
|
var ref_error_1 = require_ref_error();
|
|
23267
25731
|
var util_1 = require_util();
|
|
@@ -24194,24 +26658,6 @@ var init_validation = __esm(() => {
|
|
|
24194
26658
|
init_workspace_schema();
|
|
24195
26659
|
});
|
|
24196
26660
|
|
|
24197
|
-
// ../types/src/core/common.ts
|
|
24198
|
-
function toJsonSchema2(schema) {
|
|
24199
|
-
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
24200
|
-
}
|
|
24201
|
-
var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
|
|
24202
|
-
var init_common = __esm(() => {
|
|
24203
|
-
init_zod();
|
|
24204
|
-
TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
24205
|
-
return typeof val === "string" ? new Date(val) : val;
|
|
24206
|
-
});
|
|
24207
|
-
JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
24208
|
-
BaseEntitySchema2 = exports_external.object({
|
|
24209
|
-
id: exports_external.string(),
|
|
24210
|
-
createdAt: TimestampSchema2.optional(),
|
|
24211
|
-
updatedAt: TimestampSchema2.optional()
|
|
24212
|
-
});
|
|
24213
|
-
});
|
|
24214
|
-
|
|
24215
26661
|
// ../../node_modules/@babel/parser/lib/index.js
|
|
24216
26662
|
var require_lib = __commonJS((exports) => {
|
|
24217
26663
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -24625,12 +27071,12 @@ var require_lib = __commonJS((exports) => {
|
|
|
24625
27071
|
}
|
|
24626
27072
|
const ParseErrorConstructors = {};
|
|
24627
27073
|
for (const reasonCode of Object.keys(argument)) {
|
|
24628
|
-
const
|
|
24629
|
-
const _ref = typeof
|
|
24630
|
-
message: () =>
|
|
24631
|
-
} : typeof
|
|
24632
|
-
message:
|
|
24633
|
-
} :
|
|
27074
|
+
const template2 = argument[reasonCode];
|
|
27075
|
+
const _ref = typeof template2 === "string" ? {
|
|
27076
|
+
message: () => template2
|
|
27077
|
+
} : typeof template2 === "function" ? {
|
|
27078
|
+
message: template2
|
|
27079
|
+
} : template2, {
|
|
24634
27080
|
message
|
|
24635
27081
|
} = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
24636
27082
|
const toMessage = typeof message === "string" ? () => message : message;
|
|
@@ -39103,7 +41549,7 @@ var require_keywords = __commonJS((exports) => {
|
|
|
39103
41549
|
});
|
|
39104
41550
|
|
|
39105
41551
|
// ../../node_modules/sucrase/dist/parser/tokenizer/types.js
|
|
39106
|
-
var
|
|
41552
|
+
var require_types3 = __commonJS((exports) => {
|
|
39107
41553
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39108
41554
|
var TokenType;
|
|
39109
41555
|
(function(TokenType2) {
|
|
@@ -39167,8 +41613,8 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39167
41613
|
TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
|
|
39168
41614
|
const arrow = 22528;
|
|
39169
41615
|
TokenType2[TokenType2["arrow"] = arrow] = "arrow";
|
|
39170
|
-
const
|
|
39171
|
-
TokenType2[TokenType2["template"] =
|
|
41616
|
+
const template2 = 23552;
|
|
41617
|
+
TokenType2[TokenType2["template"] = template2] = "template";
|
|
39172
41618
|
const ellipsis = 24576;
|
|
39173
41619
|
TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
|
|
39174
41620
|
const backQuote = 25600;
|
|
@@ -39587,7 +42033,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39587
42033
|
var require_state = __commonJS((exports) => {
|
|
39588
42034
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39589
42035
|
var _keywords = require_keywords();
|
|
39590
|
-
var _types =
|
|
42036
|
+
var _types = require_types3();
|
|
39591
42037
|
|
|
39592
42038
|
class Scope {
|
|
39593
42039
|
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
|
|
@@ -39973,7 +42419,7 @@ var require_base = __commonJS((exports) => {
|
|
|
39973
42419
|
var require_util2 = __commonJS((exports) => {
|
|
39974
42420
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39975
42421
|
var _index = require_tokenizer();
|
|
39976
|
-
var _types =
|
|
42422
|
+
var _types = require_types3();
|
|
39977
42423
|
var _charcodes = require_charcodes();
|
|
39978
42424
|
var _base = require_base();
|
|
39979
42425
|
function isContextual(contextualKeyword) {
|
|
@@ -40135,7 +42581,7 @@ var require_identifier = __commonJS((exports) => {
|
|
|
40135
42581
|
var require_readWordTree = __commonJS((exports) => {
|
|
40136
42582
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40137
42583
|
var _keywords = require_keywords();
|
|
40138
|
-
var _types =
|
|
42584
|
+
var _types = require_types3();
|
|
40139
42585
|
var READ_WORD_TREE = new Int32Array([
|
|
40140
42586
|
-1,
|
|
40141
42587
|
27,
|
|
@@ -49113,7 +51559,7 @@ var require_readWord = __commonJS((exports) => {
|
|
|
49113
51559
|
var _identifier = require_identifier();
|
|
49114
51560
|
var _index = require_tokenizer();
|
|
49115
51561
|
var _readWordTree = require_readWordTree();
|
|
49116
|
-
var _types =
|
|
51562
|
+
var _types = require_types3();
|
|
49117
51563
|
function readWord() {
|
|
49118
51564
|
let treePos = 0;
|
|
49119
51565
|
let code = 0;
|
|
@@ -49179,7 +51625,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
49179
51625
|
var _keywords = require_keywords();
|
|
49180
51626
|
var _readWord = require_readWord();
|
|
49181
51627
|
var _readWord2 = _interopRequireDefault(_readWord);
|
|
49182
|
-
var _types =
|
|
51628
|
+
var _types = require_types3();
|
|
49183
51629
|
var IdentifierRole;
|
|
49184
51630
|
(function(IdentifierRole2) {
|
|
49185
51631
|
const Access = 0;
|
|
@@ -49896,7 +52342,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
49896
52342
|
// ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
|
|
49897
52343
|
var require_getImportExportSpecifierInfo = __commonJS((exports) => {
|
|
49898
52344
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49899
|
-
var _types =
|
|
52345
|
+
var _types = require_types3();
|
|
49900
52346
|
function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
|
|
49901
52347
|
let endIndex = index + 1;
|
|
49902
52348
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
@@ -50249,7 +52695,7 @@ var require_JSXTransformer = __commonJS((exports) => {
|
|
|
50249
52695
|
var _xhtml = require_xhtml();
|
|
50250
52696
|
var _xhtml2 = _interopRequireDefault(_xhtml);
|
|
50251
52697
|
var _tokenizer = require_tokenizer();
|
|
50252
|
-
var _types =
|
|
52698
|
+
var _types = require_types3();
|
|
50253
52699
|
var _charcodes = require_charcodes();
|
|
50254
52700
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
50255
52701
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -50753,7 +53199,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
|
|
|
50753
53199
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
50754
53200
|
}
|
|
50755
53201
|
var _tokenizer = require_tokenizer();
|
|
50756
|
-
var _types =
|
|
53202
|
+
var _types = require_types3();
|
|
50757
53203
|
var _JSXTransformer = require_JSXTransformer();
|
|
50758
53204
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
50759
53205
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -50792,7 +53238,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
|
|
|
50792
53238
|
}
|
|
50793
53239
|
var _tokenizer = require_tokenizer();
|
|
50794
53240
|
var _keywords = require_keywords();
|
|
50795
|
-
var _types =
|
|
53241
|
+
var _types = require_types3();
|
|
50796
53242
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
50797
53243
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
50798
53244
|
var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
|
|
@@ -52827,7 +55273,7 @@ var require_HelperManager = __commonJS((exports) => {
|
|
|
52827
55273
|
var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
52828
55274
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52829
55275
|
var _tokenizer = require_tokenizer();
|
|
52830
|
-
var _types =
|
|
55276
|
+
var _types = require_types3();
|
|
52831
55277
|
function identifyShadowedGlobals(tokens, scopes, globalNames) {
|
|
52832
55278
|
if (!hasShadowedGlobals(tokens, globalNames)) {
|
|
52833
55279
|
return;
|
|
@@ -52892,7 +55338,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
|
52892
55338
|
// ../../node_modules/sucrase/dist/util/getIdentifierNames.js
|
|
52893
55339
|
var require_getIdentifierNames = __commonJS((exports) => {
|
|
52894
55340
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52895
|
-
var _types =
|
|
55341
|
+
var _types = require_types3();
|
|
52896
55342
|
function getIdentifierNames(code, tokens) {
|
|
52897
55343
|
const names = [];
|
|
52898
55344
|
for (const token of tokens) {
|
|
@@ -53068,7 +55514,7 @@ var require_util3 = __commonJS((exports) => {
|
|
|
53068
55514
|
});
|
|
53069
55515
|
|
|
53070
55516
|
// ../../node_modules/ts-interface-checker/dist/types.js
|
|
53071
|
-
var
|
|
55517
|
+
var require_types4 = __commonJS((exports) => {
|
|
53072
55518
|
var __extends = exports && exports.__extends || function() {
|
|
53073
55519
|
var extendStatics = function(d, b) {
|
|
53074
55520
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -53668,9 +56114,9 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
53668
56114
|
};
|
|
53669
56115
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53670
56116
|
exports.Checker = exports.createCheckers = undefined;
|
|
53671
|
-
var types_1 =
|
|
56117
|
+
var types_1 = require_types4();
|
|
53672
56118
|
var util_1 = require_util3();
|
|
53673
|
-
var types_2 =
|
|
56119
|
+
var types_2 = require_types4();
|
|
53674
56120
|
Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
|
|
53675
56121
|
return types_2.TArray;
|
|
53676
56122
|
} });
|
|
@@ -53952,7 +56398,7 @@ var require_lval = __commonJS((exports) => {
|
|
|
53952
56398
|
var _typescript = require_typescript();
|
|
53953
56399
|
var _index = require_tokenizer();
|
|
53954
56400
|
var _keywords = require_keywords();
|
|
53955
|
-
var _types =
|
|
56401
|
+
var _types = require_types3();
|
|
53956
56402
|
var _base = require_base();
|
|
53957
56403
|
var _expression = require_expression();
|
|
53958
56404
|
var _util = require_util2();
|
|
@@ -54084,7 +56530,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
54084
56530
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54085
56531
|
var _index = require_tokenizer();
|
|
54086
56532
|
var _keywords = require_keywords();
|
|
54087
|
-
var _types =
|
|
56533
|
+
var _types = require_types3();
|
|
54088
56534
|
var _base = require_base();
|
|
54089
56535
|
var _expression = require_expression();
|
|
54090
56536
|
var _lval = require_lval();
|
|
@@ -55346,7 +57792,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
55346
57792
|
var require_jsx = __commonJS((exports) => {
|
|
55347
57793
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55348
57794
|
var _index = require_tokenizer();
|
|
55349
|
-
var _types =
|
|
57795
|
+
var _types = require_types3();
|
|
55350
57796
|
var _base = require_base();
|
|
55351
57797
|
var _expression = require_expression();
|
|
55352
57798
|
var _util = require_util2();
|
|
@@ -55609,10 +58055,10 @@ var require_jsx = __commonJS((exports) => {
|
|
|
55609
58055
|
});
|
|
55610
58056
|
|
|
55611
58057
|
// ../../node_modules/sucrase/dist/parser/plugins/types.js
|
|
55612
|
-
var
|
|
58058
|
+
var require_types5 = __commonJS((exports) => {
|
|
55613
58059
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55614
58060
|
var _index = require_tokenizer();
|
|
55615
|
-
var _types =
|
|
58061
|
+
var _types = require_types3();
|
|
55616
58062
|
var _base = require_base();
|
|
55617
58063
|
var _expression = require_expression();
|
|
55618
58064
|
var _flow = require_flow();
|
|
@@ -55645,12 +58091,12 @@ var require_expression = __commonJS((exports) => {
|
|
|
55645
58091
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55646
58092
|
var _flow = require_flow();
|
|
55647
58093
|
var _index = require_jsx();
|
|
55648
|
-
var _types =
|
|
58094
|
+
var _types = require_types5();
|
|
55649
58095
|
var _typescript = require_typescript();
|
|
55650
58096
|
var _index3 = require_tokenizer();
|
|
55651
58097
|
var _keywords = require_keywords();
|
|
55652
58098
|
var _state = require_state();
|
|
55653
|
-
var _types3 =
|
|
58099
|
+
var _types3 = require_types3();
|
|
55654
58100
|
var _charcodes = require_charcodes();
|
|
55655
58101
|
var _identifier = require_identifier();
|
|
55656
58102
|
var _base = require_base();
|
|
@@ -56366,7 +58812,7 @@ var require_flow = __commonJS((exports) => {
|
|
|
56366
58812
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56367
58813
|
var _index = require_tokenizer();
|
|
56368
58814
|
var _keywords = require_keywords();
|
|
56369
|
-
var _types =
|
|
58815
|
+
var _types = require_types3();
|
|
56370
58816
|
var _base = require_base();
|
|
56371
58817
|
var _expression = require_expression();
|
|
56372
58818
|
var _statement = require_statement();
|
|
@@ -57241,7 +59687,7 @@ var require_statement = __commonJS((exports) => {
|
|
|
57241
59687
|
var _tokenizer = require_tokenizer();
|
|
57242
59688
|
var _keywords = require_keywords();
|
|
57243
59689
|
var _state = require_state();
|
|
57244
|
-
var _types =
|
|
59690
|
+
var _types = require_types3();
|
|
57245
59691
|
var _charcodes = require_charcodes();
|
|
57246
59692
|
var _base = require_base();
|
|
57247
59693
|
var _expression = require_expression();
|
|
@@ -58276,7 +60722,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58276
60722
|
function _interopRequireDefault(obj) {
|
|
58277
60723
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
58278
60724
|
}
|
|
58279
|
-
var _types =
|
|
60725
|
+
var _types = require_types3();
|
|
58280
60726
|
var _isAsyncOperation = require_isAsyncOperation();
|
|
58281
60727
|
var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
|
|
58282
60728
|
|
|
@@ -58534,7 +60980,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58534
60980
|
var require_getClassInfo = __commonJS((exports) => {
|
|
58535
60981
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58536
60982
|
var _keywords = require_keywords();
|
|
58537
|
-
var _types =
|
|
60983
|
+
var _types = require_types3();
|
|
58538
60984
|
function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
|
|
58539
60985
|
const snapshot = tokens.snapshot();
|
|
58540
60986
|
const headerInfo = processClassHeader(tokens);
|
|
@@ -58772,7 +61218,7 @@ var require_getClassInfo = __commonJS((exports) => {
|
|
|
58772
61218
|
// ../../node_modules/sucrase/dist/util/elideImportEquals.js
|
|
58773
61219
|
var require_elideImportEquals = __commonJS((exports) => {
|
|
58774
61220
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58775
|
-
var _types =
|
|
61221
|
+
var _types = require_types3();
|
|
58776
61222
|
function elideImportEquals(tokens) {
|
|
58777
61223
|
tokens.removeInitialToken();
|
|
58778
61224
|
tokens.removeToken();
|
|
@@ -58796,7 +61242,7 @@ var require_elideImportEquals = __commonJS((exports) => {
|
|
|
58796
61242
|
var require_getDeclarationInfo = __commonJS((exports) => {
|
|
58797
61243
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58798
61244
|
var _tokenizer = require_tokenizer();
|
|
58799
|
-
var _types =
|
|
61245
|
+
var _types = require_types3();
|
|
58800
61246
|
var EMPTY_DECLARATION_INFO = {
|
|
58801
61247
|
typeDeclarations: new Set,
|
|
58802
61248
|
valueDeclarations: new Set
|
|
@@ -58824,7 +61270,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
|
|
|
58824
61270
|
var require_isExportFrom = __commonJS((exports) => {
|
|
58825
61271
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58826
61272
|
var _keywords = require_keywords();
|
|
58827
|
-
var _types =
|
|
61273
|
+
var _types = require_types3();
|
|
58828
61274
|
function isExportFrom(tokens) {
|
|
58829
61275
|
let closeBraceIndex = tokens.currentIndex();
|
|
58830
61276
|
while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
|
@@ -58839,7 +61285,7 @@ var require_isExportFrom = __commonJS((exports) => {
|
|
|
58839
61285
|
var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
58840
61286
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58841
61287
|
var _keywords = require_keywords();
|
|
58842
|
-
var _types =
|
|
61288
|
+
var _types = require_types3();
|
|
58843
61289
|
function removeMaybeImportAttributes(tokens) {
|
|
58844
61290
|
if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
|
|
58845
61291
|
tokens.removeToken();
|
|
@@ -58854,7 +61300,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
|
58854
61300
|
// ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
|
|
58855
61301
|
var require_shouldElideDefaultExport = __commonJS((exports) => {
|
|
58856
61302
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58857
|
-
var _types =
|
|
61303
|
+
var _types = require_types3();
|
|
58858
61304
|
function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
|
|
58859
61305
|
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
|
|
58860
61306
|
return false;
|
|
@@ -58885,7 +61331,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
|
|
|
58885
61331
|
}
|
|
58886
61332
|
var _tokenizer = require_tokenizer();
|
|
58887
61333
|
var _keywords = require_keywords();
|
|
58888
|
-
var _types =
|
|
61334
|
+
var _types = require_types3();
|
|
58889
61335
|
var _elideImportEquals = require_elideImportEquals();
|
|
58890
61336
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
58891
61337
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -59527,7 +61973,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
|
|
|
59527
61973
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
59528
61974
|
}
|
|
59529
61975
|
var _keywords = require_keywords();
|
|
59530
|
-
var _types =
|
|
61976
|
+
var _types = require_types3();
|
|
59531
61977
|
var _elideImportEquals = require_elideImportEquals();
|
|
59532
61978
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
59533
61979
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -59797,7 +62243,7 @@ var require_FlowTransformer = __commonJS((exports) => {
|
|
|
59797
62243
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
59798
62244
|
}
|
|
59799
62245
|
var _keywords = require_keywords();
|
|
59800
|
-
var _types =
|
|
62246
|
+
var _types = require_types3();
|
|
59801
62247
|
var _Transformer = require_Transformer();
|
|
59802
62248
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
59803
62249
|
|
|
@@ -59917,7 +62363,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
|
|
|
59917
62363
|
}
|
|
59918
62364
|
return value;
|
|
59919
62365
|
}
|
|
59920
|
-
var _types =
|
|
62366
|
+
var _types = require_types3();
|
|
59921
62367
|
var _Transformer = require_Transformer();
|
|
59922
62368
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
59923
62369
|
var JEST_GLOBAL_NAME = "jest";
|
|
@@ -59991,7 +62437,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
|
|
|
59991
62437
|
function _interopRequireDefault(obj) {
|
|
59992
62438
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
59993
62439
|
}
|
|
59994
|
-
var _types =
|
|
62440
|
+
var _types = require_types3();
|
|
59995
62441
|
var _Transformer = require_Transformer();
|
|
59996
62442
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
59997
62443
|
|
|
@@ -60020,7 +62466,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
|
|
|
60020
62466
|
function _interopRequireDefault(obj) {
|
|
60021
62467
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60022
62468
|
}
|
|
60023
|
-
var _types =
|
|
62469
|
+
var _types = require_types3();
|
|
60024
62470
|
var _Transformer = require_Transformer();
|
|
60025
62471
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60026
62472
|
|
|
@@ -60048,7 +62494,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
|
|
|
60048
62494
|
function _interopRequireDefault(obj) {
|
|
60049
62495
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60050
62496
|
}
|
|
60051
|
-
var _types =
|
|
62497
|
+
var _types = require_types3();
|
|
60052
62498
|
var _Transformer = require_Transformer();
|
|
60053
62499
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60054
62500
|
|
|
@@ -60164,7 +62610,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
|
|
|
60164
62610
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60165
62611
|
}
|
|
60166
62612
|
var _tokenizer = require_tokenizer();
|
|
60167
|
-
var _types =
|
|
62613
|
+
var _types = require_types3();
|
|
60168
62614
|
var _Transformer = require_Transformer();
|
|
60169
62615
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60170
62616
|
|
|
@@ -60415,7 +62861,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
|
|
|
60415
62861
|
function _interopRequireDefault(obj) {
|
|
60416
62862
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60417
62863
|
}
|
|
60418
|
-
var _types =
|
|
62864
|
+
var _types = require_types3();
|
|
60419
62865
|
var _isIdentifier = require_isIdentifier();
|
|
60420
62866
|
var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
|
|
60421
62867
|
var _Transformer = require_Transformer();
|
|
@@ -60561,7 +63007,7 @@ var require_RootTransformer = __commonJS((exports) => {
|
|
|
60561
63007
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60562
63008
|
}
|
|
60563
63009
|
var _keywords = require_keywords();
|
|
60564
|
-
var _types =
|
|
63010
|
+
var _types = require_types3();
|
|
60565
63011
|
var _getClassInfo = require_getClassInfo();
|
|
60566
63012
|
var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
|
|
60567
63013
|
var _CJSImportTransformer = require_CJSImportTransformer();
|
|
@@ -60960,7 +63406,7 @@ var require_formatTokens = __commonJS((exports) => {
|
|
|
60960
63406
|
}
|
|
60961
63407
|
var _linesandcolumns = require_build();
|
|
60962
63408
|
var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
|
|
60963
|
-
var _types =
|
|
63409
|
+
var _types = require_types3();
|
|
60964
63410
|
function formatTokens(code, tokens) {
|
|
60965
63411
|
if (tokens.length === 0) {
|
|
60966
63412
|
return "";
|
|
@@ -61025,7 +63471,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
|
|
|
61025
63471
|
function _interopRequireDefault(obj) {
|
|
61026
63472
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
61027
63473
|
}
|
|
61028
|
-
var _types =
|
|
63474
|
+
var _types = require_types3();
|
|
61029
63475
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
61030
63476
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
61031
63477
|
function getTSImportedNames(tokens) {
|
|
@@ -61410,7 +63856,7 @@ function describeUnsupportedType(nodeType) {
|
|
|
61410
63856
|
function compileTypedScript(opts) {
|
|
61411
63857
|
let ast;
|
|
61412
63858
|
try {
|
|
61413
|
-
ast =
|
|
63859
|
+
ast = import_parser4.parse(opts.source, {
|
|
61414
63860
|
sourceType: "script",
|
|
61415
63861
|
plugins: ["typescript"],
|
|
61416
63862
|
ranges: true
|
|
@@ -61662,9 +64108,9 @@ function stripCommentsAndStrings(s) {
|
|
|
61662
64108
|
out = out.replace(/`(\\.|[^`\\])*`/g, "``");
|
|
61663
64109
|
return out;
|
|
61664
64110
|
}
|
|
61665
|
-
var
|
|
64111
|
+
var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
|
|
61666
64112
|
var init_compile = __esm(() => {
|
|
61667
|
-
|
|
64113
|
+
import_parser4 = __toESM(require_lib(), 1);
|
|
61668
64114
|
import_sucrase = __toESM(require_dist3(), 1);
|
|
61669
64115
|
EVALUATOR_PARAM_NAMES = ["expected", "actual"];
|
|
61670
64116
|
});
|
|
@@ -61878,8 +64324,8 @@ function getAllStepJsonSchemas() {
|
|
|
61878
64324
|
category: def.category,
|
|
61879
64325
|
name: def.name,
|
|
61880
64326
|
description: def.description,
|
|
61881
|
-
configSchema:
|
|
61882
|
-
outputSchema:
|
|
64327
|
+
configSchema: toJsonSchema(def.configSchema),
|
|
64328
|
+
outputSchema: toJsonSchema(def.outputSchema),
|
|
61883
64329
|
configInWith: def.configInWith
|
|
61884
64330
|
}));
|
|
61885
64331
|
}
|
|
@@ -62525,81 +64971,6 @@ var init_actions = __esm(() => {
|
|
|
62525
64971
|
ACTION_TYPES = ActionTypeSchema.options;
|
|
62526
64972
|
});
|
|
62527
64973
|
|
|
62528
|
-
// ../types/src/processor/execution.ts
|
|
62529
|
-
function asTuple(values) {
|
|
62530
|
-
return values;
|
|
62531
|
-
}
|
|
62532
|
-
var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
|
|
62533
|
-
var init_execution = __esm(() => {
|
|
62534
|
-
init_zod();
|
|
62535
|
-
WorkflowExecutionStatusValue2 = {
|
|
62536
|
-
CREATED: "created",
|
|
62537
|
-
PENDING: "pending",
|
|
62538
|
-
RUNNING: "running",
|
|
62539
|
-
WAITING: "waiting",
|
|
62540
|
-
COMPLETED: "completed",
|
|
62541
|
-
FAILED: "failed",
|
|
62542
|
-
CANCELLED: "cancelled"
|
|
62543
|
-
};
|
|
62544
|
-
WorkflowExecutionStatusSchema2 = exports_external.enum([
|
|
62545
|
-
WorkflowExecutionStatusValue2.CREATED,
|
|
62546
|
-
WorkflowExecutionStatusValue2.PENDING,
|
|
62547
|
-
WorkflowExecutionStatusValue2.RUNNING,
|
|
62548
|
-
WorkflowExecutionStatusValue2.WAITING,
|
|
62549
|
-
WorkflowExecutionStatusValue2.COMPLETED,
|
|
62550
|
-
WorkflowExecutionStatusValue2.FAILED,
|
|
62551
|
-
WorkflowExecutionStatusValue2.CANCELLED
|
|
62552
|
-
]);
|
|
62553
|
-
StepExecutionStatusValue2 = {
|
|
62554
|
-
PENDING: "pending",
|
|
62555
|
-
RUNNING: "running",
|
|
62556
|
-
SUCCESS: "success",
|
|
62557
|
-
FAILURE: "failure",
|
|
62558
|
-
WAITING: "waiting",
|
|
62559
|
-
SKIPPED: "skipped"
|
|
62560
|
-
};
|
|
62561
|
-
StepExecutionStatusSchema2 = exports_external.enum([
|
|
62562
|
-
StepExecutionStatusValue2.PENDING,
|
|
62563
|
-
StepExecutionStatusValue2.RUNNING,
|
|
62564
|
-
StepExecutionStatusValue2.SUCCESS,
|
|
62565
|
-
StepExecutionStatusValue2.FAILURE,
|
|
62566
|
-
StepExecutionStatusValue2.WAITING,
|
|
62567
|
-
StepExecutionStatusValue2.SKIPPED
|
|
62568
|
-
]);
|
|
62569
|
-
TriggerTypeValue2 = {
|
|
62570
|
-
MANUAL: "manual",
|
|
62571
|
-
API: "api",
|
|
62572
|
-
WEBHOOK: "webhook",
|
|
62573
|
-
SCHEDULE: "schedule",
|
|
62574
|
-
EMAIL: "email",
|
|
62575
|
-
EVAL: "eval",
|
|
62576
|
-
CLI: "cli"
|
|
62577
|
-
};
|
|
62578
|
-
TriggerTypeSchema2 = exports_external.enum([
|
|
62579
|
-
TriggerTypeValue2.MANUAL,
|
|
62580
|
-
TriggerTypeValue2.API,
|
|
62581
|
-
TriggerTypeValue2.WEBHOOK,
|
|
62582
|
-
TriggerTypeValue2.SCHEDULE,
|
|
62583
|
-
TriggerTypeValue2.EMAIL,
|
|
62584
|
-
TriggerTypeValue2.EVAL,
|
|
62585
|
-
TriggerTypeValue2.CLI
|
|
62586
|
-
]);
|
|
62587
|
-
ExecutionTypeValue2 = {
|
|
62588
|
-
PROD: "prod",
|
|
62589
|
-
EVAL: "eval",
|
|
62590
|
-
PLAYGROUND: "playground"
|
|
62591
|
-
};
|
|
62592
|
-
ExecutionTypeSchema2 = exports_external.enum([
|
|
62593
|
-
ExecutionTypeValue2.PROD,
|
|
62594
|
-
ExecutionTypeValue2.EVAL,
|
|
62595
|
-
ExecutionTypeValue2.PLAYGROUND
|
|
62596
|
-
]);
|
|
62597
|
-
WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
|
|
62598
|
-
STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
|
|
62599
|
-
TRIGGER_TYPES2 = TriggerTypeSchema2.options;
|
|
62600
|
-
EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
|
|
62601
|
-
});
|
|
62602
|
-
|
|
62603
64974
|
// ../types/src/workflow/workflow.ts
|
|
62604
64975
|
function suggestWorkflowName(raw) {
|
|
62605
64976
|
return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
|
|
@@ -62640,11 +65011,11 @@ var init_workflow = __esm(() => {
|
|
|
62640
65011
|
ManualTriggerMethodSchema = exports_external.object({
|
|
62641
65012
|
type: exports_external.literal("manual"),
|
|
62642
65013
|
enabled: exports_external.boolean().optional(),
|
|
62643
|
-
inputSchema:
|
|
65014
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
62644
65015
|
});
|
|
62645
65016
|
ApiTriggerMethodSchema = exports_external.object({
|
|
62646
65017
|
type: exports_external.literal("api"),
|
|
62647
|
-
inputSchema:
|
|
65018
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
62648
65019
|
});
|
|
62649
65020
|
EmailTriggerMethodSchema = exports_external.object({
|
|
62650
65021
|
type: exports_external.literal("email"),
|
|
@@ -62683,8 +65054,8 @@ var init_workflow = __esm(() => {
|
|
|
62683
65054
|
yamlContent: exports_external.string(),
|
|
62684
65055
|
definition: WorkflowDefinitionSchema,
|
|
62685
65056
|
isCurrent: exports_external.boolean().default(true),
|
|
62686
|
-
createdAt:
|
|
62687
|
-
updatedAt:
|
|
65057
|
+
createdAt: TimestampSchema,
|
|
65058
|
+
updatedAt: TimestampSchema.optional(),
|
|
62688
65059
|
createdBy: exports_external.string()
|
|
62689
65060
|
});
|
|
62690
65061
|
CreateWorkflowDefinitionSchema = exports_external.object({
|
|
@@ -62866,14 +65237,14 @@ function isFileOutput(value) {
|
|
|
62866
65237
|
function isWorkflowResult(value) {
|
|
62867
65238
|
return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
|
|
62868
65239
|
}
|
|
62869
|
-
var
|
|
65240
|
+
var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
62870
65241
|
var init_execution2 = __esm(() => {
|
|
62871
65242
|
init_zod();
|
|
62872
65243
|
init_common();
|
|
62873
65244
|
init_execution();
|
|
62874
65245
|
init_workflow();
|
|
62875
|
-
|
|
62876
|
-
|
|
65246
|
+
WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
|
|
65247
|
+
StepExecutionStatusSchema2 = StepExecutionStatusSchema;
|
|
62877
65248
|
ScopeEntryTypeSchema = exports_external.enum([
|
|
62878
65249
|
"root",
|
|
62879
65250
|
"if-then",
|
|
@@ -62895,7 +65266,7 @@ var init_execution2 = __esm(() => {
|
|
|
62895
65266
|
ScopeStackSchema = exports_external.array(ScopeEntrySchema);
|
|
62896
65267
|
StepResultSchema = exports_external.object({
|
|
62897
65268
|
output: exports_external.unknown(),
|
|
62898
|
-
status:
|
|
65269
|
+
status: StepExecutionStatusSchema2
|
|
62899
65270
|
});
|
|
62900
65271
|
ExecutionContextSchema = exports_external.object({
|
|
62901
65272
|
input: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
@@ -62923,7 +65294,7 @@ var init_execution2 = __esm(() => {
|
|
|
62923
65294
|
triggerType: exports_external.string(),
|
|
62924
65295
|
triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
|
|
62925
65296
|
overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
|
|
62926
|
-
status:
|
|
65297
|
+
status: WorkflowExecutionStatusSchema2,
|
|
62927
65298
|
scopeStack: ScopeStackSchema,
|
|
62928
65299
|
currentStepIndex: exports_external.number(),
|
|
62929
65300
|
stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
|
|
@@ -62931,15 +65302,15 @@ var init_execution2 = __esm(() => {
|
|
|
62931
65302
|
error: exports_external.string().nullable(),
|
|
62932
65303
|
priority: exports_external.number().default(50),
|
|
62933
65304
|
leaseId: exports_external.string().nullable(),
|
|
62934
|
-
leaseExpiresAt:
|
|
65305
|
+
leaseExpiresAt: TimestampSchema.nullable(),
|
|
62935
65306
|
workerId: exports_external.string().nullable(),
|
|
62936
65307
|
maxRetries: exports_external.number().default(0),
|
|
62937
65308
|
originalExecutionId: exports_external.string().nullable().optional(),
|
|
62938
65309
|
previousExecutionId: exports_external.string().nullable().optional(),
|
|
62939
65310
|
retryNumber: exports_external.number().default(0),
|
|
62940
|
-
createdAt:
|
|
62941
|
-
startedAt:
|
|
62942
|
-
completedAt:
|
|
65311
|
+
createdAt: TimestampSchema,
|
|
65312
|
+
startedAt: TimestampSchema.nullable(),
|
|
65313
|
+
completedAt: TimestampSchema.nullable(),
|
|
62943
65314
|
createdBy: exports_external.string().nullable()
|
|
62944
65315
|
});
|
|
62945
65316
|
StepExecutionSchema = exports_external.object({
|
|
@@ -62956,12 +65327,12 @@ var init_execution2 = __esm(() => {
|
|
|
62956
65327
|
stepAttempt: exports_external.number().default(0),
|
|
62957
65328
|
inputData: exports_external.unknown().nullable(),
|
|
62958
65329
|
outputData: exports_external.unknown().nullable(),
|
|
62959
|
-
status:
|
|
65330
|
+
status: StepExecutionStatusSchema2,
|
|
62960
65331
|
error: exports_external.string().nullable(),
|
|
62961
65332
|
overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
|
|
62962
65333
|
durationMs: exports_external.number().nullable(),
|
|
62963
|
-
startedAt:
|
|
62964
|
-
completedAt:
|
|
65334
|
+
startedAt: TimestampSchema.nullable(),
|
|
65335
|
+
completedAt: TimestampSchema.nullable()
|
|
62965
65336
|
});
|
|
62966
65337
|
ConnectorSchema = exports_external.object({
|
|
62967
65338
|
id: exports_external.string(),
|
|
@@ -62972,8 +65343,8 @@ var init_execution2 = __esm(() => {
|
|
|
62972
65343
|
config: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
62973
65344
|
inputSchema: exports_external.unknown().optional(),
|
|
62974
65345
|
outputSchema: exports_external.unknown().optional(),
|
|
62975
|
-
createdAt:
|
|
62976
|
-
updatedAt:
|
|
65346
|
+
createdAt: TimestampSchema,
|
|
65347
|
+
updatedAt: TimestampSchema.optional(),
|
|
62977
65348
|
createdBy: exports_external.string()
|
|
62978
65349
|
});
|
|
62979
65350
|
WorkflowFileOutputSchema = exports_external.object({
|
|
@@ -64472,11 +66843,11 @@ function walkGrammar(node, parts) {
|
|
|
64472
66843
|
}
|
|
64473
66844
|
return current;
|
|
64474
66845
|
}
|
|
64475
|
-
function normalizeTemplate(
|
|
64476
|
-
return
|
|
66846
|
+
function normalizeTemplate(template2) {
|
|
66847
|
+
return template2.endsWith("/") ? template2.slice(0, -1) : template2;
|
|
64477
66848
|
}
|
|
64478
|
-
function renderTemplate(
|
|
64479
|
-
return normalizeTemplate(
|
|
66849
|
+
function renderTemplate(template2, params) {
|
|
66850
|
+
return normalizeTemplate(template2).split("/").flatMap((part) => {
|
|
64480
66851
|
if (!part.startsWith(":")) {
|
|
64481
66852
|
return [part];
|
|
64482
66853
|
}
|
|
@@ -64491,31 +66862,31 @@ function renderTemplate(template, params) {
|
|
|
64491
66862
|
return [assertSegment(String(name), value)];
|
|
64492
66863
|
});
|
|
64493
66864
|
}
|
|
64494
|
-
function buildS3Path(tenantId,
|
|
66865
|
+
function buildS3Path(tenantId, template2, params) {
|
|
64495
66866
|
const tenant = assertSegment("tenantId", tenantId);
|
|
64496
|
-
const parts = renderTemplate(
|
|
66867
|
+
const parts = renderTemplate(template2, params);
|
|
64497
66868
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
64498
|
-
if (
|
|
64499
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66869
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
66870
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
64500
66871
|
}
|
|
64501
66872
|
const path = ["tenants", tenant, ...parts].join("/");
|
|
64502
|
-
return
|
|
66873
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
64503
66874
|
}
|
|
64504
|
-
function buildS3PathSuffix(
|
|
64505
|
-
const parts = renderTemplate(
|
|
66875
|
+
function buildS3PathSuffix(template2, params) {
|
|
66876
|
+
const parts = renderTemplate(template2, params);
|
|
64506
66877
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
64507
|
-
if (
|
|
64508
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66878
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
66879
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
64509
66880
|
}
|
|
64510
66881
|
const path = parts.join("/");
|
|
64511
|
-
return
|
|
66882
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
64512
66883
|
}
|
|
64513
66884
|
function stripTenantPrefix(key) {
|
|
64514
66885
|
return key.replace(TENANT_PREFIX_RX, "");
|
|
64515
66886
|
}
|
|
64516
|
-
function matchS3Path(
|
|
66887
|
+
function matchS3Path(template2, key) {
|
|
64517
66888
|
const keyParts = stripTenantPrefix(key).split("/");
|
|
64518
|
-
const templateParts = normalizeTemplate(
|
|
66889
|
+
const templateParts = normalizeTemplate(template2).split("/");
|
|
64519
66890
|
const params = {};
|
|
64520
66891
|
let keyIndex = 0;
|
|
64521
66892
|
for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
|
|
@@ -64568,23 +66939,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
|
|
|
64568
66939
|
}
|
|
64569
66940
|
return assertSegment("tenantId", tenantId);
|
|
64570
66941
|
};
|
|
64571
|
-
const build = (
|
|
66942
|
+
const build = (template2, params) => {
|
|
64572
66943
|
const tenant = resolveTenantId(params);
|
|
64573
|
-
const parts = renderTemplate(
|
|
66944
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
64574
66945
|
const node = walkGrammar(grammarNode, parts);
|
|
64575
|
-
if (
|
|
64576
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66946
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
66947
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
64577
66948
|
}
|
|
64578
66949
|
const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
|
|
64579
|
-
return
|
|
66950
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
64580
66951
|
};
|
|
64581
66952
|
const builder = build;
|
|
64582
|
-
builder.at = (
|
|
66953
|
+
builder.at = (template2, params) => {
|
|
64583
66954
|
const tenant = resolveTenantId(params);
|
|
64584
|
-
const parts = renderTemplate(
|
|
66955
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
64585
66956
|
const nextNode = walkGrammar(grammarNode, parts);
|
|
64586
|
-
if (
|
|
64587
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66957
|
+
if (template2.endsWith("/") && nextNode === PATH_LEAF) {
|
|
66958
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
64588
66959
|
}
|
|
64589
66960
|
return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
|
|
64590
66961
|
};
|
|
@@ -64943,7 +67314,7 @@ __export(exports_src, {
|
|
|
64943
67314
|
SplitConfigSchema: () => SplitConfigSchema,
|
|
64944
67315
|
SpanTypes: () => SpanTypes,
|
|
64945
67316
|
SpanKindMap: () => SpanKindMap,
|
|
64946
|
-
SpanKind: () => SpanKind,
|
|
67317
|
+
SpanKind: () => import_api.SpanKind,
|
|
64947
67318
|
SourceVersionRefSchema: () => SourceVersionRefSchema,
|
|
64948
67319
|
SourceSecretsFileSchema: () => SourceSecretsFileSchema,
|
|
64949
67320
|
SourcePackageTypeSchema: () => SourcePackageTypeSchema,
|
|
@@ -65145,8 +67516,8 @@ __export(exports_src, {
|
|
|
65145
67516
|
});
|
|
65146
67517
|
var init_src = __esm(() => {
|
|
65147
67518
|
init_core3();
|
|
65148
|
-
|
|
65149
|
-
|
|
67519
|
+
init_processor2();
|
|
67520
|
+
init_parser2();
|
|
65150
67521
|
init_otel();
|
|
65151
67522
|
init_execution_row();
|
|
65152
67523
|
init_run_expand();
|
|
@@ -66057,7 +68428,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
66057
68428
|
else
|
|
66058
68429
|
end = lineWidth - indentAtStart;
|
|
66059
68430
|
}
|
|
66060
|
-
let
|
|
68431
|
+
let split2 = undefined;
|
|
66061
68432
|
let prev = undefined;
|
|
66062
68433
|
let overflow = false;
|
|
66063
68434
|
let i = -1;
|
|
@@ -66091,20 +68462,20 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
66091
68462
|
if (mode === FOLD_BLOCK)
|
|
66092
68463
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
66093
68464
|
end = i + indent.length + endStep;
|
|
66094
|
-
|
|
68465
|
+
split2 = undefined;
|
|
66095
68466
|
} else {
|
|
66096
68467
|
if (ch === " " && prev && prev !== " " && prev !== `
|
|
66097
68468
|
` && prev !== "\t") {
|
|
66098
68469
|
const next = text[i + 1];
|
|
66099
68470
|
if (next && next !== " " && next !== `
|
|
66100
68471
|
` && next !== "\t")
|
|
66101
|
-
|
|
68472
|
+
split2 = i;
|
|
66102
68473
|
}
|
|
66103
68474
|
if (i >= end) {
|
|
66104
|
-
if (
|
|
66105
|
-
folds.push(
|
|
66106
|
-
end =
|
|
66107
|
-
|
|
68475
|
+
if (split2) {
|
|
68476
|
+
folds.push(split2);
|
|
68477
|
+
end = split2 + endStep;
|
|
68478
|
+
split2 = undefined;
|
|
66108
68479
|
} else if (mode === FOLD_QUOTED) {
|
|
66109
68480
|
while (prev === " " || prev === "\t") {
|
|
66110
68481
|
prev = ch;
|
|
@@ -66117,7 +68488,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
66117
68488
|
folds.push(j);
|
|
66118
68489
|
escapedFolds[j] = true;
|
|
66119
68490
|
end = j + endStep;
|
|
66120
|
-
|
|
68491
|
+
split2 = undefined;
|
|
66121
68492
|
} else {
|
|
66122
68493
|
overflow = true;
|
|
66123
68494
|
}
|
|
@@ -66751,7 +69122,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
66751
69122
|
var identity = require_identity();
|
|
66752
69123
|
var Scalar = require_Scalar();
|
|
66753
69124
|
var MERGE_KEY = "<<";
|
|
66754
|
-
var
|
|
69125
|
+
var merge3 = {
|
|
66755
69126
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
66756
69127
|
default: "key",
|
|
66757
69128
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -66761,7 +69132,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
66761
69132
|
}),
|
|
66762
69133
|
stringify: () => MERGE_KEY
|
|
66763
69134
|
};
|
|
66764
|
-
var isMergeKey = (ctx, key) => (
|
|
69135
|
+
var isMergeKey = (ctx, key) => (merge3.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge3.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
|
66765
69136
|
function addMergeToJSMap(ctx, map2, value) {
|
|
66766
69137
|
const source = resolveAliasValue(ctx, value);
|
|
66767
69138
|
if (identity.isSeq(source))
|
|
@@ -66800,21 +69171,21 @@ var require_merge = __commonJS((exports) => {
|
|
|
66800
69171
|
}
|
|
66801
69172
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
66802
69173
|
exports.isMergeKey = isMergeKey;
|
|
66803
|
-
exports.merge =
|
|
69174
|
+
exports.merge = merge3;
|
|
66804
69175
|
});
|
|
66805
69176
|
|
|
66806
69177
|
// node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
66807
69178
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
66808
69179
|
var log = require_log();
|
|
66809
|
-
var
|
|
69180
|
+
var merge3 = require_merge();
|
|
66810
69181
|
var stringify = require_stringify();
|
|
66811
69182
|
var identity = require_identity();
|
|
66812
69183
|
var toJS = require_toJS();
|
|
66813
69184
|
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
66814
69185
|
if (identity.isNode(key) && key.addToJSMap)
|
|
66815
69186
|
key.addToJSMap(ctx, map2, value);
|
|
66816
|
-
else if (
|
|
66817
|
-
|
|
69187
|
+
else if (merge3.isMergeKey(ctx, key))
|
|
69188
|
+
merge3.addMergeToJSMap(ctx, map2, value);
|
|
66818
69189
|
else {
|
|
66819
69190
|
const jsKey = toJS.toJS(key, "", ctx);
|
|
66820
69191
|
if (map2 instanceof Map) {
|
|
@@ -68090,7 +70461,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
68090
70461
|
var bool = require_bool2();
|
|
68091
70462
|
var float = require_float2();
|
|
68092
70463
|
var int2 = require_int2();
|
|
68093
|
-
var
|
|
70464
|
+
var merge3 = require_merge();
|
|
68094
70465
|
var omap = require_omap();
|
|
68095
70466
|
var pairs = require_pairs();
|
|
68096
70467
|
var set2 = require_set();
|
|
@@ -68110,7 +70481,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
68110
70481
|
float.floatExp,
|
|
68111
70482
|
float.float,
|
|
68112
70483
|
binary.binary,
|
|
68113
|
-
|
|
70484
|
+
merge3.merge,
|
|
68114
70485
|
omap.omap,
|
|
68115
70486
|
pairs.pairs,
|
|
68116
70487
|
set2.set,
|
|
@@ -68133,7 +70504,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
68133
70504
|
var schema = require_schema();
|
|
68134
70505
|
var schema$1 = require_schema2();
|
|
68135
70506
|
var binary = require_binary();
|
|
68136
|
-
var
|
|
70507
|
+
var merge3 = require_merge();
|
|
68137
70508
|
var omap = require_omap();
|
|
68138
70509
|
var pairs = require_pairs();
|
|
68139
70510
|
var schema$2 = require_schema3();
|
|
@@ -68158,7 +70529,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
68158
70529
|
intOct: int2.intOct,
|
|
68159
70530
|
intTime: timestamp.intTime,
|
|
68160
70531
|
map: map2.map,
|
|
68161
|
-
merge:
|
|
70532
|
+
merge: merge3.merge,
|
|
68162
70533
|
null: _null4.nullTag,
|
|
68163
70534
|
omap: omap.omap,
|
|
68164
70535
|
pairs: pairs.pairs,
|
|
@@ -68168,7 +70539,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
68168
70539
|
};
|
|
68169
70540
|
var coreKnownTags = {
|
|
68170
70541
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
68171
|
-
"tag:yaml.org,2002:merge":
|
|
70542
|
+
"tag:yaml.org,2002:merge": merge3.merge,
|
|
68172
70543
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
68173
70544
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
68174
70545
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -68177,7 +70548,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
68177
70548
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
68178
70549
|
const schemaTags = schemas3.get(schemaName);
|
|
68179
70550
|
if (schemaTags && !customTags) {
|
|
68180
|
-
return addMergeTag && !schemaTags.includes(
|
|
70551
|
+
return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
|
|
68181
70552
|
}
|
|
68182
70553
|
let tags = schemaTags;
|
|
68183
70554
|
if (!tags) {
|
|
@@ -68195,7 +70566,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
68195
70566
|
tags = customTags(tags.slice());
|
|
68196
70567
|
}
|
|
68197
70568
|
if (addMergeTag)
|
|
68198
|
-
tags = tags.concat(
|
|
70569
|
+
tags = tags.concat(merge3.merge);
|
|
68199
70570
|
return tags.reduce((tags2, tag) => {
|
|
68200
70571
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
68201
70572
|
if (!tagObj) {
|
|
@@ -68222,11 +70593,11 @@ var require_Schema = __commonJS((exports) => {
|
|
|
68222
70593
|
var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
68223
70594
|
|
|
68224
70595
|
class Schema {
|
|
68225
|
-
constructor({ compat: compat2, customTags, merge:
|
|
70596
|
+
constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
68226
70597
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
68227
70598
|
this.name = typeof schema === "string" && schema || "core";
|
|
68228
70599
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
68229
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
70600
|
+
this.tags = tags.getTags(customTags, this.name, merge3);
|
|
68230
70601
|
this.toStringOptions = toStringDefaults ?? null;
|
|
68231
70602
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
68232
70603
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -69449,13 +71820,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
69449
71820
|
return { mode, indent, chomp, comment, length };
|
|
69450
71821
|
}
|
|
69451
71822
|
function splitLines(source) {
|
|
69452
|
-
const
|
|
69453
|
-
const first =
|
|
71823
|
+
const split2 = source.split(/\n( *)/);
|
|
71824
|
+
const first = split2[0];
|
|
69454
71825
|
const m = first.match(/^( *)/);
|
|
69455
71826
|
const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
|
|
69456
71827
|
const lines = [line0];
|
|
69457
|
-
for (let i = 1;i <
|
|
69458
|
-
lines.push([
|
|
71828
|
+
for (let i = 1;i < split2.length; i += 2)
|
|
71829
|
+
lines.push([split2[i], split2[i + 1]]);
|
|
69459
71830
|
return lines;
|
|
69460
71831
|
}
|
|
69461
71832
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -72469,7 +74840,7 @@ var init_main = __esm(() => {
|
|
|
72469
74840
|
});
|
|
72470
74841
|
|
|
72471
74842
|
// ../../node_modules/sisteransi/src/index.js
|
|
72472
|
-
var
|
|
74843
|
+
var require_src2 = __commonJS((exports, module) => {
|
|
72473
74844
|
var ESC2 = "\x1B";
|
|
72474
74845
|
var CSI2 = `${ESC2}[`;
|
|
72475
74846
|
var beep = "\x07";
|
|
@@ -72812,7 +75183,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
|
|
|
72812
75183
|
}, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
|
|
72813
75184
|
var init_dist3 = __esm(() => {
|
|
72814
75185
|
init_main();
|
|
72815
|
-
import_sisteransi = __toESM(
|
|
75186
|
+
import_sisteransi = __toESM(require_src2(), 1);
|
|
72816
75187
|
G = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
72817
75188
|
K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
72818
75189
|
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)}` } } };
|
|
@@ -74155,7 +76526,7 @@ var init_dist4 = __esm(() => {
|
|
|
74155
76526
|
init_dist3();
|
|
74156
76527
|
init_main();
|
|
74157
76528
|
init_dist2();
|
|
74158
|
-
import_sisteransi2 = __toESM(
|
|
76529
|
+
import_sisteransi2 = __toESM(require_src2(), 1);
|
|
74159
76530
|
tt2 = te();
|
|
74160
76531
|
_t = w2("◆", "*");
|
|
74161
76532
|
ot2 = w2("■", "x");
|
|
@@ -167647,7 +170018,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
|
|
|
167647
170018
|
__defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
167648
170019
|
}
|
|
167649
170020
|
return to5;
|
|
167650
|
-
}, __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,
|
|
170021
|
+
}, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target, mod)), require_array, require_errno, require_fs, require_path, require_is_extglob, require_is_glob, require_glob_parent, require_utils4, require_stringify2, require_is_number, require_to_regex_range, require_fill_range, require_compile2, require_expand, require_constants, require_parse, require_braces, require_constants2, require_utils22, require_scan, require_parse2, require_picomatch, require_picomatch2, require_micromatch, require_pattern2, require_merge2, require_stream, require_string2, require_utils32, require_tasks, require_async, require_sync, require_fs2, require_settings, require_out, require_queue_microtask, require_run_parallel, require_constants3, require_fs3, require_utils42, require_common, require_async2, require_sync2, require_fs4, require_settings2, require_out2, require_reusify, require_queue, require_common2, require_reader, require_async3, require_async4, require_stream2, require_sync3, require_sync4, require_settings3, require_out3, require_reader2, require_stream3, require_async5, require_matcher, require_partial, require_deep, require_entry, require_error2, require_entry2, require_provider, require_async6, require_stream4, require_sync5, require_sync6, require_settings4, require_out4, require_picocolors2, require_debug, require_constants4, require_re, require_parse_options, require_identifiers, require_semver2, require_compare, require_gte, require_pseudomap, require_map2, require_yallist, require_lru_cache, require_sigmund, require_fnmatch, require_ini, require_package, require_src3, require_js_tokens, require_readlines, require_ignore, index_exports, Diff = class {
|
|
167651
170022
|
diff(oldStr, newStr, options8 = {}) {
|
|
167652
170023
|
let callback;
|
|
167653
170024
|
if (typeof options8 === "function") {
|
|
@@ -168669,7 +171040,7 @@ var init_prettier = __esm(() => {
|
|
|
168669
171040
|
};
|
|
168670
171041
|
}
|
|
168671
171042
|
});
|
|
168672
|
-
|
|
171043
|
+
require_utils4 = __commonJS2({
|
|
168673
171044
|
"node_modules/braces/lib/utils.js"(exports) {
|
|
168674
171045
|
exports.isInteger = (num) => {
|
|
168675
171046
|
if (typeof num === "number") {
|
|
@@ -168758,7 +171129,7 @@ var init_prettier = __esm(() => {
|
|
|
168758
171129
|
});
|
|
168759
171130
|
require_stringify2 = __commonJS2({
|
|
168760
171131
|
"node_modules/braces/lib/stringify.js"(exports, module) {
|
|
168761
|
-
var utils2 =
|
|
171132
|
+
var utils2 = require_utils4();
|
|
168762
171133
|
module.exports = (ast, options8 = {}) => {
|
|
168763
171134
|
const stringify2 = (node, parent = {}) => {
|
|
168764
171135
|
const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
|
|
@@ -169212,7 +171583,7 @@ var init_prettier = __esm(() => {
|
|
|
169212
171583
|
require_compile2 = __commonJS2({
|
|
169213
171584
|
"node_modules/braces/lib/compile.js"(exports, module) {
|
|
169214
171585
|
var fill2 = require_fill_range();
|
|
169215
|
-
var utils2 =
|
|
171586
|
+
var utils2 = require_utils4();
|
|
169216
171587
|
var compile = (ast, options8 = {}) => {
|
|
169217
171588
|
const walk2 = (node, parent = {}) => {
|
|
169218
171589
|
const invalidBlock = utils2.isInvalidBrace(parent);
|
|
@@ -169262,7 +171633,7 @@ var init_prettier = __esm(() => {
|
|
|
169262
171633
|
"node_modules/braces/lib/expand.js"(exports, module) {
|
|
169263
171634
|
var fill2 = require_fill_range();
|
|
169264
171635
|
var stringify2 = require_stringify2();
|
|
169265
|
-
var utils2 =
|
|
171636
|
+
var utils2 = require_utils4();
|
|
169266
171637
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
169267
171638
|
const result = [];
|
|
169268
171639
|
queue = [].concat(queue);
|
|
@@ -171461,8 +173832,8 @@ var init_prettier = __esm(() => {
|
|
|
171461
173832
|
var Stream = __require2("stream");
|
|
171462
173833
|
var PassThrough = Stream.PassThrough;
|
|
171463
173834
|
var slice = Array.prototype.slice;
|
|
171464
|
-
module.exports =
|
|
171465
|
-
function
|
|
173835
|
+
module.exports = merge22;
|
|
173836
|
+
function merge22() {
|
|
171466
173837
|
const streamsQueue = [];
|
|
171467
173838
|
const args = slice.call(arguments);
|
|
171468
173839
|
let merging = false;
|
|
@@ -171576,9 +173947,9 @@ var init_prettier = __esm(() => {
|
|
|
171576
173947
|
"node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
171577
173948
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
171578
173949
|
exports.merge = undefined;
|
|
171579
|
-
var
|
|
173950
|
+
var merge22 = require_merge2();
|
|
171580
173951
|
function merge3(streams) {
|
|
171581
|
-
const mergedStream =
|
|
173952
|
+
const mergedStream = merge22(streams);
|
|
171582
173953
|
streams.forEach((stream) => {
|
|
171583
173954
|
stream.once("error", (error52) => mergedStream.emit("error", error52));
|
|
171584
173955
|
});
|
|
@@ -171606,7 +173977,7 @@ var init_prettier = __esm(() => {
|
|
|
171606
173977
|
exports.isEmpty = isEmpty;
|
|
171607
173978
|
}
|
|
171608
173979
|
});
|
|
171609
|
-
|
|
173980
|
+
require_utils32 = __commonJS2({
|
|
171610
173981
|
"node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
171611
173982
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
171612
173983
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
@@ -171630,7 +174001,7 @@ var init_prettier = __esm(() => {
|
|
|
171630
174001
|
"node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
171631
174002
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
171632
174003
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
171633
|
-
var utils2 =
|
|
174004
|
+
var utils2 = require_utils32();
|
|
171634
174005
|
function generate(input, settings) {
|
|
171635
174006
|
const patterns = processPatterns(input, settings);
|
|
171636
174007
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -171939,7 +174310,7 @@ var init_prettier = __esm(() => {
|
|
|
171939
174310
|
exports.createDirentFromStats = createDirentFromStats;
|
|
171940
174311
|
}
|
|
171941
174312
|
});
|
|
171942
|
-
|
|
174313
|
+
require_utils42 = __commonJS2({
|
|
171943
174314
|
"node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
171944
174315
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
171945
174316
|
exports.fs = undefined;
|
|
@@ -171967,7 +174338,7 @@ var init_prettier = __esm(() => {
|
|
|
171967
174338
|
var fsStat = require_out();
|
|
171968
174339
|
var rpl = require_run_parallel();
|
|
171969
174340
|
var constants_1 = require_constants3();
|
|
171970
|
-
var utils2 =
|
|
174341
|
+
var utils2 = require_utils42();
|
|
171971
174342
|
var common = require_common();
|
|
171972
174343
|
function read3(directory, settings, callback) {
|
|
171973
174344
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -172073,7 +174444,7 @@ var init_prettier = __esm(() => {
|
|
|
172073
174444
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
172074
174445
|
var fsStat = require_out();
|
|
172075
174446
|
var constants_1 = require_constants3();
|
|
172076
|
-
var utils2 =
|
|
174447
|
+
var utils2 = require_utils42();
|
|
172077
174448
|
var common = require_common();
|
|
172078
174449
|
function read3(directory, settings) {
|
|
172079
174450
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -172853,7 +175224,7 @@ var init_prettier = __esm(() => {
|
|
|
172853
175224
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
172854
175225
|
var path15 = __require2("path");
|
|
172855
175226
|
var fsStat = require_out();
|
|
172856
|
-
var utils2 =
|
|
175227
|
+
var utils2 = require_utils32();
|
|
172857
175228
|
var Reader = class {
|
|
172858
175229
|
constructor(_settings) {
|
|
172859
175230
|
this._settings = _settings;
|
|
@@ -172977,7 +175348,7 @@ var init_prettier = __esm(() => {
|
|
|
172977
175348
|
require_matcher = __commonJS2({
|
|
172978
175349
|
"node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
172979
175350
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
172980
|
-
var utils2 =
|
|
175351
|
+
var utils2 = require_utils32();
|
|
172981
175352
|
var Matcher = class {
|
|
172982
175353
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
172983
175354
|
this._patterns = _patterns;
|
|
@@ -173059,7 +175430,7 @@ var init_prettier = __esm(() => {
|
|
|
173059
175430
|
require_deep = __commonJS2({
|
|
173060
175431
|
"node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
173061
175432
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173062
|
-
var utils2 =
|
|
175433
|
+
var utils2 = require_utils32();
|
|
173063
175434
|
var partial_1 = require_partial();
|
|
173064
175435
|
var DeepFilter = class {
|
|
173065
175436
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -173121,7 +175492,7 @@ var init_prettier = __esm(() => {
|
|
|
173121
175492
|
require_entry = __commonJS2({
|
|
173122
175493
|
"node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
173123
175494
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173124
|
-
var utils2 =
|
|
175495
|
+
var utils2 = require_utils32();
|
|
173125
175496
|
var EntryFilter = class {
|
|
173126
175497
|
constructor(_settings, _micromatchOptions) {
|
|
173127
175498
|
this._settings = _settings;
|
|
@@ -173206,7 +175577,7 @@ var init_prettier = __esm(() => {
|
|
|
173206
175577
|
require_error2 = __commonJS2({
|
|
173207
175578
|
"node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
173208
175579
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173209
|
-
var utils2 =
|
|
175580
|
+
var utils2 = require_utils32();
|
|
173210
175581
|
var ErrorFilter = class {
|
|
173211
175582
|
constructor(_settings) {
|
|
173212
175583
|
this._settings = _settings;
|
|
@@ -173224,7 +175595,7 @@ var init_prettier = __esm(() => {
|
|
|
173224
175595
|
require_entry2 = __commonJS2({
|
|
173225
175596
|
"node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
173226
175597
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173227
|
-
var utils2 =
|
|
175598
|
+
var utils2 = require_utils32();
|
|
173228
175599
|
var EntryTransformer = class {
|
|
173229
175600
|
constructor(_settings) {
|
|
173230
175601
|
this._settings = _settings;
|
|
@@ -173492,7 +175863,7 @@ var init_prettier = __esm(() => {
|
|
|
173492
175863
|
var stream_1 = require_stream4();
|
|
173493
175864
|
var sync_1 = require_sync6();
|
|
173494
175865
|
var settings_1 = require_settings4();
|
|
173495
|
-
var utils2 =
|
|
175866
|
+
var utils2 = require_utils32();
|
|
173496
175867
|
async function FastGlob(source2, options8) {
|
|
173497
175868
|
assertPatternsInput(source2);
|
|
173498
175869
|
const works = getWorks(source2, async_1.default, options8);
|
|
@@ -173810,7 +176181,7 @@ var init_prettier = __esm(() => {
|
|
|
173810
176181
|
};
|
|
173811
176182
|
}
|
|
173812
176183
|
});
|
|
173813
|
-
|
|
176184
|
+
require_semver2 = __commonJS2({
|
|
173814
176185
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
173815
176186
|
var debug = require_debug();
|
|
173816
176187
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
|
|
@@ -174080,7 +176451,7 @@ var init_prettier = __esm(() => {
|
|
|
174080
176451
|
});
|
|
174081
176452
|
require_compare = __commonJS2({
|
|
174082
176453
|
"node_modules/semver/functions/compare.js"(exports, module) {
|
|
174083
|
-
var SemVer =
|
|
176454
|
+
var SemVer = require_semver2();
|
|
174084
176455
|
var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
|
|
174085
176456
|
module.exports = compare;
|
|
174086
176457
|
}
|
|
@@ -175813,7 +178184,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
175813
178184
|
};
|
|
175814
178185
|
}
|
|
175815
178186
|
});
|
|
175816
|
-
|
|
178187
|
+
require_src3 = __commonJS2({
|
|
175817
178188
|
"node_modules/editorconfig/src/index.js"(exports) {
|
|
175818
178189
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
175819
178190
|
return new (P9 || (P9 = Promise))(function(resolve32, reject) {
|
|
@@ -177276,7 +179647,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
177276
179647
|
mockable_default = mockable.mocked;
|
|
177277
179648
|
import_micromatch = __toESM2(require_micromatch(), 1);
|
|
177278
179649
|
partition_default = partition2;
|
|
177279
|
-
import_editorconfig = __toESM2(
|
|
179650
|
+
import_editorconfig = __toESM2(require_src3(), 1);
|
|
177280
179651
|
iterate_directory_up_default = iterateDirectoryUp;
|
|
177281
179652
|
FileSearcher = class extends Searcher {
|
|
177282
179653
|
findInDirectory = findFile;
|
|
@@ -180747,7 +183118,7 @@ var require_foldFlowLines2 = __commonJS((exports) => {
|
|
|
180747
183118
|
else
|
|
180748
183119
|
end = lineWidth - indentAtStart;
|
|
180749
183120
|
}
|
|
180750
|
-
let
|
|
183121
|
+
let split2 = undefined;
|
|
180751
183122
|
let prev = undefined;
|
|
180752
183123
|
let overflow = false;
|
|
180753
183124
|
let i5 = -1;
|
|
@@ -180781,20 +183152,20 @@ var require_foldFlowLines2 = __commonJS((exports) => {
|
|
|
180781
183152
|
if (mode === FOLD_BLOCK)
|
|
180782
183153
|
i5 = consumeMoreIndentedLines(text, i5, indent3.length);
|
|
180783
183154
|
end = i5 + indent3.length + endStep;
|
|
180784
|
-
|
|
183155
|
+
split2 = undefined;
|
|
180785
183156
|
} else {
|
|
180786
183157
|
if (ch2 === " " && prev && prev !== " " && prev !== `
|
|
180787
183158
|
` && prev !== "\t") {
|
|
180788
183159
|
const next = text[i5 + 1];
|
|
180789
183160
|
if (next && next !== " " && next !== `
|
|
180790
183161
|
` && next !== "\t")
|
|
180791
|
-
|
|
183162
|
+
split2 = i5;
|
|
180792
183163
|
}
|
|
180793
183164
|
if (i5 >= end) {
|
|
180794
|
-
if (
|
|
180795
|
-
folds.push(
|
|
180796
|
-
end =
|
|
180797
|
-
|
|
183165
|
+
if (split2) {
|
|
183166
|
+
folds.push(split2);
|
|
183167
|
+
end = split2 + endStep;
|
|
183168
|
+
split2 = undefined;
|
|
180798
183169
|
} else if (mode === FOLD_QUOTED) {
|
|
180799
183170
|
while (prev === " " || prev === "\t") {
|
|
180800
183171
|
prev = ch2;
|
|
@@ -180807,7 +183178,7 @@ var require_foldFlowLines2 = __commonJS((exports) => {
|
|
|
180807
183178
|
folds.push(j11);
|
|
180808
183179
|
escapedFolds[j11] = true;
|
|
180809
183180
|
end = j11 + endStep;
|
|
180810
|
-
|
|
183181
|
+
split2 = undefined;
|
|
180811
183182
|
} else {
|
|
180812
183183
|
overflow = true;
|
|
180813
183184
|
}
|
|
@@ -181441,7 +183812,7 @@ var require_merge3 = __commonJS((exports) => {
|
|
|
181441
183812
|
var identity = require_identity2();
|
|
181442
183813
|
var Scalar = require_Scalar2();
|
|
181443
183814
|
var MERGE_KEY = "<<";
|
|
181444
|
-
var
|
|
183815
|
+
var merge3 = {
|
|
181445
183816
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
181446
183817
|
default: "key",
|
|
181447
183818
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -181451,7 +183822,7 @@ var require_merge3 = __commonJS((exports) => {
|
|
|
181451
183822
|
}),
|
|
181452
183823
|
stringify: () => MERGE_KEY
|
|
181453
183824
|
};
|
|
181454
|
-
var isMergeKey = (ctx, key2) => (
|
|
183825
|
+
var isMergeKey = (ctx, key2) => (merge3.identify(key2) || identity.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge3.identify(key2.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
|
181455
183826
|
function addMergeToJSMap(ctx, map2, value) {
|
|
181456
183827
|
const source2 = resolveAliasValue(ctx, value);
|
|
181457
183828
|
if (identity.isSeq(source2))
|
|
@@ -181490,21 +183861,21 @@ var require_merge3 = __commonJS((exports) => {
|
|
|
181490
183861
|
}
|
|
181491
183862
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
181492
183863
|
exports.isMergeKey = isMergeKey;
|
|
181493
|
-
exports.merge =
|
|
183864
|
+
exports.merge = merge3;
|
|
181494
183865
|
});
|
|
181495
183866
|
|
|
181496
183867
|
// ../workflow-yaml/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
181497
183868
|
var require_addPairToJSMap2 = __commonJS((exports) => {
|
|
181498
183869
|
var log = require_log2();
|
|
181499
|
-
var
|
|
183870
|
+
var merge3 = require_merge3();
|
|
181500
183871
|
var stringify = require_stringify3();
|
|
181501
183872
|
var identity = require_identity2();
|
|
181502
183873
|
var toJS = require_toJS2();
|
|
181503
183874
|
function addPairToJSMap(ctx, map2, { key: key2, value }) {
|
|
181504
183875
|
if (identity.isNode(key2) && key2.addToJSMap)
|
|
181505
183876
|
key2.addToJSMap(ctx, map2, value);
|
|
181506
|
-
else if (
|
|
181507
|
-
|
|
183877
|
+
else if (merge3.isMergeKey(ctx, key2))
|
|
183878
|
+
merge3.addMergeToJSMap(ctx, map2, value);
|
|
181508
183879
|
else {
|
|
181509
183880
|
const jsKey = toJS.toJS(key2, "", ctx);
|
|
181510
183881
|
if (map2 instanceof Map) {
|
|
@@ -182780,7 +185151,7 @@ var require_schema6 = __commonJS((exports) => {
|
|
|
182780
185151
|
var bool = require_bool4();
|
|
182781
185152
|
var float = require_float4();
|
|
182782
185153
|
var int2 = require_int4();
|
|
182783
|
-
var
|
|
185154
|
+
var merge3 = require_merge3();
|
|
182784
185155
|
var omap = require_omap2();
|
|
182785
185156
|
var pairs = require_pairs2();
|
|
182786
185157
|
var set2 = require_set2();
|
|
@@ -182800,7 +185171,7 @@ var require_schema6 = __commonJS((exports) => {
|
|
|
182800
185171
|
float.floatExp,
|
|
182801
185172
|
float.float,
|
|
182802
185173
|
binary.binary,
|
|
182803
|
-
|
|
185174
|
+
merge3.merge,
|
|
182804
185175
|
omap.omap,
|
|
182805
185176
|
pairs.pairs,
|
|
182806
185177
|
set2.set,
|
|
@@ -182823,7 +185194,7 @@ var require_tags2 = __commonJS((exports) => {
|
|
|
182823
185194
|
var schema = require_schema4();
|
|
182824
185195
|
var schema$1 = require_schema5();
|
|
182825
185196
|
var binary = require_binary2();
|
|
182826
|
-
var
|
|
185197
|
+
var merge3 = require_merge3();
|
|
182827
185198
|
var omap = require_omap2();
|
|
182828
185199
|
var pairs = require_pairs2();
|
|
182829
185200
|
var schema$2 = require_schema6();
|
|
@@ -182848,7 +185219,7 @@ var require_tags2 = __commonJS((exports) => {
|
|
|
182848
185219
|
intOct: int2.intOct,
|
|
182849
185220
|
intTime: timestamp.intTime,
|
|
182850
185221
|
map: map2.map,
|
|
182851
|
-
merge:
|
|
185222
|
+
merge: merge3.merge,
|
|
182852
185223
|
null: _null4.nullTag,
|
|
182853
185224
|
omap: omap.omap,
|
|
182854
185225
|
pairs: pairs.pairs,
|
|
@@ -182858,7 +185229,7 @@ var require_tags2 = __commonJS((exports) => {
|
|
|
182858
185229
|
};
|
|
182859
185230
|
var coreKnownTags = {
|
|
182860
185231
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
182861
|
-
"tag:yaml.org,2002:merge":
|
|
185232
|
+
"tag:yaml.org,2002:merge": merge3.merge,
|
|
182862
185233
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
182863
185234
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
182864
185235
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -182867,7 +185238,7 @@ var require_tags2 = __commonJS((exports) => {
|
|
|
182867
185238
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
182868
185239
|
const schemaTags = schemas3.get(schemaName);
|
|
182869
185240
|
if (schemaTags && !customTags) {
|
|
182870
|
-
return addMergeTag && !schemaTags.includes(
|
|
185241
|
+
return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
|
|
182871
185242
|
}
|
|
182872
185243
|
let tags = schemaTags;
|
|
182873
185244
|
if (!tags) {
|
|
@@ -182885,7 +185256,7 @@ var require_tags2 = __commonJS((exports) => {
|
|
|
182885
185256
|
tags = customTags(tags.slice());
|
|
182886
185257
|
}
|
|
182887
185258
|
if (addMergeTag)
|
|
182888
|
-
tags = tags.concat(
|
|
185259
|
+
tags = tags.concat(merge3.merge);
|
|
182889
185260
|
return tags.reduce((tags2, tag) => {
|
|
182890
185261
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
182891
185262
|
if (!tagObj) {
|
|
@@ -182912,11 +185283,11 @@ var require_Schema2 = __commonJS((exports) => {
|
|
|
182912
185283
|
var sortMapEntriesByKey = (a5, b8) => a5.key < b8.key ? -1 : a5.key > b8.key ? 1 : 0;
|
|
182913
185284
|
|
|
182914
185285
|
class Schema2 {
|
|
182915
|
-
constructor({ compat: compat2, customTags, merge:
|
|
185286
|
+
constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
182916
185287
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
182917
185288
|
this.name = typeof schema === "string" && schema || "core";
|
|
182918
185289
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
182919
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
185290
|
+
this.tags = tags.getTags(customTags, this.name, merge3);
|
|
182920
185291
|
this.toStringOptions = toStringDefaults ?? null;
|
|
182921
185292
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
182922
185293
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -184139,13 +186510,13 @@ var require_resolve_block_scalar2 = __commonJS((exports) => {
|
|
|
184139
186510
|
return { mode, indent: indent3, chomp, comment, length };
|
|
184140
186511
|
}
|
|
184141
186512
|
function splitLines2(source2) {
|
|
184142
|
-
const
|
|
184143
|
-
const first =
|
|
186513
|
+
const split2 = source2.split(/\n( *)/);
|
|
186514
|
+
const first = split2[0];
|
|
184144
186515
|
const m7 = first.match(/^( *)/);
|
|
184145
186516
|
const line0 = m7?.[1] ? [m7[1], first.slice(m7[1].length)] : ["", first];
|
|
184146
186517
|
const lines = [line0];
|
|
184147
|
-
for (let i5 = 1;i5 <
|
|
184148
|
-
lines.push([
|
|
186518
|
+
for (let i5 = 1;i5 < split2.length; i5 += 2)
|
|
186519
|
+
lines.push([split2[i5], split2[i5 + 1]]);
|
|
184149
186520
|
return lines;
|
|
184150
186521
|
}
|
|
184151
186522
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -186793,7 +189164,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
|
|
|
186793
189164
|
// package.json
|
|
186794
189165
|
var package_default = {
|
|
186795
189166
|
name: "@eigenpal/cli",
|
|
186796
|
-
version: "0.9.
|
|
189167
|
+
version: "0.9.1",
|
|
186797
189168
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
186798
189169
|
keywords: [
|
|
186799
189170
|
"eigenpal",
|
|
@@ -188310,7 +190681,7 @@ async function pushCurrentBranch(input) {
|
|
|
188310
190681
|
function slugifyPackageSegment(value) {
|
|
188311
190682
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
188312
190683
|
}
|
|
188313
|
-
function packagePathForTemplate(
|
|
190684
|
+
function packagePathForTemplate(template2, name) {
|
|
188314
190685
|
const slug = slugifyPackageSegment(name);
|
|
188315
190686
|
if (!slug)
|
|
188316
190687
|
throw new Error("Package name must include at least one letter or number.");
|
|
@@ -188322,7 +190693,7 @@ function packagePathForTemplate(template, name) {
|
|
|
188322
190693
|
knowledge: "resources/knowledge",
|
|
188323
190694
|
evaluator: "evaluators"
|
|
188324
190695
|
};
|
|
188325
|
-
const root = rootByTemplate[
|
|
190696
|
+
const root = rootByTemplate[template2];
|
|
188326
190697
|
if (!root)
|
|
188327
190698
|
throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
|
|
188328
190699
|
return SourcePackagePathSchema.parse(`${root}/${slug}`);
|
|
@@ -188731,12 +191102,12 @@ function archivePackage(input) {
|
|
|
188731
191102
|
runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
|
|
188732
191103
|
cwd: input.gitRoot
|
|
188733
191104
|
});
|
|
188734
|
-
const
|
|
191105
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
188735
191106
|
cwd: input.outDir,
|
|
188736
191107
|
encoding: "utf8"
|
|
188737
191108
|
});
|
|
188738
|
-
if (
|
|
188739
|
-
throw new Error(
|
|
191109
|
+
if (extract2.status !== 0)
|
|
191110
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
188740
191111
|
} finally {
|
|
188741
191112
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
188742
191113
|
}
|
|
@@ -188765,12 +191136,12 @@ async function tryHostedArchive(input) {
|
|
|
188765
191136
|
const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
|
|
188766
191137
|
try {
|
|
188767
191138
|
writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
|
|
188768
|
-
const
|
|
191139
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
188769
191140
|
cwd: input.outDir,
|
|
188770
191141
|
encoding: "utf8"
|
|
188771
191142
|
});
|
|
188772
|
-
if (
|
|
188773
|
-
throw new Error(
|
|
191143
|
+
if (extract2.status !== 0)
|
|
191144
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
188774
191145
|
return true;
|
|
188775
191146
|
} finally {
|
|
188776
191147
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
@@ -193119,18 +195490,18 @@ async function init(name, opts) {
|
|
|
193119
195490
|
if (existsSync11(target) && readdirSync2(target).length > 0) {
|
|
193120
195491
|
throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
|
|
193121
195492
|
}
|
|
193122
|
-
let
|
|
195493
|
+
let template2;
|
|
193123
195494
|
if (opts.template) {
|
|
193124
195495
|
if (!isTemplateName(opts.template)) {
|
|
193125
195496
|
throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
|
|
193126
195497
|
}
|
|
193127
|
-
|
|
195498
|
+
template2 = opts.template;
|
|
193128
195499
|
} else if (opts.yes || !process.stdin.isTTY) {
|
|
193129
|
-
|
|
195500
|
+
template2 = "blank";
|
|
193130
195501
|
} else {
|
|
193131
|
-
|
|
195502
|
+
template2 = await promptForTemplate();
|
|
193132
195503
|
}
|
|
193133
|
-
const sourceRoot = join2(resolveTemplatesRoot(),
|
|
195504
|
+
const sourceRoot = join2(resolveTemplatesRoot(), template2);
|
|
193134
195505
|
if (!existsSync11(sourceRoot)) {
|
|
193135
195506
|
throw new Error(`Template directory missing on disk: ${sourceRoot}`);
|
|
193136
195507
|
}
|