@probelabs/visor 0.1.94 → 0.1.95
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/README.md +4 -4
- package/defaults/.visor.yaml +86 -6
- package/dist/ai-review-service.d.ts +1 -1
- package/dist/ai-review-service.d.ts.map +1 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands.d.ts.map +1 -1
- package/dist/config.d.ts +6 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/defaults/.visor.yaml +86 -6
- package/dist/failure-condition-evaluator.d.ts.map +1 -1
- package/dist/footer.d.ts +25 -0
- package/dist/footer.d.ts.map +1 -0
- package/dist/github-check-service.d.ts.map +1 -1
- package/dist/github-comments.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +926 -476
- package/dist/output/code-review/schema.json +0 -23
- package/dist/reviewer.d.ts +5 -2
- package/dist/reviewer.d.ts.map +1 -1
- package/dist/sdk/{check-execution-engine-YBRPVUWD.mjs → check-execution-engine-NMPXJ7FQ.mjs} +2 -2
- package/dist/sdk/{chunk-DQRFOQAP.mjs → chunk-Q4S5A5TO.mjs} +199 -113
- package/dist/sdk/chunk-Q4S5A5TO.mjs.map +1 -0
- package/dist/sdk/sdk.js +249 -149
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +23 -19
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/traces/{run-2025-10-16T11-33-32-682Z.ndjson → run-2025-10-18T18-27-25-085Z.ndjson} +8 -1
- package/dist/traces/{run-2025-10-16T11-33-43-618Z.ndjson → run-2025-10-18T18-27-35-400Z.ndjson} +8 -1
- package/dist/traces/{run-2025-10-16T11-33-44-157Z.ndjson → run-2025-10-18T18-27-35-937Z.ndjson} +8 -1
- package/dist/traces/{run-2025-10-16T11-33-44-647Z.ndjson → run-2025-10-18T18-27-36-428Z.ndjson} +8 -1
- package/dist/types/cli.d.ts +3 -2
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts +0 -2
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/diff-processor.d.ts +6 -0
- package/dist/utils/diff-processor.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/sdk/chunk-DQRFOQAP.mjs.map +0 -1
- /package/dist/sdk/{check-execution-engine-YBRPVUWD.mjs.map → check-execution-engine-NMPXJ7FQ.mjs.map} +0 -0
- /package/dist/traces/{run-2025-10-16T11-33-45-128Z.ndjson → run-2025-10-18T18-27-36-917Z.ndjson} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
process.env.VISOR_VERSION = '0.1.
|
|
3
|
-
process.env.PROBE_VERSION = '0.6.0-
|
|
2
|
+
process.env.VISOR_VERSION = '0.1.95';
|
|
3
|
+
process.env.PROBE_VERSION = '0.6.0-rc145';
|
|
4
4
|
/******/ (() => { // webpackBootstrap
|
|
5
5
|
/******/ var __webpack_modules__ = ({
|
|
6
6
|
|
|
@@ -218031,6 +218031,7 @@ const probe_1 = __nccwpck_require__(83841);
|
|
|
218031
218031
|
const session_registry_1 = __nccwpck_require__(46059);
|
|
218032
218032
|
const logger_1 = __nccwpck_require__(86999);
|
|
218033
218033
|
const tracer_init_1 = __nccwpck_require__(11903);
|
|
218034
|
+
const diff_processor_1 = __nccwpck_require__(29883);
|
|
218034
218035
|
/**
|
|
218035
218036
|
* Helper function to log debug messages using the centralized logger
|
|
218036
218037
|
*/
|
|
@@ -218083,7 +218084,7 @@ class AIReviewService {
|
|
|
218083
218084
|
/**
|
|
218084
218085
|
* Execute AI review using probe agent
|
|
218085
218086
|
*/
|
|
218086
|
-
async executeReview(prInfo, customPrompt, schema,
|
|
218087
|
+
async executeReview(prInfo, customPrompt, schema, checkName, sessionId) {
|
|
218087
218088
|
const startTime = Date.now();
|
|
218088
218089
|
const timestamp = new Date().toISOString();
|
|
218089
218090
|
// Build prompt from custom instructions
|
|
@@ -218140,7 +218141,7 @@ class AIReviewService {
|
|
|
218140
218141
|
}
|
|
218141
218142
|
}
|
|
218142
218143
|
try {
|
|
218143
|
-
const { response, effectiveSchema } = await this.callProbeAgent(prompt, schema, debugInfo,
|
|
218144
|
+
const { response, effectiveSchema } = await this.callProbeAgent(prompt, schema, debugInfo, checkName, sessionId);
|
|
218144
218145
|
const processingTime = Date.now() - startTime;
|
|
218145
218146
|
if (debugInfo) {
|
|
218146
218147
|
debugInfo.rawResponse = response;
|
|
@@ -218300,10 +218301,10 @@ class AIReviewService {
|
|
|
218300
218301
|
async buildCustomPrompt(prInfo, customInstructions, schema, options) {
|
|
218301
218302
|
// When reusing sessions, skip PR context to avoid sending duplicate diff data
|
|
218302
218303
|
const skipPRContext = options?.skipPRContext === true;
|
|
218303
|
-
const prContext = skipPRContext ? '' : this.formatPRContext(prInfo);
|
|
218304
|
-
const isIssue = prInfo.isIssue === true;
|
|
218305
218304
|
// Check if we're using the code-review schema
|
|
218306
218305
|
const isCodeReviewSchema = schema === 'code-review';
|
|
218306
|
+
const prContext = skipPRContext ? '' : await this.formatPRContext(prInfo, isCodeReviewSchema);
|
|
218307
|
+
const isIssue = prInfo.isIssue === true;
|
|
218307
218308
|
if (isIssue) {
|
|
218308
218309
|
// Issue context - no code analysis needed
|
|
218309
218310
|
if (skipPRContext) {
|
|
@@ -218401,7 +218402,7 @@ ${prContext}
|
|
|
218401
218402
|
/**
|
|
218402
218403
|
* Format PR or Issue context for the AI using XML structure
|
|
218403
218404
|
*/
|
|
218404
|
-
formatPRContext(prInfo) {
|
|
218405
|
+
async formatPRContext(prInfo, isCodeReviewSchema) {
|
|
218405
218406
|
// Check if this is an issue (not a PR)
|
|
218406
218407
|
const prContextInfo = prInfo;
|
|
218407
218408
|
const isIssue = prContextInfo.isIssue === true;
|
|
@@ -218496,9 +218497,14 @@ ${this.escapeXml(prInfo.body)}
|
|
|
218496
218497
|
const issueComments = prInfo.comments;
|
|
218497
218498
|
if (issueComments && issueComments.length > 0) {
|
|
218498
218499
|
// Filter out the triggering comment from history if present
|
|
218499
|
-
|
|
218500
|
+
let historicalComments = triggeringComment
|
|
218500
218501
|
? issueComments.filter(c => c.id !== triggeringComment.id)
|
|
218501
218502
|
: issueComments;
|
|
218503
|
+
// For code-review schema checks, filter out previous Visor code-review comments to avoid self-bias
|
|
218504
|
+
// Comment IDs look like: <!-- visor-comment-id:pr-review-244-review -->
|
|
218505
|
+
if (isCodeReviewSchema) {
|
|
218506
|
+
historicalComments = historicalComments.filter(c => !c.body || !c.body.includes('visor-comment-id:pr-review-'));
|
|
218507
|
+
}
|
|
218502
218508
|
if (historicalComments.length > 0) {
|
|
218503
218509
|
context += `
|
|
218504
218510
|
<!-- Previous comments in chronological order (excluding triggering comment) -->
|
|
@@ -218545,26 +218551,34 @@ ${this.escapeXml(prInfo.body)}
|
|
|
218545
218551
|
if (includeCodeContext) {
|
|
218546
218552
|
// Add full diff if available (for complete PR review)
|
|
218547
218553
|
if (prInfo.fullDiff) {
|
|
218554
|
+
// Process the diff with outline-diff format for better structure
|
|
218555
|
+
const processedFullDiff = await (0, diff_processor_1.processDiffWithOutline)(prInfo.fullDiff);
|
|
218548
218556
|
context += `
|
|
218549
|
-
<!-- Complete unified diff showing all changes in the pull request -->
|
|
218557
|
+
<!-- Complete unified diff showing all changes in the pull request (processed with outline-diff) -->
|
|
218550
218558
|
<full_diff>
|
|
218551
|
-
${this.escapeXml(
|
|
218559
|
+
${this.escapeXml(processedFullDiff)}
|
|
218552
218560
|
</full_diff>`;
|
|
218553
218561
|
}
|
|
218554
218562
|
// Add incremental commit diff if available (for new commit analysis)
|
|
218555
218563
|
if (prInfo.isIncremental) {
|
|
218556
218564
|
if (prInfo.commitDiff && prInfo.commitDiff.length > 0) {
|
|
218565
|
+
// Process the commit diff with outline-diff format for better structure
|
|
218566
|
+
const processedCommitDiff = await (0, diff_processor_1.processDiffWithOutline)(prInfo.commitDiff);
|
|
218557
218567
|
context += `
|
|
218558
|
-
<!-- Diff of only the latest commit for incremental analysis -->
|
|
218568
|
+
<!-- Diff of only the latest commit for incremental analysis (processed with outline-diff) -->
|
|
218559
218569
|
<commit_diff>
|
|
218560
|
-
${this.escapeXml(
|
|
218570
|
+
${this.escapeXml(processedCommitDiff)}
|
|
218561
218571
|
</commit_diff>`;
|
|
218562
218572
|
}
|
|
218563
218573
|
else {
|
|
218574
|
+
// Process the fallback full diff with outline-diff format
|
|
218575
|
+
const processedFallbackDiff = prInfo.fullDiff
|
|
218576
|
+
? await (0, diff_processor_1.processDiffWithOutline)(prInfo.fullDiff)
|
|
218577
|
+
: '';
|
|
218564
218578
|
context += `
|
|
218565
|
-
<!-- Commit diff could not be retrieved - falling back to full diff analysis -->
|
|
218579
|
+
<!-- Commit diff could not be retrieved - falling back to full diff analysis (processed with outline-diff) -->
|
|
218566
218580
|
<commit_diff>
|
|
218567
|
-
${
|
|
218581
|
+
${this.escapeXml(processedFallbackDiff)}
|
|
218568
218582
|
</commit_diff>`;
|
|
218569
218583
|
}
|
|
218570
218584
|
}
|
|
@@ -218606,9 +218620,14 @@ ${prInfo.fullDiff ? this.escapeXml(prInfo.fullDiff) : ''}
|
|
|
218606
218620
|
const prComments = prInfo.comments;
|
|
218607
218621
|
if (prComments && prComments.length > 0) {
|
|
218608
218622
|
// Filter out the triggering comment from history if present
|
|
218609
|
-
|
|
218623
|
+
let historicalComments = triggeringComment
|
|
218610
218624
|
? prComments.filter(c => c.id !== triggeringComment.id)
|
|
218611
218625
|
: prComments;
|
|
218626
|
+
// For code-review schema checks, filter out previous Visor code-review comments to avoid self-bias
|
|
218627
|
+
// Comment IDs look like: <!-- visor-comment-id:pr-review-244-review -->
|
|
218628
|
+
if (isCodeReviewSchema) {
|
|
218629
|
+
historicalComments = historicalComments.filter(c => !c.body || !c.body.includes('visor-comment-id:pr-review-'));
|
|
218630
|
+
}
|
|
218612
218631
|
if (historicalComments.length > 0) {
|
|
218613
218632
|
context += `
|
|
218614
218633
|
<!-- Previous PR comments in chronological order (excluding triggering comment) -->
|
|
@@ -224953,6 +224972,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
224953
224972
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
224954
224973
|
exports.CLI = void 0;
|
|
224955
224974
|
const commander_1 = __nccwpck_require__(18909);
|
|
224975
|
+
const config_1 = __nccwpck_require__(22973);
|
|
224956
224976
|
const fs = __importStar(__nccwpck_require__(79896));
|
|
224957
224977
|
const path = __importStar(__nccwpck_require__(16928));
|
|
224958
224978
|
/**
|
|
@@ -224962,6 +224982,12 @@ class CLI {
|
|
|
224962
224982
|
program;
|
|
224963
224983
|
validChecks = ['performance', 'architecture', 'security', 'style', 'all'];
|
|
224964
224984
|
validOutputs = ['table', 'json', 'markdown', 'sarif'];
|
|
224985
|
+
// Valid events: all core EventTrigger types plus 'all' for CLI-only usage
|
|
224986
|
+
// Reuses VALID_EVENT_TRIGGERS from config.ts as the single source of truth
|
|
224987
|
+
validEvents = [
|
|
224988
|
+
...config_1.VALID_EVENT_TRIGGERS,
|
|
224989
|
+
'all', // CLI-specific: run checks regardless of event triggers
|
|
224990
|
+
];
|
|
224965
224991
|
constructor() {
|
|
224966
224992
|
this.program = new commander_1.Command();
|
|
224967
224993
|
this.setupProgram();
|
|
@@ -225092,6 +225118,8 @@ class CLI {
|
|
|
225092
225118
|
help: options.help,
|
|
225093
225119
|
version: options.version,
|
|
225094
225120
|
codeContext,
|
|
225121
|
+
analyzeBranchDiff: options.analyzeBranchDiff,
|
|
225122
|
+
event: options.event,
|
|
225095
225123
|
};
|
|
225096
225124
|
}
|
|
225097
225125
|
catch (error) {
|
|
@@ -225142,6 +225170,10 @@ class CLI {
|
|
|
225142
225170
|
throw new Error(`Invalid max parallelism value: ${options.maxParallelism}. Max parallelism must be a positive integer (minimum 1).`);
|
|
225143
225171
|
}
|
|
225144
225172
|
}
|
|
225173
|
+
// Validate event type
|
|
225174
|
+
if (options.event && !this.validEvents.includes(options.event)) {
|
|
225175
|
+
throw new Error(`Invalid event type: ${options.event}. Available options: ${this.validEvents.join(', ')}`);
|
|
225176
|
+
}
|
|
225145
225177
|
}
|
|
225146
225178
|
/**
|
|
225147
225179
|
* Get help text
|
|
@@ -225168,6 +225200,7 @@ class CLI {
|
|
|
225168
225200
|
.option('--enable-code-context', 'Force include code diffs in analysis (CLI mode)')
|
|
225169
225201
|
.option('--disable-code-context', 'Force exclude code diffs from analysis (CLI mode)')
|
|
225170
225202
|
.option('--analyze-branch-diff', 'Analyze diff vs base branch when on feature branch (auto-enabled for code-review schemas)')
|
|
225203
|
+
.option('--event <type>', 'Simulate GitHub event (pr_opened, pr_updated, issue_opened, issue_comment, manual, all). Default: auto-detect from schema or "all"')
|
|
225171
225204
|
.option('--mode <mode>', 'Run mode (cli|github-actions). Default: cli')
|
|
225172
225205
|
.addHelpText('after', this.getExamplesText());
|
|
225173
225206
|
// Get the basic help and append examples manually if addHelpText doesn't work
|
|
@@ -225250,13 +225283,14 @@ exports.CLI = CLI;
|
|
|
225250
225283
|
/***/ }),
|
|
225251
225284
|
|
|
225252
225285
|
/***/ 99153:
|
|
225253
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
225286
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
225254
225287
|
|
|
225255
225288
|
"use strict";
|
|
225256
225289
|
|
|
225257
225290
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
225258
225291
|
exports.parseComment = parseComment;
|
|
225259
225292
|
exports.getHelpText = getHelpText;
|
|
225293
|
+
const footer_1 = __nccwpck_require__(6924);
|
|
225260
225294
|
function parseComment(body, supportedCommands) {
|
|
225261
225295
|
const trimmed = body.trim();
|
|
225262
225296
|
if (!trimmed.startsWith('/')) {
|
|
@@ -225302,8 +225336,7 @@ function getHelpText(customCommands) {
|
|
|
225302
225336
|
${commandList}
|
|
225303
225337
|
Commands are case-insensitive and can be used in PR comments.
|
|
225304
225338
|
|
|
225305
|
-
|
|
225306
|
-
*Powered by [Visor](https://probelabs.com/visor) from [Probelabs](https://probelabs.com)*`;
|
|
225339
|
+
${(0, footer_1.generateFooter)()}`;
|
|
225307
225340
|
}
|
|
225308
225341
|
|
|
225309
225342
|
|
|
@@ -225351,7 +225384,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
225351
225384
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
225352
225385
|
};
|
|
225353
225386
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
225354
|
-
exports.ConfigManager = void 0;
|
|
225387
|
+
exports.ConfigManager = exports.VALID_EVENT_TRIGGERS = void 0;
|
|
225355
225388
|
const yaml = __importStar(__nccwpck_require__(74281));
|
|
225356
225389
|
const fs = __importStar(__nccwpck_require__(79896));
|
|
225357
225390
|
const path = __importStar(__nccwpck_require__(16928));
|
|
@@ -225361,6 +225394,20 @@ const config_loader_1 = __nccwpck_require__(73836);
|
|
|
225361
225394
|
const config_merger_1 = __nccwpck_require__(20730);
|
|
225362
225395
|
const ajv_1 = __importDefault(__nccwpck_require__(42463));
|
|
225363
225396
|
const ajv_formats_1 = __importDefault(__nccwpck_require__(82815));
|
|
225397
|
+
/**
|
|
225398
|
+
* Valid event triggers for checks
|
|
225399
|
+
* Exported as a constant to serve as the single source of truth for event validation
|
|
225400
|
+
*/
|
|
225401
|
+
exports.VALID_EVENT_TRIGGERS = [
|
|
225402
|
+
'pr_opened',
|
|
225403
|
+
'pr_updated',
|
|
225404
|
+
'pr_closed',
|
|
225405
|
+
'issue_opened',
|
|
225406
|
+
'issue_comment',
|
|
225407
|
+
'manual',
|
|
225408
|
+
'schedule',
|
|
225409
|
+
'webhook_received',
|
|
225410
|
+
];
|
|
225364
225411
|
/**
|
|
225365
225412
|
* Configuration manager for Visor
|
|
225366
225413
|
*/
|
|
@@ -225372,20 +225419,13 @@ class ConfigManager {
|
|
|
225372
225419
|
'http',
|
|
225373
225420
|
'http_input',
|
|
225374
225421
|
'http_client',
|
|
225422
|
+
'memory',
|
|
225375
225423
|
'noop',
|
|
225376
225424
|
'log',
|
|
225425
|
+
'memory',
|
|
225377
225426
|
'github',
|
|
225378
225427
|
];
|
|
225379
|
-
validEventTriggers = [
|
|
225380
|
-
'pr_opened',
|
|
225381
|
-
'pr_updated',
|
|
225382
|
-
'pr_closed',
|
|
225383
|
-
'issue_opened',
|
|
225384
|
-
'issue_comment',
|
|
225385
|
-
'manual',
|
|
225386
|
-
'schedule',
|
|
225387
|
-
'webhook_received',
|
|
225388
|
-
];
|
|
225428
|
+
validEventTriggers = [...exports.VALID_EVENT_TRIGGERS];
|
|
225389
225429
|
validOutputFormats = ['table', 'json', 'markdown', 'sarif'];
|
|
225390
225430
|
validGroupByOptions = ['check', 'file', 'severity', 'group'];
|
|
225391
225431
|
/**
|
|
@@ -225393,18 +225433,22 @@ class ConfigManager {
|
|
|
225393
225433
|
*/
|
|
225394
225434
|
async loadConfig(configPath, options = {}) {
|
|
225395
225435
|
const { validate = true, mergeDefaults = true, allowedRemotePatterns } = options;
|
|
225436
|
+
// Resolve relative paths to absolute paths based on current working directory
|
|
225437
|
+
const resolvedPath = path.isAbsolute(configPath)
|
|
225438
|
+
? configPath
|
|
225439
|
+
: path.resolve(process.cwd(), configPath);
|
|
225396
225440
|
try {
|
|
225397
|
-
if (!fs.existsSync(
|
|
225398
|
-
throw new Error(`Configuration file not found: ${
|
|
225441
|
+
if (!fs.existsSync(resolvedPath)) {
|
|
225442
|
+
throw new Error(`Configuration file not found: ${resolvedPath}`);
|
|
225399
225443
|
}
|
|
225400
|
-
const configContent = fs.readFileSync(
|
|
225444
|
+
const configContent = fs.readFileSync(resolvedPath, 'utf8');
|
|
225401
225445
|
let parsedConfig;
|
|
225402
225446
|
try {
|
|
225403
225447
|
parsedConfig = yaml.load(configContent);
|
|
225404
225448
|
}
|
|
225405
225449
|
catch (yamlError) {
|
|
225406
225450
|
const errorMessage = yamlError instanceof Error ? yamlError.message : String(yamlError);
|
|
225407
|
-
throw new Error(`Invalid YAML syntax in ${
|
|
225451
|
+
throw new Error(`Invalid YAML syntax in ${resolvedPath}: ${errorMessage}`);
|
|
225408
225452
|
}
|
|
225409
225453
|
if (!parsedConfig || typeof parsedConfig !== 'object') {
|
|
225410
225454
|
throw new Error('Configuration file must contain a valid YAML object');
|
|
@@ -225412,7 +225456,7 @@ class ConfigManager {
|
|
|
225412
225456
|
// Handle extends directive if present
|
|
225413
225457
|
if (parsedConfig.extends) {
|
|
225414
225458
|
const loaderOptions = {
|
|
225415
|
-
baseDir: path.dirname(
|
|
225459
|
+
baseDir: path.dirname(resolvedPath),
|
|
225416
225460
|
allowRemote: this.isRemoteExtendsAllowed(),
|
|
225417
225461
|
maxDepth: 10,
|
|
225418
225462
|
allowedRemotePatterns,
|
|
@@ -225458,12 +225502,12 @@ class ConfigManager {
|
|
|
225458
225502
|
}
|
|
225459
225503
|
// Add more context for generic errors
|
|
225460
225504
|
if (error.message.includes('ENOENT')) {
|
|
225461
|
-
throw new Error(`Configuration file not found: ${
|
|
225505
|
+
throw new Error(`Configuration file not found: ${resolvedPath}`);
|
|
225462
225506
|
}
|
|
225463
225507
|
if (error.message.includes('EPERM')) {
|
|
225464
|
-
throw new Error(`Permission denied reading configuration file: ${
|
|
225508
|
+
throw new Error(`Permission denied reading configuration file: ${resolvedPath}`);
|
|
225465
225509
|
}
|
|
225466
|
-
throw new Error(`Failed to read configuration file ${
|
|
225510
|
+
throw new Error(`Failed to read configuration file ${resolvedPath}: ${error.message}`);
|
|
225467
225511
|
}
|
|
225468
225512
|
throw error;
|
|
225469
225513
|
}
|
|
@@ -226900,11 +226944,6 @@ class FailureConditionEvaluator {
|
|
|
226900
226944
|
return false;
|
|
226901
226945
|
return issues.some(issue => issue.file?.includes(pattern));
|
|
226902
226946
|
};
|
|
226903
|
-
const hasSuggestion = (suggestions, text) => {
|
|
226904
|
-
if (!Array.isArray(suggestions))
|
|
226905
|
-
return false;
|
|
226906
|
-
return suggestions.some(s => s.toLowerCase().includes(text.toLowerCase()));
|
|
226907
|
-
};
|
|
226908
226947
|
// Backward compatibility aliases
|
|
226909
226948
|
const hasIssueWith = hasIssue;
|
|
226910
226949
|
const hasFileWith = hasFileMatching;
|
|
@@ -226919,7 +226958,6 @@ class FailureConditionEvaluator {
|
|
|
226919
226958
|
// Extract context variables
|
|
226920
226959
|
const output = context.output || {};
|
|
226921
226960
|
const issues = output.issues || [];
|
|
226922
|
-
const suggestions = [];
|
|
226923
226961
|
// Backward compatibility: provide metadata for transition period
|
|
226924
226962
|
// TODO: Remove after all configurations are updated
|
|
226925
226963
|
const metadata = context.metadata || {
|
|
@@ -226970,7 +227008,6 @@ class FailureConditionEvaluator {
|
|
|
226970
227008
|
memory: memoryAccessor,
|
|
226971
227009
|
// Legacy compatibility variables
|
|
226972
227010
|
issues,
|
|
226973
|
-
suggestions,
|
|
226974
227011
|
metadata,
|
|
226975
227012
|
criticalIssues,
|
|
226976
227013
|
errorIssues,
|
|
@@ -226999,7 +227036,6 @@ class FailureConditionEvaluator {
|
|
|
226999
227036
|
hasIssue,
|
|
227000
227037
|
countIssues,
|
|
227001
227038
|
hasFileMatching,
|
|
227002
|
-
hasSuggestion,
|
|
227003
227039
|
hasIssueWith,
|
|
227004
227040
|
hasFileWith,
|
|
227005
227041
|
// Permission helpers
|
|
@@ -227283,6 +227319,53 @@ class FailureConditionEvaluator {
|
|
|
227283
227319
|
exports.FailureConditionEvaluator = FailureConditionEvaluator;
|
|
227284
227320
|
|
|
227285
227321
|
|
|
227322
|
+
/***/ }),
|
|
227323
|
+
|
|
227324
|
+
/***/ 6924:
|
|
227325
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
227326
|
+
|
|
227327
|
+
"use strict";
|
|
227328
|
+
|
|
227329
|
+
/**
|
|
227330
|
+
* Centralized footer generation for Visor comments and outputs
|
|
227331
|
+
*/
|
|
227332
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
227333
|
+
exports.generateFooter = generateFooter;
|
|
227334
|
+
exports.hasVisorFooter = hasVisorFooter;
|
|
227335
|
+
/**
|
|
227336
|
+
* Generate a standard Visor footer with branding and optional tip
|
|
227337
|
+
*/
|
|
227338
|
+
function generateFooter(options = {}) {
|
|
227339
|
+
const { includeMetadata, includeSeparator = true } = options;
|
|
227340
|
+
const parts = [];
|
|
227341
|
+
// Add separator
|
|
227342
|
+
if (includeSeparator) {
|
|
227343
|
+
parts.push('---');
|
|
227344
|
+
parts.push('');
|
|
227345
|
+
}
|
|
227346
|
+
// Add branding
|
|
227347
|
+
parts.push('*Powered by [Visor](https://probelabs.com/visor) from [Probelabs](https://probelabs.com)*');
|
|
227348
|
+
// Add metadata if provided
|
|
227349
|
+
if (includeMetadata) {
|
|
227350
|
+
const { lastUpdated, triggeredBy, commitSha } = includeMetadata;
|
|
227351
|
+
const commitInfo = commitSha ? ` | Commit: ${commitSha.substring(0, 7)}` : '';
|
|
227352
|
+
parts.push('');
|
|
227353
|
+
parts.push(`*Last updated: ${lastUpdated} | Triggered by: ${triggeredBy}${commitInfo}*`);
|
|
227354
|
+
}
|
|
227355
|
+
// Add tip
|
|
227356
|
+
parts.push('');
|
|
227357
|
+
parts.push('💡 **TIP:** You can chat with Visor using `/visor ask <your question>`');
|
|
227358
|
+
return parts.join('\n');
|
|
227359
|
+
}
|
|
227360
|
+
/**
|
|
227361
|
+
* Check if a string contains a Visor footer
|
|
227362
|
+
*/
|
|
227363
|
+
function hasVisorFooter(text) {
|
|
227364
|
+
return (text.includes('*Powered by [Visor](https://probelabs.com/visor)') ||
|
|
227365
|
+
text.includes('*Powered by [Visor](https://github.com/probelabs/visor)'));
|
|
227366
|
+
}
|
|
227367
|
+
|
|
227368
|
+
|
|
227286
227369
|
/***/ }),
|
|
227287
227370
|
|
|
227288
227371
|
/***/ 65543:
|
|
@@ -228823,7 +228906,7 @@ exports.GitRepositoryAnalyzer = GitRepositoryAnalyzer;
|
|
|
228823
228906
|
/***/ }),
|
|
228824
228907
|
|
|
228825
228908
|
/***/ 43748:
|
|
228826
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
228909
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
228827
228910
|
|
|
228828
228911
|
"use strict";
|
|
228829
228912
|
|
|
@@ -228832,6 +228915,7 @@ exports.GitRepositoryAnalyzer = GitRepositoryAnalyzer;
|
|
|
228832
228915
|
*/
|
|
228833
228916
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
228834
228917
|
exports.GitHubCheckService = void 0;
|
|
228918
|
+
const footer_1 = __nccwpck_require__(6924);
|
|
228835
228919
|
/**
|
|
228836
228920
|
* Service for managing GitHub Check Runs based on Visor failure conditions
|
|
228837
228921
|
*/
|
|
@@ -229073,9 +229157,7 @@ class GitHubCheckService {
|
|
|
229073
229157
|
}
|
|
229074
229158
|
// Footer
|
|
229075
229159
|
sections.push('');
|
|
229076
|
-
sections.push(
|
|
229077
|
-
sections.push('');
|
|
229078
|
-
sections.push('*Powered by [Visor](https://probelabs.com/visor) from [Probelabs](https://probelabs.com)*');
|
|
229160
|
+
sections.push((0, footer_1.generateFooter)());
|
|
229079
229161
|
return sections.join('\n');
|
|
229080
229162
|
}
|
|
229081
229163
|
/**
|
|
@@ -229286,6 +229368,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
229286
229368
|
exports.CommentManager = void 0;
|
|
229287
229369
|
const uuid_1 = __nccwpck_require__(31914);
|
|
229288
229370
|
const logger_1 = __nccwpck_require__(86999);
|
|
229371
|
+
const footer_1 = __nccwpck_require__(6924);
|
|
229289
229372
|
/**
|
|
229290
229373
|
* Manages GitHub PR comments with dynamic updating capabilities
|
|
229291
229374
|
*/
|
|
@@ -229379,15 +229462,17 @@ class CommentManager {
|
|
|
229379
229462
|
*/
|
|
229380
229463
|
formatCommentWithMetadata(content, metadata) {
|
|
229381
229464
|
const { commentId, lastUpdated, triggeredBy, commitSha } = metadata;
|
|
229382
|
-
const
|
|
229465
|
+
const footer = (0, footer_1.generateFooter)({
|
|
229466
|
+
includeMetadata: {
|
|
229467
|
+
lastUpdated,
|
|
229468
|
+
triggeredBy,
|
|
229469
|
+
commitSha,
|
|
229470
|
+
},
|
|
229471
|
+
});
|
|
229383
229472
|
return `<!-- visor-comment-id:${commentId} -->
|
|
229384
229473
|
${content}
|
|
229385
229474
|
|
|
229386
|
-
|
|
229387
|
-
|
|
229388
|
-
*Powered by [Visor](https://probelabs.com/visor) from [Probelabs](https://probelabs.com)*
|
|
229389
|
-
|
|
229390
|
-
*Last updated: ${lastUpdated} | Triggered by: ${triggeredBy}${commitInfo}*
|
|
229475
|
+
${footer}
|
|
229391
229476
|
<!-- /visor-comment-id:${commentId} -->`;
|
|
229392
229477
|
}
|
|
229393
229478
|
/**
|
|
@@ -229756,6 +229841,7 @@ const reviewer_1 = __nccwpck_require__(532);
|
|
|
229756
229841
|
const config_1 = __nccwpck_require__(22973);
|
|
229757
229842
|
const github_check_service_1 = __nccwpck_require__(43748);
|
|
229758
229843
|
const github_reactions_1 = __nccwpck_require__(67997);
|
|
229844
|
+
const footer_1 = __nccwpck_require__(6924);
|
|
229759
229845
|
/**
|
|
229760
229846
|
* Create an authenticated Octokit instance using either GitHub App or token authentication
|
|
229761
229847
|
*/
|
|
@@ -230333,8 +230419,8 @@ async function handleIssueEvent(octokit, owner, repo, context, inputs, config, c
|
|
|
230333
230419
|
// Only post if there's actual content (not just empty checks)
|
|
230334
230420
|
if (commentBody.trim()) {
|
|
230335
230421
|
// Only add footer if not already present (to avoid duplicates)
|
|
230336
|
-
if (!
|
|
230337
|
-
commentBody += `\n
|
|
230422
|
+
if (!(0, footer_1.hasVisorFooter)(commentBody)) {
|
|
230423
|
+
commentBody += `\n${(0, footer_1.generateFooter)()}`;
|
|
230338
230424
|
}
|
|
230339
230425
|
// Post comment to the issue
|
|
230340
230426
|
await octokit.rest.issues.createComment({
|
|
@@ -230376,9 +230462,7 @@ async function handleIssueComment(octokit, owner, repo, context, inputs, actionC
|
|
|
230376
230462
|
comment.user?.login === 'github-actions[bot]' ||
|
|
230377
230463
|
comment.user?.type === 'Bot';
|
|
230378
230464
|
const hasVisorMarkers = comment.body &&
|
|
230379
|
-
(comment.body.includes('<!-- visor-comment-id:') ||
|
|
230380
|
-
comment.body.includes('*Powered by [Visor](https://probelabs.com/visor)') ||
|
|
230381
|
-
comment.body.includes('*Powered by [Visor](https://github.com/probelabs/visor)'));
|
|
230465
|
+
(comment.body.includes('<!-- visor-comment-id:') || (0, footer_1.hasVisorFooter)(comment.body));
|
|
230382
230466
|
if (isVisorBot || hasVisorMarkers) {
|
|
230383
230467
|
console.log(`✓ Skipping bot's own comment to prevent recursion. Author: ${comment.user?.login}, Type: ${comment.user?.type}, Has markers: ${hasVisorMarkers}`);
|
|
230384
230468
|
return;
|
|
@@ -230454,8 +230538,7 @@ async function handleIssueComment(octokit, owner, repo, context, inputs, actionC
|
|
|
230454
230538
|
`**Additions:** +${statusPrInfo.totalAdditions}\n` +
|
|
230455
230539
|
`**Deletions:** -${statusPrInfo.totalDeletions}\n` +
|
|
230456
230540
|
`**Base:** ${statusPrInfo.base} → **Head:** ${statusPrInfo.head}\n\n` +
|
|
230457
|
-
`\n
|
|
230458
|
-
`*Powered by [Visor](https://probelabs.com/visor) from [Probelabs](https://probelabs.com)*`;
|
|
230541
|
+
`\n${(0, footer_1.generateFooter)()}`;
|
|
230459
230542
|
await octokit.rest.issues.createComment({
|
|
230460
230543
|
owner,
|
|
230461
230544
|
repo,
|
|
@@ -230470,8 +230553,7 @@ async function handleIssueComment(octokit, owner, repo, context, inputs, actionC
|
|
|
230470
230553
|
`**State:** ${issue.state || 'open'}\n` +
|
|
230471
230554
|
`**Comments:** ${issue.comments || 0}\n` +
|
|
230472
230555
|
`**Created:** ${issue.created_at || 'unknown'}\n` +
|
|
230473
|
-
`\n
|
|
230474
|
-
`*Powered by [Visor](https://probelabs.com/visor) from [Probelabs](https://probelabs.com)*`;
|
|
230556
|
+
`\n${(0, footer_1.generateFooter)()}`;
|
|
230475
230557
|
await octokit.rest.issues.createComment({
|
|
230476
230558
|
owner,
|
|
230477
230559
|
repo,
|
|
@@ -230568,7 +230650,7 @@ async function handleIssueComment(octokit, owner, repo, context, inputs, actionC
|
|
|
230568
230650
|
owner,
|
|
230569
230651
|
repo,
|
|
230570
230652
|
issue_number: prNumber,
|
|
230571
|
-
body: `⚠️ No checks are configured to run for ${isPullRequest ? 'PR' : 'issue'} comments with command /${command.type}\n\n
|
|
230653
|
+
body: `⚠️ No checks are configured to run for ${isPullRequest ? 'PR' : 'issue'} comments with command /${command.type}\n\n${(0, footer_1.generateFooter)()}`,
|
|
230572
230654
|
});
|
|
230573
230655
|
return;
|
|
230574
230656
|
}
|
|
@@ -237676,17 +237758,20 @@ class PRReviewer {
|
|
|
237676
237758
|
'Built-in prompts have been removed - all checks must be explicitly configured.');
|
|
237677
237759
|
}
|
|
237678
237760
|
/**
|
|
237679
|
-
* Helper to check if a schema
|
|
237761
|
+
* Helper to check if a schema is comment-generating
|
|
237762
|
+
* Comment-generating schemas include:
|
|
237763
|
+
* - Built-in schemas: code-review, overview, plain, text
|
|
237764
|
+
* - Custom schemas with a "text" field in properties
|
|
237680
237765
|
*/
|
|
237681
|
-
async
|
|
237766
|
+
async isCommentGeneratingSchema(schema) {
|
|
237682
237767
|
try {
|
|
237683
|
-
|
|
237684
|
-
if (typeof schema === '
|
|
237685
|
-
//
|
|
237686
|
-
|
|
237687
|
-
|
|
237688
|
-
|
|
237689
|
-
//
|
|
237768
|
+
// Check for built-in comment-generating schemas
|
|
237769
|
+
if (typeof schema === 'string') {
|
|
237770
|
+
// Well-known comment-generating schemas
|
|
237771
|
+
if (['code-review', 'overview', 'plain', 'text'].includes(schema)) {
|
|
237772
|
+
return true;
|
|
237773
|
+
}
|
|
237774
|
+
// Try to load and check custom string schema
|
|
237690
237775
|
const fs = (__nccwpck_require__(79896).promises);
|
|
237691
237776
|
const path = __nccwpck_require__(16928);
|
|
237692
237777
|
// Sanitize schema name
|
|
@@ -237698,16 +237783,21 @@ class PRReviewer {
|
|
|
237698
237783
|
const schemaPath = __nccwpck_require__.ab + "output/" + sanitizedSchemaName + '/schema.json';
|
|
237699
237784
|
try {
|
|
237700
237785
|
const schemaContent = await fs.readFile(schemaPath, 'utf-8');
|
|
237701
|
-
schemaObj = JSON.parse(schemaContent);
|
|
237786
|
+
const schemaObj = JSON.parse(schemaContent);
|
|
237787
|
+
// Check if schema has a "text" field in properties
|
|
237788
|
+
const properties = schemaObj.properties;
|
|
237789
|
+
return !!(properties && 'text' in properties);
|
|
237702
237790
|
}
|
|
237703
237791
|
catch {
|
|
237704
237792
|
// Schema file not found or invalid, return false
|
|
237705
237793
|
return false;
|
|
237706
237794
|
}
|
|
237707
237795
|
}
|
|
237708
|
-
|
|
237709
|
-
|
|
237710
|
-
|
|
237796
|
+
else {
|
|
237797
|
+
// Inline schema object - check if it has a "text" field in properties
|
|
237798
|
+
const properties = schema.properties;
|
|
237799
|
+
return !!(properties && 'text' in properties);
|
|
237800
|
+
}
|
|
237711
237801
|
}
|
|
237712
237802
|
catch {
|
|
237713
237803
|
return false;
|
|
@@ -237734,19 +237824,9 @@ class PRReviewer {
|
|
|
237734
237824
|
// Other types (github, command, http, etc.) without schema are for orchestration
|
|
237735
237825
|
shouldPostComment = isAICheck;
|
|
237736
237826
|
}
|
|
237737
|
-
else
|
|
237738
|
-
//
|
|
237739
|
-
|
|
237740
|
-
shouldPostComment = true;
|
|
237741
|
-
}
|
|
237742
|
-
else {
|
|
237743
|
-
// Load the schema and check if it has a text field
|
|
237744
|
-
shouldPostComment = await this.schemaHasTextField(schema);
|
|
237745
|
-
}
|
|
237746
|
-
}
|
|
237747
|
-
else if (typeof schema === 'object') {
|
|
237748
|
-
// Custom inline schema object - check if it has a "text" field in properties
|
|
237749
|
-
shouldPostComment = await this.schemaHasTextField(schema);
|
|
237827
|
+
else {
|
|
237828
|
+
// Check if the schema is comment-generating (built-in or custom with text field)
|
|
237829
|
+
shouldPostComment = await this.isCommentGeneratingSchema(schema);
|
|
237750
237830
|
}
|
|
237751
237831
|
if (shouldPostComment) {
|
|
237752
237832
|
filtered.push(r);
|
|
@@ -240148,6 +240228,121 @@ class ConfigMerger {
|
|
|
240148
240228
|
exports.ConfigMerger = ConfigMerger;
|
|
240149
240229
|
|
|
240150
240230
|
|
|
240231
|
+
/***/ }),
|
|
240232
|
+
|
|
240233
|
+
/***/ 29883:
|
|
240234
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
240235
|
+
|
|
240236
|
+
"use strict";
|
|
240237
|
+
|
|
240238
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
240239
|
+
if (k2 === undefined) k2 = k;
|
|
240240
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
240241
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
240242
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
240243
|
+
}
|
|
240244
|
+
Object.defineProperty(o, k2, desc);
|
|
240245
|
+
}) : (function(o, m, k, k2) {
|
|
240246
|
+
if (k2 === undefined) k2 = k;
|
|
240247
|
+
o[k2] = m[k];
|
|
240248
|
+
}));
|
|
240249
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
240250
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
240251
|
+
}) : function(o, v) {
|
|
240252
|
+
o["default"] = v;
|
|
240253
|
+
});
|
|
240254
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
240255
|
+
var ownKeys = function(o) {
|
|
240256
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
240257
|
+
var ar = [];
|
|
240258
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
240259
|
+
return ar;
|
|
240260
|
+
};
|
|
240261
|
+
return ownKeys(o);
|
|
240262
|
+
};
|
|
240263
|
+
return function (mod) {
|
|
240264
|
+
if (mod && mod.__esModule) return mod;
|
|
240265
|
+
var result = {};
|
|
240266
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
240267
|
+
__setModuleDefault(result, mod);
|
|
240268
|
+
return result;
|
|
240269
|
+
};
|
|
240270
|
+
})();
|
|
240271
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
240272
|
+
exports.processDiffWithOutline = processDiffWithOutline;
|
|
240273
|
+
const probe_1 = __nccwpck_require__(83841);
|
|
240274
|
+
const path = __importStar(__nccwpck_require__(16928));
|
|
240275
|
+
/**
|
|
240276
|
+
* Process diff content using the outline-diff format from @probelabs/probe
|
|
240277
|
+
* This extracts a structured outline from the diff without requiring a temporary file
|
|
240278
|
+
*/
|
|
240279
|
+
async function processDiffWithOutline(diffContent) {
|
|
240280
|
+
if (!diffContent || diffContent.trim().length === 0) {
|
|
240281
|
+
return diffContent;
|
|
240282
|
+
}
|
|
240283
|
+
try {
|
|
240284
|
+
// Set PROBE_PATH to use the bundled binary with outline-diff support
|
|
240285
|
+
// The SDK by default may download an older binary that doesn't support outline-diff
|
|
240286
|
+
const originalProbePath = process.env.PROBE_PATH;
|
|
240287
|
+
// Try multiple possible locations for the probe binary
|
|
240288
|
+
// When bundled with ncc, __dirname may not be reliable
|
|
240289
|
+
const fs = __nccwpck_require__(79896);
|
|
240290
|
+
const possiblePaths = [
|
|
240291
|
+
// Relative to current working directory (most common in production)
|
|
240292
|
+
path.join(process.cwd(), 'node_modules/@probelabs/probe/bin/probe-binary'),
|
|
240293
|
+
// Relative to __dirname (for unbundled development)
|
|
240294
|
+
path.join(__dirname, '../..', 'node_modules/@probelabs/probe/bin/probe-binary'),
|
|
240295
|
+
// Relative to dist directory (for bundled CLI)
|
|
240296
|
+
path.join(__dirname, 'node_modules/@probelabs/probe/bin/probe-binary'),
|
|
240297
|
+
];
|
|
240298
|
+
let probeBinaryPath;
|
|
240299
|
+
for (const candidatePath of possiblePaths) {
|
|
240300
|
+
if (fs.existsSync(candidatePath)) {
|
|
240301
|
+
probeBinaryPath = candidatePath;
|
|
240302
|
+
break;
|
|
240303
|
+
}
|
|
240304
|
+
}
|
|
240305
|
+
// Only process if binary exists, otherwise fall back to original diff
|
|
240306
|
+
if (!probeBinaryPath) {
|
|
240307
|
+
if (process.env.DEBUG === '1' || process.env.VERBOSE === '1') {
|
|
240308
|
+
console.error('Probe binary not found. Tried:', possiblePaths);
|
|
240309
|
+
}
|
|
240310
|
+
return diffContent;
|
|
240311
|
+
}
|
|
240312
|
+
process.env.PROBE_PATH = probeBinaryPath;
|
|
240313
|
+
// Use extract with content parameter (can be string or Buffer)
|
|
240314
|
+
// The TypeScript types haven't been updated yet, but the runtime supports it
|
|
240315
|
+
// Add timeout to avoid hanging
|
|
240316
|
+
const extractPromise = probe_1.extract({
|
|
240317
|
+
content: diffContent,
|
|
240318
|
+
format: 'outline-diff',
|
|
240319
|
+
allowTests: true, // Allow test files and test code blocks in extraction results
|
|
240320
|
+
});
|
|
240321
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
240322
|
+
setTimeout(() => reject(new Error('Extract timeout after 30s')), 30000);
|
|
240323
|
+
});
|
|
240324
|
+
const result = await Promise.race([extractPromise, timeoutPromise]);
|
|
240325
|
+
// Restore original PROBE_PATH
|
|
240326
|
+
if (originalProbePath !== undefined) {
|
|
240327
|
+
process.env.PROBE_PATH = originalProbePath;
|
|
240328
|
+
}
|
|
240329
|
+
else {
|
|
240330
|
+
delete process.env.PROBE_PATH;
|
|
240331
|
+
}
|
|
240332
|
+
// Return the processed outline diff
|
|
240333
|
+
return typeof result === 'string' ? result : JSON.stringify(result);
|
|
240334
|
+
}
|
|
240335
|
+
catch (error) {
|
|
240336
|
+
// If outline-diff processing fails, fall back to the original diff
|
|
240337
|
+
// Use console.error instead of console.warn to avoid polluting JSON output
|
|
240338
|
+
if (process.env.DEBUG === '1' || process.env.VERBOSE === '1') {
|
|
240339
|
+
console.error('Failed to process diff with outline-diff format:', error);
|
|
240340
|
+
}
|
|
240341
|
+
return diffContent;
|
|
240342
|
+
}
|
|
240343
|
+
}
|
|
240344
|
+
|
|
240345
|
+
|
|
240151
240346
|
/***/ }),
|
|
240152
240347
|
|
|
240153
240348
|
/***/ 58749:
|
|
@@ -254271,6 +254466,145 @@ var init_directory_resolver = __esm({
|
|
|
254271
254466
|
});
|
|
254272
254467
|
|
|
254273
254468
|
// src/downloader.js
|
|
254469
|
+
async function acquireFileLock(lockPath, version) {
|
|
254470
|
+
const lockData = {
|
|
254471
|
+
version,
|
|
254472
|
+
pid: process.pid,
|
|
254473
|
+
timestamp: Date.now()
|
|
254474
|
+
};
|
|
254475
|
+
try {
|
|
254476
|
+
await import_fs_extra2.default.writeFile(lockPath, JSON.stringify(lockData), { flag: "wx" });
|
|
254477
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254478
|
+
console.log(`Acquired file lock: ${lockPath}`);
|
|
254479
|
+
}
|
|
254480
|
+
return true;
|
|
254481
|
+
} catch (error2) {
|
|
254482
|
+
if (error2.code === "EEXIST") {
|
|
254483
|
+
try {
|
|
254484
|
+
const existingLock = JSON.parse(await import_fs_extra2.default.readFile(lockPath, "utf-8"));
|
|
254485
|
+
const lockAge = Date.now() - existingLock.timestamp;
|
|
254486
|
+
if (lockAge > LOCK_TIMEOUT_MS) {
|
|
254487
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254488
|
+
console.log(`Removing stale lock file (age: ${Math.round(lockAge / 1e3)}s, pid: ${existingLock.pid})`);
|
|
254489
|
+
}
|
|
254490
|
+
await import_fs_extra2.default.remove(lockPath);
|
|
254491
|
+
return false;
|
|
254492
|
+
}
|
|
254493
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254494
|
+
console.log(`Download in progress by process ${existingLock.pid}, waiting...`);
|
|
254495
|
+
}
|
|
254496
|
+
return false;
|
|
254497
|
+
} catch (readError) {
|
|
254498
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254499
|
+
console.log(`Lock file corrupted, removing: ${readError.message}`);
|
|
254500
|
+
}
|
|
254501
|
+
try {
|
|
254502
|
+
await import_fs_extra2.default.remove(lockPath);
|
|
254503
|
+
} catch {
|
|
254504
|
+
}
|
|
254505
|
+
return false;
|
|
254506
|
+
}
|
|
254507
|
+
}
|
|
254508
|
+
if (error2.code === "EACCES" || error2.code === "EPERM" || error2.code === "EROFS") {
|
|
254509
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254510
|
+
console.log(`Cannot create lock file (${error2.code}): ${lockPath}`);
|
|
254511
|
+
console.log(`File-based locking unavailable, will proceed without cross-process coordination`);
|
|
254512
|
+
}
|
|
254513
|
+
return null;
|
|
254514
|
+
}
|
|
254515
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254516
|
+
console.log(`Unexpected error creating lock file: ${error2.message}`);
|
|
254517
|
+
console.log(`Proceeding without file-based lock`);
|
|
254518
|
+
}
|
|
254519
|
+
return null;
|
|
254520
|
+
}
|
|
254521
|
+
}
|
|
254522
|
+
async function releaseFileLock(lockPath) {
|
|
254523
|
+
try {
|
|
254524
|
+
await import_fs_extra2.default.remove(lockPath);
|
|
254525
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254526
|
+
console.log(`Released file lock: ${lockPath}`);
|
|
254527
|
+
}
|
|
254528
|
+
} catch (error2) {
|
|
254529
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254530
|
+
console.log(`Warning: Could not release lock file: ${error2.message}`);
|
|
254531
|
+
}
|
|
254532
|
+
}
|
|
254533
|
+
}
|
|
254534
|
+
async function waitForFileLock(lockPath, binaryPath) {
|
|
254535
|
+
const startTime = Date.now();
|
|
254536
|
+
while (Date.now() - startTime < MAX_LOCK_WAIT_MS) {
|
|
254537
|
+
if (await import_fs_extra2.default.pathExists(binaryPath)) {
|
|
254538
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254539
|
+
console.log(`Binary now available at ${binaryPath}, download completed by another process`);
|
|
254540
|
+
}
|
|
254541
|
+
return true;
|
|
254542
|
+
}
|
|
254543
|
+
const lockExists = await import_fs_extra2.default.pathExists(lockPath);
|
|
254544
|
+
if (!lockExists) {
|
|
254545
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254546
|
+
console.log(`Lock file removed but binary not found - download may have failed`);
|
|
254547
|
+
}
|
|
254548
|
+
return false;
|
|
254549
|
+
}
|
|
254550
|
+
try {
|
|
254551
|
+
const lockData = JSON.parse(await import_fs_extra2.default.readFile(lockPath, "utf-8"));
|
|
254552
|
+
const lockAge = Date.now() - lockData.timestamp;
|
|
254553
|
+
if (lockAge > LOCK_TIMEOUT_MS) {
|
|
254554
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254555
|
+
console.log(`Lock expired (age: ${Math.round(lockAge / 1e3)}s), will retry download`);
|
|
254556
|
+
}
|
|
254557
|
+
return false;
|
|
254558
|
+
}
|
|
254559
|
+
} catch {
|
|
254560
|
+
}
|
|
254561
|
+
await new Promise((resolve4) => setTimeout(resolve4, LOCK_POLL_INTERVAL_MS));
|
|
254562
|
+
}
|
|
254563
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254564
|
+
console.log(`Timeout waiting for file lock`);
|
|
254565
|
+
}
|
|
254566
|
+
return false;
|
|
254567
|
+
}
|
|
254568
|
+
async function withDownloadLock(version, downloadFn) {
|
|
254569
|
+
const lockKey = version || "latest";
|
|
254570
|
+
if (downloadLocks.has(lockKey)) {
|
|
254571
|
+
const lock = downloadLocks.get(lockKey);
|
|
254572
|
+
const lockAge = Date.now() - lock.timestamp;
|
|
254573
|
+
if (lockAge > LOCK_TIMEOUT_MS) {
|
|
254574
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254575
|
+
console.log(`In-memory lock for version ${lockKey} expired (age: ${Math.round(lockAge / 1e3)}s), removing stale lock`);
|
|
254576
|
+
}
|
|
254577
|
+
downloadLocks.delete(lockKey);
|
|
254578
|
+
} else {
|
|
254579
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254580
|
+
console.log(`Download already in progress in this process for version ${lockKey}, waiting...`);
|
|
254581
|
+
}
|
|
254582
|
+
try {
|
|
254583
|
+
return await lock.promise;
|
|
254584
|
+
} catch (error2) {
|
|
254585
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254586
|
+
console.log(`In-memory locked download failed, will retry: ${error2.message}`);
|
|
254587
|
+
}
|
|
254588
|
+
}
|
|
254589
|
+
}
|
|
254590
|
+
}
|
|
254591
|
+
const downloadPromise = Promise.race([
|
|
254592
|
+
downloadFn(),
|
|
254593
|
+
new Promise(
|
|
254594
|
+
(_2, reject2) => setTimeout(() => reject2(new Error(`Download timeout after ${LOCK_TIMEOUT_MS / 1e3}s`)), LOCK_TIMEOUT_MS)
|
|
254595
|
+
)
|
|
254596
|
+
]);
|
|
254597
|
+
downloadLocks.set(lockKey, {
|
|
254598
|
+
promise: downloadPromise,
|
|
254599
|
+
timestamp: Date.now()
|
|
254600
|
+
});
|
|
254601
|
+
try {
|
|
254602
|
+
const result = await downloadPromise;
|
|
254603
|
+
return result;
|
|
254604
|
+
} finally {
|
|
254605
|
+
downloadLocks.delete(lockKey);
|
|
254606
|
+
}
|
|
254607
|
+
}
|
|
254274
254608
|
function detectOsArch() {
|
|
254275
254609
|
const osType = import_os2.default.platform();
|
|
254276
254610
|
const archType = import_os2.default.arch();
|
|
@@ -254714,16 +255048,64 @@ async function getPackageVersion() {
|
|
|
254714
255048
|
return "0.0.0";
|
|
254715
255049
|
}
|
|
254716
255050
|
}
|
|
255051
|
+
async function doDownload(version) {
|
|
255052
|
+
const localDir = await getPackageBinDir();
|
|
255053
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
255054
|
+
console.log(`Downloading probe binary (version: ${version || "latest"})...`);
|
|
255055
|
+
console.log(`Using binary directory: ${localDir}`);
|
|
255056
|
+
}
|
|
255057
|
+
const isWindows = import_os2.default.platform() === "win32";
|
|
255058
|
+
const binaryName = isWindows ? `${BINARY_NAME}.exe` : `${BINARY_NAME}-binary`;
|
|
255059
|
+
const binaryPath = import_path2.default.join(localDir, binaryName);
|
|
255060
|
+
const { os: osInfo, arch: archInfo } = detectOsArch();
|
|
255061
|
+
let versionToUse = version;
|
|
255062
|
+
let bestAsset;
|
|
255063
|
+
let tagVersion;
|
|
255064
|
+
if (!versionToUse || versionToUse === "0.0.0") {
|
|
255065
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
255066
|
+
console.log("No specific version requested, will use the latest release");
|
|
255067
|
+
}
|
|
255068
|
+
const { tag: tag2, assets } = await getLatestRelease(void 0);
|
|
255069
|
+
tagVersion = tag2.startsWith("v") ? tag2.substring(1) : tag2;
|
|
255070
|
+
bestAsset = findBestAsset(assets, osInfo, archInfo);
|
|
255071
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
255072
|
+
console.log(`Found release version: ${tagVersion}`);
|
|
255073
|
+
}
|
|
255074
|
+
} else {
|
|
255075
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
255076
|
+
console.log(`Direct download for version: ${versionToUse}`);
|
|
255077
|
+
}
|
|
255078
|
+
tagVersion = versionToUse;
|
|
255079
|
+
bestAsset = constructAssetInfo(versionToUse, osInfo, archInfo);
|
|
255080
|
+
}
|
|
255081
|
+
const { assetPath, checksumPath } = await downloadAsset(bestAsset, localDir);
|
|
255082
|
+
const checksumValid = await verifyChecksum(assetPath, checksumPath);
|
|
255083
|
+
if (!checksumValid) {
|
|
255084
|
+
throw new Error("Checksum verification failed");
|
|
255085
|
+
}
|
|
255086
|
+
const extractedBinaryPath = await extractBinary(assetPath, localDir);
|
|
255087
|
+
await saveVersionInfo(tagVersion, localDir);
|
|
255088
|
+
try {
|
|
255089
|
+
await import_fs_extra2.default.remove(assetPath);
|
|
255090
|
+
if (checksumPath) {
|
|
255091
|
+
await import_fs_extra2.default.remove(checksumPath);
|
|
255092
|
+
}
|
|
255093
|
+
} catch (err) {
|
|
255094
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
255095
|
+
console.log(`Warning: Could not clean up temporary files: ${err}`);
|
|
255096
|
+
}
|
|
255097
|
+
}
|
|
255098
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
255099
|
+
console.log(`Binary successfully installed at ${extractedBinaryPath} (version: ${tagVersion})`);
|
|
255100
|
+
}
|
|
255101
|
+
return extractedBinaryPath;
|
|
255102
|
+
}
|
|
254717
255103
|
async function downloadProbeBinary(version) {
|
|
254718
255104
|
try {
|
|
254719
255105
|
const localDir = await getPackageBinDir();
|
|
254720
255106
|
if (!version || version === "0.0.0") {
|
|
254721
255107
|
version = await getPackageVersion();
|
|
254722
255108
|
}
|
|
254723
|
-
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254724
|
-
console.log(`Downloading probe binary (version: ${version || "latest"})...`);
|
|
254725
|
-
console.log(`Using binary directory: ${localDir}`);
|
|
254726
|
-
}
|
|
254727
255109
|
const isWindows = import_os2.default.platform() === "win32";
|
|
254728
255110
|
const binaryName = isWindows ? `${BINARY_NAME}.exe` : `${BINARY_NAME}-binary`;
|
|
254729
255111
|
const binaryPath = import_path2.default.join(localDir, binaryName);
|
|
@@ -254739,54 +255121,44 @@ async function downloadProbeBinary(version) {
|
|
|
254739
255121
|
console.log(`Existing binary version (${versionInfo?.version || "unknown"}) doesn't match requested version (${version}). Downloading new version...`);
|
|
254740
255122
|
}
|
|
254741
255123
|
}
|
|
254742
|
-
const
|
|
254743
|
-
|
|
254744
|
-
let
|
|
254745
|
-
|
|
254746
|
-
|
|
254747
|
-
|
|
254748
|
-
|
|
254749
|
-
|
|
254750
|
-
|
|
254751
|
-
|
|
254752
|
-
|
|
254753
|
-
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254754
|
-
console.log(`Found release version: ${tagVersion}`);
|
|
255124
|
+
const lockPath = import_path2.default.join(localDir, `.probe-download-${version}.lock`);
|
|
255125
|
+
const maxRetries = 3;
|
|
255126
|
+
for (let retry = 0; retry < maxRetries; retry++) {
|
|
255127
|
+
const lockAcquired = await acquireFileLock(lockPath, version);
|
|
255128
|
+
if (lockAcquired === true) {
|
|
255129
|
+
try {
|
|
255130
|
+
const result = await withDownloadLock(version, () => doDownload(version));
|
|
255131
|
+
return result;
|
|
255132
|
+
} finally {
|
|
255133
|
+
await releaseFileLock(lockPath);
|
|
255134
|
+
}
|
|
254755
255135
|
}
|
|
254756
|
-
|
|
254757
|
-
|
|
254758
|
-
|
|
255136
|
+
if (lockAcquired === null) {
|
|
255137
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
255138
|
+
console.log(`File-based locking unavailable, downloading without cross-process coordination`);
|
|
255139
|
+
}
|
|
255140
|
+
return await withDownloadLock(version, () => doDownload(version));
|
|
254759
255141
|
}
|
|
254760
|
-
|
|
254761
|
-
|
|
254762
|
-
|
|
254763
|
-
const { assetPath, checksumPath } = await downloadAsset(bestAsset, localDir);
|
|
254764
|
-
const checksumValid = await verifyChecksum(assetPath, checksumPath);
|
|
254765
|
-
if (!checksumValid) {
|
|
254766
|
-
throw new Error("Checksum verification failed");
|
|
254767
|
-
}
|
|
254768
|
-
const extractedBinaryPath = await extractBinary(assetPath, localDir);
|
|
254769
|
-
await saveVersionInfo(tagVersion, localDir);
|
|
254770
|
-
try {
|
|
254771
|
-
await import_fs_extra2.default.remove(assetPath);
|
|
254772
|
-
if (checksumPath) {
|
|
254773
|
-
await import_fs_extra2.default.remove(checksumPath);
|
|
255142
|
+
const downloadCompleted = await waitForFileLock(lockPath, binaryPath);
|
|
255143
|
+
if (downloadCompleted) {
|
|
255144
|
+
return binaryPath;
|
|
254774
255145
|
}
|
|
254775
|
-
|
|
254776
|
-
|
|
254777
|
-
|
|
255146
|
+
if (retry < maxRetries - 1) {
|
|
255147
|
+
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
255148
|
+
console.log(`Retrying download (attempt ${retry + 2}/${maxRetries})...`);
|
|
255149
|
+
}
|
|
254778
255150
|
}
|
|
254779
255151
|
}
|
|
254780
255152
|
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
254781
|
-
console.log(`
|
|
255153
|
+
console.log(`All lock attempts exhausted, attempting direct download`);
|
|
254782
255154
|
}
|
|
254783
|
-
return
|
|
255155
|
+
return await withDownloadLock(version, () => doDownload(version));
|
|
254784
255156
|
} catch (error2) {
|
|
254785
255157
|
console.error("Error downloading probe binary:", error2);
|
|
254786
255158
|
throw error2;
|
|
254787
255159
|
}
|
|
254788
255160
|
}
|
|
254789
|
-
var import_axios, import_fs_extra2, import_path2, import_crypto, import_util, import_child_process, import_tar, import_os2, import_url2, exec, REPO_OWNER, REPO_NAME, BINARY_NAME, __filename2, __dirname2;
|
|
255161
|
+
var import_axios, import_fs_extra2, import_path2, import_crypto, import_util, import_child_process, import_tar, import_os2, import_url2, exec, REPO_OWNER, REPO_NAME, BINARY_NAME, __filename2, __dirname2, downloadLocks, LOCK_TIMEOUT_MS, LOCK_POLL_INTERVAL_MS, MAX_LOCK_WAIT_MS;
|
|
254790
255162
|
var init_downloader = __esm({
|
|
254791
255163
|
"src/downloader.js"() {
|
|
254792
255164
|
"use strict";
|
|
@@ -254807,19 +255179,25 @@ var init_downloader = __esm({
|
|
|
254807
255179
|
BINARY_NAME = "probe";
|
|
254808
255180
|
__filename2 = (0, import_url2.fileURLToPath)("file:///");
|
|
254809
255181
|
__dirname2 = import_path2.default.dirname(__filename2);
|
|
255182
|
+
downloadLocks = /* @__PURE__ */ new Map();
|
|
255183
|
+
LOCK_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
255184
|
+
LOCK_POLL_INTERVAL_MS = 1e3;
|
|
255185
|
+
MAX_LOCK_WAIT_MS = 5 * 60 * 1e3;
|
|
254810
255186
|
}
|
|
254811
255187
|
});
|
|
254812
255188
|
|
|
254813
255189
|
// src/utils.js
|
|
254814
255190
|
async function getBinaryPath(options = {}) {
|
|
254815
255191
|
const { forceDownload = false, version } = options;
|
|
254816
|
-
if (probeBinaryPath && !forceDownload && import_fs_extra3.default.existsSync(probeBinaryPath)) {
|
|
254817
|
-
return probeBinaryPath;
|
|
254818
|
-
}
|
|
254819
255192
|
if (process.env.PROBE_PATH && import_fs_extra3.default.existsSync(process.env.PROBE_PATH) && !forceDownload) {
|
|
254820
255193
|
probeBinaryPath = process.env.PROBE_PATH;
|
|
254821
255194
|
return probeBinaryPath;
|
|
254822
255195
|
}
|
|
255196
|
+
if (version && !forceDownload) {
|
|
255197
|
+
console.log(`Specific version ${version} requested. Downloading...`);
|
|
255198
|
+
probeBinaryPath = await downloadProbeBinary(version);
|
|
255199
|
+
return probeBinaryPath;
|
|
255200
|
+
}
|
|
254823
255201
|
const binDir = await getPackageBinDir();
|
|
254824
255202
|
const isWindows = process.platform === "win32";
|
|
254825
255203
|
const binaryName = isWindows ? "probe.exe" : "probe-binary";
|
|
@@ -254931,17 +255309,20 @@ Search: query="${queries[0]}" path="${options.path}"`;
|
|
|
254931
255309
|
if (options.session) logMessage += ` session=${options.session}`;
|
|
254932
255310
|
console.error(logMessage);
|
|
254933
255311
|
}
|
|
254934
|
-
const
|
|
255312
|
+
const args = ["search", ...cliArgs];
|
|
254935
255313
|
if (queries.length > 0) {
|
|
254936
|
-
|
|
255314
|
+
args.push(queries[0]);
|
|
255315
|
+
}
|
|
255316
|
+
args.push(options.path);
|
|
255317
|
+
if (process.env.DEBUG === "1") {
|
|
255318
|
+
console.error(`Executing: ${binaryPath} ${args.join(" ")}`);
|
|
254937
255319
|
}
|
|
254938
|
-
positionalArgs.push(escapeString(options.path));
|
|
254939
|
-
const command = `${binaryPath} search ${cliArgs.join(" ")} ${positionalArgs.join(" ")}`;
|
|
254940
255320
|
try {
|
|
254941
|
-
const { stdout, stderr } = await
|
|
254942
|
-
|
|
254943
|
-
timeout: options.timeout * 1e3
|
|
255321
|
+
const { stdout, stderr } = await execFileAsync(binaryPath, args, {
|
|
255322
|
+
timeout: options.timeout * 1e3,
|
|
254944
255323
|
// Convert seconds to milliseconds
|
|
255324
|
+
maxBuffer: 50 * 1024 * 1024
|
|
255325
|
+
// 50MB buffer for large outputs
|
|
254945
255326
|
});
|
|
254946
255327
|
if (stderr && process.env.DEBUG) {
|
|
254947
255328
|
console.error(`stderr: ${stderr}`);
|
|
@@ -254990,23 +255371,25 @@ Search results: ${resultCount} matches, ${tokenCount} tokens`;
|
|
|
254990
255371
|
} catch (error2) {
|
|
254991
255372
|
if (error2.code === "ETIMEDOUT" || error2.killed) {
|
|
254992
255373
|
const timeoutMessage = `Search operation timed out after ${options.timeout} seconds.
|
|
254993
|
-
|
|
255374
|
+
Binary: ${binaryPath}
|
|
255375
|
+
Args: ${args.join(" ")}`;
|
|
254994
255376
|
console.error(timeoutMessage);
|
|
254995
255377
|
throw new Error(timeoutMessage);
|
|
254996
255378
|
}
|
|
254997
255379
|
const errorMessage = `Error executing search command: ${error2.message}
|
|
254998
|
-
|
|
255380
|
+
Binary: ${binaryPath}
|
|
255381
|
+
Args: ${args.join(" ")}`;
|
|
254999
255382
|
throw new Error(errorMessage);
|
|
255000
255383
|
}
|
|
255001
255384
|
}
|
|
255002
|
-
var import_child_process2, import_util2,
|
|
255385
|
+
var import_child_process2, import_util2, execFileAsync, SEARCH_FLAG_MAP;
|
|
255003
255386
|
var init_search = __esm({
|
|
255004
255387
|
"src/search.js"() {
|
|
255005
255388
|
"use strict";
|
|
255006
255389
|
import_child_process2 = __nccwpck_require__(35317);
|
|
255007
255390
|
import_util2 = __nccwpck_require__(39023);
|
|
255008
255391
|
init_utils();
|
|
255009
|
-
|
|
255392
|
+
execFileAsync = (0, import_util2.promisify)(import_child_process2.execFile);
|
|
255010
255393
|
SEARCH_FLAG_MAP = {
|
|
255011
255394
|
filesOnly: "--files-only",
|
|
255012
255395
|
ignore: "--ignore",
|
|
@@ -255014,6 +255397,7 @@ var init_search = __esm({
|
|
|
255014
255397
|
reranker: "--reranker",
|
|
255015
255398
|
frequencySearch: "--frequency",
|
|
255016
255399
|
exact: "--exact",
|
|
255400
|
+
strictElasticSyntax: "--strict-elastic-syntax",
|
|
255017
255401
|
maxResults: "--max-results",
|
|
255018
255402
|
maxBytes: "--max-bytes",
|
|
255019
255403
|
maxTokens: "--max-tokens",
|
|
@@ -255051,7 +255435,7 @@ async function query(options) {
|
|
|
255051
255435
|
}
|
|
255052
255436
|
const command = `${binaryPath} query ${cliArgs.join(" ")}`;
|
|
255053
255437
|
try {
|
|
255054
|
-
const { stdout, stderr } = await
|
|
255438
|
+
const { stdout, stderr } = await execAsync(command);
|
|
255055
255439
|
if (stderr) {
|
|
255056
255440
|
console.error(`stderr: ${stderr}`);
|
|
255057
255441
|
}
|
|
@@ -255080,14 +255464,14 @@ Command: ${command}`;
|
|
|
255080
255464
|
throw new Error(errorMessage);
|
|
255081
255465
|
}
|
|
255082
255466
|
}
|
|
255083
|
-
var import_child_process3, import_util3,
|
|
255467
|
+
var import_child_process3, import_util3, execAsync, QUERY_FLAG_MAP;
|
|
255084
255468
|
var init_query = __esm({
|
|
255085
255469
|
"src/query.js"() {
|
|
255086
255470
|
"use strict";
|
|
255087
255471
|
import_child_process3 = __nccwpck_require__(35317);
|
|
255088
255472
|
import_util3 = __nccwpck_require__(39023);
|
|
255089
255473
|
init_utils();
|
|
255090
|
-
|
|
255474
|
+
execAsync = (0, import_util3.promisify)(import_child_process3.exec);
|
|
255091
255475
|
QUERY_FLAG_MAP = {
|
|
255092
255476
|
language: "--language",
|
|
255093
255477
|
ignore: "--ignore",
|
|
@@ -255103,15 +255487,20 @@ async function extract(options) {
|
|
|
255103
255487
|
if (!options) {
|
|
255104
255488
|
throw new Error("Options object is required");
|
|
255105
255489
|
}
|
|
255106
|
-
|
|
255107
|
-
|
|
255490
|
+
const hasFiles = options.files && Array.isArray(options.files) && options.files.length > 0;
|
|
255491
|
+
const hasInputFile = !!options.inputFile;
|
|
255492
|
+
const hasContent = options.content !== void 0 && options.content !== null;
|
|
255493
|
+
if (!hasFiles && !hasInputFile && !hasContent) {
|
|
255494
|
+
throw new Error("Either files array, inputFile, or content must be provided");
|
|
255108
255495
|
}
|
|
255109
255496
|
const binaryPath = await getBinaryPath(options.binaryOptions || {});
|
|
255110
|
-
const
|
|
255497
|
+
const filteredOptions = { ...options };
|
|
255498
|
+
delete filteredOptions.content;
|
|
255499
|
+
const cliArgs = buildCliArgs(filteredOptions, EXTRACT_FLAG_MAP);
|
|
255111
255500
|
if (options.json && !options.format) {
|
|
255112
255501
|
cliArgs.push("--format", "json");
|
|
255113
255502
|
}
|
|
255114
|
-
if (
|
|
255503
|
+
if (hasFiles) {
|
|
255115
255504
|
for (const file of options.files) {
|
|
255116
255505
|
cliArgs.push(escapeString(file));
|
|
255117
255506
|
}
|
|
@@ -255123,75 +255512,124 @@ Extract:`;
|
|
|
255123
255512
|
logMessage += ` files="${options.files.join(", ")}"`;
|
|
255124
255513
|
}
|
|
255125
255514
|
if (options.inputFile) logMessage += ` inputFile="${options.inputFile}"`;
|
|
255515
|
+
if (options.content) logMessage += ` content=(${typeof options.content === "string" ? options.content.length : options.content.byteLength} bytes)`;
|
|
255126
255516
|
if (options.allowTests) logMessage += " allowTests=true";
|
|
255127
255517
|
if (options.contextLines) logMessage += ` contextLines=${options.contextLines}`;
|
|
255128
255518
|
if (options.format) logMessage += ` format=${options.format}`;
|
|
255129
255519
|
if (options.json) logMessage += " json=true";
|
|
255130
255520
|
console.error(logMessage);
|
|
255131
255521
|
}
|
|
255522
|
+
if (hasContent) {
|
|
255523
|
+
return extractWithStdin(binaryPath, cliArgs, options.content, options);
|
|
255524
|
+
}
|
|
255132
255525
|
const command = `${binaryPath} extract ${cliArgs.join(" ")}`;
|
|
255133
255526
|
try {
|
|
255134
|
-
const { stdout, stderr } = await
|
|
255527
|
+
const { stdout, stderr } = await execAsync2(command);
|
|
255135
255528
|
if (stderr) {
|
|
255136
255529
|
console.error(`stderr: ${stderr}`);
|
|
255137
255530
|
}
|
|
255138
|
-
|
|
255139
|
-
|
|
255140
|
-
|
|
255141
|
-
|
|
255142
|
-
|
|
255143
|
-
|
|
255144
|
-
|
|
255145
|
-
|
|
255146
|
-
|
|
255147
|
-
|
|
255148
|
-
|
|
255149
|
-
|
|
255150
|
-
|
|
255151
|
-
|
|
255152
|
-
|
|
255531
|
+
return processExtractOutput(stdout, options);
|
|
255532
|
+
} catch (error2) {
|
|
255533
|
+
const errorMessage = `Error executing extract command: ${error2.message}
|
|
255534
|
+
Command: ${command}`;
|
|
255535
|
+
throw new Error(errorMessage);
|
|
255536
|
+
}
|
|
255537
|
+
}
|
|
255538
|
+
function extractWithStdin(binaryPath, cliArgs, content, options) {
|
|
255539
|
+
return new Promise((resolve4, reject2) => {
|
|
255540
|
+
const childProcess = (0, import_child_process4.spawn)(binaryPath, ["extract", ...cliArgs], {
|
|
255541
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
255542
|
+
});
|
|
255543
|
+
let stdout = "";
|
|
255544
|
+
let stderr = "";
|
|
255545
|
+
childProcess.stdout.on("data", (data2) => {
|
|
255546
|
+
stdout += data2.toString();
|
|
255547
|
+
});
|
|
255548
|
+
childProcess.stderr.on("data", (data2) => {
|
|
255549
|
+
stderr += data2.toString();
|
|
255550
|
+
});
|
|
255551
|
+
childProcess.on("close", (code) => {
|
|
255552
|
+
if (stderr && process.env.DEBUG === "1") {
|
|
255553
|
+
console.error(`stderr: ${stderr}`);
|
|
255554
|
+
}
|
|
255555
|
+
if (code !== 0) {
|
|
255556
|
+
reject2(new Error(`Extract command failed with exit code ${code}: ${stderr}`));
|
|
255557
|
+
return;
|
|
255558
|
+
}
|
|
255559
|
+
try {
|
|
255560
|
+
const result = processExtractOutput(stdout, options);
|
|
255561
|
+
resolve4(result);
|
|
255562
|
+
} catch (error2) {
|
|
255563
|
+
reject2(error2);
|
|
255153
255564
|
}
|
|
255565
|
+
});
|
|
255566
|
+
childProcess.on("error", (error2) => {
|
|
255567
|
+
reject2(new Error(`Failed to spawn extract process: ${error2.message}`));
|
|
255568
|
+
});
|
|
255569
|
+
if (typeof content === "string") {
|
|
255570
|
+
childProcess.stdin.write(content);
|
|
255571
|
+
} else {
|
|
255572
|
+
childProcess.stdin.write(content);
|
|
255154
255573
|
}
|
|
255155
|
-
|
|
255156
|
-
|
|
255157
|
-
|
|
255574
|
+
childProcess.stdin.end();
|
|
255575
|
+
});
|
|
255576
|
+
}
|
|
255577
|
+
function processExtractOutput(stdout, options) {
|
|
255578
|
+
let tokenUsage = {
|
|
255579
|
+
requestTokens: 0,
|
|
255580
|
+
responseTokens: 0,
|
|
255581
|
+
totalTokens: 0
|
|
255582
|
+
};
|
|
255583
|
+
if (options.files && Array.isArray(options.files)) {
|
|
255584
|
+
tokenUsage.requestTokens = options.files.join(" ").length / 4;
|
|
255585
|
+
} else if (options.inputFile) {
|
|
255586
|
+
tokenUsage.requestTokens = options.inputFile.length / 4;
|
|
255587
|
+
} else if (options.content) {
|
|
255588
|
+
const contentLength = typeof options.content === "string" ? options.content.length : options.content.byteLength;
|
|
255589
|
+
tokenUsage.requestTokens = contentLength / 4;
|
|
255590
|
+
}
|
|
255591
|
+
if (stdout.includes("Total tokens returned:")) {
|
|
255592
|
+
const tokenMatch = stdout.match(/Total tokens returned: (\d+)/);
|
|
255593
|
+
if (tokenMatch && tokenMatch[1]) {
|
|
255594
|
+
tokenUsage.responseTokens = parseInt(tokenMatch[1], 10);
|
|
255595
|
+
tokenUsage.totalTokens = tokenUsage.requestTokens + tokenUsage.responseTokens;
|
|
255596
|
+
}
|
|
255597
|
+
}
|
|
255598
|
+
let output = stdout;
|
|
255599
|
+
if (!output.includes("Token Usage:")) {
|
|
255600
|
+
output += `
|
|
255158
255601
|
Token Usage:
|
|
255159
255602
|
Request tokens: ${tokenUsage.requestTokens}
|
|
255160
255603
|
Response tokens: ${tokenUsage.responseTokens}
|
|
255161
255604
|
Total tokens: ${tokenUsage.totalTokens}
|
|
255162
255605
|
`;
|
|
255163
|
-
|
|
255164
|
-
|
|
255165
|
-
|
|
255166
|
-
|
|
255167
|
-
|
|
255168
|
-
|
|
255169
|
-
|
|
255170
|
-
|
|
255171
|
-
|
|
255172
|
-
|
|
255173
|
-
}
|
|
255174
|
-
return jsonOutput;
|
|
255175
|
-
} catch (error2) {
|
|
255176
|
-
console.error("Error parsing JSON output:", error2);
|
|
255177
|
-
return output;
|
|
255606
|
+
}
|
|
255607
|
+
if (options.json || options.format === "json") {
|
|
255608
|
+
try {
|
|
255609
|
+
const jsonOutput = JSON.parse(stdout);
|
|
255610
|
+
if (!jsonOutput.token_usage) {
|
|
255611
|
+
jsonOutput.token_usage = {
|
|
255612
|
+
request_tokens: tokenUsage.requestTokens,
|
|
255613
|
+
response_tokens: tokenUsage.responseTokens,
|
|
255614
|
+
total_tokens: tokenUsage.totalTokens
|
|
255615
|
+
};
|
|
255178
255616
|
}
|
|
255617
|
+
return jsonOutput;
|
|
255618
|
+
} catch (error2) {
|
|
255619
|
+
console.error("Error parsing JSON output:", error2);
|
|
255620
|
+
return output;
|
|
255179
255621
|
}
|
|
255180
|
-
return output;
|
|
255181
|
-
} catch (error2) {
|
|
255182
|
-
const errorMessage = `Error executing extract command: ${error2.message}
|
|
255183
|
-
Command: ${command}`;
|
|
255184
|
-
throw new Error(errorMessage);
|
|
255185
255622
|
}
|
|
255623
|
+
return output;
|
|
255186
255624
|
}
|
|
255187
|
-
var import_child_process4, import_util4,
|
|
255625
|
+
var import_child_process4, import_util4, execAsync2, EXTRACT_FLAG_MAP;
|
|
255188
255626
|
var init_extract = __esm({
|
|
255189
255627
|
"src/extract.js"() {
|
|
255190
255628
|
"use strict";
|
|
255191
255629
|
import_child_process4 = __nccwpck_require__(35317);
|
|
255192
255630
|
import_util4 = __nccwpck_require__(39023);
|
|
255193
255631
|
init_utils();
|
|
255194
|
-
|
|
255632
|
+
execAsync2 = (0, import_util4.promisify)(import_child_process4.exec);
|
|
255195
255633
|
EXTRACT_FLAG_MAP = {
|
|
255196
255634
|
allowTests: "--allow-tests",
|
|
255197
255635
|
contextLines: "--context",
|
|
@@ -255226,7 +255664,7 @@ async function grep(options) {
|
|
|
255226
255664
|
const paths = Array.isArray(options.paths) ? options.paths : [options.paths];
|
|
255227
255665
|
cliArgs.push(...paths);
|
|
255228
255666
|
try {
|
|
255229
|
-
const { stdout, stderr } = await
|
|
255667
|
+
const { stdout, stderr } = await execFileAsync2(binaryPath, cliArgs, {
|
|
255230
255668
|
maxBuffer: 10 * 1024 * 1024,
|
|
255231
255669
|
// 10MB buffer
|
|
255232
255670
|
env: {
|
|
@@ -255244,14 +255682,14 @@ async function grep(options) {
|
|
|
255244
255682
|
throw new Error(`Grep failed: ${errorMessage}`);
|
|
255245
255683
|
}
|
|
255246
255684
|
}
|
|
255247
|
-
var import_child_process5, import_util5,
|
|
255685
|
+
var import_child_process5, import_util5, execFileAsync2, GREP_FLAG_MAP;
|
|
255248
255686
|
var init_grep = __esm({
|
|
255249
255687
|
"src/grep.js"() {
|
|
255250
255688
|
"use strict";
|
|
255251
255689
|
import_child_process5 = __nccwpck_require__(35317);
|
|
255252
255690
|
import_util5 = __nccwpck_require__(39023);
|
|
255253
255691
|
init_utils();
|
|
255254
|
-
|
|
255692
|
+
execFileAsync2 = (0, import_util5.promisify)(import_child_process5.execFile);
|
|
255255
255693
|
GREP_FLAG_MAP = {
|
|
255256
255694
|
ignoreCase: "-i",
|
|
255257
255695
|
lineNumbers: "-n",
|
|
@@ -259482,6 +259920,12 @@ function createMessagePreview(message, charsPerSide = 200) {
|
|
|
259482
259920
|
const end = message.substring(message.length - charsPerSide);
|
|
259483
259921
|
return `${start}...${end}`;
|
|
259484
259922
|
}
|
|
259923
|
+
function parseTargets(targets) {
|
|
259924
|
+
if (!targets || typeof targets !== "string") {
|
|
259925
|
+
return [];
|
|
259926
|
+
}
|
|
259927
|
+
return targets.split(/\s+/).filter((f3) => f3.length > 0);
|
|
259928
|
+
}
|
|
259485
259929
|
var searchSchema, querySchema, extractSchema, delegateSchema, bashSchema, attemptCompletionSchema, searchToolDefinition, queryToolDefinition, extractToolDefinition, delegateToolDefinition, attemptCompletionToolDefinition, bashToolDefinition, searchDescription, queryDescription, extractDescription, delegateDescription, bashDescription, DEFAULT_VALID_TOOLS;
|
|
259486
259930
|
var init_common = __esm({
|
|
259487
259931
|
"src/tools/common.js"() {
|
|
@@ -259509,7 +259953,7 @@ var init_common = __esm({
|
|
|
259509
259953
|
end_line: external_exports.number().optional().describe("End line number for extracting a range of lines"),
|
|
259510
259954
|
allow_tests: external_exports.boolean().optional().default(false).describe("Allow test files and test code blocks"),
|
|
259511
259955
|
context_lines: external_exports.number().optional().default(10).describe("Number of context lines to include"),
|
|
259512
|
-
format: external_exports.string().optional().default("plain").describe("Output format (plain, markdown, json, color)")
|
|
259956
|
+
format: external_exports.string().optional().default("plain").describe("Output format (plain, markdown, json, xml, color, outline-xml, outline-diff)")
|
|
259513
259957
|
});
|
|
259514
259958
|
delegateSchema = external_exports.object({
|
|
259515
259959
|
task: external_exports.string().describe("The task to delegate to a subagent. Be specific about what needs to be accomplished.")
|
|
@@ -260136,7 +260580,7 @@ var init_vercel = __esm({
|
|
|
260136
260580
|
format: effectiveFormat
|
|
260137
260581
|
};
|
|
260138
260582
|
} else if (targets) {
|
|
260139
|
-
const files =
|
|
260583
|
+
const files = parseTargets(targets);
|
|
260140
260584
|
let effectiveFormat = format2;
|
|
260141
260585
|
if (outline && format2 === "outline-xml") {
|
|
260142
260586
|
effectiveFormat = "xml";
|
|
@@ -261494,7 +261938,7 @@ function createExtractTool() {
|
|
|
261494
261938
|
schema: extractSchema,
|
|
261495
261939
|
func: async ({ targets, line, end_line, allow_tests, context_lines, format: format2 }) => {
|
|
261496
261940
|
try {
|
|
261497
|
-
const files =
|
|
261941
|
+
const files = parseTargets(targets);
|
|
261498
261942
|
const results = await extract({
|
|
261499
261943
|
files,
|
|
261500
261944
|
allowTests: allow_tests,
|
|
@@ -261720,7 +262164,7 @@ async function listFilesByLevel(options) {
|
|
|
261720
262164
|
return await listFilesByLevelManually(directory, maxFiles, respectGitignore);
|
|
261721
262165
|
}
|
|
261722
262166
|
async function listFilesUsingGit(directory, maxFiles) {
|
|
261723
|
-
const { stdout } = await
|
|
262167
|
+
const { stdout } = await execAsync3("git ls-files", { cwd: directory });
|
|
261724
262168
|
const files = stdout.split("\n").filter(Boolean);
|
|
261725
262169
|
const sortedFiles = files.sort((a3, b3) => {
|
|
261726
262170
|
const depthA = a3.split(import_path6.default.sep).length;
|
|
@@ -261786,7 +262230,7 @@ function shouldIgnore(filePath, ignorePatterns) {
|
|
|
261786
262230
|
}
|
|
261787
262231
|
return false;
|
|
261788
262232
|
}
|
|
261789
|
-
var import_fs2, import_path6, import_util9, import_child_process8,
|
|
262233
|
+
var import_fs2, import_path6, import_util9, import_child_process8, execAsync3;
|
|
261790
262234
|
var init_file_lister = __esm({
|
|
261791
262235
|
"src/utils/file-lister.js"() {
|
|
261792
262236
|
"use strict";
|
|
@@ -261794,7 +262238,7 @@ var init_file_lister = __esm({
|
|
|
261794
262238
|
import_path6 = __toESM(__nccwpck_require__(16928), 1);
|
|
261795
262239
|
import_util9 = __nccwpck_require__(39023);
|
|
261796
262240
|
import_child_process8 = __nccwpck_require__(35317);
|
|
261797
|
-
|
|
262241
|
+
execAsync3 = (0, import_util9.promisify)(import_child_process8.exec);
|
|
261798
262242
|
}
|
|
261799
262243
|
});
|
|
261800
262244
|
|
|
@@ -264853,22 +265297,13 @@ var require_dist_cjs18 = __commonJS({
|
|
|
264853
265297
|
var sdkStreamMixin2 = require_sdk_stream_mixin();
|
|
264854
265298
|
var splitStream = require_splitStream();
|
|
264855
265299
|
var streamTypeCheck = require_stream_type_check();
|
|
264856
|
-
function transformToString(payload2, encoding = "utf-8") {
|
|
264857
|
-
if (encoding === "base64") {
|
|
264858
|
-
return utilBase64.toBase64(payload2);
|
|
264859
|
-
}
|
|
264860
|
-
return utilUtf8.toUtf8(payload2);
|
|
264861
|
-
}
|
|
264862
|
-
function transformFromString(str, encoding) {
|
|
264863
|
-
if (encoding === "base64") {
|
|
264864
|
-
return Uint8ArrayBlobAdapter2.mutate(utilBase64.fromBase64(str));
|
|
264865
|
-
}
|
|
264866
|
-
return Uint8ArrayBlobAdapter2.mutate(utilUtf8.fromUtf8(str));
|
|
264867
|
-
}
|
|
264868
265300
|
var Uint8ArrayBlobAdapter2 = class _Uint8ArrayBlobAdapter extends Uint8Array {
|
|
264869
265301
|
static fromString(source, encoding = "utf-8") {
|
|
264870
265302
|
if (typeof source === "string") {
|
|
264871
|
-
|
|
265303
|
+
if (encoding === "base64") {
|
|
265304
|
+
return _Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source));
|
|
265305
|
+
}
|
|
265306
|
+
return _Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(source));
|
|
264872
265307
|
}
|
|
264873
265308
|
throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
|
|
264874
265309
|
}
|
|
@@ -264877,7 +265312,10 @@ var require_dist_cjs18 = __commonJS({
|
|
|
264877
265312
|
return source;
|
|
264878
265313
|
}
|
|
264879
265314
|
transformToString(encoding = "utf-8") {
|
|
264880
|
-
|
|
265315
|
+
if (encoding === "base64") {
|
|
265316
|
+
return utilBase64.toBase64(this);
|
|
265317
|
+
}
|
|
265318
|
+
return utilUtf8.toUtf8(this);
|
|
264881
265319
|
}
|
|
264882
265320
|
};
|
|
264883
265321
|
exports2.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter2;
|
|
@@ -264990,6 +265428,138 @@ var init_deref = __esm({
|
|
|
264990
265428
|
}
|
|
264991
265429
|
});
|
|
264992
265430
|
|
|
265431
|
+
// node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js
|
|
265432
|
+
var operation;
|
|
265433
|
+
var init_operation = __esm({
|
|
265434
|
+
"node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js"() {
|
|
265435
|
+
operation = (namespace, name14, traits, input, output) => ({
|
|
265436
|
+
name: name14,
|
|
265437
|
+
namespace,
|
|
265438
|
+
traits,
|
|
265439
|
+
input,
|
|
265440
|
+
output
|
|
265441
|
+
});
|
|
265442
|
+
}
|
|
265443
|
+
});
|
|
265444
|
+
|
|
265445
|
+
// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js
|
|
265446
|
+
var import_protocol_http2, import_util_middleware3, schemaDeserializationMiddleware, findHeader;
|
|
265447
|
+
var init_schemaDeserializationMiddleware = __esm({
|
|
265448
|
+
"node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() {
|
|
265449
|
+
import_protocol_http2 = __toESM(require_dist_cjs2());
|
|
265450
|
+
import_util_middleware3 = __toESM(require_dist_cjs7());
|
|
265451
|
+
init_operation();
|
|
265452
|
+
schemaDeserializationMiddleware = (config) => (next, context3) => async (args) => {
|
|
265453
|
+
const { response } = await next(args);
|
|
265454
|
+
const { operationSchema } = (0, import_util_middleware3.getSmithyContext)(context3);
|
|
265455
|
+
const [, ns, n3, t3, i3, o3] = operationSchema ?? [];
|
|
265456
|
+
try {
|
|
265457
|
+
const parsed = await config.protocol.deserializeResponse(operation(ns, n3, t3, i3, o3), {
|
|
265458
|
+
...config,
|
|
265459
|
+
...context3
|
|
265460
|
+
}, response);
|
|
265461
|
+
return {
|
|
265462
|
+
response,
|
|
265463
|
+
output: parsed
|
|
265464
|
+
};
|
|
265465
|
+
} catch (error2) {
|
|
265466
|
+
Object.defineProperty(error2, "$response", {
|
|
265467
|
+
value: response
|
|
265468
|
+
});
|
|
265469
|
+
if (!("$metadata" in error2)) {
|
|
265470
|
+
const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
|
|
265471
|
+
try {
|
|
265472
|
+
error2.message += "\n " + hint;
|
|
265473
|
+
} catch (e3) {
|
|
265474
|
+
if (!context3.logger || context3.logger?.constructor?.name === "NoOpLogger") {
|
|
265475
|
+
console.warn(hint);
|
|
265476
|
+
} else {
|
|
265477
|
+
context3.logger?.warn?.(hint);
|
|
265478
|
+
}
|
|
265479
|
+
}
|
|
265480
|
+
if (typeof error2.$responseBodyText !== "undefined") {
|
|
265481
|
+
if (error2.$response) {
|
|
265482
|
+
error2.$response.body = error2.$responseBodyText;
|
|
265483
|
+
}
|
|
265484
|
+
}
|
|
265485
|
+
try {
|
|
265486
|
+
if (import_protocol_http2.HttpResponse.isInstance(response)) {
|
|
265487
|
+
const { headers = {} } = response;
|
|
265488
|
+
const headerEntries = Object.entries(headers);
|
|
265489
|
+
error2.$metadata = {
|
|
265490
|
+
httpStatusCode: response.statusCode,
|
|
265491
|
+
requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
|
|
265492
|
+
extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
|
|
265493
|
+
cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
|
|
265494
|
+
};
|
|
265495
|
+
}
|
|
265496
|
+
} catch (e3) {
|
|
265497
|
+
}
|
|
265498
|
+
}
|
|
265499
|
+
throw error2;
|
|
265500
|
+
}
|
|
265501
|
+
};
|
|
265502
|
+
findHeader = (pattern, headers) => {
|
|
265503
|
+
return (headers.find(([k3]) => {
|
|
265504
|
+
return k3.match(pattern);
|
|
265505
|
+
}) || [void 0, void 0])[1];
|
|
265506
|
+
};
|
|
265507
|
+
}
|
|
265508
|
+
});
|
|
265509
|
+
|
|
265510
|
+
// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js
|
|
265511
|
+
var import_util_middleware4, schemaSerializationMiddleware;
|
|
265512
|
+
var init_schemaSerializationMiddleware = __esm({
|
|
265513
|
+
"node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() {
|
|
265514
|
+
import_util_middleware4 = __toESM(require_dist_cjs7());
|
|
265515
|
+
init_operation();
|
|
265516
|
+
schemaSerializationMiddleware = (config) => (next, context3) => async (args) => {
|
|
265517
|
+
const { operationSchema } = (0, import_util_middleware4.getSmithyContext)(context3);
|
|
265518
|
+
const [, ns, n3, t3, i3, o3] = operationSchema ?? [];
|
|
265519
|
+
const endpoint = context3.endpointV2?.url && config.urlParser ? async () => config.urlParser(context3.endpointV2.url) : config.endpoint;
|
|
265520
|
+
const request = await config.protocol.serializeRequest(operation(ns, n3, t3, i3, o3), args.input, {
|
|
265521
|
+
...config,
|
|
265522
|
+
...context3,
|
|
265523
|
+
endpoint
|
|
265524
|
+
});
|
|
265525
|
+
return next({
|
|
265526
|
+
...args,
|
|
265527
|
+
request
|
|
265528
|
+
});
|
|
265529
|
+
};
|
|
265530
|
+
}
|
|
265531
|
+
});
|
|
265532
|
+
|
|
265533
|
+
// node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js
|
|
265534
|
+
function getSchemaSerdePlugin(config) {
|
|
265535
|
+
return {
|
|
265536
|
+
applyToStack: (commandStack) => {
|
|
265537
|
+
commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption2);
|
|
265538
|
+
commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);
|
|
265539
|
+
config.protocol.setSerdeContext(config);
|
|
265540
|
+
}
|
|
265541
|
+
};
|
|
265542
|
+
}
|
|
265543
|
+
var deserializerMiddlewareOption, serializerMiddlewareOption2;
|
|
265544
|
+
var init_getSchemaSerdePlugin = __esm({
|
|
265545
|
+
"node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() {
|
|
265546
|
+
init_schemaDeserializationMiddleware();
|
|
265547
|
+
init_schemaSerializationMiddleware();
|
|
265548
|
+
deserializerMiddlewareOption = {
|
|
265549
|
+
name: "deserializerMiddleware",
|
|
265550
|
+
step: "deserialize",
|
|
265551
|
+
tags: ["DESERIALIZER"],
|
|
265552
|
+
override: true
|
|
265553
|
+
};
|
|
265554
|
+
serializerMiddlewareOption2 = {
|
|
265555
|
+
name: "serializerMiddleware",
|
|
265556
|
+
step: "serialize",
|
|
265557
|
+
tags: ["SERIALIZER"],
|
|
265558
|
+
override: true
|
|
265559
|
+
};
|
|
265560
|
+
}
|
|
265561
|
+
});
|
|
265562
|
+
|
|
264993
265563
|
// node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js
|
|
264994
265564
|
var Schema;
|
|
264995
265565
|
var init_Schema = __esm({
|
|
@@ -265017,51 +265587,6 @@ var init_Schema = __esm({
|
|
|
265017
265587
|
}
|
|
265018
265588
|
});
|
|
265019
265589
|
|
|
265020
|
-
// node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js
|
|
265021
|
-
var StructureSchema, struct;
|
|
265022
|
-
var init_StructureSchema = __esm({
|
|
265023
|
-
"node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() {
|
|
265024
|
-
init_Schema();
|
|
265025
|
-
StructureSchema = class _StructureSchema extends Schema {
|
|
265026
|
-
static symbol = Symbol.for("@smithy/str");
|
|
265027
|
-
name;
|
|
265028
|
-
traits;
|
|
265029
|
-
memberNames;
|
|
265030
|
-
memberList;
|
|
265031
|
-
symbol = _StructureSchema.symbol;
|
|
265032
|
-
};
|
|
265033
|
-
struct = (namespace, name14, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), {
|
|
265034
|
-
name: name14,
|
|
265035
|
-
namespace,
|
|
265036
|
-
traits,
|
|
265037
|
-
memberNames,
|
|
265038
|
-
memberList
|
|
265039
|
-
});
|
|
265040
|
-
}
|
|
265041
|
-
});
|
|
265042
|
-
|
|
265043
|
-
// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js
|
|
265044
|
-
var ErrorSchema, error;
|
|
265045
|
-
var init_ErrorSchema = __esm({
|
|
265046
|
-
"node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() {
|
|
265047
|
-
init_Schema();
|
|
265048
|
-
init_StructureSchema();
|
|
265049
|
-
ErrorSchema = class _ErrorSchema extends StructureSchema {
|
|
265050
|
-
static symbol = Symbol.for("@smithy/err");
|
|
265051
|
-
ctor;
|
|
265052
|
-
symbol = _ErrorSchema.symbol;
|
|
265053
|
-
};
|
|
265054
|
-
error = (namespace, name14, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), {
|
|
265055
|
-
name: name14,
|
|
265056
|
-
namespace,
|
|
265057
|
-
traits,
|
|
265058
|
-
memberNames,
|
|
265059
|
-
memberList,
|
|
265060
|
-
ctor: null
|
|
265061
|
-
});
|
|
265062
|
-
}
|
|
265063
|
-
});
|
|
265064
|
-
|
|
265065
265590
|
// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js
|
|
265066
265591
|
var ListSchema, list;
|
|
265067
265592
|
var init_ListSchema = __esm({
|
|
@@ -265129,29 +265654,47 @@ var init_OperationSchema = __esm({
|
|
|
265129
265654
|
}
|
|
265130
265655
|
});
|
|
265131
265656
|
|
|
265132
|
-
// node_modules/@smithy/core/dist-es/submodules/schema/schemas/
|
|
265133
|
-
var
|
|
265134
|
-
var
|
|
265135
|
-
"node_modules/@smithy/core/dist-es/submodules/schema/schemas/
|
|
265657
|
+
// node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js
|
|
265658
|
+
var StructureSchema, struct;
|
|
265659
|
+
var init_StructureSchema = __esm({
|
|
265660
|
+
"node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() {
|
|
265136
265661
|
init_Schema();
|
|
265137
|
-
|
|
265138
|
-
static symbol = Symbol.for("@smithy/
|
|
265662
|
+
StructureSchema = class _StructureSchema extends Schema {
|
|
265663
|
+
static symbol = Symbol.for("@smithy/str");
|
|
265139
265664
|
name;
|
|
265140
|
-
schemaRef;
|
|
265141
265665
|
traits;
|
|
265142
|
-
|
|
265666
|
+
memberNames;
|
|
265667
|
+
memberList;
|
|
265668
|
+
symbol = _StructureSchema.symbol;
|
|
265143
265669
|
};
|
|
265144
|
-
|
|
265670
|
+
struct = (namespace, name14, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), {
|
|
265145
265671
|
name: name14,
|
|
265146
265672
|
namespace,
|
|
265147
265673
|
traits,
|
|
265148
|
-
|
|
265674
|
+
memberNames,
|
|
265675
|
+
memberList
|
|
265149
265676
|
});
|
|
265150
|
-
|
|
265677
|
+
}
|
|
265678
|
+
});
|
|
265679
|
+
|
|
265680
|
+
// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js
|
|
265681
|
+
var ErrorSchema, error;
|
|
265682
|
+
var init_ErrorSchema = __esm({
|
|
265683
|
+
"node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() {
|
|
265684
|
+
init_Schema();
|
|
265685
|
+
init_StructureSchema();
|
|
265686
|
+
ErrorSchema = class _ErrorSchema extends StructureSchema {
|
|
265687
|
+
static symbol = Symbol.for("@smithy/err");
|
|
265688
|
+
ctor;
|
|
265689
|
+
symbol = _ErrorSchema.symbol;
|
|
265690
|
+
};
|
|
265691
|
+
error = (namespace, name14, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), {
|
|
265151
265692
|
name: name14,
|
|
265152
265693
|
namespace,
|
|
265153
265694
|
traits,
|
|
265154
|
-
|
|
265695
|
+
memberNames,
|
|
265696
|
+
memberList,
|
|
265697
|
+
ctor: null
|
|
265155
265698
|
});
|
|
265156
265699
|
}
|
|
265157
265700
|
});
|
|
@@ -265195,28 +265738,10 @@ function member(memberSchema, memberName) {
|
|
|
265195
265738
|
const internalCtorAccess = NormalizedSchema;
|
|
265196
265739
|
return new internalCtorAccess(memberSchema, memberName);
|
|
265197
265740
|
}
|
|
265198
|
-
function hydrate(ss) {
|
|
265199
|
-
const [id, ...rest] = ss;
|
|
265200
|
-
return {
|
|
265201
|
-
[0]: simAdapter,
|
|
265202
|
-
[1]: list,
|
|
265203
|
-
[2]: map,
|
|
265204
|
-
[3]: struct,
|
|
265205
|
-
[-3]: error,
|
|
265206
|
-
[9]: op
|
|
265207
|
-
}[id].call(null, ...rest);
|
|
265208
|
-
}
|
|
265209
265741
|
var NormalizedSchema, isMemberSchema, isStaticSchema;
|
|
265210
265742
|
var init_NormalizedSchema = __esm({
|
|
265211
265743
|
"node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() {
|
|
265212
265744
|
init_deref();
|
|
265213
|
-
init_ErrorSchema();
|
|
265214
|
-
init_ListSchema();
|
|
265215
|
-
init_MapSchema();
|
|
265216
|
-
init_OperationSchema();
|
|
265217
|
-
init_Schema();
|
|
265218
|
-
init_SimpleSchema();
|
|
265219
|
-
init_StructureSchema();
|
|
265220
265745
|
init_translateTraits();
|
|
265221
265746
|
NormalizedSchema = class _NormalizedSchema {
|
|
265222
265747
|
ref;
|
|
@@ -265242,8 +265767,6 @@ var init_NormalizedSchema = __esm({
|
|
|
265242
265767
|
schema = deref(_ref);
|
|
265243
265768
|
this._isMemberSchema = true;
|
|
265244
265769
|
}
|
|
265245
|
-
if (isStaticSchema(schema))
|
|
265246
|
-
schema = hydrate(schema);
|
|
265247
265770
|
if (traitStack.length > 0) {
|
|
265248
265771
|
this.memberTraits = {};
|
|
265249
265772
|
for (let i3 = traitStack.length - 1; i3 >= 0; --i3) {
|
|
@@ -265262,18 +265785,24 @@ var init_NormalizedSchema = __esm({
|
|
|
265262
265785
|
return;
|
|
265263
265786
|
}
|
|
265264
265787
|
this.schema = deref(schema);
|
|
265265
|
-
if (this.schema
|
|
265266
|
-
this.
|
|
265788
|
+
if (isStaticSchema(this.schema)) {
|
|
265789
|
+
this.name = `${this.schema[1]}#${this.schema[2]}`;
|
|
265790
|
+
this.traits = this.schema[3];
|
|
265267
265791
|
} else {
|
|
265792
|
+
this.name = this.memberName ?? String(schema);
|
|
265268
265793
|
this.traits = 0;
|
|
265269
265794
|
}
|
|
265270
|
-
this.name = (this.schema instanceof Schema ? this.schema.getName?.() : void 0) ?? this.memberName ?? String(schema);
|
|
265271
265795
|
if (this._isMemberSchema && !memberName) {
|
|
265272
265796
|
throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);
|
|
265273
265797
|
}
|
|
265274
265798
|
}
|
|
265275
265799
|
static [Symbol.hasInstance](lhs) {
|
|
265276
|
-
|
|
265800
|
+
const isPrototype2 = this.prototype.isPrototypeOf(lhs);
|
|
265801
|
+
if (!isPrototype2 && typeof lhs === "object" && lhs !== null) {
|
|
265802
|
+
const ns = lhs;
|
|
265803
|
+
return ns.symbol === this.symbol;
|
|
265804
|
+
}
|
|
265805
|
+
return isPrototype2;
|
|
265277
265806
|
}
|
|
265278
265807
|
static of(ref) {
|
|
265279
265808
|
const sc = deref(ref);
|
|
@@ -265291,7 +265820,11 @@ var init_NormalizedSchema = __esm({
|
|
|
265291
265820
|
return new _NormalizedSchema(sc);
|
|
265292
265821
|
}
|
|
265293
265822
|
getSchema() {
|
|
265294
|
-
|
|
265823
|
+
const sc = this.schema;
|
|
265824
|
+
if (sc[0] === 0) {
|
|
265825
|
+
return sc[4];
|
|
265826
|
+
}
|
|
265827
|
+
return sc;
|
|
265295
265828
|
}
|
|
265296
265829
|
getName(withNamespace = false) {
|
|
265297
265830
|
const { name: name14 } = this;
|
|
@@ -265306,15 +265839,15 @@ var init_NormalizedSchema = __esm({
|
|
|
265306
265839
|
}
|
|
265307
265840
|
isListSchema() {
|
|
265308
265841
|
const sc = this.getSchema();
|
|
265309
|
-
return typeof sc === "number" ? sc >= 64 && sc < 128 : sc
|
|
265842
|
+
return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1;
|
|
265310
265843
|
}
|
|
265311
265844
|
isMapSchema() {
|
|
265312
265845
|
const sc = this.getSchema();
|
|
265313
|
-
return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc
|
|
265846
|
+
return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2;
|
|
265314
265847
|
}
|
|
265315
265848
|
isStructSchema() {
|
|
265316
265849
|
const sc = this.getSchema();
|
|
265317
|
-
return sc
|
|
265850
|
+
return sc[0] === 3 || sc[0] === -3;
|
|
265318
265851
|
}
|
|
265319
265852
|
isBlobSchema() {
|
|
265320
265853
|
const sc = this.getSchema();
|
|
@@ -265372,13 +265905,13 @@ var init_NormalizedSchema = __esm({
|
|
|
265372
265905
|
throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);
|
|
265373
265906
|
}
|
|
265374
265907
|
const schema = this.getSchema();
|
|
265375
|
-
const memberSchema = isDoc ? 15 : schema
|
|
265908
|
+
const memberSchema = isDoc ? 15 : schema[4] ?? 0;
|
|
265376
265909
|
return member([memberSchema, 0], "key");
|
|
265377
265910
|
}
|
|
265378
265911
|
getValueSchema() {
|
|
265379
265912
|
const sc = this.getSchema();
|
|
265380
265913
|
const [isDoc, isMap2, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()];
|
|
265381
|
-
const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap2 || isList) ? sc
|
|
265914
|
+
const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap2 || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0;
|
|
265382
265915
|
if (memberSchema != null) {
|
|
265383
265916
|
return member([memberSchema, 0], isMap2 ? "value" : "member");
|
|
265384
265917
|
}
|
|
@@ -265386,9 +265919,9 @@ var init_NormalizedSchema = __esm({
|
|
|
265386
265919
|
}
|
|
265387
265920
|
getMemberSchema(memberName) {
|
|
265388
265921
|
const struct2 = this.getSchema();
|
|
265389
|
-
if (this.isStructSchema() && struct2.
|
|
265390
|
-
const i3 = struct2.
|
|
265391
|
-
const memberSchema = struct2
|
|
265922
|
+
if (this.isStructSchema() && struct2[4].includes(memberName)) {
|
|
265923
|
+
const i3 = struct2[4].indexOf(memberName);
|
|
265924
|
+
const memberSchema = struct2[5][i3];
|
|
265392
265925
|
return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);
|
|
265393
265926
|
}
|
|
265394
265927
|
if (this.isDocumentSchema()) {
|
|
@@ -265424,8 +265957,8 @@ var init_NormalizedSchema = __esm({
|
|
|
265424
265957
|
throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
|
|
265425
265958
|
}
|
|
265426
265959
|
const struct2 = this.getSchema();
|
|
265427
|
-
for (let i3 = 0; i3 < struct2.
|
|
265428
|
-
yield [struct2
|
|
265960
|
+
for (let i3 = 0; i3 < struct2[4].length; ++i3) {
|
|
265961
|
+
yield [struct2[4][i3], member([struct2[5][i3], 0], struct2[4][i3])];
|
|
265429
265962
|
}
|
|
265430
265963
|
}
|
|
265431
265964
|
};
|
|
@@ -265434,125 +265967,30 @@ var init_NormalizedSchema = __esm({
|
|
|
265434
265967
|
}
|
|
265435
265968
|
});
|
|
265436
265969
|
|
|
265437
|
-
// node_modules/@smithy/core/dist-es/submodules/schema/
|
|
265438
|
-
var
|
|
265439
|
-
var
|
|
265440
|
-
"node_modules/@smithy/core/dist-es/submodules/schema/
|
|
265441
|
-
|
|
265442
|
-
|
|
265443
|
-
|
|
265444
|
-
|
|
265445
|
-
|
|
265446
|
-
|
|
265447
|
-
|
|
265448
|
-
operationSchema = hydrate(operationSchema);
|
|
265449
|
-
}
|
|
265450
|
-
try {
|
|
265451
|
-
const parsed = await config.protocol.deserializeResponse(operationSchema, {
|
|
265452
|
-
...config,
|
|
265453
|
-
...context3
|
|
265454
|
-
}, response);
|
|
265455
|
-
return {
|
|
265456
|
-
response,
|
|
265457
|
-
output: parsed
|
|
265458
|
-
};
|
|
265459
|
-
} catch (error2) {
|
|
265460
|
-
Object.defineProperty(error2, "$response", {
|
|
265461
|
-
value: response
|
|
265462
|
-
});
|
|
265463
|
-
if (!("$metadata" in error2)) {
|
|
265464
|
-
const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
|
|
265465
|
-
try {
|
|
265466
|
-
error2.message += "\n " + hint;
|
|
265467
|
-
} catch (e3) {
|
|
265468
|
-
if (!context3.logger || context3.logger?.constructor?.name === "NoOpLogger") {
|
|
265469
|
-
console.warn(hint);
|
|
265470
|
-
} else {
|
|
265471
|
-
context3.logger?.warn?.(hint);
|
|
265472
|
-
}
|
|
265473
|
-
}
|
|
265474
|
-
if (typeof error2.$responseBodyText !== "undefined") {
|
|
265475
|
-
if (error2.$response) {
|
|
265476
|
-
error2.$response.body = error2.$responseBodyText;
|
|
265477
|
-
}
|
|
265478
|
-
}
|
|
265479
|
-
try {
|
|
265480
|
-
if (import_protocol_http2.HttpResponse.isInstance(response)) {
|
|
265481
|
-
const { headers = {} } = response;
|
|
265482
|
-
const headerEntries = Object.entries(headers);
|
|
265483
|
-
error2.$metadata = {
|
|
265484
|
-
httpStatusCode: response.statusCode,
|
|
265485
|
-
requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
|
|
265486
|
-
extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
|
|
265487
|
-
cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
|
|
265488
|
-
};
|
|
265489
|
-
}
|
|
265490
|
-
} catch (e3) {
|
|
265491
|
-
}
|
|
265492
|
-
}
|
|
265493
|
-
throw error2;
|
|
265494
|
-
}
|
|
265495
|
-
};
|
|
265496
|
-
findHeader = (pattern, headers) => {
|
|
265497
|
-
return (headers.find(([k3]) => {
|
|
265498
|
-
return k3.match(pattern);
|
|
265499
|
-
}) || [void 0, void 0])[1];
|
|
265500
|
-
};
|
|
265501
|
-
}
|
|
265502
|
-
});
|
|
265503
|
-
|
|
265504
|
-
// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js
|
|
265505
|
-
var import_util_middleware4, schemaSerializationMiddleware;
|
|
265506
|
-
var init_schemaSerializationMiddleware = __esm({
|
|
265507
|
-
"node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() {
|
|
265508
|
-
import_util_middleware4 = __toESM(require_dist_cjs7());
|
|
265509
|
-
init_NormalizedSchema();
|
|
265510
|
-
schemaSerializationMiddleware = (config) => (next, context3) => async (args) => {
|
|
265511
|
-
let { operationSchema } = (0, import_util_middleware4.getSmithyContext)(context3);
|
|
265512
|
-
if (isStaticSchema(operationSchema)) {
|
|
265513
|
-
operationSchema = hydrate(operationSchema);
|
|
265514
|
-
}
|
|
265515
|
-
const endpoint = context3.endpointV2?.url && config.urlParser ? async () => config.urlParser(context3.endpointV2.url) : config.endpoint;
|
|
265516
|
-
const request = await config.protocol.serializeRequest(operationSchema, args.input, {
|
|
265517
|
-
...config,
|
|
265518
|
-
...context3,
|
|
265519
|
-
endpoint
|
|
265520
|
-
});
|
|
265521
|
-
return next({
|
|
265522
|
-
...args,
|
|
265523
|
-
request
|
|
265524
|
-
});
|
|
265525
|
-
};
|
|
265526
|
-
}
|
|
265527
|
-
});
|
|
265528
|
-
|
|
265529
|
-
// node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js
|
|
265530
|
-
function getSchemaSerdePlugin(config) {
|
|
265531
|
-
return {
|
|
265532
|
-
applyToStack: (commandStack) => {
|
|
265533
|
-
commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption2);
|
|
265534
|
-
commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);
|
|
265535
|
-
config.protocol.setSerdeContext(config);
|
|
265536
|
-
}
|
|
265537
|
-
};
|
|
265538
|
-
}
|
|
265539
|
-
var deserializerMiddlewareOption, serializerMiddlewareOption2;
|
|
265540
|
-
var init_getSchemaSerdePlugin = __esm({
|
|
265541
|
-
"node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() {
|
|
265542
|
-
init_schemaDeserializationMiddleware();
|
|
265543
|
-
init_schemaSerializationMiddleware();
|
|
265544
|
-
deserializerMiddlewareOption = {
|
|
265545
|
-
name: "deserializerMiddleware",
|
|
265546
|
-
step: "deserialize",
|
|
265547
|
-
tags: ["DESERIALIZER"],
|
|
265548
|
-
override: true
|
|
265549
|
-
};
|
|
265550
|
-
serializerMiddlewareOption2 = {
|
|
265551
|
-
name: "serializerMiddleware",
|
|
265552
|
-
step: "serialize",
|
|
265553
|
-
tags: ["SERIALIZER"],
|
|
265554
|
-
override: true
|
|
265970
|
+
// node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js
|
|
265971
|
+
var SimpleSchema, sim, simAdapter;
|
|
265972
|
+
var init_SimpleSchema = __esm({
|
|
265973
|
+
"node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() {
|
|
265974
|
+
init_Schema();
|
|
265975
|
+
SimpleSchema = class _SimpleSchema extends Schema {
|
|
265976
|
+
static symbol = Symbol.for("@smithy/sim");
|
|
265977
|
+
name;
|
|
265978
|
+
schemaRef;
|
|
265979
|
+
traits;
|
|
265980
|
+
symbol = _SimpleSchema.symbol;
|
|
265555
265981
|
};
|
|
265982
|
+
sim = (namespace, name14, schemaRef, traits) => Schema.assign(new SimpleSchema(), {
|
|
265983
|
+
name: name14,
|
|
265984
|
+
namespace,
|
|
265985
|
+
traits,
|
|
265986
|
+
schemaRef
|
|
265987
|
+
});
|
|
265988
|
+
simAdapter = (namespace, name14, traits, schemaRef) => Schema.assign(new SimpleSchema(), {
|
|
265989
|
+
name: name14,
|
|
265990
|
+
namespace,
|
|
265991
|
+
traits,
|
|
265992
|
+
schemaRef
|
|
265993
|
+
});
|
|
265556
265994
|
}
|
|
265557
265995
|
});
|
|
265558
265996
|
|
|
@@ -265620,7 +266058,7 @@ var init_TypeRegistry = __esm({
|
|
|
265620
266058
|
getErrorCtor(es) {
|
|
265621
266059
|
const $error = es;
|
|
265622
266060
|
const registry = _TypeRegistry.for($error[1]);
|
|
265623
|
-
return registry.exceptions.get(
|
|
266061
|
+
return registry.exceptions.get($error);
|
|
265624
266062
|
}
|
|
265625
266063
|
getBaseException() {
|
|
265626
266064
|
for (const exceptionKey of this.exceptions.keys()) {
|
|
@@ -265668,11 +266106,11 @@ __export(schema_exports, {
|
|
|
265668
266106
|
deserializerMiddlewareOption: () => deserializerMiddlewareOption,
|
|
265669
266107
|
error: () => error,
|
|
265670
266108
|
getSchemaSerdePlugin: () => getSchemaSerdePlugin,
|
|
265671
|
-
hydrate: () => hydrate,
|
|
265672
266109
|
isStaticSchema: () => isStaticSchema,
|
|
265673
266110
|
list: () => list,
|
|
265674
266111
|
map: () => map,
|
|
265675
266112
|
op: () => op,
|
|
266113
|
+
operation: () => operation,
|
|
265676
266114
|
serializerMiddlewareOption: () => serializerMiddlewareOption2,
|
|
265677
266115
|
sim: () => sim,
|
|
265678
266116
|
simAdapter: () => simAdapter,
|
|
@@ -265686,6 +266124,7 @@ var init_schema = __esm({
|
|
|
265686
266124
|
init_ListSchema();
|
|
265687
266125
|
init_MapSchema();
|
|
265688
266126
|
init_OperationSchema();
|
|
266127
|
+
init_operation();
|
|
265689
266128
|
init_ErrorSchema();
|
|
265690
266129
|
init_NormalizedSchema();
|
|
265691
266130
|
init_Schema();
|
|
@@ -267052,7 +267491,6 @@ var init_EventStreamSerde = __esm({
|
|
|
267052
267491
|
const marshaller = this.marshaller;
|
|
267053
267492
|
const eventStreamMember = requestSchema.getEventStreamMember();
|
|
267054
267493
|
const unionSchema = requestSchema.getMemberSchema(eventStreamMember);
|
|
267055
|
-
const memberSchemas = unionSchema.getMemberSchemas();
|
|
267056
267494
|
const serializer = this.serializer;
|
|
267057
267495
|
const defaultContentType = this.defaultContentType;
|
|
267058
267496
|
const initialRequestMarker = Symbol("initialRequestMarker");
|
|
@@ -267163,7 +267601,7 @@ var init_EventStreamSerde = __esm({
|
|
|
267163
267601
|
let explicitPayloadContentType;
|
|
267164
267602
|
const isKnownSchema = (() => {
|
|
267165
267603
|
const struct2 = unionSchema.getSchema();
|
|
267166
|
-
return struct2.
|
|
267604
|
+
return struct2[4].includes(unionMember);
|
|
267167
267605
|
})();
|
|
267168
267606
|
const additionalHeaders = {};
|
|
267169
267607
|
if (!isKnownSchema) {
|
|
@@ -267297,10 +267735,10 @@ var init_HttpProtocol = __esm({
|
|
|
267297
267735
|
}
|
|
267298
267736
|
}
|
|
267299
267737
|
setHostPrefix(request, operationSchema, input) {
|
|
267300
|
-
const operationNs = NormalizedSchema.of(operationSchema);
|
|
267301
267738
|
const inputNs = NormalizedSchema.of(operationSchema.input);
|
|
267302
|
-
|
|
267303
|
-
|
|
267739
|
+
const opTraits = translateTraits(operationSchema.traits ?? {});
|
|
267740
|
+
if (opTraits.endpoint) {
|
|
267741
|
+
let hostPrefix = opTraits.endpoint?.[0];
|
|
267304
267742
|
if (typeof hostPrefix === "string") {
|
|
267305
267743
|
const hostLabelInputs = [...inputNs.structIterator()].filter(([, member2]) => member2.getMergedTraits().hostLabel);
|
|
267306
267744
|
for (const [name14] of hostLabelInputs) {
|
|
@@ -268579,20 +269017,24 @@ var require_dist_cjs20 = __commonJS({
|
|
|
268579
269017
|
if (typeof obj === "string") {
|
|
268580
269018
|
return evaluateTemplate(obj, options);
|
|
268581
269019
|
} else if (obj["fn"]) {
|
|
268582
|
-
return callFunction(obj, options);
|
|
269020
|
+
return group$2.callFunction(obj, options);
|
|
268583
269021
|
} else if (obj["ref"]) {
|
|
268584
269022
|
return getReferenceValue(obj, options);
|
|
268585
269023
|
}
|
|
268586
269024
|
throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);
|
|
268587
269025
|
};
|
|
268588
269026
|
var callFunction = ({ fn, argv }, options) => {
|
|
268589
|
-
const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options));
|
|
269027
|
+
const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : group$2.evaluateExpression(arg, "arg", options));
|
|
268590
269028
|
const fnSegments = fn.split(".");
|
|
268591
269029
|
if (fnSegments[0] in customEndpointFunctions3 && fnSegments[1] != null) {
|
|
268592
269030
|
return customEndpointFunctions3[fnSegments[0]][fnSegments[1]](...evaluatedArgs);
|
|
268593
269031
|
}
|
|
268594
269032
|
return endpointFunctions[fn](...evaluatedArgs);
|
|
268595
269033
|
};
|
|
269034
|
+
var group$2 = {
|
|
269035
|
+
evaluateExpression,
|
|
269036
|
+
callFunction
|
|
269037
|
+
};
|
|
268596
269038
|
var evaluateCondition = ({ assign: assign2, ...fnArgs }, options) => {
|
|
268597
269039
|
if (assign2 && assign2 in options.referenceRecord) {
|
|
268598
269040
|
throw new EndpointError(`'${assign2}' is already defined in Reference Record.`);
|
|
@@ -268634,6 +269076,10 @@ var require_dist_cjs20 = __commonJS({
|
|
|
268634
269076
|
return processedExpr;
|
|
268635
269077
|
})
|
|
268636
269078
|
}), {});
|
|
269079
|
+
var getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({
|
|
269080
|
+
...acc,
|
|
269081
|
+
[propertyKey]: group$1.getEndpointProperty(propertyVal, options)
|
|
269082
|
+
}), {});
|
|
268637
269083
|
var getEndpointProperty = (property2, options) => {
|
|
268638
269084
|
if (Array.isArray(property2)) {
|
|
268639
269085
|
return property2.map((propertyEntry) => getEndpointProperty(propertyEntry, options));
|
|
@@ -268645,17 +269091,17 @@ var require_dist_cjs20 = __commonJS({
|
|
|
268645
269091
|
if (property2 === null) {
|
|
268646
269092
|
throw new EndpointError(`Unexpected endpoint property: ${property2}`);
|
|
268647
269093
|
}
|
|
268648
|
-
return getEndpointProperties(property2, options);
|
|
269094
|
+
return group$1.getEndpointProperties(property2, options);
|
|
268649
269095
|
case "boolean":
|
|
268650
269096
|
return property2;
|
|
268651
269097
|
default:
|
|
268652
269098
|
throw new EndpointError(`Unexpected endpoint property type: ${typeof property2}`);
|
|
268653
269099
|
}
|
|
268654
269100
|
};
|
|
268655
|
-
var
|
|
268656
|
-
|
|
268657
|
-
|
|
268658
|
-
}
|
|
269101
|
+
var group$1 = {
|
|
269102
|
+
getEndpointProperty,
|
|
269103
|
+
getEndpointProperties
|
|
269104
|
+
};
|
|
268659
269105
|
var getEndpointUrl = (endpointUrl, options) => {
|
|
268660
269106
|
const expression = evaluateExpression(endpointUrl, "Endpoint URL", options);
|
|
268661
269107
|
if (typeof expression === "string") {
|
|
@@ -268701,17 +269147,6 @@ var require_dist_cjs20 = __commonJS({
|
|
|
268701
269147
|
referenceRecord: { ...options.referenceRecord, ...referenceRecord }
|
|
268702
269148
|
}));
|
|
268703
269149
|
};
|
|
268704
|
-
var evaluateTreeRule = (treeRule, options) => {
|
|
268705
|
-
const { conditions, rules } = treeRule;
|
|
268706
|
-
const { result, referenceRecord } = evaluateConditions(conditions, options);
|
|
268707
|
-
if (!result) {
|
|
268708
|
-
return;
|
|
268709
|
-
}
|
|
268710
|
-
return evaluateRules(rules, {
|
|
268711
|
-
...options,
|
|
268712
|
-
referenceRecord: { ...options.referenceRecord, ...referenceRecord }
|
|
268713
|
-
});
|
|
268714
|
-
};
|
|
268715
269150
|
var evaluateRules = (rules, options) => {
|
|
268716
269151
|
for (const rule of rules) {
|
|
268717
269152
|
if (rule.type === "endpoint") {
|
|
@@ -268722,7 +269157,7 @@ var require_dist_cjs20 = __commonJS({
|
|
|
268722
269157
|
} else if (rule.type === "error") {
|
|
268723
269158
|
evaluateErrorRule(rule, options);
|
|
268724
269159
|
} else if (rule.type === "tree") {
|
|
268725
|
-
const endpointOrUndefined = evaluateTreeRule(rule, options);
|
|
269160
|
+
const endpointOrUndefined = group.evaluateTreeRule(rule, options);
|
|
268726
269161
|
if (endpointOrUndefined) {
|
|
268727
269162
|
return endpointOrUndefined;
|
|
268728
269163
|
}
|
|
@@ -268732,6 +269167,21 @@ var require_dist_cjs20 = __commonJS({
|
|
|
268732
269167
|
}
|
|
268733
269168
|
throw new EndpointError(`Rules evaluation failed`);
|
|
268734
269169
|
};
|
|
269170
|
+
var evaluateTreeRule = (treeRule, options) => {
|
|
269171
|
+
const { conditions, rules } = treeRule;
|
|
269172
|
+
const { result, referenceRecord } = evaluateConditions(conditions, options);
|
|
269173
|
+
if (!result) {
|
|
269174
|
+
return;
|
|
269175
|
+
}
|
|
269176
|
+
return group.evaluateRules(rules, {
|
|
269177
|
+
...options,
|
|
269178
|
+
referenceRecord: { ...options.referenceRecord, ...referenceRecord }
|
|
269179
|
+
});
|
|
269180
|
+
};
|
|
269181
|
+
var group = {
|
|
269182
|
+
evaluateRules,
|
|
269183
|
+
evaluateTreeRule
|
|
269184
|
+
};
|
|
268735
269185
|
var resolveEndpoint3 = (ruleSetObject, options) => {
|
|
268736
269186
|
const { endpointParams, logger: logger2 } = options;
|
|
268737
269187
|
const { parameters, rules } = ruleSetObject;
|
|
@@ -271254,8 +271704,8 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
271254
271704
|
} catch (e3) {
|
|
271255
271705
|
}
|
|
271256
271706
|
}
|
|
271257
|
-
const { service, operation } = (0, import_util_middleware5.getSmithyContext)(context3);
|
|
271258
|
-
const path7 = `/service/${service}/operation/${
|
|
271707
|
+
const { service, operation: operation2 } = (0, import_util_middleware5.getSmithyContext)(context3);
|
|
271708
|
+
const path7 = `/service/${service}/operation/${operation2}`;
|
|
271259
271709
|
if (request.path.endsWith("/")) {
|
|
271260
271710
|
request.path += path7.slice(1);
|
|
271261
271711
|
} else {
|
|
@@ -271960,10 +272410,10 @@ var require_dist_cjs27 = __commonJS({
|
|
|
271960
272410
|
this._middlewareFn = middlewareSupplier;
|
|
271961
272411
|
return this;
|
|
271962
272412
|
}
|
|
271963
|
-
s(service,
|
|
272413
|
+
s(service, operation2, smithyContext = {}) {
|
|
271964
272414
|
this._smithyContext = {
|
|
271965
272415
|
service,
|
|
271966
|
-
operation,
|
|
272416
|
+
operation: operation2,
|
|
271967
272417
|
...smithyContext
|
|
271968
272418
|
};
|
|
271969
272419
|
return this;
|
|
@@ -271990,9 +272440,9 @@ var require_dist_cjs27 = __commonJS({
|
|
|
271990
272440
|
this._deserializer = deserializer;
|
|
271991
272441
|
return this;
|
|
271992
272442
|
}
|
|
271993
|
-
sc(
|
|
271994
|
-
this._operationSchema =
|
|
271995
|
-
this._smithyContext.operationSchema =
|
|
272443
|
+
sc(operation2) {
|
|
272444
|
+
this._operationSchema = operation2;
|
|
272445
|
+
this._smithyContext.operationSchema = operation2;
|
|
271996
272446
|
return this;
|
|
271997
272447
|
}
|
|
271998
272448
|
build() {
|
|
@@ -272844,7 +273294,7 @@ var init_AwsJsonRpcProtocol = __esm({
|
|
|
272844
273294
|
}
|
|
272845
273295
|
Object.assign(request.headers, {
|
|
272846
273296
|
"content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`,
|
|
272847
|
-
"x-amz-target": `${this.serviceTarget}.${
|
|
273297
|
+
"x-amz-target": `${this.serviceTarget}.${operationSchema.name}`
|
|
272848
273298
|
});
|
|
272849
273299
|
if (this.awsQueryCompatible) {
|
|
272850
273300
|
request.headers["x-amzn-query-mode"] = "true";
|
|
@@ -276967,6 +277417,7 @@ var require_dist_cjs42 = __commonJS({
|
|
|
276967
277417
|
var ENV_PROFILE = "AWS_PROFILE";
|
|
276968
277418
|
var DEFAULT_PROFILE = "default";
|
|
276969
277419
|
var getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;
|
|
277420
|
+
var CONFIG_PREFIX_SEPARATOR = ".";
|
|
276970
277421
|
var getConfigData = (data2) => Object.entries(data2).filter(([key]) => {
|
|
276971
277422
|
const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
|
|
276972
277423
|
if (indexOfSeparator === -1) {
|
|
@@ -277033,7 +277484,6 @@ var require_dist_cjs42 = __commonJS({
|
|
|
277033
277484
|
return map4;
|
|
277034
277485
|
};
|
|
277035
277486
|
var swallowError$1 = () => ({});
|
|
277036
|
-
var CONFIG_PREFIX_SEPARATOR = ".";
|
|
277037
277487
|
var loadSharedConfigFiles = async (init = {}) => {
|
|
277038
277488
|
const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;
|
|
277039
277489
|
const homeDir = getHomeDir.getHomeDir();
|
|
@@ -278238,7 +278688,7 @@ var require_package = __commonJS({
|
|
|
278238
278688
|
module2.exports = {
|
|
278239
278689
|
name: "@aws-sdk/client-bedrock-runtime",
|
|
278240
278690
|
description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
278241
|
-
version: "3.
|
|
278691
|
+
version: "3.911.0",
|
|
278242
278692
|
scripts: {
|
|
278243
278693
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
278244
278694
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -278257,21 +278707,21 @@ var require_package = __commonJS({
|
|
|
278257
278707
|
dependencies: {
|
|
278258
278708
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
278259
278709
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
278260
|
-
"@aws-sdk/core": "3.
|
|
278261
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
278710
|
+
"@aws-sdk/core": "3.911.0",
|
|
278711
|
+
"@aws-sdk/credential-provider-node": "3.911.0",
|
|
278262
278712
|
"@aws-sdk/eventstream-handler-node": "3.910.0",
|
|
278263
278713
|
"@aws-sdk/middleware-eventstream": "3.910.0",
|
|
278264
278714
|
"@aws-sdk/middleware-host-header": "3.910.0",
|
|
278265
278715
|
"@aws-sdk/middleware-logger": "3.910.0",
|
|
278266
278716
|
"@aws-sdk/middleware-recursion-detection": "3.910.0",
|
|
278267
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
278717
|
+
"@aws-sdk/middleware-user-agent": "3.911.0",
|
|
278268
278718
|
"@aws-sdk/middleware-websocket": "3.910.0",
|
|
278269
278719
|
"@aws-sdk/region-config-resolver": "3.910.0",
|
|
278270
|
-
"@aws-sdk/token-providers": "3.
|
|
278720
|
+
"@aws-sdk/token-providers": "3.911.0",
|
|
278271
278721
|
"@aws-sdk/types": "3.910.0",
|
|
278272
278722
|
"@aws-sdk/util-endpoints": "3.910.0",
|
|
278273
278723
|
"@aws-sdk/util-user-agent-browser": "3.910.0",
|
|
278274
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
278724
|
+
"@aws-sdk/util-user-agent-node": "3.911.0",
|
|
278275
278725
|
"@smithy/config-resolver": "^4.3.2",
|
|
278276
278726
|
"@smithy/core": "^3.16.1",
|
|
278277
278727
|
"@smithy/eventstream-serde-browser": "^4.2.2",
|
|
@@ -279019,7 +279469,7 @@ var init_package = __esm({
|
|
|
279019
279469
|
"node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
279020
279470
|
package_default = {
|
|
279021
279471
|
name: "@aws-sdk/nested-clients",
|
|
279022
|
-
version: "3.
|
|
279472
|
+
version: "3.911.0",
|
|
279023
279473
|
description: "Nested clients for AWS SDK packages.",
|
|
279024
279474
|
main: "./dist-cjs/index.js",
|
|
279025
279475
|
module: "./dist-es/index.js",
|
|
@@ -279048,16 +279498,16 @@ var init_package = __esm({
|
|
|
279048
279498
|
dependencies: {
|
|
279049
279499
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
279050
279500
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
279051
|
-
"@aws-sdk/core": "3.
|
|
279501
|
+
"@aws-sdk/core": "3.911.0",
|
|
279052
279502
|
"@aws-sdk/middleware-host-header": "3.910.0",
|
|
279053
279503
|
"@aws-sdk/middleware-logger": "3.910.0",
|
|
279054
279504
|
"@aws-sdk/middleware-recursion-detection": "3.910.0",
|
|
279055
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
279505
|
+
"@aws-sdk/middleware-user-agent": "3.911.0",
|
|
279056
279506
|
"@aws-sdk/region-config-resolver": "3.910.0",
|
|
279057
279507
|
"@aws-sdk/types": "3.910.0",
|
|
279058
279508
|
"@aws-sdk/util-endpoints": "3.910.0",
|
|
279059
279509
|
"@aws-sdk/util-user-agent-browser": "3.910.0",
|
|
279060
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
279510
|
+
"@aws-sdk/util-user-agent-node": "3.911.0",
|
|
279061
279511
|
"@smithy/config-resolver": "^4.3.2",
|
|
279062
279512
|
"@smithy/core": "^3.16.1",
|
|
279063
279513
|
"@smithy/fetch-http-handler": "^5.3.3",
|
|
@@ -280472,7 +280922,7 @@ var require_package2 = __commonJS({
|
|
|
280472
280922
|
module2.exports = {
|
|
280473
280923
|
name: "@aws-sdk/client-sso",
|
|
280474
280924
|
description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
280475
|
-
version: "3.
|
|
280925
|
+
version: "3.911.0",
|
|
280476
280926
|
scripts: {
|
|
280477
280927
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
280478
280928
|
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
@@ -280491,16 +280941,16 @@ var require_package2 = __commonJS({
|
|
|
280491
280941
|
dependencies: {
|
|
280492
280942
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
280493
280943
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
280494
|
-
"@aws-sdk/core": "3.
|
|
280944
|
+
"@aws-sdk/core": "3.911.0",
|
|
280495
280945
|
"@aws-sdk/middleware-host-header": "3.910.0",
|
|
280496
280946
|
"@aws-sdk/middleware-logger": "3.910.0",
|
|
280497
280947
|
"@aws-sdk/middleware-recursion-detection": "3.910.0",
|
|
280498
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
280948
|
+
"@aws-sdk/middleware-user-agent": "3.911.0",
|
|
280499
280949
|
"@aws-sdk/region-config-resolver": "3.910.0",
|
|
280500
280950
|
"@aws-sdk/types": "3.910.0",
|
|
280501
280951
|
"@aws-sdk/util-endpoints": "3.910.0",
|
|
280502
280952
|
"@aws-sdk/util-user-agent-browser": "3.910.0",
|
|
280503
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
280953
|
+
"@aws-sdk/util-user-agent-node": "3.911.0",
|
|
280504
280954
|
"@smithy/config-resolver": "^4.3.2",
|
|
280505
280955
|
"@smithy/core": "^3.16.1",
|
|
280506
280956
|
"@smithy/fetch-http-handler": "^5.3.3",
|
|
@@ -360334,7 +360784,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"assert":true,"node:assert":[">= 14.1
|
|
|
360334
360784
|
/***/ ((module) => {
|
|
360335
360785
|
|
|
360336
360786
|
"use strict";
|
|
360337
|
-
module.exports = {"rE":"0.1.
|
|
360787
|
+
module.exports = {"rE":"0.1.95"};
|
|
360338
360788
|
|
|
360339
360789
|
/***/ })
|
|
360340
360790
|
|