@eigenpal/cli 0.10.32 → 0.10.33
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 +2818 -314
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17245,8 +17245,147 @@ var init_provider_logo_data_generated = __esm(() => {
|
|
|
17245
17245
|
};
|
|
17246
17246
|
});
|
|
17247
17247
|
|
|
17248
|
+
// ../../node_modules/nanoid/url-alphabet/index.js
|
|
17249
|
+
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
17250
|
+
|
|
17251
|
+
// ../../node_modules/nanoid/index.js
|
|
17252
|
+
import { webcrypto as crypto } from "node:crypto";
|
|
17253
|
+
function fillPool(bytes) {
|
|
17254
|
+
if (!pool || pool.length < bytes) {
|
|
17255
|
+
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
17256
|
+
crypto.getRandomValues(pool);
|
|
17257
|
+
poolOffset = 0;
|
|
17258
|
+
} else if (poolOffset + bytes > pool.length) {
|
|
17259
|
+
crypto.getRandomValues(pool);
|
|
17260
|
+
poolOffset = 0;
|
|
17261
|
+
}
|
|
17262
|
+
poolOffset += bytes;
|
|
17263
|
+
}
|
|
17264
|
+
function nanoid3(size = 21) {
|
|
17265
|
+
fillPool(size |= 0);
|
|
17266
|
+
let id = "";
|
|
17267
|
+
for (let i = poolOffset - size;i < poolOffset; i++) {
|
|
17268
|
+
id += urlAlphabet[pool[i] & 63];
|
|
17269
|
+
}
|
|
17270
|
+
return id;
|
|
17271
|
+
}
|
|
17272
|
+
var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset;
|
|
17273
|
+
var init_nanoid = () => {};
|
|
17274
|
+
|
|
17275
|
+
// ../types/src/core/common.ts
|
|
17276
|
+
function generateId(prefix) {
|
|
17277
|
+
const id = nanoid3();
|
|
17278
|
+
return prefix ? `${prefix}_${id}` : id;
|
|
17279
|
+
}
|
|
17280
|
+
function toJsonSchema(schema) {
|
|
17281
|
+
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
17282
|
+
}
|
|
17283
|
+
var ID_PREFIXES, TimestampSchema, JsonSchemaSchema, BaseEntitySchema;
|
|
17284
|
+
var init_common = __esm(() => {
|
|
17285
|
+
init_nanoid();
|
|
17286
|
+
init_zod();
|
|
17287
|
+
ID_PREFIXES = {
|
|
17288
|
+
WORKFLOW: "wf",
|
|
17289
|
+
WORKFLOW_VERSION: "wfv",
|
|
17290
|
+
WORKFLOW_HISTORY: "wfh",
|
|
17291
|
+
JOB: "job",
|
|
17292
|
+
EXECUTION: "exec",
|
|
17293
|
+
STEP_EXECUTION: "step",
|
|
17294
|
+
FILE: "file",
|
|
17295
|
+
TEMPLATE: "tmpl",
|
|
17296
|
+
USER: "user",
|
|
17297
|
+
TENANT: "org",
|
|
17298
|
+
TENANT_INVITE: "inv",
|
|
17299
|
+
API_KEY: "eig",
|
|
17300
|
+
PROCESSOR: "proc",
|
|
17301
|
+
AI_PROVIDER: "aip",
|
|
17302
|
+
ACCOUNT: "acct",
|
|
17303
|
+
SESSION: "sess",
|
|
17304
|
+
VERIFICATION: "vrf",
|
|
17305
|
+
DATASET: "ds",
|
|
17306
|
+
DATASET_EXAMPLE: "dex",
|
|
17307
|
+
EXPERIMENT: "exp",
|
|
17308
|
+
EXPERIMENT_RUN: "exr",
|
|
17309
|
+
EXPERIMENT_EVALUATION: "evl",
|
|
17310
|
+
EVAL_EXAMPLE: "evx",
|
|
17311
|
+
EVAL_RESULT: "evr",
|
|
17312
|
+
EVAL_BATCH: "evb",
|
|
17313
|
+
RUN_REVIEW: "rev",
|
|
17314
|
+
RUN_REVIEW_CORRECTION: "rvc",
|
|
17315
|
+
TABLE_ROW: "row",
|
|
17316
|
+
FOLDER: "fldr",
|
|
17317
|
+
AGENT_WORKFLOW: "awf",
|
|
17318
|
+
AGENT_EXECUTION: "aex",
|
|
17319
|
+
AGENT_EXAMPLE: "aeg",
|
|
17320
|
+
AGENT_VERSION: "avr",
|
|
17321
|
+
AGENT_TRAINING_SESSION: "ats",
|
|
17322
|
+
AGENT_EXPERIMENT: "aexp",
|
|
17323
|
+
AGENT_EMAIL_ALIAS: "aea",
|
|
17324
|
+
AGENT_EMAIL_INVOCATION: "aei",
|
|
17325
|
+
AUTOMATION_TRIGGER: "atr",
|
|
17326
|
+
FILE_SOURCE_CONFIG: "fsc",
|
|
17327
|
+
WEBHOOK_ENDPOINT: "whep",
|
|
17328
|
+
WEBHOOK_EVENT: "whev",
|
|
17329
|
+
WEBHOOK_DELIVERY: "whdl",
|
|
17330
|
+
WEBHOOK_ATTEMPT: "what",
|
|
17331
|
+
PAID_ALLOWANCE_GRANT: "pag",
|
|
17332
|
+
PAID_ALLOWANCE_ADJUSTMENT: "paa",
|
|
17333
|
+
OCR_EXTRACTION_PIPELINE: "oep",
|
|
17334
|
+
SANDBOX_WS_TOKEN: "sws"
|
|
17335
|
+
};
|
|
17336
|
+
TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
17337
|
+
return typeof val === "string" ? new Date(val) : val;
|
|
17338
|
+
});
|
|
17339
|
+
JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
17340
|
+
BaseEntitySchema = exports_external.object({
|
|
17341
|
+
id: exports_external.string(),
|
|
17342
|
+
createdAt: TimestampSchema.optional(),
|
|
17343
|
+
updatedAt: TimestampSchema.optional()
|
|
17344
|
+
});
|
|
17345
|
+
});
|
|
17346
|
+
|
|
17347
|
+
// ../types/src/core/ids.ts
|
|
17348
|
+
var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
|
|
17349
|
+
var init_ids = __esm(() => {
|
|
17350
|
+
PROCESSOR_IDS = {
|
|
17351
|
+
MERGE: "builtin/merge",
|
|
17352
|
+
DOCUMENT_PARSER: "builtin/parser",
|
|
17353
|
+
EXTRACT: "builtin/extract",
|
|
17354
|
+
SPLIT: "builtin/split",
|
|
17355
|
+
SEGMENT: "builtin/segment",
|
|
17356
|
+
CLASSIFY: "builtin/classify",
|
|
17357
|
+
VISION: "builtin/vision",
|
|
17358
|
+
TEMPLATE: "builtin/template",
|
|
17359
|
+
PDF_EMBEDDER: "builtin/pdf-embedder",
|
|
17360
|
+
XLSX_TO_JSON: "builtin/xlsx-to-json"
|
|
17361
|
+
};
|
|
17362
|
+
PARSER_IDS = {
|
|
17363
|
+
KREUZBERG: "builtin/kreuzberg",
|
|
17364
|
+
OCR: "builtin/ocr",
|
|
17365
|
+
LLM_VISION: "builtin/llm-vision"
|
|
17366
|
+
};
|
|
17367
|
+
INPUT_KINDS = {
|
|
17368
|
+
DOCUMENT: "document",
|
|
17369
|
+
PAYLOAD: "payload"
|
|
17370
|
+
};
|
|
17371
|
+
});
|
|
17372
|
+
|
|
17373
|
+
// ../types/src/core/pagination.ts
|
|
17374
|
+
var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
|
|
17375
|
+
var init_pagination = __esm(() => {
|
|
17376
|
+
init_zod();
|
|
17377
|
+
PaginationParamsSchema = exports_external.object({
|
|
17378
|
+
limit: exports_external.coerce.number().int().min(1).max(100).default(50),
|
|
17379
|
+
offset: exports_external.coerce.number().int().min(0).default(0)
|
|
17380
|
+
});
|
|
17381
|
+
});
|
|
17382
|
+
|
|
17248
17383
|
// ../types/src/core/index.ts
|
|
17249
|
-
var init_core3 = () => {
|
|
17384
|
+
var init_core3 = __esm(() => {
|
|
17385
|
+
init_common();
|
|
17386
|
+
init_ids();
|
|
17387
|
+
init_pagination();
|
|
17388
|
+
});
|
|
17250
17389
|
|
|
17251
17390
|
// ../types/src/files/legacy-boundary.ts
|
|
17252
17391
|
var LEGACY_FILE_REF_COMPATIBILITY;
|
|
@@ -17271,6 +17410,9 @@ var init_legacy_boundary = __esm(() => {
|
|
|
17271
17410
|
function isRuntimeFileRef(input) {
|
|
17272
17411
|
return RuntimeFileRefSchema.safeParse(input).success;
|
|
17273
17412
|
}
|
|
17413
|
+
function isFilePathDescriptor(input) {
|
|
17414
|
+
return FilePathDescriptorSchema.safeParse(input).success;
|
|
17415
|
+
}
|
|
17274
17416
|
function isResolvedProcessorFile(input) {
|
|
17275
17417
|
return ResolvedProcessorFileSchema.safeParse(input).success;
|
|
17276
17418
|
}
|
|
@@ -17493,11 +17635,2466 @@ var init_scoped_file_ref = __esm(() => {
|
|
|
17493
17635
|
]);
|
|
17494
17636
|
});
|
|
17495
17637
|
|
|
17638
|
+
// ../../node_modules/@opentelemetry/api/build/src/version.js
|
|
17639
|
+
var require_version = __commonJS((exports) => {
|
|
17640
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17641
|
+
exports.VERSION = undefined;
|
|
17642
|
+
exports.VERSION = "1.9.1";
|
|
17643
|
+
});
|
|
17644
|
+
|
|
17645
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
|
|
17646
|
+
var require_semver = __commonJS((exports) => {
|
|
17647
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17648
|
+
exports.isCompatible = exports._makeCompatibilityCheck = undefined;
|
|
17649
|
+
var version_1 = require_version();
|
|
17650
|
+
var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
17651
|
+
function _makeCompatibilityCheck(ownVersion) {
|
|
17652
|
+
const acceptedVersions = new Set([ownVersion]);
|
|
17653
|
+
const rejectedVersions = new Set;
|
|
17654
|
+
const myVersionMatch = ownVersion.match(re);
|
|
17655
|
+
if (!myVersionMatch) {
|
|
17656
|
+
return () => false;
|
|
17657
|
+
}
|
|
17658
|
+
const ownVersionParsed = {
|
|
17659
|
+
major: +myVersionMatch[1],
|
|
17660
|
+
minor: +myVersionMatch[2],
|
|
17661
|
+
patch: +myVersionMatch[3],
|
|
17662
|
+
prerelease: myVersionMatch[4]
|
|
17663
|
+
};
|
|
17664
|
+
if (ownVersionParsed.prerelease != null) {
|
|
17665
|
+
return function isExactmatch(globalVersion) {
|
|
17666
|
+
return globalVersion === ownVersion;
|
|
17667
|
+
};
|
|
17668
|
+
}
|
|
17669
|
+
function _reject(v) {
|
|
17670
|
+
rejectedVersions.add(v);
|
|
17671
|
+
return false;
|
|
17672
|
+
}
|
|
17673
|
+
function _accept(v) {
|
|
17674
|
+
acceptedVersions.add(v);
|
|
17675
|
+
return true;
|
|
17676
|
+
}
|
|
17677
|
+
return function isCompatible(globalVersion) {
|
|
17678
|
+
if (acceptedVersions.has(globalVersion)) {
|
|
17679
|
+
return true;
|
|
17680
|
+
}
|
|
17681
|
+
if (rejectedVersions.has(globalVersion)) {
|
|
17682
|
+
return false;
|
|
17683
|
+
}
|
|
17684
|
+
const globalVersionMatch = globalVersion.match(re);
|
|
17685
|
+
if (!globalVersionMatch) {
|
|
17686
|
+
return _reject(globalVersion);
|
|
17687
|
+
}
|
|
17688
|
+
const globalVersionParsed = {
|
|
17689
|
+
major: +globalVersionMatch[1],
|
|
17690
|
+
minor: +globalVersionMatch[2],
|
|
17691
|
+
patch: +globalVersionMatch[3],
|
|
17692
|
+
prerelease: globalVersionMatch[4]
|
|
17693
|
+
};
|
|
17694
|
+
if (globalVersionParsed.prerelease != null) {
|
|
17695
|
+
return _reject(globalVersion);
|
|
17696
|
+
}
|
|
17697
|
+
if (ownVersionParsed.major !== globalVersionParsed.major) {
|
|
17698
|
+
return _reject(globalVersion);
|
|
17699
|
+
}
|
|
17700
|
+
if (ownVersionParsed.major === 0) {
|
|
17701
|
+
if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
|
|
17702
|
+
return _accept(globalVersion);
|
|
17703
|
+
}
|
|
17704
|
+
return _reject(globalVersion);
|
|
17705
|
+
}
|
|
17706
|
+
if (ownVersionParsed.minor <= globalVersionParsed.minor) {
|
|
17707
|
+
return _accept(globalVersion);
|
|
17708
|
+
}
|
|
17709
|
+
return _reject(globalVersion);
|
|
17710
|
+
};
|
|
17711
|
+
}
|
|
17712
|
+
exports._makeCompatibilityCheck = _makeCompatibilityCheck;
|
|
17713
|
+
exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
|
|
17714
|
+
});
|
|
17715
|
+
|
|
17716
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
|
|
17717
|
+
var require_global_utils = __commonJS((exports) => {
|
|
17718
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17719
|
+
exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
|
|
17720
|
+
var version_1 = require_version();
|
|
17721
|
+
var semver_1 = require_semver();
|
|
17722
|
+
var major = version_1.VERSION.split(".")[0];
|
|
17723
|
+
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
|
|
17724
|
+
var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
17725
|
+
function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
17726
|
+
var _a3;
|
|
17727
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
|
|
17728
|
+
version: version_1.VERSION
|
|
17729
|
+
};
|
|
17730
|
+
if (!allowOverride && api2[type]) {
|
|
17731
|
+
const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
|
|
17732
|
+
diag.error(err.stack || err.message);
|
|
17733
|
+
return false;
|
|
17734
|
+
}
|
|
17735
|
+
if (api2.version !== version_1.VERSION) {
|
|
17736
|
+
const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
|
|
17737
|
+
diag.error(err.stack || err.message);
|
|
17738
|
+
return false;
|
|
17739
|
+
}
|
|
17740
|
+
api2[type] = instance;
|
|
17741
|
+
diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
|
|
17742
|
+
return true;
|
|
17743
|
+
}
|
|
17744
|
+
exports.registerGlobal = registerGlobal;
|
|
17745
|
+
function getGlobal(type) {
|
|
17746
|
+
var _a3, _b;
|
|
17747
|
+
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
|
|
17748
|
+
if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
|
|
17749
|
+
return;
|
|
17750
|
+
}
|
|
17751
|
+
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
|
|
17752
|
+
}
|
|
17753
|
+
exports.getGlobal = getGlobal;
|
|
17754
|
+
function unregisterGlobal(type, diag) {
|
|
17755
|
+
diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
|
|
17756
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
17757
|
+
if (api2) {
|
|
17758
|
+
delete api2[type];
|
|
17759
|
+
}
|
|
17760
|
+
}
|
|
17761
|
+
exports.unregisterGlobal = unregisterGlobal;
|
|
17762
|
+
});
|
|
17763
|
+
|
|
17764
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
|
|
17765
|
+
var require_ComponentLogger = __commonJS((exports) => {
|
|
17766
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17767
|
+
exports.DiagComponentLogger = undefined;
|
|
17768
|
+
var global_utils_1 = require_global_utils();
|
|
17769
|
+
|
|
17770
|
+
class DiagComponentLogger {
|
|
17771
|
+
constructor(props) {
|
|
17772
|
+
this._namespace = props.namespace || "DiagComponentLogger";
|
|
17773
|
+
}
|
|
17774
|
+
debug(...args) {
|
|
17775
|
+
return logProxy("debug", this._namespace, args);
|
|
17776
|
+
}
|
|
17777
|
+
error(...args) {
|
|
17778
|
+
return logProxy("error", this._namespace, args);
|
|
17779
|
+
}
|
|
17780
|
+
info(...args) {
|
|
17781
|
+
return logProxy("info", this._namespace, args);
|
|
17782
|
+
}
|
|
17783
|
+
warn(...args) {
|
|
17784
|
+
return logProxy("warn", this._namespace, args);
|
|
17785
|
+
}
|
|
17786
|
+
verbose(...args) {
|
|
17787
|
+
return logProxy("verbose", this._namespace, args);
|
|
17788
|
+
}
|
|
17789
|
+
}
|
|
17790
|
+
exports.DiagComponentLogger = DiagComponentLogger;
|
|
17791
|
+
function logProxy(funcName, namespace, args) {
|
|
17792
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17793
|
+
if (!logger) {
|
|
17794
|
+
return;
|
|
17795
|
+
}
|
|
17796
|
+
return logger[funcName](namespace, ...args);
|
|
17797
|
+
}
|
|
17798
|
+
});
|
|
17799
|
+
|
|
17800
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/types.js
|
|
17801
|
+
var require_types = __commonJS((exports) => {
|
|
17802
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17803
|
+
exports.DiagLogLevel = undefined;
|
|
17804
|
+
var DiagLogLevel;
|
|
17805
|
+
(function(DiagLogLevel2) {
|
|
17806
|
+
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
17807
|
+
DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
|
|
17808
|
+
DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
|
|
17809
|
+
DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
|
|
17810
|
+
DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
|
|
17811
|
+
DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
|
|
17812
|
+
DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
|
|
17813
|
+
})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
|
|
17814
|
+
});
|
|
17815
|
+
|
|
17816
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
|
|
17817
|
+
var require_logLevelLogger = __commonJS((exports) => {
|
|
17818
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17819
|
+
exports.createLogLevelDiagLogger = undefined;
|
|
17820
|
+
var types_1 = require_types();
|
|
17821
|
+
function createLogLevelDiagLogger(maxLevel, logger) {
|
|
17822
|
+
if (maxLevel < types_1.DiagLogLevel.NONE) {
|
|
17823
|
+
maxLevel = types_1.DiagLogLevel.NONE;
|
|
17824
|
+
} else if (maxLevel > types_1.DiagLogLevel.ALL) {
|
|
17825
|
+
maxLevel = types_1.DiagLogLevel.ALL;
|
|
17826
|
+
}
|
|
17827
|
+
logger = logger || {};
|
|
17828
|
+
function _filterFunc(funcName, theLevel) {
|
|
17829
|
+
const theFunc = logger[funcName];
|
|
17830
|
+
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
17831
|
+
return theFunc.bind(logger);
|
|
17832
|
+
}
|
|
17833
|
+
return function() {};
|
|
17834
|
+
}
|
|
17835
|
+
return {
|
|
17836
|
+
error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
|
|
17837
|
+
warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
|
|
17838
|
+
info: _filterFunc("info", types_1.DiagLogLevel.INFO),
|
|
17839
|
+
debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
|
|
17840
|
+
verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
|
|
17841
|
+
};
|
|
17842
|
+
}
|
|
17843
|
+
exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
|
|
17844
|
+
});
|
|
17845
|
+
|
|
17846
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/diag.js
|
|
17847
|
+
var require_diag = __commonJS((exports) => {
|
|
17848
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17849
|
+
exports.DiagAPI = undefined;
|
|
17850
|
+
var ComponentLogger_1 = require_ComponentLogger();
|
|
17851
|
+
var logLevelLogger_1 = require_logLevelLogger();
|
|
17852
|
+
var types_1 = require_types();
|
|
17853
|
+
var global_utils_1 = require_global_utils();
|
|
17854
|
+
var API_NAME = "diag";
|
|
17855
|
+
|
|
17856
|
+
class DiagAPI {
|
|
17857
|
+
static instance() {
|
|
17858
|
+
if (!this._instance) {
|
|
17859
|
+
this._instance = new DiagAPI;
|
|
17860
|
+
}
|
|
17861
|
+
return this._instance;
|
|
17862
|
+
}
|
|
17863
|
+
constructor() {
|
|
17864
|
+
function _logProxy(funcName) {
|
|
17865
|
+
return function(...args) {
|
|
17866
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17867
|
+
if (!logger)
|
|
17868
|
+
return;
|
|
17869
|
+
return logger[funcName](...args);
|
|
17870
|
+
};
|
|
17871
|
+
}
|
|
17872
|
+
const self2 = this;
|
|
17873
|
+
const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
|
|
17874
|
+
var _a3, _b, _c;
|
|
17875
|
+
if (logger === self2) {
|
|
17876
|
+
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
17877
|
+
self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
|
|
17878
|
+
return false;
|
|
17879
|
+
}
|
|
17880
|
+
if (typeof optionsOrLogLevel === "number") {
|
|
17881
|
+
optionsOrLogLevel = {
|
|
17882
|
+
logLevel: optionsOrLogLevel
|
|
17883
|
+
};
|
|
17884
|
+
}
|
|
17885
|
+
const oldLogger = (0, global_utils_1.getGlobal)("diag");
|
|
17886
|
+
const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
|
|
17887
|
+
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
17888
|
+
const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
|
|
17889
|
+
oldLogger.warn(`Current logger will be overwritten from ${stack}`);
|
|
17890
|
+
newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
|
|
17891
|
+
}
|
|
17892
|
+
return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
|
|
17893
|
+
};
|
|
17894
|
+
self2.setLogger = setLogger;
|
|
17895
|
+
self2.disable = () => {
|
|
17896
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, self2);
|
|
17897
|
+
};
|
|
17898
|
+
self2.createComponentLogger = (options) => {
|
|
17899
|
+
return new ComponentLogger_1.DiagComponentLogger(options);
|
|
17900
|
+
};
|
|
17901
|
+
self2.verbose = _logProxy("verbose");
|
|
17902
|
+
self2.debug = _logProxy("debug");
|
|
17903
|
+
self2.info = _logProxy("info");
|
|
17904
|
+
self2.warn = _logProxy("warn");
|
|
17905
|
+
self2.error = _logProxy("error");
|
|
17906
|
+
}
|
|
17907
|
+
}
|
|
17908
|
+
exports.DiagAPI = DiagAPI;
|
|
17909
|
+
});
|
|
17910
|
+
|
|
17911
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
|
|
17912
|
+
var require_baggage_impl = __commonJS((exports) => {
|
|
17913
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17914
|
+
exports.BaggageImpl = undefined;
|
|
17915
|
+
|
|
17916
|
+
class BaggageImpl {
|
|
17917
|
+
constructor(entries) {
|
|
17918
|
+
this._entries = entries ? new Map(entries) : new Map;
|
|
17919
|
+
}
|
|
17920
|
+
getEntry(key) {
|
|
17921
|
+
const entry = this._entries.get(key);
|
|
17922
|
+
if (!entry) {
|
|
17923
|
+
return;
|
|
17924
|
+
}
|
|
17925
|
+
return Object.assign({}, entry);
|
|
17926
|
+
}
|
|
17927
|
+
getAllEntries() {
|
|
17928
|
+
return Array.from(this._entries.entries());
|
|
17929
|
+
}
|
|
17930
|
+
setEntry(key, entry) {
|
|
17931
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17932
|
+
newBaggage._entries.set(key, entry);
|
|
17933
|
+
return newBaggage;
|
|
17934
|
+
}
|
|
17935
|
+
removeEntry(key) {
|
|
17936
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17937
|
+
newBaggage._entries.delete(key);
|
|
17938
|
+
return newBaggage;
|
|
17939
|
+
}
|
|
17940
|
+
removeEntries(...keys) {
|
|
17941
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17942
|
+
for (const key of keys) {
|
|
17943
|
+
newBaggage._entries.delete(key);
|
|
17944
|
+
}
|
|
17945
|
+
return newBaggage;
|
|
17946
|
+
}
|
|
17947
|
+
clear() {
|
|
17948
|
+
return new BaggageImpl;
|
|
17949
|
+
}
|
|
17950
|
+
}
|
|
17951
|
+
exports.BaggageImpl = BaggageImpl;
|
|
17952
|
+
});
|
|
17953
|
+
|
|
17954
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
|
|
17955
|
+
var require_symbol = __commonJS((exports) => {
|
|
17956
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17957
|
+
exports.baggageEntryMetadataSymbol = undefined;
|
|
17958
|
+
exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
|
|
17959
|
+
});
|
|
17960
|
+
|
|
17961
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
|
|
17962
|
+
var require_utils = __commonJS((exports) => {
|
|
17963
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17964
|
+
exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
|
|
17965
|
+
var diag_1 = require_diag();
|
|
17966
|
+
var baggage_impl_1 = require_baggage_impl();
|
|
17967
|
+
var symbol_1 = require_symbol();
|
|
17968
|
+
var diag = diag_1.DiagAPI.instance();
|
|
17969
|
+
function createBaggage(entries = {}) {
|
|
17970
|
+
return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
|
|
17971
|
+
}
|
|
17972
|
+
exports.createBaggage = createBaggage;
|
|
17973
|
+
function baggageEntryMetadataFromString(str) {
|
|
17974
|
+
if (typeof str !== "string") {
|
|
17975
|
+
diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
|
|
17976
|
+
str = "";
|
|
17977
|
+
}
|
|
17978
|
+
return {
|
|
17979
|
+
__TYPE__: symbol_1.baggageEntryMetadataSymbol,
|
|
17980
|
+
toString() {
|
|
17981
|
+
return str;
|
|
17982
|
+
}
|
|
17983
|
+
};
|
|
17984
|
+
}
|
|
17985
|
+
exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
|
|
17986
|
+
});
|
|
17987
|
+
|
|
17988
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/context.js
|
|
17989
|
+
var require_context = __commonJS((exports) => {
|
|
17990
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17991
|
+
exports.ROOT_CONTEXT = exports.createContextKey = undefined;
|
|
17992
|
+
function createContextKey(description) {
|
|
17993
|
+
return Symbol.for(description);
|
|
17994
|
+
}
|
|
17995
|
+
exports.createContextKey = createContextKey;
|
|
17996
|
+
|
|
17997
|
+
class BaseContext {
|
|
17998
|
+
constructor(parentContext) {
|
|
17999
|
+
const self2 = this;
|
|
18000
|
+
self2._currentContext = parentContext ? new Map(parentContext) : new Map;
|
|
18001
|
+
self2.getValue = (key) => self2._currentContext.get(key);
|
|
18002
|
+
self2.setValue = (key, value) => {
|
|
18003
|
+
const context = new BaseContext(self2._currentContext);
|
|
18004
|
+
context._currentContext.set(key, value);
|
|
18005
|
+
return context;
|
|
18006
|
+
};
|
|
18007
|
+
self2.deleteValue = (key) => {
|
|
18008
|
+
const context = new BaseContext(self2._currentContext);
|
|
18009
|
+
context._currentContext.delete(key);
|
|
18010
|
+
return context;
|
|
18011
|
+
};
|
|
18012
|
+
}
|
|
18013
|
+
}
|
|
18014
|
+
exports.ROOT_CONTEXT = new BaseContext;
|
|
18015
|
+
});
|
|
18016
|
+
|
|
18017
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
|
|
18018
|
+
var require_consoleLogger = __commonJS((exports) => {
|
|
18019
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18020
|
+
exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
|
|
18021
|
+
var consoleMap = [
|
|
18022
|
+
{ n: "error", c: "error" },
|
|
18023
|
+
{ n: "warn", c: "warn" },
|
|
18024
|
+
{ n: "info", c: "info" },
|
|
18025
|
+
{ n: "debug", c: "debug" },
|
|
18026
|
+
{ n: "verbose", c: "trace" }
|
|
18027
|
+
];
|
|
18028
|
+
exports._originalConsoleMethods = {};
|
|
18029
|
+
if (typeof console !== "undefined") {
|
|
18030
|
+
const keys = [
|
|
18031
|
+
"error",
|
|
18032
|
+
"warn",
|
|
18033
|
+
"info",
|
|
18034
|
+
"debug",
|
|
18035
|
+
"trace",
|
|
18036
|
+
"log"
|
|
18037
|
+
];
|
|
18038
|
+
for (const key of keys) {
|
|
18039
|
+
if (typeof console[key] === "function") {
|
|
18040
|
+
exports._originalConsoleMethods[key] = console[key];
|
|
18041
|
+
}
|
|
18042
|
+
}
|
|
18043
|
+
}
|
|
18044
|
+
|
|
18045
|
+
class DiagConsoleLogger {
|
|
18046
|
+
constructor() {
|
|
18047
|
+
function _consoleFunc(funcName) {
|
|
18048
|
+
return function(...args) {
|
|
18049
|
+
let theFunc = exports._originalConsoleMethods[funcName];
|
|
18050
|
+
if (typeof theFunc !== "function") {
|
|
18051
|
+
theFunc = exports._originalConsoleMethods["log"];
|
|
18052
|
+
}
|
|
18053
|
+
if (typeof theFunc !== "function" && console) {
|
|
18054
|
+
theFunc = console[funcName];
|
|
18055
|
+
if (typeof theFunc !== "function") {
|
|
18056
|
+
theFunc = console.log;
|
|
18057
|
+
}
|
|
18058
|
+
}
|
|
18059
|
+
if (typeof theFunc === "function") {
|
|
18060
|
+
return theFunc.apply(console, args);
|
|
18061
|
+
}
|
|
18062
|
+
};
|
|
18063
|
+
}
|
|
18064
|
+
for (let i = 0;i < consoleMap.length; i++) {
|
|
18065
|
+
this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
|
|
18066
|
+
}
|
|
18067
|
+
}
|
|
18068
|
+
}
|
|
18069
|
+
exports.DiagConsoleLogger = DiagConsoleLogger;
|
|
18070
|
+
});
|
|
18071
|
+
|
|
18072
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
|
|
18073
|
+
var require_NoopMeter = __commonJS((exports) => {
|
|
18074
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18075
|
+
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;
|
|
18076
|
+
|
|
18077
|
+
class NoopMeter {
|
|
18078
|
+
constructor() {}
|
|
18079
|
+
createGauge(_name, _options) {
|
|
18080
|
+
return exports.NOOP_GAUGE_METRIC;
|
|
18081
|
+
}
|
|
18082
|
+
createHistogram(_name, _options) {
|
|
18083
|
+
return exports.NOOP_HISTOGRAM_METRIC;
|
|
18084
|
+
}
|
|
18085
|
+
createCounter(_name, _options) {
|
|
18086
|
+
return exports.NOOP_COUNTER_METRIC;
|
|
18087
|
+
}
|
|
18088
|
+
createUpDownCounter(_name, _options) {
|
|
18089
|
+
return exports.NOOP_UP_DOWN_COUNTER_METRIC;
|
|
18090
|
+
}
|
|
18091
|
+
createObservableGauge(_name, _options) {
|
|
18092
|
+
return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
|
|
18093
|
+
}
|
|
18094
|
+
createObservableCounter(_name, _options) {
|
|
18095
|
+
return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
|
|
18096
|
+
}
|
|
18097
|
+
createObservableUpDownCounter(_name, _options) {
|
|
18098
|
+
return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
18099
|
+
}
|
|
18100
|
+
addBatchObservableCallback(_callback, _observables) {}
|
|
18101
|
+
removeBatchObservableCallback(_callback) {}
|
|
18102
|
+
}
|
|
18103
|
+
exports.NoopMeter = NoopMeter;
|
|
18104
|
+
|
|
18105
|
+
class NoopMetric {
|
|
18106
|
+
}
|
|
18107
|
+
exports.NoopMetric = NoopMetric;
|
|
18108
|
+
|
|
18109
|
+
class NoopCounterMetric extends NoopMetric {
|
|
18110
|
+
add(_value, _attributes) {}
|
|
18111
|
+
}
|
|
18112
|
+
exports.NoopCounterMetric = NoopCounterMetric;
|
|
18113
|
+
|
|
18114
|
+
class NoopUpDownCounterMetric extends NoopMetric {
|
|
18115
|
+
add(_value, _attributes) {}
|
|
18116
|
+
}
|
|
18117
|
+
exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
|
|
18118
|
+
|
|
18119
|
+
class NoopGaugeMetric extends NoopMetric {
|
|
18120
|
+
record(_value, _attributes) {}
|
|
18121
|
+
}
|
|
18122
|
+
exports.NoopGaugeMetric = NoopGaugeMetric;
|
|
18123
|
+
|
|
18124
|
+
class NoopHistogramMetric extends NoopMetric {
|
|
18125
|
+
record(_value, _attributes) {}
|
|
18126
|
+
}
|
|
18127
|
+
exports.NoopHistogramMetric = NoopHistogramMetric;
|
|
18128
|
+
|
|
18129
|
+
class NoopObservableMetric {
|
|
18130
|
+
addCallback(_callback) {}
|
|
18131
|
+
removeCallback(_callback) {}
|
|
18132
|
+
}
|
|
18133
|
+
exports.NoopObservableMetric = NoopObservableMetric;
|
|
18134
|
+
|
|
18135
|
+
class NoopObservableCounterMetric extends NoopObservableMetric {
|
|
18136
|
+
}
|
|
18137
|
+
exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
|
|
18138
|
+
|
|
18139
|
+
class NoopObservableGaugeMetric extends NoopObservableMetric {
|
|
18140
|
+
}
|
|
18141
|
+
exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
|
|
18142
|
+
|
|
18143
|
+
class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
|
|
18144
|
+
}
|
|
18145
|
+
exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
|
|
18146
|
+
exports.NOOP_METER = new NoopMeter;
|
|
18147
|
+
exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
|
|
18148
|
+
exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
|
|
18149
|
+
exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
|
|
18150
|
+
exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
|
|
18151
|
+
exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
|
|
18152
|
+
exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
|
|
18153
|
+
exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
|
|
18154
|
+
function createNoopMeter() {
|
|
18155
|
+
return exports.NOOP_METER;
|
|
18156
|
+
}
|
|
18157
|
+
exports.createNoopMeter = createNoopMeter;
|
|
18158
|
+
});
|
|
18159
|
+
|
|
18160
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
|
|
18161
|
+
var require_Metric = __commonJS((exports) => {
|
|
18162
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18163
|
+
exports.ValueType = undefined;
|
|
18164
|
+
var ValueType;
|
|
18165
|
+
(function(ValueType2) {
|
|
18166
|
+
ValueType2[ValueType2["INT"] = 0] = "INT";
|
|
18167
|
+
ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
|
|
18168
|
+
})(ValueType = exports.ValueType || (exports.ValueType = {}));
|
|
18169
|
+
});
|
|
18170
|
+
|
|
18171
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
|
|
18172
|
+
var require_TextMapPropagator = __commonJS((exports) => {
|
|
18173
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18174
|
+
exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
|
|
18175
|
+
exports.defaultTextMapGetter = {
|
|
18176
|
+
get(carrier, key) {
|
|
18177
|
+
if (carrier == null) {
|
|
18178
|
+
return;
|
|
18179
|
+
}
|
|
18180
|
+
return carrier[key];
|
|
18181
|
+
},
|
|
18182
|
+
keys(carrier) {
|
|
18183
|
+
if (carrier == null) {
|
|
18184
|
+
return [];
|
|
18185
|
+
}
|
|
18186
|
+
return Object.keys(carrier);
|
|
18187
|
+
}
|
|
18188
|
+
};
|
|
18189
|
+
exports.defaultTextMapSetter = {
|
|
18190
|
+
set(carrier, key, value) {
|
|
18191
|
+
if (carrier == null) {
|
|
18192
|
+
return;
|
|
18193
|
+
}
|
|
18194
|
+
carrier[key] = value;
|
|
18195
|
+
}
|
|
18196
|
+
};
|
|
18197
|
+
});
|
|
18198
|
+
|
|
18199
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
|
|
18200
|
+
var require_NoopContextManager = __commonJS((exports) => {
|
|
18201
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18202
|
+
exports.NoopContextManager = undefined;
|
|
18203
|
+
var context_1 = require_context();
|
|
18204
|
+
|
|
18205
|
+
class NoopContextManager {
|
|
18206
|
+
active() {
|
|
18207
|
+
return context_1.ROOT_CONTEXT;
|
|
18208
|
+
}
|
|
18209
|
+
with(_context, fn, thisArg, ...args) {
|
|
18210
|
+
return fn.call(thisArg, ...args);
|
|
18211
|
+
}
|
|
18212
|
+
bind(_context, target) {
|
|
18213
|
+
return target;
|
|
18214
|
+
}
|
|
18215
|
+
enable() {
|
|
18216
|
+
return this;
|
|
18217
|
+
}
|
|
18218
|
+
disable() {
|
|
18219
|
+
return this;
|
|
18220
|
+
}
|
|
18221
|
+
}
|
|
18222
|
+
exports.NoopContextManager = NoopContextManager;
|
|
18223
|
+
});
|
|
18224
|
+
|
|
18225
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/context.js
|
|
18226
|
+
var require_context2 = __commonJS((exports) => {
|
|
18227
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18228
|
+
exports.ContextAPI = undefined;
|
|
18229
|
+
var NoopContextManager_1 = require_NoopContextManager();
|
|
18230
|
+
var global_utils_1 = require_global_utils();
|
|
18231
|
+
var diag_1 = require_diag();
|
|
18232
|
+
var API_NAME = "context";
|
|
18233
|
+
var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
|
|
18234
|
+
|
|
18235
|
+
class ContextAPI {
|
|
18236
|
+
constructor() {}
|
|
18237
|
+
static getInstance() {
|
|
18238
|
+
if (!this._instance) {
|
|
18239
|
+
this._instance = new ContextAPI;
|
|
18240
|
+
}
|
|
18241
|
+
return this._instance;
|
|
18242
|
+
}
|
|
18243
|
+
setGlobalContextManager(contextManager) {
|
|
18244
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
|
|
18245
|
+
}
|
|
18246
|
+
active() {
|
|
18247
|
+
return this._getContextManager().active();
|
|
18248
|
+
}
|
|
18249
|
+
with(context, fn, thisArg, ...args) {
|
|
18250
|
+
return this._getContextManager().with(context, fn, thisArg, ...args);
|
|
18251
|
+
}
|
|
18252
|
+
bind(context, target) {
|
|
18253
|
+
return this._getContextManager().bind(context, target);
|
|
18254
|
+
}
|
|
18255
|
+
_getContextManager() {
|
|
18256
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
|
|
18257
|
+
}
|
|
18258
|
+
disable() {
|
|
18259
|
+
this._getContextManager().disable();
|
|
18260
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18261
|
+
}
|
|
18262
|
+
}
|
|
18263
|
+
exports.ContextAPI = ContextAPI;
|
|
18264
|
+
});
|
|
18265
|
+
|
|
18266
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
|
|
18267
|
+
var require_trace_flags = __commonJS((exports) => {
|
|
18268
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18269
|
+
exports.TraceFlags = undefined;
|
|
18270
|
+
var TraceFlags;
|
|
18271
|
+
(function(TraceFlags2) {
|
|
18272
|
+
TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
|
|
18273
|
+
TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
|
|
18274
|
+
})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
|
|
18275
|
+
});
|
|
18276
|
+
|
|
18277
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
|
|
18278
|
+
var require_invalid_span_constants = __commonJS((exports) => {
|
|
18279
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18280
|
+
exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
|
|
18281
|
+
var trace_flags_1 = require_trace_flags();
|
|
18282
|
+
exports.INVALID_SPANID = "0000000000000000";
|
|
18283
|
+
exports.INVALID_TRACEID = "00000000000000000000000000000000";
|
|
18284
|
+
exports.INVALID_SPAN_CONTEXT = {
|
|
18285
|
+
traceId: exports.INVALID_TRACEID,
|
|
18286
|
+
spanId: exports.INVALID_SPANID,
|
|
18287
|
+
traceFlags: trace_flags_1.TraceFlags.NONE
|
|
18288
|
+
};
|
|
18289
|
+
});
|
|
18290
|
+
|
|
18291
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
|
|
18292
|
+
var require_NonRecordingSpan = __commonJS((exports) => {
|
|
18293
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18294
|
+
exports.NonRecordingSpan = undefined;
|
|
18295
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18296
|
+
|
|
18297
|
+
class NonRecordingSpan {
|
|
18298
|
+
constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
|
|
18299
|
+
this._spanContext = spanContext;
|
|
18300
|
+
}
|
|
18301
|
+
spanContext() {
|
|
18302
|
+
return this._spanContext;
|
|
18303
|
+
}
|
|
18304
|
+
setAttribute(_key, _value) {
|
|
18305
|
+
return this;
|
|
18306
|
+
}
|
|
18307
|
+
setAttributes(_attributes) {
|
|
18308
|
+
return this;
|
|
18309
|
+
}
|
|
18310
|
+
addEvent(_name, _attributes) {
|
|
18311
|
+
return this;
|
|
18312
|
+
}
|
|
18313
|
+
addLink(_link) {
|
|
18314
|
+
return this;
|
|
18315
|
+
}
|
|
18316
|
+
addLinks(_links) {
|
|
18317
|
+
return this;
|
|
18318
|
+
}
|
|
18319
|
+
setStatus(_status) {
|
|
18320
|
+
return this;
|
|
18321
|
+
}
|
|
18322
|
+
updateName(_name) {
|
|
18323
|
+
return this;
|
|
18324
|
+
}
|
|
18325
|
+
end(_endTime) {}
|
|
18326
|
+
isRecording() {
|
|
18327
|
+
return false;
|
|
18328
|
+
}
|
|
18329
|
+
recordException(_exception, _time) {}
|
|
18330
|
+
}
|
|
18331
|
+
exports.NonRecordingSpan = NonRecordingSpan;
|
|
18332
|
+
});
|
|
18333
|
+
|
|
18334
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
|
|
18335
|
+
var require_context_utils = __commonJS((exports) => {
|
|
18336
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18337
|
+
exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
|
|
18338
|
+
var context_1 = require_context();
|
|
18339
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18340
|
+
var context_2 = require_context2();
|
|
18341
|
+
var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
|
|
18342
|
+
function getSpan(context) {
|
|
18343
|
+
return context.getValue(SPAN_KEY) || undefined;
|
|
18344
|
+
}
|
|
18345
|
+
exports.getSpan = getSpan;
|
|
18346
|
+
function getActiveSpan() {
|
|
18347
|
+
return getSpan(context_2.ContextAPI.getInstance().active());
|
|
18348
|
+
}
|
|
18349
|
+
exports.getActiveSpan = getActiveSpan;
|
|
18350
|
+
function setSpan(context, span) {
|
|
18351
|
+
return context.setValue(SPAN_KEY, span);
|
|
18352
|
+
}
|
|
18353
|
+
exports.setSpan = setSpan;
|
|
18354
|
+
function deleteSpan(context) {
|
|
18355
|
+
return context.deleteValue(SPAN_KEY);
|
|
18356
|
+
}
|
|
18357
|
+
exports.deleteSpan = deleteSpan;
|
|
18358
|
+
function setSpanContext(context, spanContext) {
|
|
18359
|
+
return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
|
|
18360
|
+
}
|
|
18361
|
+
exports.setSpanContext = setSpanContext;
|
|
18362
|
+
function getSpanContext(context) {
|
|
18363
|
+
var _a3;
|
|
18364
|
+
return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
|
|
18365
|
+
}
|
|
18366
|
+
exports.getSpanContext = getSpanContext;
|
|
18367
|
+
});
|
|
18368
|
+
|
|
18369
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
|
|
18370
|
+
var require_spancontext_utils = __commonJS((exports) => {
|
|
18371
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18372
|
+
exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
|
|
18373
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18374
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18375
|
+
var isHex = new Uint8Array([
|
|
18376
|
+
0,
|
|
18377
|
+
0,
|
|
18378
|
+
0,
|
|
18379
|
+
0,
|
|
18380
|
+
0,
|
|
18381
|
+
0,
|
|
18382
|
+
0,
|
|
18383
|
+
0,
|
|
18384
|
+
0,
|
|
18385
|
+
0,
|
|
18386
|
+
0,
|
|
18387
|
+
0,
|
|
18388
|
+
0,
|
|
18389
|
+
0,
|
|
18390
|
+
0,
|
|
18391
|
+
0,
|
|
18392
|
+
0,
|
|
18393
|
+
0,
|
|
18394
|
+
0,
|
|
18395
|
+
0,
|
|
18396
|
+
0,
|
|
18397
|
+
0,
|
|
18398
|
+
0,
|
|
18399
|
+
0,
|
|
18400
|
+
0,
|
|
18401
|
+
0,
|
|
18402
|
+
0,
|
|
18403
|
+
0,
|
|
18404
|
+
0,
|
|
18405
|
+
0,
|
|
18406
|
+
0,
|
|
18407
|
+
0,
|
|
18408
|
+
0,
|
|
18409
|
+
0,
|
|
18410
|
+
0,
|
|
18411
|
+
0,
|
|
18412
|
+
0,
|
|
18413
|
+
0,
|
|
18414
|
+
0,
|
|
18415
|
+
0,
|
|
18416
|
+
0,
|
|
18417
|
+
0,
|
|
18418
|
+
0,
|
|
18419
|
+
0,
|
|
18420
|
+
0,
|
|
18421
|
+
0,
|
|
18422
|
+
0,
|
|
18423
|
+
0,
|
|
18424
|
+
1,
|
|
18425
|
+
1,
|
|
18426
|
+
1,
|
|
18427
|
+
1,
|
|
18428
|
+
1,
|
|
18429
|
+
1,
|
|
18430
|
+
1,
|
|
18431
|
+
1,
|
|
18432
|
+
1,
|
|
18433
|
+
1,
|
|
18434
|
+
0,
|
|
18435
|
+
0,
|
|
18436
|
+
0,
|
|
18437
|
+
0,
|
|
18438
|
+
0,
|
|
18439
|
+
0,
|
|
18440
|
+
0,
|
|
18441
|
+
1,
|
|
18442
|
+
1,
|
|
18443
|
+
1,
|
|
18444
|
+
1,
|
|
18445
|
+
1,
|
|
18446
|
+
1,
|
|
18447
|
+
0,
|
|
18448
|
+
0,
|
|
18449
|
+
0,
|
|
18450
|
+
0,
|
|
18451
|
+
0,
|
|
18452
|
+
0,
|
|
18453
|
+
0,
|
|
18454
|
+
0,
|
|
18455
|
+
0,
|
|
18456
|
+
0,
|
|
18457
|
+
0,
|
|
18458
|
+
0,
|
|
18459
|
+
0,
|
|
18460
|
+
0,
|
|
18461
|
+
0,
|
|
18462
|
+
0,
|
|
18463
|
+
0,
|
|
18464
|
+
0,
|
|
18465
|
+
0,
|
|
18466
|
+
0,
|
|
18467
|
+
0,
|
|
18468
|
+
0,
|
|
18469
|
+
0,
|
|
18470
|
+
0,
|
|
18471
|
+
0,
|
|
18472
|
+
0,
|
|
18473
|
+
1,
|
|
18474
|
+
1,
|
|
18475
|
+
1,
|
|
18476
|
+
1,
|
|
18477
|
+
1,
|
|
18478
|
+
1
|
|
18479
|
+
]);
|
|
18480
|
+
function isValidHex(id, length) {
|
|
18481
|
+
if (typeof id !== "string" || id.length !== length)
|
|
18482
|
+
return false;
|
|
18483
|
+
let r = 0;
|
|
18484
|
+
for (let i = 0;i < id.length; i += 4) {
|
|
18485
|
+
r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
18486
|
+
}
|
|
18487
|
+
return r === length;
|
|
18488
|
+
}
|
|
18489
|
+
function isValidTraceId(traceId) {
|
|
18490
|
+
return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
|
|
18491
|
+
}
|
|
18492
|
+
exports.isValidTraceId = isValidTraceId;
|
|
18493
|
+
function isValidSpanId(spanId) {
|
|
18494
|
+
return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
|
|
18495
|
+
}
|
|
18496
|
+
exports.isValidSpanId = isValidSpanId;
|
|
18497
|
+
function isSpanContextValid(spanContext) {
|
|
18498
|
+
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
18499
|
+
}
|
|
18500
|
+
exports.isSpanContextValid = isSpanContextValid;
|
|
18501
|
+
function wrapSpanContext(spanContext) {
|
|
18502
|
+
return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
|
|
18503
|
+
}
|
|
18504
|
+
exports.wrapSpanContext = wrapSpanContext;
|
|
18505
|
+
});
|
|
18506
|
+
|
|
18507
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
|
|
18508
|
+
var require_NoopTracer = __commonJS((exports) => {
|
|
18509
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18510
|
+
exports.NoopTracer = undefined;
|
|
18511
|
+
var context_1 = require_context2();
|
|
18512
|
+
var context_utils_1 = require_context_utils();
|
|
18513
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18514
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18515
|
+
var contextApi = context_1.ContextAPI.getInstance();
|
|
18516
|
+
|
|
18517
|
+
class NoopTracer {
|
|
18518
|
+
startSpan(name, options, context = contextApi.active()) {
|
|
18519
|
+
const root = Boolean(options === null || options === undefined ? undefined : options.root);
|
|
18520
|
+
if (root) {
|
|
18521
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18522
|
+
}
|
|
18523
|
+
const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
|
|
18524
|
+
if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
|
|
18525
|
+
return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
|
|
18526
|
+
} else {
|
|
18527
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18528
|
+
}
|
|
18529
|
+
}
|
|
18530
|
+
startActiveSpan(name, arg2, arg3, arg4) {
|
|
18531
|
+
let opts;
|
|
18532
|
+
let ctx;
|
|
18533
|
+
let fn;
|
|
18534
|
+
if (arguments.length < 2) {
|
|
18535
|
+
return;
|
|
18536
|
+
} else if (arguments.length === 2) {
|
|
18537
|
+
fn = arg2;
|
|
18538
|
+
} else if (arguments.length === 3) {
|
|
18539
|
+
opts = arg2;
|
|
18540
|
+
fn = arg3;
|
|
18541
|
+
} else {
|
|
18542
|
+
opts = arg2;
|
|
18543
|
+
ctx = arg3;
|
|
18544
|
+
fn = arg4;
|
|
18545
|
+
}
|
|
18546
|
+
const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
|
|
18547
|
+
const span = this.startSpan(name, opts, parentContext);
|
|
18548
|
+
const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
|
|
18549
|
+
return contextApi.with(contextWithSpanSet, fn, undefined, span);
|
|
18550
|
+
}
|
|
18551
|
+
}
|
|
18552
|
+
exports.NoopTracer = NoopTracer;
|
|
18553
|
+
function isSpanContext(spanContext) {
|
|
18554
|
+
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";
|
|
18555
|
+
}
|
|
18556
|
+
});
|
|
18557
|
+
|
|
18558
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
|
|
18559
|
+
var require_ProxyTracer = __commonJS((exports) => {
|
|
18560
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18561
|
+
exports.ProxyTracer = undefined;
|
|
18562
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18563
|
+
var NOOP_TRACER = new NoopTracer_1.NoopTracer;
|
|
18564
|
+
|
|
18565
|
+
class ProxyTracer {
|
|
18566
|
+
constructor(provider, name, version2, options) {
|
|
18567
|
+
this._provider = provider;
|
|
18568
|
+
this.name = name;
|
|
18569
|
+
this.version = version2;
|
|
18570
|
+
this.options = options;
|
|
18571
|
+
}
|
|
18572
|
+
startSpan(name, options, context) {
|
|
18573
|
+
return this._getTracer().startSpan(name, options, context);
|
|
18574
|
+
}
|
|
18575
|
+
startActiveSpan(_name, _options, _context, _fn) {
|
|
18576
|
+
const tracer = this._getTracer();
|
|
18577
|
+
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
18578
|
+
}
|
|
18579
|
+
_getTracer() {
|
|
18580
|
+
if (this._delegate) {
|
|
18581
|
+
return this._delegate;
|
|
18582
|
+
}
|
|
18583
|
+
const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
18584
|
+
if (!tracer) {
|
|
18585
|
+
return NOOP_TRACER;
|
|
18586
|
+
}
|
|
18587
|
+
this._delegate = tracer;
|
|
18588
|
+
return this._delegate;
|
|
18589
|
+
}
|
|
18590
|
+
}
|
|
18591
|
+
exports.ProxyTracer = ProxyTracer;
|
|
18592
|
+
});
|
|
18593
|
+
|
|
18594
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
|
|
18595
|
+
var require_NoopTracerProvider = __commonJS((exports) => {
|
|
18596
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18597
|
+
exports.NoopTracerProvider = undefined;
|
|
18598
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18599
|
+
|
|
18600
|
+
class NoopTracerProvider {
|
|
18601
|
+
getTracer(_name, _version, _options) {
|
|
18602
|
+
return new NoopTracer_1.NoopTracer;
|
|
18603
|
+
}
|
|
18604
|
+
}
|
|
18605
|
+
exports.NoopTracerProvider = NoopTracerProvider;
|
|
18606
|
+
});
|
|
18607
|
+
|
|
18608
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
|
|
18609
|
+
var require_ProxyTracerProvider = __commonJS((exports) => {
|
|
18610
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18611
|
+
exports.ProxyTracerProvider = undefined;
|
|
18612
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
18613
|
+
var NoopTracerProvider_1 = require_NoopTracerProvider();
|
|
18614
|
+
var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
|
|
18615
|
+
|
|
18616
|
+
class ProxyTracerProvider {
|
|
18617
|
+
getTracer(name, version2, options) {
|
|
18618
|
+
var _a3;
|
|
18619
|
+
return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
|
|
18620
|
+
}
|
|
18621
|
+
getDelegate() {
|
|
18622
|
+
var _a3;
|
|
18623
|
+
return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
|
|
18624
|
+
}
|
|
18625
|
+
setDelegate(delegate) {
|
|
18626
|
+
this._delegate = delegate;
|
|
18627
|
+
}
|
|
18628
|
+
getDelegateTracer(name, version2, options) {
|
|
18629
|
+
var _a3;
|
|
18630
|
+
return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
|
|
18631
|
+
}
|
|
18632
|
+
}
|
|
18633
|
+
exports.ProxyTracerProvider = ProxyTracerProvider;
|
|
18634
|
+
});
|
|
18635
|
+
|
|
18636
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
|
|
18637
|
+
var require_SamplingResult = __commonJS((exports) => {
|
|
18638
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18639
|
+
exports.SamplingDecision = undefined;
|
|
18640
|
+
var SamplingDecision;
|
|
18641
|
+
(function(SamplingDecision2) {
|
|
18642
|
+
SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
|
|
18643
|
+
SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
|
|
18644
|
+
SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
|
|
18645
|
+
})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
|
|
18646
|
+
});
|
|
18647
|
+
|
|
18648
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
|
|
18649
|
+
var require_span_kind = __commonJS((exports) => {
|
|
18650
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18651
|
+
exports.SpanKind = undefined;
|
|
18652
|
+
var SpanKind;
|
|
18653
|
+
(function(SpanKind2) {
|
|
18654
|
+
SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
|
|
18655
|
+
SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
|
|
18656
|
+
SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
|
|
18657
|
+
SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
|
|
18658
|
+
SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
|
|
18659
|
+
})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
|
|
18660
|
+
});
|
|
18661
|
+
|
|
18662
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/status.js
|
|
18663
|
+
var require_status = __commonJS((exports) => {
|
|
18664
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18665
|
+
exports.SpanStatusCode = undefined;
|
|
18666
|
+
var SpanStatusCode;
|
|
18667
|
+
(function(SpanStatusCode2) {
|
|
18668
|
+
SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
|
|
18669
|
+
SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
|
|
18670
|
+
SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
|
|
18671
|
+
})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
|
|
18672
|
+
});
|
|
18673
|
+
|
|
18674
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
|
|
18675
|
+
var require_tracestate_validators = __commonJS((exports) => {
|
|
18676
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18677
|
+
exports.validateValue = exports.validateKey = undefined;
|
|
18678
|
+
var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
18679
|
+
var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
|
|
18680
|
+
var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
18681
|
+
var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
18682
|
+
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
18683
|
+
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
18684
|
+
function validateKey(key) {
|
|
18685
|
+
return VALID_KEY_REGEX.test(key);
|
|
18686
|
+
}
|
|
18687
|
+
exports.validateKey = validateKey;
|
|
18688
|
+
function validateValue(value) {
|
|
18689
|
+
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
18690
|
+
}
|
|
18691
|
+
exports.validateValue = validateValue;
|
|
18692
|
+
});
|
|
18693
|
+
|
|
18694
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
|
|
18695
|
+
var require_tracestate_impl = __commonJS((exports) => {
|
|
18696
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18697
|
+
exports.TraceStateImpl = undefined;
|
|
18698
|
+
var tracestate_validators_1 = require_tracestate_validators();
|
|
18699
|
+
var MAX_TRACE_STATE_ITEMS = 32;
|
|
18700
|
+
var MAX_TRACE_STATE_LEN = 512;
|
|
18701
|
+
var LIST_MEMBERS_SEPARATOR = ",";
|
|
18702
|
+
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
18703
|
+
|
|
18704
|
+
class TraceStateImpl {
|
|
18705
|
+
constructor(rawTraceState) {
|
|
18706
|
+
this._internalState = new Map;
|
|
18707
|
+
if (rawTraceState)
|
|
18708
|
+
this._parse(rawTraceState);
|
|
18709
|
+
}
|
|
18710
|
+
set(key, value) {
|
|
18711
|
+
const traceState = this._clone();
|
|
18712
|
+
if (traceState._internalState.has(key)) {
|
|
18713
|
+
traceState._internalState.delete(key);
|
|
18714
|
+
}
|
|
18715
|
+
traceState._internalState.set(key, value);
|
|
18716
|
+
return traceState;
|
|
18717
|
+
}
|
|
18718
|
+
unset(key) {
|
|
18719
|
+
const traceState = this._clone();
|
|
18720
|
+
traceState._internalState.delete(key);
|
|
18721
|
+
return traceState;
|
|
18722
|
+
}
|
|
18723
|
+
get(key) {
|
|
18724
|
+
return this._internalState.get(key);
|
|
18725
|
+
}
|
|
18726
|
+
serialize() {
|
|
18727
|
+
return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
|
|
18728
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
|
|
18729
|
+
return agg;
|
|
18730
|
+
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
18731
|
+
}
|
|
18732
|
+
_parse(rawTraceState) {
|
|
18733
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
18734
|
+
return;
|
|
18735
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
|
|
18736
|
+
const listMember = part.trim();
|
|
18737
|
+
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
18738
|
+
if (i !== -1) {
|
|
18739
|
+
const key = listMember.slice(0, i);
|
|
18740
|
+
const value = listMember.slice(i + 1, part.length);
|
|
18741
|
+
if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
|
|
18742
|
+
agg.set(key, value);
|
|
18743
|
+
}
|
|
18744
|
+
}
|
|
18745
|
+
return agg;
|
|
18746
|
+
}, new Map);
|
|
18747
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
18748
|
+
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
18749
|
+
}
|
|
18750
|
+
}
|
|
18751
|
+
_keys() {
|
|
18752
|
+
return Array.from(this._internalState.keys()).reverse();
|
|
18753
|
+
}
|
|
18754
|
+
_clone() {
|
|
18755
|
+
const traceState = new TraceStateImpl;
|
|
18756
|
+
traceState._internalState = new Map(this._internalState);
|
|
18757
|
+
return traceState;
|
|
18758
|
+
}
|
|
18759
|
+
}
|
|
18760
|
+
exports.TraceStateImpl = TraceStateImpl;
|
|
18761
|
+
});
|
|
18762
|
+
|
|
18763
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
|
|
18764
|
+
var require_utils2 = __commonJS((exports) => {
|
|
18765
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18766
|
+
exports.createTraceState = undefined;
|
|
18767
|
+
var tracestate_impl_1 = require_tracestate_impl();
|
|
18768
|
+
function createTraceState(rawTraceState) {
|
|
18769
|
+
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
|
|
18770
|
+
}
|
|
18771
|
+
exports.createTraceState = createTraceState;
|
|
18772
|
+
});
|
|
18773
|
+
|
|
18774
|
+
// ../../node_modules/@opentelemetry/api/build/src/context-api.js
|
|
18775
|
+
var require_context_api = __commonJS((exports) => {
|
|
18776
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18777
|
+
exports.context = undefined;
|
|
18778
|
+
var context_1 = require_context2();
|
|
18779
|
+
exports.context = context_1.ContextAPI.getInstance();
|
|
18780
|
+
});
|
|
18781
|
+
|
|
18782
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag-api.js
|
|
18783
|
+
var require_diag_api = __commonJS((exports) => {
|
|
18784
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18785
|
+
exports.diag = undefined;
|
|
18786
|
+
var diag_1 = require_diag();
|
|
18787
|
+
exports.diag = diag_1.DiagAPI.instance();
|
|
18788
|
+
});
|
|
18789
|
+
|
|
18790
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
|
|
18791
|
+
var require_NoopMeterProvider = __commonJS((exports) => {
|
|
18792
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18793
|
+
exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
|
|
18794
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
18795
|
+
|
|
18796
|
+
class NoopMeterProvider {
|
|
18797
|
+
getMeter(_name, _version, _options) {
|
|
18798
|
+
return NoopMeter_1.NOOP_METER;
|
|
18799
|
+
}
|
|
18800
|
+
}
|
|
18801
|
+
exports.NoopMeterProvider = NoopMeterProvider;
|
|
18802
|
+
exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
|
|
18803
|
+
});
|
|
18804
|
+
|
|
18805
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
|
|
18806
|
+
var require_metrics = __commonJS((exports) => {
|
|
18807
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18808
|
+
exports.MetricsAPI = undefined;
|
|
18809
|
+
var NoopMeterProvider_1 = require_NoopMeterProvider();
|
|
18810
|
+
var global_utils_1 = require_global_utils();
|
|
18811
|
+
var diag_1 = require_diag();
|
|
18812
|
+
var API_NAME = "metrics";
|
|
18813
|
+
|
|
18814
|
+
class MetricsAPI {
|
|
18815
|
+
constructor() {}
|
|
18816
|
+
static getInstance() {
|
|
18817
|
+
if (!this._instance) {
|
|
18818
|
+
this._instance = new MetricsAPI;
|
|
18819
|
+
}
|
|
18820
|
+
return this._instance;
|
|
18821
|
+
}
|
|
18822
|
+
setGlobalMeterProvider(provider) {
|
|
18823
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
|
|
18824
|
+
}
|
|
18825
|
+
getMeterProvider() {
|
|
18826
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
|
|
18827
|
+
}
|
|
18828
|
+
getMeter(name, version2, options) {
|
|
18829
|
+
return this.getMeterProvider().getMeter(name, version2, options);
|
|
18830
|
+
}
|
|
18831
|
+
disable() {
|
|
18832
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18833
|
+
}
|
|
18834
|
+
}
|
|
18835
|
+
exports.MetricsAPI = MetricsAPI;
|
|
18836
|
+
});
|
|
18837
|
+
|
|
18838
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
|
|
18839
|
+
var require_metrics_api = __commonJS((exports) => {
|
|
18840
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18841
|
+
exports.metrics = undefined;
|
|
18842
|
+
var metrics_1 = require_metrics();
|
|
18843
|
+
exports.metrics = metrics_1.MetricsAPI.getInstance();
|
|
18844
|
+
});
|
|
18845
|
+
|
|
18846
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
|
|
18847
|
+
var require_NoopTextMapPropagator = __commonJS((exports) => {
|
|
18848
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18849
|
+
exports.NoopTextMapPropagator = undefined;
|
|
18850
|
+
|
|
18851
|
+
class NoopTextMapPropagator {
|
|
18852
|
+
inject(_context, _carrier) {}
|
|
18853
|
+
extract(context, _carrier) {
|
|
18854
|
+
return context;
|
|
18855
|
+
}
|
|
18856
|
+
fields() {
|
|
18857
|
+
return [];
|
|
18858
|
+
}
|
|
18859
|
+
}
|
|
18860
|
+
exports.NoopTextMapPropagator = NoopTextMapPropagator;
|
|
18861
|
+
});
|
|
18862
|
+
|
|
18863
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
|
|
18864
|
+
var require_context_helpers = __commonJS((exports) => {
|
|
18865
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18866
|
+
exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
|
|
18867
|
+
var context_1 = require_context2();
|
|
18868
|
+
var context_2 = require_context();
|
|
18869
|
+
var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
|
|
18870
|
+
function getBaggage(context) {
|
|
18871
|
+
return context.getValue(BAGGAGE_KEY) || undefined;
|
|
18872
|
+
}
|
|
18873
|
+
exports.getBaggage = getBaggage;
|
|
18874
|
+
function getActiveBaggage() {
|
|
18875
|
+
return getBaggage(context_1.ContextAPI.getInstance().active());
|
|
18876
|
+
}
|
|
18877
|
+
exports.getActiveBaggage = getActiveBaggage;
|
|
18878
|
+
function setBaggage(context, baggage) {
|
|
18879
|
+
return context.setValue(BAGGAGE_KEY, baggage);
|
|
18880
|
+
}
|
|
18881
|
+
exports.setBaggage = setBaggage;
|
|
18882
|
+
function deleteBaggage(context) {
|
|
18883
|
+
return context.deleteValue(BAGGAGE_KEY);
|
|
18884
|
+
}
|
|
18885
|
+
exports.deleteBaggage = deleteBaggage;
|
|
18886
|
+
});
|
|
18887
|
+
|
|
18888
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
|
|
18889
|
+
var require_propagation = __commonJS((exports) => {
|
|
18890
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18891
|
+
exports.PropagationAPI = undefined;
|
|
18892
|
+
var global_utils_1 = require_global_utils();
|
|
18893
|
+
var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
|
|
18894
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18895
|
+
var context_helpers_1 = require_context_helpers();
|
|
18896
|
+
var utils_1 = require_utils();
|
|
18897
|
+
var diag_1 = require_diag();
|
|
18898
|
+
var API_NAME = "propagation";
|
|
18899
|
+
var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
|
|
18900
|
+
|
|
18901
|
+
class PropagationAPI {
|
|
18902
|
+
constructor() {
|
|
18903
|
+
this.createBaggage = utils_1.createBaggage;
|
|
18904
|
+
this.getBaggage = context_helpers_1.getBaggage;
|
|
18905
|
+
this.getActiveBaggage = context_helpers_1.getActiveBaggage;
|
|
18906
|
+
this.setBaggage = context_helpers_1.setBaggage;
|
|
18907
|
+
this.deleteBaggage = context_helpers_1.deleteBaggage;
|
|
18908
|
+
}
|
|
18909
|
+
static getInstance() {
|
|
18910
|
+
if (!this._instance) {
|
|
18911
|
+
this._instance = new PropagationAPI;
|
|
18912
|
+
}
|
|
18913
|
+
return this._instance;
|
|
18914
|
+
}
|
|
18915
|
+
setGlobalPropagator(propagator) {
|
|
18916
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
|
|
18917
|
+
}
|
|
18918
|
+
inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
|
|
18919
|
+
return this._getGlobalPropagator().inject(context, carrier, setter);
|
|
18920
|
+
}
|
|
18921
|
+
extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
|
|
18922
|
+
return this._getGlobalPropagator().extract(context, carrier, getter);
|
|
18923
|
+
}
|
|
18924
|
+
fields() {
|
|
18925
|
+
return this._getGlobalPropagator().fields();
|
|
18926
|
+
}
|
|
18927
|
+
disable() {
|
|
18928
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18929
|
+
}
|
|
18930
|
+
_getGlobalPropagator() {
|
|
18931
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
|
|
18932
|
+
}
|
|
18933
|
+
}
|
|
18934
|
+
exports.PropagationAPI = PropagationAPI;
|
|
18935
|
+
});
|
|
18936
|
+
|
|
18937
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
|
|
18938
|
+
var require_propagation_api = __commonJS((exports) => {
|
|
18939
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18940
|
+
exports.propagation = undefined;
|
|
18941
|
+
var propagation_1 = require_propagation();
|
|
18942
|
+
exports.propagation = propagation_1.PropagationAPI.getInstance();
|
|
18943
|
+
});
|
|
18944
|
+
|
|
18945
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/trace.js
|
|
18946
|
+
var require_trace = __commonJS((exports) => {
|
|
18947
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18948
|
+
exports.TraceAPI = undefined;
|
|
18949
|
+
var global_utils_1 = require_global_utils();
|
|
18950
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18951
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18952
|
+
var context_utils_1 = require_context_utils();
|
|
18953
|
+
var diag_1 = require_diag();
|
|
18954
|
+
var API_NAME = "trace";
|
|
18955
|
+
|
|
18956
|
+
class TraceAPI {
|
|
18957
|
+
constructor() {
|
|
18958
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18959
|
+
this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
|
|
18960
|
+
this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
|
|
18961
|
+
this.deleteSpan = context_utils_1.deleteSpan;
|
|
18962
|
+
this.getSpan = context_utils_1.getSpan;
|
|
18963
|
+
this.getActiveSpan = context_utils_1.getActiveSpan;
|
|
18964
|
+
this.getSpanContext = context_utils_1.getSpanContext;
|
|
18965
|
+
this.setSpan = context_utils_1.setSpan;
|
|
18966
|
+
this.setSpanContext = context_utils_1.setSpanContext;
|
|
18967
|
+
}
|
|
18968
|
+
static getInstance() {
|
|
18969
|
+
if (!this._instance) {
|
|
18970
|
+
this._instance = new TraceAPI;
|
|
18971
|
+
}
|
|
18972
|
+
return this._instance;
|
|
18973
|
+
}
|
|
18974
|
+
setGlobalTracerProvider(provider) {
|
|
18975
|
+
const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
|
|
18976
|
+
if (success3) {
|
|
18977
|
+
this._proxyTracerProvider.setDelegate(provider);
|
|
18978
|
+
}
|
|
18979
|
+
return success3;
|
|
18980
|
+
}
|
|
18981
|
+
getTracerProvider() {
|
|
18982
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
|
|
18983
|
+
}
|
|
18984
|
+
getTracer(name, version2) {
|
|
18985
|
+
return this.getTracerProvider().getTracer(name, version2);
|
|
18986
|
+
}
|
|
18987
|
+
disable() {
|
|
18988
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18989
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18990
|
+
}
|
|
18991
|
+
}
|
|
18992
|
+
exports.TraceAPI = TraceAPI;
|
|
18993
|
+
});
|
|
18994
|
+
|
|
18995
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace-api.js
|
|
18996
|
+
var require_trace_api = __commonJS((exports) => {
|
|
18997
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18998
|
+
exports.trace = undefined;
|
|
18999
|
+
var trace_1 = require_trace();
|
|
19000
|
+
exports.trace = trace_1.TraceAPI.getInstance();
|
|
19001
|
+
});
|
|
19002
|
+
|
|
19003
|
+
// ../../node_modules/@opentelemetry/api/build/src/index.js
|
|
19004
|
+
var require_src = __commonJS((exports) => {
|
|
19005
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19006
|
+
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;
|
|
19007
|
+
var utils_1 = require_utils();
|
|
19008
|
+
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
|
|
19009
|
+
return utils_1.baggageEntryMetadataFromString;
|
|
19010
|
+
} });
|
|
19011
|
+
var context_1 = require_context();
|
|
19012
|
+
Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
|
|
19013
|
+
return context_1.createContextKey;
|
|
19014
|
+
} });
|
|
19015
|
+
Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
|
|
19016
|
+
return context_1.ROOT_CONTEXT;
|
|
19017
|
+
} });
|
|
19018
|
+
var consoleLogger_1 = require_consoleLogger();
|
|
19019
|
+
Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
|
|
19020
|
+
return consoleLogger_1.DiagConsoleLogger;
|
|
19021
|
+
} });
|
|
19022
|
+
var types_1 = require_types();
|
|
19023
|
+
Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
|
|
19024
|
+
return types_1.DiagLogLevel;
|
|
19025
|
+
} });
|
|
19026
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
19027
|
+
Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
|
|
19028
|
+
return NoopMeter_1.createNoopMeter;
|
|
19029
|
+
} });
|
|
19030
|
+
var Metric_1 = require_Metric();
|
|
19031
|
+
Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
|
|
19032
|
+
return Metric_1.ValueType;
|
|
19033
|
+
} });
|
|
19034
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
19035
|
+
Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
|
|
19036
|
+
return TextMapPropagator_1.defaultTextMapGetter;
|
|
19037
|
+
} });
|
|
19038
|
+
Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
|
|
19039
|
+
return TextMapPropagator_1.defaultTextMapSetter;
|
|
19040
|
+
} });
|
|
19041
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
19042
|
+
Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
|
|
19043
|
+
return ProxyTracer_1.ProxyTracer;
|
|
19044
|
+
} });
|
|
19045
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
19046
|
+
Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
|
|
19047
|
+
return ProxyTracerProvider_1.ProxyTracerProvider;
|
|
19048
|
+
} });
|
|
19049
|
+
var SamplingResult_1 = require_SamplingResult();
|
|
19050
|
+
Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
|
|
19051
|
+
return SamplingResult_1.SamplingDecision;
|
|
19052
|
+
} });
|
|
19053
|
+
var span_kind_1 = require_span_kind();
|
|
19054
|
+
Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
|
|
19055
|
+
return span_kind_1.SpanKind;
|
|
19056
|
+
} });
|
|
19057
|
+
var status_1 = require_status();
|
|
19058
|
+
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
|
|
19059
|
+
return status_1.SpanStatusCode;
|
|
19060
|
+
} });
|
|
19061
|
+
var trace_flags_1 = require_trace_flags();
|
|
19062
|
+
Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
|
|
19063
|
+
return trace_flags_1.TraceFlags;
|
|
19064
|
+
} });
|
|
19065
|
+
var utils_2 = require_utils2();
|
|
19066
|
+
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
|
|
19067
|
+
return utils_2.createTraceState;
|
|
19068
|
+
} });
|
|
19069
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
19070
|
+
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
|
|
19071
|
+
return spancontext_utils_1.isSpanContextValid;
|
|
19072
|
+
} });
|
|
19073
|
+
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
|
|
19074
|
+
return spancontext_utils_1.isValidTraceId;
|
|
19075
|
+
} });
|
|
19076
|
+
Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
|
|
19077
|
+
return spancontext_utils_1.isValidSpanId;
|
|
19078
|
+
} });
|
|
19079
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
19080
|
+
Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
|
|
19081
|
+
return invalid_span_constants_1.INVALID_SPANID;
|
|
19082
|
+
} });
|
|
19083
|
+
Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
|
|
19084
|
+
return invalid_span_constants_1.INVALID_TRACEID;
|
|
19085
|
+
} });
|
|
19086
|
+
Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
|
|
19087
|
+
return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
|
|
19088
|
+
} });
|
|
19089
|
+
var context_api_1 = require_context_api();
|
|
19090
|
+
Object.defineProperty(exports, "context", { enumerable: true, get: function() {
|
|
19091
|
+
return context_api_1.context;
|
|
19092
|
+
} });
|
|
19093
|
+
var diag_api_1 = require_diag_api();
|
|
19094
|
+
Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
|
|
19095
|
+
return diag_api_1.diag;
|
|
19096
|
+
} });
|
|
19097
|
+
var metrics_api_1 = require_metrics_api();
|
|
19098
|
+
Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
|
|
19099
|
+
return metrics_api_1.metrics;
|
|
19100
|
+
} });
|
|
19101
|
+
var propagation_api_1 = require_propagation_api();
|
|
19102
|
+
Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
|
|
19103
|
+
return propagation_api_1.propagation;
|
|
19104
|
+
} });
|
|
19105
|
+
var trace_api_1 = require_trace_api();
|
|
19106
|
+
Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
|
|
19107
|
+
return trace_api_1.trace;
|
|
19108
|
+
} });
|
|
19109
|
+
exports.default = {
|
|
19110
|
+
context: context_api_1.context,
|
|
19111
|
+
diag: diag_api_1.diag,
|
|
19112
|
+
metrics: metrics_api_1.metrics,
|
|
19113
|
+
propagation: propagation_api_1.propagation,
|
|
19114
|
+
trace: trace_api_1.trace
|
|
19115
|
+
};
|
|
19116
|
+
});
|
|
19117
|
+
|
|
19118
|
+
// ../types/src/processor/processor.ts
|
|
19119
|
+
var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
|
|
19120
|
+
var init_processor = __esm(() => {
|
|
19121
|
+
init_zod();
|
|
19122
|
+
init_common();
|
|
19123
|
+
import_api = __toESM(require_src(), 1);
|
|
19124
|
+
noopTracingContext = {
|
|
19125
|
+
traceId: "",
|
|
19126
|
+
getActiveSpan() {
|
|
19127
|
+
return;
|
|
19128
|
+
},
|
|
19129
|
+
async withSpan(_name, _options, fn) {
|
|
19130
|
+
const noopSpan = {
|
|
19131
|
+
spanContext: () => ({
|
|
19132
|
+
traceId: "",
|
|
19133
|
+
spanId: "",
|
|
19134
|
+
traceFlags: 0
|
|
19135
|
+
}),
|
|
19136
|
+
setAttribute: () => noopSpan,
|
|
19137
|
+
setAttributes: () => noopSpan,
|
|
19138
|
+
addEvent: () => noopSpan,
|
|
19139
|
+
addLink: () => noopSpan,
|
|
19140
|
+
addLinks: () => noopSpan,
|
|
19141
|
+
setStatus: () => noopSpan,
|
|
19142
|
+
updateName: () => noopSpan,
|
|
19143
|
+
end: () => {},
|
|
19144
|
+
isRecording: () => false,
|
|
19145
|
+
recordException: () => {}
|
|
19146
|
+
};
|
|
19147
|
+
return fn(noopSpan);
|
|
19148
|
+
}
|
|
19149
|
+
};
|
|
19150
|
+
ProcessorPortSchema = exports_external.object({
|
|
19151
|
+
name: exports_external.string(),
|
|
19152
|
+
schema: JsonSchemaSchema,
|
|
19153
|
+
required: exports_external.boolean().default(true)
|
|
19154
|
+
});
|
|
19155
|
+
ProcessorDefinitionSchema = exports_external.object({
|
|
19156
|
+
id: exports_external.string(),
|
|
19157
|
+
name: exports_external.string(),
|
|
19158
|
+
description: exports_external.string().optional(),
|
|
19159
|
+
inputSchema: JsonSchemaSchema,
|
|
19160
|
+
outputSchema: JsonSchemaSchema,
|
|
19161
|
+
configSchema: JsonSchemaSchema.optional(),
|
|
19162
|
+
inputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
19163
|
+
outputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
19164
|
+
isBuiltin: exports_external.boolean().default(true),
|
|
19165
|
+
pluginName: exports_external.string().optional()
|
|
19166
|
+
});
|
|
19167
|
+
ProcessorExecutionContextSchema = exports_external.object({
|
|
19168
|
+
jobId: exports_external.string(),
|
|
19169
|
+
stepId: exports_external.string(),
|
|
19170
|
+
tenantId: exports_external.string(),
|
|
19171
|
+
automationId: exports_external.string().optional(),
|
|
19172
|
+
workflowId: exports_external.string(),
|
|
19173
|
+
workerId: exports_external.string().optional()
|
|
19174
|
+
});
|
|
19175
|
+
((TraceStatus2) => {
|
|
19176
|
+
TraceStatus2["PENDING"] = "pending";
|
|
19177
|
+
TraceStatus2["RUNNING"] = "running";
|
|
19178
|
+
TraceStatus2["COMPLETED"] = "completed";
|
|
19179
|
+
TraceStatus2["FAILED"] = "failed";
|
|
19180
|
+
})(TraceStatus ||= {});
|
|
19181
|
+
});
|
|
19182
|
+
|
|
19183
|
+
// ../types/src/processor/normalize-extract-input.ts
|
|
19184
|
+
function normalizeExtractInputToText(input) {
|
|
19185
|
+
if (typeof input === "string") {
|
|
19186
|
+
return input;
|
|
19187
|
+
}
|
|
19188
|
+
if (input && typeof input === "object") {
|
|
19189
|
+
const obj = input;
|
|
19190
|
+
if (typeof obj.content === "string") {
|
|
19191
|
+
return obj.content;
|
|
19192
|
+
}
|
|
19193
|
+
if (typeof obj.text === "string") {
|
|
19194
|
+
return obj.text;
|
|
19195
|
+
}
|
|
19196
|
+
return JSON.stringify(input, null, 2);
|
|
19197
|
+
}
|
|
19198
|
+
return String(input ?? "");
|
|
19199
|
+
}
|
|
19200
|
+
function extractSourceTextFromResolvedConfig(config2) {
|
|
19201
|
+
if (!config2 || typeof config2 !== "object")
|
|
19202
|
+
return null;
|
|
19203
|
+
if (typeof config2.content === "string") {
|
|
19204
|
+
return normalizeExtractInputToText({ content: config2.content });
|
|
19205
|
+
}
|
|
19206
|
+
if (typeof config2.text === "string") {
|
|
19207
|
+
return normalizeExtractInputToText({ text: config2.text });
|
|
19208
|
+
}
|
|
19209
|
+
if (typeof config2.input === "string") {
|
|
19210
|
+
return normalizeExtractInputToText({ content: config2.input });
|
|
19211
|
+
}
|
|
19212
|
+
if (config2.input !== null && config2.input !== undefined) {
|
|
19213
|
+
return normalizeExtractInputToText(config2.input);
|
|
19214
|
+
}
|
|
19215
|
+
return null;
|
|
19216
|
+
}
|
|
19217
|
+
|
|
19218
|
+
// ../types/src/processor/grounding.ts
|
|
19219
|
+
function stripGroundingMetadata(value) {
|
|
19220
|
+
if (Array.isArray(value))
|
|
19221
|
+
return value.map(stripGroundingMetadata);
|
|
19222
|
+
if (value && typeof value === "object") {
|
|
19223
|
+
const out = {};
|
|
19224
|
+
for (const [k, v] of Object.entries(value)) {
|
|
19225
|
+
if (k === "_grounding")
|
|
19226
|
+
continue;
|
|
19227
|
+
out[k] = stripGroundingMetadata(v);
|
|
19228
|
+
}
|
|
19229
|
+
return out;
|
|
19230
|
+
}
|
|
19231
|
+
return value;
|
|
19232
|
+
}
|
|
19233
|
+
|
|
19234
|
+
// ../types/src/processor/execution.ts
|
|
19235
|
+
function asTuple(values) {
|
|
19236
|
+
return values;
|
|
19237
|
+
}
|
|
19238
|
+
var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
|
|
19239
|
+
var init_execution = __esm(() => {
|
|
19240
|
+
init_zod();
|
|
19241
|
+
WorkflowExecutionStatusValue = {
|
|
19242
|
+
CREATED: "created",
|
|
19243
|
+
PENDING: "pending",
|
|
19244
|
+
RUNNING: "running",
|
|
19245
|
+
WAITING: "waiting",
|
|
19246
|
+
COMPLETED: "completed",
|
|
19247
|
+
FAILED: "failed",
|
|
19248
|
+
CANCELLED: "cancelled"
|
|
19249
|
+
};
|
|
19250
|
+
WorkflowExecutionStatusSchema = exports_external.enum([
|
|
19251
|
+
WorkflowExecutionStatusValue.CREATED,
|
|
19252
|
+
WorkflowExecutionStatusValue.PENDING,
|
|
19253
|
+
WorkflowExecutionStatusValue.RUNNING,
|
|
19254
|
+
WorkflowExecutionStatusValue.WAITING,
|
|
19255
|
+
WorkflowExecutionStatusValue.COMPLETED,
|
|
19256
|
+
WorkflowExecutionStatusValue.FAILED,
|
|
19257
|
+
WorkflowExecutionStatusValue.CANCELLED
|
|
19258
|
+
]);
|
|
19259
|
+
StepExecutionStatusValue = {
|
|
19260
|
+
PENDING: "pending",
|
|
19261
|
+
RUNNING: "running",
|
|
19262
|
+
SUCCESS: "success",
|
|
19263
|
+
FAILURE: "failure",
|
|
19264
|
+
WAITING: "waiting",
|
|
19265
|
+
SKIPPED: "skipped"
|
|
19266
|
+
};
|
|
19267
|
+
StepExecutionStatusSchema = exports_external.enum([
|
|
19268
|
+
StepExecutionStatusValue.PENDING,
|
|
19269
|
+
StepExecutionStatusValue.RUNNING,
|
|
19270
|
+
StepExecutionStatusValue.SUCCESS,
|
|
19271
|
+
StepExecutionStatusValue.FAILURE,
|
|
19272
|
+
StepExecutionStatusValue.WAITING,
|
|
19273
|
+
StepExecutionStatusValue.SKIPPED
|
|
19274
|
+
]);
|
|
19275
|
+
TriggerTypeValue = {
|
|
19276
|
+
MANUAL: "manual",
|
|
19277
|
+
API: "api",
|
|
19278
|
+
WEBHOOK: "webhook",
|
|
19279
|
+
SCHEDULE: "schedule",
|
|
19280
|
+
EMAIL: "email",
|
|
19281
|
+
EVAL: "eval",
|
|
19282
|
+
CLI: "cli"
|
|
19283
|
+
};
|
|
19284
|
+
TriggerTypeSchema = exports_external.enum([
|
|
19285
|
+
TriggerTypeValue.MANUAL,
|
|
19286
|
+
TriggerTypeValue.API,
|
|
19287
|
+
TriggerTypeValue.WEBHOOK,
|
|
19288
|
+
TriggerTypeValue.SCHEDULE,
|
|
19289
|
+
TriggerTypeValue.EMAIL,
|
|
19290
|
+
TriggerTypeValue.EVAL,
|
|
19291
|
+
TriggerTypeValue.CLI
|
|
19292
|
+
]);
|
|
19293
|
+
ExecutionTypeValue = {
|
|
19294
|
+
PROD: "prod",
|
|
19295
|
+
EVAL: "eval",
|
|
19296
|
+
PLAYGROUND: "playground"
|
|
19297
|
+
};
|
|
19298
|
+
ExecutionTypeSchema = exports_external.enum([
|
|
19299
|
+
ExecutionTypeValue.PROD,
|
|
19300
|
+
ExecutionTypeValue.EVAL,
|
|
19301
|
+
ExecutionTypeValue.PLAYGROUND
|
|
19302
|
+
]);
|
|
19303
|
+
WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
|
|
19304
|
+
STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
|
|
19305
|
+
TRIGGER_TYPES = TriggerTypeSchema.options;
|
|
19306
|
+
EXECUTION_TYPES = ExecutionTypeSchema.options;
|
|
19307
|
+
});
|
|
19308
|
+
|
|
19309
|
+
// ../types/src/processor/configs/classify.ts
|
|
19310
|
+
var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
|
|
19311
|
+
var init_classify = __esm(() => {
|
|
19312
|
+
init_zod();
|
|
19313
|
+
ClassifyInputSchema = exports_external.object({
|
|
19314
|
+
content: exports_external.string().optional().describe("Text content to classify"),
|
|
19315
|
+
text: exports_external.string().optional().describe("Text content (alternative to content)")
|
|
19316
|
+
}).refine((data) => !!(data.content || data.text), {
|
|
19317
|
+
message: "Either content or text must be provided"
|
|
19318
|
+
});
|
|
19319
|
+
ClassifyLabelSchema = exports_external.object({
|
|
19320
|
+
name: exports_external.string().min(1).describe("Label value returned in output.label"),
|
|
19321
|
+
description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
|
|
19322
|
+
});
|
|
19323
|
+
ClassifyConfigSchema = exports_external.object({
|
|
19324
|
+
labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
|
|
19325
|
+
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."),
|
|
19326
|
+
provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
|
|
19327
|
+
model: exports_external.string().optional().describe("Model override"),
|
|
19328
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
|
|
19329
|
+
});
|
|
19330
|
+
ClassifyOutputSchema = exports_external.object({
|
|
19331
|
+
label: exports_external.string().describe("The selected label name"),
|
|
19332
|
+
confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
|
|
19333
|
+
reason: exports_external.string().describe("Short justification for the chosen label")
|
|
19334
|
+
});
|
|
19335
|
+
});
|
|
19336
|
+
|
|
19337
|
+
// ../types/src/parser/parser.ts
|
|
19338
|
+
function resolveEffectiveMimeType(filename, declaredMimeType) {
|
|
19339
|
+
const ext = filename.split(".").pop()?.toLowerCase();
|
|
19340
|
+
if (!ext)
|
|
19341
|
+
return declaredMimeType;
|
|
19342
|
+
const extensionMime = EXTENSION_TO_MIME[ext];
|
|
19343
|
+
return extensionMime ?? declaredMimeType;
|
|
19344
|
+
}
|
|
19345
|
+
function mimeTypeForExtension(extension) {
|
|
19346
|
+
return EXTENSION_TO_MIME[extension.replace(/^\./, "").toLowerCase()];
|
|
19347
|
+
}
|
|
19348
|
+
function extensionForMimeType(mimeType) {
|
|
19349
|
+
const base = mimeType.split(";")[0]?.trim().toLowerCase();
|
|
19350
|
+
return base ? MIME_TO_EXTENSION[base] : undefined;
|
|
19351
|
+
}
|
|
19352
|
+
function getParserCategory(mimeType) {
|
|
19353
|
+
const normalized = mimeType.toLowerCase().trim();
|
|
19354
|
+
if (ParserCategory.PLAINTEXT.includes(normalized)) {
|
|
19355
|
+
return "plaintext";
|
|
19356
|
+
}
|
|
19357
|
+
if (ParserCategory.OFFICE.includes(normalized)) {
|
|
19358
|
+
return "office";
|
|
19359
|
+
}
|
|
19360
|
+
if (ParserCategory.DOCUMENT.includes(normalized)) {
|
|
19361
|
+
return "document";
|
|
19362
|
+
}
|
|
19363
|
+
return null;
|
|
19364
|
+
}
|
|
19365
|
+
function requiresSpecializedParser(mimeType) {
|
|
19366
|
+
return getParserCategory(mimeType) === "document";
|
|
19367
|
+
}
|
|
19368
|
+
function getAllSupportedMimeTypes() {
|
|
19369
|
+
return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
|
|
19370
|
+
}
|
|
19371
|
+
function getSupportedFormatsLabel() {
|
|
19372
|
+
const allMimes = getAllSupportedMimeTypes();
|
|
19373
|
+
const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
|
|
19374
|
+
return labels.join(", ");
|
|
19375
|
+
}
|
|
19376
|
+
var OFFICE_MIME_TYPES, ParserCategory, ParserTypeSchema, DocumentMetadataSchema, ParseUsageSchema, CoordinateUnitSchema, PointSchema, BoundingRegionSchema, PositionedTextSchema, TableCellSchema, ExtractedTableSchema, LayoutElementTypeSchema, LayoutElementSchema, PageResultSchema, ParseResultSchema, ParseOptionsSchema, ParserInputSchema, EXTENSION_TO_MIME, MIME_TO_EXTENSION, MIME_TO_LABEL;
|
|
19377
|
+
var init_parser = __esm(() => {
|
|
19378
|
+
init_zod();
|
|
19379
|
+
OFFICE_MIME_TYPES = [
|
|
19380
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19381
|
+
"application/msword",
|
|
19382
|
+
"application/vnd.oasis.opendocument.text",
|
|
19383
|
+
"application/rtf",
|
|
19384
|
+
"text/rtf",
|
|
19385
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19386
|
+
"application/vnd.ms-excel",
|
|
19387
|
+
"application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19388
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19389
|
+
"application/vnd.oasis.opendocument.spreadsheet",
|
|
19390
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19391
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19392
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19393
|
+
"application/vnd.ms-powerpoint",
|
|
19394
|
+
"application/vnd.oasis.opendocument.presentation",
|
|
19395
|
+
"message/rfc822",
|
|
19396
|
+
"application/vnd.ms-outlook",
|
|
19397
|
+
"application/epub+zip"
|
|
19398
|
+
];
|
|
19399
|
+
ParserCategory = {
|
|
19400
|
+
PLAINTEXT: [
|
|
19401
|
+
"text/plain",
|
|
19402
|
+
"text/markdown",
|
|
19403
|
+
"text/csv",
|
|
19404
|
+
"text/tab-separated-values",
|
|
19405
|
+
"text/html",
|
|
19406
|
+
"text/xml",
|
|
19407
|
+
"application/json",
|
|
19408
|
+
"application/x-yaml",
|
|
19409
|
+
"application/toml",
|
|
19410
|
+
"image/svg+xml",
|
|
19411
|
+
"text/x-rst",
|
|
19412
|
+
"text/x-org",
|
|
19413
|
+
"application/x-latex",
|
|
19414
|
+
"application/x-ipynb+json",
|
|
19415
|
+
"application/x-bibtex",
|
|
19416
|
+
"application/docbook+xml",
|
|
19417
|
+
"application/x-fictionbook+xml"
|
|
19418
|
+
],
|
|
19419
|
+
OFFICE: [...OFFICE_MIME_TYPES],
|
|
19420
|
+
DOCUMENT: [
|
|
19421
|
+
"application/pdf",
|
|
19422
|
+
"image/png",
|
|
19423
|
+
"image/jpeg",
|
|
19424
|
+
"image/webp",
|
|
19425
|
+
"image/tiff",
|
|
19426
|
+
"image/gif",
|
|
19427
|
+
"image/bmp"
|
|
19428
|
+
]
|
|
19429
|
+
};
|
|
19430
|
+
ParserTypeSchema = exports_external.enum([
|
|
19431
|
+
"plaintext",
|
|
19432
|
+
"office",
|
|
19433
|
+
"llm-vision",
|
|
19434
|
+
"ocr"
|
|
19435
|
+
]);
|
|
19436
|
+
DocumentMetadataSchema = exports_external.object({
|
|
19437
|
+
filename: exports_external.string(),
|
|
19438
|
+
mimeType: exports_external.string(),
|
|
19439
|
+
size: exports_external.number().describe("File size in bytes"),
|
|
19440
|
+
storageRef: exports_external.string().optional().describe("Storage reference for the original file")
|
|
19441
|
+
});
|
|
19442
|
+
ParseUsageSchema = exports_external.object({
|
|
19443
|
+
pageCount: exports_external.number(),
|
|
19444
|
+
processingTimeMs: exports_external.number().optional()
|
|
19445
|
+
});
|
|
19446
|
+
CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
|
|
19447
|
+
PointSchema = exports_external.object({
|
|
19448
|
+
x: exports_external.number(),
|
|
19449
|
+
y: exports_external.number()
|
|
19450
|
+
});
|
|
19451
|
+
BoundingRegionSchema = exports_external.object({
|
|
19452
|
+
polygon: exports_external.array(PointSchema).min(3),
|
|
19453
|
+
unit: CoordinateUnitSchema,
|
|
19454
|
+
pageIndex: exports_external.number()
|
|
19455
|
+
});
|
|
19456
|
+
PositionedTextSchema = exports_external.object({
|
|
19457
|
+
text: exports_external.string(),
|
|
19458
|
+
confidence: exports_external.number().min(0).max(1).optional(),
|
|
19459
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19460
|
+
});
|
|
19461
|
+
TableCellSchema = exports_external.object({
|
|
19462
|
+
content: exports_external.string(),
|
|
19463
|
+
rowIndex: exports_external.number(),
|
|
19464
|
+
columnIndex: exports_external.number(),
|
|
19465
|
+
rowSpan: exports_external.number().default(1),
|
|
19466
|
+
columnSpan: exports_external.number().default(1),
|
|
19467
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19468
|
+
});
|
|
19469
|
+
ExtractedTableSchema = exports_external.object({
|
|
19470
|
+
cells: exports_external.array(TableCellSchema),
|
|
19471
|
+
rowCount: exports_external.number(),
|
|
19472
|
+
columnCount: exports_external.number(),
|
|
19473
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19474
|
+
});
|
|
19475
|
+
LayoutElementTypeSchema = exports_external.enum([
|
|
19476
|
+
"paragraph",
|
|
19477
|
+
"title",
|
|
19478
|
+
"sectionHeading",
|
|
19479
|
+
"pageHeader",
|
|
19480
|
+
"pageFooter",
|
|
19481
|
+
"pageNumber",
|
|
19482
|
+
"footnote",
|
|
19483
|
+
"table",
|
|
19484
|
+
"figure",
|
|
19485
|
+
"formulaBlock"
|
|
19486
|
+
]);
|
|
19487
|
+
LayoutElementSchema = exports_external.object({
|
|
19488
|
+
type: LayoutElementTypeSchema,
|
|
19489
|
+
content: exports_external.string(),
|
|
19490
|
+
table: ExtractedTableSchema.optional(),
|
|
19491
|
+
caption: exports_external.string().optional(),
|
|
19492
|
+
figureId: exports_external.string().optional(),
|
|
19493
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19494
|
+
});
|
|
19495
|
+
PageResultSchema = exports_external.object({
|
|
19496
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19497
|
+
text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
|
|
19498
|
+
pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
|
|
19499
|
+
layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
|
|
19500
|
+
words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
|
|
19501
|
+
lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
|
|
19502
|
+
tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
|
|
19503
|
+
width: exports_external.number().optional().describe("Page width"),
|
|
19504
|
+
height: exports_external.number().optional().describe("Page height"),
|
|
19505
|
+
unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
|
|
19506
|
+
confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
|
|
19507
|
+
});
|
|
19508
|
+
ParseResultSchema = exports_external.object({
|
|
19509
|
+
document: DocumentMetadataSchema,
|
|
19510
|
+
usage: ParseUsageSchema,
|
|
19511
|
+
pages: exports_external.array(PageResultSchema),
|
|
19512
|
+
text: exports_external.string().describe("Combined text from all pages"),
|
|
19513
|
+
parserType: ParserTypeSchema,
|
|
19514
|
+
parserVersion: exports_external.string().optional(),
|
|
19515
|
+
model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
|
|
19516
|
+
rawResponse: exports_external.unknown().optional()
|
|
19517
|
+
});
|
|
19518
|
+
ParseOptionsSchema = exports_external.object({
|
|
19519
|
+
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
|
|
19520
|
+
ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
|
|
19521
|
+
includeWordPositions: exports_external.boolean().default(false),
|
|
19522
|
+
includeLinePositions: exports_external.boolean().default(false),
|
|
19523
|
+
extractTables: exports_external.boolean().default(true),
|
|
19524
|
+
provider: exports_external.string().optional().describe("LLM provider ID to use"),
|
|
19525
|
+
model: exports_external.string().optional(),
|
|
19526
|
+
maxConcurrency: exports_external.number().min(1).max(30).default(3),
|
|
19527
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5),
|
|
19528
|
+
pdfRenderScale: exports_external.number().min(1).max(4).default(1).describe("Scale factor used when rendering PDF pages for VLM parsing"),
|
|
19529
|
+
imageQuality: exports_external.number().int().min(1).max(100).default(85).describe("JPEG quality used for PDF page images sent to VLM parsing"),
|
|
19530
|
+
prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
|
|
19531
|
+
languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
|
|
19532
|
+
tenantId: exports_external.string().optional()
|
|
19533
|
+
});
|
|
19534
|
+
ParserInputSchema = exports_external.object({
|
|
19535
|
+
data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
|
|
19536
|
+
filename: exports_external.string(),
|
|
19537
|
+
mimeType: exports_external.string(),
|
|
19538
|
+
options: ParseOptionsSchema.optional()
|
|
19539
|
+
});
|
|
19540
|
+
EXTENSION_TO_MIME = {
|
|
19541
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19542
|
+
doc: "application/msword",
|
|
19543
|
+
odt: "application/vnd.oasis.opendocument.text",
|
|
19544
|
+
rtf: "application/rtf",
|
|
19545
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19546
|
+
xls: "application/vnd.ms-excel",
|
|
19547
|
+
xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19548
|
+
xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19549
|
+
ods: "application/vnd.oasis.opendocument.spreadsheet",
|
|
19550
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19551
|
+
ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19552
|
+
pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19553
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
19554
|
+
odp: "application/vnd.oasis.opendocument.presentation",
|
|
19555
|
+
eml: "message/rfc822",
|
|
19556
|
+
msg: "application/vnd.ms-outlook",
|
|
19557
|
+
epub: "application/epub+zip",
|
|
19558
|
+
pdf: "application/pdf",
|
|
19559
|
+
png: "image/png",
|
|
19560
|
+
jpg: "image/jpeg",
|
|
19561
|
+
jpeg: "image/jpeg",
|
|
19562
|
+
webp: "image/webp",
|
|
19563
|
+
tiff: "image/tiff",
|
|
19564
|
+
tif: "image/tiff",
|
|
19565
|
+
gif: "image/gif",
|
|
19566
|
+
bmp: "image/bmp",
|
|
19567
|
+
svg: "image/svg+xml",
|
|
19568
|
+
txt: "text/plain",
|
|
19569
|
+
md: "text/markdown",
|
|
19570
|
+
markdown: "text/markdown",
|
|
19571
|
+
csv: "text/csv",
|
|
19572
|
+
tsv: "text/tab-separated-values",
|
|
19573
|
+
html: "text/html",
|
|
19574
|
+
htm: "text/html",
|
|
19575
|
+
xml: "text/xml",
|
|
19576
|
+
json: "application/json",
|
|
19577
|
+
yaml: "application/x-yaml",
|
|
19578
|
+
yml: "application/x-yaml",
|
|
19579
|
+
toml: "application/toml",
|
|
19580
|
+
rst: "text/x-rst",
|
|
19581
|
+
org: "text/x-org",
|
|
19582
|
+
tex: "application/x-latex",
|
|
19583
|
+
latex: "application/x-latex",
|
|
19584
|
+
ipynb: "application/x-ipynb+json",
|
|
19585
|
+
bib: "application/x-bibtex",
|
|
19586
|
+
dbk: "application/docbook+xml",
|
|
19587
|
+
docbook: "application/docbook+xml",
|
|
19588
|
+
fb2: "application/x-fictionbook+xml"
|
|
19589
|
+
};
|
|
19590
|
+
MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
|
|
19591
|
+
if (!(mime in acc))
|
|
19592
|
+
acc[mime] = ext;
|
|
19593
|
+
return acc;
|
|
19594
|
+
}, {});
|
|
19595
|
+
MIME_TO_LABEL = {
|
|
19596
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
|
|
19597
|
+
"application/msword": "DOC",
|
|
19598
|
+
"application/vnd.oasis.opendocument.text": "ODT",
|
|
19599
|
+
"application/rtf": "RTF",
|
|
19600
|
+
"text/rtf": "RTF",
|
|
19601
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
|
|
19602
|
+
"application/vnd.ms-excel": "XLS",
|
|
19603
|
+
"application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
|
|
19604
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
|
|
19605
|
+
"application/vnd.oasis.opendocument.spreadsheet": "ODS",
|
|
19606
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
|
|
19607
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
|
|
19608
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
|
|
19609
|
+
"application/vnd.ms-powerpoint": "PPT",
|
|
19610
|
+
"application/vnd.oasis.opendocument.presentation": "ODP",
|
|
19611
|
+
"message/rfc822": "EML",
|
|
19612
|
+
"application/vnd.ms-outlook": "MSG",
|
|
19613
|
+
"application/epub+zip": "EPUB",
|
|
19614
|
+
"application/pdf": "PDF",
|
|
19615
|
+
"image/png": "PNG",
|
|
19616
|
+
"image/jpeg": "JPEG",
|
|
19617
|
+
"image/webp": "WebP",
|
|
19618
|
+
"image/tiff": "TIFF",
|
|
19619
|
+
"image/gif": "GIF",
|
|
19620
|
+
"image/bmp": "BMP",
|
|
19621
|
+
"image/svg+xml": "SVG",
|
|
19622
|
+
"text/plain": "TXT",
|
|
19623
|
+
"text/markdown": "Markdown",
|
|
19624
|
+
"text/csv": "CSV",
|
|
19625
|
+
"text/tab-separated-values": "TSV",
|
|
19626
|
+
"text/html": "HTML",
|
|
19627
|
+
"text/xml": "XML",
|
|
19628
|
+
"application/json": "JSON",
|
|
19629
|
+
"application/x-yaml": "YAML",
|
|
19630
|
+
"application/toml": "TOML",
|
|
19631
|
+
"text/x-rst": "RST",
|
|
19632
|
+
"text/x-org": "Org",
|
|
19633
|
+
"application/x-latex": "LaTeX",
|
|
19634
|
+
"application/x-ipynb+json": "Jupyter",
|
|
19635
|
+
"application/x-bibtex": "BibTeX",
|
|
19636
|
+
"application/docbook+xml": "DocBook",
|
|
19637
|
+
"application/x-fictionbook+xml": "FB2"
|
|
19638
|
+
};
|
|
19639
|
+
});
|
|
19640
|
+
|
|
19641
|
+
// ../types/src/processor/configs/document-parser.ts
|
|
19642
|
+
var DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
|
|
19643
|
+
var init_document_parser = __esm(() => {
|
|
19644
|
+
init_zod();
|
|
19645
|
+
init_runtime_file_ref();
|
|
19646
|
+
init_parser();
|
|
19647
|
+
DocumentParserInputSchema = ResolvedProcessorFileSchema;
|
|
19648
|
+
DocumentParserOutputSchema = ParseResultSchema;
|
|
19649
|
+
DocumentParserConfigSchema = exports_external.object({
|
|
19650
|
+
ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
|
|
19651
|
+
llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
|
|
19652
|
+
maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
|
|
19653
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
|
|
19654
|
+
pdfRenderScale: exports_external.number().min(1).max(4).default(1).optional().describe("Scale factor used when rendering PDF pages for VLM parsing"),
|
|
19655
|
+
imageQuality: exports_external.number().int().min(1).max(100).default(85).optional().describe("JPEG quality used for PDF page images sent to VLM parsing"),
|
|
19656
|
+
prompt: exports_external.string().optional().describe("Custom extraction prompt"),
|
|
19657
|
+
nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
|
|
19658
|
+
describeFigures: exports_external.boolean().optional().describe("Opt-in (default off). After text extraction, detect figure pages with a layout model and caption them with a vision model, appending `<figure>description</figure>` to their text. Skipped for plaintext. The caption vision calls are billed."),
|
|
19659
|
+
figureInstructions: exports_external.string().optional().describe("Custom instruction for the figure-description pass."),
|
|
19660
|
+
languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
|
|
19661
|
+
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.")
|
|
19662
|
+
}).prefault({});
|
|
19663
|
+
});
|
|
19664
|
+
|
|
19665
|
+
// ../types/src/processor/configs/extract.ts
|
|
19666
|
+
var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
|
|
19667
|
+
var init_extract = __esm(() => {
|
|
19668
|
+
init_zod();
|
|
19669
|
+
ExtractInputSchema = exports_external.object({
|
|
19670
|
+
content: exports_external.string().optional().describe("Text content to extract from"),
|
|
19671
|
+
text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
|
|
19672
|
+
contentType: exports_external.enum(["text", "image"]).default("text"),
|
|
19673
|
+
imageData: exports_external.string().optional(),
|
|
19674
|
+
imageMimeType: exports_external.string().optional()
|
|
19675
|
+
}).refine((data) => data.content || data.text, {
|
|
19676
|
+
message: "Either content or text must be provided"
|
|
19677
|
+
});
|
|
19678
|
+
ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema. Unless grounding is disabled (grounded: false), the output also carries a reserved `_grounding` map keyed by field name: `_grounding.<field> = { confidence: high|medium|low, needsReview, reason?, source_span: { start, end, text, alignment } | null }`, plus reserved `_degraded: true` / `_reason` markers when the grounding LLM pass could not run.");
|
|
19679
|
+
ExtractConfigSchema = exports_external.object({
|
|
19680
|
+
schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
|
|
19681
|
+
prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
|
|
19682
|
+
provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
|
|
19683
|
+
model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
|
|
19684
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit."),
|
|
19685
|
+
grounded: exports_external.boolean().optional().describe("Grounding is ON by default: a grounding pass runs over the schema fields and attaches per-field source spans + confidence under a reserved `_grounding` output key, flagging fields whose value cannot be located in the source for human review. The pass runs through the workspace LLM (any provider) and chunks long documents automatically. Tri-state: unset (default) = on, degrading gracefully to deterministic text alignment (`_grounding._degraded: true`) if no grounding model is available; `true` = strict, the step fails when the grounding model cannot be resolved; `false` = off, no `_grounding` key at all."),
|
|
19686
|
+
groundingModel: exports_external.string().optional().describe("Provider/model for the grounding pass. Defaults to the workspace default LLM. Any configured provider works; the pass only fails the step when `grounded: true` is set explicitly and no model resolves."),
|
|
19687
|
+
groundingExamples: exports_external.array(exports_external.object({
|
|
19688
|
+
text: exports_external.string(),
|
|
19689
|
+
extractions: exports_external.array(exports_external.object({ field: exports_external.string(), text: exports_external.string() }))
|
|
19690
|
+
})).optional().describe("Few-shot examples for grounding (verbatim source text per field). Optional."),
|
|
19691
|
+
reviewOn: exports_external.enum(["medium_or_low", "low_only"]).optional().describe("Which grounding confidences set needsReview on a field. Default: low_only (only fields whose value could not be located in the source). Use medium_or_low to also flag approximate and derived matches.")
|
|
19692
|
+
});
|
|
19693
|
+
});
|
|
19694
|
+
|
|
19695
|
+
// ../types/src/processor/configs/merge.ts
|
|
19696
|
+
var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
|
|
19697
|
+
var init_merge = __esm(() => {
|
|
19698
|
+
init_zod();
|
|
19699
|
+
MergeConfigSchema = exports_external.object({
|
|
19700
|
+
preservePortNames: exports_external.boolean().default(true),
|
|
19701
|
+
outputKey: exports_external.string().optional()
|
|
19702
|
+
});
|
|
19703
|
+
MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
19704
|
+
MergeOutputSchema = exports_external.object({
|
|
19705
|
+
items: exports_external.array(exports_external.unknown()),
|
|
19706
|
+
count: exports_external.number(),
|
|
19707
|
+
merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
19708
|
+
});
|
|
19709
|
+
});
|
|
19710
|
+
|
|
19711
|
+
// ../types/src/processor/configs/pdf-embedder.ts
|
|
19712
|
+
var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
|
|
19713
|
+
var init_pdf_embedder = __esm(() => {
|
|
19714
|
+
init_zod();
|
|
19715
|
+
init_runtime_file_ref();
|
|
19716
|
+
init_parser();
|
|
19717
|
+
PdfEmbedderInputSchema = exports_external.object({
|
|
19718
|
+
file: ResolvedProcessorFileSchema.describe("Resolved source file handle"),
|
|
19719
|
+
parseResult: exports_external.object({
|
|
19720
|
+
pages: exports_external.array(PageResultSchema),
|
|
19721
|
+
text: exports_external.string().optional()
|
|
19722
|
+
}).describe("Parse result from ai.parse step (must include word positions)")
|
|
19723
|
+
});
|
|
19724
|
+
PdfEmbedderOutputSchema = exports_external.object({
|
|
19725
|
+
fileId: exports_external.string().describe("File ID from files table"),
|
|
19726
|
+
pageCount: exports_external.number().describe("Number of pages in the output PDF"),
|
|
19727
|
+
wordCount: exports_external.number().describe("Number of words embedded"),
|
|
19728
|
+
text: exports_external.string().describe("Extracted text (from parse step)")
|
|
19729
|
+
});
|
|
19730
|
+
PdfEmbedderConfigSchema = exports_external.object({
|
|
19731
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
|
|
19732
|
+
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")
|
|
19733
|
+
}).prefault({});
|
|
19734
|
+
});
|
|
19735
|
+
|
|
19736
|
+
// ../types/src/processor/configs/segment.ts
|
|
19737
|
+
var SegmentInputSchema, SEGMENT_UNKNOWN_TYPE = "unknown", SegmentConfigSchema, ConfidenceLevelSchema, SegmentSummarySchema, SegmentOutputSchema;
|
|
19738
|
+
var init_segment = __esm(() => {
|
|
19739
|
+
init_zod();
|
|
19740
|
+
SegmentInputSchema = exports_external.object({
|
|
19741
|
+
pages: exports_external.array(exports_external.object({
|
|
19742
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19743
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19744
|
+
pageName: exports_external.string().optional()
|
|
19745
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19746
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19747
|
+
SegmentConfigSchema = exports_external.object({
|
|
19748
|
+
documentTypes: exports_external.array(exports_external.object({
|
|
19749
|
+
name: exports_external.string().min(1).describe('Type label returned in documents[].type (e.g. "timesheet", "deal-memo").'),
|
|
19750
|
+
description: exports_external.string().optional().describe("What this document type looks like — headings, layout, vocabulary, and the visual cues that mark its FIRST page. Fed to the LLM as guidance for both boundary detection and typing.")
|
|
19751
|
+
})).min(1).describe('The document-type taxonomy. The LLM tags each detected document with one of these names, or the reserved "unknown" type when none fit.'),
|
|
19752
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19753
|
+
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.'),
|
|
19754
|
+
windowTokenBudget: exports_external.number().int().positive().optional().describe("Per-window token ceiling. Defaults to env SPLIT_WINDOW_TOKEN_BUDGET or 20000. Smaller windows give sharper boundaries on dense batches; larger windows when documents routinely exceed the per-window page count.")
|
|
19755
|
+
});
|
|
19756
|
+
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.");
|
|
19757
|
+
SegmentSummarySchema = exports_external.object({
|
|
19758
|
+
total: exports_external.number().int().describe("Total documents discovered in the batch."),
|
|
19759
|
+
labelled: exports_external.number().int().describe('Documents assigned a known taxonomy type (type !== "unknown").'),
|
|
19760
|
+
unlabelled: exports_external.number().int().describe('Documents the segmenter could not label (type === "unknown") — escalate to a human.'),
|
|
19761
|
+
lowConfidence: exports_external.number().int().describe('Documents whose boundary/type confidence is "low" — also worth human review.'),
|
|
19762
|
+
byType: exports_external.record(exports_external.string(), exports_external.number().int()).describe('Per-type document counts, keyed by type name (includes "unknown").'),
|
|
19763
|
+
needsReview: exports_external.array(exports_external.object({
|
|
19764
|
+
index: exports_external.number().int(),
|
|
19765
|
+
type: exports_external.string(),
|
|
19766
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19767
|
+
reason: exports_external.enum(["unlabelled", "low_confidence"]).describe("Why this document should be escalated to a human operator."),
|
|
19768
|
+
notes: exports_external.string()
|
|
19769
|
+
})).describe("The exact documents to escalate to a human operator, with the reason for each.")
|
|
19770
|
+
});
|
|
19771
|
+
SegmentOutputSchema = exports_external.object({
|
|
19772
|
+
summary: SegmentSummarySchema.describe("Batch-level escalation summary: labelled vs unlabelled counts and the documents needing human review."),
|
|
19773
|
+
documents: exports_external.array(exports_external.object({
|
|
19774
|
+
index: exports_external.number().int().describe("0-based position of this document in the batch, in page order."),
|
|
19775
|
+
type: exports_external.string().describe('Chosen type name from the taxonomy, or "unknown" when none fit.'),
|
|
19776
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]).describe("Inclusive [startPage, endPage], 0-based, matching input pageIndex."),
|
|
19777
|
+
confidence: ConfidenceLevelSchema.describe("LLM confidence at the document boundary + type: low | medium | high."),
|
|
19778
|
+
notes: exports_external.string().describe("Short prose citing what marked this page as a new document."),
|
|
19779
|
+
evidence: exports_external.object({
|
|
19780
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading/title text the LLM cited as the document start"),
|
|
19781
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where the start appears")
|
|
19782
|
+
}).optional().describe("Structured start evidence — for downstream parsing without regex over `notes`."),
|
|
19783
|
+
text: exports_external.string().describe("Joined per-page text for this document, ready for ai.extract"),
|
|
19784
|
+
pages: exports_external.array(exports_external.object({
|
|
19785
|
+
pageIndex: exports_external.number().int(),
|
|
19786
|
+
text: exports_external.string(),
|
|
19787
|
+
pageName: exports_external.string().optional(),
|
|
19788
|
+
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM boundary (direct evidence) or filled in by continuity")
|
|
19789
|
+
})).describe("Raw per-page records covered by this document, in page order."),
|
|
19790
|
+
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19791
|
+
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19792
|
+
}))
|
|
19793
|
+
});
|
|
19794
|
+
});
|
|
19795
|
+
|
|
19796
|
+
// ../types/src/processor/configs/split.ts
|
|
19797
|
+
var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema2, SplitSectionSchema, SplitOutputSchema;
|
|
19798
|
+
var init_split = __esm(() => {
|
|
19799
|
+
init_zod();
|
|
19800
|
+
SplitInputSchema = exports_external.object({
|
|
19801
|
+
pages: exports_external.array(exports_external.object({
|
|
19802
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19803
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19804
|
+
pageName: exports_external.string().optional()
|
|
19805
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19806
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19807
|
+
SplitConfigSchema = exports_external.object({
|
|
19808
|
+
sections: exports_external.array(exports_external.object({
|
|
19809
|
+
name: exports_external.string().min(1).describe("Stable id for the section"),
|
|
19810
|
+
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."),
|
|
19811
|
+
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").'),
|
|
19812
|
+
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.')
|
|
19813
|
+
})).min(1),
|
|
19814
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19815
|
+
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.'),
|
|
19816
|
+
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.")
|
|
19817
|
+
});
|
|
19818
|
+
ConfidenceLevelSchema2 = exports_external.enum(["low", "medium", "high"]).describe("LLM confidence as a coarse enum. Numeric (0..1) confidences cluster at 0.85–0.95 and gradations are noise; low/medium/high is reliable.");
|
|
19819
|
+
SplitSectionSchema = exports_external.object({
|
|
19820
|
+
name: exports_external.string(),
|
|
19821
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19822
|
+
confidence: ConfidenceLevelSchema2.describe("LLM confidence at the start anchor: low | medium | high."),
|
|
19823
|
+
notes: exports_external.string(),
|
|
19824
|
+
evidence: exports_external.object({
|
|
19825
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
|
|
19826
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
|
|
19827
|
+
}).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
|
|
19828
|
+
end_evidence: exports_external.object({
|
|
19829
|
+
end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
|
|
19830
|
+
confidence: ConfidenceLevelSchema2,
|
|
19831
|
+
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.")
|
|
19832
|
+
}).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)."),
|
|
19833
|
+
text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
|
|
19834
|
+
pages: exports_external.array(exports_external.object({
|
|
19835
|
+
pageIndex: exports_external.number().int(),
|
|
19836
|
+
text: exports_external.string(),
|
|
19837
|
+
pageName: exports_external.string().optional(),
|
|
19838
|
+
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
|
|
19839
|
+
})).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."),
|
|
19840
|
+
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19841
|
+
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19842
|
+
});
|
|
19843
|
+
SplitOutputSchema = exports_external.object({
|
|
19844
|
+
splits: exports_external.array(SplitSectionSchema),
|
|
19845
|
+
sections: exports_external.record(exports_external.string(), SplitSectionSchema).describe("The same sections keyed by their config name, for direct reference: `steps.<split>.output.sections.<name>.page_range`. On the rare duplicate name, the last section wins; use `splits` for the full ordered list.")
|
|
19846
|
+
});
|
|
19847
|
+
});
|
|
19848
|
+
|
|
19849
|
+
// ../types/src/processor/configs/template.ts
|
|
19850
|
+
var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
|
|
19851
|
+
var init_template = __esm(() => {
|
|
19852
|
+
init_zod();
|
|
19853
|
+
TemplateInputSchema = exports_external.object({
|
|
19854
|
+
data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
|
|
19855
|
+
});
|
|
19856
|
+
TemplateOutputSchema = exports_external.object({
|
|
19857
|
+
fileId: exports_external.string().describe("File ID from files table")
|
|
19858
|
+
});
|
|
19859
|
+
TemplateConfigSchema = exports_external.object({
|
|
19860
|
+
templateId: exports_external.string().describe("ID of the template from templates table"),
|
|
19861
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
|
|
19862
|
+
highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
|
|
19863
|
+
notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
|
|
19864
|
+
});
|
|
19865
|
+
});
|
|
19866
|
+
|
|
19867
|
+
// ../types/src/processor/configs/xlsx-to-json.ts
|
|
19868
|
+
var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
|
|
19869
|
+
var init_xlsx_to_json = __esm(() => {
|
|
19870
|
+
init_zod();
|
|
19871
|
+
init_runtime_file_ref();
|
|
19872
|
+
XlsxToJsonInputSchema = ResolvedProcessorFileSchema;
|
|
19873
|
+
XlsxToJsonOutputSchema = exports_external.object({
|
|
19874
|
+
rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
|
|
19875
|
+
fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
|
|
19876
|
+
});
|
|
19877
|
+
XlsxToJsonConfigSchema = exports_external.object({
|
|
19878
|
+
sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
|
|
19879
|
+
outputCsv: exports_external.boolean().default(false).optional(),
|
|
19880
|
+
outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
|
|
19881
|
+
});
|
|
19882
|
+
});
|
|
19883
|
+
|
|
19884
|
+
// ../types/src/processor/configs/react-hook-form.ts
|
|
19885
|
+
function extractFieldMetadata(schema) {
|
|
19886
|
+
const fields = [];
|
|
19887
|
+
let inner = schema;
|
|
19888
|
+
while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
|
|
19889
|
+
inner = inner.unwrap();
|
|
19890
|
+
}
|
|
19891
|
+
if (inner instanceof exports_external.ZodObject) {
|
|
19892
|
+
for (const [name, fieldSchema] of Object.entries(inner.shape)) {
|
|
19893
|
+
fields.push(extractSingleFieldMetadata(name, fieldSchema));
|
|
19894
|
+
}
|
|
19895
|
+
}
|
|
19896
|
+
return fields;
|
|
19897
|
+
}
|
|
19898
|
+
function extractSingleFieldMetadata(name, schema) {
|
|
19899
|
+
let current = schema;
|
|
19900
|
+
let required2 = true;
|
|
19901
|
+
let defaultValue = undefined;
|
|
19902
|
+
let description = current.description;
|
|
19903
|
+
while (true) {
|
|
19904
|
+
if (current instanceof exports_external.ZodOptional) {
|
|
19905
|
+
required2 = false;
|
|
19906
|
+
current = current.unwrap();
|
|
19907
|
+
} else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
|
|
19908
|
+
defaultValue = current._def.defaultValue;
|
|
19909
|
+
current = current.unwrap();
|
|
19910
|
+
} else {
|
|
19911
|
+
break;
|
|
19912
|
+
}
|
|
19913
|
+
description ??= current.description;
|
|
19914
|
+
}
|
|
19915
|
+
const base = { name, type: "unknown", required: required2, description, defaultValue };
|
|
19916
|
+
if (current instanceof exports_external.ZodString)
|
|
19917
|
+
return { ...base, type: "string" };
|
|
19918
|
+
if (current instanceof exports_external.ZodNumber) {
|
|
19919
|
+
let min;
|
|
19920
|
+
let max;
|
|
19921
|
+
for (const c of current._def.checks ?? []) {
|
|
19922
|
+
const def = c._zod.def;
|
|
19923
|
+
if (def.check === "greater_than")
|
|
19924
|
+
min = def.value;
|
|
19925
|
+
if (def.check === "less_than")
|
|
19926
|
+
max = def.value;
|
|
19927
|
+
}
|
|
19928
|
+
return { ...base, type: "number", min, max };
|
|
19929
|
+
}
|
|
19930
|
+
if (current instanceof exports_external.ZodBoolean)
|
|
19931
|
+
return { ...base, type: "boolean" };
|
|
19932
|
+
if (current instanceof exports_external.ZodEnum) {
|
|
19933
|
+
return { ...base, type: "enum", enumValues: current.options };
|
|
19934
|
+
}
|
|
19935
|
+
if (current instanceof exports_external.ZodArray)
|
|
19936
|
+
return { ...base, type: "array" };
|
|
19937
|
+
if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
|
|
19938
|
+
return { ...base, type: "object" };
|
|
19939
|
+
}
|
|
19940
|
+
return base;
|
|
19941
|
+
}
|
|
19942
|
+
function getConfigFieldMetadata(processorId) {
|
|
19943
|
+
const schema = getConfigSchema(processorId);
|
|
19944
|
+
if (!schema)
|
|
19945
|
+
return;
|
|
19946
|
+
return extractFieldMetadata(schema);
|
|
19947
|
+
}
|
|
19948
|
+
function getConfigDefaults(processorId) {
|
|
19949
|
+
const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19950
|
+
if (!schema)
|
|
19951
|
+
return {};
|
|
19952
|
+
try {
|
|
19953
|
+
const result = schema.safeParse({});
|
|
19954
|
+
if (result.success) {
|
|
19955
|
+
return result.data;
|
|
19956
|
+
}
|
|
19957
|
+
} catch {}
|
|
19958
|
+
const fields = extractFieldMetadata(schema);
|
|
19959
|
+
const defaults = {};
|
|
19960
|
+
for (const field of fields) {
|
|
19961
|
+
if (field.defaultValue !== undefined) {
|
|
19962
|
+
defaults[field.name] = field.defaultValue;
|
|
19963
|
+
}
|
|
19964
|
+
}
|
|
19965
|
+
return defaults;
|
|
19966
|
+
}
|
|
19967
|
+
function validateConfig(processorId, config2) {
|
|
19968
|
+
const schema = getConfigSchema(processorId);
|
|
19969
|
+
if (!schema) {
|
|
19970
|
+
return { valid: true, errors: {} };
|
|
19971
|
+
}
|
|
19972
|
+
const result = schema.safeParse(config2);
|
|
19973
|
+
if (result.success) {
|
|
19974
|
+
return { valid: true, errors: {} };
|
|
19975
|
+
}
|
|
19976
|
+
const errors3 = {};
|
|
19977
|
+
for (const issue2 of result.error.issues) {
|
|
19978
|
+
const path = issue2.path.join(".");
|
|
19979
|
+
errors3[path] = issue2.message;
|
|
19980
|
+
}
|
|
19981
|
+
return { valid: false, errors: errors3 };
|
|
19982
|
+
}
|
|
19983
|
+
var init_react_hook_form = __esm(() => {
|
|
19984
|
+
init_zod();
|
|
19985
|
+
init_configs();
|
|
19986
|
+
});
|
|
19987
|
+
|
|
19988
|
+
// ../types/src/processor/configs/index.ts
|
|
19989
|
+
function getProcessorSchemas(processorId) {
|
|
19990
|
+
return PROCESSOR_SCHEMAS[processorId];
|
|
19991
|
+
}
|
|
19992
|
+
function getConfigSchema(processorId) {
|
|
19993
|
+
return PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19994
|
+
}
|
|
19995
|
+
function getAllProcessorJsonSchemas() {
|
|
19996
|
+
return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
|
|
19997
|
+
id: p.id,
|
|
19998
|
+
inputSchema: toJsonSchema(p.inputSchema),
|
|
19999
|
+
outputSchema: toJsonSchema(p.outputSchema),
|
|
20000
|
+
configSchema: toJsonSchema(p.configSchema)
|
|
20001
|
+
}));
|
|
20002
|
+
}
|
|
20003
|
+
function listProcessorIds() {
|
|
20004
|
+
return Object.keys(PROCESSOR_SCHEMAS);
|
|
20005
|
+
}
|
|
20006
|
+
var PROCESSOR_SCHEMAS;
|
|
20007
|
+
var init_configs = __esm(() => {
|
|
20008
|
+
init_common();
|
|
20009
|
+
init_ids();
|
|
20010
|
+
init_classify();
|
|
20011
|
+
init_document_parser();
|
|
20012
|
+
init_extract();
|
|
20013
|
+
init_merge();
|
|
20014
|
+
init_pdf_embedder();
|
|
20015
|
+
init_segment();
|
|
20016
|
+
init_split();
|
|
20017
|
+
init_template();
|
|
20018
|
+
init_xlsx_to_json();
|
|
20019
|
+
init_react_hook_form();
|
|
20020
|
+
init_classify();
|
|
20021
|
+
init_document_parser();
|
|
20022
|
+
init_extract();
|
|
20023
|
+
init_merge();
|
|
20024
|
+
init_pdf_embedder();
|
|
20025
|
+
init_segment();
|
|
20026
|
+
init_split();
|
|
20027
|
+
init_template();
|
|
20028
|
+
init_xlsx_to_json();
|
|
20029
|
+
PROCESSOR_SCHEMAS = {
|
|
20030
|
+
[PROCESSOR_IDS.EXTRACT]: {
|
|
20031
|
+
id: PROCESSOR_IDS.EXTRACT,
|
|
20032
|
+
inputSchema: ExtractInputSchema,
|
|
20033
|
+
outputSchema: ExtractOutputSchema,
|
|
20034
|
+
configSchema: ExtractConfigSchema
|
|
20035
|
+
},
|
|
20036
|
+
[PROCESSOR_IDS.DOCUMENT_PARSER]: {
|
|
20037
|
+
id: PROCESSOR_IDS.DOCUMENT_PARSER,
|
|
20038
|
+
inputSchema: DocumentParserInputSchema,
|
|
20039
|
+
outputSchema: DocumentParserOutputSchema,
|
|
20040
|
+
configSchema: DocumentParserConfigSchema
|
|
20041
|
+
},
|
|
20042
|
+
[PROCESSOR_IDS.MERGE]: {
|
|
20043
|
+
id: PROCESSOR_IDS.MERGE,
|
|
20044
|
+
inputSchema: MergeInputSchema,
|
|
20045
|
+
outputSchema: MergeOutputSchema,
|
|
20046
|
+
configSchema: MergeConfigSchema
|
|
20047
|
+
},
|
|
20048
|
+
[PROCESSOR_IDS.TEMPLATE]: {
|
|
20049
|
+
id: PROCESSOR_IDS.TEMPLATE,
|
|
20050
|
+
inputSchema: TemplateInputSchema,
|
|
20051
|
+
outputSchema: TemplateOutputSchema,
|
|
20052
|
+
configSchema: TemplateConfigSchema
|
|
20053
|
+
},
|
|
20054
|
+
[PROCESSOR_IDS.PDF_EMBEDDER]: {
|
|
20055
|
+
id: PROCESSOR_IDS.PDF_EMBEDDER,
|
|
20056
|
+
inputSchema: PdfEmbedderInputSchema,
|
|
20057
|
+
outputSchema: PdfEmbedderOutputSchema,
|
|
20058
|
+
configSchema: PdfEmbedderConfigSchema
|
|
20059
|
+
},
|
|
20060
|
+
[PROCESSOR_IDS.SPLIT]: {
|
|
20061
|
+
id: PROCESSOR_IDS.SPLIT,
|
|
20062
|
+
inputSchema: SplitInputSchema,
|
|
20063
|
+
outputSchema: SplitOutputSchema,
|
|
20064
|
+
configSchema: SplitConfigSchema
|
|
20065
|
+
},
|
|
20066
|
+
[PROCESSOR_IDS.SEGMENT]: {
|
|
20067
|
+
id: PROCESSOR_IDS.SEGMENT,
|
|
20068
|
+
inputSchema: SegmentInputSchema,
|
|
20069
|
+
outputSchema: SegmentOutputSchema,
|
|
20070
|
+
configSchema: SegmentConfigSchema
|
|
20071
|
+
},
|
|
20072
|
+
[PROCESSOR_IDS.CLASSIFY]: {
|
|
20073
|
+
id: PROCESSOR_IDS.CLASSIFY,
|
|
20074
|
+
inputSchema: ClassifyInputSchema,
|
|
20075
|
+
outputSchema: ClassifyOutputSchema,
|
|
20076
|
+
configSchema: ClassifyConfigSchema
|
|
20077
|
+
},
|
|
20078
|
+
[PROCESSOR_IDS.XLSX_TO_JSON]: {
|
|
20079
|
+
id: PROCESSOR_IDS.XLSX_TO_JSON,
|
|
20080
|
+
inputSchema: XlsxToJsonInputSchema,
|
|
20081
|
+
outputSchema: XlsxToJsonOutputSchema,
|
|
20082
|
+
configSchema: XlsxToJsonConfigSchema
|
|
20083
|
+
}
|
|
20084
|
+
};
|
|
20085
|
+
});
|
|
20086
|
+
|
|
17496
20087
|
// ../types/src/processor/index.ts
|
|
17497
|
-
var
|
|
20088
|
+
var init_processor2 = __esm(() => {
|
|
20089
|
+
init_processor();
|
|
20090
|
+
init_execution();
|
|
20091
|
+
init_configs();
|
|
20092
|
+
});
|
|
17498
20093
|
|
|
17499
20094
|
// ../types/src/parser/index.ts
|
|
17500
|
-
var
|
|
20095
|
+
var init_parser2 = __esm(() => {
|
|
20096
|
+
init_parser();
|
|
20097
|
+
});
|
|
17501
20098
|
|
|
17502
20099
|
// ../types/src/otel/semantic-conventions.ts
|
|
17503
20100
|
function mapLLMAttributes(attrs) {
|
|
@@ -20535,9 +23132,9 @@ var require_validate = __commonJS((exports) => {
|
|
|
20535
23132
|
}
|
|
20536
23133
|
let expr = data;
|
|
20537
23134
|
const segments = jsonPointer.split("/");
|
|
20538
|
-
for (const
|
|
20539
|
-
if (
|
|
20540
|
-
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(
|
|
23135
|
+
for (const segment2 of segments) {
|
|
23136
|
+
if (segment2) {
|
|
23137
|
+
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment2))}`;
|
|
20541
23138
|
expr = (0, codegen_1._)`${expr} && ${data}`;
|
|
20542
23139
|
}
|
|
20543
23140
|
}
|
|
@@ -20817,7 +23414,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
20817
23414
|
});
|
|
20818
23415
|
|
|
20819
23416
|
// ../../node_modules/fast-uri/lib/utils.js
|
|
20820
|
-
var
|
|
23417
|
+
var require_utils3 = __commonJS((exports, module) => {
|
|
20821
23418
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
20822
23419
|
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);
|
|
20823
23420
|
function stringArrayToHexStripped(input) {
|
|
@@ -21073,7 +23670,7 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
21073
23670
|
|
|
21074
23671
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
21075
23672
|
var require_schemes = __commonJS((exports, module) => {
|
|
21076
|
-
var { isUUID } =
|
|
23673
|
+
var { isUUID } = require_utils3();
|
|
21077
23674
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
21078
23675
|
var supportedSchemeNames = [
|
|
21079
23676
|
"http",
|
|
@@ -21247,7 +23844,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
21247
23844
|
|
|
21248
23845
|
// ../../node_modules/fast-uri/index.js
|
|
21249
23846
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
21250
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } =
|
|
23847
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils3();
|
|
21251
23848
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
21252
23849
|
function normalize(uri, options) {
|
|
21253
23850
|
if (typeof uri === "string") {
|
|
@@ -23657,7 +26254,7 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
23657
26254
|
});
|
|
23658
26255
|
|
|
23659
26256
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
23660
|
-
var
|
|
26257
|
+
var require_types2 = __commonJS((exports) => {
|
|
23661
26258
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23662
26259
|
exports.DiscrError = undefined;
|
|
23663
26260
|
var DiscrError;
|
|
@@ -23671,7 +26268,7 @@ var require_types = __commonJS((exports) => {
|
|
|
23671
26268
|
var require_discriminator = __commonJS((exports) => {
|
|
23672
26269
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23673
26270
|
var codegen_1 = require_codegen();
|
|
23674
|
-
var types_1 =
|
|
26271
|
+
var types_1 = require_types2();
|
|
23675
26272
|
var compile_1 = require_compile();
|
|
23676
26273
|
var ref_error_1 = require_ref_error();
|
|
23677
26274
|
var util_1 = require_util();
|
|
@@ -24599,24 +27196,6 @@ var init_validation = __esm(() => {
|
|
|
24599
27196
|
init_workspace_schema();
|
|
24600
27197
|
});
|
|
24601
27198
|
|
|
24602
|
-
// ../types/src/core/common.ts
|
|
24603
|
-
function toJsonSchema2(schema) {
|
|
24604
|
-
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
24605
|
-
}
|
|
24606
|
-
var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
|
|
24607
|
-
var init_common = __esm(() => {
|
|
24608
|
-
init_zod();
|
|
24609
|
-
TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
24610
|
-
return typeof val === "string" ? new Date(val) : val;
|
|
24611
|
-
});
|
|
24612
|
-
JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
24613
|
-
BaseEntitySchema2 = exports_external.object({
|
|
24614
|
-
id: exports_external.string(),
|
|
24615
|
-
createdAt: TimestampSchema2.optional(),
|
|
24616
|
-
updatedAt: TimestampSchema2.optional()
|
|
24617
|
-
});
|
|
24618
|
-
});
|
|
24619
|
-
|
|
24620
27199
|
// ../../node_modules/@babel/parser/lib/index.js
|
|
24621
27200
|
var require_lib = __commonJS((exports) => {
|
|
24622
27201
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -25030,12 +27609,12 @@ var require_lib = __commonJS((exports) => {
|
|
|
25030
27609
|
}
|
|
25031
27610
|
const ParseErrorConstructors = {};
|
|
25032
27611
|
for (const reasonCode of Object.keys(argument)) {
|
|
25033
|
-
const
|
|
25034
|
-
const _ref = typeof
|
|
25035
|
-
message: () =>
|
|
25036
|
-
} : typeof
|
|
25037
|
-
message:
|
|
25038
|
-
} :
|
|
27612
|
+
const template2 = argument[reasonCode];
|
|
27613
|
+
const _ref = typeof template2 === "string" ? {
|
|
27614
|
+
message: () => template2
|
|
27615
|
+
} : typeof template2 === "function" ? {
|
|
27616
|
+
message: template2
|
|
27617
|
+
} : template2, {
|
|
25039
27618
|
message
|
|
25040
27619
|
} = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
25041
27620
|
const toMessage = typeof message === "string" ? () => message : message;
|
|
@@ -39508,7 +42087,7 @@ var require_keywords = __commonJS((exports) => {
|
|
|
39508
42087
|
});
|
|
39509
42088
|
|
|
39510
42089
|
// ../../node_modules/sucrase/dist/parser/tokenizer/types.js
|
|
39511
|
-
var
|
|
42090
|
+
var require_types3 = __commonJS((exports) => {
|
|
39512
42091
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39513
42092
|
var TokenType;
|
|
39514
42093
|
(function(TokenType2) {
|
|
@@ -39572,8 +42151,8 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39572
42151
|
TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
|
|
39573
42152
|
const arrow = 22528;
|
|
39574
42153
|
TokenType2[TokenType2["arrow"] = arrow] = "arrow";
|
|
39575
|
-
const
|
|
39576
|
-
TokenType2[TokenType2["template"] =
|
|
42154
|
+
const template2 = 23552;
|
|
42155
|
+
TokenType2[TokenType2["template"] = template2] = "template";
|
|
39577
42156
|
const ellipsis = 24576;
|
|
39578
42157
|
TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
|
|
39579
42158
|
const backQuote = 25600;
|
|
@@ -39992,7 +42571,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39992
42571
|
var require_state = __commonJS((exports) => {
|
|
39993
42572
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39994
42573
|
var _keywords = require_keywords();
|
|
39995
|
-
var _types =
|
|
42574
|
+
var _types = require_types3();
|
|
39996
42575
|
|
|
39997
42576
|
class Scope {
|
|
39998
42577
|
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
|
|
@@ -40378,7 +42957,7 @@ var require_base = __commonJS((exports) => {
|
|
|
40378
42957
|
var require_util2 = __commonJS((exports) => {
|
|
40379
42958
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40380
42959
|
var _index = require_tokenizer();
|
|
40381
|
-
var _types =
|
|
42960
|
+
var _types = require_types3();
|
|
40382
42961
|
var _charcodes = require_charcodes();
|
|
40383
42962
|
var _base = require_base();
|
|
40384
42963
|
function isContextual(contextualKeyword) {
|
|
@@ -40540,7 +43119,7 @@ var require_identifier = __commonJS((exports) => {
|
|
|
40540
43119
|
var require_readWordTree = __commonJS((exports) => {
|
|
40541
43120
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40542
43121
|
var _keywords = require_keywords();
|
|
40543
|
-
var _types =
|
|
43122
|
+
var _types = require_types3();
|
|
40544
43123
|
var READ_WORD_TREE = new Int32Array([
|
|
40545
43124
|
-1,
|
|
40546
43125
|
27,
|
|
@@ -49518,7 +52097,7 @@ var require_readWord = __commonJS((exports) => {
|
|
|
49518
52097
|
var _identifier = require_identifier();
|
|
49519
52098
|
var _index = require_tokenizer();
|
|
49520
52099
|
var _readWordTree = require_readWordTree();
|
|
49521
|
-
var _types =
|
|
52100
|
+
var _types = require_types3();
|
|
49522
52101
|
function readWord() {
|
|
49523
52102
|
let treePos = 0;
|
|
49524
52103
|
let code = 0;
|
|
@@ -49584,7 +52163,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
49584
52163
|
var _keywords = require_keywords();
|
|
49585
52164
|
var _readWord = require_readWord();
|
|
49586
52165
|
var _readWord2 = _interopRequireDefault(_readWord);
|
|
49587
|
-
var _types =
|
|
52166
|
+
var _types = require_types3();
|
|
49588
52167
|
var IdentifierRole;
|
|
49589
52168
|
(function(IdentifierRole2) {
|
|
49590
52169
|
const Access = 0;
|
|
@@ -50301,7 +52880,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
50301
52880
|
// ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
|
|
50302
52881
|
var require_getImportExportSpecifierInfo = __commonJS((exports) => {
|
|
50303
52882
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50304
|
-
var _types =
|
|
52883
|
+
var _types = require_types3();
|
|
50305
52884
|
function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
|
|
50306
52885
|
let endIndex = index + 1;
|
|
50307
52886
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
@@ -50654,7 +53233,7 @@ var require_JSXTransformer = __commonJS((exports) => {
|
|
|
50654
53233
|
var _xhtml = require_xhtml();
|
|
50655
53234
|
var _xhtml2 = _interopRequireDefault(_xhtml);
|
|
50656
53235
|
var _tokenizer = require_tokenizer();
|
|
50657
|
-
var _types =
|
|
53236
|
+
var _types = require_types3();
|
|
50658
53237
|
var _charcodes = require_charcodes();
|
|
50659
53238
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
50660
53239
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -51158,7 +53737,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
|
|
|
51158
53737
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
51159
53738
|
}
|
|
51160
53739
|
var _tokenizer = require_tokenizer();
|
|
51161
|
-
var _types =
|
|
53740
|
+
var _types = require_types3();
|
|
51162
53741
|
var _JSXTransformer = require_JSXTransformer();
|
|
51163
53742
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
51164
53743
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -51197,7 +53776,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
|
|
|
51197
53776
|
}
|
|
51198
53777
|
var _tokenizer = require_tokenizer();
|
|
51199
53778
|
var _keywords = require_keywords();
|
|
51200
|
-
var _types =
|
|
53779
|
+
var _types = require_types3();
|
|
51201
53780
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
51202
53781
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
51203
53782
|
var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
|
|
@@ -51968,18 +54547,18 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
|
|
|
51968
54547
|
continue;
|
|
51969
54548
|
let genColumn = 0;
|
|
51970
54549
|
for (let j = 0;j < line.length; j++) {
|
|
51971
|
-
const
|
|
54550
|
+
const segment2 = line[j];
|
|
51972
54551
|
if (j > 0)
|
|
51973
54552
|
writer.write(comma);
|
|
51974
|
-
genColumn = encodeInteger(writer,
|
|
51975
|
-
if (
|
|
54553
|
+
genColumn = encodeInteger(writer, segment2[0], genColumn);
|
|
54554
|
+
if (segment2.length === 1)
|
|
51976
54555
|
continue;
|
|
51977
|
-
sourcesIndex = encodeInteger(writer,
|
|
51978
|
-
sourceLine = encodeInteger(writer,
|
|
51979
|
-
sourceColumn = encodeInteger(writer,
|
|
51980
|
-
if (
|
|
54556
|
+
sourcesIndex = encodeInteger(writer, segment2[1], sourcesIndex);
|
|
54557
|
+
sourceLine = encodeInteger(writer, segment2[2], sourceLine);
|
|
54558
|
+
sourceColumn = encodeInteger(writer, segment2[3], sourceColumn);
|
|
54559
|
+
if (segment2.length === 4)
|
|
51981
54560
|
continue;
|
|
51982
|
-
namesIndex = encodeInteger(writer,
|
|
54561
|
+
namesIndex = encodeInteger(writer, segment2[4], namesIndex);
|
|
51983
54562
|
}
|
|
51984
54563
|
}
|
|
51985
54564
|
return writer.flush();
|
|
@@ -52534,11 +55113,11 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52534
55113
|
const index = traceSegmentInternal(segments, cast(map2)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
|
|
52535
55114
|
if (index === -1)
|
|
52536
55115
|
return OMapping(null, null, null, null);
|
|
52537
|
-
const
|
|
52538
|
-
if (
|
|
55116
|
+
const segment2 = segments[index];
|
|
55117
|
+
if (segment2.length === 1)
|
|
52539
55118
|
return OMapping(null, null, null, null);
|
|
52540
55119
|
const { names, resolvedSources } = map2;
|
|
52541
|
-
return OMapping(resolvedSources[
|
|
55120
|
+
return OMapping(resolvedSources[segment2[SOURCES_INDEX]], segment2[SOURCE_LINE] + 1, segment2[SOURCE_COLUMN], segment2.length === 5 ? names[segment2[NAMES_INDEX]] : null);
|
|
52542
55121
|
}
|
|
52543
55122
|
function generatedPositionFor(map2, needle) {
|
|
52544
55123
|
const { source, line, column, bias } = needle;
|
|
@@ -52651,8 +55230,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52651
55230
|
const max = upperBound(segments, matchedColumn, min);
|
|
52652
55231
|
const result = [];
|
|
52653
55232
|
for (;min <= max; min++) {
|
|
52654
|
-
const
|
|
52655
|
-
result.push(GMapping(
|
|
55233
|
+
const segment2 = segments[min];
|
|
55234
|
+
result.push(GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]));
|
|
52656
55235
|
}
|
|
52657
55236
|
return result;
|
|
52658
55237
|
}
|
|
@@ -52680,8 +55259,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52680
55259
|
const index = traceSegmentInternal(segments, memo, line, column, bias);
|
|
52681
55260
|
if (index === -1)
|
|
52682
55261
|
return GMapping(null, null);
|
|
52683
|
-
const
|
|
52684
|
-
return GMapping(
|
|
55262
|
+
const segment2 = segments[index];
|
|
55263
|
+
return GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]);
|
|
52685
55264
|
}
|
|
52686
55265
|
});
|
|
52687
55266
|
});
|
|
@@ -53232,7 +55811,7 @@ var require_HelperManager = __commonJS((exports) => {
|
|
|
53232
55811
|
var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
53233
55812
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53234
55813
|
var _tokenizer = require_tokenizer();
|
|
53235
|
-
var _types =
|
|
55814
|
+
var _types = require_types3();
|
|
53236
55815
|
function identifyShadowedGlobals(tokens, scopes, globalNames) {
|
|
53237
55816
|
if (!hasShadowedGlobals(tokens, globalNames)) {
|
|
53238
55817
|
return;
|
|
@@ -53297,7 +55876,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
|
53297
55876
|
// ../../node_modules/sucrase/dist/util/getIdentifierNames.js
|
|
53298
55877
|
var require_getIdentifierNames = __commonJS((exports) => {
|
|
53299
55878
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53300
|
-
var _types =
|
|
55879
|
+
var _types = require_types3();
|
|
53301
55880
|
function getIdentifierNames(code, tokens) {
|
|
53302
55881
|
const names = [];
|
|
53303
55882
|
for (const token of tokens) {
|
|
@@ -53473,7 +56052,7 @@ var require_util3 = __commonJS((exports) => {
|
|
|
53473
56052
|
});
|
|
53474
56053
|
|
|
53475
56054
|
// ../../node_modules/ts-interface-checker/dist/types.js
|
|
53476
|
-
var
|
|
56055
|
+
var require_types4 = __commonJS((exports) => {
|
|
53477
56056
|
var __extends = exports && exports.__extends || function() {
|
|
53478
56057
|
var extendStatics = function(d, b) {
|
|
53479
56058
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -54073,9 +56652,9 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
54073
56652
|
};
|
|
54074
56653
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54075
56654
|
exports.Checker = exports.createCheckers = undefined;
|
|
54076
|
-
var types_1 =
|
|
56655
|
+
var types_1 = require_types4();
|
|
54077
56656
|
var util_1 = require_util3();
|
|
54078
|
-
var types_2 =
|
|
56657
|
+
var types_2 = require_types4();
|
|
54079
56658
|
Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
|
|
54080
56659
|
return types_2.TArray;
|
|
54081
56660
|
} });
|
|
@@ -54357,7 +56936,7 @@ var require_lval = __commonJS((exports) => {
|
|
|
54357
56936
|
var _typescript = require_typescript();
|
|
54358
56937
|
var _index = require_tokenizer();
|
|
54359
56938
|
var _keywords = require_keywords();
|
|
54360
|
-
var _types =
|
|
56939
|
+
var _types = require_types3();
|
|
54361
56940
|
var _base = require_base();
|
|
54362
56941
|
var _expression = require_expression();
|
|
54363
56942
|
var _util = require_util2();
|
|
@@ -54489,7 +57068,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
54489
57068
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54490
57069
|
var _index = require_tokenizer();
|
|
54491
57070
|
var _keywords = require_keywords();
|
|
54492
|
-
var _types =
|
|
57071
|
+
var _types = require_types3();
|
|
54493
57072
|
var _base = require_base();
|
|
54494
57073
|
var _expression = require_expression();
|
|
54495
57074
|
var _lval = require_lval();
|
|
@@ -55751,7 +58330,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
55751
58330
|
var require_jsx = __commonJS((exports) => {
|
|
55752
58331
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55753
58332
|
var _index = require_tokenizer();
|
|
55754
|
-
var _types =
|
|
58333
|
+
var _types = require_types3();
|
|
55755
58334
|
var _base = require_base();
|
|
55756
58335
|
var _expression = require_expression();
|
|
55757
58336
|
var _util = require_util2();
|
|
@@ -56014,10 +58593,10 @@ var require_jsx = __commonJS((exports) => {
|
|
|
56014
58593
|
});
|
|
56015
58594
|
|
|
56016
58595
|
// ../../node_modules/sucrase/dist/parser/plugins/types.js
|
|
56017
|
-
var
|
|
58596
|
+
var require_types5 = __commonJS((exports) => {
|
|
56018
58597
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56019
58598
|
var _index = require_tokenizer();
|
|
56020
|
-
var _types =
|
|
58599
|
+
var _types = require_types3();
|
|
56021
58600
|
var _base = require_base();
|
|
56022
58601
|
var _expression = require_expression();
|
|
56023
58602
|
var _flow = require_flow();
|
|
@@ -56050,12 +58629,12 @@ var require_expression = __commonJS((exports) => {
|
|
|
56050
58629
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56051
58630
|
var _flow = require_flow();
|
|
56052
58631
|
var _index = require_jsx();
|
|
56053
|
-
var _types =
|
|
58632
|
+
var _types = require_types5();
|
|
56054
58633
|
var _typescript = require_typescript();
|
|
56055
58634
|
var _index3 = require_tokenizer();
|
|
56056
58635
|
var _keywords = require_keywords();
|
|
56057
58636
|
var _state = require_state();
|
|
56058
|
-
var _types3 =
|
|
58637
|
+
var _types3 = require_types3();
|
|
56059
58638
|
var _charcodes = require_charcodes();
|
|
56060
58639
|
var _identifier = require_identifier();
|
|
56061
58640
|
var _base = require_base();
|
|
@@ -56771,7 +59350,7 @@ var require_flow = __commonJS((exports) => {
|
|
|
56771
59350
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56772
59351
|
var _index = require_tokenizer();
|
|
56773
59352
|
var _keywords = require_keywords();
|
|
56774
|
-
var _types =
|
|
59353
|
+
var _types = require_types3();
|
|
56775
59354
|
var _base = require_base();
|
|
56776
59355
|
var _expression = require_expression();
|
|
56777
59356
|
var _statement = require_statement();
|
|
@@ -57646,7 +60225,7 @@ var require_statement = __commonJS((exports) => {
|
|
|
57646
60225
|
var _tokenizer = require_tokenizer();
|
|
57647
60226
|
var _keywords = require_keywords();
|
|
57648
60227
|
var _state = require_state();
|
|
57649
|
-
var _types =
|
|
60228
|
+
var _types = require_types3();
|
|
57650
60229
|
var _charcodes = require_charcodes();
|
|
57651
60230
|
var _base = require_base();
|
|
57652
60231
|
var _expression = require_expression();
|
|
@@ -58681,7 +61260,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58681
61260
|
function _interopRequireDefault(obj) {
|
|
58682
61261
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
58683
61262
|
}
|
|
58684
|
-
var _types =
|
|
61263
|
+
var _types = require_types3();
|
|
58685
61264
|
var _isAsyncOperation = require_isAsyncOperation();
|
|
58686
61265
|
var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
|
|
58687
61266
|
|
|
@@ -58939,7 +61518,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58939
61518
|
var require_getClassInfo = __commonJS((exports) => {
|
|
58940
61519
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58941
61520
|
var _keywords = require_keywords();
|
|
58942
|
-
var _types =
|
|
61521
|
+
var _types = require_types3();
|
|
58943
61522
|
function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
|
|
58944
61523
|
const snapshot = tokens.snapshot();
|
|
58945
61524
|
const headerInfo = processClassHeader(tokens);
|
|
@@ -59177,7 +61756,7 @@ var require_getClassInfo = __commonJS((exports) => {
|
|
|
59177
61756
|
// ../../node_modules/sucrase/dist/util/elideImportEquals.js
|
|
59178
61757
|
var require_elideImportEquals = __commonJS((exports) => {
|
|
59179
61758
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59180
|
-
var _types =
|
|
61759
|
+
var _types = require_types3();
|
|
59181
61760
|
function elideImportEquals(tokens) {
|
|
59182
61761
|
tokens.removeInitialToken();
|
|
59183
61762
|
tokens.removeToken();
|
|
@@ -59201,7 +61780,7 @@ var require_elideImportEquals = __commonJS((exports) => {
|
|
|
59201
61780
|
var require_getDeclarationInfo = __commonJS((exports) => {
|
|
59202
61781
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59203
61782
|
var _tokenizer = require_tokenizer();
|
|
59204
|
-
var _types =
|
|
61783
|
+
var _types = require_types3();
|
|
59205
61784
|
var EMPTY_DECLARATION_INFO = {
|
|
59206
61785
|
typeDeclarations: new Set,
|
|
59207
61786
|
valueDeclarations: new Set
|
|
@@ -59229,7 +61808,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
|
|
|
59229
61808
|
var require_isExportFrom = __commonJS((exports) => {
|
|
59230
61809
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59231
61810
|
var _keywords = require_keywords();
|
|
59232
|
-
var _types =
|
|
61811
|
+
var _types = require_types3();
|
|
59233
61812
|
function isExportFrom(tokens) {
|
|
59234
61813
|
let closeBraceIndex = tokens.currentIndex();
|
|
59235
61814
|
while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
|
@@ -59244,7 +61823,7 @@ var require_isExportFrom = __commonJS((exports) => {
|
|
|
59244
61823
|
var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
59245
61824
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59246
61825
|
var _keywords = require_keywords();
|
|
59247
|
-
var _types =
|
|
61826
|
+
var _types = require_types3();
|
|
59248
61827
|
function removeMaybeImportAttributes(tokens) {
|
|
59249
61828
|
if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
|
|
59250
61829
|
tokens.removeToken();
|
|
@@ -59259,7 +61838,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
|
59259
61838
|
// ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
|
|
59260
61839
|
var require_shouldElideDefaultExport = __commonJS((exports) => {
|
|
59261
61840
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59262
|
-
var _types =
|
|
61841
|
+
var _types = require_types3();
|
|
59263
61842
|
function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
|
|
59264
61843
|
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
|
|
59265
61844
|
return false;
|
|
@@ -59290,7 +61869,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
|
|
|
59290
61869
|
}
|
|
59291
61870
|
var _tokenizer = require_tokenizer();
|
|
59292
61871
|
var _keywords = require_keywords();
|
|
59293
|
-
var _types =
|
|
61872
|
+
var _types = require_types3();
|
|
59294
61873
|
var _elideImportEquals = require_elideImportEquals();
|
|
59295
61874
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
59296
61875
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -59932,7 +62511,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
|
|
|
59932
62511
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
59933
62512
|
}
|
|
59934
62513
|
var _keywords = require_keywords();
|
|
59935
|
-
var _types =
|
|
62514
|
+
var _types = require_types3();
|
|
59936
62515
|
var _elideImportEquals = require_elideImportEquals();
|
|
59937
62516
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
59938
62517
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -60202,7 +62781,7 @@ var require_FlowTransformer = __commonJS((exports) => {
|
|
|
60202
62781
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60203
62782
|
}
|
|
60204
62783
|
var _keywords = require_keywords();
|
|
60205
|
-
var _types =
|
|
62784
|
+
var _types = require_types3();
|
|
60206
62785
|
var _Transformer = require_Transformer();
|
|
60207
62786
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60208
62787
|
|
|
@@ -60322,7 +62901,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
|
|
|
60322
62901
|
}
|
|
60323
62902
|
return value;
|
|
60324
62903
|
}
|
|
60325
|
-
var _types =
|
|
62904
|
+
var _types = require_types3();
|
|
60326
62905
|
var _Transformer = require_Transformer();
|
|
60327
62906
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60328
62907
|
var JEST_GLOBAL_NAME = "jest";
|
|
@@ -60396,7 +62975,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
|
|
|
60396
62975
|
function _interopRequireDefault(obj) {
|
|
60397
62976
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60398
62977
|
}
|
|
60399
|
-
var _types =
|
|
62978
|
+
var _types = require_types3();
|
|
60400
62979
|
var _Transformer = require_Transformer();
|
|
60401
62980
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60402
62981
|
|
|
@@ -60425,7 +63004,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
|
|
|
60425
63004
|
function _interopRequireDefault(obj) {
|
|
60426
63005
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60427
63006
|
}
|
|
60428
|
-
var _types =
|
|
63007
|
+
var _types = require_types3();
|
|
60429
63008
|
var _Transformer = require_Transformer();
|
|
60430
63009
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60431
63010
|
|
|
@@ -60453,7 +63032,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
|
|
|
60453
63032
|
function _interopRequireDefault(obj) {
|
|
60454
63033
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60455
63034
|
}
|
|
60456
|
-
var _types =
|
|
63035
|
+
var _types = require_types3();
|
|
60457
63036
|
var _Transformer = require_Transformer();
|
|
60458
63037
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60459
63038
|
|
|
@@ -60569,7 +63148,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
|
|
|
60569
63148
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60570
63149
|
}
|
|
60571
63150
|
var _tokenizer = require_tokenizer();
|
|
60572
|
-
var _types =
|
|
63151
|
+
var _types = require_types3();
|
|
60573
63152
|
var _Transformer = require_Transformer();
|
|
60574
63153
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60575
63154
|
|
|
@@ -60820,7 +63399,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
|
|
|
60820
63399
|
function _interopRequireDefault(obj) {
|
|
60821
63400
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60822
63401
|
}
|
|
60823
|
-
var _types =
|
|
63402
|
+
var _types = require_types3();
|
|
60824
63403
|
var _isIdentifier = require_isIdentifier();
|
|
60825
63404
|
var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
|
|
60826
63405
|
var _Transformer = require_Transformer();
|
|
@@ -60966,7 +63545,7 @@ var require_RootTransformer = __commonJS((exports) => {
|
|
|
60966
63545
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60967
63546
|
}
|
|
60968
63547
|
var _keywords = require_keywords();
|
|
60969
|
-
var _types =
|
|
63548
|
+
var _types = require_types3();
|
|
60970
63549
|
var _getClassInfo = require_getClassInfo();
|
|
60971
63550
|
var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
|
|
60972
63551
|
var _CJSImportTransformer = require_CJSImportTransformer();
|
|
@@ -61365,7 +63944,7 @@ var require_formatTokens = __commonJS((exports) => {
|
|
|
61365
63944
|
}
|
|
61366
63945
|
var _linesandcolumns = require_build();
|
|
61367
63946
|
var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
|
|
61368
|
-
var _types =
|
|
63947
|
+
var _types = require_types3();
|
|
61369
63948
|
function formatTokens(code, tokens) {
|
|
61370
63949
|
if (tokens.length === 0) {
|
|
61371
63950
|
return "";
|
|
@@ -61430,7 +64009,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
|
|
|
61430
64009
|
function _interopRequireDefault(obj) {
|
|
61431
64010
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
61432
64011
|
}
|
|
61433
|
-
var _types =
|
|
64012
|
+
var _types = require_types3();
|
|
61434
64013
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
61435
64014
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
61436
64015
|
function getTSImportedNames(tokens) {
|
|
@@ -61815,7 +64394,7 @@ function describeUnsupportedType(nodeType) {
|
|
|
61815
64394
|
function compileTypedScript(opts) {
|
|
61816
64395
|
let ast;
|
|
61817
64396
|
try {
|
|
61818
|
-
ast =
|
|
64397
|
+
ast = import_parser4.parse(opts.source, {
|
|
61819
64398
|
sourceType: "script",
|
|
61820
64399
|
plugins: ["typescript"],
|
|
61821
64400
|
ranges: true
|
|
@@ -62067,9 +64646,9 @@ function stripCommentsAndStrings(s) {
|
|
|
62067
64646
|
out = out.replace(/`(\\.|[^`\\])*`/g, "``");
|
|
62068
64647
|
return out;
|
|
62069
64648
|
}
|
|
62070
|
-
var
|
|
64649
|
+
var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
|
|
62071
64650
|
var init_compile = __esm(() => {
|
|
62072
|
-
|
|
64651
|
+
import_parser4 = __toESM(require_lib(), 1);
|
|
62073
64652
|
import_sucrase = __toESM(require_dist3(), 1);
|
|
62074
64653
|
EVALUATOR_PARAM_NAMES = ["expected", "actual"];
|
|
62075
64654
|
});
|
|
@@ -62429,8 +65008,8 @@ function getAllStepJsonSchemas() {
|
|
|
62429
65008
|
category: def.category,
|
|
62430
65009
|
name: def.name,
|
|
62431
65010
|
description: def.description,
|
|
62432
|
-
configSchema:
|
|
62433
|
-
outputSchema:
|
|
65011
|
+
configSchema: toJsonSchema(def.configSchema),
|
|
65012
|
+
outputSchema: toJsonSchema(def.outputSchema),
|
|
62434
65013
|
configInWith: def.configInWith
|
|
62435
65014
|
}));
|
|
62436
65015
|
}
|
|
@@ -63283,81 +65862,6 @@ var init_actions = __esm(() => {
|
|
|
63283
65862
|
ACTION_TYPES = ActionTypeSchema.options;
|
|
63284
65863
|
});
|
|
63285
65864
|
|
|
63286
|
-
// ../types/src/processor/execution.ts
|
|
63287
|
-
function asTuple(values) {
|
|
63288
|
-
return values;
|
|
63289
|
-
}
|
|
63290
|
-
var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
|
|
63291
|
-
var init_execution = __esm(() => {
|
|
63292
|
-
init_zod();
|
|
63293
|
-
WorkflowExecutionStatusValue2 = {
|
|
63294
|
-
CREATED: "created",
|
|
63295
|
-
PENDING: "pending",
|
|
63296
|
-
RUNNING: "running",
|
|
63297
|
-
WAITING: "waiting",
|
|
63298
|
-
COMPLETED: "completed",
|
|
63299
|
-
FAILED: "failed",
|
|
63300
|
-
CANCELLED: "cancelled"
|
|
63301
|
-
};
|
|
63302
|
-
WorkflowExecutionStatusSchema2 = exports_external.enum([
|
|
63303
|
-
WorkflowExecutionStatusValue2.CREATED,
|
|
63304
|
-
WorkflowExecutionStatusValue2.PENDING,
|
|
63305
|
-
WorkflowExecutionStatusValue2.RUNNING,
|
|
63306
|
-
WorkflowExecutionStatusValue2.WAITING,
|
|
63307
|
-
WorkflowExecutionStatusValue2.COMPLETED,
|
|
63308
|
-
WorkflowExecutionStatusValue2.FAILED,
|
|
63309
|
-
WorkflowExecutionStatusValue2.CANCELLED
|
|
63310
|
-
]);
|
|
63311
|
-
StepExecutionStatusValue2 = {
|
|
63312
|
-
PENDING: "pending",
|
|
63313
|
-
RUNNING: "running",
|
|
63314
|
-
SUCCESS: "success",
|
|
63315
|
-
FAILURE: "failure",
|
|
63316
|
-
WAITING: "waiting",
|
|
63317
|
-
SKIPPED: "skipped"
|
|
63318
|
-
};
|
|
63319
|
-
StepExecutionStatusSchema2 = exports_external.enum([
|
|
63320
|
-
StepExecutionStatusValue2.PENDING,
|
|
63321
|
-
StepExecutionStatusValue2.RUNNING,
|
|
63322
|
-
StepExecutionStatusValue2.SUCCESS,
|
|
63323
|
-
StepExecutionStatusValue2.FAILURE,
|
|
63324
|
-
StepExecutionStatusValue2.WAITING,
|
|
63325
|
-
StepExecutionStatusValue2.SKIPPED
|
|
63326
|
-
]);
|
|
63327
|
-
TriggerTypeValue2 = {
|
|
63328
|
-
MANUAL: "manual",
|
|
63329
|
-
API: "api",
|
|
63330
|
-
WEBHOOK: "webhook",
|
|
63331
|
-
SCHEDULE: "schedule",
|
|
63332
|
-
EMAIL: "email",
|
|
63333
|
-
EVAL: "eval",
|
|
63334
|
-
CLI: "cli"
|
|
63335
|
-
};
|
|
63336
|
-
TriggerTypeSchema2 = exports_external.enum([
|
|
63337
|
-
TriggerTypeValue2.MANUAL,
|
|
63338
|
-
TriggerTypeValue2.API,
|
|
63339
|
-
TriggerTypeValue2.WEBHOOK,
|
|
63340
|
-
TriggerTypeValue2.SCHEDULE,
|
|
63341
|
-
TriggerTypeValue2.EMAIL,
|
|
63342
|
-
TriggerTypeValue2.EVAL,
|
|
63343
|
-
TriggerTypeValue2.CLI
|
|
63344
|
-
]);
|
|
63345
|
-
ExecutionTypeValue2 = {
|
|
63346
|
-
PROD: "prod",
|
|
63347
|
-
EVAL: "eval",
|
|
63348
|
-
PLAYGROUND: "playground"
|
|
63349
|
-
};
|
|
63350
|
-
ExecutionTypeSchema2 = exports_external.enum([
|
|
63351
|
-
ExecutionTypeValue2.PROD,
|
|
63352
|
-
ExecutionTypeValue2.EVAL,
|
|
63353
|
-
ExecutionTypeValue2.PLAYGROUND
|
|
63354
|
-
]);
|
|
63355
|
-
WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
|
|
63356
|
-
STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
|
|
63357
|
-
TRIGGER_TYPES2 = TriggerTypeSchema2.options;
|
|
63358
|
-
EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
|
|
63359
|
-
});
|
|
63360
|
-
|
|
63361
65865
|
// ../types/src/workflow/workflow.ts
|
|
63362
65866
|
function suggestWorkflowName(raw) {
|
|
63363
65867
|
return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
|
|
@@ -63439,11 +65943,11 @@ var init_workflow = __esm(() => {
|
|
|
63439
65943
|
ManualTriggerMethodSchema = exports_external.object({
|
|
63440
65944
|
type: exports_external.literal("manual"),
|
|
63441
65945
|
enabled: exports_external.boolean().optional(),
|
|
63442
|
-
inputSchema:
|
|
65946
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
63443
65947
|
});
|
|
63444
65948
|
ApiTriggerMethodSchema = exports_external.object({
|
|
63445
65949
|
type: exports_external.literal("api"),
|
|
63446
|
-
inputSchema:
|
|
65950
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
63447
65951
|
});
|
|
63448
65952
|
EmailTriggerMethodSchema = exports_external.object({
|
|
63449
65953
|
type: exports_external.literal("email"),
|
|
@@ -63483,8 +65987,8 @@ var init_workflow = __esm(() => {
|
|
|
63483
65987
|
yamlContent: exports_external.string(),
|
|
63484
65988
|
definition: WorkflowDefinitionSchema,
|
|
63485
65989
|
isCurrent: exports_external.boolean().default(true),
|
|
63486
|
-
createdAt:
|
|
63487
|
-
updatedAt:
|
|
65990
|
+
createdAt: TimestampSchema,
|
|
65991
|
+
updatedAt: TimestampSchema.optional(),
|
|
63488
65992
|
createdBy: exports_external.string()
|
|
63489
65993
|
});
|
|
63490
65994
|
CreateWorkflowDefinitionSchema = exports_external.object({
|
|
@@ -63666,15 +66170,15 @@ function isFileOutput(value) {
|
|
|
63666
66170
|
function isWorkflowResult(value) {
|
|
63667
66171
|
return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
|
|
63668
66172
|
}
|
|
63669
|
-
var
|
|
66173
|
+
var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, StepExecutionAttemptSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
63670
66174
|
var init_execution2 = __esm(() => {
|
|
63671
66175
|
init_zod();
|
|
63672
66176
|
init_common();
|
|
63673
66177
|
init_execution();
|
|
63674
66178
|
init_retry();
|
|
63675
66179
|
init_workflow();
|
|
63676
|
-
|
|
63677
|
-
|
|
66180
|
+
WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
|
|
66181
|
+
StepExecutionStatusSchema2 = StepExecutionStatusSchema;
|
|
63678
66182
|
ScopeEntryTypeSchema = exports_external.enum([
|
|
63679
66183
|
"root",
|
|
63680
66184
|
"if-then",
|
|
@@ -63697,7 +66201,7 @@ var init_execution2 = __esm(() => {
|
|
|
63697
66201
|
ScopeStackSchema = exports_external.array(ScopeEntrySchema);
|
|
63698
66202
|
StepResultSchema = exports_external.object({
|
|
63699
66203
|
output: exports_external.unknown(),
|
|
63700
|
-
status:
|
|
66204
|
+
status: StepExecutionStatusSchema2
|
|
63701
66205
|
});
|
|
63702
66206
|
ExecutionContextSchema = exports_external.object({
|
|
63703
66207
|
input: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
@@ -63725,24 +66229,24 @@ var init_execution2 = __esm(() => {
|
|
|
63725
66229
|
triggerType: exports_external.string(),
|
|
63726
66230
|
triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
|
|
63727
66231
|
overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
|
|
63728
|
-
status:
|
|
66232
|
+
status: WorkflowExecutionStatusSchema2,
|
|
63729
66233
|
scopeStack: ScopeStackSchema,
|
|
63730
66234
|
currentStepIndex: exports_external.number(),
|
|
63731
66235
|
stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
|
|
63732
66236
|
result: exports_external.unknown().nullable(),
|
|
63733
66237
|
error: exports_external.string().nullable(),
|
|
63734
66238
|
priority: exports_external.number().default(50),
|
|
63735
|
-
availableAt:
|
|
66239
|
+
availableAt: TimestampSchema,
|
|
63736
66240
|
leaseId: exports_external.string().nullable(),
|
|
63737
|
-
leaseExpiresAt:
|
|
66241
|
+
leaseExpiresAt: TimestampSchema.nullable(),
|
|
63738
66242
|
workerId: exports_external.string().nullable(),
|
|
63739
66243
|
maxRetries: exports_external.number().default(0),
|
|
63740
66244
|
originalExecutionId: exports_external.string().nullable().optional(),
|
|
63741
66245
|
previousExecutionId: exports_external.string().nullable().optional(),
|
|
63742
66246
|
retryNumber: exports_external.number().default(0),
|
|
63743
|
-
createdAt:
|
|
63744
|
-
startedAt:
|
|
63745
|
-
completedAt:
|
|
66247
|
+
createdAt: TimestampSchema,
|
|
66248
|
+
startedAt: TimestampSchema.nullable(),
|
|
66249
|
+
completedAt: TimestampSchema.nullable(),
|
|
63746
66250
|
createdBy: exports_external.string().nullable()
|
|
63747
66251
|
});
|
|
63748
66252
|
StepExecutionSchema = exports_external.object({
|
|
@@ -63761,15 +66265,15 @@ var init_execution2 = __esm(() => {
|
|
|
63761
66265
|
effectiveRetryPolicy: ResolvedRetryPolicySchema.nullable().optional(),
|
|
63762
66266
|
retryPolicySource: RetryPolicySourceSchema.nullable().optional(),
|
|
63763
66267
|
latestAttempt: exports_external.number().default(0),
|
|
63764
|
-
nextAttemptAt:
|
|
66268
|
+
nextAttemptAt: TimestampSchema.nullable().optional(),
|
|
63765
66269
|
inputData: exports_external.unknown().nullable(),
|
|
63766
66270
|
outputData: exports_external.unknown().nullable(),
|
|
63767
|
-
status:
|
|
66271
|
+
status: StepExecutionStatusSchema2,
|
|
63768
66272
|
error: exports_external.string().nullable(),
|
|
63769
66273
|
overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
|
|
63770
66274
|
durationMs: exports_external.number().nullable(),
|
|
63771
|
-
startedAt:
|
|
63772
|
-
completedAt:
|
|
66275
|
+
startedAt: TimestampSchema.nullable(),
|
|
66276
|
+
completedAt: TimestampSchema.nullable()
|
|
63773
66277
|
});
|
|
63774
66278
|
StepExecutionAttemptSchema = exports_external.object({
|
|
63775
66279
|
id: exports_external.string(),
|
|
@@ -63782,8 +66286,8 @@ var init_execution2 = __esm(() => {
|
|
|
63782
66286
|
failure: ExecutionFailureSchema.nullable(),
|
|
63783
66287
|
retryDecision: RetryDecisionSchema.nullable(),
|
|
63784
66288
|
replaySafe: exports_external.boolean().nullable(),
|
|
63785
|
-
startedAt:
|
|
63786
|
-
completedAt:
|
|
66289
|
+
startedAt: TimestampSchema,
|
|
66290
|
+
completedAt: TimestampSchema.nullable(),
|
|
63787
66291
|
durationMs: exports_external.number().nullable()
|
|
63788
66292
|
});
|
|
63789
66293
|
ConnectorSchema = exports_external.object({
|
|
@@ -63795,8 +66299,8 @@ var init_execution2 = __esm(() => {
|
|
|
63795
66299
|
config: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
63796
66300
|
inputSchema: exports_external.unknown().optional(),
|
|
63797
66301
|
outputSchema: exports_external.unknown().optional(),
|
|
63798
|
-
createdAt:
|
|
63799
|
-
updatedAt:
|
|
66302
|
+
createdAt: TimestampSchema,
|
|
66303
|
+
updatedAt: TimestampSchema.optional(),
|
|
63800
66304
|
createdBy: exports_external.string()
|
|
63801
66305
|
});
|
|
63802
66306
|
WorkflowFileOutputSchema = exports_external.object({
|
|
@@ -64762,8 +67266,8 @@ function parseRunTarget(target) {
|
|
|
64762
67266
|
if (root !== "agents") {
|
|
64763
67267
|
throw new Error(`Agent target must be rooted at "agents.", got "${idOrSlug2}"`);
|
|
64764
67268
|
}
|
|
64765
|
-
for (const
|
|
64766
|
-
RunTargetSegmentSchema.parse(
|
|
67269
|
+
for (const segment2 of segments) {
|
|
67270
|
+
RunTargetSegmentSchema.parse(segment2);
|
|
64767
67271
|
}
|
|
64768
67272
|
const packagePath = packageName.split(".").join("/");
|
|
64769
67273
|
const [, ...slugParts] = packagePath.split("/");
|
|
@@ -64876,9 +67380,9 @@ var init_grammar = __esm(() => {
|
|
|
64876
67380
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
64877
67381
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
64878
67382
|
}
|
|
64879
|
-
for (const
|
|
64880
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
64881
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
67383
|
+
for (const segment2 of parts.slice(1)) {
|
|
67384
|
+
if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
|
|
67385
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
|
|
64882
67386
|
}
|
|
64883
67387
|
}
|
|
64884
67388
|
});
|
|
@@ -64894,9 +67398,9 @@ var init_grammar = __esm(() => {
|
|
|
64894
67398
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
64895
67399
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
64896
67400
|
}
|
|
64897
|
-
for (const
|
|
64898
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
64899
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
67401
|
+
for (const segment2 of parts.slice(1)) {
|
|
67402
|
+
if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
|
|
67403
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
|
|
64900
67404
|
}
|
|
64901
67405
|
}
|
|
64902
67406
|
});
|
|
@@ -64990,9 +67494,9 @@ var init_grammar = __esm(() => {
|
|
|
64990
67494
|
});
|
|
64991
67495
|
return;
|
|
64992
67496
|
}
|
|
64993
|
-
for (const
|
|
64994
|
-
if (!RunTargetSegmentSchema.safeParse(
|
|
64995
|
-
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${
|
|
67497
|
+
for (const segment2 of parts.slice(1)) {
|
|
67498
|
+
if (!RunTargetSegmentSchema.safeParse(segment2).success) {
|
|
67499
|
+
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment2}` });
|
|
64996
67500
|
}
|
|
64997
67501
|
}
|
|
64998
67502
|
if (ref) {
|
|
@@ -65742,7 +68246,7 @@ function fromBig(n, le = false) {
|
|
|
65742
68246
|
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
65743
68247
|
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
65744
68248
|
}
|
|
65745
|
-
function
|
|
68249
|
+
function split2(lst, le = false) {
|
|
65746
68250
|
const len = lst.length;
|
|
65747
68251
|
let Ah = new Uint32Array(len);
|
|
65748
68252
|
let Al = new Uint32Array(len);
|
|
@@ -65922,7 +68426,7 @@ var init_sha2 = __esm(() => {
|
|
|
65922
68426
|
super(28);
|
|
65923
68427
|
}
|
|
65924
68428
|
};
|
|
65925
|
-
K512 = /* @__PURE__ */ (() =>
|
|
68429
|
+
K512 = /* @__PURE__ */ (() => split2([
|
|
65926
68430
|
"0x428a2f98d728ae22",
|
|
65927
68431
|
"0x7137449123ef65cd",
|
|
65928
68432
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -68031,11 +70535,11 @@ function walkGrammar(node, parts) {
|
|
|
68031
70535
|
}
|
|
68032
70536
|
return current;
|
|
68033
70537
|
}
|
|
68034
|
-
function normalizeTemplate(
|
|
68035
|
-
return
|
|
70538
|
+
function normalizeTemplate(template2) {
|
|
70539
|
+
return template2.endsWith("/") ? template2.slice(0, -1) : template2;
|
|
68036
70540
|
}
|
|
68037
|
-
function renderTemplate(
|
|
68038
|
-
return normalizeTemplate(
|
|
70541
|
+
function renderTemplate(template2, params) {
|
|
70542
|
+
return normalizeTemplate(template2).split("/").flatMap((part) => {
|
|
68039
70543
|
if (!part.startsWith(":")) {
|
|
68040
70544
|
return [part];
|
|
68041
70545
|
}
|
|
@@ -68045,36 +70549,36 @@ function renderTemplate(template, params) {
|
|
|
68045
70549
|
throw new Error(`Missing S3 path parameter: ${part}`);
|
|
68046
70550
|
}
|
|
68047
70551
|
if (name === "path") {
|
|
68048
|
-
return value.split("/").map((
|
|
70552
|
+
return value.split("/").map((segment2) => assertSegment("path", segment2));
|
|
68049
70553
|
}
|
|
68050
70554
|
return [assertSegment(String(name), value)];
|
|
68051
70555
|
});
|
|
68052
70556
|
}
|
|
68053
|
-
function buildS3Path(tenantId,
|
|
70557
|
+
function buildS3Path(tenantId, template2, params) {
|
|
68054
70558
|
const tenant = assertSegment("tenantId", tenantId);
|
|
68055
|
-
const parts = renderTemplate(
|
|
70559
|
+
const parts = renderTemplate(template2, params);
|
|
68056
70560
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
68057
|
-
if (
|
|
68058
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
70561
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
70562
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
68059
70563
|
}
|
|
68060
70564
|
const path = ["tenants", tenant, ...parts].join("/");
|
|
68061
|
-
return
|
|
70565
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
68062
70566
|
}
|
|
68063
|
-
function buildS3PathSuffix(
|
|
68064
|
-
const parts = renderTemplate(
|
|
70567
|
+
function buildS3PathSuffix(template2, params) {
|
|
70568
|
+
const parts = renderTemplate(template2, params);
|
|
68065
70569
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
68066
|
-
if (
|
|
68067
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
70570
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
70571
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
68068
70572
|
}
|
|
68069
70573
|
const path = parts.join("/");
|
|
68070
|
-
return
|
|
70574
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
68071
70575
|
}
|
|
68072
70576
|
function stripTenantPrefix(key) {
|
|
68073
70577
|
return key.replace(TENANT_PREFIX_RX, "");
|
|
68074
70578
|
}
|
|
68075
|
-
function matchS3Path(
|
|
70579
|
+
function matchS3Path(template2, key) {
|
|
68076
70580
|
const keyParts = stripTenantPrefix(key).split("/");
|
|
68077
|
-
const templateParts = normalizeTemplate(
|
|
70581
|
+
const templateParts = normalizeTemplate(template2).split("/");
|
|
68078
70582
|
const params = {};
|
|
68079
70583
|
let keyIndex = 0;
|
|
68080
70584
|
for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
|
|
@@ -68093,7 +70597,7 @@ function matchS3Path(template, key) {
|
|
|
68093
70597
|
if (rest.length === 0)
|
|
68094
70598
|
return null;
|
|
68095
70599
|
try {
|
|
68096
|
-
params.path = rest.map((
|
|
70600
|
+
params.path = rest.map((segment2) => assertSegment("path", segment2)).join("/");
|
|
68097
70601
|
walkGrammar(S3_PATH_GRAMMAR, keyParts);
|
|
68098
70602
|
} catch {
|
|
68099
70603
|
return null;
|
|
@@ -68127,23 +70631,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
|
|
|
68127
70631
|
}
|
|
68128
70632
|
return assertSegment("tenantId", tenantId);
|
|
68129
70633
|
};
|
|
68130
|
-
const build = (
|
|
70634
|
+
const build = (template2, params) => {
|
|
68131
70635
|
const tenant = resolveTenantId(params);
|
|
68132
|
-
const parts = renderTemplate(
|
|
70636
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
68133
70637
|
const node = walkGrammar(grammarNode, parts);
|
|
68134
|
-
if (
|
|
68135
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
70638
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
70639
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
68136
70640
|
}
|
|
68137
70641
|
const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
|
|
68138
|
-
return
|
|
70642
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
68139
70643
|
};
|
|
68140
70644
|
const builder = build;
|
|
68141
|
-
builder.at = (
|
|
70645
|
+
builder.at = (template2, params) => {
|
|
68142
70646
|
const tenant = resolveTenantId(params);
|
|
68143
|
-
const parts = renderTemplate(
|
|
70647
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
68144
70648
|
const nextNode = walkGrammar(grammarNode, parts);
|
|
68145
|
-
if (
|
|
68146
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
70649
|
+
if (template2.endsWith("/") && nextNode === PATH_LEAF) {
|
|
70650
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
68147
70651
|
}
|
|
68148
70652
|
return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
|
|
68149
70653
|
};
|
|
@@ -68586,7 +71090,7 @@ __export(exports_src, {
|
|
|
68586
71090
|
SplitConfigSchema: () => SplitConfigSchema,
|
|
68587
71091
|
SpanTypes: () => SpanTypes,
|
|
68588
71092
|
SpanKindMap: () => SpanKindMap,
|
|
68589
|
-
SpanKind: () => SpanKind,
|
|
71093
|
+
SpanKind: () => import_api.SpanKind,
|
|
68590
71094
|
SourceVersionRefSchema: () => SourceVersionRefSchema,
|
|
68591
71095
|
SourceSecretsFileSchema: () => SourceSecretsFileSchema,
|
|
68592
71096
|
SourcePackageTypeSchema: () => SourcePackageTypeSchema,
|
|
@@ -68790,7 +71294,7 @@ __export(exports_src, {
|
|
|
68790
71294
|
GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
|
|
68791
71295
|
ForeachStepSchema: () => ForeachStepSchema,
|
|
68792
71296
|
FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
|
|
68793
|
-
FilePathDescriptorSchema: () =>
|
|
71297
|
+
FilePathDescriptorSchema: () => FilePathDescriptorSchema,
|
|
68794
71298
|
FileIngressRefSchema: () => FileIngressRefSchema,
|
|
68795
71299
|
FileIdIngressRefSchema: () => FileIdIngressRefSchema,
|
|
68796
71300
|
FailStepSchema: () => FailStepSchema,
|
|
@@ -68952,8 +71456,8 @@ var init_src = __esm(() => {
|
|
|
68952
71456
|
init_legacy_boundary();
|
|
68953
71457
|
init_runtime_file_ref();
|
|
68954
71458
|
init_scoped_file_ref();
|
|
68955
|
-
|
|
68956
|
-
|
|
71459
|
+
init_processor2();
|
|
71460
|
+
init_parser2();
|
|
68957
71461
|
init_otel();
|
|
68958
71462
|
init_execution_row();
|
|
68959
71463
|
init_run_expand();
|
|
@@ -69868,7 +72372,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
69868
72372
|
else
|
|
69869
72373
|
end = lineWidth - indentAtStart;
|
|
69870
72374
|
}
|
|
69871
|
-
let
|
|
72375
|
+
let split3 = undefined;
|
|
69872
72376
|
let prev = undefined;
|
|
69873
72377
|
let overflow = false;
|
|
69874
72378
|
let i = -1;
|
|
@@ -69902,20 +72406,20 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
69902
72406
|
if (mode === FOLD_BLOCK)
|
|
69903
72407
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
69904
72408
|
end = i + indent.length + endStep;
|
|
69905
|
-
|
|
72409
|
+
split3 = undefined;
|
|
69906
72410
|
} else {
|
|
69907
72411
|
if (ch === " " && prev && prev !== " " && prev !== `
|
|
69908
72412
|
` && prev !== "\t") {
|
|
69909
72413
|
const next = text[i + 1];
|
|
69910
72414
|
if (next && next !== " " && next !== `
|
|
69911
72415
|
` && next !== "\t")
|
|
69912
|
-
|
|
72416
|
+
split3 = i;
|
|
69913
72417
|
}
|
|
69914
72418
|
if (i >= end) {
|
|
69915
|
-
if (
|
|
69916
|
-
folds.push(
|
|
69917
|
-
end =
|
|
69918
|
-
|
|
72419
|
+
if (split3) {
|
|
72420
|
+
folds.push(split3);
|
|
72421
|
+
end = split3 + endStep;
|
|
72422
|
+
split3 = undefined;
|
|
69919
72423
|
} else if (mode === FOLD_QUOTED) {
|
|
69920
72424
|
while (prev === " " || prev === "\t") {
|
|
69921
72425
|
prev = ch;
|
|
@@ -69928,7 +72432,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
69928
72432
|
folds.push(j);
|
|
69929
72433
|
escapedFolds[j] = true;
|
|
69930
72434
|
end = j + endStep;
|
|
69931
|
-
|
|
72435
|
+
split3 = undefined;
|
|
69932
72436
|
} else {
|
|
69933
72437
|
overflow = true;
|
|
69934
72438
|
}
|
|
@@ -70562,7 +73066,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
70562
73066
|
var identity = require_identity();
|
|
70563
73067
|
var Scalar = require_Scalar();
|
|
70564
73068
|
var MERGE_KEY = "<<";
|
|
70565
|
-
var
|
|
73069
|
+
var merge3 = {
|
|
70566
73070
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
70567
73071
|
default: "key",
|
|
70568
73072
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -70572,7 +73076,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
70572
73076
|
}),
|
|
70573
73077
|
stringify: () => MERGE_KEY
|
|
70574
73078
|
};
|
|
70575
|
-
var isMergeKey = (ctx, key) => (
|
|
73079
|
+
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);
|
|
70576
73080
|
function addMergeToJSMap(ctx, map2, value) {
|
|
70577
73081
|
const source = resolveAliasValue(ctx, value);
|
|
70578
73082
|
if (identity.isSeq(source))
|
|
@@ -70611,21 +73115,21 @@ var require_merge = __commonJS((exports) => {
|
|
|
70611
73115
|
}
|
|
70612
73116
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
70613
73117
|
exports.isMergeKey = isMergeKey;
|
|
70614
|
-
exports.merge =
|
|
73118
|
+
exports.merge = merge3;
|
|
70615
73119
|
});
|
|
70616
73120
|
|
|
70617
73121
|
// ../../node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
70618
73122
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
70619
73123
|
var log = require_log();
|
|
70620
|
-
var
|
|
73124
|
+
var merge3 = require_merge();
|
|
70621
73125
|
var stringify = require_stringify();
|
|
70622
73126
|
var identity = require_identity();
|
|
70623
73127
|
var toJS = require_toJS();
|
|
70624
73128
|
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
70625
73129
|
if (identity.isNode(key) && key.addToJSMap)
|
|
70626
73130
|
key.addToJSMap(ctx, map2, value);
|
|
70627
|
-
else if (
|
|
70628
|
-
|
|
73131
|
+
else if (merge3.isMergeKey(ctx, key))
|
|
73132
|
+
merge3.addMergeToJSMap(ctx, map2, value);
|
|
70629
73133
|
else {
|
|
70630
73134
|
const jsKey = toJS.toJS(key, "", ctx);
|
|
70631
73135
|
if (map2 instanceof Map) {
|
|
@@ -71901,7 +74405,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
71901
74405
|
var bool = require_bool2();
|
|
71902
74406
|
var float = require_float2();
|
|
71903
74407
|
var int2 = require_int2();
|
|
71904
|
-
var
|
|
74408
|
+
var merge3 = require_merge();
|
|
71905
74409
|
var omap = require_omap();
|
|
71906
74410
|
var pairs = require_pairs();
|
|
71907
74411
|
var set2 = require_set();
|
|
@@ -71921,7 +74425,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
71921
74425
|
float.floatExp,
|
|
71922
74426
|
float.float,
|
|
71923
74427
|
binary.binary,
|
|
71924
|
-
|
|
74428
|
+
merge3.merge,
|
|
71925
74429
|
omap.omap,
|
|
71926
74430
|
pairs.pairs,
|
|
71927
74431
|
set2.set,
|
|
@@ -71944,7 +74448,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
71944
74448
|
var schema = require_schema();
|
|
71945
74449
|
var schema$1 = require_schema2();
|
|
71946
74450
|
var binary = require_binary();
|
|
71947
|
-
var
|
|
74451
|
+
var merge3 = require_merge();
|
|
71948
74452
|
var omap = require_omap();
|
|
71949
74453
|
var pairs = require_pairs();
|
|
71950
74454
|
var schema$2 = require_schema3();
|
|
@@ -71969,7 +74473,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
71969
74473
|
intOct: int2.intOct,
|
|
71970
74474
|
intTime: timestamp.intTime,
|
|
71971
74475
|
map: map2.map,
|
|
71972
|
-
merge:
|
|
74476
|
+
merge: merge3.merge,
|
|
71973
74477
|
null: _null4.nullTag,
|
|
71974
74478
|
omap: omap.omap,
|
|
71975
74479
|
pairs: pairs.pairs,
|
|
@@ -71979,7 +74483,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
71979
74483
|
};
|
|
71980
74484
|
var coreKnownTags = {
|
|
71981
74485
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
71982
|
-
"tag:yaml.org,2002:merge":
|
|
74486
|
+
"tag:yaml.org,2002:merge": merge3.merge,
|
|
71983
74487
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
71984
74488
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
71985
74489
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -71988,7 +74492,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
71988
74492
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
71989
74493
|
const schemaTags = schemas3.get(schemaName);
|
|
71990
74494
|
if (schemaTags && !customTags) {
|
|
71991
|
-
return addMergeTag && !schemaTags.includes(
|
|
74495
|
+
return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
|
|
71992
74496
|
}
|
|
71993
74497
|
let tags = schemaTags;
|
|
71994
74498
|
if (!tags) {
|
|
@@ -72006,7 +74510,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72006
74510
|
tags = customTags(tags.slice());
|
|
72007
74511
|
}
|
|
72008
74512
|
if (addMergeTag)
|
|
72009
|
-
tags = tags.concat(
|
|
74513
|
+
tags = tags.concat(merge3.merge);
|
|
72010
74514
|
return tags.reduce((tags2, tag) => {
|
|
72011
74515
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
72012
74516
|
if (!tagObj) {
|
|
@@ -72033,11 +74537,11 @@ var require_Schema = __commonJS((exports) => {
|
|
|
72033
74537
|
var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
72034
74538
|
|
|
72035
74539
|
class Schema {
|
|
72036
|
-
constructor({ compat: compat2, customTags, merge:
|
|
74540
|
+
constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
72037
74541
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
72038
74542
|
this.name = typeof schema === "string" && schema || "core";
|
|
72039
74543
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
72040
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
74544
|
+
this.tags = tags.getTags(customTags, this.name, merge3);
|
|
72041
74545
|
this.toStringOptions = toStringDefaults ?? null;
|
|
72042
74546
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
72043
74547
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -73260,13 +75764,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
73260
75764
|
return { mode, indent, chomp, comment, length };
|
|
73261
75765
|
}
|
|
73262
75766
|
function splitLines(source) {
|
|
73263
|
-
const
|
|
73264
|
-
const first =
|
|
75767
|
+
const split3 = source.split(/\n( *)/);
|
|
75768
|
+
const first = split3[0];
|
|
73265
75769
|
const m = first.match(/^( *)/);
|
|
73266
75770
|
const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
|
|
73267
75771
|
const lines = [line0];
|
|
73268
|
-
for (let i = 1;i <
|
|
73269
|
-
lines.push([
|
|
75772
|
+
for (let i = 1;i < split3.length; i += 2)
|
|
75773
|
+
lines.push([split3[i], split3[i + 1]]);
|
|
73270
75774
|
return lines;
|
|
73271
75775
|
}
|
|
73272
75776
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -76280,7 +78784,7 @@ var init_main = __esm(() => {
|
|
|
76280
78784
|
});
|
|
76281
78785
|
|
|
76282
78786
|
// ../../node_modules/sisteransi/src/index.js
|
|
76283
|
-
var
|
|
78787
|
+
var require_src2 = __commonJS((exports, module) => {
|
|
76284
78788
|
var ESC2 = "\x1B";
|
|
76285
78789
|
var CSI2 = `${ESC2}[`;
|
|
76286
78790
|
var beep = "\x07";
|
|
@@ -76623,7 +79127,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
|
|
|
76623
79127
|
}, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
|
|
76624
79128
|
var init_dist3 = __esm(() => {
|
|
76625
79129
|
init_main();
|
|
76626
|
-
import_sisteransi = __toESM(
|
|
79130
|
+
import_sisteransi = __toESM(require_src2(), 1);
|
|
76627
79131
|
G = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
76628
79132
|
K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
76629
79133
|
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)}` } } };
|
|
@@ -77966,7 +80470,7 @@ var init_dist4 = __esm(() => {
|
|
|
77966
80470
|
init_dist3();
|
|
77967
80471
|
init_main();
|
|
77968
80472
|
init_dist2();
|
|
77969
|
-
import_sisteransi2 = __toESM(
|
|
80473
|
+
import_sisteransi2 = __toESM(require_src2(), 1);
|
|
77970
80474
|
tt2 = te();
|
|
77971
80475
|
_t = w2("◆", "*");
|
|
77972
80476
|
ot2 = w2("■", "x");
|
|
@@ -171458,7 +173962,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
|
|
|
171458
173962
|
__defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
171459
173963
|
}
|
|
171460
173964
|
return to5;
|
|
171461
|
-
}, __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,
|
|
173965
|
+
}, __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 {
|
|
171462
173966
|
diff(oldStr, newStr, options8 = {}) {
|
|
171463
173967
|
let callback;
|
|
171464
173968
|
if (typeof options8 === "function") {
|
|
@@ -172480,7 +174984,7 @@ var init_prettier = __esm(() => {
|
|
|
172480
174984
|
};
|
|
172481
174985
|
}
|
|
172482
174986
|
});
|
|
172483
|
-
|
|
174987
|
+
require_utils4 = __commonJS2({
|
|
172484
174988
|
"node_modules/braces/lib/utils.js"(exports) {
|
|
172485
174989
|
exports.isInteger = (num) => {
|
|
172486
174990
|
if (typeof num === "number") {
|
|
@@ -172569,7 +175073,7 @@ var init_prettier = __esm(() => {
|
|
|
172569
175073
|
});
|
|
172570
175074
|
require_stringify2 = __commonJS2({
|
|
172571
175075
|
"node_modules/braces/lib/stringify.js"(exports, module) {
|
|
172572
|
-
var utils2 =
|
|
175076
|
+
var utils2 = require_utils4();
|
|
172573
175077
|
module.exports = (ast, options8 = {}) => {
|
|
172574
175078
|
const stringify2 = (node, parent = {}) => {
|
|
172575
175079
|
const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
|
|
@@ -173023,7 +175527,7 @@ var init_prettier = __esm(() => {
|
|
|
173023
175527
|
require_compile2 = __commonJS2({
|
|
173024
175528
|
"node_modules/braces/lib/compile.js"(exports, module) {
|
|
173025
175529
|
var fill2 = require_fill_range();
|
|
173026
|
-
var utils2 =
|
|
175530
|
+
var utils2 = require_utils4();
|
|
173027
175531
|
var compile = (ast, options8 = {}) => {
|
|
173028
175532
|
const walk = (node, parent = {}) => {
|
|
173029
175533
|
const invalidBlock = utils2.isInvalidBrace(parent);
|
|
@@ -173073,7 +175577,7 @@ var init_prettier = __esm(() => {
|
|
|
173073
175577
|
"node_modules/braces/lib/expand.js"(exports, module) {
|
|
173074
175578
|
var fill2 = require_fill_range();
|
|
173075
175579
|
var stringify2 = require_stringify2();
|
|
173076
|
-
var utils2 =
|
|
175580
|
+
var utils2 = require_utils4();
|
|
173077
175581
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
173078
175582
|
const result = [];
|
|
173079
175583
|
queue = [].concat(queue);
|
|
@@ -175272,8 +177776,8 @@ var init_prettier = __esm(() => {
|
|
|
175272
177776
|
var Stream = __require2("stream");
|
|
175273
177777
|
var PassThrough = Stream.PassThrough;
|
|
175274
177778
|
var slice = Array.prototype.slice;
|
|
175275
|
-
module.exports =
|
|
175276
|
-
function
|
|
177779
|
+
module.exports = merge22;
|
|
177780
|
+
function merge22() {
|
|
175277
177781
|
const streamsQueue = [];
|
|
175278
177782
|
const args = slice.call(arguments);
|
|
175279
177783
|
let merging = false;
|
|
@@ -175387,9 +177891,9 @@ var init_prettier = __esm(() => {
|
|
|
175387
177891
|
"node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
175388
177892
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175389
177893
|
exports.merge = undefined;
|
|
175390
|
-
var
|
|
177894
|
+
var merge22 = require_merge2();
|
|
175391
177895
|
function merge3(streams) {
|
|
175392
|
-
const mergedStream =
|
|
177896
|
+
const mergedStream = merge22(streams);
|
|
175393
177897
|
streams.forEach((stream) => {
|
|
175394
177898
|
stream.once("error", (error52) => mergedStream.emit("error", error52));
|
|
175395
177899
|
});
|
|
@@ -175417,7 +177921,7 @@ var init_prettier = __esm(() => {
|
|
|
175417
177921
|
exports.isEmpty = isEmpty;
|
|
175418
177922
|
}
|
|
175419
177923
|
});
|
|
175420
|
-
|
|
177924
|
+
require_utils32 = __commonJS2({
|
|
175421
177925
|
"node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
175422
177926
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175423
177927
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
@@ -175441,7 +177945,7 @@ var init_prettier = __esm(() => {
|
|
|
175441
177945
|
"node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
175442
177946
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175443
177947
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
175444
|
-
var utils2 =
|
|
177948
|
+
var utils2 = require_utils32();
|
|
175445
177949
|
function generate(input, settings) {
|
|
175446
177950
|
const patterns = processPatterns(input, settings);
|
|
175447
177951
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -175750,7 +178254,7 @@ var init_prettier = __esm(() => {
|
|
|
175750
178254
|
exports.createDirentFromStats = createDirentFromStats;
|
|
175751
178255
|
}
|
|
175752
178256
|
});
|
|
175753
|
-
|
|
178257
|
+
require_utils42 = __commonJS2({
|
|
175754
178258
|
"node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
175755
178259
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175756
178260
|
exports.fs = undefined;
|
|
@@ -175778,7 +178282,7 @@ var init_prettier = __esm(() => {
|
|
|
175778
178282
|
var fsStat = require_out();
|
|
175779
178283
|
var rpl = require_run_parallel();
|
|
175780
178284
|
var constants_1 = require_constants3();
|
|
175781
|
-
var utils2 =
|
|
178285
|
+
var utils2 = require_utils42();
|
|
175782
178286
|
var common = require_common();
|
|
175783
178287
|
function read3(directory, settings, callback) {
|
|
175784
178288
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -175884,7 +178388,7 @@ var init_prettier = __esm(() => {
|
|
|
175884
178388
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
175885
178389
|
var fsStat = require_out();
|
|
175886
178390
|
var constants_1 = require_constants3();
|
|
175887
|
-
var utils2 =
|
|
178391
|
+
var utils2 = require_utils42();
|
|
175888
178392
|
var common = require_common();
|
|
175889
178393
|
function read3(directory, settings) {
|
|
175890
178394
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -176664,7 +179168,7 @@ var init_prettier = __esm(() => {
|
|
|
176664
179168
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176665
179169
|
var path15 = __require2("path");
|
|
176666
179170
|
var fsStat = require_out();
|
|
176667
|
-
var utils2 =
|
|
179171
|
+
var utils2 = require_utils32();
|
|
176668
179172
|
var Reader = class {
|
|
176669
179173
|
constructor(_settings) {
|
|
176670
179174
|
this._settings = _settings;
|
|
@@ -176788,7 +179292,7 @@ var init_prettier = __esm(() => {
|
|
|
176788
179292
|
require_matcher = __commonJS2({
|
|
176789
179293
|
"node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
176790
179294
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176791
|
-
var utils2 =
|
|
179295
|
+
var utils2 = require_utils32();
|
|
176792
179296
|
var Matcher = class {
|
|
176793
179297
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
176794
179298
|
this._patterns = _patterns;
|
|
@@ -176827,7 +179331,7 @@ var init_prettier = __esm(() => {
|
|
|
176827
179331
|
});
|
|
176828
179332
|
}
|
|
176829
179333
|
_splitSegmentsIntoSections(segments) {
|
|
176830
|
-
return utils2.array.splitWhen(segments, (
|
|
179334
|
+
return utils2.array.splitWhen(segments, (segment2) => segment2.dynamic && utils2.pattern.hasGlobStar(segment2.pattern));
|
|
176831
179335
|
}
|
|
176832
179336
|
};
|
|
176833
179337
|
exports.default = Matcher;
|
|
@@ -176848,11 +179352,11 @@ var init_prettier = __esm(() => {
|
|
|
176848
179352
|
return true;
|
|
176849
179353
|
}
|
|
176850
179354
|
const match = parts.every((part, index) => {
|
|
176851
|
-
const
|
|
176852
|
-
if (
|
|
179355
|
+
const segment2 = pattern.segments[index];
|
|
179356
|
+
if (segment2.dynamic && segment2.patternRe.test(part)) {
|
|
176853
179357
|
return true;
|
|
176854
179358
|
}
|
|
176855
|
-
if (!
|
|
179359
|
+
if (!segment2.dynamic && segment2.pattern === part) {
|
|
176856
179360
|
return true;
|
|
176857
179361
|
}
|
|
176858
179362
|
return false;
|
|
@@ -176870,7 +179374,7 @@ var init_prettier = __esm(() => {
|
|
|
176870
179374
|
require_deep = __commonJS2({
|
|
176871
179375
|
"node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
176872
179376
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176873
|
-
var utils2 =
|
|
179377
|
+
var utils2 = require_utils32();
|
|
176874
179378
|
var partial_1 = require_partial();
|
|
176875
179379
|
var DeepFilter = class {
|
|
176876
179380
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -176932,7 +179436,7 @@ var init_prettier = __esm(() => {
|
|
|
176932
179436
|
require_entry = __commonJS2({
|
|
176933
179437
|
"node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
176934
179438
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176935
|
-
var utils2 =
|
|
179439
|
+
var utils2 = require_utils32();
|
|
176936
179440
|
var EntryFilter = class {
|
|
176937
179441
|
constructor(_settings, _micromatchOptions) {
|
|
176938
179442
|
this._settings = _settings;
|
|
@@ -177017,7 +179521,7 @@ var init_prettier = __esm(() => {
|
|
|
177017
179521
|
require_error2 = __commonJS2({
|
|
177018
179522
|
"node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
177019
179523
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177020
|
-
var utils2 =
|
|
179524
|
+
var utils2 = require_utils32();
|
|
177021
179525
|
var ErrorFilter = class {
|
|
177022
179526
|
constructor(_settings) {
|
|
177023
179527
|
this._settings = _settings;
|
|
@@ -177035,7 +179539,7 @@ var init_prettier = __esm(() => {
|
|
|
177035
179539
|
require_entry2 = __commonJS2({
|
|
177036
179540
|
"node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
177037
179541
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177038
|
-
var utils2 =
|
|
179542
|
+
var utils2 = require_utils32();
|
|
177039
179543
|
var EntryTransformer = class {
|
|
177040
179544
|
constructor(_settings) {
|
|
177041
179545
|
this._settings = _settings;
|
|
@@ -177303,7 +179807,7 @@ var init_prettier = __esm(() => {
|
|
|
177303
179807
|
var stream_1 = require_stream4();
|
|
177304
179808
|
var sync_1 = require_sync6();
|
|
177305
179809
|
var settings_1 = require_settings4();
|
|
177306
|
-
var utils2 =
|
|
179810
|
+
var utils2 = require_utils32();
|
|
177307
179811
|
async function FastGlob(source2, options8) {
|
|
177308
179812
|
assertPatternsInput(source2);
|
|
177309
179813
|
const works = getWorks(source2, async_1.default, options8);
|
|
@@ -177621,7 +180125,7 @@ var init_prettier = __esm(() => {
|
|
|
177621
180125
|
};
|
|
177622
180126
|
}
|
|
177623
180127
|
});
|
|
177624
|
-
|
|
180128
|
+
require_semver2 = __commonJS2({
|
|
177625
180129
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
177626
180130
|
var debug = require_debug();
|
|
177627
180131
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
|
|
@@ -177891,7 +180395,7 @@ var init_prettier = __esm(() => {
|
|
|
177891
180395
|
});
|
|
177892
180396
|
require_compare = __commonJS2({
|
|
177893
180397
|
"node_modules/semver/functions/compare.js"(exports, module) {
|
|
177894
|
-
var SemVer =
|
|
180398
|
+
var SemVer = require_semver2();
|
|
177895
180399
|
var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
|
|
177896
180400
|
module.exports = compare;
|
|
177897
180401
|
}
|
|
@@ -179624,7 +182128,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
179624
182128
|
};
|
|
179625
182129
|
}
|
|
179626
182130
|
});
|
|
179627
|
-
|
|
182131
|
+
require_src3 = __commonJS2({
|
|
179628
182132
|
"node_modules/editorconfig/src/index.js"(exports) {
|
|
179629
182133
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
179630
182134
|
return new (P9 || (P9 = Promise))(function(resolve3, reject) {
|
|
@@ -181087,7 +183591,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
181087
183591
|
mockable_default = mockable.mocked;
|
|
181088
183592
|
import_micromatch = __toESM2(require_micromatch(), 1);
|
|
181089
183593
|
partition_default = partition2;
|
|
181090
|
-
import_editorconfig = __toESM2(
|
|
183594
|
+
import_editorconfig = __toESM2(require_src3(), 1);
|
|
181091
183595
|
iterate_directory_up_default = iterateDirectoryUp;
|
|
181092
183596
|
FileSearcher = class extends Searcher {
|
|
181093
183597
|
findInDirectory = findFile;
|
|
@@ -183683,7 +186187,7 @@ import { fileURLToPath as fileURLToPath9 } from "url";
|
|
|
183683
186187
|
// package.json
|
|
183684
186188
|
var package_default = {
|
|
183685
186189
|
name: "@eigenpal/cli",
|
|
183686
|
-
version: "0.10.
|
|
186190
|
+
version: "0.10.33",
|
|
183687
186191
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
183688
186192
|
keywords: [
|
|
183689
186193
|
"eigenpal",
|
|
@@ -185198,7 +187702,7 @@ async function pushCurrentBranch(input) {
|
|
|
185198
187702
|
function slugifyPackageSegment(value) {
|
|
185199
187703
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
185200
187704
|
}
|
|
185201
|
-
function packagePathForTemplate(
|
|
187705
|
+
function packagePathForTemplate(template2, name) {
|
|
185202
187706
|
const slug = slugifyPackageSegment(name);
|
|
185203
187707
|
if (!slug)
|
|
185204
187708
|
throw new Error("Package name must include at least one letter or number.");
|
|
@@ -185210,7 +187714,7 @@ function packagePathForTemplate(template, name) {
|
|
|
185210
187714
|
knowledge: "resources/knowledge",
|
|
185211
187715
|
evaluator: "evaluators"
|
|
185212
187716
|
};
|
|
185213
|
-
const root = rootByTemplate[
|
|
187717
|
+
const root = rootByTemplate[template2];
|
|
185214
187718
|
if (!root)
|
|
185215
187719
|
throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
|
|
185216
187720
|
return SourcePackagePathSchema.parse(`${root}/${slug}`);
|
|
@@ -185641,12 +188145,12 @@ function archivePackage(input) {
|
|
|
185641
188145
|
runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
|
|
185642
188146
|
cwd: input.gitRoot
|
|
185643
188147
|
});
|
|
185644
|
-
const
|
|
188148
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
185645
188149
|
cwd: input.outDir,
|
|
185646
188150
|
encoding: "utf8"
|
|
185647
188151
|
});
|
|
185648
|
-
if (
|
|
185649
|
-
throw new Error(
|
|
188152
|
+
if (extract2.status !== 0)
|
|
188153
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
185650
188154
|
} finally {
|
|
185651
188155
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
185652
188156
|
}
|
|
@@ -185675,12 +188179,12 @@ async function tryHostedArchive(input) {
|
|
|
185675
188179
|
const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
|
|
185676
188180
|
try {
|
|
185677
188181
|
writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
|
|
185678
|
-
const
|
|
188182
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
185679
188183
|
cwd: input.outDir,
|
|
185680
188184
|
encoding: "utf8"
|
|
185681
188185
|
});
|
|
185682
|
-
if (
|
|
185683
|
-
throw new Error(
|
|
188186
|
+
if (extract2.status !== 0)
|
|
188187
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
185684
188188
|
return true;
|
|
185685
188189
|
} finally {
|
|
185686
188190
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
@@ -190661,18 +193165,18 @@ async function init(name, opts) {
|
|
|
190661
193165
|
if (existsSync13(target) && readdirSync4(target).length > 0) {
|
|
190662
193166
|
throw new Error(`Target directory ${relative2(process.cwd(), target)} exists and is not empty.`);
|
|
190663
193167
|
}
|
|
190664
|
-
let
|
|
193168
|
+
let template2;
|
|
190665
193169
|
if (opts.template) {
|
|
190666
193170
|
if (!isTemplateName(opts.template)) {
|
|
190667
193171
|
throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
|
|
190668
193172
|
}
|
|
190669
|
-
|
|
193173
|
+
template2 = opts.template;
|
|
190670
193174
|
} else if (opts.yes || !process.stdin.isTTY) {
|
|
190671
|
-
|
|
193175
|
+
template2 = "blank";
|
|
190672
193176
|
} else {
|
|
190673
|
-
|
|
193177
|
+
template2 = await promptForTemplate();
|
|
190674
193178
|
}
|
|
190675
|
-
const sourceRoot = join7(resolveTemplatesRoot(),
|
|
193179
|
+
const sourceRoot = join7(resolveTemplatesRoot(), template2);
|
|
190676
193180
|
if (!existsSync13(sourceRoot)) {
|
|
190677
193181
|
throw new Error(`Template directory missing on disk: ${sourceRoot}`);
|
|
190678
193182
|
}
|